Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 15/10/21 23:54, Zebediah Figura ha scritto:
These can be assigned to when compatibility mode is used.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
libs/vkd3d-shader/hlsl_codegen.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index b7b0cd1b8..03c098fe1 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -1310,35 +1310,26 @@ 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)
if (var->data_type->type == HLSL_CLASS_OBJECT || (var->modifiers & HLSL_STORAGE_UNIFORM)) {
list_add_tail(&ctx->extern_vars, &var->extern_entry);
prepend_uniform_copy(ctx, entry_func->body, var); } else {
if (var->modifiers & HLSL_STORAGE_UNIFORM)
{
prepend_uniform_copy(ctx, entry_func->body, var);
}
else
{
if (var->data_type->type != HLSL_CLASS_STRUCT && !var->semantic.name)
hlsl_error(ctx, var->loc, VKD3D_SHADER_ERROR_HLSL_MISSING_SEMANTIC,
"Parameter \"%s\" is missing a semantic.", var->name);
if (var->modifiers & HLSL_STORAGE_IN)
prepend_input_var_copy(ctx, entry_func->body, var);
if (var->modifiers & HLSL_STORAGE_OUT)
append_output_var_copy(ctx, entry_func->body, var);
}
if (var->data_type->type != HLSL_CLASS_STRUCT && !var->semantic.name)
hlsl_error(ctx, var->loc, VKD3D_SHADER_ERROR_HLSL_MISSING_SEMANTIC,
"Parameter \"%s\" is missing a semantic.", var->name);
if (var->modifiers & HLSL_STORAGE_IN)
prepend_input_var_copy(ctx, entry_func->body, var);
if (var->modifiers & HLSL_STORAGE_OUT)
append_output_var_copy(ctx, entry_func->body, var); } } if (entry_func->return_var)