mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 05:50:11 +01:00
agx: fix ballot extend packing
hit with uniform atomic ops with tessellation. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30488>
This commit is contained in:
parent
810808b778
commit
75d07cc3d0
1 changed files with 11 additions and 2 deletions
|
|
@ -523,9 +523,18 @@ agx_pack_alu(struct util_dynarray *emission, agx_instr *I)
|
|||
if (length <= sizeof(uint64_t)) {
|
||||
unsigned extend_offset = ((length - sizeof(extend)) * 8);
|
||||
|
||||
/* XXX: This is a weird special case */
|
||||
if (I->op == AGX_OPCODE_IADD)
|
||||
/* XXX: Encode these special cases better */
|
||||
switch (I->op) {
|
||||
case AGX_OPCODE_IADD:
|
||||
case AGX_OPCODE_ICMP_BALLOT:
|
||||
case AGX_OPCODE_ICMP_QUAD_BALLOT:
|
||||
case AGX_OPCODE_FCMP_BALLOT:
|
||||
case AGX_OPCODE_FCMP_QUAD_BALLOT:
|
||||
extend_offset -= 16;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
raw |= (uint64_t)extend << extend_offset;
|
||||
memcpy(util_dynarray_grow_bytes(emission, 1, length), &raw, length);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue