Cycles: Fixed OpenCL kernel build, it threw a compiler error.
authorStefan Werner <stefan.werner@tangent-animation.com>
Fri, 6 Jul 2018 08:21:02 +0000 (10:21 +0200)
committerStefan Werner <stefan.werner@tangent-animation.com>
Fri, 6 Jul 2018 08:21:25 +0000 (10:21 +0200)
intern/cycles/kernel/filter/filter_defines.h

index d48ea3ac1d61f20b9d033c22a67220c255d9c835..1a2f22a698709abb35d8fb654e67e22fc05185ea 100644 (file)
@@ -50,7 +50,15 @@ typedef struct TileInfo {
                                    tile_buffer_1, tile_buffer_2, tile_buffer_3, \
                                    tile_buffer_4, tile_buffer_5, tile_buffer_6, \
                                    tile_buffer_7, tile_buffer_8, tile_buffer_9
-#  define ccl_get_tile_buffer(id) (tile_buffer_ ## id)
+#  define ccl_get_tile_buffer(id) (id == 0 ? tile_buffer_1 \
+                                   : id == 1 ? tile_buffer_2 \
+                                   : id == 2 ? tile_buffer_3 \
+                                   : id == 3 ? tile_buffer_4 \
+                                   : id == 4 ? tile_buffer_5 \
+                                   : id == 5 ? tile_buffer_6 \
+                                   : id == 6 ? tile_buffer_7 \
+                                   : id == 7 ? tile_buffer_8 \
+                                   : tile_buffer_9)
 #else
 #  ifdef __KERNEL_CUDA__
 #    define CCL_FILTER_TILE_INFO ccl_global TileInfo* tile_info