Check GPU V-RAM when upload the rendering buffer
We always try to upload the full spectral resolution for the output buffer. However, we do not check if enough V-RAM is available.
In case is not enough, we get this message: [FATAL] ======> Optix Exception CAUGHT !!! [FATAL] ======> Error Message: Memory allocation failed (Details: Function "_rtContextLaunch2D" caught exception: Out of memory)
We should either:
- display a more verbose message to suggest a smaller spectral or spatial resolution.
- split the image spatially to fit in V-RAM.
In interactive, it is probably best to use the first approach, and the second for offline.