vkd3d-shader/hlsl: Allocate anonymous constants after uniforms.

This commit is contained in:
Zebediah Figura 2022-11-07 17:45:35 -06:00 committed by Alexandre Julliard
parent 717cd3f5bb
commit 8a2b357855
Notes: Alexandre Julliard 2023-07-04 23:26:22 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/254

View File

@ -3359,8 +3359,6 @@ static void allocate_const_registers(struct hlsl_ctx *ctx, struct hlsl_ir_functi
struct register_allocator allocator = {0};
struct hlsl_ir_var *var;
allocate_const_registers_recurse(ctx, &entry_func->body, &allocator);
LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, struct hlsl_ir_var, extern_entry)
{
if (var->is_uniform && var->last_read)
@ -3377,6 +3375,8 @@ static void allocate_const_registers(struct hlsl_ctx *ctx, struct hlsl_ir_functi
}
}
allocate_const_registers_recurse(ctx, &entry_func->body, &allocator);
vkd3d_free(allocator.allocations);
}