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
6144b5bd4e
commit
094addfe84
Notes:
blender-bot
2023-02-14 02:43:21 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -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