From 2f651552d630fda9354999edba92dd7c4bc35791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 3 Jun 2015 10:06:45 +0300 Subject: [PATCH 1/3] mesa: do not check internalformat before adjustment is made MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit allow unsized internal format as long as format and internalformat match, internalformat will get adjusted by adjust_for_oes_float_texture later. Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748 --- src/mesa/main/glformats.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 6a77c91..8dda0bb 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2292,19 +2292,12 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, break; case GL_HALF_FLOAT: - if (internalFormat != GL_RG16F) - return GL_INVALID_OPERATION; - break; + if (ctx->Extensions.OES_texture_half_float && internalFormat == format) + break; case GL_FLOAT: - switch (internalFormat) { - case GL_RG16F: - case GL_RG32F: + if (ctx->Extensions.OES_texture_float && internalFormat == format) break; - default: - return GL_INVALID_OPERATION; - } - break; default: return GL_INVALID_OPERATION; @@ -2361,19 +2354,13 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, break; case GL_HALF_FLOAT: - if (internalFormat != GL_R16F) - return GL_INVALID_OPERATION; - break; + case GL_HALF_FLOAT_OES: + if (ctx->Extensions.OES_texture_half_float && internalFormat == format) + break; case GL_FLOAT: - switch (internalFormat) { - case GL_R16F: - case GL_R32F: + if (ctx->Extensions.OES_texture_float && internalFormat == format) break; - default: - return GL_INVALID_OPERATION; - } - break; default: return GL_INVALID_OPERATION; -- 2.1.0