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:
parent
d09ee469f0
commit
4cd260590c
|
@ -143,15 +143,15 @@ lower_readonly_image_op(nir_builder *b, nir_instr *instr, void *context)
|
||||||
replace_image_type_with_sampler(deref);
|
replace_image_type_with_sampler(deref);
|
||||||
}
|
}
|
||||||
|
|
||||||
tex->coord_components = coord_components;
|
|
||||||
switch (intrin->intrinsic) {
|
switch (intrin->intrinsic) {
|
||||||
case nir_intrinsic_image_deref_load: {
|
case nir_intrinsic_image_deref_load: {
|
||||||
assert(intrin->src[1].is_ssa);
|
assert(intrin->src[1].is_ssa);
|
||||||
nir_ssa_def *coord =
|
nir_ssa_def *coord =
|
||||||
nir_channels(b, intrin->src[1].ssa,
|
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_type = nir_tex_src_coord;
|
||||||
tex->src[1].src = nir_src_for_ssa(coord);
|
tex->src[1].src = nir_src_for_ssa(coord);
|
||||||
|
tex->coord_components = coord_components;
|
||||||
|
|
||||||
assert(intrin->src[3].is_ssa);
|
assert(intrin->src[3].is_ssa);
|
||||||
nir_ssa_def *lod = intrin->src[3].ssa;
|
nir_ssa_def *lod = intrin->src[3].ssa;
|
||||||
|
|
Loading…
Reference in New Issue