3Shain / dxmt

Metal-based implementation of D3D11 for MacOS / Wine
MIT License
346 stars 12 forks source link

Metal texture buffer alignment workaround #31

Closed 3Shain closed 1 month ago

3Shain commented 1 month ago

Metal requires texture buffer created from buffer to be 16 bytes aligned. However DirectX doesn't have this restriction. Certain games indeed create consecutive SRVs on the same buffer, and the alignment is only 4 bytes. When validation layer is off, Metal is silent about this error and introduces incorrect shader read result.

Features to implement:

K0bin commented 1 month ago

Wasn't this requirement dropped with newer Metal versions on Apple GPUs?

3Shain commented 1 month ago

Wasn't this requirement dropped with newer Metal versions on Apple GPUs?

Nope