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


OptixResult optixPipelineCreate (OptixDeviceContext context, const OptixPipelineCompileOptions *pipelineCompileOptions, const OptixPipelineLinkOptions *pipelineLinkOptions, const OptixProgramGroup *programGroups, unsigned int numProgramGroups, char *logString, size_t *logStringSize, OptixPipeline *pipeline)
OptixResult optixPipelineDestroy (OptixPipeline pipeline)
OptixResult optixPipelineSetStackSize (OptixPipeline pipeline, unsigned int directCallableStackSizeFromTraversal, unsigned int directCallableStackSizeFromState, unsigned int continuationStackSize, unsigned int maxTraversableGraphDepth)

Detailed Description

Function Documentation

OptixResult optixPipelineCreate ( OptixDeviceContext  context,
const OptixPipelineCompileOptions pipelineCompileOptions,
const OptixPipelineLinkOptions pipelineLinkOptions,
const OptixProgramGroup programGroups,
unsigned int  numProgramGroups,
char *  logString,
size_t *  logStringSize,
OptixPipeline pipeline 

logString is an optional buffer that contains compiler feedback and errors. This information is also passed to the context logger (if enabled), however it may be difficult to correlate output to the logger to specific API invocations when using multiple threads. The output to logString will only contain feedback for this specific invocation of this API call.

logStringSize as input should be a pointer to the number of bytes backing logString. Upon return it contains the length of the log message (including the null terminator) which may be greater than the input value. In this case, the log message will be truncated to fit into logString.

If logString or logStringSize are NULL, no output is written to logString. If logStringSize points to a value that is zero, no output is written. This does not affect output to the context logger if enabled.

[in]programGroupsarray of ProgramGroup objects
[in]numProgramGroupsnumber of ProgramGroup objects
[out]logStringInformation will be written to this string. If logStringSize > 0 logString will be null terminated.
OptixResult optixPipelineDestroy ( OptixPipeline  pipeline)

Thread safety: A pipeline must not be destroyed while it is still in use by concurrent API calls in other threads.

OptixResult optixPipelineSetStackSize ( OptixPipeline  pipeline,
unsigned int  directCallableStackSizeFromTraversal,
unsigned int  directCallableStackSizeFromState,
unsigned int  continuationStackSize,
unsigned int  maxTraversableGraphDepth 

Sets the stack sizes for a pipeline.

Users are encouraged to see the programming guide and the implementations of the helper functions to understand how to construct the stack sizes based on their particular needs.

If this method is not used, an internal default implementation is used. The default implementation is correct (but not necessarily optimal) as long as the maximum depth of call trees of CC and DC programs is at most 2 and no motion transforms are used.

The maxTraversableGraphDepth responds to the maximal number of traversables visited when calling trace. Every acceleration structure and motion transform count as one level of traversal. E.g., for a simple IAS (instance acceleration structure) -> GAS (geometry acceleration structure) traversal graph, the maxTraversableGraphDepth is two. For IAS -> MT (motion transform) -> GAS, the maxTraversableGraphDepth is three. Note that it does not matter whether a IAS or GAS has motion or not, it always counts as one. Launching optix with exceptions turned on (see OPTIX_EXCEPTION_FLAG_TRACE_DEPTH) will throw an exception if the specified maxTraversableGraphDepth is too small.

[in]pipelineThe pipeline to configure the stack size for.
[in]directCallableStackSizeFromTraversalThe direct stack size requirement for direct callables invoked from IS or AH.
[in]directCallableStackSizeFromStateThe direct stack size requirement for direct callables invoked from RG, MS, or CH.
[in]continuationStackSizeThe continuation stack requirement.
[in]maxTraversableGraphDepthThe maximum depth of a traversable graph passed to trace.