Skip to content
Snippets Groups Projects
Commit 6298347e authored by Pierre-Eric Pelloux-Prayer's avatar Pierre-Eric Pelloux-Prayer
Browse files

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: 079e5f73 ("mesa/st: rewrite src var when lowering tex_src_plane")
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!9812>
parent 3fe3aebd
No related branches found
No related tags found
No related merge requests found
...@@ -139,7 +139,7 @@ lower_tex_src_plane_block(nir_builder *b, lower_tex_src_state *state, nir_block ...@@ -139,7 +139,7 @@ lower_tex_src_plane_block(nir_builder *b, lower_tex_src_state *state, nir_block
if (tex_index >= 0 && samp_index >= 0) { if (tex_index >= 0 && samp_index >= 0) {
b->cursor = nir_before_instr(&tex->instr); b->cursor = nir_before_instr(&tex->instr);
nir_variable* samp = find_sampler(state, plane[0].i32); nir_variable* samp = find_sampler(state, tex->sampler_index);
assert(samp); assert(samp);
nir_deref_instr *tex_deref_instr = nir_build_deref_var(b, samp); nir_deref_instr *tex_deref_instr = nir_build_deref_var(b, samp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment