Henri Verbeet : d3d10core: Implement device_parent_CreateDepthStencilSurface().
Alexandre Julliard
julliard at winehq.org
Mon Jan 19 08:58:33 CST 2009
Module: wine
Branch: master
Commit: bb0e940e16c59e563957e75d8a45a7ab49f8d4a6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bb0e940e16c59e563957e75d8a45a7ab49f8d4a6
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Jan 19 10:39:06 2009 +0100
d3d10core: Implement device_parent_CreateDepthStencilSurface().
---
dlls/d3d10core/device.c | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c
index 3c19c39..034c9b9 100644
--- a/dlls/d3d10core/device.c
+++ b/dlls/d3d10core/device.c
@@ -1047,11 +1047,39 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateDepthStencilSurface(IWineD3
IUnknown *superior, UINT width, UINT height, WINED3DFORMAT 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"
"\tmultisample_quality %u, discard %u, surface %p stub!\n",
iface, superior, width, height, format, multisample_type, multisample_quality, discard, surface);
- return E_NOTIMPL;
+ FIXME("Implement DXGI<->wined3d format and usage conversion\n");
+
+ desc.Width = width;
+ desc.Height = height;
+ desc.MipLevels = 1;
+ desc.ArraySize = 1;
+ desc.Format = format;
+ desc.SampleDesc.Count = multisample_type;
+ desc.SampleDesc.Quality = multisample_quality;
+ desc.Usage = D3D10_USAGE_DEFAULT;
+ desc.BindFlags = D3D10_BIND_RENDER_TARGET;
+ desc.CPUAccessFlags = 0;
+ desc.MiscFlags = 0;
+
+ hr = d3d10_device_CreateTexture2D((ID3D10Device *)This, &desc, NULL, (ID3D10Texture2D **)&texture);
+ if (FAILED(hr))
+ {
+ ERR("CreateTexture2D failed, returning %#x\n", hr);
+ return hr;
+ }
+
+ *surface = texture->wined3d_surface;
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent *iface,
More information about the wine-cvs
mailing list