I reverted this change also.
Done. I also replace the device creation with a unique_ptr<>
I added a variable and mutex to indicate if it was being built or has been built. This ensures that it is built only once. However, I put this code in build_bvh in device.cpp as the BVHMulti can have different BVH types within it and this only applies to BVH2.
I reverted this change also.
Yes, it looks like it's not used in this PR so I removed it.
That is a possibility, I can switch it off for now. In our usage we never had that happen but most of the systems were not memory constrained. Not putting it in pinned memory ends up with a double copy as the driver then copies it to pinned memory before copying to the device. I switched this back to using regular memory for now.
Ok, I replaced the include with a forward declaration. In another patch, instead of uploading the geometry data a second time we use the data in the DeviceScene which is already uploaded. This saves both memory and time. Would that not be acceptable?
This gives a great speed boost for interactive preview. I'll remove it from this PR and I can add it in a separate PR later.
Changing this to use reinterpret_cast<unsigned char *>()
results in having to cast it back to CUdeviceptr
as follows reinterpret_cast<CUdeviceptr>(reinterpret_cast<unsigned char *>(device_pointer))
otherwise the following error occurs: