Mesa (master): freedreno/a6xx: Skip the body of emit_state if we're clean.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jan 25 23:18:24 UTC 2021
Module: Mesa
Branch: master
Commit: e4e46f2c4cf3dd429d8fea6bd935468a507be2f8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4e46f2c4cf3dd429d8fea6bd935468a507be2f8
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jan 20 14:08:32 2021 -0800
freedreno/a6xx: Skip the body of emit_state if we're clean.
drawoverhead test 1 (no state change) perf +5.43864% +/- 1.28466% (n=10).
Part of #4106.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8602>
---
src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
index 5b6e5102717..a3939383681 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
@@ -311,7 +311,8 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
ctx->last.restart_index = restart_index;
}
- fd6_emit_state(ring, &emit);
+ if (emit.dirty)
+ fd6_emit_state(ring, &emit);
/* for debug after a lock up, write a unique counter value
* to scratch7 for each draw, to make it easier to match up
More information about the mesa-commit
mailing list