On 14 September 2015 at 13:13, Riccardo Bortolato <rikyz619(a)gmail.com> wrote:
> diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
> index d12805f..d1eebbb 100644
> --- a/dlls/d3d9/d3d9_private.h
> +++ b/dlls/d3d9/d3d9_private.h
> @@ -193,10 +193,13 @@ struct d3d9_volume
> struct d3d9_resource resource;
> struct wined3d_volume *wined3d_volume;
> struct d3d9_texture *texture;
> + struct wined3d_texture *wined3d_texture;
> + UINT sub_resource_idx;
I'd prefer "unsigned int", but it's not that important. We'll probably
want "wined3d_texture" and "sub_resource_idx" before "wined3d_volume".
> -void volume_init(struct d3d9_volume *volume, struct d3d9_texture *texture,
> - struct wined3d_volume *wined3d_volume, const struct wined3d_parent_ops **parent_ops) DECLSPEC_HIDDEN;
> +void volume_init(struct d3d9_volume *volume, struct wined3d_volume *wined3d_volume,
> + const struct wined3d_parent_ops **parent_ops,
> + struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
Please keep "parent_ops" the last parameter. You don't need the
wined3d_volume parameter here. Affects the device_parent calls as
well.
> @@ -5395,6 +5395,7 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
> struct wined3d_surface *object;
> void *parent;
> HRESULT hr;
> + UINT sub_resource_idx = layer * container->level_count + level;
This probably doesn't need its own variable.
I think it makes sense to split this patch in two, one making the
change for volumes, and one making the change for surfaces.