[PATCH 4/4] wined3d: Disallow upload conversion from compressed formats in surface_convert_format().

Henri Verbeet hverbeet at codeweavers.com
Wed Feb 8 09:46:36 CST 2017


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>
---
 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));
-- 
2.1.4




More information about the wine-patches mailing list