Mesa (master): mesa: allow unsized formats GL_RG, GL_RED for GLES 3.0 with half float

Tapani Pälli tpalli at kemper.freedesktop.org
Wed Jun 10 10:03:37 UTC 2015


Module: Mesa
Branch: master
Commit: 07e4f12e66f64c8075c0d3fd1c23cbd7c657970c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=07e4f12e66f64c8075c0d3fd1c23cbd7c657970c

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Mon Jun  8 14:53:26 2015 +0300

mesa: allow unsized formats GL_RG, GL_RED for GLES 3.0 with half float

v2: && -> ||, we enable on gles3 or if ARB_texture_rg is enabled

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

---

 src/mesa/main/glformats.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 6a77c91..057a5d1 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) || ctx->Extensions.ARB_texture_rg)
+            return GL_NO_ERROR;
       default:
          return GL_INVALID_OPERATION;
       }




More information about the mesa-commit mailing list