diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-09-17 14:07:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-09-17 14:07:28 +0300 |
commit | 3dbb231ed2f80c7d8ba3c865052c97794670b74c (patch) | |
tree | 952feadfcdff8c0968a2bd4784f9fa4157a43635 | |
parent | 532ac1163ceea857df0f3f144de0dde837712bbe (diff) |
Fix OpenCL render error in large scenes
In scenes such as Cosmos Laundromat, there were memory allocations bigger than
2GB which would overflow.
Problem and solution found by AMD, thanks!
-rw-r--r-- | intern/cycles/device/opencl/memory_manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/device/opencl/memory_manager.cpp b/intern/cycles/device/opencl/memory_manager.cpp index 0285dc969ec..4330e07cb37 100644 --- a/intern/cycles/device/opencl/memory_manager.cpp +++ b/intern/cycles/device/opencl/memory_manager.cpp @@ -65,7 +65,7 @@ void MemoryManager::DeviceBuffer::update_device_memory(OpenCLDevice *device) } /* Always allocate non-empty buffer, NULL pointers cause problems with some drivers. */ - total_size = max(total_size, 16); + total_size = std::max(total_size, (size_t)16); if (need_realloc) { cl_ulong max_buffer_size; |