Henri Verbeet : wined3d: Use the texture dimension helpers in wined3d_volume_upload_data().

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 14 11:48:51 CDT 2016


Module: wine
Branch: master
Commit: d7e051902df31578af302dfbd743df199a52b575
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d7e051902df31578af302dfbd743df199a52b575

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Apr 13 19:09:51 2016 +0200

wined3d: Use the texture dimension helpers in wined3d_volume_upload_data().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 02b5db6..cb60a24 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;




More information about the wine-cvs mailing list