summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_setup.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_setup.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_setup.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index d976934a5d..3967b4f21e 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -39,6 +39,7 @@
#include "lp_bin.h"
#include "lp_bin_queue.h"
#include "lp_debug.h"
+#include "lp_fence.h"
#include "lp_state.h"
#include "lp_buffer.h"
#include "lp_texture.h"
@@ -308,6 +309,28 @@ lp_setup_clear( struct setup_context *setup,
}
+/**
+ * Emit a fence.
+ */
+struct pipe_fence_handle *
+lp_setup_fence( struct setup_context *setup )
+{
+ struct lp_bins *bins = lp_setup_get_current_bins(setup);
+ const unsigned rank = lp_bin_get_num_bins( bins );
+ struct lp_fence *fence = lp_fence_create(rank);
+
+ LP_DBG(DEBUG_SETUP, "%s rank %u\n", __FUNCTION__, rank);
+
+ set_state( setup, SETUP_ACTIVE );
+
+ /* insert the fence into all command bins */
+ lp_bin_everywhere( bins,
+ lp_rast_fence,
+ lp_rast_arg_fence(fence) );
+
+ return (struct pipe_fence_handle *) fence;
+}
+
void
lp_setup_set_triangle_state( struct setup_context *setup,