Fix T76469: OpenCL 1.2 Compilation
Recent changes assumed OpenCL 2.0 platform. This adds a check to see if we are compiling on an OpenCL 2.0 platform. Patch was tested on: * AMD Radeon Pro WX 7100 with amdgpu-pro-19.50-1011208-ubuntu-18.04 drivers * AMD Vega 64 with amdgpu-pro-20.10-1048554-ubuntu-18.04 drivers * AMD RX 5700 with amdgpu-pro-20.10-1048554-ubuntu-18.04 drivers Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D7637
This commit is contained in:
parent
18dbc8f5c1
commit
ed1fb242a8
Notes:
blender-bot
2023-02-14 00:20:19 +01:00
Referenced by issue #76469, Cycles fails to compile opencl kernel
|
@ -43,12 +43,17 @@
|
|||
#define ccl_local __local
|
||||
#define ccl_local_param __local
|
||||
#define ccl_private __private
|
||||
#define ccl_loop_no_unroll __attribute__((opencl_unroll_hint(1)))
|
||||
#define ccl_restrict restrict
|
||||
#define ccl_ref
|
||||
#define ccl_align(n) __attribute__((aligned(n)))
|
||||
#define ccl_optional_struct_init
|
||||
|
||||
#if __OPENCL_VERSION__ >= 200
|
||||
# define ccl_loop_no_unroll __attribute__((opencl_unroll_hint(1)))
|
||||
#else
|
||||
# define ccl_loop_no_unroll
|
||||
#endif
|
||||
|
||||
#ifdef __SPLIT_KERNEL__
|
||||
# define ccl_addr_space __global
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue