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

index 50c42e3599af24867073cb658dc9292148556f67..fe55dc3108af0c7f0228e2b1e6cd8536589048e0 100644 (file)
@@ -684,6 +684,9 @@ static boolean amdgpu_bo_get_handle(struct pb_buffer *buffer,
    enum amdgpu_bo_handle_type type;
    int r;
 
+   if ((void*)bo != (void*)buffer)
+      pb_cache_manager_remove_buffer(buffer);
+
    switch (whandle->type) {
    case DRM_API_HANDLE_TYPE_SHARED:
       type = amdgpu_bo_handle_type_gem_flink_name;