vkd3d-shader/fx: Check technique type in global scope as well.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-01-16 12:09:41 +01:00 committed by Alexandre Julliard
parent 2c1905b780
commit 56100d36b1
Notes: Alexandre Julliard 2024-01-23 23:03:22 +01:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/565

View File

@ -176,9 +176,7 @@ static void write_techniques(struct hlsl_scope *scope, struct fx_write_context *
LIST_FOR_EACH_ENTRY(var, &scope->vars, struct hlsl_ir_var, scope_entry)
{
const struct hlsl_type *type = var->data_type;
if (type->base_type == HLSL_TYPE_TECHNIQUE && type->e.version == 10)
if (technique_matches_version(var, fx))
{
write_technique(var, fx);
++fx->technique_count;