16# include <OSL/oslconfig.h>
17# include <OSL/oslversion.h>
21# include <optix_function_table_definition.h>
29 if (g_optixFunctionTable.optixDeviceContextCreate !=
NULL) {
39 const OptixResult result = optixInit();
41 if (result == OPTIX_ERROR_UNSUPPORTED_ABI_VERSION) {
42 VLOG_WARNING <<
"OptiX initialization failed because the installed NVIDIA driver is too old. "
43 "Please update to the latest driver first!";
46 else if (result != OPTIX_SUCCESS) {
47 VLOG_WARNING <<
"OptiX initialization failed with error code " << (
unsigned int)result;
61 devices.reserve(cuda_devices.size());
68 cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, info.num);
76# if defined(WITH_OSL) && defined(OSL_USE_OPTIX) && \
77 (OSL_VERSION_MINOR >= 13 || OSL_VERSION_MAJOR > 1)
81# if defined(WITH_OPENIMAGEDENOISE)
82# if OIDN_VERSION >= 20300
83 if (oidnIsCUDADeviceSupported(info.num)) {
85 if (OIDNDenoiserGPU::is_device_supported(info)) {
91 devices.push_back(info);
105 return new OptiXDevice(info, stats, profiler, headless);
112 LOG(FATAL) <<
"Request to create OptiX device without compiled-in support. Should never happen.";
@ DENOISER_OPENIMAGEDENOISE
#define CCL_NAMESPACE_END
CCL_NAMESPACE_BEGIN bool device_cuda_init()
CCL_NAMESPACE_BEGIN bool device_optix_init()
void device_optix_info(const vector< DeviceInfo > &cuda_devices, vector< DeviceInfo > &devices)
Device * device_optix_create(const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int