gallium/util: replace pipe_mutex_destroy() with mtx_destroy()
authorTimothy Arceri <tarceri@itsqueeze.com>
Sun, 5 Mar 2017 01:32:04 +0000 (12:32 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 6 Mar 2017 21:52:16 +0000 (08:52 +1100)
pipe_mutex_destroy() was made unnecessary with fd33a6bcd7f12.

Replace was done with:
find ./src -type f -exec sed -i -- \
's:pipe_mutex_destroy(\([^)]*\)):mtx_destroy(\&\1):g' {} \;

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
35 files changed:
src/gallium/auxiliary/os/os_thread.h
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
src/gallium/auxiliary/pipebuffer/pb_cache.c
src/gallium/auxiliary/pipebuffer/pb_slab.c
src/gallium/auxiliary/util/u_queue.c
src/gallium/auxiliary/util/u_range.h
src/gallium/auxiliary/util/u_ringbuffer.c
src/gallium/drivers/ddebug/dd_context.c
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/llvmpipe/lp_fence.c
src/gallium/drivers/llvmpipe/lp_scene.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/nouveau/nv50/nv50_surface.c
src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_state_shaders.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/svga/svga_screen_cache.c
src/gallium/state_trackers/dri/dri_screen.c
src/gallium/state_trackers/nine/nine_queue.c
src/gallium/state_trackers/nine/nine_state.c
src/gallium/state_trackers/va/context.c
src/gallium/state_trackers/vdpau/decode.c
src/gallium/state_trackers/vdpau/device.c
src/gallium/targets/haiku-softpipe/GalliumContext.cpp
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/gallium/winsys/radeon/drm/radeon_drm_bo.c
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c
src/gallium/winsys/svga/drm/vmw_surface.c
src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c

index cccb5315579732bde05bf35e6e82c4501792dec9..571e3c68dae37242c632e30b02de9b1574dfe486 100644 (file)
@@ -108,9 +108,6 @@ static inline int pipe_thread_is_self( pipe_thread thread )
    return 0;
 }
 
-#define pipe_mutex_destroy(mutex) \
-   mtx_destroy(&(mutex))
-
 #define pipe_mutex_lock(mutex) \
    (void) mtx_lock(&(mutex))
 
@@ -185,7 +182,7 @@ static inline void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
 static inline void pipe_barrier_destroy(pipe_barrier *barrier)
 {
    assert(barrier->waiters == 0);
-   pipe_mutex_destroy(barrier->mutex);
+   mtx_destroy(&barrier->mutex);
    cnd_destroy(&barrier->condvar);
 }
 
@@ -238,7 +235,7 @@ pipe_semaphore_init(pipe_semaphore *sema, int init_val)
 static inline void
 pipe_semaphore_destroy(pipe_semaphore *sema)
 {
-   pipe_mutex_destroy(sema->mutex);
+   mtx_destroy(&sema->mutex);
    cnd_destroy(&sema->cond);
 }
 
index fefdcefaf53458a2ec057efcb80dd998666eff2d..b3b78284b4a77d956037c4933a2ba4a52f13fccc 100644 (file)
@@ -992,7 +992,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr)
 #endif
 
    pipe_mutex_unlock(fenced_mgr->mutex);
-   pipe_mutex_destroy(fenced_mgr->mutex);
+   mtx_destroy(&fenced_mgr->mutex);
 
    if (fenced_mgr->provider)
       fenced_mgr->provider->destroy(fenced_mgr->provider);
index f614abfc2e83d7fbc674f5cad747d2236917e883..33f068e13fb22c3c7c45696faaf55926a2526f7b 100644 (file)
@@ -240,7 +240,7 @@ pb_debug_buffer_destroy(struct pb_buffer *_buf)
    LIST_DEL(&buf->head);
    pipe_mutex_unlock(mgr->mutex);
 
-   pipe_mutex_destroy(buf->mutex);
+   mtx_destroy(&buf->mutex);
    
    pb_reference(&buf->buffer, NULL);
    FREE(buf);
@@ -449,7 +449,7 @@ pb_debug_manager_destroy(struct pb_manager *_mgr)
    }
    pipe_mutex_unlock(mgr->mutex);
    
-   pipe_mutex_destroy(mgr->mutex);
+   mtx_destroy(&mgr->mutex);
    mgr->provider->destroy(mgr->provider);
    FREE(mgr);
 }
index 422318c599bb5372410878626325bc6f88bb9774..adae22270aad6627e23c7f5a8ffbf2eddfe9e6d9 100644 (file)
@@ -298,5 +298,5 @@ void
 pb_cache_deinit(struct pb_cache *mgr)
 {
    pb_cache_release_all_buffers(mgr);
-   pipe_mutex_destroy(mgr->mutex);
+   mtx_destroy(&mgr->mutex);
 }
index 6f6664f429700f2c73a9edb6f73775623461dfe9..9ad88db257c092ea35894ae79e951885d2e94174 100644 (file)
@@ -248,5 +248,5 @@ pb_slabs_deinit(struct pb_slabs *slabs)
    }
 
    FREE(slabs->groups);
-   pipe_mutex_destroy(slabs->mutex);
+   mtx_destroy(&slabs->mutex);
 }
index 56a9fa8cf32e4c997141d231d3129721533dad9d..092f91af3c56352a29c0bb718a78a4a4bcb05bd8 100644 (file)
@@ -123,7 +123,7 @@ util_queue_fence_destroy(struct util_queue_fence *fence)
 {
    assert(fence->signalled);
    cnd_destroy(&fence->cond);
-   pipe_mutex_destroy(fence->mutex);
+   mtx_destroy(&fence->mutex);
 }
 
 /****************************************************************************
@@ -251,7 +251,7 @@ fail:
    if (queue->jobs) {
       cnd_destroy(&queue->has_space_cond);
       cnd_destroy(&queue->has_queued_cond);
-      pipe_mutex_destroy(queue->lock);
+      mtx_destroy(&queue->lock);
       FREE(queue->jobs);
    }
    /* also util_queue_is_initialized can be used to check for success */
@@ -283,7 +283,7 @@ util_queue_destroy(struct util_queue *queue)
 
    cnd_destroy(&queue->has_space_cond);
    cnd_destroy(&queue->has_queued_cond);
-   pipe_mutex_destroy(queue->lock);
+   mtx_destroy(&queue->lock);
    FREE(queue->jobs);
    FREE(queue->threads);
 }
index 24c78ba662ea0f11c2541e9777b6b0fbecdbfca3..d4a4ae1575d3d49a91514310d18502d66f7485ac 100644 (file)
@@ -85,7 +85,7 @@ util_range_init(struct util_range *range)
 static inline void
 util_range_destroy(struct util_range *range)
 {
-   pipe_mutex_destroy(range->write_mutex);
+   mtx_destroy(&range->write_mutex);
 }
 
 #endif
index fce113314aef0e9badba2a222a81fb371ab3b8ec..c13517aa547530a19925aa949e933d0f4ea16fe7 100644 (file)
@@ -48,7 +48,7 @@ fail:
 void util_ringbuffer_destroy( struct util_ringbuffer *ring )
 {
    cnd_destroy(&ring->change);
-   pipe_mutex_destroy(ring->mutex);
+   mtx_destroy(&ring->mutex);
    FREE(ring->buf);
    FREE(ring);
 }
index 1ce4a3b576ef213bfeb7fbab6afa938127794136..550f7641cc29de597a82d4c3f3621029e9cce8d5 100644 (file)
@@ -598,7 +598,7 @@ dd_context_destroy(struct pipe_context *_pipe)
       dctx->kill_thread = 1;
       pipe_mutex_unlock(dctx->mutex);
       pipe_thread_wait(dctx->thread);
-      pipe_mutex_destroy(dctx->mutex);
+      mtx_destroy(&dctx->mutex);
       assert(!dctx->records);
    }
 
@@ -873,7 +873,7 @@ dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe)
       (void) mtx_init(&dctx->mutex, mtx_plain);
       dctx->thread = pipe_thread_create(dd_thread_pipelined_hang_detect, dctx);
       if (!dctx->thread) {
-         pipe_mutex_destroy(dctx->mutex);
+         mtx_destroy(&dctx->mutex);
          goto fail;
       }
    }
index 3f43b8d9d860fa44835f2a9c29a1259b516405cb..4a461fd511c5920021205ca5c29db0f8a4b7e0ec 100644 (file)
@@ -142,7 +142,7 @@ fd_screen_destroy(struct pipe_screen *pscreen)
 
        slab_destroy_parent(&screen->transfer_pool);
 
-       pipe_mutex_destroy(screen->lock);
+       mtx_destroy(&screen->lock);
 
        free(screen);
 }
index 04c148395e3f8cf4c1d0ac8f9cc7b3e73ff1e22a..ec26bfe953268210247957589228b8c1757f4d14 100644 (file)
@@ -72,7 +72,7 @@ lp_fence_destroy(struct lp_fence *fence)
    if (LP_DEBUG & DEBUG_FENCE)
       debug_printf("%s %d\n", __FUNCTION__, fence->id);
 
-   pipe_mutex_destroy(fence->mutex);
+   mtx_destroy(&fence->mutex);
    cnd_destroy(&fence->signalled);
    FREE(fence);
 }
index 0d619eff3ff149ac49f6167bb1841d1876dffeb8..66dd1d23257bc1b7d49e392dbdcd854583e9911d 100644 (file)
@@ -90,7 +90,7 @@ void
 lp_scene_destroy(struct lp_scene *scene)
 {
    lp_fence_reference(&scene->fence, NULL);
-   pipe_mutex_destroy(scene->mutex);
+   mtx_destroy(&scene->mutex);
    assert(scene->data.head->next == NULL);
    FREE(scene->data.head);
    FREE(scene);
index f5f7e7178da19c80e2a4c7e3791f6739dd395b73..4bc202c497e990e6c5516084c62a5546204e5bd9 100644 (file)
@@ -561,7 +561,7 @@ llvmpipe_destroy_screen( struct pipe_screen *_screen )
    if(winsys->destroy)
       winsys->destroy(winsys);
 
-   pipe_mutex_destroy(screen->rast_mutex);
+   mtx_destroy(&screen->rast_mutex);
 
    FREE(screen);
 }
index 5635e9fe5575f9751eb367711c9e9ac53b879e48..46cd2e61f9d2136ff9cffd56a986465a24d7a8f3 100644 (file)
@@ -1780,7 +1780,7 @@ nv50_blitter_destroy(struct nv50_screen *screen)
       }
    }
 
-   pipe_mutex_destroy(blitter->mutex);
+   mtx_destroy(&blitter->mutex);
    FREE(blitter);
 }
 
index 5720937c090e3f807d8fd73cdb65ecf2931563f9..1e91fa8b6eeeb6c29a72ae41ac271b7d274e3322 100644 (file)
@@ -1689,7 +1689,7 @@ nvc0_blitter_destroy(struct nvc0_screen *screen)
       }
    }
 
-   pipe_mutex_destroy(blitter->mutex);
+   mtx_destroy(&blitter->mutex);
    FREE(blitter);
 }
 
index 392b0bb6a8a4a52a4d8b6c76212278263f713efd..9a2400df935f11d76dcf8126a188a56ca779c947 100644 (file)
@@ -684,7 +684,7 @@ static void r300_destroy_screen(struct pipe_screen* pscreen)
     if (rws && !rws->unref(rws))
       return;
 
-    pipe_mutex_destroy(r300screen->cmask_mutex);
+    mtx_destroy(&r300screen->cmask_mutex);
     slab_destroy_parent(&r300screen->pool_transfers);
 
     if (rws)
index 96b95ab09b61f697403de3be5b024bd268e69baa..0020686e58b47eb02666ec3718c2344aae585d9d 100644 (file)
@@ -1360,8 +1360,8 @@ void r600_destroy_common_screen(struct r600_common_screen *rscreen)
        r600_perfcounters_destroy(rscreen);
        r600_gpu_load_kill_thread(rscreen);
 
-       pipe_mutex_destroy(rscreen->gpu_load_mutex);
-       pipe_mutex_destroy(rscreen->aux_context_lock);
+       mtx_destroy(&rscreen->gpu_load_mutex);
+       mtx_destroy(&rscreen->aux_context_lock);
        rscreen->aux_context->destroy(rscreen->aux_context);
 
        slab_destroy_parent(&rscreen->pool_transfers);
index 723975aa01c57593a067f3693c0cad7bef88ff6a..1550326f8ed7acf982400d1737e0265afe4b55a7 100644 (file)
@@ -704,7 +704,7 @@ static void si_destroy_screen(struct pipe_screen* pscreen)
                        FREE(part);
                }
        }
-       pipe_mutex_destroy(sscreen->shader_parts_mutex);
+       mtx_destroy(&sscreen->shader_parts_mutex);
        si_destroy_shader_cache(sscreen);
        r600_destroy_common_screen(&sscreen->b);
 }
index 20410cebdae4f1112c9e86f1ead8f4dcfee96861..c370f151dec4dc1b0d007c904eb88628fbb8b4fc 100644 (file)
@@ -313,7 +313,7 @@ void si_destroy_shader_cache(struct si_screen *sscreen)
        if (sscreen->shader_cache)
                _mesa_hash_table_destroy(sscreen->shader_cache,
                                         si_destroy_shader_cache_entry);
-       pipe_mutex_destroy(sscreen->shader_cache_mutex);
+       mtx_destroy(&sscreen->shader_cache_mutex);
 }
 
 /* SHADER STATES */
@@ -1960,7 +1960,7 @@ static void si_delete_shader_selector(struct pipe_context *ctx, void *state)
                si_delete_shader(sctx, sel->gs_copy_shader);
 
        util_queue_fence_destroy(&sel->ready);
-       pipe_mutex_destroy(sel->mutex);
+       mtx_destroy(&sel->mutex);
        free(sel->tokens);
        free(sel);
 }
index 479b6fc522faa5bce532794485d6ffb47fd4bc1d..72c142d6cf84e90b9f6b87411f94618c50657e9b 100644 (file)
@@ -919,8 +919,8 @@ svga_destroy_screen( struct pipe_screen *screen )
    
    svga_screen_cache_cleanup(svgascreen);
 
-   pipe_mutex_destroy(svgascreen->swc_mutex);
-   pipe_mutex_destroy(svgascreen->tex_mutex);
+   mtx_destroy(&svgascreen->swc_mutex);
+   mtx_destroy(&svgascreen->tex_mutex);
 
    svgascreen->sws->destroy(svgascreen->sws);
    
index 514fc00afa41b1971485761bebf022af8f9d749f..c14996de892a8bfb5a5b6da00259b36be69dba3c 100644 (file)
@@ -396,7 +396,7 @@ svga_screen_cache_cleanup(struct svga_screen *svgascreen)
          sws->fence_reference(sws, &cache->entries[i].fence, NULL);
    }
 
-   pipe_mutex_destroy(cache->mutex);
+   mtx_destroy(&cache->mutex);
 }
 
 
index da0e4149cea11e1c5c485e38992a482d13f36cd2..9b37dff67781e2387193426e48a487dd2cd771c4 100644 (file)
@@ -404,7 +404,7 @@ dri_destroy_screen_helper(struct dri_screen * screen)
       screen->base.screen->destroy(screen->base.screen);
 
    dri_destroy_option_cache(screen);
-   pipe_mutex_destroy(screen->opencl_func_mutex);
+   mtx_destroy(&screen->opencl_func_mutex);
 }
 
 void
index 30b0e303c0f5c6074dbc47171d9f1853d005c195..07dfee581888577845e020cb1694bd562cbafdb1 100644 (file)
@@ -265,8 +265,8 @@ void
 nine_queue_delete(struct nine_queue_pool *ctx)
 {
     unsigned i;
-    pipe_mutex_destroy(ctx->mutex_pop);
-    pipe_mutex_destroy(ctx->mutex_push);
+    mtx_destroy(&ctx->mutex_pop);
+    mtx_destroy(&ctx->mutex_push);
 
     for (i = 0; i < NINE_CMD_BUFS; i++)
         FREE(ctx->pool[i].mem_pool);
index a331f7ca8d650f37c3f60179eb043a58226a3e17..978fa013c49f8cb07f24e2a9ecaf8683135494a3 100644 (file)
@@ -233,7 +233,7 @@ nine_csmt_destroy( struct NineDevice9 *device, struct csmt_context *ctx )
 
     nine_csmt_wait_processed(ctx);
     nine_queue_delete(ctx->pool);
-    pipe_mutex_destroy(ctx->mutex_processed);
+    mtx_destroy(&ctx->mutex_processed);
 
     FREE(ctx);
 
index 84bb805d8fa31ffcc6b70a6f9dd23dbbd4aa3b23..36e314fa2b73aa1ad2e5eddae0049ce185bb2532 100644 (file)
@@ -351,7 +351,7 @@ vlVaTerminate(VADriverContextP ctx)
    drv->pipe->destroy(drv->pipe);
    drv->vscreen->destroy(drv->vscreen);
    handle_table_destroy(drv->htab);
-   pipe_mutex_destroy(drv->mutex);
+   mtx_destroy(&drv->mutex);
    FREE(drv);
 
    return VA_STATUS_SUCCESS;
index 628e5030c5a37ce0331ea3ea64feb1bbacfcdee5..387371b29abbb113aa4a592ebf6b6adb620fee57 100644 (file)
@@ -166,7 +166,7 @@ vlVdpDecoderDestroy(VdpDecoder decoder)
    pipe_mutex_lock(vldecoder->mutex);
    vldecoder->decoder->destroy(vldecoder->decoder);
    pipe_mutex_unlock(vldecoder->mutex);
-   pipe_mutex_destroy(vldecoder->mutex);
+   mtx_destroy(&vldecoder->mutex);
 
    vlRemoveDataHTAB(decoder);
    DeviceReference(&vldecoder->device, NULL);
index 15652f08bf8c477d7c3066b0c353dbf7ff530764..3ae3da3be1dea6c99a5aed74ce848235c282ad65 100644 (file)
@@ -233,7 +233,7 @@ vlVdpDeviceDestroy(VdpDevice device)
 void
 vlVdpDeviceFree(vlVdpDevice *dev)
 {
-   pipe_mutex_destroy(dev->mutex);
+   mtx_destroy(&dev->mutex);
    vl_compositor_cleanup(&dev->compositor);
    pipe_sampler_view_reference(&dev->dummy_sv, NULL);
    dev->context->destroy(dev->context);
index df222f6580a9ea4aa7d91940eed619800f793a8f..9662149bd5c6d3a9c0a0460c553471770159f1dc 100644 (file)
@@ -69,7 +69,7 @@ GalliumContext::~GalliumContext()
                DestroyContext(i);
        Unlock();
 
-       pipe_mutex_destroy(fMutex);
+       mtx_destroy(&fMutex);
 
        // TODO: Destroy fScreen
 }
index f19c935f08573c32860b40ff7eafe8e4f764c4f3..ae4e403ba43e8c624f67d01d3e10d141a6ae6eac 100644 (file)
@@ -389,10 +389,10 @@ static void amdgpu_winsys_destroy(struct radeon_winsys *rws)
    if (util_queue_is_initialized(&ws->cs_queue))
       util_queue_destroy(&ws->cs_queue);
 
-   pipe_mutex_destroy(ws->bo_fence_lock);
+   mtx_destroy(&ws->bo_fence_lock);
    pb_slabs_deinit(&ws->bo_slabs);
    pb_cache_deinit(&ws->bo_cache);
-   pipe_mutex_destroy(ws->global_bo_list_lock);
+   mtx_destroy(&ws->global_bo_list_lock);
    do_winsys_deinit(ws);
    FREE(rws);
 }
