agx: Pack SR immediate

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11199>
This commit is contained in:
Alyssa Rosenzweig 2021-06-05 14:54:20 -04:00 committed by Marge Bot
parent 307b8f1b2f
commit 75cafd8472

View File

@ -326,6 +326,9 @@ agx_pack_alu(struct util_dynarray *emission, agx_instr *I)
raw |= (uint64_t) (I->mask & 0x3) << 38;
raw |= (uint64_t) ((I->mask >> 2) & 0x3) << 50;
raw |= (uint64_t) ((I->mask >> 4) & 0x1) << 63;
} else if (info.immediates & AGX_IMMEDIATE_SR) {
raw |= (uint64_t) (I->sr & 0x3F) << 16;
raw |= (uint64_t) (I->sr >> 6) << 26;
} else if (info.immediates & AGX_IMMEDIATE_WRITEOUT)
raw |= (uint64_t) (I->imm) << 8;
else if (info.immediates & AGX_IMMEDIATE_IMM)