Mesa (staging/21.3): r300: Disable loop unrolling on r500.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Dec 24 12:37:25 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: d0f2e4ff62308694d19663cc192950c980ced646
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0f2e4ff62308694d19663cc192950c980ced646
Author: Emma Anholt <emma at anholt.net>
Date: Mon Dec 6 21:43:26 2021 -0800
r300: Disable loop unrolling on r500.
It's buggy, and we should just trust GLSL or NIR to do unrolling for us.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
(cherry picked from commit e68a9b033997c9de485c2914717d25e55fbb053e)
---
.pick_status.json | 2 +-
src/gallium/drivers/r300/compiler/r3xx_fragprog.c | 1 -
src/gallium/drivers/r300/compiler/radeon_emulate_loops.c | 16 ----------------
src/gallium/drivers/r300/compiler/radeon_emulate_loops.h | 2 --
4 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 96a78ff5a1b..8e002266b8d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -3325,7 +3325,7 @@
"description": "r300: Disable loop unrolling on r500.",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/r300/compiler/r3xx_fragprog.c b/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
index d03462c52c8..5c7a1e63063 100644
--- a/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
+++ b/src/gallium/drivers/r300/compiler/r3xx_fragprog.c
@@ -120,7 +120,6 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
/* This transformation needs to be done before any of the IF
* instructions are modified. */
{"transform KILP", 1, 1, rc_transform_KILL, NULL},
- {"unroll loops", 1, is_r500, rc_unroll_loops, NULL},
{"transform loops", 1, !is_r500, rc_transform_loops, NULL},
{"emulate branches", 1, !is_r500, rc_emulate_branches, NULL},
{"force alpha to one", 1, alpha2one, rc_local_transform, force_alpha_to_one},
diff --git a/src/gallium/drivers/r300/compiler/radeon_emulate_loops.c b/src/gallium/drivers/r300/compiler/radeon_emulate_loops.c
index a7f773c265c..ef627b95ca5 100644
--- a/src/gallium/drivers/r300/compiler/radeon_emulate_loops.c
+++ b/src/gallium/drivers/r300/compiler/radeon_emulate_loops.c
@@ -499,22 +499,6 @@ void rc_transform_loops(struct radeon_compiler *c, void *user)
}
}
-void rc_unroll_loops(struct radeon_compiler *c, void *user)
-{
- struct rc_instruction * inst;
- struct loop_info loop;
-
- for(inst = c->Program.Instructions.Next;
- inst != &c->Program.Instructions; inst = inst->Next) {
-
- if (inst->U.I.Opcode == RC_OPCODE_BGNLOOP) {
- if (build_loop_info(c, &loop, inst)) {
- try_unroll_loop(c, &loop);
- }
- }
- }
-}
-
void rc_emulate_loops(struct radeon_compiler *c, void *user)
{
struct emulate_loop_state * s = &c->loop_state;
diff --git a/src/gallium/drivers/r300/compiler/radeon_emulate_loops.h b/src/gallium/drivers/r300/compiler/radeon_emulate_loops.h
index 01f02a6128c..cf0d63b451c 100644
--- a/src/gallium/drivers/r300/compiler/radeon_emulate_loops.h
+++ b/src/gallium/drivers/r300/compiler/radeon_emulate_loops.h
@@ -50,8 +50,6 @@ struct emulate_loop_state {
void rc_transform_loops(struct radeon_compiler *c, void *user);
-void rc_unroll_loops(struct radeon_compiler * c, void *user);
-
void rc_emulate_loops(struct radeon_compiler * c, void *user);
#endif /* RADEON_EMULATE_LOOPS_H */
More information about the mesa-commit
mailing list