From: Alyssa Rosenzweig Date: Mon, 17 Jun 2019 19:41:41 +0000 (-0700) Subject: panfrost/midgard: Simplify 2D array logic X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=390126e70abd4fb8be860947af315de942ca7852;p=mesa.git 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 --- 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; }