Henri Verbeet : wined3d: Pass a texture and sub-resource index to fb_copy_to_texture_direct().
Alexandre Julliard
julliard at winehq.org
Fri Mar 9 16:11:50 CST 2018
Module: wine
Branch: master
Commit: 628cd4425b512e2ad5463d4ea51b855f5e086b42
URL: https://source.winehq.org/git/wine.git/?a=commit;h=628cd4425b512e2ad5463d4ea51b855f5e086b42
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Mar 9 10:19:52 2018 +0330
wined3d: Pass a texture and sub-resource index to 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 | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index c2b1cd5..b5129d5 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1522,13 +1522,10 @@ void texture2d_load_fb_texture(struct wined3d_texture *texture,
/* Does a direct frame buffer -> texture copy. Stretching is done with single
* pixel copy calls. */
-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)
+static void fb_copy_to_texture_direct(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx,
+ const RECT *dst_rect_in, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx,
+ const RECT *src_rect, enum wined3d_texture_filter_type filter)
{
- unsigned int src_sub_resource_idx = surface_get_sub_resource_idx(src_surface);
- unsigned int dst_sub_resource_idx = surface_get_sub_resource_idx(dst_surface);
- struct wined3d_texture *src_texture = src_surface->container;
- struct wined3d_texture *dst_texture = dst_surface->container;
struct wined3d_device *device = dst_texture->resource.device;
unsigned int src_height, src_level, dst_level;
const struct wined3d_gl_info *gl_info;
@@ -2050,7 +2047,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
|| dst_rect->bottom - dst_rect->top > src_height)
{
TRACE("No stretching in x direction, using direct framebuffer -> texture copy.\n");
- fb_copy_to_texture_direct(dst_surface, src_surface, src_rect, dst_rect, filter);
+ fb_copy_to_texture_direct(dst_texture, surface_get_sub_resource_idx(dst_surface), dst_rect,
+ src_texture, surface_get_sub_resource_idx(src_surface), src_rect, filter);
}
else
{
More information about the wine-cvs
mailing list