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:
Elizabeth Figura
2025-03-07 17:25:23 -06:00
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

View File

@@ -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. */ /* ps_1_* outputs are special and go in temp register 0. */
if (ctx->profile->major_version == 1 && ctx->profile->type == VKD3D_SHADER_TYPE_PIXEL) if (ctx->profile->major_version == 1 && ctx->profile->type == VKD3D_SHADER_TYPE_PIXEL)
{ {
size_t i; LIST_FOR_EACH_ENTRY(var, &entry_func->extern_vars, struct hlsl_ir_var, extern_entry)
for (i = 0; i < entry_func->parameters.count; ++i)
{ {
var = entry_func->parameters.vars[i];
if (var->is_output_semantic) if (var->is_output_semantic)
{ {
record_allocation(ctx, &allocator, 0, VKD3DSP_WRITEMASK_ALL, record_allocation(ctx, &allocator, 0, VKD3DSP_WRITEMASK_ALL,