Mesa (staging/20.1): pan/mdg: Fix perspective combination
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 1 20:01:35 UTC 2020
Module: Mesa
Branch: staging/20.1
Commit: acf4035456e4e9e540b085ccdb98c609b21e8892
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=acf4035456e4e9e540b085ccdb98c609b21e8892
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Mon Aug 31 14:20:59 2020 -0400
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 <alyssa.rosenzweig at collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6525>
(cherry picked from commit 41d0a81c2a3f09701e8c694b520c8d900f6ac2f1)
---
.pick_status.json | 2 +-
src/panfrost/midgard/midgard_opt_perspective.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index e721dc02d15..a3f69f7bdce 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -490,7 +490,7 @@
"description": "pan/mdg: Fix perspective combination",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/panfrost/midgard/midgard_opt_perspective.c b/src/panfrost/midgard/midgard_opt_perspective.c
index 4af8c45356e..601fa259ca6 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;
More information about the mesa-commit
mailing list