diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index d5534d8c..00cb3711 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -2908,7 +2908,7 @@ static const struct hlsl_ir_var *get_reserved_object(struct hlsl_ctx *ctx, enum LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, const struct hlsl_ir_var, extern_entry) { - if (var->last_read && var->reg_reservation.type == get_regset_name(regset) + if (var->reg_reservation.type == get_regset_name(regset) && var->reg_reservation.index == index) return var; } diff --git a/tests/register-reservations.shader_test b/tests/register-reservations.shader_test index 04de717b..f0287d00 100644 --- a/tests/register-reservations.shader_test +++ b/tests/register-reservations.shader_test @@ -34,7 +34,7 @@ float4 main() : sv_target [test] draw quad -todo probe all rgba (1.0, 1.0, 1.0, 99.0) +probe all rgba (1.0, 1.0, 1.0, 99.0) [pixel shader]