mesa/st: fix lower_tex_src_plane in multiple samplers scenario
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 24 Mar 2021 21:46:24 +0000 (22:46 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 26 Mar 2021 09:21:35 +0000 (10:21 +0100)
commit6298347ec71e7e03c02bf262f37d176dbcc2b987
treeb8ca9528d4a0ec0ecebbb9bfb81c8d2a78784647
parent3fe3aebd630e9a61812d1a14cd95fce8bf26b334
mesa/st: fix lower_tex_src_plane in multiple samplers scenario

"plane[0].i32" is the plane being lowered, it's not the sampler we're looking
for.

It worked when there's a single sampler because, eg for NV12, plane[0].i32 for
the UV plane would be 1 and the added ":uv" sampler would also land at binding
point 1.

Fixes: 079e5f73d72 ("mesa/st: rewrite src var when lowering tex_src_plane")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9812>
src/mesa/state_tracker/st_nir_lower_tex_src_plane.c