Henri Verbeet : wined3d: Surfaces always have a container in surface_prepare_texture().

Alexandre Julliard julliard at winehq.org
Tue Nov 19 13:28:35 CST 2013


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Nov 19 10:28:48 2013 +0100

wined3d: Surfaces always have a container in surface_prepare_texture().

---

 dlls/wined3d/surface.c |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 20b5c5f..f054b43 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3940,24 +3940,19 @@ static void surface_prepare_texture_internal(struct wined3d_surface *surface,
 /* Context activation is done by the caller. */
 void surface_prepare_texture(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb)
 {
-    if (surface->container)
-    {
-        struct wined3d_texture *texture = surface->container;
-        UINT sub_count = texture->level_count * texture->layer_count;
-        UINT i;
-
-        TRACE("surface %p is a subresource of texture %p.\n", surface, texture);
+    struct wined3d_texture *texture = surface->container;
+    UINT sub_count = texture->level_count * texture->layer_count;
+    UINT i;
 
-        for (i = 0; i < sub_count; ++i)
-        {
-            struct wined3d_surface *s = surface_from_resource(texture->sub_resources[i]);
-            surface_prepare_texture_internal(s, context, srgb);
-        }
+    TRACE("surface %p is a subresource of texture %p.\n", surface, texture);
 
-        return;
+    for (i = 0; i < sub_count; ++i)
+    {
+        struct wined3d_surface *s = surface_from_resource(texture->sub_resources[i]);
+        surface_prepare_texture_internal(s, context, srgb);
     }
 
-    surface_prepare_texture_internal(surface, context, srgb);
+    return;
 }
 
 void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample)




More information about the wine-cvs mailing list