Mesa (main): nir_lower_readonly_images_to_tex: Fix typeo on image arrays
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 29 02:10:41 UTC 2021
Module: Mesa
Branch: main
Commit: 16ef26ffcb1a7f9f5aa1f51b8aaf67d2464129c6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=16ef26ffcb1a7f9f5aa1f51b8aaf67d2464129c6
Author: Enrico Galli <enrico.galli at intel.com>
Date: Wed Jul 28 17:02:09 2021 -0700
nir_lower_readonly_images_to_tex: Fix typeo on image arrays
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12119>
---
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 484f074e301..3dfa42e3af3 100644
--- a/src/compiler/nir/nir_lower_readonly_images_to_tex.c
+++ b/src/compiler/nir/nir_lower_readonly_images_to_tex.c
@@ -131,7 +131,7 @@ lower_readonly_image_op(nir_builder *b, nir_instr *instr, void *context)
unsigned coord_components =
glsl_get_sampler_dim_coordinate_components(tex->sampler_dim);
if (glsl_sampler_type_is_array(deref->type))
- tex->coord_components++;
+ coord_components++;
tex->src[0].src_type = nir_tex_src_texture_deref;
tex->src[0].src = nir_src_for_ssa(&deref->dest.ssa);
@@ -141,10 +141,10 @@ 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);
- tex->coord_components = coord_components;
nir_ssa_def *coord =
nir_channels(b, intrin->src[1].ssa,
(1 << tex->coord_components) - 1);
More information about the mesa-commit
mailing list