From 390126e70abd4fb8be860947af315de942ca7852 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 17 Jun 2019 12:41:41 -0700 Subject: [PATCH] panfrost/midgard: Simplify 2D array logic It shouldn't matter if we stick a z in for non-arrays, anyway. Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/midgard/midgard_compile.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c index c213f5f726d..cd65da8b23e 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c @@ -1421,10 +1421,7 @@ emit_tex(compiler_context *ctx, nir_tex_instr *instr) * layer. To NIR, z is array layer for a 2D * array */ - bool has_array = instr->texture_array_size > 0; - bool is_2d = instr->sampler_dim == GLSL_SAMPLER_DIM_2D; - - if (is_2d && has_array) + if (instr->sampler_dim == GLSL_SAMPLER_DIM_2D) position_swizzle = SWIZZLE_XYXZ; } -- 2.30.2