mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-20 05:40:39 +02:00
ir3: Reduce the maximum allowed imm offset for shared var load/store
STL/LDL have 13 bits to store imm offset. However the most significant
bit in the offset is a sign bit, so the positive offset is limited by
12 bits.
nir_opt_offsets only has the upper limit and doesn't deal with
negative offsets, so shared_max should be changed to `(1 << 12) - 1`.
The issue was found in "Monster Hunter: World".
Fixes: 0b2da9d795
("ir3: Limit the maximum imm offset in nir_opt_offset for shared vars")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20100>
This commit is contained in:
parent
96ec79c7e3
commit
8f0177b334
1 changed files with 4 additions and 1 deletions
|
|
@ -134,7 +134,10 @@ ir3_optimize_loop(struct ir3_compiler *compiler, nir_shader *s)
|
|||
*/
|
||||
.uniform_max = (1 << 9) - 1,
|
||||
|
||||
.shared_max = (1 << 13) - 1,
|
||||
/* STL/LDL have 13b for offset with MSB being a sign bit, but this opt
|
||||
* doesn't deal with negative offsets.
|
||||
*/
|
||||
.shared_max = (1 << 12) - 1,
|
||||
|
||||
.buffer_max = ~0,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue