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:
Create texture buffer at nearest 16-bytes aligned address before the actually byte offset, and calculate the difference in bytes & elements
Encode the elements diff in argument buffer (as a part of the descriptor) and let the shader take it into account and correct the address.
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: