Hi,
I have some troubles getting the tonemapper to work. I have 2 simple buffers and a single tonemapper:
optix::Buffer InputBuffer = context->createBuffer(RT_BUFFER_INPUT, RT_FORMAT_FLOAT4, width, height);
optix::Buffer OutputBuffer = context->createBuffer(RT_BUFFER_OUTPUT, RT_FORMAT_FLOAT4, width, height);
optix::PostprocessingStage inTonemapStage = context->createBuiltinPostProcessingStage("TonemapperSimple");
inTonemapStage->declareVariable("input_buffer")->set(InputBuffer);
inTonemapStage->declareVariable("output_buffer")->set(OutputBuffer);
optix::CommandList cmdList = context->createCommandList();
cmdList->appendPostprocessingStage(inTonemapStage, width, height);
cmdList->finalize();
...inputbuffer.map() ... unmap() ...
cmdList->execute();
At runtime I get this in the execute():
(Details: Function "_rtCommandListExecute" caught exception: Assertion failed: "!( pinnedDevice & buf->m_allocatedSet ).empty() : Trying to pin buffer to device without allocation", file: C:\u\workspace\rel5.0-win64-cuda90-VS2015-build-Release\sw\wsapps\raytracing\rtsdk\rel5.0\src\Memory\MemoryManager.cpp, line: 742)'
If I use the denoiser instead of the tonemapper it works fine. So what am I missing for the tonemapper to work? The denoiser example does not look much different in the buffers. The only difference is the raytracing stage in front of the tonemapper.
Thanks,
Nico