From 0e3b27c78a33c455e48bcb31da610ea2d026afcf 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 | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 6a77c91..1affebc 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2361,19 +2361,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