vkd3d-shader: Don't shift register write masks by component idx
Fixes an issue where when an output started a non-zero component, because its write mask would be shifted over to start on component zero, writes to it would select sources based on that write mask. e.g. o0.yzw = r0.xxyz
would compile to o0 = r0.xxy
instead of o0 = r0.xyz
.
I tried adding a shader test to exercise this, but it needs tessellation, so it's currently todo. To make matters worse, while native d3dcompiler will pack the output into o0.yzw
next to the tessellation edge level in o0.x
, vkd3d-shader will not. So I added a second test to test interface register packing (also todo). Once both of those tests pass on vkd3d-shader, we'll have regression testing for this change. Is that reasonable or should I try something else for testing?
Note: It seems non-zero-component output isn't very well tested, so I don't know how many other things were assuming write masks would be / would not be shifted. Things seem to be working fine, but it feels a little weird to have everything work without touching any of the code that actually outputs the register write operations.