mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Use unique temps for per-component operations.
This commit is contained in:
committed by
Henri Verbeet
parent
25ae2fcc84
commit
02d70be6ef
Notes:
Henri Verbeet
2025-09-02 11:45:55 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1592
@@ -6342,8 +6342,15 @@ static void allocate_instr_temp_register(struct hlsl_ctx *ctx,
|
||||
ctx->temp_count = max(ctx->temp_count, instr->reg.id + 1);
|
||||
}
|
||||
else if (is_per_component)
|
||||
instr->reg = allocate_numeric_registers_for_type(ctx, allocator,
|
||||
instr->index, instr->last_read, instr->data_type);
|
||||
{
|
||||
instr->reg.writemask = vkd3d_write_mask_from_component_count(instr->data_type->e.numeric.dimx);
|
||||
instr->reg.allocation_size = 1;
|
||||
instr->reg.allocated = true;
|
||||
instr->reg.type = VKD3DSPR_TEMP;
|
||||
instr->reg.id = ctx->temp_count++;
|
||||
|
||||
record_allocation(ctx, allocator, ctx->temp_count - 1, VKD3DSP_WRITEMASK_ALL, 1, UINT_MAX, 0, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
instr->reg.writemask = vkd3d_write_mask_from_component_count(instr->data_type->e.numeric.dimx);
|
||||
|
Reference in New Issue
Block a user