Module: wine Branch: master Commit: 2bf46c60fbb6999ce155f644077e5a2e899a006f URL: http://source.winehq.org/git/wine.git/?a=commit;h=2bf46c60fbb6999ce155f64407...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Oct 24 21:23:36 2012 +0200
wined3d: Replace the face and level parameters to device_parent_create_texture_surface() with the sub-resource index.
---
dlls/d3d10core/device.c | 6 +++--- dlls/d3d8/device.c | 6 +++--- dlls/d3d9/device.c | 6 +++--- dlls/ddraw/ddraw.c | 8 ++++---- dlls/wined3d/texture.c | 8 ++++---- include/wine/wined3d.h | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index cd2d710..8dd5b95 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -1440,13 +1440,13 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
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) + enum wined3d_pool pool, UINT sub_resource_idx, struct wined3d_surface **surface) { struct d3d10_device *device = device_from_wined3d_device_parent(device_parent);
TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, level %u, face %u, surface %p.\n", - device_parent, container_parent, width, height, format, usage, pool, level, face, surface); + "\tpool %#x, sub_resource_idx %u, surface %p.\n", + device_parent, container_parent, width, height, format, usage, pool, sub_resource_idx, surface);
return wined3d_surface_create(device->wined3d_device, width, height, format, usage, pool, WINED3D_MULTISAMPLE_NONE, 0, WINED3D_SURFACE_TYPE_OPENGL, 0, container_parent, diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 58aaf3c..c73f065 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2739,7 +2739,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
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) + enum wined3d_pool pool, UINT sub_resource_idx, struct wined3d_surface **surface) { struct d3d8_device *device = device_from_device_parent(device_parent); struct d3d8_surface *d3d_surface; @@ -2747,8 +2747,8 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ HRESULT hr;
TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, level %u, face %u, surface %p.\n", - device_parent, container_parent, width, height, format, usage, pool, level, face, surface); + "\tpool %#x, sub_resource_idx %u, surface %p.\n", + device_parent, container_parent, width, height, format, usage, pool, sub_resource_idx, surface);
if (pool == WINED3D_POOL_DEFAULT && !(usage & WINED3DUSAGE_DYNAMIC)) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 6c9ccc9..ce5bf1a 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3106,7 +3106,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
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) + enum wined3d_pool pool, UINT sub_resource_idx, struct wined3d_surface **surface) { struct d3d9_device *device = device_from_device_parent(device_parent); struct d3d9_surface *d3d_surface; @@ -3114,8 +3114,8 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ HRESULT hr;
TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, level %u, face %u, surface %p.\n", - device_parent, container_parent, width, height, format, usage, pool, level, face, surface); + "\tpool %#x, sub_resource_idx %u, surface %p.\n", + device_parent, container_parent, width, height, format, usage, pool, sub_resource_idx, surface);
if (pool == WINED3D_POOL_DEFAULT && !(usage & D3DUSAGE_DYNAMIC)) lockable = FALSE; diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 014ad27..376db17 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -5197,7 +5197,7 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic
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) + enum wined3d_pool pool, UINT sub_resource_idx, struct wined3d_surface **surface) { struct ddraw *ddraw = ddraw_from_device_parent(device_parent); struct ddraw_surface *tex_root = container_parent; @@ -5206,11 +5206,11 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ HRESULT hr;
TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, level %u, face %u, surface %p.\n", - device_parent, container_parent, width, height, format, usage, pool, level, face, surface); + "\tpool %#x, sub_resource_idx %u, surface %p.\n", + device_parent, container_parent, width, height, format, usage, pool, sub_resource_idx, surface);
/* The ddraw root surface is created before the wined3d texture. */ - if (!level && face == WINED3D_CUBEMAP_FACE_POSITIVE_X) + if (!sub_resource_idx) { ddraw_surface = tex_root; goto done; diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 9fb6b80..d9152b1 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -859,8 +859,8 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt UINT idx = j * texture->level_count + i; struct wined3d_surface *surface;
- 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))) + if (FAILED(hr = device->device_parent->ops->create_texture_surface(device->device_parent, + parent, tmp_w, tmp_w, format_id, usage, pool, idx, &surface))) { FIXME("(%p) Failed to create surface, hr %#x.\n", texture, hr); wined3d_texture_cleanup(texture); @@ -1014,8 +1014,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. */ - 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))) + if (FAILED(hr = device->device_parent->ops->create_texture_surface(device->device_parent, + parent, tmp_w, tmp_h, format->id, usage, pool, i, &surface))) { FIXME("Failed to create surface %p, hr %#x\n", texture, hr); wined3d_texture_cleanup(texture); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 05af2ee..e201c2e 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2004,7 +2004,7 @@ struct wined3d_device_parent_ops 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); + UINT sub_resource_idx, 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);