vkd3d-shader/hlsl: Record partial allocations in allocate_range().

This commit is contained in:
Zebediah Figura 2023-10-27 10:28:53 -05:00 committed by Alexandre Julliard
parent c683fc9402
commit f0a6c7de1d
Notes: Alexandre Julliard 2023-11-07 22:40:26 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/448

View File

@ -3587,6 +3587,8 @@ static struct hlsl_reg allocate_range(struct hlsl_ctx *ctx, struct register_allo
for (i = 0; i < reg_size / 4; ++i)
record_allocation(ctx, allocator, reg_idx + i, VKD3DSP_WRITEMASK_ALL, first_write, last_read);
if (reg_size % 4)
record_allocation(ctx, allocator, reg_idx + (reg_size / 4), (1u << (reg_size % 4)) - 1, first_write, last_read);
ret.id = reg_idx;
ret.allocation_size = align(reg_size, 4) / 4;