Commit a99bf6c0 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Add support for ARB_texture_compression_rgtc.

parent 237f3937
......@@ -77,6 +77,7 @@ static const struct {
{"GL_ARB_sync", ARB_SYNC, 0 },
{"GL_ARB_texture_border_clamp", ARB_TEXTURE_BORDER_CLAMP, 0 },
{"GL_ARB_texture_compression", ARB_TEXTURE_COMPRESSION, 0 },
{"GL_ARB_texture_compression_rgtc", ARB_TEXTURE_COMPRESSION_RGTC, 0 },
{"GL_ARB_texture_cube_map", ARB_TEXTURE_CUBE_MAP, 0 },
{"GL_ARB_texture_env_add", ARB_TEXTURE_ENV_ADD, 0 },
{"GL_ARB_texture_env_combine", ARB_TEXTURE_ENV_COMBINE, 0 },
......@@ -2358,6 +2359,11 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
TRACE_(d3d_caps)(" IMPLIED: ARB_vertex_array_bgra support (by EXT_vertex_array_bgra).\n");
gl_info->supported[ARB_VERTEX_ARRAY_BGRA] = TRUE;
}
if (!gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC && gl_info->supported[EXT_TEXTURE_COMPRESSION_RGTC]])
{
TRACE_(d3d_caps)(" IMPLIED: ARB_texture_compression_rgtc support (by EXT_texture_compression_rgtc).\n");
gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC] = TRUE;
}
if (gl_info->supported[NV_TEXTURE_SHADER2])
{
if (gl_info->supported[NV_REGISTER_COMBINERS])
......@@ -3619,7 +3625,7 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, const struct
/* Vendor specific formats */
case WINED3DFMT_ATI2N:
if (gl_info->supported[ATI_TEXTURE_COMPRESSION_3DC]
|| gl_info->supported[EXT_TEXTURE_COMPRESSION_RGTC])
|| gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC])
{
if (adapter->shader_backend->shader_color_fixup_supported(format_desc->color_fixup)
&& adapter->fragment_pipe->color_fixup_supported(format_desc->color_fixup))
......
......@@ -847,10 +847,10 @@ static const struct wined3d_format_texture_info format_texture_info[] =
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 0,
0,
ATI_TEXTURE_COMPRESSION_3DC, NULL},
{WINED3DFMT_ATI2N, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, 0,
{WINED3DFMT_ATI2N, GL_COMPRESSED_RED_GREEN_RGTC2, GL_COMPRESSED_RED_GREEN_RGTC2, 0,
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 0,
0,
EXT_TEXTURE_COMPRESSION_RGTC, NULL},
ARB_TEXTURE_COMPRESSION_RGTC, NULL},
};
static inline int getFmtIdx(WINED3DFORMAT fmt) {
......
......@@ -1760,6 +1760,7 @@ typedef enum wined3d_gl_extension
ARB_SYNC,
ARB_TEXTURE_BORDER_CLAMP,
ARB_TEXTURE_COMPRESSION,
ARB_TEXTURE_COMPRESSION_RGTC,
ARB_TEXTURE_CUBE_MAP,
ARB_TEXTURE_ENV_ADD,
ARB_TEXTURE_ENV_COMBINE,
......@@ -2451,6 +2452,15 @@ typedef GLvoid (WINE_GLAPI *PGLFNGETSYNCIVPROC)(GLsync sync, GLenum pname, GLsiz
#define GL_CLAMP_TO_BORDER_ARB 0x812d
#endif
/* GL_ARB_texture_compression_rgtc */
#ifndef GL_ARB_texture_compression_rgtc
#define GL_ARB_texture_compression_rgtc 1
#define GL_COMPRESSED_RED_RGTC1 0x8dbb
#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8dbc
#define GL_COMPRESSED_RED_GREEN_RGTC2 0x8dbd
#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2 0x8dbe
#endif
/* GL_ARB_texture_cube_map */
#ifndef GL_ARB_texture_cube_map
#define GL_ARB_texture_cube_map 1
......
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