Commit 82c25ce5 authored by Guillaume Charifi's avatar Guillaume Charifi Committed by Alexandre Julliard

wined3d: Add support for BC5_SNORM format.

parent d10dfd41
...@@ -266,6 +266,7 @@ static const struct wined3d_typed_format_info typed_formats[] = ...@@ -266,6 +266,7 @@ static const struct wined3d_typed_format_info typed_formats[] =
{WINED3DFMT_BC3_UNORM, WINED3DFMT_BC3_TYPELESS, ""}, {WINED3DFMT_BC3_UNORM, WINED3DFMT_BC3_TYPELESS, ""},
{WINED3DFMT_BC4_UNORM, WINED3DFMT_BC4_TYPELESS, ""}, {WINED3DFMT_BC4_UNORM, WINED3DFMT_BC4_TYPELESS, ""},
{WINED3DFMT_BC5_UNORM, WINED3DFMT_BC5_TYPELESS, ""}, {WINED3DFMT_BC5_UNORM, WINED3DFMT_BC5_TYPELESS, ""},
{WINED3DFMT_BC5_SNORM, WINED3DFMT_BC5_TYPELESS, ""},
{WINED3DFMT_BC6H_UF16, WINED3DFMT_BC6H_TYPELESS, ""}, {WINED3DFMT_BC6H_UF16, WINED3DFMT_BC6H_TYPELESS, ""},
{WINED3DFMT_BC6H_SF16, WINED3DFMT_BC6H_TYPELESS, ""}, {WINED3DFMT_BC6H_SF16, WINED3DFMT_BC6H_TYPELESS, ""},
{WINED3DFMT_BC7_UNORM_SRGB, WINED3DFMT_BC7_TYPELESS, ""}, {WINED3DFMT_BC7_UNORM_SRGB, WINED3DFMT_BC7_TYPELESS, ""},
...@@ -353,6 +354,7 @@ static const struct wined3d_format_block_info format_block_info[] = ...@@ -353,6 +354,7 @@ static const struct wined3d_format_block_info format_block_info[] =
{WINED3DFMT_BC3_UNORM, 4, 4, 16, TRUE}, {WINED3DFMT_BC3_UNORM, 4, 4, 16, TRUE},
{WINED3DFMT_BC4_UNORM, 4, 4, 8, TRUE}, {WINED3DFMT_BC4_UNORM, 4, 4, 8, TRUE},
{WINED3DFMT_BC5_UNORM, 4, 4, 16, TRUE}, {WINED3DFMT_BC5_UNORM, 4, 4, 16, TRUE},
{WINED3DFMT_BC5_SNORM, 4, 4, 16, TRUE},
{WINED3DFMT_BC6H_UF16, 4, 4, 16, TRUE}, {WINED3DFMT_BC6H_UF16, 4, 4, 16, TRUE},
{WINED3DFMT_BC6H_SF16, 4, 4, 16, TRUE}, {WINED3DFMT_BC6H_SF16, 4, 4, 16, TRUE},
{WINED3DFMT_BC7_UNORM, 4, 4, 16, TRUE}, {WINED3DFMT_BC7_UNORM, 4, 4, 16, TRUE},
...@@ -1153,6 +1155,11 @@ static const struct wined3d_format_texture_info format_texture_info[] = ...@@ -1153,6 +1155,11 @@ static const struct wined3d_format_texture_info format_texture_info[] =
WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING
| WINED3DFMT_FLAG_COMPRESSED, | WINED3DFMT_FLAG_COMPRESSED,
ARB_TEXTURE_COMPRESSION_RGTC, NULL}, ARB_TEXTURE_COMPRESSION_RGTC, NULL},
{WINED3DFMT_BC5_SNORM, GL_COMPRESSED_SIGNED_RG_RGTC2, GL_COMPRESSED_SIGNED_RG_RGTC2, 0,
GL_RG, GL_UNSIGNED_BYTE, 0,
WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING
| WINED3DFMT_FLAG_COMPRESSED,
ARB_TEXTURE_COMPRESSION_RGTC, NULL},
{WINED3DFMT_BC6H_UF16, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB, 0, {WINED3DFMT_BC6H_UF16, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB, 0,
GL_RGB, GL_UNSIGNED_BYTE, 0, GL_RGB, GL_UNSIGNED_BYTE, 0,
WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING
...@@ -3356,6 +3363,8 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_ ...@@ -3356,6 +3363,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; gl_info->formats[idx].flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
idx = get_format_idx(WINED3DFMT_BC5_UNORM); idx = get_format_idx(WINED3DFMT_BC5_UNORM);
gl_info->formats[idx].flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE; gl_info->formats[idx].flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
idx = get_format_idx(WINED3DFMT_BC5_SNORM);
gl_info->formats[idx].flags[WINED3D_GL_RES_TYPE_TEX_3D] &= ~WINED3DFMT_FLAG_TEXTURE;
} }
static unsigned int calculate_vertex_attribute_size(GLenum type, unsigned int component_count) static unsigned int calculate_vertex_attribute_size(GLenum type, unsigned int component_count)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment