st/mesa: add support for GL_OES_compressed_ETC1_RGB8_texture

Have st/mesa recognize MESA_FORMAT_ETC1_RGB8 then we are good to advertise the
extension.

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Chia-I Wu
2011-11-29 12:49:36 +08:00
parent 5c31eb78e5
commit cde6c91fd5
2 changed files with 20 additions and 0 deletions

View File

@@ -475,6 +475,14 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE;
}
if (ctx->API != API_OPENGL) {
if (screen->is_format_supported(screen, PIPE_FORMAT_ETC1_RGB8,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.OES_compressed_ETC1_RGB8_texture = GL_TRUE;
}
}
if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_SNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW)) {