Henri Verbeet : wined3d: Get resource info from the texture in surface_load_drawable().

Alexandre Julliard julliard at wine.codeweavers.com
Fri Mar 25 10:00:38 CDT 2016


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Mar 24 18:24:28 2016 +0100

wined3d: Get resource info from the texture in surface_load_drawable().

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

---

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

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b4e667f..2f423bf 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3034,10 +3034,11 @@ static void surface_load_sysmem(struct wined3d_surface *surface,
 static HRESULT surface_load_drawable(struct wined3d_surface *surface,
         struct wined3d_context *context)
 {
+    struct wined3d_texture *texture = surface->container;
     RECT r;
 
     if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
-            && wined3d_resource_is_offscreen(&surface->container->resource))
+            && wined3d_resource_is_offscreen(&texture->resource))
     {
         ERR("Trying to load offscreen surface into WINED3D_LOCATION_DRAWABLE.\n");
         return WINED3DERR_INVALIDCALL;
@@ -3045,7 +3046,7 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface,
 
     surface_get_rect(surface, NULL, &r);
     surface_load_location(surface, context, WINED3D_LOCATION_TEXTURE_RGB);
-    surface_blt_to_drawable(surface->resource.device, context,
+    surface_blt_to_drawable(texture->resource.device, context,
             WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r);
 
     return WINED3D_OK;




More information about the wine-cvs mailing list