[v2 PATCH 1/3] wined3d: Move source texture resolve from texture2d_blt_fbo() to fbo_blitter_blit().
Paul Gofman
gofmanp at gmail.com
Mon Mar 9 10:14:33 CDT 2020
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
v2:
- added patch.
dlls/wined3d/surface.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index a67a08042c..d2552bbd69 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -175,13 +175,6 @@ void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_context *co
break;
}
- /* Resolve the source surface first if needed. */
- if (wined3d_texture_gl_is_multisample_location(wined3d_texture_gl(src_texture), src_location)
- && (src_texture->resource.format->id != dst_texture->resource.format->id
- || abs(src_rect->bottom - src_rect->top) != abs(dst_rect->bottom - dst_rect->top)
- || abs(src_rect->right - src_rect->left) != abs(dst_rect->right - dst_rect->left)))
- src_location = WINED3D_LOCATION_RB_RESOLVED;
-
/* Make sure the locations are up-to-date. Loading the destination
* surface isn't required if the entire surface is overwritten. (And is
* in fact harmful if we're being called by surface_load_location() with
@@ -944,6 +937,14 @@ static DWORD fbo_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
if (blit_op == WINED3D_BLIT_OP_COLOR_BLIT)
{
TRACE("Colour blit.\n");
+
+ /* Resolve the source surface first if needed. */
+ if (wined3d_texture_gl_is_multisample_location(wined3d_texture_gl(src_texture), src_location)
+ && (src_texture->resource.format->id != dst_texture->resource.format->id
+ || abs(src_rect->bottom - src_rect->top) != abs(dst_rect->bottom - dst_rect->top)
+ || abs(src_rect->right - src_rect->left) != abs(dst_rect->right - dst_rect->left)))
+ src_location = WINED3D_LOCATION_RB_RESOLVED;
+
texture2d_blt_fbo(device, context, filter, src_texture, src_sub_resource_idx, src_location,
src_rect, dst_texture, dst_sub_resource_idx, dst_location, dst_rect);
return dst_location;
--
2.24.1
More information about the wine-devel
mailing list