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>
This commit is contained in:
Eric Anholt 2021-01-20 14:08:32 -08:00 committed by Marge Bot
parent 0376064783
commit e4e46f2c4c
1 changed files with 2 additions and 1 deletions

View File

@ -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