mesa: allow unsized formats GL_RG, GL_RED for GLES 3.0 with half float
authorTapani Pälli <tapani.palli@intel.com>
Mon, 8 Jun 2015 11:53:26 +0000 (14:53 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 10 Jun 2015 09:59:50 +0000 (12:59 +0300)
v2: && -> ||, we enable on gles3 or if ARB_texture_rg is enabled

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/glformats.c

index 6a77c916a9c695b630493e73ad3e3f6b02918ae4..057a5d160b4145d22ed6e3a6ffed5a2d7baf3dad 100644 (file)
@@ -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) || ctx->Extensions.ARB_texture_rg)
+            return GL_NO_ERROR;
       default:
          return GL_INVALID_OPERATION;
       }