Commit aa4d47f6 authored by Marek Olšák's avatar Marek Olšák

st/mesa: do not advertise S3TC if the external lib is not available

parent d36e3952
......@@ -299,8 +299,12 @@ void st_init_extensions(struct st_context *st)
/* s3tc support */
if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0) &&
(ctx->Mesa_DXTn ||
screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0))) {
ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
ctx->Extensions.S3_s3tc = GL_TRUE;
}
......
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