diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-07-25 22:16:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-07-26 01:17:37 +0300 |
commit | 4cf6524731c0856bfc6d6c0b7bcb2df0ad28b97a (patch) | |
tree | 8eec2e3f32155310e1605a4205102709341c0267 /intern/cycles/util/types_float8_impl.h | |
parent | f76a2c0d1895a43b932eb5e458732e54b6aa17c7 (diff) |
Fix Cycles Metal build errors after recent changes
float8 is a reserved type in Metal, but is not implemented. So rename to
float8_t for now.
Also move back intersection handlers to kernel.metal, they can't be in the
class that encapsulates the other Metal kernel functions.
Diffstat (limited to 'intern/cycles/util/types_float8_impl.h')
-rw-r--r-- | intern/cycles/util/types_float8_impl.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/intern/cycles/util/types_float8_impl.h b/intern/cycles/util/types_float8_impl.h index 21931c55071..2ab464a791b 100644 --- a/intern/cycles/util/types_float8_impl.h +++ b/intern/cycles/util/types_float8_impl.h @@ -16,29 +16,29 @@ CCL_NAMESPACE_BEGIN #ifdef __KERNEL_AVX2__ -__forceinline float8::float8() +__forceinline float8_t::float8_t() { } -__forceinline float8::float8(const float8 &f) : m256(f.m256) +__forceinline float8_t::float8_t(const float8_t &f) : m256(f.m256) { } -__forceinline float8::float8(const __m256 &f) : m256(f) +__forceinline float8_t::float8_t(const __m256 &f) : m256(f) { } -__forceinline float8::operator const __m256 &() const +__forceinline float8_t::operator const __m256 &() const { return m256; } -__forceinline float8::operator __m256 &() +__forceinline float8_t::operator __m256 &() { return m256; } -__forceinline float8 &float8::operator=(const float8 &f) +__forceinline float8_t &float8_t::operator=(const float8_t &f) { m256 = f.m256; return *this; @@ -46,14 +46,14 @@ __forceinline float8 &float8::operator=(const float8 &f) #endif /* __KERNEL_AVX2__ */ #ifndef __KERNEL_GPU__ -__forceinline float float8::operator[](int i) const +__forceinline float float8_t::operator[](int i) const { util_assert(i >= 0); util_assert(i < 8); return *(&a + i); } -__forceinline float &float8::operator[](int i) +__forceinline float &float8_t::operator[](int i) { util_assert(i >= 0); util_assert(i < 8); @@ -61,23 +61,23 @@ __forceinline float &float8::operator[](int i) } #endif -ccl_device_inline float8 make_float8(float f) +ccl_device_inline float8_t make_float8_t(float f) { #ifdef __KERNEL_AVX2__ - float8 r(_mm256_set1_ps(f)); + float8_t r(_mm256_set1_ps(f)); #else - float8 r = {f, f, f, f, f, f, f, f}; + float8_t r = {f, f, f, f, f, f, f, f}; #endif return r; } -ccl_device_inline float8 -make_float8(float a, float b, float c, float d, float e, float f, float g, float h) +ccl_device_inline float8_t +make_float8_t(float a, float b, float c, float d, float e, float f, float g, float h) { #ifdef __KERNEL_AVX2__ - float8 r(_mm256_setr_ps(a, b, c, d, e, f, g, h)); + float8_t r(_mm256_setr_ps(a, b, c, d, e, f, g, h)); #else - float8 r = {a, b, c, d, e, f, g, h}; + float8_t r = {a, b, c, d, e, f, g, h}; #endif return r; } |