diff options
author | Erik Faye-Lund <[email protected]> | 2018-11-15 16:55:46 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2018-12-03 18:16:44 +0100 |
commit | 3bbd543b6ef1a59e5edb940915d822514a43e467 (patch) | |
tree | 7b356b09f7327181e56ce97db40e271f63cf7635 /src | |
parent | b5a370dc250d4e5de1a2a598acfcae522e0e2bdf (diff) |
mesa/main: do not allow integer-texture enums before gles3
Integer textures shouldn't be implicitly exposed on OpenGL ES 1.x and
2.x, but because the code checked against a driver-capability rather
than using an extension-check helper, we ended up accidentally allowing
these enums on older versions when the driver supports it.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/glformats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 5cfdeafa359..76f1f9a28b7 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2142,7 +2142,7 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_UNSIGNED_SHORT: case GL_INT: case GL_UNSIGNED_INT: - return ctx->Extensions.EXT_texture_integer + return _mesa_has_integer_textures(ctx) ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; @@ -2508,7 +2508,7 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat) } } - if (ctx->Extensions.EXT_texture_integer) { + if (_mesa_has_integer_textures(ctx)) { switch (internalFormat) { case GL_ALPHA8UI_EXT: case GL_ALPHA16UI_EXT: |