aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/virgl
diff options
context:
space:
mode:
authorAlexandros Frantzis <[email protected]>2019-06-04 16:43:31 +0300
committerChia-I Wu <[email protected]>2019-06-07 21:45:33 -0700
commitccec1555c154a9c11b61127671c30553096856c8 (patch)
tree1f83a394eabfad718e17008d9e0493cfb644e9ae /src/gallium/winsys/virgl
parent636345f496f1a7d96b8da108e416defe7440904f (diff)
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 <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/winsys/virgl')
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c3
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c3
2 files changed, 4 insertions, 2 deletions
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,