Henri Verbeet : wined3d: Disallow upload conversion from compressed formats in surface_convert_format ().

Alexandre Julliard julliard at winehq.org
Wed Feb 8 15:52:13 CST 2017


Module: wine
Branch: master
Commit: 5a6efe632918fd18758897c39910d52791d46053
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5a6efe632918fd18758897c39910d52791d46053

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

wined3d: Disallow upload conversion from compressed formats in surface_convert_format().

The underlying issue is that glCompressedTexSubImage2D() needs the upload
format to match the texture's internal format.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/surface.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 222159b..628c83a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1521,7 +1521,8 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr
 
     if (!(conv = find_converter(src_format->id, dst_format->id)) && (!device->d3d_initialized
             || !is_identity_fixup(src_format->color_fixup) || src_format->convert
-            || !is_identity_fixup(dst_format->color_fixup) || dst_format->convert))
+            || !is_identity_fixup(dst_format->color_fixup) || dst_format->convert
+            || (src_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED)))
     {
         FIXME("Cannot find a conversion function from format %s to %s.\n",
                 debug_d3dformat(src_format->id), debug_d3dformat(dst_format->id));




More information about the wine-cvs mailing list