summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorRohan Garg <rohan.garg@collabora.com>2021-01-18 14:21:28 +0100
committerMarge Bot <eric+marge@anholt.net>2021-01-20 17:09:25 +0000
commitd245d7b6b8bb75622dd43fb845f60d55ad3ebc89 (patch)
treebdcf60db46beba7c9a205169ba35411b94681d4f /src/gallium
parentaf9977a3d5f3378c297965e21389e36491f47e1b (diff)
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>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index 43f21566ec3..2be575fb21d 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -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,