virgl: Cache depth and stencil buffers

Expand the list of bind flags to cache depth and stencil
buffers.

Extensive testing shows the following performance improvements:

Game           |    % difference in FPS
Plague Inc     |             7
Portal 2       |             21
Overcooked 2   |             1.2
Hollow Knight  |            -1.1
Civilization V |             3.8

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8560>
This commit is contained in:
Rohan Garg 2021-01-18 14:21:28 +01:00 committed by Marge Bot
parent af9977a3d5
commit d245d7b6b8
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ static inline boolean can_cache_resource(uint32_t bind)
bind == VIRGL_BIND_INDEX_BUFFER ||
bind == VIRGL_BIND_VERTEX_BUFFER ||
bind == VIRGL_BIND_CUSTOM ||
bind == VIRGL_BIND_STAGING;
bind == VIRGL_BIND_STAGING ||
bind == VIRGL_BIND_DEPTH_STENCIL;
}
static void virgl_hw_res_destroy(struct virgl_drm_winsys *qdws,