mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 06:50:11 +01:00
freedreno/ir3: fix indirect cb0 load_ubo lowering
We can no longer assume that `state->ranges[0]` is block 0. It *often*
is, but when we encounter a "real" ubo that we lower to `load_uniform`
before a block 0 `load_ubo`, it could end up another entry in the table.
Resulting in the second pass after gathering ubo ranges, not finding a
valid range. Which results in a `load_ubo` for a thing that is not
actually a ubo making it's way into ir3 frontend. Resulting in grabbing
what we think is a ubo address out of some unrelated const register, and
trying to dereference that. Which as you can imagine, fails in amusing
ways.
Fixes: fc850080ee ("ir3: Rewrite UBO push analysis to support bindless")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4954>
This commit is contained in:
parent
c4dc877cb5
commit
d69f6fd852
1 changed files with 2 additions and 2 deletions
|
|
@ -98,8 +98,8 @@ gather_ubo_ranges(nir_shader *nir, nir_intrinsic_instr *instr,
|
|||
/* If this is an indirect on UBO 0, we'll still lower it back to
|
||||
* load_uniform. Set the range to cover all of UBO 0.
|
||||
*/
|
||||
state->range[0].start = 0;
|
||||
state->range[0].end = ALIGN(nir->num_uniforms * 16, 16 * 4);
|
||||
old_r->start = 0;
|
||||
old_r->end = ALIGN(nir->num_uniforms * 16, 16 * 4);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue