Skip to content

Commit 4b6acd3

Browse files
fix a screwup (also mapping buffers on CUDA is a problem)
1 parent dfb553b commit 4b6acd3

File tree

1 file changed

+5
-2
lines changed
  • examples_tests/39.DenoiserTonemapper

1 file changed

+5
-2
lines changed

examples_tests/39.DenoiserTonemapper/main.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ void main()
863863
attachWholeBuffer(EII_NORMAL,normalPixelBuffer.getObject(),inImageByteOffset[EII_NORMAL]);
864864
for (uint32_t j=0u; j<denoiserInputCount; j++)
865865
{
866-
outImageByteOffset[j] = j*param.width*param.height*forcedOptiXFormatPixelStride*sizeof(uint16_t); // float 16 actually
866+
outImageByteOffset[j] = j*param.width*param.height*8u;// TODO do it with *forcedOptiXFormatPixelStride;
867867
attachWholeBuffer(EII_COUNT+j,temporaryPixelBuffer.getObject(),outImageByteOffset[j]);
868868
}
869869
attachWholeBuffer(EII_COUNT*2u,histogramBuffer.get());
@@ -949,7 +949,7 @@ void main()
949949
denoiserOutput.rowStrideInBytes = param.width * forcedOptiXFormatPixelStride;
950950
denoiserOutput.format = forcedOptiXFormat;
951951
denoiserOutput.pixelStrideInBytes = forcedOptiXFormatPixelStride;
952-
952+
#if 0
953953
//invoke
954954
if (denoiser.m_denoiser->tileAndInvoke(
955955
m_cudaStream,
@@ -967,6 +967,9 @@ void main()
967967
os::Printer::log(makeImageIDString(i) + "Could not invoke the denoiser sucessfully, skipping image!", ELL_ERROR);
968968
continue;
969969
}
970+
#else
971+
driver->copyBuffer(colorPixelBuffer.getObject(),temporaryPixelBuffer.getObject(),inImageByteOffset[EII_COLOR],outImageByteOffset[0],denoiserInputs[0].rowStrideInBytes*param.height);
972+
#endif
970973
}
971974

972975
// compute post-processing

0 commit comments

Comments
 (0)