vkd3d-shader: Only mark entry point parameters as uniform, input, or output.

In fact, don't even mark them directly; only mark the synthetic variables.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2021-04-27 12:14:18 -05:00
committed by Alexandre Julliard
parent 16e549e579
commit 549be35c0a
4 changed files with 51 additions and 60 deletions

View File

@@ -763,25 +763,10 @@ static bool add_func_parameter(struct hlsl_ctx *ctx, struct list *list,
if (param->type->type == HLSL_CLASS_MATRIX)
assert(param->type->modifiers & HLSL_MODIFIERS_MAJORITY_MASK);
if (!(var = hlsl_new_var(param->name, param->type, loc, param->semantic, param->reg_reservation)))
if (!(var = hlsl_new_var(param->name, param->type, loc, param->semantic, param->modifiers, param->reg_reservation)))
return false;
var->is_param = 1;
if (param->type->type != HLSL_CLASS_OBJECT)
{
if (param->modifiers & HLSL_STORAGE_UNIFORM)
{
var->is_uniform = 1;
}
else
{
if (param->modifiers & HLSL_STORAGE_IN)
var->is_input_varying = 1;
if (param->modifiers & HLSL_STORAGE_OUT)
var->is_output_varying = 1;
}
}
if (!hlsl_add_var(ctx, var, false))
{
hlsl_free_var(var);
@@ -1424,7 +1409,7 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
if (type->type != HLSL_CLASS_MATRIX)
check_invalid_matrix_modifiers(ctx, modifiers, v->loc);
if (!(var = hlsl_new_var(v->name, type, v->loc, v->semantic, v->reg_reservation)))
if (!(var = hlsl_new_var(v->name, type, v->loc, v->semantic, modifiers, v->reg_reservation)))
{
free_parse_variable_def(v);
continue;
@@ -1432,9 +1417,6 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
if (ctx->cur_scope == ctx->globals)
{
if (type->type != HLSL_CLASS_OBJECT && !(modifiers & HLSL_STORAGE_STATIC))
var->is_uniform = 1;
local = false;
if ((func = hlsl_get_func_decl(ctx, var->name)))