From f05febcb14e6e34bd25094fb4690bb5b9e9dfeb5 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 5 Apr 2016 18:24:23 +0200 Subject: [PATCH] wined3d: Use the texture dimension helpers in surface_load_fb_texture(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 681caa971a3..67ec03fa870 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1999,7 +1999,8 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct checkGLcall("glReadBuffer"); gl_info->gl_ops.gl.p_glCopyTexSubImage2D(surface->texture_target, surface->texture_level, - 0, 0, 0, 0, surface->resource.width, surface->resource.height); + 0, 0, 0, 0, wined3d_texture_get_level_width(texture, surface->texture_level), + wined3d_texture_get_level_height(texture, surface->texture_level)); checkGLcall("glCopyTexSubImage2D"); if (restore_rt)