Fix T66412: crash with displacement and AO node in viewport renders
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 4 Jul 2019 11:11:25 +0000 (13:11 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 4 Jul 2019 11:11:55 +0000 (13:11 +0200)
intern/cycles/render/mesh.cpp

index 78b9ec032734b0e02433f9c4bac167fd9d8efdf2..91c3a772537b81e8c62e73df113bc817bd1702c2 100644 (file)
@@ -2315,6 +2315,9 @@ void MeshManager::device_free(Device *device, DeviceScene *dscene)
   dscene->attributes_float3.free();
   dscene->attributes_uchar4.free();
 
+  /* Signal for shaders like displacement not to do ray tracing. */
+  dscene->data.bvh.bvh_layout = BVH_LAYOUT_NONE;
+
 #ifdef WITH_OSL
   OSLGlobals *og = (OSLGlobals *)device->osl_memory();