Commit d9729399 authored by Erik Faye-Lund 's avatar Erik Faye-Lund

mesa/main: do not allow sRGB texture enums before gles3

ctx->Extensions.EXT_texture_sRGB is set regardless of the API that's
used, so checking for those direcly will always allow the enums from
this extensions when they are supported by the driver.

There's no extension adding support for this on OpenGL ES before
version 3.0, so let's tighten the check.
Signed-off-by: Erik Faye-Lund 's avatarErik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
parent 3629ee02
......@@ -2450,7 +2450,7 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat)
}
}
if (ctx->Extensions.EXT_texture_sRGB) {
if (_mesa_has_EXT_texture_sRGB(ctx) || _mesa_is_gles3(ctx)) {
switch (internalFormat) {
case GL_SRGB_EXT:
case GL_SRGB8_EXT:
......
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