wined3d: Merge the device parent create_rendertarget() and create_depth_stencil() handlers.

This commit is contained in:
Henri Verbeet 2012-07-11 12:19:03 +02:00 committed by Alexandre Julliard
parent d26a3858d9
commit 0821c8024b
9 changed files with 83 additions and 200 deletions

View File

@ -1356,7 +1356,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
TRACE("device_parent %p.\n", device_parent);
}
static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent,
static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
enum wined3d_pool pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface)
{
@ -1398,20 +1398,19 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
return S_OK;
}
static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality,
struct wined3d_surface **surface)
static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, struct wined3d_surface **surface)
{
struct d3d10_device *device = device_from_wined3d_device_parent(device_parent);
struct d3d10_texture2d *texture;
D3D10_TEXTURE2D_DESC desc;
HRESULT hr;
FIXME("device_parent %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, surface %p partial stub!\n",
device_parent, container_parent, width, height, format, multisample_type,
multisample_quality, surface);
FIXME("device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,\n"
"\tmultisample_type %#x, multisample_quality %u, surface %p partial stub!\n",
device_parent, container_parent, width, height, format_id, usage,
multisample_type, multisample_quality, surface);
FIXME("Implement DXGI<->wined3d usage conversion\n");
@ -1419,49 +1418,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
desc.Height = height;
desc.MipLevels = 1;
desc.ArraySize = 1;
desc.Format = dxgi_format_from_wined3dformat(format);
desc.SampleDesc.Count = multisample_type ? multisample_type : 1;
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(&device->ID3D10Device_iface, &desc, NULL,
(ID3D10Texture2D **)&texture);
if (FAILED(hr))
{
ERR("CreateTexture2D failed, returning %#x\n", hr);
return hr;
}
*surface = texture->wined3d_surface;
wined3d_surface_incref(*surface);
ID3D10Texture2D_Release(&texture->ID3D10Texture2D_iface);
return S_OK;
}
static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, struct wined3d_surface **surface)
{
struct d3d10_device *device = device_from_wined3d_device_parent(device_parent);
struct d3d10_texture2d *texture;
D3D10_TEXTURE2D_DESC desc;
HRESULT hr;
FIXME("device_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, surface %p partial stub!\n",
device_parent, width, height, format, multisample_type, multisample_quality, surface);
FIXME("Implement DXGI<->wined3d usage conversion\n");
desc.Width = width;
desc.Height = height;
desc.MipLevels = 1;
desc.ArraySize = 1;
desc.Format = dxgi_format_from_wined3dformat(format);
desc.Format = dxgi_format_from_wined3dformat(format_id);
desc.SampleDesc.Count = multisample_type ? multisample_type : 1;
desc.SampleDesc.Quality = multisample_quality;
desc.Usage = D3D10_USAGE_DEFAULT;
@ -1538,9 +1495,8 @@ static const struct wined3d_device_parent_ops d3d10_wined3d_device_parent_ops =
{
device_parent_wined3d_device_created,
device_parent_mode_changed,
device_parent_create_surface,
device_parent_create_rendertarget,
device_parent_create_depth_stencil,
device_parent_create_swapchain_surface,
device_parent_create_texture_surface,
device_parent_create_volume,
device_parent_create_swapchain,
};

View File

@ -2815,7 +2815,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
TRACE("device_parent %p.\n", device_parent);
}
static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent,
static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
enum wined3d_pool pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface)
{
@ -2854,55 +2854,24 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
return hr;
}
static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality,
struct wined3d_surface **surface)
static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, struct wined3d_surface **surface)
{
struct d3d8_device *device = device_from_device_parent(device_parent);
struct d3d8_surface *d3d_surface;
HRESULT hr;
TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, surface %p.\n",
device_parent, container_parent, width, height, format,
TRACE("device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,\n"
"\tmultisample_type %#x, multisample_quality %u, surface %p.\n",
device_parent, container_parent, width, height, format_id, usage,
multisample_type, multisample_quality, surface);
hr = IDirect3DDevice8_CreateRenderTarget(&device->IDirect3DDevice8_iface, width, height,
d3dformat_from_wined3dformat(format), multisample_type, TRUE, (IDirect3DSurface8 **)&d3d_surface);
if (FAILED(hr))
if (FAILED(hr = d3d8_device_CreateSurface(device, width, height, d3dformat_from_wined3dformat(format_id),
TRUE, FALSE, 0, (IDirect3DSurface8 **)&d3d_surface, usage, D3DPOOL_DEFAULT, multisample_type,
multisample_quality)))
{
WARN("Failed to create rendertarget, hr %#x.\n", hr);
return hr;
}
*surface = d3d_surface->wined3d_surface;
wined3d_surface_incref(*surface);
d3d_surface->container = (IUnknown *)&device->IDirect3DDevice8_iface;
/* Implicit surfaces are created with an refcount of 0 */
IDirect3DSurface8_Release(&d3d_surface->IDirect3DSurface8_iface);
return hr;
}
static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, struct wined3d_surface **surface)
{
struct d3d8_device *device = device_from_device_parent(device_parent);
struct d3d8_surface *d3d_surface;
HRESULT hr;
TRACE("device_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, surface %p.\n",
device_parent, width, height, format, multisample_type, multisample_quality, surface);
hr = IDirect3DDevice8_CreateDepthStencilSurface(&device->IDirect3DDevice8_iface, width, height,
d3dformat_from_wined3dformat(format), multisample_type, (IDirect3DSurface8 **)&d3d_surface);
if (FAILED(hr))
{
WARN("Failed to create depth/stencil surface, hr %#x.\n", hr);
WARN("Failed to create surface, hr %#x.\n", hr);
return hr;
}
@ -2985,9 +2954,8 @@ static const struct wined3d_device_parent_ops d3d8_wined3d_device_parent_ops =
{
device_parent_wined3d_device_created,
device_parent_mode_changed,
device_parent_create_surface,
device_parent_create_rendertarget,
device_parent_create_depth_stencil,
device_parent_create_swapchain_surface,
device_parent_create_texture_surface,
device_parent_create_volume,
device_parent_create_swapchain,
};

View File

@ -3170,7 +3170,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
TRACE("device_parent %p.\n", device_parent);
}
static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent,
static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
enum wined3d_pool pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface)
{
@ -3208,63 +3208,34 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
return hr;
}
static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality,
struct wined3d_surface **surface)
static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, struct wined3d_surface **surface)
{
struct d3d9_device *device = device_from_device_parent(device_parent);
struct d3d9_surface *d3d_surface;
HRESULT hr;
TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, surface %p.\n",
device_parent, container_parent, width, height, format, multisample_type,
multisample_quality, surface);
TRACE("device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,\n"
"\tmultisample_type %#x, multisample_quality %u, surface %p.\n",
device_parent, container_parent, width, height, format_id, usage,
multisample_type, multisample_quality, surface);
hr = d3d9_device_CreateRenderTarget(&device->IDirect3DDevice9Ex_iface, width, height,
d3dformat_from_wined3dformat(format), multisample_type, multisample_quality, TRUE,
(IDirect3DSurface9 **)&d3d_surface, NULL);
if (FAILED(hr))
if (FAILED(hr = d3d9_device_create_surface(device, width, height, d3dformat_from_wined3dformat(format_id),
TRUE, FALSE, 0, (IDirect3DSurface9 **)&d3d_surface, usage, D3DPOOL_DEFAULT, multisample_type,
multisample_quality)))
{
WARN("Failed to create rendertarget, hr %#x.\n", hr);
WARN("Failed to create surface, hr %#x.\n", hr);
return hr;
}
*surface = d3d_surface->wined3d_surface;
wined3d_surface_incref(*surface);
d3d_surface->container = container_parent;
/* Implicit surfaces are created with an refcount of 0 */
IDirect3DSurface9_Release(&d3d_surface->IDirect3DSurface9_iface);
return hr;
}
static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, struct wined3d_surface **surface)
{
struct d3d9_device *device = device_from_device_parent(device_parent);
struct d3d9_surface *d3d_surface;
HRESULT hr;
TRACE("device_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, surface %p.\n",
device_parent, width, height, format, multisample_type, multisample_quality, surface);
hr = d3d9_device_CreateDepthStencilSurface(&device->IDirect3DDevice9Ex_iface, width,
height, d3dformat_from_wined3dformat(format), multisample_type, multisample_quality,
FALSE, (IDirect3DSurface9 **)&d3d_surface, NULL);
if (FAILED(hr))
{
WARN("Failed to create depth/stencil surface, hr %#x.\n", hr);
return hr;
}
*surface = d3d_surface->wined3d_surface;
wined3d_surface_incref(*surface);
d3d_surface->container = (IUnknown *)&device->IDirect3DDevice9Ex_iface;
if (container_parent == device_parent)
d3d_surface->container = (IUnknown *)&device->IDirect3DDevice9Ex_iface;
else
d3d_surface->container = container_parent;
/* Implicit surfaces are created with an refcount of 0 */
IDirect3DSurface9_Release(&d3d_surface->IDirect3DSurface9_iface);
@ -3341,9 +3312,8 @@ static const struct wined3d_device_parent_ops d3d9_wined3d_device_parent_ops =
{
device_parent_wined3d_device_created,
device_parent_mode_changed,
device_parent_create_surface,
device_parent_create_rendertarget,
device_parent_create_depth_stencil,
device_parent_create_swapchain_surface,
device_parent_create_texture_surface,
device_parent_create_volume,
device_parent_create_swapchain,
};

View File

@ -5360,7 +5360,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
ERR("Failed to resize window.\n");
}
static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *device_parent,
static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage,
enum wined3d_pool pool, UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface)
{
@ -5442,18 +5442,17 @@ static const struct wined3d_parent_ops ddraw_frontbuffer_parent_ops =
ddraw_frontbuffer_destroyed,
};
static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality,
struct wined3d_surface **surface)
static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality, struct wined3d_surface **surface)
{
struct ddraw *ddraw = ddraw_from_device_parent(device_parent);
HRESULT hr;
TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, multisample_type %#x,\n"
"\tmultisample_quality %u, surface %p.\n",
device_parent, container_parent, width, height, format, multisample_type,
multisample_quality, surface);
TRACE("device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,\n"
"\tmultisample_type %#x, multisample_quality %u, surface %p.\n",
device_parent, container_parent, width, height, format_id, usage,
multisample_type, multisample_quality, surface);
if (ddraw->wined3d_frontbuffer)
{
@ -5461,23 +5460,14 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
return E_FAIL;
}
hr = wined3d_surface_create(ddraw->wined3d_device, width, height, format, 0,
WINED3DUSAGE_RENDERTARGET, WINED3D_POOL_DEFAULT, multisample_type, multisample_quality,
DefaultSurfaceType, WINED3D_SURFACE_MAPPABLE, ddraw, &ddraw_frontbuffer_parent_ops, surface);
if (SUCCEEDED(hr))
if (SUCCEEDED(hr = wined3d_surface_create(ddraw->wined3d_device, width, height, format_id, 0,
usage, WINED3D_POOL_DEFAULT, multisample_type, multisample_quality, DefaultSurfaceType,
WINED3D_SURFACE_MAPPABLE, ddraw, &ddraw_frontbuffer_parent_ops, surface)))
ddraw->wined3d_frontbuffer = *surface;
return hr;
}
static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, struct wined3d_surface **surface)
{
ERR("DirectDraw doesn't have and shouldn't try creating implicit depth buffers.\n");
return E_NOTIMPL;
}
static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *device_parent,
void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format,
enum wined3d_pool pool, DWORD usage, struct wined3d_volume **volume)
@ -5518,9 +5508,8 @@ static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops =
{
device_parent_wined3d_device_created,
device_parent_mode_changed,
device_parent_create_surface,
device_parent_create_rendertarget,
device_parent_create_depth_stencil,
device_parent_create_swapchain_surface,
device_parent_create_texture_surface,
device_parent_create_volume,
device_parent_create_swapchain,
};

View File

@ -189,7 +189,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
struct wined3d_surface *wined3d_surface;
IUnknown *parent;
hr = device_parent->ops->create_surface(device_parent, NULL, desc->Width, desc->Height,
hr = device_parent->ops->create_texture_surface(device_parent, NULL, desc->Width, desc->Height,
wined3dformat_from_dxgi_format(desc->Format), usage, WINED3D_POOL_DEFAULT, 0,
WINED3D_CUBEMAP_FACE_POSITIVE_X, &wined3d_surface);
if (FAILED(hr))

View File

@ -5234,10 +5234,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
TRACE("Creating the depth stencil buffer\n");
if (FAILED(hr = device->device_parent->ops->create_depth_stencil(device->device_parent,
swapchain_desc->backbuffer_width, swapchain_desc->backbuffer_height,
swapchain_desc->auto_depth_stencil_format, swapchain_desc->multisample_type,
swapchain_desc->multisample_quality, &device->auto_depth_stencil)))
if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent,
device->device_parent, swapchain_desc->backbuffer_width, swapchain_desc->backbuffer_height,
swapchain_desc->auto_depth_stencil_format, WINED3DUSAGE_DEPTHSTENCIL,
swapchain_desc->multisample_type, swapchain_desc->multisample_quality,
&device->auto_depth_stencil)))
{
ERR("Failed to create the depth stencil buffer, hr %#x.\n", hr);
wined3d_swapchain_decref(swapchain);

View File

@ -943,10 +943,11 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, enum wined3d_
swapchain_update_render_to_fbo(swapchain);
TRACE("Creating front buffer.\n");
if (FAILED(hr = device->device_parent->ops->create_rendertarget(device->device_parent, parent,
if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent, parent,
swapchain->desc.backbuffer_width, swapchain->desc.backbuffer_height,
swapchain->desc.backbuffer_format, swapchain->desc.multisample_type,
swapchain->desc.multisample_quality, &swapchain->front_buffer)))
swapchain->desc.backbuffer_format, WINED3DUSAGE_RENDERTARGET,
swapchain->desc.multisample_type, swapchain->desc.multisample_quality,
&swapchain->front_buffer)))
{
WARN("Failed to create front buffer, hr %#x.\n", hr);
goto err;
@ -1051,10 +1052,11 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, enum wined3d_
for (i = 0; i < swapchain->desc.backbuffer_count; ++i)
{
TRACE("Creating back buffer %u.\n", i);
if (FAILED(hr = device->device_parent->ops->create_rendertarget(device->device_parent, parent,
if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent, parent,
swapchain->desc.backbuffer_width, swapchain->desc.backbuffer_height,
swapchain->desc.backbuffer_format, swapchain->desc.multisample_type,
swapchain->desc.multisample_quality, &swapchain->back_buffers[i])))
swapchain->desc.backbuffer_format, WINED3DUSAGE_RENDERTARGET,
swapchain->desc.multisample_type, swapchain->desc.multisample_quality,
&swapchain->back_buffers[i])))
{
WARN("Failed to create back buffer %u, hr %#x.\n", i, hr);
goto err;
@ -1070,10 +1072,11 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, enum wined3d_
TRACE("Creating depth/stencil buffer.\n");
if (!device->auto_depth_stencil)
{
if (FAILED(hr = device->device_parent->ops->create_depth_stencil(device->device_parent,
swapchain->desc.backbuffer_width, swapchain->desc.backbuffer_height,
swapchain->desc.auto_depth_stencil_format, swapchain->desc.multisample_type,
swapchain->desc.multisample_quality, &device->auto_depth_stencil)))
if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent,
device->device_parent, swapchain->desc.backbuffer_width, swapchain->desc.backbuffer_height,
swapchain->desc.auto_depth_stencil_format, WINED3DUSAGE_DEPTHSTENCIL,
swapchain->desc.multisample_type, swapchain->desc.multisample_quality,
&device->auto_depth_stencil)))
{
WARN("Failed to create the auto depth stencil, hr %#x.\n", hr);
goto err;

View File

@ -857,9 +857,8 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt
UINT idx = j * texture->level_count + i;
struct wined3d_surface *surface;
hr = device->device_parent->ops->create_surface(device->device_parent, parent, tmp_w, tmp_w,
format_id, usage, pool, i /* Level */, j, &surface);
if (FAILED(hr))
if (FAILED(hr = device->device_parent->ops->create_texture_surface(device->device_parent, parent,
tmp_w, tmp_w, format_id, usage, pool, i /* Level */, j, &surface)))
{
FIXME("(%p) Failed to create surface, hr %#x.\n", texture, hr);
wined3d_texture_cleanup(texture);
@ -1013,9 +1012,8 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he
struct wined3d_surface *surface;
/* Use the callback to create the texture surface. */
hr = device->device_parent->ops->create_surface(device->device_parent, parent, tmp_w, tmp_h,
format->id, usage, pool, i, 0, &surface);
if (FAILED(hr))
if (FAILED(hr = device->device_parent->ops->create_texture_surface(device->device_parent, parent,
tmp_w, tmp_h, format->id, usage, pool, i, 0, &surface)))
{
FIXME("Failed to create surface %p, hr %#x\n", texture, hr);
wined3d_texture_cleanup(texture);

View File

@ -1997,15 +1997,13 @@ struct wined3d_device_parent_ops
{
void (__cdecl *wined3d_device_created)(struct wined3d_device_parent *device_parent, struct wined3d_device *device);
void (__cdecl *mode_changed)(struct wined3d_device_parent *device_parent);
HRESULT (__cdecl *create_surface)(struct wined3d_device_parent *device_parent, void *container_parent,
HRESULT (__cdecl *create_swapchain_surface)(struct wined3d_device_parent *device_parent, void *container_parent,
UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage,
enum wined3d_multisample_type multisample_type, DWORD multisample_quality,
struct wined3d_surface **surface);
HRESULT (__cdecl *create_texture_surface)(struct wined3d_device_parent *device_parent, void *container_parent,
UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage, enum wined3d_pool pool,
UINT level, enum wined3d_cubemap_face face, struct wined3d_surface **surface);
HRESULT (__cdecl *create_rendertarget)(struct wined3d_device_parent *device_parent, void *container_parent,
UINT width, UINT height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, struct wined3d_surface **surface);
HRESULT (__cdecl *create_depth_stencil)(struct wined3d_device_parent *device_parent,
UINT width, UINT height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type,
DWORD multisample_quality, struct wined3d_surface **surface);
HRESULT (__cdecl *create_volume)(struct wined3d_device_parent *device_parent, void *container_parent,
UINT width, UINT height, UINT depth, enum wined3d_format_id format_id, enum wined3d_pool pool, DWORD usage,
struct wined3d_volume **volume);