#include "volumetexture9.h"
#include "d3d9.h"
+#include "nine_lock.h"
#include "os/os_thread.h"
/* Global mutex as described by MSDN */
pipe_static_mutex(d3dlock_global);
+void
+NineLockGlobalMutex()
+{
+ pipe_mutex_lock(d3dlock_global);
+}
+
+void
+NineUnlockGlobalMutex()
+{
+ pipe_mutex_unlock(d3dlock_global);
+}
+
static HRESULT NINE_WINAPI
LockAuthenticatedChannel9_GetCertificateSize( struct NineAuthenticatedChannel9 *This,
UINT *pCertificateSize )
IDirect3DAuthenticatedChannel9Vtbl LockAuthenticatedChannel9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)LockAuthenticatedChannel9_GetCertificateSize,
(void *)LockAuthenticatedChannel9_GetCertificate,
(void *)LockAuthenticatedChannel9_NegotiateKeyExchange,
IDirect3DCryptoSession9Vtbl LockCryptoSession9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)LockCryptoSession9_GetCertificateSize,
(void *)LockCryptoSession9_GetCertificate,
(void *)LockCryptoSession9_NegotiateKeyExchange,
IDirect3DCubeTexture9Vtbl LockCubeTexture9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
(void *)LockUnknown_SetPrivateData,
(void *)LockUnknown_GetPrivateData,
IDirect3DDevice9Vtbl LockDevice9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)LockDevice9_TestCooperativeLevel,
(void *)LockDevice9_GetAvailableTextureMem,
(void *)LockDevice9_EvictManagedResources,
IDirect3DDevice9ExVtbl LockDevice9Ex_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)LockDevice9_TestCooperativeLevel,
(void *)LockDevice9_GetAvailableTextureMem,
(void *)LockDevice9_EvictManagedResources,
IDirect3DDevice9VideoVtbl LockDevice9Video_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)LockDevice9Video_GetContentProtectionCaps,
(void *)LockDevice9Video_CreateAuthenticatedChannel,
(void *)LockDevice9Video_CreateCryptoSession
IDirect3DIndexBuffer9Vtbl LockIndexBuffer9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
(void *)LockUnknown_SetPrivateData,
(void *)LockUnknown_GetPrivateData,
IDirect3DPixelShader9Vtbl LockPixelShader9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice,
(void *)LockPixelShader9_GetFunction
};
IDirect3DQuery9Vtbl LockQuery9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of Query9 iface */
(void *)NineQuery9_GetType, /* immutable */
(void *)NineQuery9_GetDataSize, /* immutable */
IDirect3DStateBlock9Vtbl LockStateBlock9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of StateBlock9 iface */
(void *)LockStateBlock9_Capture,
(void *)LockStateBlock9_Apply
IDirect3DSurface9Vtbl LockSurface9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
(void *)LockUnknown_SetPrivateData,
(void *)LockUnknown_GetPrivateData,
IDirect3DSwapChain9Vtbl LockSwapChain9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)LockSwapChain9_Present,
(void *)LockSwapChain9_GetFrontBufferData,
(void *)LockSwapChain9_GetBackBuffer,
IDirect3DSwapChain9ExVtbl LockSwapChain9Ex_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)LockSwapChain9_Present,
(void *)LockSwapChain9_GetFrontBufferData,
(void *)LockSwapChain9_GetBackBuffer,
IDirect3DTexture9Vtbl LockTexture9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
(void *)LockUnknown_SetPrivateData,
(void *)LockUnknown_GetPrivateData,
IDirect3DVertexBuffer9Vtbl LockVertexBuffer9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
(void *)LockUnknown_SetPrivateData,
(void *)LockUnknown_GetPrivateData,
IDirect3DVertexDeclaration9Vtbl LockVertexDeclaration9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of VertexDecl9 iface */
(void *)LockVertexDeclaration9_GetDeclaration
};
IDirect3DVertexShader9Vtbl LockVertexShader9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice,
(void *)LockVertexShader9_GetFunction
};
IDirect3DVolume9Vtbl LockVolume9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of Volume9 iface */
(void *)NineUnknown_SetPrivateData,
(void *)NineUnknown_GetPrivateData,
IDirect3DVolumeTexture9Vtbl LockVolumeTexture9_vtable = {
(void *)NineUnknown_QueryInterface,
(void *)NineUnknown_AddRef,
- (void *)NineUnknown_Release,
+ (void *)NineUnknown_ReleaseWithDtorLock,
(void *)NineUnknown_GetDevice, /* actually part of Resource9 iface */
(void *)LockUnknown_SetPrivateData,
(void *)LockUnknown_GetPrivateData,