| 75 | } |
| 76 | |
| 77 | void CudaInterop::onFrameRender(RenderContext* pRenderContext, const ref<Fbo>& pTargetFbo) |
| 78 | { |
| 79 | const Falcor::float4 clearColor(0.38f, 0.52f, 0.10f, 1); |
| 80 | pRenderContext->clearFbo(pTargetFbo.get(), clearColor, 1.0f, 0, FboAttachmentType::All); |
| 81 | |
| 82 | // Call the CUDA kernel |
| 83 | uint32_t format = |
| 84 | (getFormatType(mpInputTex->getFormat()) == FormatType::Float) ? cudaChannelFormatKindFloat : cudaChannelFormatKindUnsigned; |
| 85 | launchCopySurface(mInputSurf, mOutputSurf, mWidth, mHeight, format); |
| 86 | pRenderContext->blit(mpOutputTex->getSRV(), pTargetFbo->getRenderTargetView(0)); |
| 87 | } |
| 88 | |
| 89 | int runMain(int argc, char** argv) |
| 90 | { |
nothing calls this directly
no test coverage detected