|
Blender
V3.3
|
#include <metal_atomic>#include <metal_pack>#include <metal_stdlib>#include <simd/simd.h>#include "util/half.h"#include "util/types.h"Go to the source code of this file.
Classes | |
| struct | Texture2DParamsMetal |
| struct | Texture3DParamsMetal |
| struct | MetalAncillaries |
Macros | |
| #define | __KERNEL_GPU__ |
| #define | __KERNEL_METAL__ |
| #define | CCL_NAMESPACE_BEGIN |
| #define | CCL_NAMESPACE_END |
| #define | ATTR_FALLTHROUGH |
| #define | ccl_device |
| #define | ccl_device_inline ccl_device __attribute__((always_inline)) |
| #define | ccl_device_forceinline ccl_device __attribute__((always_inline)) |
| #define | ccl_device_noinline ccl_device __attribute__((noinline)) |
| #define | ccl_device_noinline_cpu ccl_device |
| #define | ccl_device_inline_method ccl_device |
| #define | ccl_global device |
| #define | ccl_inline_constant static constant constexpr |
| #define | ccl_device_constant constant |
| #define | ccl_constant constant |
| #define | ccl_gpu_shared threadgroup |
| #define | ccl_private thread |
| #define | ccl_may_alias |
| #define | ccl_restrict __restrict |
| #define | ccl_loop_no_unroll |
| #define | ccl_align(n) alignas(n) |
| #define | ccl_optional_struct_init |
| #define | kernel_assert(cond) |
| #define | ccl_gpu_global_id_x() metal_global_id |
| #define | ccl_gpu_warp_size simdgroup_size |
| #define | ccl_gpu_thread_idx_x simd_group_index |
| #define | ccl_gpu_thread_mask(thread_warp) uint64_t((1ull << thread_warp) - 1) |
| #define | ccl_gpu_ballot(predicate) ((uint64_t)((simd_vote::vote_t)simd_ballot(predicate))) |
| #define | ccl_gpu_syncthreads() threadgroup_barrier(mem_flags::mem_threadgroup); |
| #define | ccl_gpu_kernel(block_num_threads, thread_num_registers) |
| #define | ccl_gpu_kernel_threads(block_num_threads) |
| #define | FN0() |
| #define | FN1(p1) p1; |
| #define | FN2(p1, p2) p1; p2; |
| #define | FN3(p1, p2, p3) p1; p2; p3; |
| #define | FN4(p1, p2, p3, p4) p1; p2; p3; p4; |
| #define | FN5(p1, p2, p3, p4, p5) p1; p2; p3; p4; p5; |
| #define | FN6(p1, p2, p3, p4, p5, p6) p1; p2; p3; p4; p5; p6; |
| #define | FN7(p1, p2, p3, p4, p5, p6, p7) p1; p2; p3; p4; p5; p6; p7; |
| #define | FN8(p1, p2, p3, p4, p5, p6, p7, p8) p1; p2; p3; p4; p5; p6; p7; p8; |
| #define | FN9(p1, p2, p3, p4, p5, p6, p7, p8, p9) p1; p2; p3; p4; p5; p6; p7; p8; p9; |
| #define | FN10(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; |
| #define | FN11(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; |
| #define | FN12(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; |
| #define | FN13(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; |
| #define | FN14(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; |
| #define | FN15(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; |
| #define | FN16(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; |
| #define | FN17(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; p17; |
| #define | FN18(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; p17; p18; |
| #define | FN19(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; p17; p18; p19; |
| #define | FN20(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20) p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; p17; p18; p19; p20; |
| #define | GET_LAST_ARG(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, ...) p20 |
| #define | PARAMS_MAKER(...) GET_LAST_ARG(__VA_ARGS__, FN20, FN19, FN18, FN17, FN16, FN15, FN14, FN13, FN12, FN11, FN10, FN9, FN8, FN7, FN6, FN5, FN4, FN3, FN2, FN1, FN0) |
| #define | ccl_gpu_kernel_signature(name, ...) |
| #define | ccl_gpu_kernel_postfix |
| #define | ccl_gpu_kernel_call(x) context.x |
| #define | ccl_gpu_kernel_lambda(func, ...) |
| #define | VOLUME_READ_LAMBDA(function_call) |
| #define | VOLUME_WRITE_LAMBDA(function_call) |
| #define | make_float2(x, y) float2(x, y) |
| #define | make_float3(x, y, z) float3(x, y, z) |
| #define | make_float4(x, y, z, w) float4(x, y, z, w) |
| #define | make_int2(x, y) int2(x, y) |
| #define | make_int3(x, y, z) int3(x, y, z) |
| #define | make_int4(x, y, z, w) int4(x, y, z, w) |
| #define | make_uchar4(x, y, z, w) uchar4(x, y, z, w) |
| #define | __uint_as_float(x) as_type<float>(x) |
| #define | __float_as_uint(x) as_type<uint>(x) |
| #define | __int_as_float(x) as_type<float>(x) |
| #define | __float_as_int(x) as_type<int>(x) |
| #define | __float2half(x) half(x) |
| #define | powf(x, y) pow(float(x), float(y)) |
| #define | fabsf(x) fabs(float(x)) |
| #define | copysignf(x, y) copysign(float(x), float(y)) |
| #define | asinf(x) asin(float(x)) |
| #define | acosf(x) acos(float(x)) |
| #define | atanf(x) atan(float(x)) |
| #define | floorf(x) floor(float(x)) |
| #define | ceilf(x) ceil(float(x)) |
| #define | hypotf(x, y) hypot(float(x), float(y)) |
| #define | atan2f(x, y) atan2(float(x), float(y)) |
| #define | fmaxf(x, y) fmax(float(x), float(y)) |
| #define | fminf(x, y) fmin(float(x), float(y)) |
| #define | fmodf(x, y) fmod(float(x), float(y)) |
| #define | sinhf(x) sinh(float(x)) |
| #define | coshf(x) cosh(float(x)) |
| #define | tanhf(x) tanh(float(x)) |
| #define | saturatef(x) saturate(float(x)) |
| #define | trigmode fast |
| #define | sinf(x) trigmode::sin(float(x)) |
| #define | cosf(x) trigmode::cos(float(x)) |
| #define | tanf(x) trigmode::tan(float(x)) |
| #define | expf(x) trigmode::exp(float(x)) |
| #define | sqrtf(x) trigmode::sqrt(float(x)) |
| #define | logf(x) trigmode::log(float(x)) |
| #define | NULL 0 |
| #define | __device__ |
Variables | |
| constexpr constant array< sampler, SamplerCount > | metal_samplers |
| #define __device__ |
Definition at line 248 of file metal/compat.h.
Definition at line 216 of file metal/compat.h.
| #define __KERNEL_GPU__ |
Definition at line 6 of file metal/compat.h.
| #define __KERNEL_METAL__ |
Definition at line 7 of file metal/compat.h.
| #define ATTR_FALLTHROUGH |
Definition at line 12 of file metal/compat.h.
| #define ccl_align | ( | n | ) | alignas(n) |
Definition at line 52 of file metal/compat.h.
| #define ccl_constant constant |
Definition at line 46 of file metal/compat.h.
| #define ccl_device |
Definition at line 32 of file metal/compat.h.
| #define ccl_device_constant constant |
Definition at line 45 of file metal/compat.h.
| #define ccl_device_forceinline ccl_device __attribute__((always_inline)) |
Definition at line 34 of file metal/compat.h.
| #define ccl_device_inline ccl_device __attribute__((always_inline)) |
Definition at line 33 of file metal/compat.h.
| #define ccl_device_inline_method ccl_device |
Definition at line 42 of file metal/compat.h.
| #define ccl_device_noinline ccl_device __attribute__((noinline)) |
Definition at line 38 of file metal/compat.h.
| #define ccl_device_noinline_cpu ccl_device |
Definition at line 41 of file metal/compat.h.
| #define ccl_global device |
Definition at line 43 of file metal/compat.h.
Definition at line 64 of file metal/compat.h.
| #define ccl_gpu_global_id_x | ( | ) | metal_global_id |
Definition at line 59 of file metal/compat.h.
| #define ccl_gpu_kernel | ( | block_num_threads, | |
| thread_num_registers | |||
| ) |
Definition at line 71 of file metal/compat.h.
Definition at line 141 of file metal/compat.h.
| #define ccl_gpu_kernel_lambda | ( | func, | |
| ... | |||
| ) |
Definition at line 144 of file metal/compat.h.
| #define ccl_gpu_kernel_postfix |
Definition at line 140 of file metal/compat.h.
| #define ccl_gpu_kernel_signature | ( | name, | |
| ... | |||
| ) |
Definition at line 102 of file metal/compat.h.
| #define ccl_gpu_kernel_threads | ( | block_num_threads | ) |
Definition at line 72 of file metal/compat.h.
| #define ccl_gpu_shared threadgroup |
Definition at line 47 of file metal/compat.h.
| #define ccl_gpu_syncthreads | ( | ) | threadgroup_barrier(mem_flags::mem_threadgroup); |
Definition at line 65 of file metal/compat.h.
| #define ccl_gpu_thread_idx_x simd_group_index |
Definition at line 61 of file metal/compat.h.
Definition at line 62 of file metal/compat.h.
| #define ccl_gpu_warp_size simdgroup_size |
Definition at line 60 of file metal/compat.h.
| #define ccl_inline_constant static constant constexpr |
Definition at line 44 of file metal/compat.h.
| #define ccl_loop_no_unroll |
Definition at line 51 of file metal/compat.h.
| #define ccl_may_alias |
Definition at line 49 of file metal/compat.h.
| #define CCL_NAMESPACE_BEGIN |
Definition at line 8 of file metal/compat.h.
| #define CCL_NAMESPACE_END |
Definition at line 9 of file metal/compat.h.
| #define ccl_optional_struct_init |
Definition at line 53 of file metal/compat.h.
Definition at line 48 of file metal/compat.h.
| #define ccl_restrict __restrict |
Definition at line 50 of file metal/compat.h.
Definition at line 220 of file metal/compat.h.
| #define expf | ( | x | ) | trigmode::exp(float(x)) |
Definition at line 242 of file metal/compat.h.
| #define FN0 | ( | ) |
Definition at line 76 of file metal/compat.h.
| #define FN1 | ( | p1 | ) | p1; |
Definition at line 77 of file metal/compat.h.
| #define FN10 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; |
Definition at line 86 of file metal/compat.h.
| #define FN11 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; |
Definition at line 87 of file metal/compat.h.
| #define FN12 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; |
Definition at line 88 of file metal/compat.h.
| #define FN13 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; |
Definition at line 89 of file metal/compat.h.
| #define FN14 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13, | |||
| p14 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; |
Definition at line 90 of file metal/compat.h.
| #define FN15 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13, | |||
| p14, | |||
| p15 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; |
Definition at line 91 of file metal/compat.h.
| #define FN16 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13, | |||
| p14, | |||
| p15, | |||
| p16 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; |
Definition at line 92 of file metal/compat.h.
| #define FN17 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13, | |||
| p14, | |||
| p15, | |||
| p16, | |||
| p17 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; p17; |
Definition at line 93 of file metal/compat.h.
| #define FN18 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13, | |||
| p14, | |||
| p15, | |||
| p16, | |||
| p17, | |||
| p18 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; p17; p18; |
Definition at line 94 of file metal/compat.h.
| #define FN19 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13, | |||
| p14, | |||
| p15, | |||
| p16, | |||
| p17, | |||
| p18, | |||
| p19 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; p17; p18; p19; |
Definition at line 95 of file metal/compat.h.
| #define FN2 | ( | p1, | |
| p2 | |||
| ) | p1; p2; |
Definition at line 78 of file metal/compat.h.
| #define FN20 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13, | |||
| p14, | |||
| p15, | |||
| p16, | |||
| p17, | |||
| p18, | |||
| p19, | |||
| p20 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13; p14; p15; p16; p17; p18; p19; p20; |
Definition at line 96 of file metal/compat.h.
| #define FN3 | ( | p1, | |
| p2, | |||
| p3 | |||
| ) | p1; p2; p3; |
Definition at line 79 of file metal/compat.h.
| #define FN4 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4 | |||
| ) | p1; p2; p3; p4; |
Definition at line 80 of file metal/compat.h.
| #define FN5 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5 | |||
| ) | p1; p2; p3; p4; p5; |
Definition at line 81 of file metal/compat.h.
| #define FN6 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6 | |||
| ) | p1; p2; p3; p4; p5; p6; |
Definition at line 82 of file metal/compat.h.
| #define FN7 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; |
Definition at line 83 of file metal/compat.h.
| #define FN8 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; |
Definition at line 84 of file metal/compat.h.
| #define FN9 | ( | p1, | |
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9 | |||
| ) | p1; p2; p3; p4; p5; p6; p7; p8; p9; |
Definition at line 85 of file metal/compat.h.
| #define GET_LAST_ARG | ( | p0, | |
| p1, | |||
| p2, | |||
| p3, | |||
| p4, | |||
| p5, | |||
| p6, | |||
| p7, | |||
| p8, | |||
| p9, | |||
| p10, | |||
| p11, | |||
| p12, | |||
| p13, | |||
| p14, | |||
| p15, | |||
| p16, | |||
| p17, | |||
| p18, | |||
| p19, | |||
| p20, | |||
| ... | |||
| ) | p20 |
Definition at line 97 of file metal/compat.h.
| #define kernel_assert | ( | cond | ) |
Definition at line 57 of file metal/compat.h.
| #define logf | ( | x | ) | trigmode::log(float(x)) |
Definition at line 244 of file metal/compat.h.
Definition at line 205 of file metal/compat.h.
Definition at line 209 of file metal/compat.h.
| return NULL 0 |
Definition at line 246 of file metal/compat.h.
| #define PARAMS_MAKER | ( | ... | ) | GET_LAST_ARG(__VA_ARGS__, FN20, FN19, FN18, FN17, FN16, FN15, FN14, FN13, FN12, FN11, FN10, FN9, FN8, FN7, FN6, FN5, FN4, FN3, FN2, FN1, FN0) |
Definition at line 98 of file metal/compat.h.
| #define sqrtf | ( | x | ) | trigmode::sqrt(float(x)) |
Definition at line 243 of file metal/compat.h.
| #define trigmode fast |
Definition at line 238 of file metal/compat.h.
| #define VOLUME_READ_LAMBDA | ( | function_call | ) |
| #define VOLUME_WRITE_LAMBDA | ( | function_call | ) |
Definition at line 168 of file metal/compat.h.
| enum SamplerType |
Definition at line 288 of file metal/compat.h.
|
constexpr |
Definition at line 300 of file metal/compat.h.