aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-05 12:12:30 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:52:38 +1100
commitba72554f3e576c1674d52ab16d8d2edff9398b71 (patch)
tree317c80f33ea1edcf238d3545ff1a6104a7d55fc8 /src/gallium/state_trackers/nine
parentbe188289e1bf0e259c91a751c405d54bb99bc5d4 (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/nine')
-rw-r--r--src/gallium/state_trackers/nine/nine_lock.c440
-rw-r--r--src/gallium/state_trackers/nine/nine_queue.c8
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c16
3 files changed, 232 insertions, 232 deletions
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);
}