freedreno/ir3: disallow immediate addr/offset for ldg/ldg.a

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13300>
This commit is contained in:
Danylo Piliaiev 2021-10-08 18:30:11 +03:00 committed by Marge Bot
parent f45b7c58c4
commit 1ef43a0be7

View file

@ -953,6 +953,12 @@ ir3_valid_flags(struct ir3_instruction *instr, unsigned n, unsigned flags)
if (instr->opc == OPC_STG_A && (n == 4))
return false;
if (instr->opc == OPC_LDG && (n == 0))
return false;
if (instr->opc == OPC_LDG_A && (n < 2))
return false;
/* as with atomics, these cat6 instrs can only have an immediate
* for SSBO/IBO slot argument
*/