Henri Verbeet : wined3d: Get resource info from the texture in surface_load_fb_texture().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Mar 21 11:21:10 CDT 2016
Module: wine
Branch: master
Commit: 576a74d166db989f9706b942464e68b2b0018478
URL: http://source.winehq.org/git/wine.git/?a=commit;h=576a74d166db989f9706b942464e68b2b0018478
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sat Mar 19 10:35:47 2016 +0100
wined3d: Get resource info from the texture in surface_load_fb_texture().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/surface.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 8efd85ee..5b9b84b 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2110,7 +2110,8 @@ error:
* switch to a different context and restore the original one before return. */
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct wined3d_context *old_ctx)
{
- struct wined3d_device *device = surface->resource.device;
+ struct wined3d_texture *texture = surface->container;
+ struct wined3d_device *device = texture->resource.device;
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context = old_ctx;
struct wined3d_surface *restore_rt = NULL;
@@ -2124,12 +2125,12 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct
gl_info = context->gl_info;
device_invalidate_state(device, STATE_FRAMEBUFFER);
- wined3d_texture_prepare_texture(surface->container, context, srgb);
- wined3d_texture_bind_and_dirtify(surface->container, context, srgb);
+ wined3d_texture_prepare_texture(texture, context, srgb);
+ wined3d_texture_bind_and_dirtify(texture, context, srgb);
TRACE("Reading back offscreen render target %p.\n", surface);
- if (wined3d_resource_is_offscreen(&surface->container->resource))
+ if (wined3d_resource_is_offscreen(&texture->resource))
gl_info->gl_ops.gl.p_glReadBuffer(context_get_offscreen_gl_buffer(context));
else
gl_info->gl_ops.gl.p_glReadBuffer(surface_get_gl_buffer(surface));
More information about the wine-cvs
mailing list