mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Fix floating point literals matching.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
73e27ced37
commit
a4ca091888
@ -192,7 +192,7 @@ row_major {return KW_ROW_MAJOR; }
|
||||
yylval->floatval = atof(yytext);
|
||||
return C_FLOAT;
|
||||
}
|
||||
[0-9]+([eE][+-]?[0-9]+)?[h|H|f|F] {
|
||||
[0-9]+[eE][+-]?[0-9]+[h|H|f|F]? {
|
||||
yylval->floatval = atof(yytext);
|
||||
return C_FLOAT;
|
||||
}
|
||||
|
@ -33,3 +33,16 @@ float4 main() : sv_target
|
||||
[test]
|
||||
draw quad
|
||||
probe all rgba (1.0, 2.0, 3.0, 4.0) 4
|
||||
|
||||
|
||||
[pixel shader]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float4 aa = { 1e1, 1e-1, 1., 2.f };
|
||||
float4 bb = { .1, .1e1, .2f, 1.e-1f };
|
||||
return aa + bb;
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe all rgba (10.1, 1.1, 1.2, 2.1) 4
|
||||
|
Loading…
Reference in New Issue
Block a user