st/mesa: Record samplers for extra planes in info->textures_used.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 15 May 2019 20:58:33 +0000 (13:58 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 16 May 2019 18:54:07 +0000 (11:54 -0700)
commit4b5e8eb3c8d709bd7c6d1a33a114bf4b002548f8
tree94b040c78341d8be3dc26be3b6f8ee5af28359c4
parent8a995f2b5e1e3f2a2eafd32870ebfb43b5cfdf27
st/mesa: Record samplers for extra planes in info->textures_used.

Normally gl_nir_lower_samplers_as_deref records info->textures_used
for us, but this pass runs after that, attempting to assign samplers
in the same order as st_atom_texture's external_samplers_used loop
so the stars align and we get the same locations.

Since we're adding textures late, we need to amend info->textures_used.

iris uses info->textures_used to set up texture bindings; this fixes
Piglit's ext_image_dma_buf_import-sample-{nv12,yuv420,yvu420} there.

Reviewed-by: Rob Clark <robdclark@gmail.com>
src/mesa/state_tracker/st_nir_lower_tex_src_plane.c