summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-06-26 16:31:31 -0700
committerAlyssa Rosenzweig <[email protected]>2019-06-28 15:10:05 -0700
commit68a5b58fb9fa177d27c7fe5703a308eaad62e849 (patch)
tree6fda3a8ec4829864a252aeb6355158040160771a /src/gallium
parent601d4d315727c40348cb1c5682d0fec769c219fb (diff)
panfrost/midgard: Fix 3D texture regression
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/panfrost/midgard/midgard_compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index da01c9d6780..13f4ed9e283 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -1569,7 +1569,8 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr,
/* Non-texel fetch doesn't need that
* nonsense. However we do use the Z
* for array indexing */
- ins.texture.in_reg_swizzle = SWIZZLE_XYXZ;
+ bool is_3d = instr->sampler_dim == GLSL_SAMPLER_DIM_3D;
+ ins.texture.in_reg_swizzle = is_3d ? SWIZZLE_XYZZ : SWIZZLE_XYXZ;
}
}