[PATCH 2/4] wined3d: Mind destination texture location in glsl_blitter_blit().

Paul Gofman pgofman at codeweavers.com
Wed May 27 06:36:56 CDT 2020


Otherwise things go wrong when texture2d_blt() chooses
WINED3D_LOCATION_RB_RESOLVED.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49251
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 dlls/wined3d/glsl_shader.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 7d16f03a21..c8c9656b6c 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -13135,6 +13135,11 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli
         wined3d_texture_load(src_texture, context, FALSE);
     }
 
+    if (!texture2d_is_full_rect(dst_texture, dst_sub_resource_idx % dst_texture->level_count, dst_rect))
+        wined3d_texture_load_location(dst_texture, dst_sub_resource_idx, context, dst_location);
+    else
+        wined3d_texture_prepare_location(dst_texture, dst_sub_resource_idx, context, dst_location);
+
     wined3d_context_gl_apply_blit_state(context_gl, device);
 
     if (dst_location == WINED3D_LOCATION_DRAWABLE)
-- 
2.26.2




More information about the wine-devel mailing list