On Mon Jan 15 01:04:49 2024 +0000, Conor McCarthy wrote:
For testing I can NOP the fixup instructions away pretty easily in a hex editor. I'm not sure we should be making this change though, unless it fixes something. While it's not great to depend on the presence of fixup instructions (which DXIL also contains btw), if the backend can assume they are always present, then the code is not broken. @hverbeet?
We don't know whether the fixup code is always present. In principle games are not required to use FXC or DXC to generate binary shaders, so I think our tests should be based on the TPF or DXIL semantics rather than on what compilers output. Even FXC and DXC might skip the fixup in some cases ([though so far I could make that happen](https://shader-playground.timjones.io/79a97c90156287c02164fe34a070a6b5), FXC doesn't seem to be able to propagate the knowledge about `u` being non-zero).
At any rate, as I said, that's a preexisting problem, so this MR can be accepted anyway.