summaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-12-20 12:38:24 -0500
committerAlyssa Rosenzweig <[email protected]>2019-12-24 23:46:22 +0000
commit64b2fe96268a520fe595a7ac54ae5e964f1807b1 (patch)
treec015744f8065cbf36716c92ba07f702b2bba69ea /src/panfrost/midgard
parent72e5749a635ca864c99a149df42685eb1cb48620 (diff)
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 <[email protected]>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r--src/panfrost/midgard/midgard_compile.c6
1 files changed, 6 insertions, 0 deletions
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;
}