mesa: improve debug log in atifragshader
[mesa.git] / src / mesa / main / context.c
index be542dd67973b7d80c91b54d4e6dbe2e787207c2..be983d4c86ab5b32b4afd9aa653827197bc62edd 100644 (file)
@@ -654,6 +654,9 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
    /* GL_EXT_provoking_vertex */
    consts->QuadsFollowProvokingVertexConvention = GL_TRUE;
 
+   /** GL_ARB_viewport_array */
+   consts->LayerAndVPIndexProvokingVertex = GL_UNDEFINED_VERTEX;
+
    /* GL_EXT_transform_feedback */
    consts->MaxTransformFeedbackBuffers = MAX_FEEDBACK_BUFFERS;
    consts->MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS;
@@ -2031,9 +2034,10 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
 
    /* A pipeline object is bound */
    if (ctx->_Shader->Name && !ctx->_Shader->Validated) {
-      /* Error message will be printed inside _mesa_validate_program_pipeline.
-       */
-      if (!_mesa_validate_program_pipeline(ctx, ctx->_Shader, GL_TRUE)) {
+      if (!_mesa_validate_program_pipeline(ctx, ctx->_Shader)) {
+         _mesa_error(ctx, GL_INVALID_OPERATION,
+                     "glValidateProgramPipeline failed to validate the "
+                     "pipeline");
          return GL_FALSE;
       }
    }