diff options
author | Timothy Arceri <[email protected]> | 2017-03-05 12:12:30 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-07 08:52:38 +1100 |
commit | ba72554f3e576c1674d52ab16d8d2edff9398b71 (patch) | |
tree | 317c80f33ea1edcf238d3545ff1a6104a7d55fc8 /src/gallium/state_trackers | |
parent | be188289e1bf0e259c91a751c405d54bb99bc5d4 (diff) |
gallium/util: replace pipe_mutex_lock() with mtx_lock()
replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12.
Replaced using:
find ./src -type f -exec sed -i -- \
's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \;
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
22 files changed, 325 insertions, 325 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 1ad15b53b7a..da663b260d4 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -1431,7 +1431,7 @@ dri2_load_opencl_interop(struct dri_screen *screen) #if defined(RTLD_DEFAULT) bool success; - pipe_mutex_lock(screen->opencl_func_mutex); + mtx_lock(&screen->opencl_func_mutex); if (dri2_is_opencl_interop_loaded_locked(screen)) { pipe_mutex_unlock(screen->opencl_func_mutex); diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index 92d2cec0284..86bb1c44ba3 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -197,7 +197,7 @@ xmesa_init_display( Display *display ) return NULL; } - pipe_mutex_lock(init_mutex); + mtx_lock(&init_mutex); /* Look for XMesaDisplay which corresponds to this display */ info = MesaExtInfo.head; @@ -372,7 +372,7 @@ xmesa_get_window_size(Display *dpy, XMesaBuffer b, XMesaDisplay xmdpy = xmesa_init_display(dpy); Status stat; - pipe_mutex_lock(xmdpy->mutex); + mtx_lock(&xmdpy->mutex); stat = get_drawable_size(dpy, b->ws.drawable, width, height); pipe_mutex_unlock(xmdpy->mutex); diff --git a/src/gallium/state_trackers/hgl/hgl.c b/src/gallium/state_trackers/hgl/hgl.c index 0e122fe86ae..1b702815a3a 100644 --- a/src/gallium/state_trackers/hgl/hgl.c +++ b/src/gallium/state_trackers/hgl/hgl.c @@ -66,7 +66,7 @@ hgl_st_framebuffer_flush_front(struct st_context_iface *stctxi, #if 0 struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); - pipe_mutex_lock(stwfb->fb->mutex); + mtx_lock(&stwfb->fb->mutex); struct pipe_resource* resource = textures[statt]; if (resource) diff --git a/src/gallium/state_trackers/nine/nine_lock.c b/src/gallium/state_trackers/nine/nine_lock.c index 5b535591769..0ac0cd778af 100644 --- a/src/gallium/state_trackers/nine/nine_lock.c +++ b/src/gallium/state_trackers/nine/nine_lock.c @@ -53,7 +53,7 @@ static mtx_t d3dlock_global = _MTX_INITIALIZER_NP; void NineLockGlobalMutex() { - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); } void @@ -67,7 +67,7 @@ LockAuthenticatedChannel9_GetCertificateSize( struct NineAuthenticatedChannel9 * UINT *pCertificateSize ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineAuthenticatedChannel9_GetCertificateSize(This, pCertificateSize); pipe_mutex_unlock(d3dlock_global); return r; @@ -79,7 +79,7 @@ LockAuthenticatedChannel9_GetCertificate( struct NineAuthenticatedChannel9 *This BYTE *ppCertificate ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineAuthenticatedChannel9_GetCertificate(This, CertifacteSize, ppCertificate); pipe_mutex_unlock(d3dlock_global); return r; @@ -91,7 +91,7 @@ LockAuthenticatedChannel9_NegotiateKeyExchange( struct NineAuthenticatedChannel9 void *pData ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineAuthenticatedChannel9_NegotiateKeyExchange(This, DataSize, pData); pipe_mutex_unlock(d3dlock_global); return r; @@ -105,7 +105,7 @@ LockAuthenticatedChannel9_Query( struct NineAuthenticatedChannel9 *This, void *pOutput ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineAuthenticatedChannel9_Query(This, InputSize, pInput, OutputSize, pOutput); pipe_mutex_unlock(d3dlock_global); return r; @@ -118,7 +118,7 @@ LockAuthenticatedChannel9_Configure( struct NineAuthenticatedChannel9 *This, D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT *pOutput ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineAuthenticatedChannel9_Configure(This, InputSize, pInput, pOutput); pipe_mutex_unlock(d3dlock_global); return r; @@ -143,7 +143,7 @@ LockUnknown_SetPrivateData( struct NineUnknown *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_SetPrivateData(This, refguid, pData, SizeOfData, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -156,7 +156,7 @@ LockUnknown_GetPrivateData( struct NineUnknown *This, DWORD *pSizeOfData ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetPrivateData(This, refguid, pData, pSizeOfData); pipe_mutex_unlock(d3dlock_global); return r; @@ -167,7 +167,7 @@ LockUnknown_FreePrivateData( struct NineUnknown *This, REFGUID refguid ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_FreePrivateData(This, refguid); pipe_mutex_unlock(d3dlock_global); return r; @@ -179,7 +179,7 @@ LockResource9_GetDevice( struct NineResource9 *This, IDirect3DDevice9 **ppDevice ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetDevice(NineUnknown(This), ppDevice); pipe_mutex_unlock(d3dlock_global); return r; @@ -191,7 +191,7 @@ LockResource9_SetPriority( struct NineResource9 *This, DWORD PriorityNew ) { DWORD r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineResource9_SetPriority(This, PriorityNew); pipe_mutex_unlock(d3dlock_global); return r; @@ -201,7 +201,7 @@ static DWORD NINE_WINAPI LockResource9_GetPriority( struct NineResource9 *This ) { DWORD r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineResource9_GetPriority(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -211,7 +211,7 @@ LockResource9_GetPriority( struct NineResource9 *This ) static void NINE_WINAPI LockResource9_PreLoad( struct NineResource9 *This ) { - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); NineResource9_PreLoad(This); pipe_mutex_unlock(d3dlock_global); } @@ -222,7 +222,7 @@ static D3DRESOURCETYPE NINE_WINAPI LockResource9_GetType( struct NineResource9 *This ) { D3DRESOURCETYPE r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineResource9_GetType(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -234,7 +234,7 @@ LockBaseTexture9_SetLOD( struct NineBaseTexture9 *This, DWORD LODNew ) { DWORD r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineBaseTexture9_SetLOD(This, LODNew); pipe_mutex_unlock(d3dlock_global); return r; @@ -244,7 +244,7 @@ static DWORD NINE_WINAPI LockBaseTexture9_GetLOD( struct NineBaseTexture9 *This ) { DWORD r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineBaseTexture9_GetLOD(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -254,7 +254,7 @@ static DWORD NINE_WINAPI LockBaseTexture9_GetLevelCount( struct NineBaseTexture9 *This ) { DWORD r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineBaseTexture9_GetLevelCount(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -265,7 +265,7 @@ LockBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This, D3DTEXTUREFILTERTYPE FilterType ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineBaseTexture9_SetAutoGenFilterType(This, FilterType); pipe_mutex_unlock(d3dlock_global); return r; @@ -275,7 +275,7 @@ static D3DTEXTUREFILTERTYPE NINE_WINAPI LockBaseTexture9_GetAutoGenFilterType( struct NineBaseTexture9 *This ) { D3DTEXTUREFILTERTYPE r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineBaseTexture9_GetAutoGenFilterType(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -284,7 +284,7 @@ LockBaseTexture9_GetAutoGenFilterType( struct NineBaseTexture9 *This ) static void NINE_WINAPI LockBaseTexture9_PreLoad( struct NineBaseTexture9 *This ) { - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); NineBaseTexture9_PreLoad(This); pipe_mutex_unlock(d3dlock_global); } @@ -292,7 +292,7 @@ LockBaseTexture9_PreLoad( struct NineBaseTexture9 *This ) static void NINE_WINAPI LockBaseTexture9_GenerateMipSubLevels( struct NineBaseTexture9 *This ) { - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); NineBaseTexture9_GenerateMipSubLevels(This); pipe_mutex_unlock(d3dlock_global); } @@ -302,7 +302,7 @@ LockCryptoSession9_GetCertificateSize( struct NineCryptoSession9 *This, UINT *pCertificateSize ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_GetCertificateSize(This, pCertificateSize); pipe_mutex_unlock(d3dlock_global); return r; @@ -314,7 +314,7 @@ LockCryptoSession9_GetCertificate( struct NineCryptoSession9 *This, BYTE *ppCertificate ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_GetCertificate(This, CertifacteSize, ppCertificate); pipe_mutex_unlock(d3dlock_global); return r; @@ -326,7 +326,7 @@ LockCryptoSession9_NegotiateKeyExchange( struct NineCryptoSession9 *This, void *pData ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_NegotiateKeyExchange(This, DataSize, pData); pipe_mutex_unlock(d3dlock_global); return r; @@ -340,7 +340,7 @@ LockCryptoSession9_EncryptionBlt( struct NineCryptoSession9 *This, void *pIV ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_EncryptionBlt(This, pSrcSurface, pDstSurface, DstSurfaceSize, pIV); pipe_mutex_unlock(d3dlock_global); return r; @@ -356,7 +356,7 @@ LockCryptoSession9_DecryptionBlt( struct NineCryptoSession9 *This, void *pIV ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_DecryptionBlt(This, pSrcSurface, pDstSurface, SrcSurfaceSize, pEncryptedBlockInfo, pContentKey, pIV); pipe_mutex_unlock(d3dlock_global); return r; @@ -368,7 +368,7 @@ LockCryptoSession9_GetSurfacePitch( struct NineCryptoSession9 *This, UINT *pSurfacePitch ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_GetSurfacePitch(This, pSrcSurface, pSurfacePitch); pipe_mutex_unlock(d3dlock_global); return r; @@ -380,7 +380,7 @@ LockCryptoSession9_StartSessionKeyRefresh( struct NineCryptoSession9 *This, UINT RandomNumberSize ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_StartSessionKeyRefresh(This, pRandomNumber, RandomNumberSize); pipe_mutex_unlock(d3dlock_global); return r; @@ -390,7 +390,7 @@ static HRESULT NINE_WINAPI LockCryptoSession9_FinishSessionKeyRefresh( struct NineCryptoSession9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_FinishSessionKeyRefresh(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -402,7 +402,7 @@ LockCryptoSession9_GetEncryptionBltKey( struct NineCryptoSession9 *This, UINT KeySize ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCryptoSession9_GetEncryptionBltKey(This, pReadbackKey, KeySize); pipe_mutex_unlock(d3dlock_global); return r; @@ -430,7 +430,7 @@ LockCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This, D3DSURFACE_DESC *pDesc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCubeTexture9_GetLevelDesc(This, Level, pDesc); pipe_mutex_unlock(d3dlock_global); return r; @@ -445,7 +445,7 @@ LockCubeTexture9_GetCubeMapSurface( struct NineCubeTexture9 *This, IDirect3DSurface9 **ppCubeMapSurface ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCubeTexture9_GetCubeMapSurface(This, FaceType, Level, ppCubeMapSurface); pipe_mutex_unlock(d3dlock_global); return r; @@ -461,7 +461,7 @@ LockCubeTexture9_LockRect( struct NineCubeTexture9 *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCubeTexture9_LockRect(This, FaceType, Level, pLockedRect, pRect, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -473,7 +473,7 @@ LockCubeTexture9_UnlockRect( struct NineCubeTexture9 *This, UINT Level ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCubeTexture9_UnlockRect(This, FaceType, Level); pipe_mutex_unlock(d3dlock_global); return r; @@ -485,7 +485,7 @@ LockCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This, const RECT *pDirtyRect ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineCubeTexture9_AddDirtyRect(This, FaceType, pDirtyRect); pipe_mutex_unlock(d3dlock_global); return r; @@ -520,7 +520,7 @@ static HRESULT NINE_WINAPI LockDevice9_TestCooperativeLevel( struct NineDevice9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_TestCooperativeLevel(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -530,7 +530,7 @@ static UINT NINE_WINAPI LockDevice9_GetAvailableTextureMem( struct NineDevice9 *This ) { UINT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetAvailableTextureMem(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -540,7 +540,7 @@ static HRESULT NINE_WINAPI LockDevice9_EvictManagedResources( struct NineDevice9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_EvictManagedResources(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -551,7 +551,7 @@ LockDevice9_GetDirect3D( struct NineDevice9 *This, IDirect3D9 **ppD3D9 ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetDirect3D(This, ppD3D9); pipe_mutex_unlock(d3dlock_global); return r; @@ -563,7 +563,7 @@ LockDevice9_GetDeviceCaps( struct NineDevice9 *This, D3DCAPS9 *pCaps ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetDeviceCaps(This, pCaps); pipe_mutex_unlock(d3dlock_global); return r; @@ -576,7 +576,7 @@ LockDevice9_GetDisplayMode( struct NineDevice9 *This, D3DDISPLAYMODE *pMode ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetDisplayMode(This, iSwapChain, pMode); pipe_mutex_unlock(d3dlock_global); return r; @@ -588,7 +588,7 @@ LockDevice9_GetCreationParameters( struct NineDevice9 *This, D3DDEVICE_CREATION_PARAMETERS *pParameters ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetCreationParameters(This, pParameters); pipe_mutex_unlock(d3dlock_global); return r; @@ -602,7 +602,7 @@ LockDevice9_SetCursorProperties( struct NineDevice9 *This, IDirect3DSurface9 *pCursorBitmap ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetCursorProperties(This, XHotSpot, YHotSpot, pCursorBitmap); pipe_mutex_unlock(d3dlock_global); return r; @@ -614,7 +614,7 @@ LockDevice9_SetCursorPosition( struct NineDevice9 *This, int Y, DWORD Flags ) { - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); NineDevice9_SetCursorPosition(This, X, Y, Flags); pipe_mutex_unlock(d3dlock_global); } @@ -624,7 +624,7 @@ LockDevice9_ShowCursor( struct NineDevice9 *This, BOOL bShow ) { BOOL r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_ShowCursor(This, bShow); pipe_mutex_unlock(d3dlock_global); return r; @@ -636,7 +636,7 @@ LockDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This, IDirect3DSwapChain9 **pSwapChain ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateAdditionalSwapChain(This, pPresentationParameters, pSwapChain); pipe_mutex_unlock(d3dlock_global); return r; @@ -648,7 +648,7 @@ LockDevice9_GetSwapChain( struct NineDevice9 *This, IDirect3DSwapChain9 **pSwapChain ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetSwapChain(This, iSwapChain, pSwapChain); pipe_mutex_unlock(d3dlock_global); return r; @@ -658,7 +658,7 @@ static UINT NINE_WINAPI LockDevice9_GetNumberOfSwapChains( struct NineDevice9 *This ) { UINT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetNumberOfSwapChains(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -669,7 +669,7 @@ LockDevice9_Reset( struct NineDevice9 *This, D3DPRESENT_PARAMETERS *pPresentationParameters ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_Reset(This, pPresentationParameters); pipe_mutex_unlock(d3dlock_global); return r; @@ -683,7 +683,7 @@ LockDevice9_Present( struct NineDevice9 *This, const RGNDATA *pDirtyRegion ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_Present(This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion); pipe_mutex_unlock(d3dlock_global); return r; @@ -697,7 +697,7 @@ LockDevice9_GetBackBuffer( struct NineDevice9 *This, IDirect3DSurface9 **ppBackBuffer ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetBackBuffer(This, iSwapChain, iBackBuffer, Type, ppBackBuffer); pipe_mutex_unlock(d3dlock_global); return r; @@ -709,7 +709,7 @@ LockDevice9_GetRasterStatus( struct NineDevice9 *This, D3DRASTER_STATUS *pRasterStatus ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetRasterStatus(This, iSwapChain, pRasterStatus); pipe_mutex_unlock(d3dlock_global); return r; @@ -720,7 +720,7 @@ LockDevice9_SetDialogBoxMode( struct NineDevice9 *This, BOOL bEnableDialogs ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetDialogBoxMode(This, bEnableDialogs); pipe_mutex_unlock(d3dlock_global); return r; @@ -732,7 +732,7 @@ LockDevice9_SetGammaRamp( struct NineDevice9 *This, DWORD Flags, const D3DGAMMARAMP *pRamp ) { - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); NineDevice9_SetGammaRamp(This, iSwapChain, Flags, pRamp); pipe_mutex_unlock(d3dlock_global); } @@ -742,7 +742,7 @@ LockDevice9_GetGammaRamp( struct NineDevice9 *This, UINT iSwapChain, D3DGAMMARAMP *pRamp ) { - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); NineDevice9_GetGammaRamp(This, iSwapChain, pRamp); pipe_mutex_unlock(d3dlock_global); } @@ -759,7 +759,7 @@ LockDevice9_CreateTexture( struct NineDevice9 *This, HANDLE *pSharedHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateTexture(This, Width, Height, Levels, Usage, Format, Pool, ppTexture, pSharedHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -778,7 +778,7 @@ LockDevice9_CreateVolumeTexture( struct NineDevice9 *This, HANDLE *pSharedHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateVolumeTexture(This, Width, Height, Depth, Levels, Usage, Format, Pool, ppVolumeTexture, pSharedHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -795,7 +795,7 @@ LockDevice9_CreateCubeTexture( struct NineDevice9 *This, HANDLE *pSharedHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateCubeTexture(This, EdgeLength, Levels, Usage, Format, Pool, ppCubeTexture, pSharedHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -811,7 +811,7 @@ LockDevice9_CreateVertexBuffer( struct NineDevice9 *This, HANDLE *pSharedHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateVertexBuffer(This, Length, Usage, FVF, Pool, ppVertexBuffer, pSharedHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -827,7 +827,7 @@ LockDevice9_CreateIndexBuffer( struct NineDevice9 *This, HANDLE *pSharedHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateIndexBuffer(This, Length, Usage, Format, Pool, ppIndexBuffer, pSharedHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -845,7 +845,7 @@ LockDevice9_CreateRenderTarget( struct NineDevice9 *This, HANDLE *pSharedHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateRenderTarget(This, Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -863,7 +863,7 @@ LockDevice9_CreateDepthStencilSurface( struct NineDevice9 *This, HANDLE *pSharedHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateDepthStencilSurface(This, Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -877,7 +877,7 @@ LockDevice9_UpdateSurface( struct NineDevice9 *This, const POINT *pDestPoint ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_UpdateSurface(This, pSourceSurface, pSourceRect, pDestinationSurface, pDestPoint); pipe_mutex_unlock(d3dlock_global); return r; @@ -889,7 +889,7 @@ LockDevice9_UpdateTexture( struct NineDevice9 *This, IDirect3DBaseTexture9 *pDestinationTexture ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_UpdateTexture(This, pSourceTexture, pDestinationTexture); pipe_mutex_unlock(d3dlock_global); return r; @@ -901,7 +901,7 @@ LockDevice9_GetRenderTargetData( struct NineDevice9 *This, IDirect3DSurface9 *pDestSurface ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetRenderTargetData(This, pRenderTarget, pDestSurface); pipe_mutex_unlock(d3dlock_global); return r; @@ -913,7 +913,7 @@ LockDevice9_GetFrontBufferData( struct NineDevice9 *This, IDirect3DSurface9 *pDestSurface ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetFrontBufferData(This, iSwapChain, pDestSurface); pipe_mutex_unlock(d3dlock_global); return r; @@ -928,7 +928,7 @@ LockDevice9_StretchRect( struct NineDevice9 *This, D3DTEXTUREFILTERTYPE Filter ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_StretchRect(This, pSourceSurface, pSourceRect, pDestSurface, pDestRect, Filter); pipe_mutex_unlock(d3dlock_global); return r; @@ -941,7 +941,7 @@ LockDevice9_ColorFill( struct NineDevice9 *This, D3DCOLOR color ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_ColorFill(This, pSurface, pRect, color); pipe_mutex_unlock(d3dlock_global); return r; @@ -957,7 +957,7 @@ LockDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This, HANDLE *pSharedHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateOffscreenPlainSurface(This, Width, Height, Format, Pool, ppSurface, pSharedHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -969,7 +969,7 @@ LockDevice9_SetRenderTarget( struct NineDevice9 *This, IDirect3DSurface9 *pRenderTarget ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetRenderTarget(This, RenderTargetIndex, pRenderTarget); pipe_mutex_unlock(d3dlock_global); return r; @@ -981,7 +981,7 @@ LockDevice9_GetRenderTarget( struct NineDevice9 *This, IDirect3DSurface9 **ppRenderTarget ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetRenderTarget(This, RenderTargetIndex, ppRenderTarget); pipe_mutex_unlock(d3dlock_global); return r; @@ -992,7 +992,7 @@ LockDevice9_SetDepthStencilSurface( struct NineDevice9 *This, IDirect3DSurface9 *pNewZStencil ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetDepthStencilSurface(This, pNewZStencil); pipe_mutex_unlock(d3dlock_global); return r; @@ -1003,7 +1003,7 @@ LockDevice9_GetDepthStencilSurface( struct NineDevice9 *This, IDirect3DSurface9 **ppZStencilSurface ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetDepthStencilSurface(This, ppZStencilSurface); pipe_mutex_unlock(d3dlock_global); return r; @@ -1013,7 +1013,7 @@ static HRESULT NINE_WINAPI LockDevice9_BeginScene( struct NineDevice9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_BeginScene(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -1023,7 +1023,7 @@ static HRESULT NINE_WINAPI LockDevice9_EndScene( struct NineDevice9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_EndScene(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -1039,7 +1039,7 @@ LockDevice9_Clear( struct NineDevice9 *This, DWORD Stencil ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_Clear(This, Count, pRects, Flags, Color, Z, Stencil); pipe_mutex_unlock(d3dlock_global); return r; @@ -1051,7 +1051,7 @@ LockDevice9_SetTransform( struct NineDevice9 *This, const D3DMATRIX *pMatrix ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetTransform(This, State, pMatrix); pipe_mutex_unlock(d3dlock_global); return r; @@ -1063,7 +1063,7 @@ LockDevice9_GetTransform( struct NineDevice9 *This, D3DMATRIX *pMatrix ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetTransform(This, State, pMatrix); pipe_mutex_unlock(d3dlock_global); return r; @@ -1075,7 +1075,7 @@ LockDevice9_MultiplyTransform( struct NineDevice9 *This, const D3DMATRIX *pMatrix ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_MultiplyTransform(This, State, pMatrix); pipe_mutex_unlock(d3dlock_global); return r; @@ -1086,7 +1086,7 @@ LockDevice9_SetViewport( struct NineDevice9 *This, const D3DVIEWPORT9 *pViewport ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetViewport(This, pViewport); pipe_mutex_unlock(d3dlock_global); return r; @@ -1097,7 +1097,7 @@ LockDevice9_GetViewport( struct NineDevice9 *This, D3DVIEWPORT9 *pViewport ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetViewport(This, pViewport); pipe_mutex_unlock(d3dlock_global); return r; @@ -1108,7 +1108,7 @@ LockDevice9_SetMaterial( struct NineDevice9 *This, const D3DMATERIAL9 *pMaterial ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetMaterial(This, pMaterial); pipe_mutex_unlock(d3dlock_global); return r; @@ -1119,7 +1119,7 @@ LockDevice9_GetMaterial( struct NineDevice9 *This, D3DMATERIAL9 *pMaterial ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetMaterial(This, pMaterial); pipe_mutex_unlock(d3dlock_global); return r; @@ -1131,7 +1131,7 @@ LockDevice9_SetLight( struct NineDevice9 *This, const D3DLIGHT9 *pLight ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetLight(This, Index, pLight); pipe_mutex_unlock(d3dlock_global); return r; @@ -1143,7 +1143,7 @@ LockDevice9_GetLight( struct NineDevice9 *This, D3DLIGHT9 *pLight ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetLight(This, Index, pLight); pipe_mutex_unlock(d3dlock_global); return r; @@ -1155,7 +1155,7 @@ LockDevice9_LightEnable( struct NineDevice9 *This, BOOL Enable ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_LightEnable(This, Index, Enable); pipe_mutex_unlock(d3dlock_global); return r; @@ -1167,7 +1167,7 @@ LockDevice9_GetLightEnable( struct NineDevice9 *This, BOOL *pEnable ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetLightEnable(This, Index, pEnable); pipe_mutex_unlock(d3dlock_global); return r; @@ -1179,7 +1179,7 @@ LockDevice9_SetClipPlane( struct NineDevice9 *This, const float *pPlane ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetClipPlane(This, Index, pPlane); pipe_mutex_unlock(d3dlock_global); return r; @@ -1191,7 +1191,7 @@ LockDevice9_GetClipPlane( struct NineDevice9 *This, float *pPlane ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetClipPlane(This, Index, pPlane); pipe_mutex_unlock(d3dlock_global); return r; @@ -1203,7 +1203,7 @@ LockDevice9_SetRenderState( struct NineDevice9 *This, DWORD Value ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetRenderState(This, State, Value); pipe_mutex_unlock(d3dlock_global); return r; @@ -1215,7 +1215,7 @@ LockDevice9_GetRenderState( struct NineDevice9 *This, DWORD *pValue ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetRenderState(This, State, pValue); pipe_mutex_unlock(d3dlock_global); return r; @@ -1227,7 +1227,7 @@ LockDevice9_CreateStateBlock( struct NineDevice9 *This, IDirect3DStateBlock9 **ppSB ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateStateBlock(This, Type, ppSB); pipe_mutex_unlock(d3dlock_global); return r; @@ -1237,7 +1237,7 @@ static HRESULT NINE_WINAPI LockDevice9_BeginStateBlock( struct NineDevice9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_BeginStateBlock(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -1248,7 +1248,7 @@ LockDevice9_EndStateBlock( struct NineDevice9 *This, IDirect3DStateBlock9 **ppSB ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_EndStateBlock(This, ppSB); pipe_mutex_unlock(d3dlock_global); return r; @@ -1259,7 +1259,7 @@ LockDevice9_SetClipStatus( struct NineDevice9 *This, const D3DCLIPSTATUS9 *pClipStatus ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetClipStatus(This, pClipStatus); pipe_mutex_unlock(d3dlock_global); return r; @@ -1270,7 +1270,7 @@ LockDevice9_GetClipStatus( struct NineDevice9 *This, D3DCLIPSTATUS9 *pClipStatus ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetClipStatus(This, pClipStatus); pipe_mutex_unlock(d3dlock_global); return r; @@ -1282,7 +1282,7 @@ LockDevice9_GetTexture( struct NineDevice9 *This, IDirect3DBaseTexture9 **ppTexture ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetTexture(This, Stage, ppTexture); pipe_mutex_unlock(d3dlock_global); return r; @@ -1294,7 +1294,7 @@ LockDevice9_SetTexture( struct NineDevice9 *This, IDirect3DBaseTexture9 *pTexture ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetTexture(This, Stage, pTexture); pipe_mutex_unlock(d3dlock_global); return r; @@ -1307,7 +1307,7 @@ LockDevice9_GetTextureStageState( struct NineDevice9 *This, DWORD *pValue ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetTextureStageState(This, Stage, Type, pValue); pipe_mutex_unlock(d3dlock_global); return r; @@ -1320,7 +1320,7 @@ LockDevice9_SetTextureStageState( struct NineDevice9 *This, DWORD Value ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetTextureStageState(This, Stage, Type, Value); pipe_mutex_unlock(d3dlock_global); return r; @@ -1333,7 +1333,7 @@ LockDevice9_GetSamplerState( struct NineDevice9 *This, DWORD *pValue ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetSamplerState(This, Sampler, Type, pValue); pipe_mutex_unlock(d3dlock_global); return r; @@ -1346,7 +1346,7 @@ LockDevice9_SetSamplerState( struct NineDevice9 *This, DWORD Value ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetSamplerState(This, Sampler, Type, Value); pipe_mutex_unlock(d3dlock_global); return r; @@ -1357,7 +1357,7 @@ LockDevice9_ValidateDevice( struct NineDevice9 *This, DWORD *pNumPasses ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_ValidateDevice(This, pNumPasses); pipe_mutex_unlock(d3dlock_global); return r; @@ -1369,7 +1369,7 @@ LockDevice9_SetPaletteEntries( struct NineDevice9 *This, const PALETTEENTRY *pEntries ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetPaletteEntries(This, PaletteNumber, pEntries); pipe_mutex_unlock(d3dlock_global); return r; @@ -1381,7 +1381,7 @@ LockDevice9_GetPaletteEntries( struct NineDevice9 *This, PALETTEENTRY *pEntries ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetPaletteEntries(This, PaletteNumber, pEntries); pipe_mutex_unlock(d3dlock_global); return r; @@ -1392,7 +1392,7 @@ LockDevice9_SetCurrentTexturePalette( struct NineDevice9 *This, UINT PaletteNumber ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetCurrentTexturePalette(This, PaletteNumber); pipe_mutex_unlock(d3dlock_global); return r; @@ -1403,7 +1403,7 @@ LockDevice9_GetCurrentTexturePalette( struct NineDevice9 *This, UINT *PaletteNumber ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetCurrentTexturePalette(This, PaletteNumber); pipe_mutex_unlock(d3dlock_global); return r; @@ -1414,7 +1414,7 @@ LockDevice9_SetScissorRect( struct NineDevice9 *This, const RECT *pRect ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetScissorRect(This, pRect); pipe_mutex_unlock(d3dlock_global); return r; @@ -1425,7 +1425,7 @@ LockDevice9_GetScissorRect( struct NineDevice9 *This, RECT *pRect ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetScissorRect(This, pRect); pipe_mutex_unlock(d3dlock_global); return r; @@ -1436,7 +1436,7 @@ LockDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This, BOOL bSoftware ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetSoftwareVertexProcessing(This, bSoftware); pipe_mutex_unlock(d3dlock_global); return r; @@ -1446,7 +1446,7 @@ static BOOL NINE_WINAPI LockDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This ) { BOOL r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetSoftwareVertexProcessing(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -1457,7 +1457,7 @@ LockDevice9_SetNPatchMode( struct NineDevice9 *This, float nSegments ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetNPatchMode(This, nSegments); pipe_mutex_unlock(d3dlock_global); return r; @@ -1467,7 +1467,7 @@ static float NINE_WINAPI LockDevice9_GetNPatchMode( struct NineDevice9 *This ) { float r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetNPatchMode(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -1480,7 +1480,7 @@ LockDevice9_DrawPrimitive( struct NineDevice9 *This, UINT PrimitiveCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_DrawPrimitive(This, PrimitiveType, StartVertex, PrimitiveCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1496,7 +1496,7 @@ LockDevice9_DrawIndexedPrimitive( struct NineDevice9 *This, UINT primCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_DrawIndexedPrimitive(This, PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1510,7 +1510,7 @@ LockDevice9_DrawPrimitiveUP( struct NineDevice9 *This, UINT VertexStreamZeroStride ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_DrawPrimitiveUP(This, PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride); pipe_mutex_unlock(d3dlock_global); return r; @@ -1528,7 +1528,7 @@ LockDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This, UINT VertexStreamZeroStride ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_DrawIndexedPrimitiveUP(This, PrimitiveType, MinVertexIndex, NumVertices, PrimitiveCount, pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride); pipe_mutex_unlock(d3dlock_global); return r; @@ -1544,7 +1544,7 @@ LockDevice9_ProcessVertices( struct NineDevice9 *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_ProcessVertices(This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -1556,7 +1556,7 @@ LockDevice9_CreateVertexDeclaration( struct NineDevice9 *This, IDirect3DVertexDeclaration9 **ppDecl ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateVertexDeclaration(This, pVertexElements, ppDecl); pipe_mutex_unlock(d3dlock_global); return r; @@ -1567,7 +1567,7 @@ LockDevice9_SetVertexDeclaration( struct NineDevice9 *This, IDirect3DVertexDeclaration9 *pDecl ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetVertexDeclaration(This, pDecl); pipe_mutex_unlock(d3dlock_global); return r; @@ -1578,7 +1578,7 @@ LockDevice9_GetVertexDeclaration( struct NineDevice9 *This, IDirect3DVertexDeclaration9 **ppDecl ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetVertexDeclaration(This, ppDecl); pipe_mutex_unlock(d3dlock_global); return r; @@ -1589,7 +1589,7 @@ LockDevice9_SetFVF( struct NineDevice9 *This, DWORD FVF ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetFVF(This, FVF); pipe_mutex_unlock(d3dlock_global); return r; @@ -1600,7 +1600,7 @@ LockDevice9_GetFVF( struct NineDevice9 *This, DWORD *pFVF ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetFVF(This, pFVF); pipe_mutex_unlock(d3dlock_global); return r; @@ -1612,7 +1612,7 @@ LockDevice9_CreateVertexShader( struct NineDevice9 *This, IDirect3DVertexShader9 **ppShader ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateVertexShader(This, pFunction, ppShader); pipe_mutex_unlock(d3dlock_global); return r; @@ -1623,7 +1623,7 @@ LockDevice9_SetVertexShader( struct NineDevice9 *This, IDirect3DVertexShader9 *pShader ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetVertexShader(This, pShader); pipe_mutex_unlock(d3dlock_global); return r; @@ -1634,7 +1634,7 @@ LockDevice9_GetVertexShader( struct NineDevice9 *This, IDirect3DVertexShader9 **ppShader ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetVertexShader(This, ppShader); pipe_mutex_unlock(d3dlock_global); return r; @@ -1647,7 +1647,7 @@ LockDevice9_SetVertexShaderConstantF( struct NineDevice9 *This, UINT Vector4fCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetVertexShaderConstantF(This, StartRegister, pConstantData, Vector4fCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1660,7 +1660,7 @@ LockDevice9_GetVertexShaderConstantF( struct NineDevice9 *This, UINT Vector4fCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetVertexShaderConstantF(This, StartRegister, pConstantData, Vector4fCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1673,7 +1673,7 @@ LockDevice9_SetVertexShaderConstantI( struct NineDevice9 *This, UINT Vector4iCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetVertexShaderConstantI(This, StartRegister, pConstantData, Vector4iCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1686,7 +1686,7 @@ LockDevice9_GetVertexShaderConstantI( struct NineDevice9 *This, UINT Vector4iCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetVertexShaderConstantI(This, StartRegister, pConstantData, Vector4iCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1699,7 +1699,7 @@ LockDevice9_SetVertexShaderConstantB( struct NineDevice9 *This, UINT BoolCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetVertexShaderConstantB(This, StartRegister, pConstantData, BoolCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1712,7 +1712,7 @@ LockDevice9_GetVertexShaderConstantB( struct NineDevice9 *This, UINT BoolCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetVertexShaderConstantB(This, StartRegister, pConstantData, BoolCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1726,7 +1726,7 @@ LockDevice9_SetStreamSource( struct NineDevice9 *This, UINT Stride ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetStreamSource(This, StreamNumber, pStreamData, OffsetInBytes, Stride); pipe_mutex_unlock(d3dlock_global); return r; @@ -1740,7 +1740,7 @@ LockDevice9_GetStreamSource( struct NineDevice9 *This, UINT *pStride ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetStreamSource(This, StreamNumber, ppStreamData, pOffsetInBytes, pStride); pipe_mutex_unlock(d3dlock_global); return r; @@ -1752,7 +1752,7 @@ LockDevice9_SetStreamSourceFreq( struct NineDevice9 *This, UINT Setting ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetStreamSourceFreq(This, StreamNumber, Setting); pipe_mutex_unlock(d3dlock_global); return r; @@ -1764,7 +1764,7 @@ LockDevice9_GetStreamSourceFreq( struct NineDevice9 *This, UINT *pSetting ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetStreamSourceFreq(This, StreamNumber, pSetting); pipe_mutex_unlock(d3dlock_global); return r; @@ -1775,7 +1775,7 @@ LockDevice9_SetIndices( struct NineDevice9 *This, IDirect3DIndexBuffer9 *pIndexData ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetIndices(This, pIndexData); pipe_mutex_unlock(d3dlock_global); return r; @@ -1786,7 +1786,7 @@ LockDevice9_GetIndices( struct NineDevice9 *This, IDirect3DIndexBuffer9 **ppIndexData ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetIndices(This, ppIndexData); pipe_mutex_unlock(d3dlock_global); return r; @@ -1798,7 +1798,7 @@ LockDevice9_CreatePixelShader( struct NineDevice9 *This, IDirect3DPixelShader9 **ppShader ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreatePixelShader(This, pFunction, ppShader); pipe_mutex_unlock(d3dlock_global); return r; @@ -1809,7 +1809,7 @@ LockDevice9_SetPixelShader( struct NineDevice9 *This, IDirect3DPixelShader9 *pShader ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetPixelShader(This, pShader); pipe_mutex_unlock(d3dlock_global); return r; @@ -1820,7 +1820,7 @@ LockDevice9_GetPixelShader( struct NineDevice9 *This, IDirect3DPixelShader9 **ppShader ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetPixelShader(This, ppShader); pipe_mutex_unlock(d3dlock_global); return r; @@ -1833,7 +1833,7 @@ LockDevice9_SetPixelShaderConstantF( struct NineDevice9 *This, UINT Vector4fCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetPixelShaderConstantF(This, StartRegister, pConstantData, Vector4fCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1846,7 +1846,7 @@ LockDevice9_GetPixelShaderConstantF( struct NineDevice9 *This, UINT Vector4fCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetPixelShaderConstantF(This, StartRegister, pConstantData, Vector4fCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1859,7 +1859,7 @@ LockDevice9_SetPixelShaderConstantI( struct NineDevice9 *This, UINT Vector4iCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetPixelShaderConstantI(This, StartRegister, pConstantData, Vector4iCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1872,7 +1872,7 @@ LockDevice9_GetPixelShaderConstantI( struct NineDevice9 *This, UINT Vector4iCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetPixelShaderConstantI(This, StartRegister, pConstantData, Vector4iCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1885,7 +1885,7 @@ LockDevice9_SetPixelShaderConstantB( struct NineDevice9 *This, UINT BoolCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_SetPixelShaderConstantB(This, StartRegister, pConstantData, BoolCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1898,7 +1898,7 @@ LockDevice9_GetPixelShaderConstantB( struct NineDevice9 *This, UINT BoolCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_GetPixelShaderConstantB(This, StartRegister, pConstantData, BoolCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -1911,7 +1911,7 @@ LockDevice9_DrawRectPatch( struct NineDevice9 *This, const D3DRECTPATCH_INFO *pRectPatchInfo ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_DrawRectPatch(This, Handle, pNumSegs, pRectPatchInfo); pipe_mutex_unlock(d3dlock_global); return r; @@ -1924,7 +1924,7 @@ LockDevice9_DrawTriPatch( struct NineDevice9 *This, const D3DTRIPATCH_INFO *pTriPatchInfo ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_DrawTriPatch(This, Handle, pNumSegs, pTriPatchInfo); pipe_mutex_unlock(d3dlock_global); return r; @@ -1935,7 +1935,7 @@ LockDevice9_DeletePatch( struct NineDevice9 *This, UINT Handle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_DeletePatch(This, Handle); pipe_mutex_unlock(d3dlock_global); return r; @@ -1947,7 +1947,7 @@ LockDevice9_CreateQuery( struct NineDevice9 *This, IDirect3DQuery9 **ppQuery ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9_CreateQuery(This, Type, ppQuery); pipe_mutex_unlock(d3dlock_global); return r; @@ -2083,7 +2083,7 @@ LockDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This, float *columns ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_SetConvolutionMonoKernel(This, width, height, rows, columns); pipe_mutex_unlock(d3dlock_global); return r; @@ -2101,7 +2101,7 @@ LockDevice9Ex_ComposeRects( struct NineDevice9Ex *This, int Yoffset ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_ComposeRects(This, pSrc, pDst, pSrcRectDescs, NumRects, pDstRectDescs, Operation, Xoffset, Yoffset); pipe_mutex_unlock(d3dlock_global); return r; @@ -2116,7 +2116,7 @@ LockDevice9Ex_PresentEx( struct NineDevice9Ex *This, DWORD dwFlags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_PresentEx(This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags); pipe_mutex_unlock(d3dlock_global); return r; @@ -2127,7 +2127,7 @@ LockDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This, INT *pPriority ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_GetGPUThreadPriority(This, pPriority); pipe_mutex_unlock(d3dlock_global); return r; @@ -2138,7 +2138,7 @@ LockDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This, INT Priority ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_SetGPUThreadPriority(This, Priority); pipe_mutex_unlock(d3dlock_global); return r; @@ -2149,7 +2149,7 @@ LockDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This, UINT iSwapChain ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_WaitForVBlank(This, iSwapChain); pipe_mutex_unlock(d3dlock_global); return r; @@ -2161,7 +2161,7 @@ LockDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This, UINT32 NumResources ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_CheckResourceResidency(This, pResourceArray, NumResources); pipe_mutex_unlock(d3dlock_global); return r; @@ -2172,7 +2172,7 @@ LockDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This, UINT MaxLatency ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_SetMaximumFrameLatency(This, MaxLatency); pipe_mutex_unlock(d3dlock_global); return r; @@ -2183,7 +2183,7 @@ LockDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This, UINT *pMaxLatency ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_GetMaximumFrameLatency(This, pMaxLatency); pipe_mutex_unlock(d3dlock_global); return r; @@ -2194,7 +2194,7 @@ LockDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This, HWND hDestinationWindow ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_CheckDeviceState(This, hDestinationWindow); pipe_mutex_unlock(d3dlock_global); return r; @@ -2213,7 +2213,7 @@ LockDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This, DWORD Usage ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_CreateRenderTargetEx(This, Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle, Usage); pipe_mutex_unlock(d3dlock_global); return r; @@ -2230,7 +2230,7 @@ LockDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This, DWORD Usage ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_CreateOffscreenPlainSurfaceEx(This, Width, Height, Format, Pool, ppSurface, pSharedHandle, Usage); pipe_mutex_unlock(d3dlock_global); return r; @@ -2249,7 +2249,7 @@ LockDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This, DWORD Usage ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_CreateDepthStencilSurfaceEx(This, Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle, Usage); pipe_mutex_unlock(d3dlock_global); return r; @@ -2261,7 +2261,7 @@ LockDevice9Ex_ResetEx( struct NineDevice9Ex *This, D3DDISPLAYMODEEX *pFullscreenDisplayMode ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_ResetEx(This, pPresentationParameters, pFullscreenDisplayMode); pipe_mutex_unlock(d3dlock_global); return r; @@ -2274,7 +2274,7 @@ LockDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This, D3DDISPLAYROTATION *pRotation ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Ex_GetDisplayModeEx(This, iSwapChain, pMode, pRotation); pipe_mutex_unlock(d3dlock_global); return r; @@ -2424,7 +2424,7 @@ LockDevice9Video_GetContentProtectionCaps( struct NineDevice9Video *This, D3DCONTENTPROTECTIONCAPS *pCaps ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Video_GetContentProtectionCaps(This, pCryptoType, pDecodeProfile, pCaps); pipe_mutex_unlock(d3dlock_global); return r; @@ -2437,7 +2437,7 @@ LockDevice9Video_CreateAuthenticatedChannel( struct NineDevice9Video *This, HANDLE *pChannelHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Video_CreateAuthenticatedChannel(This, ChannelType, ppAuthenticatedChannel, pChannelHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -2451,7 +2451,7 @@ LockDevice9Video_CreateCryptoSession( struct NineDevice9Video *This, HANDLE *pCryptoHandle ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineDevice9Video_CreateCryptoSession(This, pCryptoType, pDecodeProfile, ppCryptoSession, pCryptoHandle); pipe_mutex_unlock(d3dlock_global); return r; @@ -2474,7 +2474,7 @@ LockIndexBuffer9_Lock( struct NineIndexBuffer9 *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineIndexBuffer9_Lock(This, OffsetToLock, SizeToLock, ppbData, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -2484,7 +2484,7 @@ static HRESULT NINE_WINAPI LockIndexBuffer9_Unlock( struct NineIndexBuffer9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineIndexBuffer9_Unlock(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -2496,7 +2496,7 @@ LockIndexBuffer9_GetDesc( struct NineIndexBuffer9 *This, D3DINDEXBUFFER_DESC *pDesc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineIndexBuffer9_GetDesc(This, pDesc); pipe_mutex_unlock(d3dlock_global); return r; @@ -2526,7 +2526,7 @@ LockPixelShader9_GetDevice( struct NinePixelShader9 *This, IDirect3DDevice9 **ppDevice ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetDevice(NineUnknown(This), ppDevice); pipe_mutex_unlock(d3dlock_global); return r; @@ -2539,7 +2539,7 @@ LockPixelShader9_GetFunction( struct NinePixelShader9 *This, UINT *pSizeOfData ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NinePixelShader9_GetFunction(This, pData, pSizeOfData); pipe_mutex_unlock(d3dlock_global); return r; @@ -2559,7 +2559,7 @@ LockQuery9_GetDevice( struct NineQuery9 *This, IDirect3DDevice9 **ppDevice ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetDevice(NineUnknown(This), ppDevice); pipe_mutex_unlock(d3dlock_global); return r; @@ -2571,7 +2571,7 @@ static D3DQUERYTYPE NINE_WINAPI LockQuery9_GetType( struct NineQuery9 *This ) { D3DQUERYTYPE r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineQuery9_GetType(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -2583,7 +2583,7 @@ static DWORD NINE_WINAPI LockQuery9_GetDataSize( struct NineQuery9 *This ) { DWORD r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineQuery9_GetDataSize(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -2595,7 +2595,7 @@ LockQuery9_Issue( struct NineQuery9 *This, DWORD dwIssueFlags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineQuery9_Issue(This, dwIssueFlags); pipe_mutex_unlock(d3dlock_global); return r; @@ -2608,7 +2608,7 @@ LockQuery9_GetData( struct NineQuery9 *This, DWORD dwGetDataFlags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineQuery9_GetData(This, pData, dwSize, dwGetDataFlags); pipe_mutex_unlock(d3dlock_global); return r; @@ -2631,7 +2631,7 @@ LockStateBlock9_GetDevice( struct NineStateBlock9 *This, IDirect3DDevice9 **ppDevice ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetDevice(NineUnknown(This), ppDevice); pipe_mutex_unlock(d3dlock_global); return r; @@ -2642,7 +2642,7 @@ static HRESULT NINE_WINAPI LockStateBlock9_Capture( struct NineStateBlock9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineStateBlock9_Capture(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -2652,7 +2652,7 @@ static HRESULT NINE_WINAPI LockStateBlock9_Apply( struct NineStateBlock9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineStateBlock9_Apply(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -2673,7 +2673,7 @@ LockSurface9_GetContainer( struct NineSurface9 *This, void **ppContainer ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSurface9_GetContainer(This, riid, ppContainer); pipe_mutex_unlock(d3dlock_global); return r; @@ -2685,7 +2685,7 @@ LockSurface9_GetDesc( struct NineSurface9 *This, D3DSURFACE_DESC *pDesc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSurface9_GetDesc(This, pDesc); pipe_mutex_unlock(d3dlock_global); return r; @@ -2699,7 +2699,7 @@ LockSurface9_LockRect( struct NineSurface9 *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSurface9_LockRect(This, pLockedRect, pRect, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -2709,7 +2709,7 @@ static HRESULT NINE_WINAPI LockSurface9_UnlockRect( struct NineSurface9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSurface9_UnlockRect(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -2720,7 +2720,7 @@ LockSurface9_GetDC( struct NineSurface9 *This, HDC *phdc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSurface9_GetDC(This, phdc); pipe_mutex_unlock(d3dlock_global); return r; @@ -2731,7 +2731,7 @@ LockSurface9_ReleaseDC( struct NineSurface9 *This, HDC hdc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSurface9_ReleaseDC(This, hdc); pipe_mutex_unlock(d3dlock_global); return r; @@ -2766,7 +2766,7 @@ LockSwapChain9_Present( struct NineSwapChain9 *This, DWORD dwFlags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9_Present(This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags); pipe_mutex_unlock(d3dlock_global); return r; @@ -2777,7 +2777,7 @@ LockSwapChain9_GetFrontBufferData( struct NineSwapChain9 *This, IDirect3DSurface9 *pDestSurface ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9_GetFrontBufferData(This, pDestSurface); pipe_mutex_unlock(d3dlock_global); return r; @@ -2790,7 +2790,7 @@ LockSwapChain9_GetBackBuffer( struct NineSwapChain9 *This, IDirect3DSurface9 **ppBackBuffer ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9_GetBackBuffer(This, iBackBuffer, Type, ppBackBuffer); pipe_mutex_unlock(d3dlock_global); return r; @@ -2801,7 +2801,7 @@ LockSwapChain9_GetRasterStatus( struct NineSwapChain9 *This, D3DRASTER_STATUS *pRasterStatus ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9_GetRasterStatus(This, pRasterStatus); pipe_mutex_unlock(d3dlock_global); return r; @@ -2812,7 +2812,7 @@ LockSwapChain9_GetDisplayMode( struct NineSwapChain9 *This, D3DDISPLAYMODE *pMode ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9_GetDisplayMode(This, pMode); pipe_mutex_unlock(d3dlock_global); return r; @@ -2824,7 +2824,7 @@ LockSwapChain9_GetDevice( struct NineSwapChain9 *This, IDirect3DDevice9 **ppDevice ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetDevice(NineUnknown(This), ppDevice); pipe_mutex_unlock(d3dlock_global); return r; @@ -2836,7 +2836,7 @@ LockSwapChain9_GetPresentParameters( struct NineSwapChain9 *This, D3DPRESENT_PARAMETERS *pPresentationParameters ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9_GetPresentParameters(This, pPresentationParameters); pipe_mutex_unlock(d3dlock_global); return r; @@ -2860,7 +2860,7 @@ LockSwapChain9Ex_GetLastPresentCount( struct NineSwapChain9Ex *This, UINT *pLastPresentCount ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9Ex_GetLastPresentCount(This, pLastPresentCount); pipe_mutex_unlock(d3dlock_global); return r; @@ -2871,7 +2871,7 @@ LockSwapChain9Ex_GetPresentStats( struct NineSwapChain9Ex *This, D3DPRESENTSTATS *pPresentationStatistics ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9Ex_GetPresentStats(This, pPresentationStatistics); pipe_mutex_unlock(d3dlock_global); return r; @@ -2883,7 +2883,7 @@ LockSwapChain9Ex_GetDisplayModeEx( struct NineSwapChain9Ex *This, D3DDISPLAYROTATION *pRotation ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineSwapChain9Ex_GetDisplayModeEx(This, pMode, pRotation); pipe_mutex_unlock(d3dlock_global); return r; @@ -2912,7 +2912,7 @@ LockTexture9_GetLevelDesc( struct NineTexture9 *This, D3DSURFACE_DESC *pDesc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineTexture9_GetLevelDesc(This, Level, pDesc); pipe_mutex_unlock(d3dlock_global); return r; @@ -2926,7 +2926,7 @@ LockTexture9_GetSurfaceLevel( struct NineTexture9 *This, IDirect3DSurface9 **ppSurfaceLevel ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineTexture9_GetSurfaceLevel(This, Level, ppSurfaceLevel); pipe_mutex_unlock(d3dlock_global); return r; @@ -2941,7 +2941,7 @@ LockTexture9_LockRect( struct NineTexture9 *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineTexture9_LockRect(This, Level, pLockedRect, pRect, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -2952,7 +2952,7 @@ LockTexture9_UnlockRect( struct NineTexture9 *This, UINT Level ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineTexture9_UnlockRect(This, Level); pipe_mutex_unlock(d3dlock_global); return r; @@ -2963,7 +2963,7 @@ LockTexture9_AddDirtyRect( struct NineTexture9 *This, const RECT *pDirtyRect ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineTexture9_AddDirtyRect(This, pDirtyRect); pipe_mutex_unlock(d3dlock_global); return r; @@ -3002,7 +3002,7 @@ LockVertexBuffer9_Lock( struct NineVertexBuffer9 *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVertexBuffer9_Lock(This, OffsetToLock, SizeToLock, ppbData, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -3012,7 +3012,7 @@ static HRESULT NINE_WINAPI LockVertexBuffer9_Unlock( struct NineVertexBuffer9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVertexBuffer9_Unlock(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -3024,7 +3024,7 @@ LockVertexBuffer9_GetDesc( struct NineVertexBuffer9 *This, D3DVERTEXBUFFER_DESC *pDesc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVertexBuffer9_GetDesc(This, pDesc); pipe_mutex_unlock(d3dlock_global); return r; @@ -3054,7 +3054,7 @@ LockVertexDeclaration9_GetDevice( struct NineVertexDeclaration9 *This, IDirect3DDevice9 **ppDevice ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetDevice(NineUnknown(This), ppDevice); pipe_mutex_unlock(d3dlock_global); return r; @@ -3067,7 +3067,7 @@ LockVertexDeclaration9_GetDeclaration( struct NineVertexDeclaration9 *This, UINT *pNumElements ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVertexDeclaration9_GetDeclaration(This, pElement, pNumElements); pipe_mutex_unlock(d3dlock_global); return r; @@ -3087,7 +3087,7 @@ LockVertexShader9_GetDevice( struct NineVertexShader9 *This, IDirect3DDevice9 **ppDevice ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetDevice(NineUnknown(This), ppDevice); pipe_mutex_unlock(d3dlock_global); return r; @@ -3100,7 +3100,7 @@ LockVertexShader9_GetFunction( struct NineVertexShader9 *This, UINT *pSizeOfData ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVertexShader9_GetFunction(This, pData, pSizeOfData); pipe_mutex_unlock(d3dlock_global); return r; @@ -3120,7 +3120,7 @@ LockVolume9_GetDevice( struct NineVolume9 *This, IDirect3DDevice9 **ppDevice ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineUnknown_GetDevice(NineUnknown(This), ppDevice); pipe_mutex_unlock(d3dlock_global); return r; @@ -3133,7 +3133,7 @@ LockVolume9_GetContainer( struct NineVolume9 *This, void **ppContainer ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolume9_GetContainer(This, riid, ppContainer); pipe_mutex_unlock(d3dlock_global); return r; @@ -3145,7 +3145,7 @@ LockVolume9_GetDesc( struct NineVolume9 *This, D3DVOLUME_DESC *pDesc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolume9_GetDesc(This, pDesc); pipe_mutex_unlock(d3dlock_global); return r; @@ -3159,7 +3159,7 @@ LockVolume9_LockBox( struct NineVolume9 *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolume9_LockBox(This, pLockedVolume, pBox, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -3169,7 +3169,7 @@ static HRESULT NINE_WINAPI LockVolume9_UnlockBox( struct NineVolume9 *This ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolume9_UnlockBox(This); pipe_mutex_unlock(d3dlock_global); return r; @@ -3196,7 +3196,7 @@ LockVolumeTexture9_GetLevelDesc( struct NineVolumeTexture9 *This, D3DVOLUME_DESC *pDesc ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolumeTexture9_GetLevelDesc(This, Level, pDesc); pipe_mutex_unlock(d3dlock_global); return r; @@ -3210,7 +3210,7 @@ LockVolumeTexture9_GetVolumeLevel( struct NineVolumeTexture9 *This, IDirect3DVolume9 **ppVolumeLevel ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolumeTexture9_GetVolumeLevel(This, Level, ppVolumeLevel); pipe_mutex_unlock(d3dlock_global); return r; @@ -3225,7 +3225,7 @@ LockVolumeTexture9_LockBox( struct NineVolumeTexture9 *This, DWORD Flags ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolumeTexture9_LockBox(This, Level, pLockedVolume, pBox, Flags); pipe_mutex_unlock(d3dlock_global); return r; @@ -3236,7 +3236,7 @@ LockVolumeTexture9_UnlockBox( struct NineVolumeTexture9 *This, UINT Level ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolumeTexture9_UnlockBox(This, Level); pipe_mutex_unlock(d3dlock_global); return r; @@ -3247,7 +3247,7 @@ LockVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This, const D3DBOX *pDirtyBox ) { HRESULT r; - pipe_mutex_lock(d3dlock_global); + mtx_lock(&d3dlock_global); r = NineVolumeTexture9_AddDirtyBox(This, pDirtyBox); pipe_mutex_unlock(d3dlock_global); return r; diff --git a/src/gallium/state_trackers/nine/nine_queue.c b/src/gallium/state_trackers/nine/nine_queue.c index 07dfee58188..39de0ca9650 100644 --- a/src/gallium/state_trackers/nine/nine_queue.c +++ b/src/gallium/state_trackers/nine/nine_queue.c @@ -85,7 +85,7 @@ nine_queue_wait_flush(struct nine_queue_pool* ctx) struct nine_cmdbuf *cmdbuf = &ctx->pool[ctx->tail]; /* wait for cmdbuf full */ - pipe_mutex_lock(ctx->mutex_push); + mtx_lock(&ctx->mutex_push); while (!cmdbuf->full) { DBG("waiting for full cmdbuf\n"); @@ -111,7 +111,7 @@ nine_queue_get(struct nine_queue_pool* ctx) if (ctx->cur_instr == cmdbuf->num_instr) { /* signal waiting producer */ - pipe_mutex_lock(ctx->mutex_pop); + mtx_lock(&ctx->mutex_pop); DBG("freeing cmdbuf=%p\n", cmdbuf); cmdbuf->full = 0; cnd_signal(&ctx->event_pop); @@ -148,7 +148,7 @@ nine_queue_flush(struct nine_queue_pool* ctx) return; /* signal waiting worker */ - pipe_mutex_lock(ctx->mutex_push); + mtx_lock(&ctx->mutex_push); cmdbuf->full = 1; cnd_signal(&ctx->event_push); pipe_mutex_unlock(ctx->mutex_push); @@ -158,7 +158,7 @@ nine_queue_flush(struct nine_queue_pool* ctx) cmdbuf = &ctx->pool[ctx->head]; /* wait for queue empty */ - pipe_mutex_lock(ctx->mutex_pop); + mtx_lock(&ctx->mutex_pop); while (cmdbuf->full) { DBG("waiting for empty cmdbuf\n"); diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 978fa013c49..2f654141d33 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -79,7 +79,7 @@ struct csmt_context { static void nine_csmt_wait_processed(struct csmt_context *ctx) { - pipe_mutex_lock(ctx->mutex_processed); + mtx_lock(&ctx->mutex_processed); while (!p_atomic_read(&ctx->processed)) { cnd_wait(&ctx->event_processed, &ctx->mutex_processed); } @@ -98,7 +98,7 @@ PIPE_THREAD_ROUTINE(nine_csmt_worker, arg) while (1) { nine_queue_wait_flush(ctx->pool); - pipe_mutex_lock(ctx->thread_running); + mtx_lock(&ctx->thread_running); /* Get instruction. NULL on empty cmdbuf. */ while (!p_atomic_read(&ctx->terminate) && @@ -106,7 +106,7 @@ PIPE_THREAD_ROUTINE(nine_csmt_worker, arg) /* decode */ if (instr->func(ctx->device, instr)) { - pipe_mutex_lock(ctx->mutex_processed); + mtx_lock(&ctx->mutex_processed); p_atomic_set(&ctx->processed, TRUE); cnd_signal(&ctx->event_processed); pipe_mutex_unlock(ctx->mutex_processed); @@ -114,15 +114,15 @@ PIPE_THREAD_ROUTINE(nine_csmt_worker, arg) if (p_atomic_read(&ctx->toPause)) { pipe_mutex_unlock(ctx->thread_running); /* will wait here the thread can be resumed */ - pipe_mutex_lock(ctx->thread_resume); - pipe_mutex_lock(ctx->thread_running); + mtx_lock(&ctx->thread_resume); + mtx_lock(&ctx->thread_running); pipe_mutex_unlock(ctx->thread_resume); } } pipe_mutex_unlock(ctx->thread_running); if (p_atomic_read(&ctx->terminate)) { - pipe_mutex_lock(ctx->mutex_processed); + mtx_lock(&ctx->mutex_processed); p_atomic_set(&ctx->processed, TRUE); cnd_signal(&ctx->event_processed); pipe_mutex_unlock(ctx->mutex_processed); @@ -252,11 +252,11 @@ nine_csmt_pause( struct NineDevice9 *device ) if (nine_queue_no_flushed_work(ctx->pool)) return; - pipe_mutex_lock(ctx->thread_resume); + mtx_lock(&ctx->thread_resume); p_atomic_set(&ctx->toPause, TRUE); /* Wait the thread is paused */ - pipe_mutex_lock(ctx->thread_running); + mtx_lock(&ctx->thread_running); ctx->hasPaused = TRUE; p_atomic_set(&ctx->toPause, FALSE); } diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c index c12eb207ea8..0274caa165f 100644 --- a/src/gallium/state_trackers/omx/entrypoint.c +++ b/src/gallium/state_trackers/omx/entrypoint.c @@ -75,7 +75,7 @@ int omx_component_library_Setup(stLoaderComponentType **stComponents) struct vl_screen *omx_get_screen(void) { static bool first_time = true; - pipe_mutex_lock(omx_lock); + mtx_lock(&omx_lock); if (!omx_screen) { if (first_time) { @@ -117,7 +117,7 @@ error: void omx_put_screen(void) { - pipe_mutex_lock(omx_lock); + mtx_lock(&omx_lock); if ((--omx_usecount) == 0) { omx_screen->destroy(omx_screen); omx_screen = NULL; diff --git a/src/gallium/state_trackers/va/buffer.c b/src/gallium/state_trackers/va/buffer.c index 93f012c830f..b9bf6f0add1 100644 --- a/src/gallium/state_trackers/va/buffer.c +++ b/src/gallium/state_trackers/va/buffer.c @@ -64,7 +64,7 @@ vlVaCreateBuffer(VADriverContextP ctx, VAContextID context, VABufferType type, memcpy(buf->data, data, size * num_elements); drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); *buf_id = handle_table_add(drv->htab, buf); pipe_mutex_unlock(drv->mutex); @@ -82,7 +82,7 @@ vlVaBufferSetNumElements(VADriverContextP ctx, VABufferID buf_id, return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); buf = handle_table_get(drv->htab, buf_id); pipe_mutex_unlock(drv->mutex); if (!buf) @@ -117,7 +117,7 @@ vlVaMapBuffer(VADriverContextP ctx, VABufferID buf_id, void **pbuff) if (!pbuff) return VA_STATUS_ERROR_INVALID_PARAMETER; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); buf = handle_table_get(drv->htab, buf_id); if (!buf || buf->export_refcount > 0) { pipe_mutex_unlock(drv->mutex); @@ -160,7 +160,7 @@ vlVaUnmapBuffer(VADriverContextP ctx, VABufferID buf_id) if (!drv) return VA_STATUS_ERROR_INVALID_CONTEXT; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); buf = handle_table_get(drv->htab, buf_id); if (!buf || buf->export_refcount > 0) { pipe_mutex_unlock(drv->mutex); @@ -191,7 +191,7 @@ vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buf_id) return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); buf = handle_table_get(drv->htab, buf_id); if (!buf) { pipe_mutex_unlock(drv->mutex); @@ -220,7 +220,7 @@ vlVaBufferInfo(VADriverContextP ctx, VABufferID buf_id, VABufferType *type, return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); buf = handle_table_get(drv->htab, buf_id); pipe_mutex_unlock(drv->mutex); if (!buf) @@ -254,7 +254,7 @@ vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id, drv = VL_VA_DRIVER(ctx); screen = VL_VA_PSCREEN(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); buf = handle_table_get(VL_VA_DRIVER(ctx)->htab, buf_id); pipe_mutex_unlock(drv->mutex); @@ -295,7 +295,7 @@ vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id, case VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME: { struct winsys_handle whandle; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); drv->pipe->flush(drv->pipe, NULL, 0); memset(&whandle, 0, sizeof(whandle)); @@ -339,7 +339,7 @@ vlVaReleaseBufferHandle(VADriverContextP ctx, VABufferID buf_id) return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); buf = handle_table_get(drv->htab, buf_id); pipe_mutex_unlock(drv->mutex); diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c index da52a58c5db..3d4e24bd814 100644 --- a/src/gallium/state_trackers/va/config.c +++ b/src/gallium/state_trackers/va/config.c @@ -200,7 +200,7 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin if (!config->rt_format) config->rt_format = VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_RGB32; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); *config_id = handle_table_add(drv->htab, config); pipe_mutex_unlock(drv->mutex); return VA_STATUS_SUCCESS; @@ -265,7 +265,7 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin if (!config->rt_format) config->rt_format = VA_RT_FORMAT_YUV420; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); *config_id = handle_table_add(drv->htab, config); pipe_mutex_unlock(drv->mutex); @@ -286,7 +286,7 @@ vlVaDestroyConfig(VADriverContextP ctx, VAConfigID config_id) if (!drv) return VA_STATUS_ERROR_INVALID_CONTEXT; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); config = handle_table_get(drv->htab, config_id); if (!config) @@ -314,7 +314,7 @@ vlVaQueryConfigAttributes(VADriverContextP ctx, VAConfigID config_id, VAProfile if (!drv) return VA_STATUS_ERROR_INVALID_CONTEXT; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); config = handle_table_get(drv->htab, config_id); pipe_mutex_unlock(drv->mutex); diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c index 36e314fa2b7..a3452473484 100644 --- a/src/gallium/state_trackers/va/context.c +++ b/src/gallium/state_trackers/va/context.c @@ -214,7 +214,7 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width, return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); config = handle_table_get(drv->htab, config_id); pipe_mutex_unlock(drv->mutex); @@ -287,7 +287,7 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width, if (config->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) context->desc.h264enc.rate_ctrl.rate_ctrl_method = config->rc; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); *context_id = handle_table_add(drv->htab, context); pipe_mutex_unlock(drv->mutex); @@ -304,7 +304,7 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID context_id) return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); context = handle_table_get(drv->htab, context_id); if (!context) { pipe_mutex_unlock(drv->mutex); diff --git a/src/gallium/state_trackers/va/image.c b/src/gallium/state_trackers/va/image.c index 47d31de2dbe..2c7afe2a443 100644 --- a/src/gallium/state_trackers/va/image.c +++ b/src/gallium/state_trackers/va/image.c @@ -114,7 +114,7 @@ vlVaCreateImage(VADriverContextP ctx, VAImageFormat *format, int width, int heig img = CALLOC(1, sizeof(VAImage)); if (!img) return VA_STATUS_ERROR_ALLOCATION_FAILED; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); img->image_id = handle_table_add(drv->htab, img); pipe_mutex_unlock(drv->mutex); @@ -258,7 +258,7 @@ vlVaDeriveImage(VADriverContextP ctx, VASurfaceID surface, VAImage *image) return VA_STATUS_ERROR_ALLOCATION_FAILED; } - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); img->image_id = handle_table_add(drv->htab, img); img_buf->type = VAImageBufferType; @@ -286,7 +286,7 @@ vlVaDestroyImage(VADriverContextP ctx, VAImageID image) return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); vaimage = handle_table_get(drv->htab, image); if (!vaimage) { pipe_mutex_unlock(drv->mutex); @@ -328,7 +328,7 @@ vlVaGetImage(VADriverContextP ctx, VASurfaceID surface, int x, int y, drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); surf = handle_table_get(drv->htab, surface); if (!surf || !surf->buffer) { pipe_mutex_unlock(drv->mutex); @@ -438,7 +438,7 @@ vlVaPutImage(VADriverContextP ctx, VASurfaceID surface, VAImageID image, return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); surf = handle_table_get(drv->htab, surface); if (!surf || !surf->buffer) { diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index ef8b57a47f5..6a1adb27378 100644 --- a/src/gallium/state_trackers/va/picture.c +++ b/src/gallium/state_trackers/va/picture.c @@ -50,7 +50,7 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende if (!drv) return VA_STATUS_ERROR_INVALID_CONTEXT; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); context = handle_table_get(drv->htab, context_id); if (!context) { pipe_mutex_unlock(drv->mutex); @@ -494,7 +494,7 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff if (!drv) return VA_STATUS_ERROR_INVALID_CONTEXT; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); context = handle_table_get(drv->htab, context_id); if (!context) { pipe_mutex_unlock(drv->mutex); @@ -569,7 +569,7 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id) if (!drv) return VA_STATUS_ERROR_INVALID_CONTEXT; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); context = handle_table_get(drv->htab, context_id); pipe_mutex_unlock(drv->mutex); if (!context) @@ -583,7 +583,7 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id) return VA_STATUS_SUCCESS; } - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); surf = handle_table_get(drv->htab, context->target_id); context->mpeg4.frame_num++; diff --git a/src/gallium/state_trackers/va/subpicture.c b/src/gallium/state_trackers/va/subpicture.c index f546e566242..0d907586fd3 100644 --- a/src/gallium/state_trackers/va/subpicture.c +++ b/src/gallium/state_trackers/va/subpicture.c @@ -73,7 +73,7 @@ vlVaCreateSubpicture(VADriverContextP ctx, VAImageID image, return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); img = handle_table_get(drv->htab, image); if (!img) { pipe_mutex_unlock(drv->mutex); @@ -103,7 +103,7 @@ vlVaDestroySubpicture(VADriverContextP ctx, VASubpictureID subpicture) return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); sub = handle_table_get(drv->htab, subpicture); if (!sub) { @@ -129,7 +129,7 @@ vlVaSubpictureImage(VADriverContextP ctx, VASubpictureID subpicture, VAImageID i return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); img = handle_table_get(drv->htab, image); if (!img) { @@ -186,7 +186,7 @@ vlVaAssociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture, if (!ctx) return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); sub = handle_table_get(drv->htab, subpicture); if (!sub) { @@ -256,7 +256,7 @@ vlVaDeassociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture, if (!ctx) return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); sub = handle_table_get(drv->htab, subpicture); if (!sub) { diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index b129e6c74f4..363ae66d0c5 100644 --- a/src/gallium/state_trackers/va/surface.c +++ b/src/gallium/state_trackers/va/surface.c @@ -70,7 +70,7 @@ vlVaDestroySurfaces(VADriverContextP ctx, VASurfaceID *surface_list, int num_sur return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); for (i = 0; i < num_surfaces; ++i) { vlVaSurface *surf = handle_table_get(drv->htab, surface_list[i]); if (!surf) { @@ -102,7 +102,7 @@ vlVaSyncSurface(VADriverContextP ctx, VASurfaceID render_target) if (!drv) return VA_STATUS_ERROR_INVALID_CONTEXT; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); surf = handle_table_get(drv->htab, render_target); if (!surf || !surf->buffer) { @@ -288,7 +288,7 @@ vlVaPutSurface(VADriverContextP ctx, VASurfaceID surface_id, void* draw, short s return VA_STATUS_ERROR_INVALID_CONTEXT; drv = VL_VA_DRIVER(ctx); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); surf = handle_table_get(drv->htab, surface_id); if (!surf) { pipe_mutex_unlock(drv->mutex); @@ -399,7 +399,7 @@ vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config_id, if (!drv) return VA_STATUS_ERROR_INVALID_CONTEXT; - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); config = handle_table_get(drv->htab, config_id); pipe_mutex_unlock(drv->mutex); @@ -686,7 +686,7 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format, memset(surfaces, VA_INVALID_ID, num_surfaces * sizeof(VASurfaceID)); - pipe_mutex_lock(drv->mutex); + mtx_lock(&drv->mutex); for (i = 0; i < num_surfaces; i++) { vlVaSurface *surf = CALLOC(1, sizeof(vlVaSurface)); if (!surf) diff --git a/src/gallium/state_trackers/vdpau/bitmap.c b/src/gallium/state_trackers/vdpau/bitmap.c index d9ec60d20ad..14f6c36c6cc 100644 --- a/src/gallium/state_trackers/vdpau/bitmap.c +++ b/src/gallium/state_trackers/vdpau/bitmap.c @@ -79,7 +79,7 @@ vlVdpBitmapSurfaceCreate(VdpDevice device, res_tmpl.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; res_tmpl.usage = frequently_accessed ? PIPE_USAGE_DYNAMIC : PIPE_USAGE_DEFAULT; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); if (!CheckSurfaceParams(pipe->screen, &res_tmpl)) { ret = VDP_STATUS_RESOURCES; @@ -106,7 +106,7 @@ vlVdpBitmapSurfaceCreate(VdpDevice device, *surface = vlAddDataHTAB(vlsurface); if (*surface == 0) { - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); ret = VDP_STATUS_ERROR; goto err_sampler; } @@ -134,7 +134,7 @@ vlVdpBitmapSurfaceDestroy(VdpBitmapSurface surface) if (!vlsurface) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); pipe_sampler_view_reference(&vlsurface->sampler_view, NULL); pipe_mutex_unlock(vlsurface->device->mutex); @@ -196,7 +196,7 @@ vlVdpBitmapSurfacePutBitsNative(VdpBitmapSurface surface, pipe = vlsurface->device->context; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); dst_box = RectToPipeBox(destination_rect, vlsurface->sampler_view->texture); pipe->texture_subdata(pipe, vlsurface->sampler_view->texture, 0, diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 387371b29ab..0f8b8ff606e 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -71,7 +71,7 @@ vlVdpDecoderCreate(VdpDevice device, pipe = dev->context; screen = dev->vscreen->pscreen; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); supported = screen->get_video_param ( @@ -163,7 +163,7 @@ vlVdpDecoderDestroy(VdpDecoder decoder) if (!vldecoder) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(vldecoder->mutex); + mtx_lock(&vldecoder->mutex); vldecoder->decoder->destroy(vldecoder->decoder); pipe_mutex_unlock(vldecoder->mutex); mtx_destroy(&vldecoder->mutex); @@ -614,7 +614,7 @@ vlVdpDecoderRender(VdpDecoder decoder, dec->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM) || !buffer_support[vlsurf->video_buffer->interlaced]) { - pipe_mutex_lock(vlsurf->device->mutex); + mtx_lock(&vlsurf->device->mutex); /* destroy the old one */ if (vlsurf->video_buffer) @@ -674,7 +674,7 @@ vlVdpDecoderRender(VdpDecoder decoder, if (ret != VDP_STATUS_OK) return ret; - pipe_mutex_lock(vldecoder->mutex); + mtx_lock(&vldecoder->mutex); dec->begin_frame(dec, vlsurf->video_buffer, &desc.base); dec->decode_bitstream(dec, vlsurf->video_buffer, &desc.base, bitstream_buffer_count, buffers, sizes); dec->end_frame(dec, vlsurf->video_buffer, &desc.base); diff --git a/src/gallium/state_trackers/vdpau/htab.c b/src/gallium/state_trackers/vdpau/htab.c index 277ea0cfc01..f938a19547e 100644 --- a/src/gallium/state_trackers/vdpau/htab.c +++ b/src/gallium/state_trackers/vdpau/htab.c @@ -38,7 +38,7 @@ boolean vlCreateHTAB(void) /* Make sure handle table handles match VDPAU handles. */ assert(sizeof(unsigned) <= sizeof(vlHandle)); - pipe_mutex_lock(htab_lock); + mtx_lock(&htab_lock); if (!htab) htab = handle_table_create(); ret = htab != NULL; @@ -48,7 +48,7 @@ boolean vlCreateHTAB(void) void vlDestroyHTAB(void) { - pipe_mutex_lock(htab_lock); + mtx_lock(&htab_lock); if (htab && !handle_table_get_first_handle(htab)) { handle_table_destroy(htab); htab = NULL; @@ -61,7 +61,7 @@ vlHandle vlAddDataHTAB(void *data) vlHandle handle = 0; assert(data); - pipe_mutex_lock(htab_lock); + mtx_lock(&htab_lock); if (htab) handle = handle_table_add(htab, data); pipe_mutex_unlock(htab_lock); @@ -73,7 +73,7 @@ void* vlGetDataHTAB(vlHandle handle) void *data = NULL; assert(handle); - pipe_mutex_lock(htab_lock); + mtx_lock(&htab_lock); if (htab) data = handle_table_get(htab, handle); pipe_mutex_unlock(htab_lock); @@ -82,7 +82,7 @@ void* vlGetDataHTAB(vlHandle handle) void vlRemoveDataHTAB(vlHandle handle) { - pipe_mutex_lock(htab_lock); + mtx_lock(&htab_lock); if (htab) handle_table_remove(htab, handle); pipe_mutex_unlock(htab_lock); diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index 37a6fcd91ce..a1c0377ec38 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -63,7 +63,7 @@ vlVdpVideoMixerCreate(VdpDevice device, DeviceReference(&vmixer->device, dev); - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); if (!vl_compositor_init_state(&vmixer->cstate, dev->context)) { ret = VDP_STATUS_ERROR; @@ -191,7 +191,7 @@ vlVdpVideoMixerDestroy(VdpVideoMixer mixer) if (!vmixer) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(vmixer->device->mutex); + mtx_lock(&vmixer->device->mutex); vlRemoveDataHTAB(mixer); @@ -290,7 +290,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, return VDP_STATUS_INVALID_HANDLE; } - pipe_mutex_lock(vmixer->device->mutex); + mtx_lock(&vmixer->device->mutex); vl_compositor_clear_layers(&vmixer->cstate); @@ -658,7 +658,7 @@ vlVdpVideoMixerSetFeatureEnables(VdpVideoMixer mixer, if (!vmixer) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(vmixer->device->mutex); + mtx_lock(&vmixer->device->mutex); for (i = 0; i < feature_count; ++i) { switch (features[i]) { /* they are valid, but we doesn't support them */ @@ -796,7 +796,7 @@ vlVdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, if (!vmixer) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(vmixer->device->mutex); + mtx_lock(&vmixer->device->mutex); for (i = 0; i < attribute_count; ++i) { switch (attributes[i]) { case VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR: @@ -955,7 +955,7 @@ vlVdpVideoMixerGetAttributeValues(VdpVideoMixer mixer, if (!vmixer) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(vmixer->device->mutex); + mtx_lock(&vmixer->device->mutex); for (i = 0; i < attribute_count; ++i) { switch (attributes[i]) { case VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR: diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index 650628014bd..5836395bacc 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -92,7 +92,7 @@ vlVdpOutputSurfaceCreate(VdpDevice device, PIPE_BIND_SHARED | PIPE_BIND_SCANOUT; res_tmpl.usage = PIPE_USAGE_DEFAULT; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); if (!CheckSurfaceParams(pipe->screen, &res_tmpl)) goto err_unlock; @@ -152,7 +152,7 @@ vlVdpOutputSurfaceDestroy(VdpOutputSurface surface) pipe = vlsurface->device->context; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); pipe_surface_reference(&vlsurface->surface, NULL); pipe_sampler_view_reference(&vlsurface->sampler_view, NULL); @@ -216,7 +216,7 @@ vlVdpOutputSurfaceGetBitsNative(VdpOutputSurface surface, if (!destination_data || !destination_pitches) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); res = vlsurface->sampler_view->texture; box = RectToPipeBox(source_rect, res); @@ -260,7 +260,7 @@ vlVdpOutputSurfacePutBitsNative(VdpOutputSurface surface, if (!source_data || !source_pitches) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); dst_box = RectToPipeBox(destination_rect, vlsurface->sampler_view->texture); @@ -344,7 +344,7 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface, res_tmpl.usage = PIPE_USAGE_STAGING; res_tmpl.bind = PIPE_BIND_SAMPLER_VIEW; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); if (!CheckSurfaceParams(context->screen, &res_tmpl)) goto error_resource; @@ -461,7 +461,7 @@ vlVdpOutputSurfacePutBitsYCbCr(VdpOutputSurface surface, if (!source_data || !source_pitches) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); memset(&vtmpl, 0, sizeof(vtmpl)); vtmpl.buffer_format = format; vtmpl.chroma_format = FormatYCBCRToPipeChroma(source_ycbcr_format); @@ -679,7 +679,7 @@ vlVdpOutputSurfaceRenderOutputSurface(VdpOutputSurface destination_surface, src_sv = src_vlsurface->sampler_view; } - pipe_mutex_lock(dst_vlsurface->device->mutex); + mtx_lock(&dst_vlsurface->device->mutex); context = dst_vlsurface->device->context; compositor = &dst_vlsurface->device->compositor; @@ -753,7 +753,7 @@ vlVdpOutputSurfaceRenderBitmapSurface(VdpOutputSurface destination_surface, compositor = &dst_vlsurface->device->compositor; cstate = &dst_vlsurface->cstate; - pipe_mutex_lock(dst_vlsurface->device->mutex); + mtx_lock(&dst_vlsurface->device->mutex); blend = BlenderToPipe(context, blend_state); @@ -780,7 +780,7 @@ struct pipe_resource *vlVdpOutputSurfaceGallium(VdpOutputSurface surface) if (!vlsurface || !vlsurface->surface) return NULL; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); vlsurface->device->context->flush(vlsurface->device->context, NULL, 0); pipe_mutex_unlock(vlsurface->device->mutex); @@ -801,7 +801,7 @@ VdpStatus vlVdpOutputSurfaceDMABuf(VdpOutputSurface surface, if (!vlsurface || !vlsurface->surface) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); vlsurface->device->context->flush(vlsurface->device->context, NULL, 0); memset(&whandle, 0, sizeof(struct winsys_handle)); diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index 78cafc81afe..ee32bac1361 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -65,7 +65,7 @@ vlVdpPresentationQueueCreate(VdpDevice device, DeviceReference(&pq->device, dev); pq->drawable = pqt->drawable; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); if (!vl_compositor_init_state(&pq->cstate, dev->context)) { pipe_mutex_unlock(dev->mutex); ret = VDP_STATUS_ERROR; @@ -100,7 +100,7 @@ vlVdpPresentationQueueDestroy(VdpPresentationQueue presentation_queue) if (!pq) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(pq->device->mutex); + mtx_lock(&pq->device->mutex); vl_compositor_cleanup_state(&pq->cstate); pipe_mutex_unlock(pq->device->mutex); @@ -133,7 +133,7 @@ vlVdpPresentationQueueSetBackgroundColor(VdpPresentationQueue presentation_queue color.f[2] = background_color->blue; color.f[3] = background_color->alpha; - pipe_mutex_lock(pq->device->mutex); + mtx_lock(&pq->device->mutex); vl_compositor_set_clear_color(&pq->cstate, &color); pipe_mutex_unlock(pq->device->mutex); @@ -157,7 +157,7 @@ vlVdpPresentationQueueGetBackgroundColor(VdpPresentationQueue presentation_queue if (!pq) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(pq->device->mutex); + mtx_lock(&pq->device->mutex); vl_compositor_get_clear_color(&pq->cstate, &color); pipe_mutex_unlock(pq->device->mutex); @@ -185,7 +185,7 @@ vlVdpPresentationQueueGetTime(VdpPresentationQueue presentation_queue, if (!pq) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(pq->device->mutex); + mtx_lock(&pq->device->mutex); *current_time = pq->device->vscreen->get_timestamp(pq->device->vscreen, (void *)pq->drawable); pipe_mutex_unlock(pq->device->mutex); @@ -230,7 +230,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, cstate = &pq->cstate; vscreen = pq->device->vscreen; - pipe_mutex_lock(pq->device->mutex); + mtx_lock(&pq->device->mutex); if (vscreen->set_back_texture_from_output && surf->send_to_X) vscreen->set_back_texture_from_output(vscreen, surf->surface->texture, clip_width, clip_height); tex = vscreen->texture_from_drawable(vscreen, (void *)pq->drawable); @@ -321,7 +321,7 @@ vlVdpPresentationQueueBlockUntilSurfaceIdle(VdpPresentationQueue presentation_qu if (!surf) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(pq->device->mutex); + mtx_lock(&pq->device->mutex); if (surf->fence) { screen = pq->device->vscreen->pscreen; screen->fence_finish(screen, NULL, surf->fence, PIPE_TIMEOUT_INFINITE); @@ -364,7 +364,7 @@ vlVdpPresentationQueueQuerySurfaceStatus(VdpPresentationQueue presentation_queue else *status = VDP_PRESENTATION_QUEUE_STATUS_IDLE; } else { - pipe_mutex_lock(pq->device->mutex); + mtx_lock(&pq->device->mutex); screen = pq->device->vscreen->pscreen; if (screen->fence_finish(screen, NULL, surf->fence, 0)) { screen->fence_reference(screen, &surf->fence, NULL); diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c index 435cafd4041..87011cb7e5e 100644 --- a/src/gallium/state_trackers/vdpau/query.c +++ b/src/gallium/state_trackers/vdpau/query.c @@ -82,7 +82,7 @@ vlVdpVideoSurfaceQueryCapabilities(VdpDevice device, VdpChromaType surface_chrom if (!pscreen) return VDP_STATUS_RESOURCES; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); /* XXX: Current limits */ *is_supported = true; @@ -119,7 +119,7 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp if (!pscreen) return VDP_STATUS_RESOURCES; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); switch(bits_ycbcr_format) { case VDP_YCBCR_FORMAT_NV12: @@ -196,7 +196,7 @@ vlVdpDecoderQueryCapabilities(VdpDevice device, VdpDecoderProfile profile, return VDP_STATUS_OK; } - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); *is_supported = pscreen->get_video_param(pscreen, p_profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_SUPPORTED); if (*is_supported) { @@ -244,7 +244,7 @@ vlVdpOutputSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba if (!(is_supported && max_width && max_height)) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); *is_supported = pscreen->is_format_supported ( pscreen, format, PIPE_TEXTURE_3D, 1, @@ -296,7 +296,7 @@ vlVdpOutputSurfaceQueryGetPutBitsNativeCapabilities(VdpDevice device, VdpRGBAFor if (!is_supported) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); *is_supported = pscreen->is_format_supported ( pscreen, format, PIPE_TEXTURE_2D, 1, @@ -345,7 +345,7 @@ vlVdpOutputSurfaceQueryPutBitsIndexedCapabilities(VdpDevice device, if (!is_supported) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); *is_supported = pscreen->is_format_supported ( pscreen, rgba_format, PIPE_TEXTURE_2D, 1, @@ -400,7 +400,7 @@ vlVdpOutputSurfaceQueryPutBitsYCbCrCapabilities(VdpDevice device, VdpRGBAFormat if (!is_supported) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); *is_supported = pscreen->is_format_supported ( pscreen, rgba_format, PIPE_TEXTURE_2D, 1, @@ -444,7 +444,7 @@ vlVdpBitmapSurfaceQueryCapabilities(VdpDevice device, VdpRGBAFormat surface_rgba if (!(is_supported && max_width && max_height)) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); *is_supported = pscreen->is_format_supported ( pscreen, format, PIPE_TEXTURE_3D, 1, @@ -533,7 +533,7 @@ vlVdpVideoMixerQueryParameterValueRange(VdpDevice device, VdpVideoMixerParameter if (!(min_value && max_value)) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); screen = dev->vscreen->pscreen; switch (parameter) { case VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH: diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index e0dff4e90cb..39d58490606 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -80,7 +80,7 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type, DeviceReference(&p_surf->device, dev); pipe = dev->context; - pipe_mutex_lock(dev->mutex); + mtx_lock(&dev->mutex); memset(&p_surf->templat, 0, sizeof(p_surf->templat)); p_surf->templat.buffer_format = pipe->screen->get_video_param ( @@ -138,7 +138,7 @@ vlVdpVideoSurfaceDestroy(VdpVideoSurface surface) if (!p_surf) return VDP_STATUS_INVALID_HANDLE; - pipe_mutex_lock(p_surf->device->mutex); + mtx_lock(&p_surf->device->mutex); if (p_surf->video_buffer) p_surf->video_buffer->destroy(p_surf->video_buffer); pipe_mutex_unlock(p_surf->device->mutex); @@ -238,7 +238,7 @@ vlVdpVideoSurfaceGetBitsYCbCr(VdpVideoSurface surface, return VDP_STATUS_NO_IMPLEMENTATION; } - pipe_mutex_lock(vlsurface->device->mutex); + mtx_lock(&vlsurface->device->mutex); sampler_views = vlsurface->video_buffer->get_sampler_view_planes(vlsurface->video_buffer); if (!sampler_views) { pipe_mutex_unlock(vlsurface->device->mutex); @@ -321,7 +321,7 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface, if (!source_data || !source_pitches) return VDP_STATUS_INVALID_POINTER; - pipe_mutex_lock(p_surf->device->mutex); + mtx_lock(&p_surf->device->mutex); if (p_surf->video_buffer == NULL || ((pformat != p_surf->video_buffer->buffer_format))) { @@ -465,7 +465,7 @@ struct pipe_video_buffer *vlVdpVideoSurfaceGallium(VdpVideoSurface surface) if (!p_surf) return NULL; - pipe_mutex_lock(p_surf->device->mutex); + mtx_lock(&p_surf->device->mutex); if (p_surf->video_buffer == NULL) { struct pipe_context *pipe = p_surf->device->context; @@ -500,7 +500,7 @@ VdpStatus vlVdpVideoSurfaceDMABuf(VdpVideoSurface surface, memset(result, 0, sizeof(*result)); result->handle = -1; - pipe_mutex_lock(p_surf->device->mutex); + mtx_lock(&p_surf->device->mutex); if (p_surf->video_buffer == NULL) { struct pipe_context *pipe = p_surf->device->context; |