summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-07-10 14:23:27 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-07-10 14:23:27 -0600
commitbae90edfdae0eac6c844ede21285453ef96a4f6e (patch)
tree70bc7159748ab1d1c42277664ac466a0cd2e3354
parentf5cdc657b244ec7840cff1f36892f105b4aa2ef2 (diff)
gallium: check for FEATURE_feedback and FEATURE_drawpix when creating/using the aux draw module
-rw-r--r--src/mesa/state_tracker/st_cb_program.c4
-rw-r--r--src/mesa/state_tracker/st_context.c4
-rw-r--r--src/mesa/state_tracker/st_draw.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 11ba5d56f3..ea0fa20012 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -144,9 +144,11 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
}
if (stvp->draw_shader) {
+#if FEATURE_feedback || FEATURE_drawpix
/* this would only have been allocated for the RasterPos path */
draw_delete_vertex_shader(st->draw, stvp->draw_shader);
stvp->draw_shader = NULL;
+#endif
}
if (stvp->state.tokens) {
@@ -232,9 +234,11 @@ static void st_program_string_notify( GLcontext *ctx,
}
if (stvp->draw_shader) {
+#if FEATURE_feedback || FEATURE_drawpix
/* this would only have been allocated for the RasterPos path */
draw_delete_vertex_shader(st->draw, stvp->draw_shader);
stvp->draw_shader = NULL;
+#endif
}
if (stvp->state.tokens) {
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index bf78cacb8e..8b30e35684 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -98,6 +98,7 @@ st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
/* state tracker needs the VBO module */
_vbo_CreateContext(ctx);
+#if FEATURE_feedback || FEATURE_drawpix
st->draw = draw_create(); /* for selection/feedback */
/* Disable draw options that might convert points/lines to tris, etc.
@@ -107,6 +108,7 @@ st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe )
draw_wide_point_threshold(st->draw, 1000.0f);
draw_enable_line_stipple(st->draw, FALSE);
draw_enable_point_sprites(st->draw, FALSE);
+#endif
st->dirty.mesa = ~0;
st->dirty.st = ~0;
@@ -164,7 +166,9 @@ static void st_destroy_context_priv( struct st_context *st )
{
uint i;
+#if FEATURE_feedback || FEATURE_drawpix
draw_destroy(st->draw);
+#endif
st_destroy_atoms( st );
st_destroy_draw( st );
st_destroy_generate_mipmap(st);
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index a57d7b6a7a..30c2bdb723 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -447,6 +447,7 @@ st_draw_vbo(GLcontext *ctx,
}
+#if FEATURE_feedback || FEATURE_drawpix
/**
* Set the (private) draw module's post-transformed vertex format when in
@@ -657,6 +658,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
}
}
+#endif /* FEATURE_feedback || FEATURE_drawpix */
void st_init_draw( struct st_context *st )