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 <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig
2019-12-20 12:38:24 -05:00
parent 72e5749a63
commit 64b2fe9626
+6
View File
@@ -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;
}