vkd3d-shader/hlsl: Treat "string" type name as case-insensitive.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-08-13 22:19:27 +02:00 committed by Henri Verbeet
parent 1ce68cee2c
commit 89be723ad7
Notes: Henri Verbeet 2024-08-14 22:15:51 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/995
2 changed files with 4 additions and 2 deletions

View File

@ -935,6 +935,7 @@ static const char * get_case_insensitive_typename(const char *name)
"texture", "texture",
"vector", "vector",
"vertexshader", "vertexshader",
"string",
}; };
unsigned int i; unsigned int i;
@ -3953,9 +3954,10 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
ctx->builtin_types.sampler[bt] = type; ctx->builtin_types.sampler[bt] = type;
} }
ctx->builtin_types.string = hlsl_new_simple_type(ctx, "STRING", HLSL_CLASS_STRING);
ctx->builtin_types.Void = hlsl_new_simple_type(ctx, "void", HLSL_CLASS_VOID); ctx->builtin_types.Void = hlsl_new_simple_type(ctx, "void", HLSL_CLASS_VOID);
ctx->builtin_types.null = hlsl_new_simple_type(ctx, "NULL", HLSL_CLASS_NULL); ctx->builtin_types.null = hlsl_new_simple_type(ctx, "NULL", HLSL_CLASS_NULL);
ctx->builtin_types.string = hlsl_new_simple_type(ctx, "string", HLSL_CLASS_STRING);
hlsl_scope_add_type(ctx->globals, ctx->builtin_types.string);
hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "DepthStencilView", HLSL_CLASS_DEPTH_STENCIL_VIEW)); hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "DepthStencilView", HLSL_CLASS_DEPTH_STENCIL_VIEW));
hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "DepthStencilState", HLSL_CLASS_DEPTH_STENCIL_STATE)); hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "DepthStencilState", HLSL_CLASS_DEPTH_STENCIL_STATE));
hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "fxgroup", HLSL_CLASS_EFFECT_GROUP)); hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "fxgroup", HLSL_CLASS_EFFECT_GROUP));

View File

@ -1,4 +1,4 @@
[pixel shader todo fail(sm>=6)] [pixel shader fail(sm>=6)]
String s = "text"; String s = "text";
string s2 = "text2"; string s2 = "text2";
sTring s3 = "text3"; sTring s3 = "text3";