Added patch to revert special case for converted surfaces in wined3d_surface_blt.

This commit is contained in:
Sebastian Lackner 2017-09-02 02:29:01 +02:00
parent c50463197f
commit a7cf8014bb
2 changed files with 51 additions and 0 deletions

View File

@ -455,6 +455,7 @@ patch_enable_all ()
enable_wined3d_Limit_Vram="$1"
enable_wined3d_QUERY_Stubs="$1"
enable_wined3d_Revert_Buffer_Upload="$1"
enable_wined3d_Revert_Surface_Blt="$1"
enable_wined3d_Silence_FIXMEs="$1"
enable_wined3d_UAV_Counters="$1"
enable_wined3d_Viewports="$1"
@ -1640,6 +1641,9 @@ patch_enable ()
wined3d-Revert_Buffer_Upload)
enable_wined3d_Revert_Buffer_Upload="$2"
;;
wined3d-Revert_Surface_Blt)
enable_wined3d_Revert_Surface_Blt="$2"
;;
wined3d-Silence_FIXMEs)
enable_wined3d_Silence_FIXMEs="$2"
;;
@ -9753,6 +9757,18 @@ if test "$enable_wined3d_Limit_Vram" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-Revert_Surface_Blt
# |
# | Modified files:
# | * dlls/wined3d/surface.c
# |
if test "$enable_wined3d_Revert_Surface_Blt" -eq 1; then
patch_apply wined3d-Revert_Surface_Blt/0001-Revert-wined3d-Drop-the-special-case-for-converted-s.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "Revert \"wined3d: Drop the special case for \"converted\" surfaces in wined3d_surface_blt().\".", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-WINED3DFMT_R32G32_UINT
# |
# | Modified files:

View File

@ -0,0 +1,35 @@
From 82328a507f971e459e0a005b4f9975388a136ac3 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 1 Sep 2017 05:08:54 +0200
Subject: Revert "wined3d: Drop the special case for "converted" surfaces in
wined3d_surface_blt()."
This reverts commit 56128d18d4dfcd306beda6aacb69836938c1a2bf.
---
dlls/wined3d/surface.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index e90ef042323..aacdb07ad4a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3778,6 +3778,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
goto cpu;
}
+ /* We want to avoid invalidating the sysmem location for converted
+ * surfaces, since otherwise we'd have to convert the data back when
+ * locking them. */
+ if (dst_texture->flags & WINED3D_TEXTURE_CONVERTED || dst_texture->resource.format->convert
+ || wined3d_format_get_color_key_conversion(dst_texture, TRUE))
+ {
+ WARN_(d3d_perf)("Converted surface, using CPU blit.\n");
+ goto cpu;
+ }
+
if (flags & ~simple_blit)
{
WARN_(d3d_perf)("Using fallback for complex blit (%#x).\n", flags);
--
2.14.1