diff --git a/intern/cycles/util/math_float3.h b/intern/cycles/util/math_float3.h index 63872e19c02..a1231977831 100644 --- a/intern/cycles/util/math_float3.h +++ b/intern/cycles/util/math_float3.h @@ -158,7 +158,7 @@ ccl_device_inline float3 operator/=(float3 &a, float f) return a = a * invf; } -# if !(defined(__KERNEL_METAL__) || defined(__KERNEL_CUDA__)) +# if !(defined(__KERNEL_METAL__) || defined(__KERNEL_CUDA__) || defined(__KERNEL_HIP__)) ccl_device_inline packed_float3 operator*=(packed_float3 &a, const float3 b) { a = float3(a) * b; diff --git a/intern/cycles/util/types_float3.h b/intern/cycles/util/types_float3.h index 303ffe81c00..47e17959e74 100644 --- a/intern/cycles/util/types_float3.h +++ b/intern/cycles/util/types_float3.h @@ -63,11 +63,10 @@ ccl_device_inline void print_float3(ccl_private const char *label, const float3 * CPU SIMD instructions can be used. */ #if defined(__KERNEL_METAL__) /* Metal has native packed_float3. */ -#elif defined(__KERNEL_CUDA__) -/* CUDA float3 is already packed. */ +#elif defined(__KERNEL_CUDA__) || defined(__KERNEL_HIP__) +/* CUDA and HIP float3 are already packed. */ typedef float3 packed_float3; #else -/* HIP float3 is not packed (https://github.com/ROCm-Developer-Tools/HIP/issues/706). */ struct packed_float3 { ccl_device_inline_method packed_float3(){};