mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
virgl: resources without any binding can be cached
Certain games create and destroy lots of resources without binding them. This can take quite a bit of time and even create unneeded synchronization. However, we know that if a resource was never bound to anything, it can be cached. This change does that. Counting the number of uncached allocation with a tabletop simulator trace: Before: 2967 uncached allocations over the replay After: 24 uncached allocations over the replay Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10225>
This commit is contained in:
parent
7886983835
commit
b460d4da60
1 changed files with 2 additions and 1 deletions
|
|
@ -63,7 +63,8 @@ static inline boolean can_cache_resource(uint32_t bind)
|
|||
bind == VIRGL_BIND_VERTEX_BUFFER ||
|
||||
bind == VIRGL_BIND_CUSTOM ||
|
||||
bind == VIRGL_BIND_STAGING ||
|
||||
bind == VIRGL_BIND_DEPTH_STENCIL;
|
||||
bind == VIRGL_BIND_DEPTH_STENCIL ||
|
||||
bind == 0;
|
||||
}
|
||||
|
||||
static void virgl_hw_res_destroy(struct virgl_drm_winsys *qdws,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue