diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index aac4e4c0..e95eaa39 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -1638,14 +1638,14 @@ static void copy_propagation_invalidate_variable_from_deref_recurse(struct hlsl_ return; copy_propagation_invalidate_variable_from_deref_recurse(ctx, var_def, deref, subtype, - depth + 1, index * subtype_comp_count, writemask, time); + depth + 1, comp_start + index * subtype_comp_count, writemask, time); } else { for (i = 0; i < hlsl_type_element_count(type); ++i) { copy_propagation_invalidate_variable_from_deref_recurse(ctx, var_def, deref, subtype, - depth + 1, i * subtype_comp_count, writemask, time); + depth + 1, comp_start + i * subtype_comp_count, writemask, time); } } } diff --git a/tests/hlsl/hard-copy-prop.shader_test b/tests/hlsl/hard-copy-prop.shader_test index 90507496..06375892 100644 --- a/tests/hlsl/hard-copy-prop.shader_test +++ b/tests/hlsl/hard-copy-prop.shader_test @@ -222,4 +222,4 @@ float4 main() : sv_target [test] uniform 0 float 11.0 todo(sm<4) draw quad -todo(sm<6) probe (0, 0) rgba(1, 2, 3, 5) +probe (0, 0) rgba(1, 2, 3, 5)