Module: Mesa Branch: main Commit: 16ef26ffcb1a7f9f5aa1f51b8aaf67d2464129c6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=16ef26ffcb1a7f9f5aa1f51b8aaf67d2464129c6
Author: Enrico Galli <[email protected]> Date: Wed Jul 28 17:02:09 2021 -0700 nir_lower_readonly_images_to_tex: Fix typeo on image arrays Reviewed-by: Jesse Natalie <[email protected]> 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); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
