Module: Mesa Branch: master Commit: d1290e79489fb645fc73ebb365b684b7797f97b2 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1290e79489fb645fc73ebb365b684b7797f97b2
Author: Icecream95 <[email protected]> Date: Tue May 12 10:16:31 2020 +1200 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4997> --- src/panfrost/midgard/midgard_compile.c | 4 ++++ 1 file changed, 4 insertions(+) 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 = _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
