Henri Verbeet pushed to branch master at wine / vkd3d
Commits: 16b0afc1 by Shaun Ren at 2025-03-12T17:04:52+01:00 vkd3d-shader/tpf: Write non-zero static offsets in relative addressing mode in sm4_write_register_index().
- - - - - 766492d1 by Shaun Ren at 2025-03-12T17:06:47+01:00 vkd3d-shader/glsl: Implement support for indirect constant buffer addressing.
- - - - - 1c2434f4 by Shaun Ren at 2025-03-12T17:09:35+01:00 vkd3d-shader/hlsl: Allow uint1-typed deref path nodes.
When derefs with non-constant indices are copy-propagated, it is possible to end up with uint1-typed path nodes.
Also, introduce hlsl_is_vec1().
- - - - - 261b5120 by Shaun Ren at 2025-03-12T17:10:32+01:00 vkd3d-shader/hlsl: Allow non-constant indices in register_deref_usage().
- - - - - f6c35144 by Shaun Ren at 2025-03-12T17:10:32+01:00 vkd3d-shader/hlsl: Support patch arrays in hlsl_reg_from_deref().
- - - - - c6f18c93 by Shaun Ren at 2025-03-12T17:14:52+01:00 vkd3d-shader/hlsl: Support indirect addressing of uniforms in sm4_generate_vsir_reg_from_deref().
- - - - - 2368ff66 by Shaun Ren at 2025-03-12T17:18:52+01:00 vkd3d-shader/hlsl: Introduce simplify_exprs().
Also invoke simplify_exprs() after replace_deref_path_with_offset().
- - - - - 2bc7fa56 by Shaun Ren at 2025-03-12T17:19:56+01:00 vkd3d-shader/hlsl: Introduce component_index_from_deref_path_node().
- - - - - f484527c by Shaun Ren at 2025-03-12T17:22:44+01:00 vkd3d-shader/hlsl: Rename init_deref() to hlsl_init_deref().
- - - - - 7ab7b2ab by Shaun Ren at 2025-03-12T18:16:59+01:00 vkd3d-shader/hlsl: Implement copy-propagation of derefs with a non-constant index.
We implement a transformation that propagates loads with a single non-constant index in its deref path. Consider a load of the form var[[a0][a1]...[i]...[an]], where ak are integral constants, and i is an arbitrary non-constant node. If, for all j, the following holds:
var[[a0][a1]...[j]...[an]] = x[[c0*j + d0][c1*j + d1]...[cm*j + dm]],
where ck, dk are constants, then we can replace the load with x[[c0*i + d0]...[cm*i + dm]]. This pass is implemented by copy_propagation_replace_with_deref().
- - - - - 1b03676a by Shaun Ren at 2025-03-12T18:22:01+01:00 tests/hlsl: Add dynamic addressing copy-propagation tests.
- - - - -
8 changed files:
- libs/vkd3d-shader/glsl.c - libs/vkd3d-shader/hlsl.c - libs/vkd3d-shader/hlsl.h - libs/vkd3d-shader/hlsl_codegen.c - libs/vkd3d-shader/tpf.c - tests/hlsl/hard-copy-prop.shader_test - tests/hlsl/non-const-indexing.shader_test - tests/hlsl/sm1-const-allocation.shader_test
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/compare/81dc67b1ef411ea3cd7c09e6e9357...