From: Icecream95 Date: Mon, 11 May 2020 22:16:31 +0000 (+1200) Subject: pan/midgard: Fix old style shadows X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1290e79489fb645fc73ebb365b684b7797f97b2;p=mesa.git pan/midgard: Fix old style shadows This fixes the sky being red in OpenMW, as well as some of the Mesa demos using shadows (shadowtex, shadow_sampler). Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 58f0160b564..8ec29cf6bbe 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -1759,6 +1759,10 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr, } }; + if (instr->is_shadow && !instr->is_new_style_shadow) + for (int i = 0; i < 4; ++i) + ins.swizzle[0][i] = COMPONENT_X; + /* We may need a temporary for the coordinate */ bool needs_temp_coord =