mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Mark all declared non-static global variables as HLSL_STORAGE_UNIFORM.
Fixes: 549be35c0a
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:
committed by
Alexandre Julliard
parent
e237803011
commit
b20e182da1
@@ -1427,6 +1427,12 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
|
||||
hlsl_error(ctx, var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER,
|
||||
"Variable '%s' is declared as both \"uniform\" and \"static\".", var->name);
|
||||
|
||||
/* Mark it as uniform. We need to do this here since synthetic
|
||||
* variables also get put in the global scope, but shouldn't be
|
||||
* considered uniforms, and we have no way of telling otherwise. */
|
||||
if (!(modifiers & HLSL_STORAGE_STATIC))
|
||||
var->modifiers |= HLSL_STORAGE_UNIFORM;
|
||||
|
||||
if ((func = hlsl_get_func_decl(ctx, var->name)))
|
||||
{
|
||||
hlsl_error(ctx, var->loc, VKD3D_SHADER_ERROR_HLSL_REDEFINED,
|
||||
|
||||
Reference in New Issue
Block a user