projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41b7891
)
agx: Use unconditional else instruction
author
Alyssa Rosenzweig
<alyssa@rosenzweig.io>
Sun, 30 Jul 2023 00:58:53 +0000
(20:58 -0400)
committer
Marge Bot
<emma+marge@anholt.net>
Fri, 11 Aug 2023 20:31:27 +0000
(20:31 +0000)
Rather than duplicating the condition. This matches the blob, so is presumably
the most energy-efficient way of expressing the logic.
No shader-db changes.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>
src/asahi/compiler/agx_compile.c
patch
|
blob
|
history
diff --git
a/src/asahi/compiler/agx_compile.c
b/src/asahi/compiler/agx_compile.c
index
f524060
..
cb049a2
100644
(file)
--- a/
src/asahi/compiler/agx_compile.c
+++ b/
src/asahi/compiler/agx_compile.c
@@
-1878,8
+1878,11
@@
emit_if(agx_context *ctx, nir_if *nif)
agx_block *else_block = emit_cf_list(ctx, &nif->else_list);
agx_block *end_else = ctx->current_block;
+ /* Insert an else instruction at the beginning of the else block. We use
+ * "else_fcmp 0.0, 0.0, eq" as unconditional else, matching the blob.
+ */
_b.cursor = agx_before_block(else_block);
- agx_else_
icmp(&_b, cond, agx_zero(), 1, AGX_ICOND_U
EQ, false);
+ agx_else_
fcmp(&_b, agx_zero(), agx_zero(), 1, AGX_FCOND_
EQ, false);
ctx->after_block = agx_create_block(ctx);