From 56100d36b1534fa12888e55c749ee4f57c6adc65 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 16 Jan 2024 12:09:41 +0100 Subject: [PATCH] vkd3d-shader/fx: Check technique type in global scope as well. Signed-off-by: Nikolay Sivov --- libs/vkd3d-shader/fx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index 17b9627b..f9e03adf 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -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;