mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
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.
This commit is contained in:
committed by
Henri Verbeet
parent
bfa655a01f
commit
5ad2e7ee6d
Notes:
Henri Verbeet
2025-05-14 15:29:22 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1500
@@ -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
|
||||
|
Reference in New Issue
Block a user