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

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-03-19 10:16:35 +01:00 committed by Alexandre Julliard
parent 17dc23269e
commit b09f919673
Notes: Alexandre Julliard 2024-03-27 23:07:48 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
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/729
2 changed files with 14 additions and 1 deletions

View File

@ -785,6 +785,7 @@ static const char * get_case_insensitive_typename(const char *name)
"float", "float",
"matrix", "matrix",
"pixelshader", "pixelshader",
"texture",
"vector", "vector",
"vertexshader", "vertexshader",
}; };
@ -3408,7 +3409,7 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
{"fxgroup", HLSL_CLASS_OBJECT, HLSL_TYPE_EFFECT_GROUP, 1, 1}, {"fxgroup", HLSL_CLASS_OBJECT, HLSL_TYPE_EFFECT_GROUP, 1, 1},
{"pass", HLSL_CLASS_OBJECT, HLSL_TYPE_PASS, 1, 1}, {"pass", HLSL_CLASS_OBJECT, HLSL_TYPE_PASS, 1, 1},
{"STRING", HLSL_CLASS_OBJECT, HLSL_TYPE_STRING, 1, 1}, {"STRING", HLSL_CLASS_OBJECT, HLSL_TYPE_STRING, 1, 1},
{"TEXTURE", HLSL_CLASS_OBJECT, HLSL_TYPE_TEXTURE, 1, 1}, {"texture", HLSL_CLASS_OBJECT, HLSL_TYPE_TEXTURE, 1, 1},
{"pixelshader", HLSL_CLASS_OBJECT, HLSL_TYPE_PIXELSHADER, 1, 1}, {"pixelshader", HLSL_CLASS_OBJECT, HLSL_TYPE_PIXELSHADER, 1, 1},
{"vertexshader", HLSL_CLASS_OBJECT, HLSL_TYPE_VERTEXSHADER, 1, 1}, {"vertexshader", HLSL_CLASS_OBJECT, HLSL_TYPE_VERTEXSHADER, 1, 1},
{"RenderTargetView",HLSL_CLASS_OBJECT, HLSL_TYPE_RENDERTARGETVIEW, 1, 1}, {"RenderTargetView",HLSL_CLASS_OBJECT, HLSL_TYPE_RENDERTARGETVIEW, 1, 1},

View File

@ -112,3 +112,15 @@ float4 main() : sv_target
{ {
return float4(0, 0, 0, 0); return float4(0, 0, 0, 0);
} }
[pixel shader fail(sm>=6)]
typedef float4 texturE;
Texture tex1;
texture tex2;
teXture tex3;
texturE var;
float4 main() : sv_target
{
return var;
}