vbo/dlist: avoid splitting draw commands in multiple draws
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 20 Oct 2020 08:57:04 +0000 (10:57 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 8 Dec 2020 09:10:47 +0000 (10:10 +0100)
commit1c016a5ba0818207e050a04a72ca2feb883ad6cb
tree4c5cfc36a284500493d970011c1370b947f16bc1
parent83149e1c2d8578fb25cf95502d67917cef78692f
vbo/dlist: avoid splitting draw commands in multiple draws

For (Multi)DrawArrays and (Multi)DrawElements commands, the storage size
needed are known early so we can make sure that the prim_store/vertex_store
will be big enough to store the whole command.

This reduces the amount of drawcalls in snx03 tests. For instance in test10:

      | Num draw calls |     GPU-load    |
------|----------------|-----------------|
      | Before | After |  Before | After |
------|--------|-------|---------|-------|
test10|  35k   |   8k  |   58%   |  80%  |

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078>
src/mesa/vbo/vbo_save_api.c