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:
Brecht Van Lommel
2017-09-27 03:53:03 +02:00
parent 12f4538205
commit 5bb677e592
9 changed files with 87 additions and 163 deletions

View File

@@ -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)