MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / initOptix

Function initOptix

Source/RenderPasses/OptixDenoiser/OptixUtils.cpp:61–77  ·  view source on GitHub ↗

This initialization now seems verbose / excessive as CUDA and OptiX initialization has evolved. TODO: Simplify?

Source from the content-addressed store, hash-verified

59// This initialization now seems verbose / excessive as CUDA and OptiX initialization
60// has evolved. TODO: Simplify?
61OptixDeviceContext initOptix(Falcor::Device* pDevice)
62{
63 FALCOR_CHECK(pDevice->initCudaDevice(), "Failed to initialize CUDA device.");
64
65 OPTIX_CHECK(optixInit());
66
67 FALCOR_CHECK(g_optixFunctionTable.optixDeviceContextCreate, "OptiX function table not initialized.");
68
69 // Build our OptiX context
70 OptixDeviceContext optixContext;
71 OPTIX_CHECK(optixDeviceContextCreate(pDevice->getCudaDevice()->getContext(), 0, &optixContext));
72
73 // Tell Optix how to write to our Falcor log.
74 OPTIX_CHECK(optixDeviceContextSetLogCallback(optixContext, optixLogCallback, nullptr, 4));
75
76 return optixContext;
77}

Callers 1

compileMethod · 0.85

Calls 2

initCudaDeviceMethod · 0.80
getCudaDeviceMethod · 0.80

Tested by

no test coverage detected