Henri Verbeet pushed to branch master at wine / vkd3d
Commits: b1d89154 by Shaun Ren at 2025-04-02T18:49:52+02:00 vkd3d-shader/hlsl: Divert written uniform derefs to temps before copy-propagation passes.
The following pixel shader currently triggers an infinite loop during copy propagation, which is fixed by this commit:
sampler s; Texture2D t1, t2;
float4 main() : sv_target { Texture2D t = t1; t1 = t2; t2 = t; return t1.Sample(s, float2(0, 0)) + t2.Sample(s, float2(0, 0)); }
The infinite loop occurs because copy_propagation_transform_object_load() replaces t1 in the resource_load(t1, ...) instruction with t2, t1, t2, ... repeatedly.
- - - - - 7aebed0e by Shaun Ren at 2025-04-02T18:49:52+02:00 vkd3d-shader/hlsl: Ensure that uniform objects are never written to in copy_propagation_transform_object_load().
- - - - - 3e44bd4e by Shaun Ren at 2025-04-02T18:51:10+02:00 tests/hlsl: Add a test for copy-propagation of uniform texture object writes.
- - - - -
2 changed files:
- libs/vkd3d-shader/hlsl_codegen.c - tests/hlsl/hard-copy-prop.shader_test
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/compare/3ead8d532b76e1dd03d080d0e99a8...