diff --git a/libs/vkd3d-shader/hlsl.l b/libs/vkd3d-shader/hlsl.l index 0e5f2bb6..c3570990 100644 --- a/libs/vkd3d-shader/hlsl.l +++ b/libs/vkd3d-shader/hlsl.l @@ -203,15 +203,15 @@ while {return KW_WHILE; } yylval->floatval = atof(yytext); return C_FLOAT; } -0x[0-9a-fA-F]+ { +0x[0-9a-fA-F]+[uU]? { yylval->intval = vkd3d_parse_integer(yytext); return C_INTEGER; } -0[0-7]+ { +0[0-7]+[uU]? { yylval->intval = vkd3d_parse_integer(yytext); return C_INTEGER; } -[0-9]+ { +[0-9]+[uU]? { yylval->intval = vkd3d_parse_integer(yytext); return C_INTEGER; } diff --git a/tests/hlsl/initializer-numeric.shader_test b/tests/hlsl/initializer-numeric.shader_test index d480b9d1..81d19d06 100644 --- a/tests/hlsl/initializer-numeric.shader_test +++ b/tests/hlsl/initializer-numeric.shader_test @@ -48,7 +48,7 @@ draw quad probe all rgba (10.1, 1.1, 1.2, 2.1) 4 -[pixel shader todo] +[pixel shader] float4 main() : sv_target { float4 aa = { 3U, 0xfau, 020u, -1u}; @@ -56,14 +56,14 @@ float4 main() : sv_target } [test] -todo(sm<6) draw quad +draw quad todo(sm<6) probe all rgba (3.0, 250.0, 16.0, 4.2949673e+009) 4 [require] shader model < 6.0 -[pixel shader todo] +[pixel shader] float4 main() : sv_target { // 3000000000 is -1294967296 when it doesn't have the 'u' suffix, except in SM6. @@ -72,5 +72,5 @@ float4 main() : sv_target } [test] -todo draw quad +draw quad todo probe all rgba (-1294967296.0, 3000000000.0, 0.0, 0.0) 4