Henri Verbeet : wined3d: Get rid of struct wined3d_volume.
Alexandre Julliard
julliard at winehq.org
Fri Jul 29 10:17:08 CDT 2016
Module: wine
Branch: master
Commit: 50af9acb48190cdd4bf9efaf0c6c417ce4586dc3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=50af9acb48190cdd4bf9efaf0c6c417ce4586dc3
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Jul 29 12:34:30 2016 +0200
wined3d: Get rid of struct wined3d_volume.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/texture.c | 26 +++++---------------------
dlls/wined3d/wined3d_private.h | 8 --------
2 files changed, 5 insertions(+), 29 deletions(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index f5b9f69..9feb108 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2320,12 +2320,10 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
{
for (i = 0; i < sub_count; ++i)
{
- struct wined3d_volume *volume = texture->sub_resources[i].u.volume;
-
- GL_EXTCALL(glTexImage3D(GL_TEXTURE_3D, volume->texture_level, internal,
- wined3d_texture_get_level_width(texture, volume->texture_level),
- wined3d_texture_get_level_height(texture, volume->texture_level),
- wined3d_texture_get_level_depth(texture, volume->texture_level),
+ GL_EXTCALL(glTexImage3D(GL_TEXTURE_3D, i, internal,
+ wined3d_texture_get_level_width(texture, i),
+ wined3d_texture_get_level_height(texture, i),
+ wined3d_texture_get_level_depth(texture, i),
0, format->glFormat, format->glType, NULL));
checkGLcall("glTexImage3D");
}
@@ -2334,7 +2332,6 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
static void texture3d_cleanup_sub_resources(struct wined3d_texture *texture)
{
- HeapFree(GetProcessHeap(), 0, texture->sub_resources[0].u.volume);
}
static const struct wined3d_texture_ops texture3d_ops =
@@ -2380,7 +2377,6 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
{
struct wined3d_device_parent *device_parent = device->device_parent;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
- struct wined3d_volume *volumes;
unsigned int i;
HRESULT hr;
@@ -2474,25 +2470,13 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
texture->resource.map_binding = WINED3D_LOCATION_BUFFER;
}
- if (!(volumes = wined3d_calloc(level_count, sizeof(*volumes))))
- {
- wined3d_texture_cleanup_sync(texture);
- return E_OUTOFMEMORY;
- }
-
/* Generate all the surfaces. */
for (i = 0; i < texture->level_count; ++i)
{
struct wined3d_texture_sub_resource *sub_resource;
- struct wined3d_volume *volume;
-
- volume = &volumes[i];
- volume->container = texture;
- volume->texture_level = i;
sub_resource = &texture->sub_resources[i];
sub_resource->locations = WINED3D_LOCATION_DISCARDED;
- sub_resource->u.volume = volume;
if (FAILED(hr = device_parent->ops->volume_created(device_parent,
texture, i, &sub_resource->parent, &sub_resource->parent_ops)))
@@ -2505,7 +2489,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
TRACE("parent %p, parent_ops %p.\n", parent, parent_ops);
- TRACE("Created volume level %u @ %p.\n", i, volume);
+ TRACE("Created volume level %u.\n", i);
}
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b3acbbd..e5793d3 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2688,7 +2688,6 @@ struct wined3d_texture
union
{
struct wined3d_surface *surface;
- struct wined3d_volume *volume;
} u;
unsigned int offset;
unsigned int size;
@@ -2783,13 +2782,6 @@ void wined3d_texture_validate_location(struct wined3d_texture *texture,
const char *wined3d_debug_location(DWORD location) DECLSPEC_HIDDEN;
-struct wined3d_volume
-{
- struct wined3d_texture *container;
-
- GLint texture_level;
-};
-
void wined3d_volume_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
const struct wined3d_context *context, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list