Mesa (master): freedreno/ir3/legalize: don't allow (nopN) if (rptN)
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 16 21:14:02 UTC 2020
Module: Mesa
Branch: master
Commit: cd376a143461a4ed16ebd58de046f89da4113ff7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd376a143461a4ed16ebd58de046f89da4113ff7
Author: Rob Clark <robdclark at chromium.org>
Date: Tue Mar 10 16:01:30 2020 -0700
freedreno/ir3/legalize: don't allow (nopN) if (rptN)
These two encodings are mutually exclusive. If the instruction is a
vector(ish) `(rptN)` instruction, then we can't fold a `(nopN)` post-
delay into it.
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
---
src/freedreno/ir3/ir3_legalize.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/ir3/ir3_legalize.c b/src/freedreno/ir3/ir3_legalize.c
index c59c065c207..ce3d4fdebb8 100644
--- a/src/freedreno/ir3/ir3_legalize.c
+++ b/src/freedreno/ir3/ir3_legalize.c
@@ -681,7 +681,8 @@ nop_sched(struct ir3 *ir)
*/
if ((delay > 0) && (ir->compiler->gpu_id >= 600) && last &&
- ((opc_cat(last->opc) == 2) || (opc_cat(last->opc) == 3))) {
+ ((opc_cat(last->opc) == 2) || (opc_cat(last->opc) == 3)) &&
+ (last->repeat == 0)) {
/* the previous cat2/cat3 instruction can encode at most 3 nop's: */
unsigned transfer = MIN2(delay, 3 - last->nop);
last->nop += transfer;
More information about the mesa-commit
mailing list