From: Alyssa Rosenzweig Date: Fri, 20 Dec 2019 17:38:24 +0000 (-0500) Subject: pan/midgard: Expand swizzle for texelFetch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64b2fe96268a520fe595a7ac54ae5e964f1807b1;p=mesa.git 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 --- 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; }