diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index c5a7026..88afa0a 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -830,8 +830,9 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format, * these textures to be used as a render target, this is done via * GL_EXT_color_buffer(_half)_float with set of new sized types. */ - if (_mesa_is_gles(ctx) && (texImage->TexObject->_IsFloat || - texImage->TexObject->_IsHalfFloat)) { + if ((_mesa_is_gles(ctx) && ctx->Version < 30) && + (texImage->TexObject->_IsFloat || + texImage->TexObject->_IsHalfFloat)) { att_incomplete("bad internal format"); att->Complete = GL_FALSE; return; diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 6a77c91..8dc1639 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -1678,6 +1678,10 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_LUMINANCE: case GL_ALPHA: return GL_NO_ERROR; + case GL_RG: + case GL_RED: + if (_mesa_is_gles3(ctx)) + return GL_NO_ERROR; default: return GL_INVALID_OPERATION; } @@ -2291,20 +2295,14 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, return GL_INVALID_OPERATION; break; + case GL_HALF_FLOAT_OES: 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 +2359,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;