index e54dcaca6798db7ae7d0dfa20704e63a8e2e56e1..786b1f61b102e67ecb5bc141d85dc44cfb27a55e 100644 (file)
@@ -370,7 +370,7 @@ void radeon_bo_destroy(struct pb_buffer *_buf)
     args.handle = bo->handle;
     drmIoctl(rws->fd, DRM_IOCTL_GEM_CLOSE, &args);
 
-    pipe_mutex_destroy(bo->u.real.map_mutex);
+    mtx_destroy(&bo->u.real.map_mutex);
 
     if (bo->initial_domain & RADEON_DOMAIN_VRAM)
         rws->allocated_vram -= align(bo->base.size, rws->info.gart_page_size);
index abab4aab8d8e21bf4fc7d7783e124ed0134eb8d7..bbcf7a225f2aaddf814ded7d842eea84a5f22de8 100644 (file)
@@ -538,8 +538,8 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws)
     if (util_queue_is_initialized(&ws->cs_queue))
         util_queue_destroy(&ws->cs_queue);
 
-    pipe_mutex_destroy(ws->hyperz_owner_mutex);
-    pipe_mutex_destroy(ws->cmask_owner_mutex);
+    mtx_destroy(&ws->hyperz_owner_mutex);
+    mtx_destroy(&ws->cmask_owner_mutex);
 
     if (ws->info.has_virtual_memory)
         pb_slabs_deinit(&ws->bo_slabs);
@@ -552,9 +552,9 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws)
     util_hash_table_destroy(ws->bo_names);
     util_hash_table_destroy(ws->bo_handles);
     util_hash_table_destroy(ws->bo_vas);
-    pipe_mutex_destroy(ws->bo_handles_mutex);
-    pipe_mutex_destroy(ws->bo_va_mutex);
-    pipe_mutex_destroy(ws->bo_fence_lock);
+    mtx_destroy(&ws->bo_handles_mutex);
+    mtx_destroy(&ws->bo_va_mutex);
+    mtx_destroy(&ws->bo_fence_lock);
 
     if (ws->fd >= 0)
         close(ws->fd);
index 0553662380ff82860fb7f86e792ace1232133935..293fe7e032e6417ae3be852c04c9281206e75c28 100644 (file)
@@ -809,7 +809,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr)
 #endif
 
    pipe_mutex_unlock(fenced_mgr->mutex);
-   pipe_mutex_destroy(fenced_mgr->mutex);
+   mtx_destroy(&fenced_mgr->mutex);
 
    FREE(fenced_mgr);
 }
index a438b1a7c5ba4705b0642676c0808b38f877effb..9fadbf95a02e3836352a90cefe9042590c9ae999 100644 (file)
@@ -201,7 +201,7 @@ vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst,
       assert(p_atomic_read(&dst->validated) == 0);
       dst->sid = SVGA3D_INVALID_ID;
 #endif
-      pipe_mutex_destroy(dst->mutex);
+      mtx_destroy(&dst->mutex);
       FREE(dst);
    }
 
index b6a42343a5ee9ab4a95c1112012f2ea3b8f146f7..4f3fa4d810c06b1105f40149ded58808ddbff712 100644 (file)
@@ -120,8 +120,8 @@ virgl_drm_winsys_destroy(struct virgl_winsys *qws)
 
    util_hash_table_destroy(qdws->bo_handles);
    util_hash_table_destroy(qdws->bo_names);
-   pipe_mutex_destroy(qdws->bo_handles_mutex);
-   pipe_mutex_destroy(qdws->mutex);
+   mtx_destroy(&qdws->bo_handles_mutex);
+   mtx_destroy(&qdws->mutex);
 
    FREE(qdws);
 }
index a8c874a4f6959662d03baa44599b8cc6e7d4ed09..dde53e707944d33010718bdd5c3a4abc149aee1a 100644 (file)
@@ -619,7 +619,7 @@ virgl_vtest_winsys_destroy(struct virgl_winsys *vws)
 
    virgl_cache_flush(vtws);
 
-   pipe_mutex_destroy(vtws->mutex);
+   mtx_destroy(&vtws->mutex);
    FREE(vtws);
 }