OptiX advanced samples on github

The OptiX 7 advanced samples have been updated to support Microsoft Visual Studio 2022 and OptiX SDK 7.5.0 now.

When using OptiX SDK 7.5.0 and CUDA Toolkit 11.7 or newer, the examples’ CMakeLists.txt scripts will automatically switch the NVCC output from PTX to OptiX IR.
https://raytracing-docs.nvidia.com/optix7/guide/index.html#program_pipeline_creation#program-input

Additionally the CMake macro generating the custom build rules for the input *.cu files has been replaced against one which covers both *.ptx and *.optixir outputs (see NVCUDA_COMPILE_MODULE).

The examples themselves select between *.ptx and *.optixir input files at compile time, depending on the USE_OPTIX_IR definition added by the CMake scripts. That required centralizing the module filename definitions, which then lead to a more streamlined handling of the OptixModule, OptixProgramGroupDesc and OptixProgramGroup objects.

1 Like