Mesa (main): r300: only run merge_movs pass on R500

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 23 13:19:11 UTC 2022


Module: Mesa
Branch: main
Commit: 6cc0a3ed44d9dfd0cd9abcb3fb525515346bdc8d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6cc0a3ed44d9dfd0cd9abcb3fb525515346bdc8d

Author: Pavel Ondračka <pavel.ondracka at gmail.com>
Date:   Mon Jun 20 22:17:21 2022 +0200

r300: only run merge_movs pass on R500

This pass currently generates some swizzles that the R300 and R400
hardware can't handle, make it R500 for now.

Fixes: 6c2959c0

Signed-off-by: Pavel Ondračka <pavel.ondracka at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17150>

---

 src/gallium/drivers/r300/compiler/radeon_optimize.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r300/compiler/radeon_optimize.c b/src/gallium/drivers/r300/compiler/radeon_optimize.c
index 019d7abf4cb..8d120984b89 100644
--- a/src/gallium/drivers/r300/compiler/radeon_optimize.c
+++ b/src/gallium/drivers/r300/compiler/radeon_optimize.c
@@ -979,8 +979,10 @@ void rc_optimize(struct radeon_compiler * c, void *user)
 			continue;
 
 		if (cur->U.I.Opcode == RC_OPCODE_MOV) {
-			if (merge_movs(c,cur))
-				continue;
+			if (c->is_r500) {
+				if (merge_movs(c, cur))
+					continue;
+			}
 			copy_propagate(c, cur);
 			/* cur may no longer be part of the program */
 		}



More information about the mesa-commit mailing list