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.
Merge request reports
Activity
added 25 commits
-
e1b77040...fbd8b1a8 - 21 commits from branch
wine:master
- b5ccc0e7 - vkd3d-shader/ir: Remove an unnecessary typecast in...
- c571a45e - vkd3d-shader/ir: Don't shift register write masks by the component index in...
- 3342d307 - tests: Add a test for shader interstage register packing.
- 102cfdab - tests: Add a test for writing patch constants during tessellation.
Toggle commit list-
e1b77040...fbd8b1a8 - 21 commits from branch
mentioned in merge request !1135 (merged)