From: Marek Olšák <[email protected]>

Cc: 17.1 <[email protected]>
---
 src/gallium/drivers/radeonsi/si_shader.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index 5d7175d..c5c994d 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3418,20 +3418,21 @@ static LLVMValueRef image_fetch_coords(
        }
 
        /* 1D textures are allocated and used as 2D on GFX9. */
        if (ctx->screen->b.chip_class >= GFX9) {
                if (target == TGSI_TEXTURE_1D) {
                        coords[1] = ctx->i32_0;
                        num_coords++;
                } else if (target == TGSI_TEXTURE_1D_ARRAY) {
                        coords[2] = coords[1];
                        coords[1] = ctx->i32_0;
+                       num_coords++;
                }
        }
 
        if (num_coords == 1)
                return coords[0];
 
        if (num_coords == 3) {
                /* LLVM has difficulties lowering 3-element vectors. */
                coords[3] = bld_base->uint_bld.undef;
                num_coords = 4;
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to