#include <optix_types.h>
Public Attributes | |
size_t | pipelineParamOffsetInBytes |
size_t | sizeInBytes |
const void * | boundValuePtr |
const char * | annotation |
Struct for specifying specializations for pipelineParams as specified in OptixPipelineCompileOptions::pipelineLaunchParamsVariableName.
The bound values are supposed to represent a constant value in the pipelineParams. OptiX will attempt to locate all loads from the pipelineParams and correlate them to the appropriate bound value, but there are cases where OptiX cannot safely or reliably do this. For example if the pointer to the pipelineParams is passed as an argument to a non-inline function or the offset of the load to the pipelineParams cannot be statically determined (e.g. accessed in a loop). No module should rely on the value being specialized in order to work correctly. The values in the pipelineParams specified on optixLaunch should match the bound value. If validation mode is enabled on the context, OptiX will verify that the bound values specified matches the values in pipelineParams specified to optixLaunch.
These values are compiled in to the module as constants. Once the constants are inserted into the code, an optimization pass will be run that will attempt to propagate the consants and remove unreachable code.
If caching is enabled, changes in these values will result in newly compiled modules.
The pipelineParamOffset and sizeInBytes must be within the bounds of the pipelineParams variable. OPTIX_ERROR_INVALID_VALUE will be returned from optixModuleCreate otherwise.
If more than one bound value overlaps or the size of a bound value is equal to 0, an OPTIX_ERROR_INVALID_VALUE will be returned from optixModuleCreate.
The same set of bound values do not need to be used for all modules in a pipeline, but overlapping values between modules must have the same value. OPTIX_ERROR_INVALID_VALUE will be returned from optixPipelineCreate otherwise.
const char* OptixModuleCompileBoundValueEntry::annotation |
const void* OptixModuleCompileBoundValueEntry::boundValuePtr |
size_t OptixModuleCompileBoundValueEntry::pipelineParamOffsetInBytes |
size_t OptixModuleCompileBoundValueEntry::sizeInBytes |