Merge branch 'llvm-cliptest-viewport'
[mesa.git] / src / mesa / state_tracker / st_cb_feedback.c
index 17261f8321bdaea6fa044bff16618d9924a1f234..5c01856f03381f67ec222a2f861e3b5ee63f6bd0 100644 (file)
@@ -40,7 +40,6 @@
 #include "main/imports.h"
 #include "main/context.h"
 #include "main/feedback.h"
-#include "main/macros.h"
 
 #include "vbo/vbo.h"
 
 #include "draw/draw_pipe.h"
 
 
+#if FEATURE_feedback
+
 /**
  * This is actually used for both feedback and selection.
  */
 struct feedback_stage
 {
    struct draw_stage stage;   /**< Base class */
-   GLcontext *ctx;            /**< Rendering context */
+   struct gl_context *ctx;            /**< Rendering context */
    GLboolean reset_stipple_counter;
 };
 
@@ -78,13 +79,12 @@ feedback_stage( struct draw_stage *stage )
 
 
 static void
-feedback_vertex(GLcontext *ctx, const struct draw_context *draw,
+feedback_vertex(struct gl_context *ctx, const struct draw_context *draw,
                 const struct vertex_header *v)
 {
-   const struct st_context *st = ctx->st;
+   const struct st_context *st = st_context(ctx);
    GLfloat win[4];
    const GLfloat *color, *texcoord;
-   const GLfloat ci = 0;
    GLuint slot;
 
    /* Recall that Y=0=Top of window for Gallium wincoords */
@@ -110,7 +110,7 @@ feedback_vertex(GLcontext *ctx, const struct draw_context *draw,
    else
       texcoord = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
 
-   _mesa_feedback_vertex(ctx, win, color, ci, texcoord);
+   _mesa_feedback_vertex(ctx, win, color, texcoord);
 }
 
 
@@ -179,7 +179,7 @@ feedback_destroy( struct draw_stage *stage )
  * Create GL feedback drawing stage.
  */
 static struct draw_stage *
-draw_glfeedback_stage(GLcontext *ctx, struct draw_context *draw)
+draw_glfeedback_stage(struct gl_context *ctx, struct draw_context *draw)
 {
    struct feedback_stage *fs = ST_CALLOC_STRUCT(feedback_stage);
 
@@ -252,7 +252,7 @@ select_destroy( struct draw_stage *stage )
  * Create GL selection mode drawing stage.
  */
 static struct draw_stage *
-draw_glselect_stage(GLcontext *ctx, struct draw_context *draw)
+draw_glselect_stage(struct gl_context *ctx, struct draw_context *draw)
 {
    struct feedback_stage *fs = ST_CALLOC_STRUCT(feedback_stage);
 
@@ -271,9 +271,9 @@ draw_glselect_stage(GLcontext *ctx, struct draw_context *draw)
 
 
 static void
-st_RenderMode(GLcontext *ctx, GLenum newMode )
+st_RenderMode(struct gl_context *ctx, GLenum newMode )
 {
-   struct st_context *st = ctx->st;
+   struct st_context *st = st_context(ctx);
    struct draw_context *draw = st->draw;
 
    if (newMode == GL_RENDER) {
@@ -304,3 +304,5 @@ void st_init_feedback_functions(struct dd_function_table *functions)
 {
    functions->RenderMode = st_RenderMode;
 }
+
+#endif /* FEATURE_feedback */