[Bf-blender-cvs] [730635ce242] temp-cycles-denoising: Cycles Denoising: Skip out-of-bounds tiles when mapping tile memory to the denoising device
Lukas Stockner
noreply at git.blender.org
Mon Mar 27 02:12:43 CEST 2017
Commit: 730635ce2421ff82535602b7fb494739e1b40b05
Author: Lukas Stockner
Date: Mon Mar 27 01:43:52 2017 +0200
Branches: temp-cycles-denoising
https://developer.blender.org/rB730635ce2421ff82535602b7fb494739e1b40b05
Cycles Denoising: Skip out-of-bounds tiles when mapping tile memory to the denoising device
===================================================================
M intern/cycles/device/device_multi.cpp
M intern/cycles/render/session.cpp
===================================================================
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index 0f579d87f1a..cf1692eb93d 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -302,8 +302,11 @@ public:
void map_neighbor_tiles(Device * sub_device, RenderTile * tiles)
{
for(int i = 0; i < 9; i++) {
+ if(!tiles[i].buffers) {
+ continue;
+ }
/* If the tile isn't already allocated on the current device,
- * allocate anc copy it now.
+ * allocate and copy it now.
* Note that this temporarily modifies the RenderBuffers,
* so this function is not threadsafe. */
if(tiles[i].buffers->device != sub_device) {
@@ -322,6 +325,9 @@ public:
void unmap_neighbor_tiles(Device * sub_device, RenderTile * tiles)
{
for(int i = 0; i < 9; i++) {
+ if(!tiles[i].buffers) {
+ continue;
+ }
if(tiles[i].buffers->device != sub_device) {
device_vector<float> &mem = tiles[i].buffers->buffer;
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index fd5a6a17378..5727b074886 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -532,6 +532,7 @@ void Session::get_neighbor_tiles(RenderTile *tiles, Device *tile_device)
}
else {
tiles[i].buffer = (device_ptr)NULL;
+ tiles[i].buffers = NULL;
tiles[i].x = clamp(px, image_region.x, image_region.z);
tiles[i].y = clamp(py, image_region.y, image_region.w);
tiles[i].w = tiles[i].h = 0;
More information about the Bf-blender-cvs
mailing list