ir3: Limit the maximum imm offset in nir_opt_offset for shared vars

STL/LDL have 13 bits to store imm offset.

Fixes crash in CS compilation in Monster Hunter World.

Fixes: b024102d7c
("freedreno/ir3: Use nir_opt_offset for removing constant adds for shared vars.")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14968>
This commit is contained in:
Danylo Piliaiev 2022-02-10 14:07:12 +02:00 committed by Marge Bot
parent b6557b80a5
commit 0b2da9d795

View file

@ -124,7 +124,7 @@ ir3_optimize_loop(struct ir3_compiler *compiler, nir_shader *s)
*/
.uniform_max = (1 << 9) - 1,
.shared_max = ~0,
.shared_max = (1 << 13) - 1,
.buffer_max = ~0,
};