From: Vijay Kiran Kamuju Subject: [wined3d] Add DF16 and DF24 formats Message-Id: Date: Fri, 18 Apr 2014 14:46:54 +0000 This patch credit goes to Roland Haeder This is from http://bugs.winehq.org/show_bug.cgi?id=23807 I am sending in his stead as I also got the same issue when playing Hearthstone. Changelog: [wined3d] Add DF16 and DF24 formats From 983311aa61d5c0251414338fa70f6d4ce4508097 Mon Sep 17 00:00:00 2001 From: Vijay Kiran Kamuju Date: Fri, 18 Apr 2014 15:55:37 +0000 Subject: [PATCH] [wined3d] Add DF16 and DF24 formats --- dlls/wined3d/utils.c | 26 ++++++++++++++++++++++++++ include/wine/wined3d.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 32426d9..f8999b6 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -130,6 +130,8 @@ static const struct wined3d_format_channels formats[] = /* Vendor-specific formats */ {WINED3DFMT_ATI2N, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, {WINED3DFMT_NVDB, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {WINED3DFMT_DF16, 0, 0, 0, 0, 16, 24, 8, 0, 0, 0, 0}, + {WINED3DFMT_DF24, 0, 0, 0, 0, 24, 24, 8, 0, 0, 0, 0}, {WINED3DFMT_INST, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {WINED3DFMT_INTZ, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 8}, {WINED3DFMT_RESZ, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, @@ -986,6 +988,26 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_COMPRESSED, ARB_TEXTURE_COMPRESSION_RGTC, NULL}, + {WINED3DFMT_DF16, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, + GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING + | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, + EXT_PACKED_DEPTH_STENCIL, NULL}, + {WINED3DFMT_DF16, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, + GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING + | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, + ARB_FRAMEBUFFER_OBJECT, NULL}, + {WINED3DFMT_DF24, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, + GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING + | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, + EXT_PACKED_DEPTH_STENCIL, NULL}, + {WINED3DFMT_DF24, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0, + GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING + | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, + ARB_FRAMEBUFFER_OBJECT, NULL}, {WINED3DFMT_INTZ, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING @@ -2191,6 +2213,8 @@ const char *debug_d3dformat(enum wined3d_format_id format_id) FMT_TO_STR(WINED3DFMT_B5G5R5A1_UNORM); FMT_TO_STR(WINED3DFMT_B8G8R8A8_UNORM); FMT_TO_STR(WINED3DFMT_B8G8R8X8_UNORM); + FMT_TO_STR(WINED3DFMT_DF16); + FMT_TO_STR(WINED3DFMT_DF24); FMT_TO_STR(WINED3DFMT_INTZ); FMT_TO_STR(WINED3DFMT_RESZ); FMT_TO_STR(WINED3DFMT_NULL); @@ -3006,6 +3030,8 @@ BOOL getDepthStencilBits(const struct wined3d_format *format, BYTE *depthSize, B case WINED3DFMT_S8_UINT_D24_FLOAT: case WINED3DFMT_D32_UNORM: case WINED3DFMT_D32_FLOAT: + case WINED3DFMT_DF16: + case WINED3DFMT_DF24: case WINED3DFMT_INTZ: break; default: diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index a4b32f9..646786e 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -246,6 +246,8 @@ enum wined3d_format_id WINED3DFMT_NVDB = WINEMAKEFOURCC('N','V','D','B'), WINED3DFMT_NVHU = WINEMAKEFOURCC('N','V','H','U'), WINED3DFMT_NVHS = WINEMAKEFOURCC('N','V','H','S'), + WINED3DFMT_DF16 = WINEMAKEFOURCC('D','F','1','6'), + WINED3DFMT_DF24 = WINEMAKEFOURCC('D','F','2','4'), WINED3DFMT_INTZ = WINEMAKEFOURCC('I','N','T','Z'), WINED3DFMT_RESZ = WINEMAKEFOURCC('R','E','S','Z'), WINED3DFMT_NULL = WINEMAKEFOURCC('N','U','L','L'), -- 1.9.2