summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-04-23 18:08:20 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-04-23 18:08:20 -0600
commit14d1ca8d867d6e44c756cb759f92421107118b2e (patch)
treed68f30e4928d571e7d7b833885949715f57cc743 /src/gallium/auxiliary/draw/draw_pipe_aapoint.c
parent8437f5c763c1a1ac364d71426109c2b095bbcc72 (diff)
gallium: fix issues in recursive flushing
When flushing/rendering, some stages (like AA line/point) need to set pipe/driver state. Those driver functions often call draw_flush(). That leads to recursion. Use new draw->suspend_flush flag to explicitly prevent that in the key places. Remove the draw->vcache_flushing field. Reuse draw->flushing as a debug/assertion var.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_aapoint.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aapoint.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
index 8c38c15d86..122a48660a 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
@@ -537,11 +537,16 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
static boolean
bind_aapoint_fragment_shader(struct aapoint_stage *aapoint)
{
+ struct draw_context *draw = aapoint->stage.draw;
+
if (!aapoint->fs->aapoint_fs &&
!generate_aapoint_fs(aapoint))
return FALSE;
+ draw->suspend_flushing = TRUE;
aapoint->driver_bind_fs_state(aapoint->pipe, aapoint->fs->aapoint_fs);
+ draw->suspend_flushing = FALSE;
+
return TRUE;
}
@@ -714,7 +719,9 @@ aapoint_flush(struct draw_stage *stage, unsigned flags)
stage->next->flush( stage->next, flags );
/* restore original frag shader */
+ draw->suspend_flushing = TRUE;
aapoint->driver_bind_fs_state(pipe, aapoint->fs->driver_fs);
+ draw->suspend_flushing = FALSE;
draw->extra_vp_outputs.slot = 0;
}