mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
nir/lower_non_uniform: Better handle non-derefs
In particular, if we have an index or bindless handle we were passing the original handle which, technically, is uniform within the context of the if. However, we can save the back-end compiler some effort if we pass it the result of the read_first_invocation(). (Rebased by Kenneth Graunke and Rhys Perry.) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7592>
This commit is contained in:
parent
0bf8d156a9
commit
c47fe54bc7
1 changed files with 2 additions and 0 deletions
|
|
@ -74,6 +74,8 @@ nu_handle_rewrite(nir_builder *b, struct nu_handle *h)
|
|||
nir_deref_instr *deref =
|
||||
nir_build_deref_array(b, h->parent_deref, h->first);
|
||||
*(h->src) = nir_src_for_ssa(&deref->dest.ssa);
|
||||
} else {
|
||||
*(h->src) = nir_src_for_ssa(h->first);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue