forked from bartvdbraak/blender
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!
This commit is contained in:
parent
532ac1163c
commit
3dbb231ed2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user