nir: Dont set coord_components on txs

Fixes: e1fc23265f ("nir: Add a pass for lowering CL-style image ops to texture ops")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15758>
This commit is contained in:
Jason Ekstrand 2022-04-05 15:59:38 -05:00 committed by Marge Bot
parent d09ee469f0
commit 4cd260590c
1 changed files with 2 additions and 2 deletions

View File

@ -143,15 +143,15 @@ lower_readonly_image_op(nir_builder *b, nir_instr *instr, void *context)
replace_image_type_with_sampler(deref);
}
tex->coord_components = coord_components;
switch (intrin->intrinsic) {
case nir_intrinsic_image_deref_load: {
assert(intrin->src[1].is_ssa);
nir_ssa_def *coord =
nir_channels(b, intrin->src[1].ssa,
(1 << tex->coord_components) - 1);
(1 << coord_components) - 1);
tex->src[1].src_type = nir_tex_src_coord;
tex->src[1].src = nir_src_for_ssa(coord);
tex->coord_components = coord_components;
assert(intrin->src[3].is_ssa);
nir_ssa_def *lod = intrin->src[3].ssa;