mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader: Remove a token for 'precise' modifier.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
f2b2040ff6
commit
cf7c05f431
Notes:
Alexandre Julliard
2024-03-12 22:58:37 +01:00
Approved-by: Matteo Bruni (@Mystral) 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/701
@ -155,6 +155,7 @@ vkd3d_shader_tests = \
|
||||
tests/hlsl/object-parameters.shader_test \
|
||||
tests/hlsl/object-references.shader_test \
|
||||
tests/hlsl/pow.shader_test \
|
||||
tests/hlsl/precise-modifier.shader_test \
|
||||
tests/hlsl/rasteriser-ordered-views.shader_test \
|
||||
tests/hlsl/reflect.shader_test \
|
||||
tests/hlsl/register-reservations-numeric.shader_test \
|
||||
|
@ -109,7 +109,6 @@ packoffset {return KW_PACKOFFSET; }
|
||||
pass {return KW_PASS; }
|
||||
PixelShader {return KW_PIXELSHADER; }
|
||||
pixelshader {return KW_PIXELSHADER; }
|
||||
precise {return KW_PRECISE; }
|
||||
RasterizerOrderedBuffer {return KW_RASTERIZERORDEREDBUFFER; }
|
||||
RasterizerOrderedStructuredBuffer {return KW_RASTERIZERORDEREDSTRUCTUREDBUFFER; }
|
||||
RasterizerOrderedTexture1D {return KW_RASTERIZERORDEREDTEXTURE1D; }
|
||||
|
@ -5363,7 +5363,6 @@ static void validate_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim,
|
||||
%token KW_PACKOFFSET
|
||||
%token KW_PASS
|
||||
%token KW_PIXELSHADER
|
||||
%token KW_PRECISE
|
||||
%token KW_RASTERIZERORDEREDBUFFER
|
||||
%token KW_RASTERIZERORDEREDSTRUCTUREDBUFFER
|
||||
%token KW_RASTERIZERORDEREDTEXTURE1D
|
||||
@ -6823,10 +6822,6 @@ var_modifiers:
|
||||
{
|
||||
$$ = add_modifiers(ctx, $2, HLSL_STORAGE_NOPERSPECTIVE, &@1);
|
||||
}
|
||||
| KW_PRECISE var_modifiers
|
||||
{
|
||||
$$ = add_modifiers(ctx, $2, HLSL_MODIFIER_PRECISE, &@1);
|
||||
}
|
||||
| KW_SHARED var_modifiers
|
||||
{
|
||||
$$ = add_modifiers(ctx, $2, HLSL_STORAGE_SHARED, &@1);
|
||||
@ -6875,7 +6870,14 @@ var_modifiers:
|
||||
{
|
||||
$$ = add_modifiers(ctx, $2, HLSL_MODIFIER_INLINE, &@1);
|
||||
}
|
||||
|
||||
| var_identifier var_modifiers
|
||||
{
|
||||
if (!strcmp($1, "precise"))
|
||||
$$ = add_modifiers(ctx, $2, HLSL_MODIFIER_PRECISE, &@1);
|
||||
else
|
||||
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_UNKNOWN_MODIFIER,
|
||||
"Unknown modifier %s.", debugstr_a($1));
|
||||
}
|
||||
|
||||
complex_initializer:
|
||||
initializer_expr
|
||||
|
@ -149,6 +149,7 @@ enum vkd3d_shader_error
|
||||
VKD3D_SHADER_ERROR_HLSL_NON_FINITE_RESULT = 5027,
|
||||
VKD3D_SHADER_ERROR_HLSL_DUPLICATE_SWITCH_CASE = 5028,
|
||||
VKD3D_SHADER_ERROR_HLSL_MISSING_TECHNIQUE = 5029,
|
||||
VKD3D_SHADER_ERROR_HLSL_UNKNOWN_MODIFIER = 5030,
|
||||
|
||||
VKD3D_SHADER_WARNING_HLSL_IMPLICIT_TRUNCATION = 5300,
|
||||
VKD3D_SHADER_WARNING_HLSL_DIVISION_BY_ZERO = 5301,
|
||||
|
41
tests/hlsl/precise-modifier.shader_test
Normal file
41
tests/hlsl/precise-modifier.shader_test
Normal file
@ -0,0 +1,41 @@
|
||||
[pixel shader]
|
||||
// 'precise' is not a keyword
|
||||
float4 precise;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return precise;
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 0.1 0.2 0.3 0.4
|
||||
draw quad
|
||||
probe all rgba (0.1, 0.2, 0.3, 0.4)
|
||||
|
||||
[pixel shader fail(sm>=6)]
|
||||
precise float4 var;
|
||||
typedef float4 precise;
|
||||
|
||||
precise main() : sv_target
|
||||
{
|
||||
return var;
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 0.1 0.2 0.3 0.4
|
||||
draw quad
|
||||
probe all rgba (0.1, 0.2, 0.3, 0.4)
|
||||
|
||||
[pixel shader]
|
||||
float4 precise;
|
||||
precise float4 var;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return precise;
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 0.1 0.2 0.3 0.4
|
||||
draw quad
|
||||
probe all rgba (0.1, 0.2, 0.3, 0.4)
|
Loading…
Reference in New Issue
Block a user