File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,10 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
343
343
set ( opt_flags -O3 )
344
344
endif ()
345
345
346
+ # Enable SPIR-V builtin function declarations, so they don't
347
+ # have to be explicity declared in the soruce.
348
+ list ( APPEND flags -Xclang -fdeclare-spirv-builtins )
349
+
346
350
add_libclc_builtin_set (libspirv-${arch_suffix}
347
351
TRIPLE ${t}
348
352
TARGET_ENV libspirv
Original file line number Diff line number Diff line change 1
1
#include <clc/clc.h>
2
2
3
- _CLC_OVERLOAD _CLC_DEF void __spirv_MemoryBarrier (unsigned int memory ,
4
- unsigned int semantics );
5
-
6
3
// We don't have separate mechanism for read and write fences
7
4
_CLC_DEF _CLC_OVERLOAD void read_mem_fence (cl_mem_fence_flags flags ) {
8
5
__spirv_MemoryBarrier (flags , 1 );
Original file line number Diff line number Diff line change 1
1
#include <clc/clc.h>
2
2
3
- _CLC_OVERLOAD _CLC_DEF _CLC_CONVERGENT void
4
- __spirv_ControlBarrier (unsigned int scope , unsigned int memory ,
5
- unsigned int semantics );
6
-
7
3
_CLC_DEF _CLC_OVERLOAD void barrier (cl_mem_fence_flags flags ) {
8
4
// Call spir-v implementation of the barrier.
9
5
// Set semantics to not None, so it performs mem fence.
You can’t perform that action at this time.
0 commit comments