From 1ce68cee2c0b92bfbfad09a322b5020c462aaaee Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 13 Aug 2024 21:20:03 +0200 Subject: [PATCH] vkd3d-shader/hlsl: Tokenize 'String' the same as 'string'. Signed-off-by: Nikolay Sivov --- libs/vkd3d-shader/hlsl.l | 1 + tests/hlsl/strings.shader_test | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.l b/libs/vkd3d-shader/hlsl.l index 75d2e432..0c02b278 100644 --- a/libs/vkd3d-shader/hlsl.l +++ b/libs/vkd3d-shader/hlsl.l @@ -145,6 +145,7 @@ stateblock {return KW_STATEBLOCK; } stateblock_state {return KW_STATEBLOCK_STATE; } static {return KW_STATIC; } string {return KW_STRING; } +String {return KW_STRING; } struct {return KW_STRUCT; } switch {return KW_SWITCH; } tbuffer {return KW_TBUFFER; } diff --git a/tests/hlsl/strings.shader_test b/tests/hlsl/strings.shader_test index a85365ff..aaba176c 100644 --- a/tests/hlsl/strings.shader_test +++ b/tests/hlsl/strings.shader_test @@ -17,7 +17,7 @@ float4 main() : sv_target return 0; } -[pixel shader todo fail(sm>=6)] +[pixel shader fail(sm>=6)] // Uninitialized strings are allowed for non-fx profiles String s; @@ -34,7 +34,7 @@ float4 main() : sv_target return 0; } -[pixel shader fail(sm<6) todo] +[pixel shader fail(sm<6)] typedef float4 String; float4 main() : sv_target @@ -42,7 +42,7 @@ float4 main() : sv_target return 0; } -[pixel shader fail(sm<6) todo] +[pixel shader fail(sm<6)] float4 String; float4 main() : sv_target