I’m seeing an issue where temporarily storing a reference to a struct in an OptiX buffer causes problems. With the 318.81 driver, the code below appears to cause the GPU to infinite loop while the Windows Task Manager shows ~100% GPU “Copy” utilization. With the 317.71 driver, it crashed the computer. If I store thisThing by value, rather than reference, it all works fine. I don’t have a minimal reproducer, or know why this particular bit of code causes a problem - it’s not the only place I temporarily use a reference to something in a buffer. Is this buffer usage unsafe? In bufferId, operator returns T&, and I assumed it was safe to hold the reference for later use (within the same program invocation that retrieved it). I have been running this code on various Kepler, Maxwell, and Pascal GPUs, and so far have only seen a problem on Turing.
Thanks
struct Thing {
float a;
float b;
float c;
float d;
int i;
};
rtBufferId<Thing, 1> bunchOfThings;
…
const Thing& thisThing = bunchOfThings[someIndex];
// Two lines of math using thisThing. No function calls, no storage of references.
CUDA 9.1, OptiX 5.1.0, Visual Studio 2015
RTX 2080 Ti, Windows 10, driver version 318.81 (and previously 317.71)