mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
vbo: lower VBO_SAVE_BUFFER_SIZE to avoid large VRAM usage
The ideal case for performance is to have a single buffer for
all display list. The caveat is that large buffers are less
likely to be freed because they're refcounted: it only takes
1 user (diplay list) to keep it in VRAM.
This lowers VRAM usage when replaying the trace attached
of the trace attached to !6140 from 5.5 GB to about 1.8 GB.
Viewperf snx performance isn't affected.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6140
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20748>
(cherry picked from commit 0f5c8c3dc3)
This commit is contained in:
parent
474f6f60c0
commit
bc487cecdc
2 changed files with 6 additions and 2 deletions
|
|
@ -2938,7 +2938,7 @@
|
||||||
"description": "vbo: lower VBO_SAVE_BUFFER_SIZE to avoid large VRAM usage",
|
"description": "vbo: lower VBO_SAVE_BUFFER_SIZE to avoid large VRAM usage",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 0,
|
"nomination_type": 0,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null
|
"because_sha": null
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,12 @@ _vbo_save_get_stride(const struct vbo_save_vertex_list *node)
|
||||||
/* Default size for the buffer holding the vertices and the indices.
|
/* Default size for the buffer holding the vertices and the indices.
|
||||||
* A bigger buffer helps reducing the number of draw calls but may
|
* A bigger buffer helps reducing the number of draw calls but may
|
||||||
* waste memory.
|
* waste memory.
|
||||||
|
* 1MB was picked because a lower value reduces viewperf snx tests
|
||||||
|
* performance but larger values cause high VRAM usage (because
|
||||||
|
* larger buffers will be shared by more display lists which reduces
|
||||||
|
* the likelyhood of freeing the buffer).
|
||||||
*/
|
*/
|
||||||
#define VBO_SAVE_BUFFER_SIZE (20*1024*1024)
|
#define VBO_SAVE_BUFFER_SIZE (1024 * 1024)
|
||||||
#define VBO_SAVE_PRIM_MODE_MASK 0x3f
|
#define VBO_SAVE_PRIM_MODE_MASK 0x3f
|
||||||
|
|
||||||
struct vbo_save_vertex_store {
|
struct vbo_save_vertex_store {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue