mesa/st: add RGTC format support.

this just adds a format check + format conversion.
This commit is contained in:
Dave Airlie
2011-02-25 09:24:15 +10:00
parent 903726d285
commit 83ebc01c1d
2 changed files with 33 additions and 0 deletions

View File

@@ -416,6 +416,22 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.S3_s3tc = GL_TRUE;
}
if (screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_UNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW, 0) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC1_SNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW, 0) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_UNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW, 0) &&
screen->is_format_supported(screen, PIPE_FORMAT_RGTC2_SNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW, 0)
) {
ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
}
/* ycbcr support */
if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY,
PIPE_TEXTURE_2D, 0,