mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Forbid declaring variables as both "uniform" and "static".
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1bc2ea37c2
commit
07fb4ea1ae
@ -1423,6 +1423,10 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
|
||||
{
|
||||
local = false;
|
||||
|
||||
if ((modifiers & HLSL_STORAGE_UNIFORM) && (modifiers & HLSL_STORAGE_STATIC))
|
||||
hlsl_error(ctx, var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER,
|
||||
"Variable '%s' is declared as both \"uniform\" and \"static\".", var->name);
|
||||
|
||||
if ((func = hlsl_get_func_decl(ctx, var->name)))
|
||||
{
|
||||
hlsl_error(ctx, var->loc, VKD3D_SHADER_ERROR_HLSL_REDEFINED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user