diff options
Diffstat (limited to 'intern/cycles/device')
-rw-r--r-- | intern/cycles/device/device.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/device/memory.h | 2 | ||||
-rw-r--r-- | intern/cycles/device/metal/bvh.mm | 2 | ||||
-rw-r--r-- | intern/cycles/device/optix/device_impl.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp index 14c97affb76..4d981e45ff1 100644 --- a/intern/cycles/device/device.cpp +++ b/intern/cycles/device/device.cpp @@ -335,7 +335,7 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo> &subdevices, if (device.type == DEVICE_CPU && subdevices.size() > 1) { if (background) { int orig_cpu_threads = (threads) ? threads : TaskScheduler::max_concurrency(); - int cpu_threads = max(orig_cpu_threads - (subdevices.size() - 1), 0); + int cpu_threads = max(orig_cpu_threads - (subdevices.size() - 1), size_t(0)); VLOG(1) << "CPU render threads reduced from " << orig_cpu_threads << " to " << cpu_threads << ", to dedicate to GPU."; diff --git a/intern/cycles/device/memory.h b/intern/cycles/device/memory.h index 2db3ac9a440..5d7f1981e46 100644 --- a/intern/cycles/device/memory.h +++ b/intern/cycles/device/memory.h @@ -311,7 +311,7 @@ template<typename T> class device_only_memory : public device_memory { : device_memory(device, name, allow_host_memory_fallback ? MEM_READ_WRITE : MEM_DEVICE_ONLY) { data_type = device_type_traits<T>::data_type; - data_elements = max(device_type_traits<T>::num_elements, 1); + data_elements = max(device_type_traits<T>::num_elements, size_t(1)); } device_only_memory(device_only_memory &&other) noexcept : device_memory(std::move(other)) diff --git a/intern/cycles/device/metal/bvh.mm b/intern/cycles/device/metal/bvh.mm index 8b252f1a5ec..6c8288a7e0f 100644 --- a/intern/cycles/device/metal/bvh.mm +++ b/intern/cycles/device/metal/bvh.mm @@ -761,7 +761,7 @@ bool BVHMetal::build_TLAS(Progress &progress, num_instances++; if (ob->use_motion()) { - num_motion_transforms += max(1, ob->get_motion().size()); + num_motion_transforms += max((size_t)1, ob->get_motion().size()); } else { num_motion_transforms++; diff --git a/intern/cycles/device/optix/device_impl.cpp b/intern/cycles/device/optix/device_impl.cpp index cb6c36d5ea6..e49c67c7f91 100644 --- a/intern/cycles/device/optix/device_impl.cpp +++ b/intern/cycles/device/optix/device_impl.cpp @@ -1586,7 +1586,7 @@ void OptiXDevice::build_bvh(BVH *bvh, Progress &progress, bool refit) if (ob->is_traceable() && ob->use_motion()) { total_motion_transform_size = align_up(total_motion_transform_size, OPTIX_TRANSFORM_BYTE_ALIGNMENT); - const size_t motion_keys = max(ob->get_motion().size(), 2) - 2; + const size_t motion_keys = max(ob->get_motion().size(), (size_t)2) - 2; total_motion_transform_size = total_motion_transform_size + sizeof(OptixSRTMotionTransform) + motion_keys * sizeof(OptixSRTData); @@ -1660,7 +1660,7 @@ void OptiXDevice::build_bvh(BVH *bvh, Progress &progress, bool refit) /* Insert motion traversable if object has motion. */ if (motion_blur && ob->use_motion()) { - size_t motion_keys = max(ob->get_motion().size(), 2) - 2; + size_t motion_keys = max(ob->get_motion().size(), (size_t)2) - 2; size_t motion_transform_size = sizeof(OptixSRTMotionTransform) + motion_keys * sizeof(OptixSRTData); |