mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
brw: Use nir_intrinsic_[set_]base rather than poking at const_index[0]
Much clearer, especially since we're dealing with at least four different kinds of intrinsics. These helpers were introduced years ago, but probably didn't exist when we first wrote this code. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38343>
This commit is contained in:
parent
439c156831
commit
cde3a34a43
1 changed files with 2 additions and 2 deletions
|
|
@ -334,12 +334,12 @@ remap_patch_urb_offsets_instr(nir_builder *b, nir_intrinsic_instr *intrin, void
|
|||
io_sem.location == VARYING_SLOT_TESS_LEVEL_OUTER)
|
||||
return false;
|
||||
|
||||
gl_varying_slot varying = intrin->const_index[0];
|
||||
gl_varying_slot varying = nir_intrinsic_base(intrin);
|
||||
|
||||
const struct intel_vue_map *vue_map = data;
|
||||
int vue_slot = vue_map->varying_to_slot[varying];
|
||||
assert(vue_slot != -1);
|
||||
intrin->const_index[0] = vue_slot;
|
||||
nir_intrinsic_set_base(intrin, vue_slot);
|
||||
|
||||
nir_src *vertex = nir_get_io_arrayed_index_src(intrin);
|
||||
if (vertex) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue