diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e392e50024b..059332d0985 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3465,11 +3465,21 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) TRACE(" IMPLIED: ARB_vertex_array_bgra support (by EXT_vertex_array_bgra).\n"); gl_info->supported[ARB_VERTEX_ARRAY_BGRA] = TRUE; } + if (!gl_info->supported[EXT_TEXTURE_COMPRESSION_RGTC] && gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC]) + { + TRACE(" IMPLIED: EXT_texture_compression_rgtc support (by ARB_texture_compression_rgtc).\n"); + gl_info->supported[EXT_TEXTURE_COMPRESSION_RGTC] = TRUE; + } if (!gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC] && gl_info->supported[EXT_TEXTURE_COMPRESSION_RGTC]) { TRACE(" IMPLIED: ARB_texture_compression_rgtc support (by EXT_texture_compression_rgtc).\n"); gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC] = TRUE; } + if (gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC] && !gl_info->supported[ARB_TEXTURE_RG]) + { + TRACE("ARB_texture_rg not supported, disabling ARB_texture_compression_rgtc.\n"); + gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC] = FALSE; + } if (gl_info->supported[NV_TEXTURE_SHADER2]) { if (gl_info->supported[NV_REGISTER_COMBINERS]) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 6c003c7fb8b..48f66712950 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1269,6 +1269,11 @@ static const struct wined3d_format_texture_info format_texture_info[] = GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_COMPRESSED, + EXT_TEXTURE_COMPRESSION_RGTC, NULL}, + {WINED3DFMT_ATI2N, 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 + | WINED3DFMT_FLAG_COMPRESSED, ARB_TEXTURE_COMPRESSION_RGTC, NULL}, {WINED3DFMT_INTZ, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, 0, @@ -2381,7 +2386,7 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_ 1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_Z, 0, CHANNEL_SOURCE_W); } - if (gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC]) + if (gl_info->supported[ARB_TEXTURE_COMPRESSION_RGTC] || gl_info->supported[EXT_TEXTURE_COMPRESSION_RGTC]) { idx = getFmtIdx(WINED3DFMT_ATI1N); gl_info->formats[idx].color_fixup = create_color_fixup_desc(