vkd3d-shader/hlsl: Respect object reservations even if the object is unused.

This commit is contained in:
Francisco Casas 2023-01-31 12:45:54 -03:00 committed by Alexandre Julliard
parent 7a7116eaab
commit 75359e6dbd
Notes: Alexandre Julliard 2023-02-22 21:51:16 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/66
2 changed files with 2 additions and 2 deletions

View File

@ -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) 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) && var->reg_reservation.index == index)
return var; return var;
} }

View File

@ -34,7 +34,7 @@ float4 main() : sv_target
[test] [test]
draw quad 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] [pixel shader]