Code refactor: zero render buffers outside of kernel.
This was originally done with the first sample in the kernel for better performance, but it doesn't work anymore with atomics. Any benefit was very minor anyway, too small to measure it seems.
This commit is contained in:
@@ -145,6 +145,13 @@ void RenderBuffers::reset(Device *device, BufferParams& params_)
|
||||
device->mem_zero(buffer);
|
||||
}
|
||||
|
||||
void RenderBuffers::zero(Device *device)
|
||||
{
|
||||
if(buffer.device_pointer) {
|
||||
device->mem_zero(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
bool RenderBuffers::copy_from_device(Device *from_device)
|
||||
{
|
||||
if(!buffer.device_pointer)
|
||||
|
Reference in New Issue
Block a user