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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Apr 20 10:36:06 CDT 2016


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Apr 19 18:34:06 2016 +0200

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

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

---

 dlls/wined3d/texture.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index c8a7695..2990e44 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1345,9 +1345,10 @@ static void texture2d_prepare_texture(struct wined3d_texture *texture, struct wi
     for (i = 0; i < sub_count; ++i)
     {
         struct wined3d_surface *surface = texture->sub_resources[i].u.surface;
-        GLsizei height = surface->pow2Height;
-        GLsizei width = surface->pow2Width;
+        GLsizei width, height;
 
+        width = wined3d_texture_get_level_pow2_width(texture, surface->texture_level);
+        height = wined3d_texture_get_level_pow2_height(texture, surface->texture_level);
         if (texture->resource.format_flags & WINED3DFMT_FLAG_HEIGHT_SCALE)
         {
             height *= format->height_scale.numerator;




More information about the wine-cvs mailing list