wined3d: Implicit depth/stencil surfaces don't have a container.
They're owned by the device instead of the swapchain.
This commit is contained in:
parent
4005eb2a18
commit
c568916f9e
|
@ -1374,18 +1374,17 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
|
|||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
||||
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
|
||||
IWineD3DSurface **surface)
|
||||
UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
||||
DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
|
||||
{
|
||||
struct d3d10_device *This = device_from_device_parent(iface);
|
||||
struct d3d10_texture2d *texture;
|
||||
D3D10_TEXTURE2D_DESC desc;
|
||||
HRESULT hr;
|
||||
|
||||
FIXME("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
|
||||
FIXME("iface %p, width %u, height %u, format %#x, multisample_type %#x,\n"
|
||||
"\tmultisample_quality %u, discard %u, surface %p partial stub!\n",
|
||||
iface, superior, width, height, format, multisample_type, multisample_quality, discard, surface);
|
||||
iface, width, height, format, multisample_type, multisample_quality, discard, surface);
|
||||
|
||||
FIXME("Implement DXGI<->wined3d usage conversion\n");
|
||||
|
||||
|
|
|
@ -2623,17 +2623,16 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
|
|||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
||||
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
|
||||
IWineD3DSurface **surface)
|
||||
UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
||||
DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
|
||||
{
|
||||
struct IDirect3DDevice8Impl *This = device_from_device_parent(iface);
|
||||
IDirect3DSurface8Impl *d3d_surface;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
|
||||
TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x,\n"
|
||||
"\tmultisample_quality %u, discard %u, surface %p\n",
|
||||
iface, superior, width, height, format, multisample_type, multisample_quality, discard, surface);
|
||||
iface, width, height, format, multisample_type, multisample_quality, discard, surface);
|
||||
|
||||
hr = IDirect3DDevice8_CreateDepthStencilSurface((IDirect3DDevice8 *)This, width, height,
|
||||
d3dformat_from_wined3dformat(format), multisample_type, (IDirect3DSurface8 **)&d3d_surface);
|
||||
|
|
|
@ -2688,17 +2688,16 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
|
|||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
||||
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
|
||||
IWineD3DSurface **surface)
|
||||
UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
||||
DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
|
||||
{
|
||||
struct IDirect3DDevice9Impl *This = device_from_device_parent(iface);
|
||||
IDirect3DSurface9Impl *d3d_surface;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
|
||||
TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x,\n"
|
||||
"\tmultisample_quality %u, discard %u, surface %p\n",
|
||||
iface, superior, width, height, format, multisample_type, multisample_quality, discard, surface);
|
||||
iface, width, height, format, multisample_type, multisample_quality, discard, surface);
|
||||
|
||||
hr = IDirect3DDevice9Impl_CreateDepthStencilSurface((IDirect3DDevice9Ex *)This, width, height,
|
||||
d3dformat_from_wined3dformat(format), multisample_type, multisample_quality, discard,
|
||||
|
|
|
@ -5564,18 +5564,17 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateRenderTarget(IWineD3DDevice
|
|||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3DDeviceParent *iface,
|
||||
IUnknown *superior, UINT width, UINT height, enum wined3d_format_id format,
|
||||
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, BOOL discard,
|
||||
IWineD3DSurface **surface)
|
||||
UINT width, UINT height, enum wined3d_format_id format, WINED3DMULTISAMPLE_TYPE multisample_type,
|
||||
DWORD multisample_quality, BOOL discard, IWineD3DSurface **surface)
|
||||
{
|
||||
struct IDirectDrawImpl *This = ddraw_from_device_parent(iface);
|
||||
IDirectDrawSurfaceImpl *ddraw_surface;
|
||||
DDSURFACEDESC2 ddsd;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, superior %p, width %u, height %u, format %#x, multisample_type %#x,\n"
|
||||
TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x,\n"
|
||||
"\tmultisample_quality %u, discard %u, surface %p\n",
|
||||
iface, superior, width, height, format, multisample_type, multisample_quality, discard, surface);
|
||||
iface, width, height, format, multisample_type, multisample_quality, discard, surface);
|
||||
|
||||
*surface = NULL;
|
||||
|
||||
|
|
|
@ -6265,7 +6265,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
|
|||
TRACE("Creating the depth stencil buffer\n");
|
||||
|
||||
hrc = IWineD3DDeviceParent_CreateDepthStencilSurface(This->device_parent,
|
||||
This->parent,
|
||||
pPresentationParameters->BackBufferWidth,
|
||||
pPresentationParameters->BackBufferHeight,
|
||||
pPresentationParameters->AutoDepthStencilFormat,
|
||||
|
|
|
@ -856,7 +856,7 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface
|
|||
TRACE("Creating depth/stencil buffer.\n");
|
||||
if (!device->auto_depth_stencil)
|
||||
{
|
||||
hr = IWineD3DDeviceParent_CreateDepthStencilSurface(device->device_parent, parent,
|
||||
hr = IWineD3DDeviceParent_CreateDepthStencilSurface(device->device_parent,
|
||||
swapchain->presentParms.BackBufferWidth, swapchain->presentParms.BackBufferHeight,
|
||||
swapchain->presentParms.AutoDepthStencilFormat, swapchain->presentParms.MultiSampleType,
|
||||
swapchain->presentParms.MultiSampleQuality, FALSE /* FIXME: Discard */,
|
||||
|
|
|
@ -2143,7 +2143,6 @@ interface IWineD3DDeviceParent : IUnknown
|
|||
);
|
||||
|
||||
HRESULT CreateDepthStencilSurface(
|
||||
[in] IUnknown *superior,
|
||||
[in] UINT width,
|
||||
[in] UINT height,
|
||||
[in] enum wined3d_format_id format_id,
|
||||
|
|
Loading…
Reference in New Issue