Mesa (main): nir: Dont set coord_components on txs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 7 21:36:34 UTC 2022
Module: Mesa
Branch: main
Commit: 4cd260590c67333ceb84b164b77231b57d6430d3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4cd260590c67333ceb84b164b77231b57d6430d3
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Tue Apr 5 15:59:38 2022 -0500
nir: Dont set coord_components on txs
Fixes: e1fc23265f9f ("nir: Add a pass for lowering CL-style image ops to texture ops")
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15758>
---
src/compiler/nir/nir_lower_readonly_images_to_tex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_lower_readonly_images_to_tex.c b/src/compiler/nir/nir_lower_readonly_images_to_tex.c
index 25ecc707939..66bc1f91ca0 100644
--- a/src/compiler/nir/nir_lower_readonly_images_to_tex.c
+++ b/src/compiler/nir/nir_lower_readonly_images_to_tex.c
@@ -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;
More information about the mesa-commit
mailing list