35#ifndef OPTIX_OPTIX_STUBS_H
36#define OPTIX_OPTIX_STUBS_H
41#ifndef WIN32_LEAN_AND_MEAN
42#define WIN32_LEAN_AND_MEAN 1
48#pragma comment( lib, "Cfgmgr32.lib" )
57# ifdef OPTIX_ENABLE_SDK_MIXING
58# define OPTIXAPI static
61# define OPTIXAPI extern "C"
81#if defined( _MSC_VER )
85#pragma warning( push )
86#pragma warning( disable : 4996 )
94 handle = LoadLibraryA( (LPSTR)optixDllName );
100 unsigned int size = GetSystemDirectoryA( NULL, 0 );
106 size_t pathSize = size + 1 + strlen( optixDllName );
107 char* systemPath = (
char*)malloc( pathSize );
108 if( systemPath == NULL )
110 if( GetSystemDirectoryA( systemPath, size ) != size - 1 )
116 strcat( systemPath,
"\\" );
117 strcat( systemPath, optixDllName );
118 handle = LoadLibraryA( systemPath );
127 static const char* deviceInstanceIdentifiersGUID =
"{4d36e968-e325-11ce-bfc1-08002be10318}";
128 const ULONG flags =
CM_GETIDLIST_FILTER_CLASS |
CM_GETIDLIST_FILTER_PRESENT;
129 ULONG deviceListSize = 0;
130 if(
CM_Get_Device_ID_List_SizeA( &deviceListSize, deviceInstanceIdentifiersGUID, flags ) !=
CR_SUCCESS )
134 char* deviceNames = (
char*)malloc( deviceListSize );
135 if( deviceNames == NULL )
137 if(
CM_Get_Device_ID_ListA( deviceInstanceIdentifiersGUID, deviceNames, deviceListSize, flags ) )
143 char* dllPath = NULL;
146 for(
char* deviceName = deviceNames; *deviceName; deviceName += strlen( deviceName ) + 1 )
148 if(
CM_Locate_DevNodeA( &devID, deviceName,
CM_LOCATE_DEVNODE_NORMAL ) !=
CR_SUCCESS )
153 if(
CM_Open_DevNode_Key( devID,
KEY_QUERY_VALUE, 0, RegDisposition_OpenExisting, ®Key,
CM_REGISTRY_SOFTWARE ) !=
CR_SUCCESS )
157 const char* valueName =
"OpenGLDriverName";
159 LSTATUS ret = RegQueryValueExA( regKey, valueName, NULL, NULL, NULL, &valueSize );
160 if( ret !=
ERROR_SUCCESS )
162 RegCloseKey( regKey );
165 char* regValue = (
char*)malloc( valueSize );
166 if( regValue == NULL )
168 RegCloseKey( regKey );
171 ret = RegQueryValueExA( regKey, valueName, NULL, NULL, (LPBYTE)regValue, &valueSize );
172 if( ret !=
ERROR_SUCCESS )
175 RegCloseKey( regKey );
180 for(
int i = (
int)valueSize - 1; i >= 0 && regValue[i] !=
'\\'; --i )
182 size_t newPathSize = strlen( regValue ) + strlen( optixDllName ) + 1;
183 dllPath = (
char*)malloc( newPathSize );
184 if( dllPath == NULL )
187 RegCloseKey( regKey );
190 strcpy( dllPath, regValue );
191 strcat( dllPath, optixDllName );
193 RegCloseKey( regKey );
194 handle = LoadLibraryA( (LPCSTR)dllPath );
202#if defined( _MSC_VER )
203#pragma warning( pop )
239 void* symbol = (
void*)GetProcAddress( (HMODULE)*handlePtr,
"optixQueryFunctionTable" );
243 *handlePtr = dlopen(
"libnvoptix.so.1",
RTLD_NOW );
247 void* symbol = dlsym( *handlePtr,
"optixQueryFunctionTable" );
276 if( !FreeLibrary( (HMODULE)handle ) )
279 if( dlclose( handle ) )
296#ifndef OPTIX_DOXYGEN_SHOULD_SKIP_THIS
310 return "OPTIX_SUCCESS";
312 return "OPTIX_ERROR_INVALID_VALUE";
314 return "OPTIX_ERROR_UNSUPPORTED_ABI_VERSION";
316 return "OPTIX_ERROR_FUNCTION_TABLE_SIZE_MISMATCH";
318 return "OPTIX_ERROR_INVALID_ENTRY_FUNCTION_OPTIONS";
320 return "OPTIX_ERROR_LIBRARY_NOT_FOUND";
322 return "OPTIX_ERROR_ENTRY_SYMBOL_NOT_FOUND";
324 return "OPTIX_ERROR_LIBRARY_UNLOAD_FAILURE";
326 return "Unknown OptixResult code";
342 return "Invalid value";
344 return "Unsupported ABI version";
346 return "Function table size mismatch";
348 return "Invalid options to entry function";
350 return "Library not found";
352 return "Entry symbol not found";
354 return "Library could not be unloaded";
356 return "Unknown OptixResult code";
378 unsigned int callbackLevel )
419 size_t* logStringSize,
423 inputSize, logString, logStringSize, module );
432 size_t* logStringSize,
437 inputSize, logString, logStringSize, module, firstTask );
457 builtinISOptions, builtinModule );
462 unsigned int maxNumAdditionalTasks,
463 unsigned int* numAdditionalTasksCreated )
470 unsigned int numProgramGroups,
473 size_t* logStringSize,
477 logString, logStringSize, programGroups );
494 unsigned int numProgramGroups,
496 size_t* logStringSize,
500 numProgramGroups, logString, logStringSize, pipeline );
509 unsigned int directCallableStackSizeFromTraversal,
510 unsigned int directCallableStackSizeFromState,
511 unsigned int continuationStackSize,
512 unsigned int maxTraversableGraphDepth )
515 directCallableStackSizeFromState,
516 continuationStackSize, maxTraversableGraphDepth );
522 unsigned int numBuildInputs,
532 unsigned int numBuildInputs,
534 size_t tempBufferSizeInBytes,
536 size_t outputBufferSizeInBytes,
539 unsigned int numEmittedProperties )
542 tempBufferSizeInBytes, outputBuffer, outputBufferSizeInBytes,
543 outputHandle, emittedProperties, numEmittedProperties );
562 size_t numRelocateInputs,
564 size_t targetAccelSizeInBytes,
568 targetAccel, targetAccelSizeInBytes, targetHandle );
575 size_t outputBufferSizeInBytes,
579 outputBufferSizeInBytes, outputHandle );
624 size_t targetOpacityMicromapArraySizeInBytes )
627 targetOpacityMicromapArraySizeInBytes );
653 size_t pipelineParamsSize,
672 size_t dataSizeInBytes,
684 unsigned int maximumInputWidth,
685 unsigned int maximumInputHeight,
693 unsigned int inputWidth,
694 unsigned int inputHeight,
696 size_t denoiserStateSizeInBytes,
698 size_t scratchSizeInBytes )
701 denoiserStateSizeInBytes, scratch, scratchSizeInBytes );
708 size_t denoiserDataSize,
711 unsigned int numLayers,
712 unsigned int inputOffsetX,
713 unsigned int inputOffsetY,
715 size_t scratchSizeInBytes )
718 guideLayer, layers, numLayers, inputOffsetX, inputOffsetY,
719 scratch, scratchSizeInBytes );
727 size_t scratchSizeInBytes )
730 scratch, scratchSizeInBytes );
738 size_t scratchSizeInBytes )
741 scratch, scratchSizeInBytes );
OptixFunctionTable OPTIX_FUNCTION_TABLE_SYMBOL
Mixing multiple SDKs in a single application will result in symbol collisions. To enable different co...
Definition: optix_function_table_definition.h:51
struct OptixProgramGroup_t * OptixProgramGroup
Opaque type representing a program group.
Definition: optix_types.h:56
struct OptixDenoiser_t * OptixDenoiser
Opaque type representing a denoiser instance.
Definition: optix_types.h:62
OptixDeviceProperty
Parameters used for optixDeviceContextGetProperty()
Definition: optix_types.h:191
unsigned long long CUdeviceptr
CUDA device pointer.
Definition: optix_types.h:43
OptixResult
Result codes returned from API functions.
Definition: optix_types.h:143
OptixResult() OptixQueryFunctionTable_t(int abiId, unsigned int numOptions, OptixQueryFunctionTableOptions *, const void **, void *functionTable, size_t sizeOfTable)
Type of the function optixQueryFunctionTable()
Definition: optix_types.h:2360
OptixModuleCompileState
Module compilation state.
Definition: optix_types.h:1917
struct OptixModule_t * OptixModule
Opaque type representing a module.
Definition: optix_types.h:53
OptixDenoiserModelKind
Model kind used by the denoiser.
Definition: optix_types.h:1608
struct OptixPipeline_t * OptixPipeline
Opaque type representing a pipeline.
Definition: optix_types.h:59
unsigned long long OptixTraversableHandle
Traversable handle.
Definition: optix_types.h:68
OptixTraversableType
Traversable Handles.
Definition: optix_types.h:1555
void(* OptixLogCallback)(unsigned int level, const char *tag, const char *message, void *cbdata)
Type of the callback function used for log messages.
Definition: optix_types.h:257
struct OptixTask_t * OptixTask
Opaque type representing a work task.
Definition: optix_types.h:65
struct OptixDeviceContext_t * OptixDeviceContext
Opaque type representing a device context.
Definition: optix_types.h:50
@ OPTIX_ERROR_LIBRARY_NOT_FOUND
Definition: optix_types.h:178
@ OPTIX_ERROR_LIBRARY_UNLOAD_FAILURE
Definition: optix_types.h:180
@ OPTIX_ERROR_ENTRY_SYMBOL_NOT_FOUND
Definition: optix_types.h:179
@ OPTIX_SUCCESS
Definition: optix_types.h:144
@ OPTIX_ERROR_INVALID_VALUE
Definition: optix_types.h:145
@ OPTIX_ERROR_UNSUPPORTED_ABI_VERSION
Definition: optix_types.h:175
@ OPTIX_ERROR_INVALID_ENTRY_FUNCTION_OPTIONS
Definition: optix_types.h:177
@ OPTIX_ERROR_FUNCTION_TABLE_SIZE_MISMATCH
Definition: optix_types.h:176
OPTIXAPI OptixResult optixInitWithHandle(void **handlePtr)
Loads the OptiX library and initializes the function table used by the stubs below.
Definition: optix_stubs.h:224
OPTIXAPI OptixResult optixUninitWithHandle(void *handle)
Unloads the OptiX library and zeros the function table used by the stubs below. Takes the handle retu...
Definition: optix_stubs.h:271
OPTIXAPI OptixResult optixInit(void)
Loads the OptiX library and initializes the function table used by the stubs below.
Definition: optix_stubs.h:260
#define OPTIX_ABI_VERSION
The OptiX ABI version.
Definition: optix_function_table.h:20
OPTIXAPI OptixResult optixOpacityMicromapArrayBuild(OptixDeviceContext context, CUstream stream, const OptixOpacityMicromapArrayBuildInput *buildInput, const OptixMicromapBuffers *buffers)
Construct an array of Opacity Micromaps.
OPTIXAPI OptixResult optixOpacityMicromapArrayComputeMemoryUsage(OptixDeviceContext context, const OptixOpacityMicromapArrayBuildInput *buildInput, OptixMicromapBufferSizes *bufferSizes)
Determine the amount of memory necessary for a Opacity Micromap Array build.
OPTIXAPI OptixResult optixDeviceContextCreate(CUcontext fromContext, const OptixDeviceContextOptions *options, OptixDeviceContext *context)
Create a device context associated with the CUDA context specified with 'fromContext'.
OPTIXAPI 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 ...
OPTIXAPI const char * optixGetErrorString(OptixResult result)
Returns the description string for an error code.
#define OPTIXAPI
Mixing multiple SDKs in a single application will result in symbol collisions. To enable different co...
Definition: optix_host.h:31
OPTIXAPI OptixResult optixDeviceContextSetLogCallback(OptixDeviceContext context, OptixLogCallback callbackFunction, void *callbackData, unsigned int callbackLevel)
Sets the current log callback method.
OPTIXAPI OptixResult optixDeviceContextDestroy(OptixDeviceContext context)
Destroys all CPU and GPU state associated with the device.
OPTIXAPI OptixResult optixAccelEmitProperty(OptixDeviceContext context, CUstream stream, OptixTraversableHandle handle, const OptixAccelEmitDesc *emittedProperty)
Emit a single property after an acceleration structure was built. The result buffer of the ' emittedP...
OPTIXAPI OptixResult optixAccelBuild(OptixDeviceContext context, CUstream stream, const OptixAccelBuildOptions *accelOptions, const OptixBuildInput *buildInputs, unsigned int numBuildInputs, CUdeviceptr tempBuffer, size_t tempBufferSizeInBytes, CUdeviceptr outputBuffer, size_t outputBufferSizeInBytes, OptixTraversableHandle *outputHandle, const OptixAccelEmitDesc *emittedProperties, unsigned int numEmittedProperties)
OPTIXAPI OptixResult optixBuiltinISModuleGet(OptixDeviceContext context, const OptixModuleCompileOptions *moduleCompileOptions, const OptixPipelineCompileOptions *pipelineCompileOptions, const OptixBuiltinISOptions *builtinISOptions, OptixModule *builtinModule)
Returns a module containing the intersection program for the built-in primitive type specified by the...
OPTIXAPI OptixResult optixDenoiserCreate(OptixDeviceContext context, OptixDenoiserModelKind modelKind, const OptixDenoiserOptions *options, OptixDenoiser *denoiser)
Creates a denoiser object with the given options, using built-in inference models.
OPTIXAPI OptixResult optixDeviceContextGetCacheLocation(OptixDeviceContext context, char *location, size_t locationSize)
Returns the location of the disk cache. If the cache has been disabled by setting the environment var...
OPTIXAPI 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.
OPTIXAPI OptixResult optixPipelineDestroy(OptixPipeline pipeline)
Thread safety: A pipeline must not be destroyed while it is still in use by concurrent API calls in o...
OPTIXAPI OptixResult optixDenoiserCreateWithUserModel(OptixDeviceContext context, const void *userData, size_t userDataSizeInBytes, OptixDenoiser *denoiser)
Creates a denoiser object with the given options, using a provided inference model.
OPTIXAPI OptixResult optixDeviceContextGetCacheEnabled(OptixDeviceContext context, int *enabled)
Indicates whether the disk cache is enabled or disabled.
OPTIXAPI OptixResult optixDisplacementMicromapArrayComputeMemoryUsage(OptixDeviceContext context, const OptixDisplacementMicromapArrayBuildInput *buildInput, OptixMicromapBufferSizes *bufferSizes)
Determine the amount of memory necessary for a Displacement Micromap Array build.
OPTIXAPI OptixResult optixDenoiserComputeAverageColor(OptixDenoiser denoiser, CUstream stream, const OptixImage2D *inputImage, CUdeviceptr outputAverageColor, CUdeviceptr scratch, size_t scratchSizeInBytes)
Compute average logarithmic for each of the first three channels for the given image....
OPTIXAPI OptixResult optixModuleCreate(OptixDeviceContext context, const OptixModuleCompileOptions *moduleCompileOptions, const OptixPipelineCompileOptions *pipelineCompileOptions, const char *input, size_t inputSize, char *logString, size_t *logStringSize, OptixModule *module)
Compiling programs into a module. These programs can be passed in as either PTX or OptiX-IR.
OPTIXAPI OptixResult optixSbtRecordPackHeader(OptixProgramGroup programGroup, void *sbtRecordHeaderHostPointer)
OPTIXAPI OptixResult optixModuleDestroy(OptixModule module)
Call for OptixModule objects created with optixModuleCreate and optixModuleDeserialize.
OPTIXAPI OptixResult optixConvertPointerToTraversableHandle(OptixDeviceContext onDevice, CUdeviceptr pointer, OptixTraversableType traversableType, OptixTraversableHandle *traversableHandle)
OPTIXAPI OptixResult optixDenoiserDestroy(OptixDenoiser denoiser)
Destroys the denoiser object and any associated host resources.
OPTIXAPI const char * optixGetErrorName(OptixResult result)
Returns a string containing the name of an error code in the enum.
OPTIXAPI OptixResult optixAccelComputeMemoryUsage(OptixDeviceContext context, const OptixAccelBuildOptions *accelOptions, const OptixBuildInput *buildInputs, unsigned int numBuildInputs, OptixAccelBufferSizes *bufferSizes)
OPTIXAPI OptixResult optixDenoiserSetup(OptixDenoiser denoiser, CUstream stream, unsigned int inputWidth, unsigned int inputHeight, CUdeviceptr denoiserState, size_t denoiserStateSizeInBytes, CUdeviceptr scratch, size_t scratchSizeInBytes)
Initializes the state required by the denoiser.
OPTIXAPI OptixResult optixAccelRelocate(OptixDeviceContext context, CUstream stream, const OptixRelocationInfo *info, const OptixRelocateInput *relocateInputs, size_t numRelocateInputs, CUdeviceptr targetAccel, size_t targetAccelSizeInBytes, OptixTraversableHandle *targetHandle)
optixAccelRelocate is called to update the acceleration structure after it has been relocated....
OPTIXAPI OptixResult optixAccelGetRelocationInfo(OptixDeviceContext context, OptixTraversableHandle handle, OptixRelocationInfo *info)
Obtain relocation information, stored in OptixRelocationInfo, for a given context and acceleration st...
OPTIXAPI OptixResult optixProgramGroupDestroy(OptixProgramGroup programGroup)
Thread safety: A program group must not be destroyed while it is still in use by concurrent API calls...
OPTIXAPI OptixResult optixDeviceContextGetProperty(OptixDeviceContext context, OptixDeviceProperty property, void *value, size_t sizeInBytes)
Query properties of a device context.
OPTIXAPI OptixResult optixAccelCompact(OptixDeviceContext context, CUstream stream, OptixTraversableHandle inputHandle, CUdeviceptr outputBuffer, size_t outputBufferSizeInBytes, OptixTraversableHandle *outputHandle)
After building an acceleration structure, it can be copied in a compacted form to reduce memory....
OPTIXAPI OptixResult optixProgramGroupCreate(OptixDeviceContext context, const OptixProgramGroupDesc *programDescriptions, unsigned int numProgramGroups, const OptixProgramGroupOptions *options, char *logString, size_t *logStringSize, OptixProgramGroup *programGroups)
logString is an optional buffer that contains compiler feedback and errors. This information is also ...
OPTIXAPI OptixResult optixOpacityMicromapArrayRelocate(OptixDeviceContext context, CUstream stream, const OptixRelocationInfo *info, CUdeviceptr targetOpacityMicromapArray, size_t targetOpacityMicromapArraySizeInBytes)
optixOpacityMicromapArrayRelocate is called to update the opacity micromap array after it has been re...
OPTIXAPI OptixResult optixDenoiserComputeMemoryResources(const OptixDenoiser denoiser, unsigned int outputWidth, unsigned int outputHeight, OptixDenoiserSizes *returnSizes)
Computes the GPU memory resources required to execute the denoiser.
OPTIXAPI OptixResult optixDeviceContextSetCacheLocation(OptixDeviceContext context, const char *location)
Sets the location of the disk cache.
OPTIXAPI OptixResult optixOpacityMicromapArrayGetRelocationInfo(OptixDeviceContext context, CUdeviceptr opacityMicromapArray, OptixRelocationInfo *info)
Obtain relocation information, stored in OptixRelocationInfo, for a given context and opacity microma...
OPTIXAPI OptixResult optixModuleCreateWithTasks(OptixDeviceContext context, const OptixModuleCompileOptions *moduleCompileOptions, const OptixPipelineCompileOptions *pipelineCompileOptions, const char *input, size_t inputSize, char *logString, size_t *logStringSize, OptixModule *module, OptixTask *firstTask)
This function is designed to do just enough work to create the OptixTask return parameter and is expe...
OPTIXAPI OptixResult optixProgramGroupGetStackSize(OptixProgramGroup programGroup, OptixStackSizes *stackSizes, OptixPipeline pipeline)
Returns the stack sizes for the given program group. When programs in this programGroup are relying o...
OPTIXAPI OptixResult optixModuleGetCompilationState(OptixModule module, OptixModuleCompileState *state)
When creating a module with tasks, the current state of the module can be queried using this function...
OPTIXAPI OptixResult optixDisplacementMicromapArrayBuild(OptixDeviceContext context, CUstream stream, const OptixDisplacementMicromapArrayBuildInput *buildInput, const OptixMicromapBuffers *buffers)
Construct an array of Displacement Micromaps (DMMs).
OPTIXAPI OptixResult optixDenoiserInvoke(OptixDenoiser denoiser, CUstream stream, const OptixDenoiserParams *params, CUdeviceptr denoiserState, size_t denoiserStateSizeInBytes, const OptixDenoiserGuideLayer *guideLayer, const OptixDenoiserLayer *layers, unsigned int numLayers, unsigned int inputOffsetX, unsigned int inputOffsetY, CUdeviceptr scratch, size_t scratchSizeInBytes)
Invokes denoiser on a set of input data and produces at least one output image. State memory must be ...
OPTIXAPI OptixResult optixDenoiserComputeIntensity(OptixDenoiser denoiser, CUstream stream, const OptixImage2D *inputImage, CUdeviceptr outputIntensity, CUdeviceptr scratch, size_t scratchSizeInBytes)
Computes the logarithmic average intensity of the given image. The returned value 'outputIntensity' i...
OPTIXAPI OptixResult optixDeviceContextSetCacheEnabled(OptixDeviceContext context, int enabled)
Enables or disables the disk cache.
OPTIXAPI OptixResult optixDeviceContextGetCacheDatabaseSizes(OptixDeviceContext context, size_t *lowWaterMark, size_t *highWaterMark)
Returns the low and high water marks for disk cache garbage collection. If the cache has been disable...
OPTIXAPI OptixResult optixTaskExecute(OptixTask task, OptixTask *additionalTasks, unsigned int maxNumAdditionalTasks, unsigned int *numAdditionalTasksCreated)
Each OptixTask should be executed with optixTaskExecute(). If additional parallel work is found,...
OPTIXAPI OptixResult optixCheckRelocationCompatibility(OptixDeviceContext context, const OptixRelocationInfo *info, int *compatible)
Checks if an optix data structure built using another OptixDeviceContext (that was used to fill in 'i...
OPTIXAPI OptixResult optixPipelineSetStackSize(OptixPipeline pipeline, unsigned int directCallableStackSizeFromTraversal, unsigned int directCallableStackSizeFromState, unsigned int continuationStackSize, unsigned int maxTraversableGraphDepth)
Sets the stack sizes for a pipeline.
OPTIXAPI OptixResult optixDeviceContextSetCacheDatabaseSizes(OptixDeviceContext context, size_t lowWaterMark, size_t highWaterMark)
Sets the low and high water marks for disk cache garbage collection.
static void * optixLoadWindowsDllFromName(const char *optixDllName)
Definition: optix_stubs.h:88
static void * optixLoadWindowsDll()
Definition: optix_stubs.h:206
Struct for querying builder allocation requirements.
Definition: optix_types.h:1352
Build options for acceleration structures.
Definition: optix_types.h:1330
Specifies a type and output destination for emitted post-build properties.
Definition: optix_types.h:1384
Specifies the options for retrieving an intersection program for a built-in primitive type....
Definition: optix_types.h:2372
Guide layer for the denoiser.
Definition: optix_types.h:1663
Input/Output layers for the denoiser.
Definition: optix_types.h:1707
Options used by the denoiser.
Definition: optix_types.h:1648
Various parameters used by the denoiser.
Definition: optix_types.h:1728
Various sizes related to the denoiser.
Definition: optix_types.h:1759
Parameters used for optixDeviceContextCreate()
Definition: optix_types.h:276
The function table containing all API functions.
Definition: optix_function_table.h:47
OptixResult(* optixLaunch)(OptixPipeline pipeline, CUstream stream, CUdeviceptr pipelineParams, size_t pipelineParamsSize, const OptixShaderBindingTable *sbt, unsigned int width, unsigned int height, unsigned int depth)
See optixConvertPointerToTraversableHandle().
Definition: optix_function_table.h:290
OptixResult(* optixDeviceContextSetLogCallback)(OptixDeviceContext context, OptixLogCallback callbackFunction, void *callbackData, unsigned int callbackLevel)
See optixDeviceContextSetLogCallback().
Definition: optix_function_table.h:71
OptixResult(* optixDeviceContextGetCacheDatabaseSizes)(OptixDeviceContext context, size_t *lowWaterMark, size_t *highWaterMark)
See optixDeviceContextGetCacheDatabaseSizes().
Definition: optix_function_table.h:92
OptixResult(* optixOpacityMicromapArrayGetRelocationInfo)(OptixDeviceContext context, CUdeviceptr opacityMicromapArray, OptixRelocationInfo *info)
See optixOpacityMicromapArrayGetRelocationInfo().
Definition: optix_function_table.h:260
OptixResult(* optixDeviceContextGetProperty)(OptixDeviceContext context, OptixDeviceProperty property, void *value, size_t sizeInBytes)
See optixDeviceContextGetProperty().
Definition: optix_function_table.h:68
OptixResult(* optixPipelineCreate)(OptixDeviceContext context, const OptixPipelineCompileOptions *pipelineCompileOptions, const OptixPipelineLinkOptions *pipelineLinkOptions, const OptixProgramGroup *programGroups, unsigned int numProgramGroups, char *logString, size_t *logStringSize, OptixPipeline *pipeline)
See optixPipelineCreate().
Definition: optix_function_table.h:165
OptixResult(* optixOpacityMicromapArrayBuild)(OptixDeviceContext context, CUstream stream, const OptixOpacityMicromapArrayBuildInput *buildInput, const OptixMicromapBuffers *buffers)
See optixOpacityMicromapArrayBuild().
Definition: optix_function_table.h:254
OptixResult(* optixDenoiserComputeAverageColor)(OptixDenoiser handle, CUstream stream, const OptixImage2D *inputImage, CUdeviceptr outputAverageColor, CUdeviceptr scratch, size_t scratchSizeInBytes)
See optixDenoiserComputeAverageColor().
Definition: optix_function_table.h:351
const char *(* optixGetErrorName)(OptixResult result)
See optixGetErrorName().
Definition: optix_function_table.h:52
OptixResult(* optixDenoiserCreate)(OptixDeviceContext context, OptixDenoiserModelKind modelKind, const OptixDenoiserOptions *options, OptixDenoiser *returnHandle)
See optixDenoiserCreate().
Definition: optix_function_table.h:307
OptixResult(* optixOpacityMicromapArrayComputeMemoryUsage)(OptixDeviceContext context, const OptixOpacityMicromapArrayBuildInput *buildInput, OptixMicromapBufferSizes *bufferSizes)
See optixOpacityMicromapArrayComputeMemoryUsage().
Definition: optix_function_table.h:249
OptixResult(* optixDeviceContextSetCacheDatabaseSizes)(OptixDeviceContext context, size_t lowWaterMark, size_t highWaterMark)
See optixDeviceContextSetCacheDatabaseSizes().
Definition: optix_function_table.h:83
OptixResult(* optixDenoiserCreateWithUserModel)(OptixDeviceContext context, const void *data, size_t dataSizeInBytes, OptixDenoiser *returnHandle)
See optixDenoiserCreateWithUserModel().
Definition: optix_function_table.h:359
OptixResult(* optixConvertPointerToTraversableHandle)(OptixDeviceContext onDevice, CUdeviceptr pointer, OptixTraversableType traversableType, OptixTraversableHandle *traversableHandle)
See optixConvertPointerToTraversableHandle().
Definition: optix_function_table.h:243
OptixResult(* optixDenoiserDestroy)(OptixDenoiser handle)
See optixDenoiserDestroy().
Definition: optix_function_table.h:310
OptixResult(* optixDisplacementMicromapArrayBuild)(OptixDeviceContext context, CUstream stream, const OptixDisplacementMicromapArrayBuildInput *buildInput, const OptixMicromapBuffers *buffers)
See optixDisplacementMicromapArrayBuild().
Definition: optix_function_table.h:277
const char *(* optixGetErrorString)(OptixResult result)
See optixGetErrorString().
Definition: optix_function_table.h:55
OptixResult(* optixCheckRelocationCompatibility)(OptixDeviceContext context, const OptixRelocationInfo *info, int *compatible)
See optixCheckRelocationCompatibility().
Definition: optix_function_table.h:214
OptixResult(* optixAccelRelocate)(OptixDeviceContext context, CUstream stream, const OptixRelocationInfo *info, const OptixRelocateInput *relocateInputs, size_t numRelocateInputs, CUdeviceptr targetAccel, size_t targetAccelSizeInBytes, OptixTraversableHandle *targetHandle)
See optixAccelRelocate().
Definition: optix_function_table.h:219
OptixResult(* optixDeviceContextDestroy)(OptixDeviceContext context)
See optixDeviceContextDestroy().
Definition: optix_function_table.h:65
OptixResult(* optixProgramGroupGetStackSize)(OptixProgramGroup programGroup, OptixStackSizes *stackSizes, OptixPipeline pipeline)
See optixProgramGroupGetStackSize().
Definition: optix_function_table.h:158
OptixResult(* optixTaskExecute)(OptixTask task, OptixTask *additionalTasks, unsigned int maxNumAdditionalTasks, unsigned int *numAdditionalTasksCreated)
See optixTaskExecute().
Definition: optix_function_table.h:137
OptixResult(* optixDeviceContextGetCacheEnabled)(OptixDeviceContext context, int *enabled)
See optixDeviceContextGetCacheEnabled().
Definition: optix_function_table.h:86
OptixResult(* optixDeviceContextSetCacheEnabled)(OptixDeviceContext context, int enabled)
See optixDeviceContextSetCacheEnabled().
Definition: optix_function_table.h:77
OptixResult(* optixDisplacementMicromapArrayComputeMemoryUsage)(OptixDeviceContext context, const OptixDisplacementMicromapArrayBuildInput *buildInput, OptixMicromapBufferSizes *bufferSizes)
See optixDisplacementMicromapArrayComputeMemoryUsage().
Definition: optix_function_table.h:272
OptixResult(* optixPipelineDestroy)(OptixPipeline pipeline)
See optixPipelineDestroy().
Definition: optix_function_table.h:175
OptixResult(* optixDeviceContextSetCacheLocation)(OptixDeviceContext context, const char *location)
See optixDeviceContextSetCacheLocation().
Definition: optix_function_table.h:80
OptixResult(* optixModuleGetCompilationState)(OptixModule module, OptixModuleCompileState *state)
See optixModuleGetCompilationState().
Definition: optix_function_table.h:120
OptixResult(* optixBuiltinISModuleGet)(OptixDeviceContext context, const OptixModuleCompileOptions *moduleCompileOptions, const OptixPipelineCompileOptions *pipelineCompileOptions, const OptixBuiltinISOptions *builtinISOptions, OptixModule *builtinModule)
See optixBuiltinISModuleGet().
Definition: optix_function_table.h:126
OptixResult(* optixDeviceContextGetCacheLocation)(OptixDeviceContext context, char *location, size_t locationSize)
See optixDeviceContextGetCacheLocation().
Definition: optix_function_table.h:89
OptixResult(* optixPipelineSetStackSize)(OptixPipeline pipeline, unsigned int directCallableStackSizeFromTraversal, unsigned int directCallableStackSizeFromState, unsigned int continuationStackSize, unsigned int maxTraversableGraphDepth)
See optixPipelineSetStackSize().
Definition: optix_function_table.h:178
OptixResult(* optixAccelGetRelocationInfo)(OptixDeviceContext context, OptixTraversableHandle handle, OptixRelocationInfo *info)
See optixAccelGetRelocationInfo().
Definition: optix_function_table.h:210
OptixResult(* optixAccelEmitProperty)(OptixDeviceContext context, CUstream stream, OptixTraversableHandle handle, const OptixAccelEmitDesc *emittedProperty)
See optixAccelComputeMemoryUsage().
Definition: optix_function_table.h:237
OptixResult(* optixDenoiserSetup)(OptixDenoiser denoiser, CUstream stream, unsigned int inputWidth, unsigned int inputHeight, CUdeviceptr state, size_t stateSizeInBytes, CUdeviceptr scratch, size_t scratchSizeInBytes)
See optixDenoiserSetup().
Definition: optix_function_table.h:319
OptixResult(* optixModuleCreateWithTasks)(OptixDeviceContext context, const OptixModuleCompileOptions *moduleCompileOptions, const OptixPipelineCompileOptions *pipelineCompileOptions, const char *input, size_t inputSize, char *logString, size_t *logStringSize, OptixModule *module, OptixTask *firstTask)
See optixModuleCreateWithTasks().
Definition: optix_function_table.h:109
OptixResult(* optixDeviceContextCreate)(CUcontext fromContext, const OptixDeviceContextOptions *options, OptixDeviceContext *context)
See optixDeviceContextCreate().
Definition: optix_function_table.h:62
OptixResult(* optixModuleCreate)(OptixDeviceContext context, const OptixModuleCompileOptions *moduleCompileOptions, const OptixPipelineCompileOptions *pipelineCompileOptions, const char *input, size_t inputSize, char *logString, size_t *logStringSize, OptixModule *module)
See optixModuleCreate().
Definition: optix_function_table.h:99
OptixResult(* optixSbtRecordPackHeader)(OptixProgramGroup programGroup, void *sbtRecordHeaderHostPointer)
See optixConvertPointerToTraversableHandle().
Definition: optix_function_table.h:287
OptixResult(* optixOpacityMicromapArrayRelocate)(OptixDeviceContext context, CUstream stream, const OptixRelocationInfo *info, CUdeviceptr targetOpacityMicromapArray, size_t targetOpacityMicromapArraySizeInBytes)
See optixOpacityMicromapArrayRelocate().
Definition: optix_function_table.h:265
OptixResult(* optixAccelBuild)(OptixDeviceContext context, CUstream stream, const OptixAccelBuildOptions *accelOptions, const OptixBuildInput *buildInputs, unsigned int numBuildInputs, CUdeviceptr tempBuffer, size_t tempBufferSizeInBytes, CUdeviceptr outputBuffer, size_t outputBufferSizeInBytes, OptixTraversableHandle *outputHandle, const OptixAccelEmitDesc *emittedProperties, unsigned int numEmittedProperties)
See optixAccelBuild().
Definition: optix_function_table.h:196
OptixResult(* optixDenoiserInvoke)(OptixDenoiser denoiser, CUstream stream, const OptixDenoiserParams *params, CUdeviceptr denoiserState, size_t denoiserStateSizeInBytes, const OptixDenoiserGuideLayer *guideLayer, const OptixDenoiserLayer *layers, unsigned int numLayers, unsigned int inputOffsetX, unsigned int inputOffsetY, CUdeviceptr scratch, size_t scratchSizeInBytes)
See optixDenoiserInvoke().
Definition: optix_function_table.h:329
OptixResult(* optixModuleDestroy)(OptixModule module)
See optixModuleDestroy().
Definition: optix_function_table.h:123
OptixResult(* optixAccelCompact)(OptixDeviceContext context, CUstream stream, OptixTraversableHandle inputHandle, CUdeviceptr outputBuffer, size_t outputBufferSizeInBytes, OptixTraversableHandle *outputHandle)
See optixAccelCompact().
Definition: optix_function_table.h:230
OptixResult(* optixProgramGroupDestroy)(OptixProgramGroup programGroup)
See optixProgramGroupDestroy().
Definition: optix_function_table.h:155
OptixResult(* optixAccelComputeMemoryUsage)(OptixDeviceContext context, const OptixAccelBuildOptions *accelOptions, const OptixBuildInput *buildInputs, unsigned int numBuildInputs, OptixAccelBufferSizes *bufferSizes)
See optixAccelComputeMemoryUsage().
Definition: optix_function_table.h:189
OptixResult(* optixProgramGroupCreate)(OptixDeviceContext context, const OptixProgramGroupDesc *programDescriptions, unsigned int numProgramGroups, const OptixProgramGroupOptions *options, char *logString, size_t *logStringSize, OptixProgramGroup *programGroups)
See optixProgramGroupCreate().
Definition: optix_function_table.h:146
OptixResult(* optixDenoiserComputeMemoryResources)(const OptixDenoiser handle, unsigned int maximumInputWidth, unsigned int maximumInputHeight, OptixDenoiserSizes *returnSizes)
See optixDenoiserComputeMemoryResources().
Definition: optix_function_table.h:313
OptixResult(* optixDenoiserComputeIntensity)(OptixDenoiser handle, CUstream stream, const OptixImage2D *inputImage, CUdeviceptr outputIntensity, CUdeviceptr scratch, size_t scratchSizeInBytes)
See optixDenoiserComputeIntensity().
Definition: optix_function_table.h:343
Image descriptor used by the denoiser.
Definition: optix_types.h:1586
Conservative memory requirements for building a opacity/displacement micromap array.
Definition: optix_types.h:1258
Buffer inputs for opacity/displacement micromap array builds.
Definition: optix_types.h:1265
Compilation options for module.
Definition: optix_types.h:2044
Compilation options for all modules of a pipeline.
Definition: optix_types.h:2247
Link options for a pipeline.
Definition: optix_types.h:2282
Descriptor for program groups.
Definition: optix_types.h:2155
Program group options.
Definition: optix_types.h:2181
Used to store information related to relocation of optix data structures.
Definition: optix_types.h:1397
Describes the shader binding table (SBT)
Definition: optix_types.h:2293
Describes the stack size requirements of a program group.
Definition: optix_types.h:2333