Henri Verbeet : wined3d: Get resource info from the texture in fb_copy_to_texture_direct().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Mar 21 11:21:10 CDT 2016
Module: wine
Branch: master
Commit: 69f8b3182e35d1aba7fd789383b4ff73f0348714
URL: http://source.winehq.org/git/wine.git/?a=commit;h=69f8b3182e35d1aba7fd789383b4ff73f0348714
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sat Mar 19 10:35:49 2016 +0100
wined3d: Get resource info from the texture in fb_copy_to_texture_direct().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/surface.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index cd0b424..71b34e7 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2210,7 +2210,9 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win
static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface,
const RECT *src_rect, const RECT *dst_rect_in, enum wined3d_texture_filter_type filter)
{
- struct wined3d_device *device = dst_surface->resource.device;
+ struct wined3d_texture *src_texture = src_surface->container;
+ struct wined3d_texture *dst_texture = dst_surface->container;
+ struct wined3d_device *device = dst_texture->resource.device;
const struct wined3d_gl_info *gl_info;
float xrel, yrel;
struct wined3d_context *context;
@@ -2230,11 +2232,11 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
context = context_acquire(device, src_surface);
gl_info = context->gl_info;
context_apply_blit_state(context, device);
- wined3d_texture_load(dst_surface->container, context, FALSE);
+ wined3d_texture_load(dst_texture, context, FALSE);
/* Bind the target texture */
- context_bind_texture(context, dst_surface->container->target, dst_surface->container->texture_rgb.name);
- if (wined3d_resource_is_offscreen(&src_surface->container->resource))
+ context_bind_texture(context, dst_texture->target, dst_texture->texture_rgb.name);
+ if (wined3d_resource_is_offscreen(&src_texture->resource))
{
TRACE("Reading from an offscreen target\n");
upsidedown = !upsidedown;
More information about the wine-cvs
mailing list