From 64b2fe96268a520fe595a7ac54ae5e964f1807b1 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 20 Dec 2019 12:38:24 -0500 Subject: [PATCH] pan/midgard: Expand swizzle for texelFetch We zero the extra components anyway. Fixes dEQP-GLES3.functional.shaders.texture_functions.texelfetch.sampler2d_fixed_fragment Signed-off-by: Alyssa Rosenzweig --- src/panfrost/midgard/midgard_compile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 8d457de950e..f462100a280 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -1813,6 +1813,12 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr, unreachable("Invalid texture 2D components"); } + if (midgard_texop == TEXTURE_OP_TEXEL_FETCH) { + /* We zeroed */ + ins.swizzle[1][2] = COMPONENT_Z; + ins.swizzle[1][3] = COMPONENT_W; + } + break; } -- 2.30.2