wined3d: Get rid of the surface parameter to wined3d_device_parent_ops.surface_created().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6e5fa92299
commit
3b5eca269d
|
@ -4819,24 +4819,11 @@ static void CDECL device_parent_activate(struct wined3d_device_parent *device_pa
|
|||
TRACE("device_parent %p, activate %#x.\n", device_parent, activate);
|
||||
}
|
||||
|
||||
static HRESULT CDECL device_parent_surface_created(struct wined3d_device_parent *device_parent,
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, struct wined3d_surface *surface, void **parent,
|
||||
const struct wined3d_parent_ops **parent_ops)
|
||||
{
|
||||
TRACE("device_parent %p, wined3d_texture %p, sub_resource_idx %u, surface %p, parent %p, parent_ops %p.\n",
|
||||
device_parent, wined3d_texture, sub_resource_idx, surface, parent, parent_ops);
|
||||
|
||||
*parent = NULL;
|
||||
*parent_ops = &d3d_null_wined3d_parent_ops;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT CDECL device_parent_volume_created(struct wined3d_device_parent *device_parent,
|
||||
static HRESULT CDECL device_parent_sub_resource_created(struct wined3d_device_parent *device_parent,
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, void **parent,
|
||||
const struct wined3d_parent_ops **parent_ops)
|
||||
{
|
||||
TRACE("device_parent %p, texture %p, sub_resource_idx %u, parent %p, parent_ops %p.\n",
|
||||
TRACE("device_parent %p, wined3d_texture %p, sub_resource_idx %u, parent %p, parent_ops %p.\n",
|
||||
device_parent, wined3d_texture, sub_resource_idx, parent, parent_ops);
|
||||
|
||||
*parent = NULL;
|
||||
|
@ -4920,8 +4907,8 @@ static const struct wined3d_device_parent_ops d3d_wined3d_device_parent_ops =
|
|||
device_parent_wined3d_device_created,
|
||||
device_parent_mode_changed,
|
||||
device_parent_activate,
|
||||
device_parent_surface_created,
|
||||
device_parent_volume_created,
|
||||
device_parent_sub_resource_created,
|
||||
device_parent_sub_resource_created,
|
||||
device_parent_create_swapchain_texture,
|
||||
device_parent_create_swapchain,
|
||||
};
|
||||
|
|
|
@ -2992,13 +2992,13 @@ static void CDECL device_parent_activate(struct wined3d_device_parent *device_pa
|
|||
}
|
||||
|
||||
static HRESULT CDECL device_parent_surface_created(struct wined3d_device_parent *device_parent,
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, struct wined3d_surface *surface, void **parent,
|
||||
const struct wined3d_parent_ops **parent_ops)
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx,
|
||||
void **parent, const struct wined3d_parent_ops **parent_ops)
|
||||
{
|
||||
struct d3d8_surface *d3d_surface;
|
||||
|
||||
TRACE("device_parent %p, wined3d_texture %p, sub_resource_idx %u, surface %p, parent %p, parent_ops %p.\n",
|
||||
device_parent, wined3d_texture, sub_resource_idx, surface, parent, parent_ops);
|
||||
TRACE("device_parent %p, wined3d_texture %p, sub_resource_idx %u, parent %p, parent_ops %p.\n",
|
||||
device_parent, wined3d_texture, sub_resource_idx, parent, parent_ops);
|
||||
|
||||
if (!(d3d_surface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*d3d_surface))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
|
|
@ -3634,13 +3634,13 @@ static void CDECL device_parent_activate(struct wined3d_device_parent *device_pa
|
|||
}
|
||||
|
||||
static HRESULT CDECL device_parent_surface_created(struct wined3d_device_parent *device_parent,
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, struct wined3d_surface *surface, void **parent,
|
||||
const struct wined3d_parent_ops **parent_ops)
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx,
|
||||
void **parent, const struct wined3d_parent_ops **parent_ops)
|
||||
{
|
||||
struct d3d9_surface *d3d_surface;
|
||||
|
||||
TRACE("device_parent %p, wined3d_texture %p, sub_resource_idx %u, surface %p, parent %p, parent_ops %p.\n",
|
||||
device_parent, wined3d_texture, sub_resource_idx, surface, parent, parent_ops);
|
||||
TRACE("device_parent %p, wined3d_texture %p, sub_resource_idx %u, parent %p, parent_ops %p.\n",
|
||||
device_parent, wined3d_texture, sub_resource_idx, parent, parent_ops);
|
||||
|
||||
if (!(d3d_surface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*d3d_surface))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
|
|
@ -4750,14 +4750,14 @@ void ddraw_update_lost_surfaces(struct ddraw *ddraw)
|
|||
}
|
||||
|
||||
static HRESULT CDECL device_parent_surface_created(struct wined3d_device_parent *device_parent,
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, struct wined3d_surface *surface,
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx,
|
||||
void **parent, const struct wined3d_parent_ops **parent_ops)
|
||||
{
|
||||
struct ddraw *ddraw = ddraw_from_device_parent(device_parent);
|
||||
struct ddraw_surface *ddraw_surface;
|
||||
|
||||
TRACE("device_parent %p, wined3d_texture %p, sub_resource_idx %u, surface %p, parent %p, parent_ops %p.\n",
|
||||
device_parent, wined3d_texture, sub_resource_idx, surface, parent, parent_ops);
|
||||
TRACE("device_parent %p, wined3d_texture %p, sub_resource_idx %u, parent %p, parent_ops %p.\n",
|
||||
device_parent, wined3d_texture, sub_resource_idx, parent, parent_ops);
|
||||
|
||||
/* We have a swapchain or wined3d internal texture. */
|
||||
if (!wined3d_texture_get_parent(wined3d_texture) || wined3d_texture_get_parent(wined3d_texture) == ddraw)
|
||||
|
|
|
@ -5227,7 +5227,7 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
|
|||
}
|
||||
|
||||
if (FAILED(hr = device_parent->ops->surface_created(device_parent,
|
||||
container, layer * container->level_count + level, object, &parent, &parent_ops)))
|
||||
container, layer * container->level_count + level, &parent, &parent_ops)))
|
||||
{
|
||||
WARN("Failed to create surface parent, hr %#x.\n", hr);
|
||||
wined3d_surface_destroy(object);
|
||||
|
|
|
@ -2020,7 +2020,6 @@ struct wined3d_sampler;
|
|||
struct wined3d_shader;
|
||||
struct wined3d_shader_resource_view;
|
||||
struct wined3d_stateblock;
|
||||
struct wined3d_surface;
|
||||
struct wined3d_swapchain;
|
||||
struct wined3d_texture;
|
||||
struct wined3d_vertex_declaration;
|
||||
|
@ -2037,7 +2036,7 @@ struct wined3d_device_parent_ops
|
|||
void (__cdecl *activate)(struct wined3d_device_parent *device_parent, BOOL activate);
|
||||
HRESULT (__cdecl *surface_created)(struct wined3d_device_parent *device_parent,
|
||||
struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_surface *surface, void **parent, const struct wined3d_parent_ops **parent_ops);
|
||||
void **parent, const struct wined3d_parent_ops **parent_ops);
|
||||
HRESULT (__cdecl *volume_created)(struct wined3d_device_parent *device_parent,
|
||||
struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx,
|
||||
void **parent, const struct wined3d_parent_ops **parent_ops);
|
||||
|
|
Loading…
Reference in New Issue