From: Alyssa Rosenzweig Date: Mon, 31 Aug 2020 18:20:59 +0000 (-0400) Subject: pan/mdg: Fix perspective combination X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41d0a81c2a3f09701e8c694b520c8d900f6ac2f1;p=mesa.git pan/mdg: Fix perspective combination It's not enough to multiply by a .w reciprocal, we have to be taking the reciprocal of the thing we're actually multiplying against. Fixes incorrect rendering in Manhattan. Signed-off-by: Alyssa Rosenzweig Cc: mesa-stable Part-of: --- diff --git a/src/panfrost/midgard/midgard_opt_perspective.c b/src/panfrost/midgard/midgard_opt_perspective.c index 34afcfa6c93..f2a83576bba 100644 --- a/src/panfrost/midgard/midgard_opt_perspective.c +++ b/src/panfrost/midgard/midgard_opt_perspective.c @@ -88,6 +88,7 @@ midgard_opt_combine_projection(compiler_context *ctx, midgard_block *block) } if (!frcp_found) continue; + if (frcp_from != ins->src[0]) continue; if (frcp_component != COMPONENT_W && frcp_component != COMPONENT_Z) continue; if (!mir_single_use(ctx, frcp)) continue;