vkd3d-shader/hlsl: Interstage signature optimization, part 2.
Merge request reports
Activity
added 25 commits
-
5cd05c0c...c89e547e - 18 commits from branch
wine:master
- 32516a60 - vkd3d-shader/hlsl: Add mode field to register_allocator allocations.
- 16c65237 - vkd3d-shader/hlsl: Use a register_allocator to allocate semantic registers.
- fdd773d3 - vkd3d-shader/hlsl: Account for interpolation mode when allocating semantics.
- 84a5e7b9 - vkd3d-shader/hlsl: Also pass field storage modifiers to output signature elems.
- bc739894 - vkd3d-shader/hlsl: Optimize interstage signatures.
- 5b33362d - vkd3d-shader/hlsl: Prioritize smaller writemasks when allocating signature elems.
- 8c1b8325 - vkd3d-shader/hlsl: Sort signature elements by register id.
Toggle commit list-
5cd05c0c...c89e547e - 18 commits from branch
added 39 commits
-
8c1b8325...03ad04c8 - 32 commits from branch
wine:master
- ec7b6b44 - vkd3d-shader/hlsl: Add mode field to register_allocator allocations.
- 481a2996 - vkd3d-shader/hlsl: Use a register_allocator to allocate semantic registers.
- d9c226ee - vkd3d-shader/hlsl: Account for interpolation mode when allocating semantics.
- e84a81e0 - vkd3d-shader/hlsl: Also pass field storage modifiers to output signature elems.
- 573f32ff - vkd3d-shader/hlsl: Optimize interstage signatures.
- 6706d0fc - vkd3d-shader/hlsl: Prioritize smaller writemasks when allocating signature elems.
- 071bea5f - vkd3d-shader/hlsl: Sort signature elements by register id.
Toggle commit list-
8c1b8325...03ad04c8 - 32 commits from branch
For now I just enabled packing on the pixel shader output, vertex shader input, and geometry shader both input and output signatures, since this is the behavior I have observed.
Patch constants for hull shaders don't seem to do this packing, and I don't know of compute shaders using signatures.
By the way, it is worth reminding that we are not properly packing arrays yet.
That makes sense, you are right.
Sorry, I had to study hull and domain shaders a bit to be able to write examples to test whether this optimization was applied or not, seems that the only exceptions are indeed ps output and vs input.
Contrary to what I previously said, patch constant outputs are indeed packed, I just didn't realize because the test starts to fail because they use an array. Also patch constants have additional rules, for instance
sv_insidetessfactor
is allocated as afloat[1]
regardless of whether it is a singlefloat
(e.g. withdomain("tri")
).My hope was to introduce this change as an improvement to the incorrect pixel/vertex shader signatures we are producing to make Eastward work but now, since it would affect almost all other signatures, I am afraid I have to investigate how to properly allocate arrays (which means delaying the splitting of array semantics) as well and make it part of this MR, might take me a while.
I will also add a hs and ds reflection test, even though we can't compile ds properly yet.
added 9 commits
- 4fecf5ce - tests: Add signature reflection test with structs.
- 739bf7a4 - vkd3d-shader/hlsl: Add mode field to register_allocator allocations.
- d82e94e2 - vkd3d-shader/hlsl: Use a register_allocator to allocate semantic registers.
- 130f85d1 - vkd3d-shader/hlsl: Also pass field storage modifiers to output signature elems.
- 25f1479d - vkd3d-shader/hlsl: Allow accounting for interpolation mode when allocating semantics.
- 762ae558 - vkd3d-shader/hlsl: Allow to force alignment on some semantic vars.
- 32c8d2a0 - vkd3d-shader/hlsl: Allow prioritizing smaller writemasks when allocating signature elems.
- b27eeba5 - vkd3d-shader/hlsl: Optimize interstage signatures.
- 6c40097e - vkd3d-shader/hlsl: Sort signature elements by register id.
Toggle commit listIn the end I added the capacity of properly pack arrays by adding a
hlsl_ir_var.force_align
field. I also realized that this alignment is also forced for the first field of structs and naturally for the major vectors of matrices (except flat ones that have only 1 major vector). So there was no need to avoid splitting the semantic arrays.With this I feel confident enough to extend the packing to all other signatures (except vs input and ps output).
added 25 commits
-
6c40097e...8a3fe9cd - 16 commits from branch
wine:master
- 38133925 - tests: Add signature reflection test with structs.
- bbab15e5 - vkd3d-shader/hlsl: Add mode field to register_allocator allocations.
- f53be175 - vkd3d-shader/hlsl: Use a register_allocator to allocate semantic registers.
- 6ad83fa4 - vkd3d-shader/hlsl: Also pass field storage modifiers to output signature elems.
- 29eb5549 - vkd3d-shader/hlsl: Allow accounting for interpolation mode when allocating semantics.
- fc867a2e - vkd3d-shader/hlsl: Allow to force alignment on some semantic vars.
- 738a3b50 - vkd3d-shader/hlsl: Allow prioritizing smaller writemasks when allocating signature elems.
- 509079d5 - vkd3d-shader/hlsl: Optimize interstage signatures.
- f4fb3132 - vkd3d-shader/hlsl: Sort signature elements by register id.
Toggle commit list-
6c40097e...8a3fe9cd - 16 commits from branch
added 12 commits
-
f4fb3132...fb2b9744 - 3 commits from branch
wine:master
- d9b63118 - tests: Add signature reflection test with structs.
- 9ce7b780 - vkd3d-shader/hlsl: Add mode field to register_allocator allocations.
- 7180a967 - vkd3d-shader/hlsl: Use a register_allocator to allocate semantic registers.
- b65f5fb0 - vkd3d-shader/hlsl: Also pass field storage modifiers to output signature elements.
- 7fd6c29e - vkd3d-shader/hlsl: Allow accounting for interpolation mode when allocating semantics.
- d562b03c - vkd3d-shader/hlsl: Allow to force alignment on some semantic vars.
- 88dd0821 - vkd3d-shader/hlsl: Allow prioritizing smaller writemasks when allocating signature elements.
- 51d05c18 - vkd3d-shader/hlsl: Optimize interstage signatures.
- 2a8c1b28 - vkd3d-shader/hlsl: Sort signature elements by register id.
Toggle commit list-
f4fb3132...fb2b9744 - 3 commits from branch