meta: Fix compilation without FEATURE_EXT_transform_feedback
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Wed, 29 Feb 2012 15:36:22 +0000 (16:36 +0100)
committerBenjamin Franzke <benjaminfranzke@googlemail.com>
Mon, 5 Mar 2012 19:35:23 +0000 (20:35 +0100)
That is when building with --disable-opengl.
Fix for commit cb045880b113b0042d8dfb7e4cdf76e6cc76c1d1.

CC: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/common/meta.c

index f7fa7b95864e822cf1bcf38aa511f3a06361155f..95336fc282b4e34fe619372e423e431007e741b9 100644 (file)
@@ -184,7 +184,9 @@ struct save_state
    /** Miscellaneous (always disabled) */
    GLboolean Lighting;
    GLboolean RasterDiscard;
+#if FEATURE_EXT_transform_feedback
    GLboolean TransformFeedbackNeedsResume;
+#endif
 };
 
 /**
@@ -427,6 +429,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
    memset(save, 0, sizeof(*save));
    save->SavedState = state;
 
+#if FEATURE_EXT_transform_feedback
    /* Pausing transform feedback needs to be done early, or else we won't be
     * able to change other state.
     */
@@ -435,6 +438,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
       !ctx->TransformFeedback.CurrentObject->Paused;
    if (save->TransformFeedbackNeedsResume)
       _mesa_PauseTransformFeedback();
+#endif
 
    if (state & MESA_META_ALPHA_TEST) {
       save->AlphaEnabled = ctx->Color.AlphaEnabled;
@@ -1007,8 +1011,10 @@ _mesa_meta_end(struct gl_context *ctx)
    if (save->RasterDiscard) {
       _mesa_set_enable(ctx, GL_RASTERIZER_DISCARD, GL_TRUE);
    }
+#if FEATURE_EXT_transform_feedback
    if (save->TransformFeedbackNeedsResume)
       _mesa_ResumeTransformFeedback();
+#endif
 }