summaryrefslogtreecommitdiff
path: root/r600/lib/synchronization/barrier.cl
diff options
context:
space:
mode:
Diffstat (limited to 'r600/lib/synchronization/barrier.cl')
-rw-r--r--r600/lib/synchronization/barrier.cl15
1 files changed, 15 insertions, 0 deletions
diff --git a/r600/lib/synchronization/barrier.cl b/r600/lib/synchronization/barrier.cl
new file mode 100644
index 0000000..ac0b4b3
--- /dev/null
+++ b/r600/lib/synchronization/barrier.cl
@@ -0,0 +1,15 @@
+
+#include <clc/clc.h>
+
+void barrier_local(void);
+void barrier_global(void);
+
+void barrier(cl_mem_fence_flags flags) {
+ if (flags & CLK_LOCAL_MEM_FENCE) {
+ barrier_local();
+ }
+
+ if (flags & CLK_GLOBAL_MEM_FENCE) {
+ barrier_global();
+ }
+}