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

Author: Rob Clark <[email protected]>
Date:   Sun Feb 26 13:39:32 2023 -0800

Revert "freedreno: Account for multi-draw in num_draws"

autotune already divides draw-cost by # of draws, but only increments
the draw-cost once per multi-draw.  We could either _also_ account for
draw-cost by multiply by # of draws for treat multi-draw as a single
draw.  The latter saves an integer multiply per draw.

Fixes a performance regression triggered by transition from GMEM to
sysmem rendering.

This reverts commit 6bfee9e6697e286c82f36a15d0e8a7c1ec7d2a02.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21543>

---

 src/gallium/drivers/freedreno/freedreno_draw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c 
b/src/gallium/drivers/freedreno/freedreno_draw.c
index 41c75bdc248..672dcc5f6f6 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -364,7 +364,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct 
pipe_draw_info *info,
       assert(ctx->batch == batch);
    }
 
-   batch->num_draws += num_draws;
+   batch->num_draws++;
 
    /* Marking the batch as needing flush must come after the batch
     * dependency tracking (resource_read()/resource_write()), as that

Reply via email to