diff options
author | Icecream95 <[email protected]> | 2020-05-12 10:16:31 +1200 |
---|---|---|
committer | Icecream95 <[email protected]> | 2020-05-12 10:36:30 +1200 |
commit | d1290e79489fb645fc73ebb365b684b7797f97b2 (patch) | |
tree | 144437eedc8ec6ad2154c2e097b61a3c7a3a2fb9 /src | |
parent | 47bfc799da61aadd60ef9cc5c4bf0651c519cc77 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/midgard/midgard_compile.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 = |