Henri Verbeet : wined3d: Allow decompression blits on system memory resources in arbfp_blit_supported ().

Alexandre Julliard julliard at winehq.org
Thu Apr 20 12:35:12 CDT 2017


Module: wine
Branch: stable
Commit: 1fd7e669b3fd95d4dcde6dbc70bdf5806c2b93ee
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1fd7e669b3fd95d4dcde6dbc70bdf5806c2b93ee

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Feb  8 16:46:34 2017 +0100

wined3d: Allow decompression blits on system memory resources in arbfp_blit_supported().

In general we prefer to do blits between system memory resources on the CPU,
but decompressing DXTn formats in particular is problematic.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit f576e5c02857a506e63c33e3303e2a0a4bc24e1a)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/wined3d/arb_program_shader.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 210b2f9..7e30aa3 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7885,6 +7885,7 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info,
         const RECT *dst_rect, DWORD dst_usage, enum wined3d_pool dst_pool, const struct wined3d_format *dst_format)
 {
     enum complex_fixup src_fixup;
+    BOOL decompress;
 
     if (!gl_info->supported[ARB_FRAGMENT_PROGRAM])
         return FALSE;
@@ -7907,7 +7908,9 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info,
             return FALSE;
     }
 
-    if (src_pool == WINED3D_POOL_SYSTEM_MEM || dst_pool == WINED3D_POOL_SYSTEM_MEM)
+    decompress = src_format && (src_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED)
+            && !(dst_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED);
+    if (!decompress && (dst_pool == WINED3D_POOL_SYSTEM_MEM || src_pool == WINED3D_POOL_SYSTEM_MEM))
         return FALSE;
 
     src_fixup = get_complex_fixup(src_format->color_fixup);




More information about the wine-cvs mailing list