diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index b32033f9498..dab2638e06a 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -569,26 +569,26 @@ typedef struct IDirect3DPixelShader8Impl { * Internals functions * * to see how not defined it here - */ - + */ + /* Callbacks */ -extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, +extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); -extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth, +extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth, WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage, - IWineD3DVolume **ppVolume, + IWineD3DVolume **ppVolume, HANDLE * pSharedHandle); -extern HRESULT WINAPI D3D8CB_CreateDepthStencilSurface(IUnknown *device, UINT Width, UINT Height, +extern HRESULT WINAPI D3D8CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); -extern HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height, +extern HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, - DWORD MultisampleQuality, BOOL Lockable, + DWORD MultisampleQuality, BOOL Lockable, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); #endif /* __WINE_D3DX8_PRIVATE_H */ diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 51679ccb506..f2b58af6346 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1604,7 +1604,7 @@ const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl = }; /* Internal function called back during the CreateDevice to create a render target */ -HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, +HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, IWineD3DSurface **ppSurface, HANDLE *pSharedHandle) { diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index 42ae40d12a4..c43aa4ab308 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -186,9 +186,9 @@ static HMONITOR WINAPI IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface, UINT } /* Internal function called back during the CreateDevice to create a render target */ -HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height, - WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, - DWORD MultisampleQuality, BOOL Lockable, +HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, + WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, + DWORD MultisampleQuality, BOOL Lockable, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) { HRESULT res = D3D_OK; IDirect3DSurface8Impl *d3dSurface = NULL; @@ -267,7 +267,7 @@ static HRESULT WINAPI D3D8CB_CreateAdditionalSwapChain(IUnknown *device, } /* Internal function called back during the CreateDevice to create a render target */ -HRESULT WINAPI D3D8CB_CreateDepthStencilSurface(IUnknown *device, UINT Width, UINT Height, +HRESULT WINAPI D3D8CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) { diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c index 9619b3500af..53dba411fb7 100644 --- a/dlls/d3d8/volume.c +++ b/dlls/d3d8/volume.c @@ -200,7 +200,7 @@ static const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl = /* Internal function called back during the CreateVolumeTexture */ -HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth, +HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth, WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage, IWineD3DVolume **ppVolume, HANDLE * pSharedHandle) { diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 9f8329de31a..3b16ef293e7 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -522,23 +522,23 @@ typedef struct IDirect3DQuery9Impl { /* Callbacks */ -extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, +extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); -extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth, +extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth, WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage, - IWineD3DVolume **ppVolume, + IWineD3DVolume **ppVolume, HANDLE * pSharedHandle); -extern HRESULT WINAPI D3D9CB_CreateDepthStencilSurface(IUnknown *device, UINT Width, UINT Height, +extern HRESULT WINAPI D3D9CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); -extern HRESULT WINAPI D3D9CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height, +extern HRESULT WINAPI D3D9CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, - DWORD MultisampleQuality, BOOL Lockable, + DWORD MultisampleQuality, BOOL Lockable, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); #endif /* __WINE_D3D9_PRIVATE_H */ diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 168144e9825..87a10bb7089 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -991,10 +991,10 @@ const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl = /* Internal function called back during the CreateDevice to create a render target */ -HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, +HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) { - + HRESULT res = D3D_OK; IDirect3DSurface9Impl *d3dSurface = NULL; BOOL Lockable = TRUE; diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index fe9568af836..c19078428b4 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -176,7 +176,7 @@ static HMONITOR WINAPI IDirect3D9Impl_GetAdapterMonitor(LPDIRECT3D9 iface, UINT } /* Internal function called back during the CreateDevice to create a render target */ -HRESULT WINAPI D3D9CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height, +HRESULT WINAPI D3D9CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) { @@ -250,7 +250,7 @@ HRESULT WINAPI D3D9CB_CreateAdditionalSwapChain(IUnknown *device, } /* Internal function called back during the CreateDevice to create a render target */ -HRESULT WINAPI D3D9CB_CreateDepthStencilSurface(IUnknown *device, UINT Width, UINT Height, +HRESULT WINAPI D3D9CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) { diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c index c4281d9322e..1575763c1f6 100644 --- a/dlls/d3d9/volume.c +++ b/dlls/d3d9/volume.c @@ -201,9 +201,9 @@ static const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl = /* Internal function called back during the CreateVolumeTexture */ -HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth, +HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth, WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage, - IWineD3DVolume **ppVolume, + IWineD3DVolume **ppVolume, HANDLE * pSharedHandle) { IDirect3DVolume9Impl *object; IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)pDevice; diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 11de3ef3eb9..85b040ff26a 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -1656,6 +1656,7 @@ IDirectDrawImpl_RecreateAllSurfaces(IDirectDrawImpl *This) *****************************************************************************/ static HRESULT WINAPI D3D7CB_CreateSurface(IUnknown *device, + IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT level, @@ -2640,7 +2641,8 @@ IDirectDrawImpl_EnumSurfaces(IDirectDraw7 *iface, * *****************************************************************************/ static HRESULT WINAPI -D3D7CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height, +D3D7CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, + UINT Width, UINT Height, WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, @@ -2674,6 +2676,7 @@ D3D7CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height, static HRESULT WINAPI D3D7CB_CreateDepthStencilSurface(IUnknown *device, + IUnknown *pSuperior, UINT Width, UINT Height, WINED3DFORMAT Format, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index f1287bf801c..a12af3881f9 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1200,7 +1200,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U for (i = 0; i < object->baseTexture.levels; i++) { /* use the callback to create the texture surface */ - hr = D3DCB_CreateSurface(This->parent, tmpW, tmpH, Format, Usage, Pool, i, &object->surfaces[i],NULL); + hr = D3DCB_CreateSurface(This->parent, parent, tmpW, tmpH, Format, Usage, Pool, i, &object->surfaces[i],NULL); if (hr!= WINED3D_OK || ( (IWineD3DSurfaceImpl *) object->surfaces[i])->Flags & SFLAG_OVERSIZE) { FIXME("Failed to create surface %p\n", object); /* clean up */ @@ -1277,7 +1277,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa for (i = 0; i < object->baseTexture.levels; i++) { /* Create the volume */ - D3DCB_CreateVolume(This->parent, Width, Height, Depth, Format, Pool, Usage, + D3DCB_CreateVolume(This->parent, parent, Width, Height, Depth, Format, Pool, Usage, (IWineD3DVolume **)&object->volumes[i], pSharedHandle); /* Set its container to this object */ @@ -1379,7 +1379,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface /* Create the 6 faces */ for (j = 0; j < 6; j++) { - hr=D3DCB_CreateSurface(This->parent, tmpW, tmpW, Format, Usage, Pool, + hr=D3DCB_CreateSurface(This->parent, parent, tmpW, tmpW, Format, Usage, Pool, i /* Level */, &object->surfaces[j][i],pSharedHandle); if(hr!= WINED3D_OK) { @@ -1725,6 +1725,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic TRACE("calling rendertarget CB\n"); hr = D3DCB_CreateRenderTarget((IUnknown *) This->parent, + parent, object->presentParms.BackBufferWidth, object->presentParms.BackBufferHeight, object->presentParms.BackBufferFormat, @@ -1758,6 +1759,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic for(i = 0; i < object->presentParms.BackBufferCount; i++) { TRACE("calling rendertarget CB\n"); hr = D3DCB_CreateRenderTarget((IUnknown *) This->parent, + parent, object->presentParms.BackBufferWidth, object->presentParms.BackBufferHeight, object->presentParms.BackBufferFormat, @@ -1794,6 +1796,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic TRACE("Creating depth stencil buffer\n"); if (This->depthStencilBuffer == NULL ) { hr = D3DCB_CreateDepthStencil((IUnknown *) This->parent, + parent, object->presentParms.BackBufferWidth, object->presentParms.BackBufferHeight, object->presentParms.AutoDepthStencilFormat, diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 459f2da2684..6a779f3a659 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -184,9 +184,10 @@ DEFINE_GUID(IID_IWineD3DQuery, * Callback functions required for predefining surfaces / stencils */ typedef HRESULT WINAPI (*D3DCB_CREATERENDERTARGETFN) (IUnknown *pDevice, - UINT Width, - UINT Height, - WINED3DFORMAT Format, + IUnknown *pSuperior, + UINT Width, + UINT Height, + WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, @@ -194,7 +195,8 @@ typedef HRESULT WINAPI (*D3DCB_CREATERENDERTARGETFN) (IUnknown *pDevice, HANDLE *pSharedHandle); typedef HRESULT WINAPI (*D3DCB_CREATESURFACEFN) (IUnknown *pDevice, - UINT Width, + IUnknown *pSuperior, + UINT Width, UINT Height, WINED3DFORMAT Format, DWORD Usage, @@ -204,9 +206,10 @@ typedef HRESULT WINAPI (*D3DCB_CREATESURFACEFN) (IUnknown *pDevice, HANDLE *pSharedHandle); typedef HRESULT WINAPI (*D3DCB_CREATEDEPTHSTENCILSURFACEFN) (IUnknown *pDevice, - UINT Width, - UINT Height, - WINED3DFORMAT Format, + IUnknown *pSuperior, + UINT Width, + UINT Height, + WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, @@ -215,9 +218,10 @@ typedef HRESULT WINAPI (*D3DCB_CREATEDEPTHSTENCILSURFACEFN) (IUnknown *pDevice, typedef HRESULT WINAPI (*D3DCB_CREATEVOLUMEFN) (IUnknown *pDevice, - UINT Width, - UINT Height, - UINT Depth, + IUnknown *pSuperior, + UINT Width, + UINT Height, + UINT Depth, WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,