From d245d7b6b8bb75622dd43fb845f60d55ad3ebc89 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Mon, 18 Jan 2021 14:21:28 +0100 Subject: [PATCH] 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 Reviewed-by: Gert Wollny Part-of: --- src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,