winsys/radeon: remove exported buffers from the cache
authorMarek Olšák <marek.olsak@amd.com>
Tue, 1 Sep 2015 02:14:43 +0000 (04:14 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 3 Sep 2015 16:41:45 +0000 (18:41 +0200)
Cc: 11.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/winsys/radeon/drm/radeon_drm_bo.c

index 600ced924ba8371e9bb0959cfbb444fe0ed82aac..2878c8f57445590d2cf9b42aca50225a755aeff7 100644 (file)
@@ -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;