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>
(cherry picked from commit 0b2da9d795)
This commit is contained in:
Danylo Piliaiev 2022-02-10 14:07:12 +02:00 committed by Dylan Baker
parent fc450c2f54
commit 081ea7fc89
2 changed files with 2 additions and 2 deletions

View file

@ -517,7 +517,7 @@
"description": "ir3: Limit the maximum imm offset in nir_opt_offset for shared vars",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "b024102d7c2959451bfef323432beaa4dca4dd88"
},

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,
};