Revert "mesa: Return INVALID_OPERATION when type is known but not allowed"
authorMatt Turner <mattst88@gmail.com>
Wed, 30 Jan 2013 00:35:30 +0000 (16:35 -0800)
committerMatt Turner <mattst88@gmail.com>
Wed, 30 Jan 2013 18:56:01 +0000 (10:56 -0800)
This reverts commit 2906e2034c9d674601960a5b586b6e986e6ef04f.

Fixes a regression in the glean depthStencil test.

Reverting this does not affect any tests in es3conform, so a more recent
patch must have also fixed the failure this one was intended to fix.

Reported-by: lu hua <huax.lu@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59494

src/mesa/main/glformats.c

index 6160d8ecdd9f645d554cf76706d2c723fa7fcec7..8728540cf3536a9e6553c1b658d637d184b2180f 100644 (file)
@@ -1485,18 +1485,8 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,
          else if (ctx->Extensions.ARB_depth_buffer_float &&
              type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV)
             return GL_NO_ERROR;
-         switch (type) {
-         case GL_BYTE:
-         case GL_UNSIGNED_BYTE:
-         case GL_SHORT:
-         case GL_UNSIGNED_SHORT:
-         case GL_INT:
-         case GL_UNSIGNED_INT:
-         case GL_FLOAT:
-            return GL_INVALID_OPERATION;
-         default:
+         else
             return GL_INVALID_ENUM;
-         }
 
       case GL_DUDV_ATI:
       case GL_DU8DV8_ATI: