NVIDIA OptiX 7.1 API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups


OptixResult optixLaunch (OptixPipeline pipeline, CUstream stream, CUdeviceptr pipelineParams, size_t pipelineParamsSize, const OptixShaderBindingTable *sbt, unsigned int width, unsigned int height, unsigned int depth)
OptixResult optixSbtRecordPackHeader (OptixProgramGroup programGroup, void *sbtRecordHeaderHostPointer)

Detailed Description

Function Documentation

OptixResult optixLaunch ( OptixPipeline  pipeline,
CUstream  stream,
CUdeviceptr  pipelineParams,
size_t  pipelineParamsSize,
const OptixShaderBindingTable sbt,
unsigned int  width,
unsigned int  height,
unsigned int  depth 

Where the magic happens.

The stream and pipeline must belong to the same device context. Multiple launches may be issues in parallel from multiple threads to different streams.

pipelineParamsSize number of bytes are copied from the device memory pointed to by pipelineParams before launch. It is an error if pipelineParamsSize is greater than the size of the variable declared in modules and identified by OptixPipelineCompileOptions::pipelineLaunchParamsVariableName. If the launch params variable was optimized out or not found in the modules linked to the pipeline then the pipelineParams and pipelineParamsSize parameters are ignored.

sbt points to the shader binding table, which defines shader groupings and their resources. See the SBT spec.

[in]widthnumber of elements to compute
[in]heightnumber of elements to compute
[in]depthnumber of elements to compute

Thread safety: In the current implementation concurrent launches to the same pipeline are not supported. Concurrent launches require separate OptixPipeline objects.

OptixResult optixSbtRecordPackHeader ( OptixProgramGroup  programGroup,
void *  sbtRecordHeaderHostPointer 
[in]programGroupthe program group containing the program(s)
[out]sbtRecordHeaderHostPointerthe result sbt record header