mesa: add ARB_vertex_attrib_64bit VertexArrayVertexAttribLOffsetEXT
[mesa.git] / src / mesa / main / draw_validate.c
index 29304bd5144a816b7031ae821f31bb6efb52e9fa..779cd1c12c74d9146850d937fa34d74e073e9737 100644 (file)
@@ -304,6 +304,25 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
                      "%s(tess ctrl shader is missing)", function);
          return false;
       }
+
+      /* From GL_EXT_color_buffer_float:
+       *
+       *     "Blending applies only if the color buffer has a fixed-point or
+       *     or floating-point format. If the color buffer has an integer
+       *     format, proceed to the next operation.  Furthermore, an
+       *     INVALID_OPERATION error is generated by DrawArrays and the other
+       *     drawing commands defined in section 2.8.3 (10.5 in ES 3.1) if
+       *     blending is enabled (see below) and any draw buffer has 32-bit
+       *     floating-point format components."
+       *
+       * However GL_EXT_float_blend removes this text.
+       */
+      if (!ctx->Extensions.EXT_float_blend &&
+          (ctx->DrawBuffer->_FP32Buffers & ctx->Color.BlendEnabled)) {
+         _mesa_error(ctx, GL_INVALID_OPERATION,
+                     "%s(32-bit float output + blending)", function);
+         return false;
+      }
       break;
 
    case API_OPENGL_CORE:
@@ -1100,7 +1119,7 @@ valid_draw_indirect(struct gl_context *ctx,
     * buffer bound.
     */
    if (_mesa_is_gles31(ctx) &&
-       ctx->Array.VAO->_Enabled & ~ctx->Array.VAO->VertexAttribBufferMask) {
+       ctx->Array.VAO->Enabled & ~ctx->Array.VAO->VertexAttribBufferMask) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "%s(No VBO bound)", name);
       return GL_FALSE;
    }