From 5ad2e7ee6d90d9e3dde9122077d492c161f5e932 Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Mon, 14 Apr 2025 15:55:14 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Fix an incorrect error message for referring to non-struct types with "struct". We cannot be redefining struct types in this rule, only referring to already defined types. Struct type definition is handled by named_struct_spec, which complains if the type was defined at all, regardless of class. --- libs/vkd3d-shader/hlsl.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 2de9e607d..48200cb7f 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -8220,7 +8220,7 @@ type_no_void: { $$ = hlsl_get_type(ctx->cur_scope, $2, true, true); if ($$->class != HLSL_CLASS_STRUCT) - hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_REDEFINED, "\"%s\" redefined as a structure.", $2); + hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_REDEFINED, "\"%s\" is not a structure.", $2); vkd3d_free($2); } | KW_RENDERTARGETVIEW