aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2018-11-16 11:30:34 +0100
committerErik Faye-Lund <[email protected]>2018-12-03 18:16:44 +0100
commitc4136ed5cc07a73c01d24a1c17ebe71e2690aef7 (patch)
treea89022cfda038e8f88cb0a3802264e8d29aa833c /src
parentd97293998605003a89bd772f101254db302672f2 (diff)
mesa/main: do not allow EXT_texture_sRGB_R8 enums before gles3
ctx->Extensions.EXT_texture_sRGB_R8 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 <[email protected]> Reviewed-By: Gert Wollny <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/glformats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index b8fe32ca52a..4753465e50c 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -2473,7 +2473,7 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat)
}
}
- if (ctx->Extensions.EXT_texture_sRGB_R8) {
+ if (_mesa_has_EXT_texture_sRGB_R8(ctx)) {
switch (internalFormat) {
case GL_SR8_EXT:
return GL_RED;
@@ -3212,7 +3212,7 @@ _mesa_gles_error_check_format_and_type(const struct gl_context *ctx,
case GL_UNSIGNED_BYTE:
if (internalFormat == GL_R8 ||
((internalFormat == GL_SR8_EXT) &&
- ctx->Extensions.EXT_texture_sRGB_R8))
+ _mesa_has_EXT_texture_sRGB_R8(ctx)))
break;
return GL_INVALID_OPERATION;