vkd3d-shader/hlsl: Generate synthetic temps for object uniforms as well.

These can be assigned to when compatibility mode is used.

Signed-off-by: Zebediah Figura <zfigura@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: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-10-15 16:54:08 -05:00 committed by Alexandre Julliard
parent 5e3b8b70fc
commit 423213fb05

View File

@ -1310,21 +1310,13 @@ int hlsl_emit_dxbc(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_fun
LIST_FOR_EACH_ENTRY(var, &ctx->globals->vars, struct hlsl_ir_var, scope_entry)
{
if (var->data_type->type == HLSL_CLASS_OBJECT)
list_add_tail(&ctx->extern_vars, &var->extern_entry);
else if (var->modifiers & HLSL_STORAGE_UNIFORM)
if (var->modifiers & HLSL_STORAGE_UNIFORM)
prepend_uniform_copy(ctx, entry_func->body, var);
}
LIST_FOR_EACH_ENTRY(var, entry_func->parameters, struct hlsl_ir_var, param_entry)
{
if (var->data_type->type == HLSL_CLASS_OBJECT)
{
list_add_tail(&ctx->extern_vars, &var->extern_entry);
}
else
{
if (var->modifiers & HLSL_STORAGE_UNIFORM)
if (var->data_type->type == HLSL_CLASS_OBJECT || (var->modifiers & HLSL_STORAGE_UNIFORM))
{
prepend_uniform_copy(ctx, entry_func->body, var);
}
@ -1340,7 +1332,6 @@ int hlsl_emit_dxbc(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *entry_fun
append_output_var_copy(ctx, entry_func->body, var);
}
}
}
if (entry_func->return_var)
{
if (entry_func->return_var->data_type->type != HLSL_CLASS_STRUCT && !entry_func->return_var->semantic.name)