From 22489d4035d07941ef326dc05ac4fda8fee8b985 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 6 Mar 2016 22:08:43 +0100
Subject: Revert "wined3d: Avoid surface_from_resource() in
 texture2d_prepare_texture()."

This reverts commit b309b831deb81f47b22f0c25a5fc0a1db6759d6d.
---
 dlls/wined3d/texture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index af1c1de..651318c 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -868,7 +868,7 @@ 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;
+        struct wined3d_surface *surface = surface_from_resource(texture->sub_resources[i].resource);
         GLsizei height = surface->pow2Height;
         GLsizei width = surface->pow2Width;
 
-- 
2.7.1

