mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
pan/mdg: Use type size to determine alignment
Generally, f16 needs to be aligned to 16-bit, f32 to 32-bit, ... Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
This commit is contained in:
parent
51582e5454
commit
1ff2cabe87
1 changed files with 5 additions and 3 deletions
|
|
@ -519,9 +519,11 @@ allocate_registers(compiler_context *ctx, bool *spilled)
|
|||
int dest = ins->dest;
|
||||
found_class[dest] = MAX2(found_class[dest], bytes);
|
||||
|
||||
/* XXX: Ensure swizzles align the right way with more LCRA constraints? */
|
||||
if (ins->type == TAG_ALU_4 && size != 32)
|
||||
min_alignment[dest] = 3; /* (1 << 3) = 8 */
|
||||
min_alignment[dest] =
|
||||
(size == 16) ? 1 : /* (1 << 1) = 2-byte */
|
||||
(size == 32) ? 2 : /* (1 << 2) = 4-byte */
|
||||
(size == 64) ? 3 : /* (1 << 3) = 8-byte */
|
||||
3; /* 8-bit todo */
|
||||
|
||||
if (ins->type == TAG_LOAD_STORE_4 && ins->load_64)
|
||||
min_alignment[dest] = 3;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue