=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Add support for WINED3DFMT_BC4_SNORM format.
Alexandre Julliard
julliard at winehq.org
Wed Dec 6 17:18:15 CST 2017
Module: wine
Branch: master
Commit: 9c8e781df1e2b4a0df8b3a36c64b8aeac21d3cc8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9c8e781df1e2b4a0df8b3a36c64b8aeac21d3cc8
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Wed Dec 6 11:00:31 2017 +0100
wined3d: Add support for WINED3DFMT_BC4_SNORM format.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/utils.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index f739685..cd0a8e1 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -268,6 +268,7 @@ static const struct wined3d_typed_format_info typed_formats[] =
{WINED3DFMT_BC3_UNORM_SRGB, WINED3DFMT_BC3_TYPELESS, ""},
{WINED3DFMT_BC3_UNORM, WINED3DFMT_BC3_TYPELESS, ""},
{WINED3DFMT_BC4_UNORM, WINED3DFMT_BC4_TYPELESS, ""},
+ {WINED3DFMT_BC4_SNORM, WINED3DFMT_BC4_TYPELESS, ""},
{WINED3DFMT_BC5_UNORM, WINED3DFMT_BC5_TYPELESS, ""},
{WINED3DFMT_BC5_SNORM, WINED3DFMT_BC5_TYPELESS, ""},
{WINED3DFMT_BC6H_UF16, WINED3DFMT_BC6H_TYPELESS, ""},
@@ -361,6 +362,7 @@ static const struct wined3d_format_block_info format_block_info[] =
{WINED3DFMT_BC2_UNORM, 4, 4, 16, TRUE},
{WINED3DFMT_BC3_UNORM, 4, 4, 16, TRUE},
{WINED3DFMT_BC4_UNORM, 4, 4, 8, TRUE},
+ {WINED3DFMT_BC4_SNORM, 4, 4, 8, TRUE},
{WINED3DFMT_BC5_UNORM, 4, 4, 16, TRUE},
{WINED3DFMT_BC5_SNORM, 4, 4, 16, TRUE},
{WINED3DFMT_BC6H_UF16, 4, 4, 16, TRUE},
@@ -1179,6 +1181,11 @@ 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_BC4_SNORM, GL_COMPRESSED_SIGNED_RED_RGTC1, GL_COMPRESSED_SIGNED_RED_RGTC1, 0,
+ GL_RED, GL_UNSIGNED_BYTE, 0,
+ WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING
+ | WINED3DFMT_FLAG_COMPRESSED,
+ ARB_TEXTURE_COMPRESSION_RGTC, NULL},
{WINED3DFMT_BC5_UNORM, GL_COMPRESSED_RG_RGTC2, GL_COMPRESSED_RG_RGTC2, 0,
GL_RG, GL_UNSIGNED_BYTE, 0,
WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING
@@ -3434,6 +3441,8 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_
gl_info->formats[idx].flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
idx = get_format_idx(WINED3DFMT_BC4_UNORM);
gl_info->formats[idx].flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
+ idx = get_format_idx(WINED3DFMT_BC4_SNORM);
+ gl_info->formats[idx].flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
idx = get_format_idx(WINED3DFMT_BC5_UNORM);
gl_info->formats[idx].flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
idx = get_format_idx(WINED3DFMT_BC5_SNORM);
More information about the wine-cvs
mailing list