From: Alexandros Frantzis Date: Tue, 4 Jun 2019 13:43:31 +0000 (+0300) Subject: virgl: Make VIRGL_BIND_STAGING resources cacheable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ccec1555c154a9c11b61127671c30553096856c8;p=mesa.git virgl: Make VIRGL_BIND_STAGING resources cacheable This could help performance when trying to recreate such resources for copy transfers. Signed-off-by: Alexandros Frantzis Reviewed-by: Chia-I Wu --- diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index f2c41bbc903..0f6403f691f 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -55,7 +55,8 @@ static inline boolean can_cache_resource_with_bind(uint32_t bind) return bind == VIRGL_BIND_CONSTANT_BUFFER || bind == VIRGL_BIND_INDEX_BUFFER || bind == VIRGL_BIND_VERTEX_BUFFER || - bind == VIRGL_BIND_CUSTOM; + bind == VIRGL_BIND_CUSTOM || + bind == VIRGL_BIND_STAGING; } static void virgl_hw_res_destroy(struct virgl_drm_winsys *qdws, diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c index ccacb81d233..9ab068b27bf 100644 --- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c +++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c @@ -42,7 +42,8 @@ static inline boolean can_cache_resource_with_bind(uint32_t bind) return bind == VIRGL_BIND_CONSTANT_BUFFER || bind == VIRGL_BIND_INDEX_BUFFER || bind == VIRGL_BIND_VERTEX_BUFFER || - bind == VIRGL_BIND_CUSTOM; + bind == VIRGL_BIND_CUSTOM || + bind == VIRGL_BIND_STAGING; } static uint32_t vtest_get_transfer_size(struct virgl_hw_res *res,