From f0a6c7de1d87dcecc1e97c9059e0e13b2bdb0b7c Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Fri, 27 Oct 2023 10:28:53 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Record partial allocations in allocate_range(). --- libs/vkd3d-shader/hlsl_codegen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 456c393e..76a010fb 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -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;