[Mesa-dev] [PATCH 3/3] winsys/radeon: remove exported buffers from the cache

Marek Olšák maraeo at gmail.com
Tue Sep 1 12:04:40 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

Cc: 11.0 <mesa-stable at lists.freedesktop.org>
---
 src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 600ced9..2878c8f 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -1150,6 +1150,9 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer,
 
     memset(&flink, 0, sizeof(flink));
 
+    if ((void*)bo != (void*)buffer)
+       pb_cache_manager_remove_buffer(buffer);
+
     if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
         if (!bo->flink_name) {
             flink.handle = bo->handle;
-- 
2.1.4



More information about the mesa-dev mailing list