summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_flush.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-11 17:59:26 -0700
committerBrian Paul <brianp@vmware.com>2009-12-11 17:59:32 -0700
commit6cbb1219a3f6b83ee4d24aecb61f5b5943e3cac3 (patch)
treecfb26e7ed39661eec3aaf2d8376c8606b1139bed /src/gallium/drivers/llvmpipe/lp_flush.c
parent4b70af918dd9040a6987c6a55e76e49f0e3f90bf (diff)
llvmpipe: checkpoint: plug in the new fencing code
This has only been very lightly tested. More work to come.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_flush.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_flush.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c
index f7a1d89701..e6519cb216 100644
--- a/src/gallium/drivers/llvmpipe/lp_flush.c
+++ b/src/gallium/drivers/llvmpipe/lp_flush.c
@@ -49,6 +49,23 @@ llvmpipe_flush( struct pipe_context *pipe,
draw_flush(llvmpipe->draw);
+ if (fence) {
+ if ((flags & (PIPE_FLUSH_SWAPBUFFERS |
+ PIPE_FLUSH_RENDER_CACHE))) {
+ /* if we're going to flush the setup/rasterization modules, emit
+ * a fence.
+ * XXX this (and the code below) may need fine tuning...
+ */
+ *fence = lp_setup_fence( llvmpipe->setup );
+ }
+ else {
+ *fence = NULL;
+ }
+ }
+
+ /* XXX the lp_setup_flush(flags) param is not a bool, and it's ignored
+ * at this time!
+ */
if (flags & PIPE_FLUSH_SWAPBUFFERS) {
lp_setup_flush( llvmpipe->setup, FALSE );
}
@@ -68,8 +85,5 @@ llvmpipe_flush( struct pipe_context *pipe,
++frame_no;
}
#endif
-
- if (fence)
- *fence = NULL;
}