Mesa (master): virgl: Cache depth and stencil buffers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 20 17:16:51 UTC 2021
Module: Mesa
Branch: master
Commit: d245d7b6b8bb75622dd43fb845f60d55ad3ebc89
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d245d7b6b8bb75622dd43fb845f60d55ad3ebc89
Author: Rohan Garg <rohan.garg at collabora.com>
Date: Mon Jan 18 14:21:28 2021 +0100
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 at collabora.com>
Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8560>
---
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,
More information about the mesa-commit
mailing list