From cee5585da7e8a164952347c8dbf72844cad85d9d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 1 May 2017 09:51:01 -0700 Subject: mesa: Only expose GLES's EXT_texture_type_2_10_10_10_REV if supported in HW. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, we were downconverting to 8888 automatically if the hardware didn't suport it. However, with the advent of GL_OES_required_internalformat, we have to actually store the internalformats we advertise support for. And, it seems rather disingenuous to advertise the extension if we don't actually support it. v2: Throw an error when using the format on ES2 without the extension present. Reviewed-by: Nicolai Hähnle --- src/mesa/main/glformats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/glformats.c') diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 4f240206ff4..aec41f07993 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2234,7 +2234,8 @@ _mesa_es_error_check_format_and_type(const struct gl_context *ctx, || type == GL_UNSIGNED_SHORT_5_5_5_1 || type == GL_FLOAT || type == GL_HALF_FLOAT_OES - || type == GL_UNSIGNED_INT_2_10_10_10_REV); + || (ctx->Extensions.EXT_texture_type_2_10_10_10_REV && + type == GL_UNSIGNED_INT_2_10_10_10_REV)); break; case GL_DEPTH_COMPONENT: -- cgit v1.2.3