mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Fix temp allocation for ps 1.x.
Iterate over the extern vars, not the parameters. The synthesized inputs and
output don't go in the function parameters.
Fixes: 8b57a612d7
This commit is contained in:
committed by
Henri Verbeet
parent
553e37314a
commit
d075c3c274
Notes:
Henri Verbeet
2025-03-10 15:23:55 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1410
@@ -5309,11 +5309,8 @@ static uint32_t allocate_temp_registers(struct hlsl_ctx *ctx, struct hlsl_ir_fun
|
||||
/* ps_1_* outputs are special and go in temp register 0. */
|
||||
if (ctx->profile->major_version == 1 && ctx->profile->type == VKD3D_SHADER_TYPE_PIXEL)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < entry_func->parameters.count; ++i)
|
||||
LIST_FOR_EACH_ENTRY(var, &entry_func->extern_vars, struct hlsl_ir_var, extern_entry)
|
||||
{
|
||||
var = entry_func->parameters.vars[i];
|
||||
if (var->is_output_semantic)
|
||||
{
|
||||
record_allocation(ctx, &allocator, 0, VKD3DSP_WRITEMASK_ALL,
|
||||
|
Reference in New Issue
Block a user