Mesa (master): panfrost/midgard: Simplify 2D array logic
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 17 19:53:45 UTC 2019
Module: Mesa
Branch: master
Commit: 390126e70abd4fb8be860947af315de942ca7852
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=390126e70abd4fb8be860947af315de942ca7852
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Mon Jun 17 12:41:41 2019 -0700
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 <alyssa.rosenzweig at collabora.com>
---
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;
}
More information about the mesa-commit
mailing list