Change packed_float3 to internal float3 for HIP
Remove a workaround for no built in vector type in HIP fixed in ROCM 5.1: https://github.com/ROCm-Developer-Tools/HIP/issues/706 Shouldn't have any functional change. Mainly cleaning up the code. Co-authored-by: arskell <arskell221@gmail.com> Pull Request: https://projects.blender.org/blender/blender/pulls/111122
This commit is contained in:
parent
d20f26aeb6
commit
e90ceefd18
@ -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;
|
||||
|
@ -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(){};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user