From d7e051902df31578af302dfbd743df199a52b575 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 13 Apr 2016 19:09:51 +0200 Subject: [PATCH] wined3d: Use the texture dimension helpers in wined3d_volume_upload_data(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/volume.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 02b5db6eeeb..cb60a241191 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -79,9 +79,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_texture *texture = volume->container; const struct wined3d_format *format = texture->resource.format; - UINT width = volume->resource.width; - UINT height = volume->resource.height; - UINT depth = volume->resource.depth; + unsigned int width, height, depth; const void *mem = data->addr; void *converted_mem = NULL; @@ -89,6 +87,10 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine volume, context, volume->texture_level, debug_d3dformat(format->id), format->id); + width = wined3d_texture_get_level_width(texture, volume->texture_level); + height = wined3d_texture_get_level_height(texture, volume->texture_level); + depth = wined3d_texture_get_level_depth(texture, volume->texture_level); + if (format->convert) { UINT dst_row_pitch, dst_slice_pitch; -- 2.11.4.GIT