NVIDIA OptiX 7.7 nvidia_logo_transpbg.gif Up
optix_stubs.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 NVIDIA Corporation. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of NVIDIA CORPORATION nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
32
33#ifndef OPTIX_OPTIX_STUBS_H
34#define OPTIX_OPTIX_STUBS_H
35
37
38#ifdef _WIN32
39#ifndef WIN32_LEAN_AND_MEAN
40#define WIN32_LEAN_AND_MEAN 1
41#endif
42#include <windows.h>
43// The cfgmgr32 header is necessary for interrogating driver information in the registry.
44// For convenience the library is also linked in automatically using the #pragma command.
45#include <cfgmgr32.h>
46#pragma comment( lib, "Cfgmgr32.lib" )
47#include <string.h>
48#else
49#include <dlfcn.h>
50#endif
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
56// The function table needs to be defined in exactly one translation unit. This can be
57// achieved by including optix_function_table_definition.h in that translation unit.
59
60#ifdef _WIN32
61#if defined( _MSC_VER )
62// Visual Studio produces warnings suggesting strcpy and friends being replaced with _s
63// variants. All the string lengths and allocation sizes have been calculated and should
64// be safe, so we are disabling this warning to increase compatibility.
65# pragma warning( push )
66# pragma warning( disable : 4996 )
67#endif
68static void* optixLoadWindowsDllFromName( const char* optixDllName )
69{
70 void* handle = NULL;
71
72 // Try the bare dll name first. This picks it up in the local path, followed by
73 // standard Windows paths.
74 handle = LoadLibraryA( (LPSTR)optixDllName );
75 if( handle )
76 return handle;
77// If we don't find it in the default dll search path, try the system paths
78
79 // Get the size of the path first, then allocate
80 unsigned int size = GetSystemDirectoryA( NULL, 0 );
81 if( size == 0 )
82 {
83 // Couldn't get the system path size, so bail
84 return NULL;
85 }
86 size_t pathSize = size + 1 + strlen( optixDllName );
87 char* systemPath = (char*)malloc( pathSize );
88 if( systemPath == NULL )
89 return NULL;
90 if( GetSystemDirectoryA( systemPath, size ) != size - 1 )
91 {
92 // Something went wrong
93 free( systemPath );
94 return NULL;
95 }
96 strcat( systemPath, "\\" );
97 strcat( systemPath, optixDllName );
98 handle = LoadLibraryA( systemPath );
99 free( systemPath );
100 if( handle )
101 return handle;
102
103 // If we didn't find it, go looking in the register store. Since nvoptix.dll doesn't
104 // have its own registry entry, we are going to look for the opengl driver which lives
105 // next to nvoptix.dll. 0 (null) will be returned if any errors occured.
106
107 static const char* deviceInstanceIdentifiersGUID = "{4d36e968-e325-11ce-bfc1-08002be10318}";
108 const ULONG flags = CM_GETIDLIST_FILTER_CLASS | CM_GETIDLIST_FILTER_PRESENT;
109 ULONG deviceListSize = 0;
110 if( CM_Get_Device_ID_List_SizeA( &deviceListSize, deviceInstanceIdentifiersGUID, flags ) != CR_SUCCESS )
111 {
112 return NULL;
113 }
114 char* deviceNames = (char*)malloc( deviceListSize );
115 if( deviceNames == NULL )
116 return NULL;
117 if( CM_Get_Device_ID_ListA( deviceInstanceIdentifiersGUID, deviceNames, deviceListSize, flags ) )
118 {
119 free( deviceNames );
120 return NULL;
121 }
122 DEVINST devID = 0;
123 char* dllPath = NULL;
124
125 // Continue to the next device if errors are encountered.
126 for( char* deviceName = deviceNames; *deviceName; deviceName += strlen( deviceName ) + 1 )
127 {
128 if( CM_Locate_DevNodeA( &devID, deviceName, CM_LOCATE_DEVNODE_NORMAL ) != CR_SUCCESS )
129 {
130 continue;
131 }
132 HKEY regKey = 0;
133 if( CM_Open_DevNode_Key( devID, KEY_QUERY_VALUE, 0, RegDisposition_OpenExisting, &regKey, CM_REGISTRY_SOFTWARE ) != CR_SUCCESS )
134 {
135 continue;
136 }
137 const char* valueName = "OpenGLDriverName";
138 DWORD valueSize = 0;
139 LSTATUS ret = RegQueryValueExA( regKey, valueName, NULL, NULL, NULL, &valueSize );
140 if( ret != ERROR_SUCCESS )
141 {
142 RegCloseKey( regKey );
143 continue;
144 }
145 char* regValue = (char*)malloc( valueSize );
146 if( regValue == NULL )
147 {
148 RegCloseKey( regKey );
149 continue;
150 }
151 ret = RegQueryValueExA( regKey, valueName, NULL, NULL, (LPBYTE)regValue, &valueSize );
152 if( ret != ERROR_SUCCESS )
153 {
154 free( regValue );
155 RegCloseKey( regKey );
156 continue;
157 }
158 // Strip the opengl driver dll name from the string then create a new string with
159 // the path and the nvoptix.dll name
160 for( int i = (int) valueSize - 1; i >= 0 && regValue[i] != '\\'; --i )
161 regValue[i] = '\0';
162 size_t newPathSize = strlen( regValue ) + strlen( optixDllName ) + 1;
163 dllPath = (char*)malloc( newPathSize );
164 if( dllPath == NULL )
165 {
166 free( regValue );
167 RegCloseKey( regKey );
168 continue;
169 }
170 strcpy( dllPath, regValue );
171 strcat( dllPath, optixDllName );
172 free( regValue );
173 RegCloseKey( regKey );
174 handle = LoadLibraryA( (LPCSTR)dllPath );
175 free( dllPath );
176 if( handle )
177 break;
178 }
179 free( deviceNames );
180 return handle;
181}
182#if defined( _MSC_VER )
183# pragma warning( pop )
184#endif
185
186static void* optixLoadWindowsDll( )
187{
188 return optixLoadWindowsDllFromName( "nvoptix.dll" );
189}
190#endif
191
194
204inline OptixResult optixInitWithHandle( void** handlePtr )
205{
206 // Make sure these functions get initialized to zero in case the DLL and function
207 // table can't be loaded
210
211 if( !handlePtr )
213
214#ifdef _WIN32
215 *handlePtr = optixLoadWindowsDll();
216 if( !*handlePtr )
218
219 void* symbol = GetProcAddress( (HMODULE)*handlePtr, "optixQueryFunctionTable" );
220 if( !symbol )
222#else
223 *handlePtr = dlopen( "libnvoptix.so.1", RTLD_NOW );
224 if( !*handlePtr )
226
227 void* symbol = dlsym( *handlePtr, "optixQueryFunctionTable" );
228 if( !symbol )
230#endif
231
232 OptixQueryFunctionTable_t* optixQueryFunctionTable = (OptixQueryFunctionTable_t*)symbol;
233
234 return optixQueryFunctionTable( OPTIX_ABI_VERSION, 0, 0, 0, &g_optixFunctionTable, sizeof( g_optixFunctionTable ) );
235}
236
240inline OptixResult optixInit( void )
241{
242 void* handle;
243 return optixInitWithHandle( &handle );
244}
245
251inline OptixResult optixUninitWithHandle( void* handle )
252{
253 if( !handle )
255#ifdef _WIN32
256 if( !FreeLibrary( (HMODULE)handle ) )
258#else
259 if( dlclose( handle ) )
261#endif
262 OptixFunctionTable empty = { 0 };
263 g_optixFunctionTable = empty;
264 return OPTIX_SUCCESS;
265}
266
267 // end group optix_utilities
269
270#ifndef OPTIX_DOXYGEN_SHOULD_SKIP_THIS
271
272// Stub functions that forward calls to the corresponding function pointer in the function table.
273
274inline const char* optixGetErrorName( OptixResult result )
275{
278
279 // If the DLL and symbol table couldn't be loaded, provide a set of error strings
280 // suitable for processing errors related to the DLL loading.
281 switch( result )
282 {
283 case OPTIX_SUCCESS:
284 return ";OPTIX_SUCCESS";
286 return ";OPTIX_ERROR_INVALID_VALUE";
288 return ";OPTIX_ERROR_UNSUPPORTED_ABI_VERSION";
290 return ";OPTIX_ERROR_FUNCTION_TABLE_SIZE_MISMATCH";
292 return ";OPTIX_ERROR_INVALID_ENTRY_FUNCTION_OPTIONS";
294 return ";OPTIX_ERROR_LIBRARY_NOT_FOUND";
296 return ";OPTIX_ERROR_ENTRY_SYMBOL_NOT_FOUND";
298 return ";OPTIX_ERROR_LIBRARY_UNLOAD_FAILURE";
299 default:
300 return "Unknown OptixResult code";
301 }
302}
303
304inline const char* optixGetErrorString( OptixResult result )
305{
308
309 // If the DLL and symbol table couldn't be loaded, provide a set of error strings
310 // suitable for processing errors related to the DLL loading.
311 switch( result )
312 {
313 case OPTIX_SUCCESS:
314 return "Success";
316 return "Invalid value";
318 return "Unsupported ABI version";
320 return "Function table size mismatch";
322 return "Invalid options to entry function";
324 return "Library not found";
326 return "Entry symbol not found";
328 return "Library could not be unloaded";
329 default:
330 return "Unknown OptixResult code";
331 }
332}
333
334inline OptixResult optixDeviceContextCreate( CUcontext fromContext, const OptixDeviceContextOptions* options, OptixDeviceContext* context )
335{
336 return g_optixFunctionTable.optixDeviceContextCreate( fromContext, options, context );
337}
338
340{
342}
343
344inline OptixResult optixDeviceContextGetProperty( OptixDeviceContext context, OptixDeviceProperty property, void* value, size_t sizeInBytes )
345{
346 return g_optixFunctionTable.optixDeviceContextGetProperty( context, property, value, sizeInBytes );
347}
348
350 OptixLogCallback callbackFunction,
351 void* callbackData,
352 unsigned int callbackLevel )
353{
354 return g_optixFunctionTable.optixDeviceContextSetLogCallback( context, callbackFunction, callbackData, callbackLevel );
355}
356
358{
360}
361
362inline OptixResult optixDeviceContextSetCacheLocation( OptixDeviceContext context, const char* location )
363{
365}
366
367inline OptixResult optixDeviceContextSetCacheDatabaseSizes( OptixDeviceContext context, size_t lowWaterMark, size_t highWaterMark )
368{
369 return g_optixFunctionTable.optixDeviceContextSetCacheDatabaseSizes( context, lowWaterMark, highWaterMark );
370}
371
373{
375}
376
377inline OptixResult optixDeviceContextGetCacheLocation( OptixDeviceContext context, char* location, size_t locationSize )
378{
379 return g_optixFunctionTable.optixDeviceContextGetCacheLocation( context, location, locationSize );
380}
381
382inline OptixResult optixDeviceContextGetCacheDatabaseSizes( OptixDeviceContext context, size_t* lowWaterMark, size_t* highWaterMark )
383{
384 return g_optixFunctionTable.optixDeviceContextGetCacheDatabaseSizes( context, lowWaterMark, highWaterMark );
385}
386
388 const OptixModuleCompileOptions* moduleCompileOptions,
389 const OptixPipelineCompileOptions* pipelineCompileOptions,
390 const char* input,
391 size_t inputSize,
392 char* logString,
393 size_t* logStringSize,
394 OptixModule* module )
395{
396 return g_optixFunctionTable.optixModuleCreate( context, moduleCompileOptions, pipelineCompileOptions, input, inputSize,
397 logString, logStringSize, module );
398}
399
401 const OptixModuleCompileOptions* moduleCompileOptions,
402 const OptixPipelineCompileOptions* pipelineCompileOptions,
403 const char* input,
404 size_t inputSize,
405 char* logString,
406 size_t* logStringSize,
407 OptixModule* module,
408 OptixTask* firstTask )
409{
410 return g_optixFunctionTable.optixModuleCreateWithTasks( context, moduleCompileOptions, pipelineCompileOptions, input,
411 inputSize, logString, logStringSize, module, firstTask );
412}
413
415{
417}
418
420{
422}
423
425 const OptixModuleCompileOptions* moduleCompileOptions,
426 const OptixPipelineCompileOptions* pipelineCompileOptions,
427 const OptixBuiltinISOptions* builtinISOptions,
428 OptixModule* builtinModule )
429{
430 return g_optixFunctionTable.optixBuiltinISModuleGet( context, moduleCompileOptions, pipelineCompileOptions,
431 builtinISOptions, builtinModule );
432}
433
434inline OptixResult optixTaskExecute( OptixTask task, OptixTask* additionalTasks, unsigned int maxNumAdditionalTasks, unsigned int* numAdditionalTasksCreated )
435{
436 return g_optixFunctionTable.optixTaskExecute( task, additionalTasks, maxNumAdditionalTasks, numAdditionalTasksCreated );
437}
438
440 const OptixProgramGroupDesc* programDescriptions,
441 unsigned int numProgramGroups,
442 const OptixProgramGroupOptions* options,
443 char* logString,
444 size_t* logStringSize,
445 OptixProgramGroup* programGroups )
446{
447 return g_optixFunctionTable.optixProgramGroupCreate( context, programDescriptions, numProgramGroups, options,
448 logString, logStringSize, programGroups );
449}
450
452{
453 return g_optixFunctionTable.optixProgramGroupDestroy( programGroup );
454}
455
457{
458 return g_optixFunctionTable.optixProgramGroupGetStackSize( programGroup, stackSizes, pipeline );
459}
460
462 const OptixPipelineCompileOptions* pipelineCompileOptions,
463 const OptixPipelineLinkOptions* pipelineLinkOptions,
464 const OptixProgramGroup* programGroups,
465 unsigned int numProgramGroups,
466 char* logString,
467 size_t* logStringSize,
468 OptixPipeline* pipeline )
469{
470 return g_optixFunctionTable.optixPipelineCreate( context, pipelineCompileOptions, pipelineLinkOptions, programGroups,
471 numProgramGroups, logString, logStringSize, pipeline );
472}
473
475{
477}
478
480 unsigned int directCallableStackSizeFromTraversal,
481 unsigned int directCallableStackSizeFromState,
482 unsigned int continuationStackSize,
483 unsigned int maxTraversableGraphDepth )
484{
485 return g_optixFunctionTable.optixPipelineSetStackSize( pipeline, directCallableStackSizeFromTraversal, directCallableStackSizeFromState,
486 continuationStackSize, maxTraversableGraphDepth );
487}
488
490 const OptixAccelBuildOptions* accelOptions,
491 const OptixBuildInput* buildInputs,
492 unsigned int numBuildInputs,
493 OptixAccelBufferSizes* bufferSizes )
494{
495 return g_optixFunctionTable.optixAccelComputeMemoryUsage( context, accelOptions, buildInputs, numBuildInputs, bufferSizes );
496}
497
499 CUstream stream,
500 const OptixAccelBuildOptions* accelOptions,
501 const OptixBuildInput* buildInputs,
502 unsigned int numBuildInputs,
503 CUdeviceptr tempBuffer,
504 size_t tempBufferSizeInBytes,
505 CUdeviceptr outputBuffer,
506 size_t outputBufferSizeInBytes,
507 OptixTraversableHandle* outputHandle,
508 const OptixAccelEmitDesc* emittedProperties,
509 unsigned int numEmittedProperties )
510{
511 return g_optixFunctionTable.optixAccelBuild( context, stream, accelOptions, buildInputs, numBuildInputs, tempBuffer,
512 tempBufferSizeInBytes, outputBuffer, outputBufferSizeInBytes,
513 outputHandle, emittedProperties, numEmittedProperties );
514}
515
516
518{
519 return g_optixFunctionTable.optixAccelGetRelocationInfo( context, handle, info );
520}
521
522
523inline OptixResult optixCheckRelocationCompatibility( OptixDeviceContext context, const OptixRelocationInfo* info, int* compatible )
524{
525 return g_optixFunctionTable.optixCheckRelocationCompatibility( context, info, compatible );
526}
527
529 CUstream stream,
530 const OptixRelocationInfo* info,
531 const OptixRelocateInput* relocateInputs,
532 size_t numRelocateInputs,
533 CUdeviceptr targetAccel,
534 size_t targetAccelSizeInBytes,
535 OptixTraversableHandle* targetHandle )
536{
537 return g_optixFunctionTable.optixAccelRelocate( context, stream, info, relocateInputs, numRelocateInputs,
538 targetAccel, targetAccelSizeInBytes, targetHandle );
539}
540
542 CUstream stream,
543 OptixTraversableHandle inputHandle,
544 CUdeviceptr outputBuffer,
545 size_t outputBufferSizeInBytes,
546 OptixTraversableHandle* outputHandle )
547{
548 return g_optixFunctionTable.optixAccelCompact( context, stream, inputHandle, outputBuffer, outputBufferSizeInBytes, outputHandle );
549}
550
552 CUstream stream,
554 const OptixAccelEmitDesc* emittedProperty )
555{
556 return g_optixFunctionTable.optixAccelEmitProperty( context, stream, handle, emittedProperty );
557}
558
560 CUdeviceptr pointer,
561 OptixTraversableType traversableType,
562 OptixTraversableHandle* traversableHandle )
563{
564 return g_optixFunctionTable.optixConvertPointerToTraversableHandle( onDevice, pointer, traversableType, traversableHandle );
565}
566
568 const OptixOpacityMicromapArrayBuildInput* buildInput,
569 OptixMicromapBufferSizes* bufferSizes )
570{
571 return g_optixFunctionTable.optixOpacityMicromapArrayComputeMemoryUsage( context, buildInput, bufferSizes );
572}
573
575 CUstream stream,
576 const OptixOpacityMicromapArrayBuildInput* buildInput,
577 const OptixMicromapBuffers* buffers )
578{
579 return g_optixFunctionTable.optixOpacityMicromapArrayBuild( context, stream, buildInput, buffers );
580}
581
583 CUdeviceptr opacityMicromapArray,
584 OptixRelocationInfo* info )
585{
586 return g_optixFunctionTable.optixOpacityMicromapArrayGetRelocationInfo( context, opacityMicromapArray, info );
587}
588
590 CUstream stream,
591 const OptixRelocationInfo* info,
592 CUdeviceptr targetOpacityMicromapArray,
593 size_t targetOpacityMicromapArraySizeInBytes )
594{
595 return g_optixFunctionTable.optixOpacityMicromapArrayRelocate( context, stream, info, targetOpacityMicromapArray, targetOpacityMicromapArraySizeInBytes );
596}
597
600 OptixMicromapBufferSizes* bufferSizes )
601{
602 return g_optixFunctionTable.optixDisplacementMicromapArrayComputeMemoryUsage( context, buildInput, bufferSizes );
603}
604
606 CUstream stream,
608 const OptixMicromapBuffers* buffers )
609{
610 return g_optixFunctionTable.optixDisplacementMicromapArrayBuild( context, stream, buildInput, buffers );
611}
612
613inline OptixResult optixSbtRecordPackHeader( OptixProgramGroup programGroup, void* sbtRecordHeaderHostPointer )
614{
615 return g_optixFunctionTable.optixSbtRecordPackHeader( programGroup, sbtRecordHeaderHostPointer );
616}
617
618inline OptixResult optixLaunch( OptixPipeline pipeline,
619 CUstream stream,
620 CUdeviceptr pipelineParams,
621 size_t pipelineParamsSize,
622 const OptixShaderBindingTable* sbt,
623 unsigned int width,
624 unsigned int height,
625 unsigned int depth )
626{
627 return g_optixFunctionTable.optixLaunch( pipeline, stream, pipelineParams, pipelineParamsSize, sbt, width, height, depth );
628}
629
630inline OptixResult optixDenoiserCreate( OptixDeviceContext context, OptixDenoiserModelKind modelKind, const OptixDenoiserOptions* options, OptixDenoiser* returnHandle )
631{
632 return g_optixFunctionTable.optixDenoiserCreate( context, modelKind, options, returnHandle );
633}
634
635inline OptixResult optixDenoiserCreateWithUserModel( OptixDeviceContext context, const void* data, size_t dataSizeInBytes, OptixDenoiser* returnHandle )
636{
637 return g_optixFunctionTable.optixDenoiserCreateWithUserModel( context, data, dataSizeInBytes, returnHandle );
638}
639
641{
643}
644
646 unsigned int maximumInputWidth,
647 unsigned int maximumInputHeight,
648 OptixDenoiserSizes* returnSizes )
649{
650 return g_optixFunctionTable.optixDenoiserComputeMemoryResources( handle, maximumInputWidth, maximumInputHeight, returnSizes );
651}
652
654 CUstream stream,
655 unsigned int inputWidth,
656 unsigned int inputHeight,
657 CUdeviceptr denoiserState,
658 size_t denoiserStateSizeInBytes,
659 CUdeviceptr scratch,
660 size_t scratchSizeInBytes )
661{
662 return g_optixFunctionTable.optixDenoiserSetup( denoiser, stream, inputWidth, inputHeight, denoiserState,
663 denoiserStateSizeInBytes, scratch, scratchSizeInBytes );
664}
665
667 CUstream stream,
668 const OptixDenoiserParams* params,
669 CUdeviceptr denoiserData,
670 size_t denoiserDataSize,
671 const OptixDenoiserGuideLayer* guideLayer,
672 const OptixDenoiserLayer* layers,
673 unsigned int numLayers,
674 unsigned int inputOffsetX,
675 unsigned int inputOffsetY,
676 CUdeviceptr scratch,
677 size_t scratchSizeInBytes )
678{
679 return g_optixFunctionTable.optixDenoiserInvoke( handle, stream, params, denoiserData, denoiserDataSize,
680 guideLayer, layers, numLayers,
681 inputOffsetX, inputOffsetY, scratch, scratchSizeInBytes );
682}
683
685 CUstream stream,
686 const OptixImage2D* inputImage,
687 CUdeviceptr outputIntensity,
688 CUdeviceptr scratch,
689 size_t scratchSizeInBytes )
690{
691 return g_optixFunctionTable.optixDenoiserComputeIntensity( handle, stream, inputImage, outputIntensity, scratch, scratchSizeInBytes );
692}
693
695 CUstream stream,
696 const OptixImage2D* inputImage,
697 CUdeviceptr outputAverageColor,
698 CUdeviceptr scratch,
699 size_t scratchSizeInBytes )
700{
701 return g_optixFunctionTable.optixDenoiserComputeAverageColor( handle, stream, inputImage, outputAverageColor, scratch, scratchSizeInBytes );
702}
703
704#endif // OPTIX_DOXYGEN_SHOULD_SKIP_THIS
705
706#ifdef __cplusplus
707}
708#endif
709
710#endif // OPTIX_OPTIX_STUBS_H
OptixFunctionTable g_optixFunctionTable
If the stubs in optix_stubs.h are used, then the function table needs to be defined in exactly one tr...
Definition: optix_function_table_definition.h:41
struct OptixProgramGroup_t * OptixProgramGroup
Opaque type representing a program group.
Definition: optix_types.h:65
struct OptixDenoiser_t * OptixDenoiser
Opaque type representing a denoiser instance.
Definition: optix_types.h:71
OptixDeviceProperty
Parameters used for optixDeviceContextGetProperty()
Definition: optix_types.h:200
unsigned long long CUdeviceptr
CUDA device pointer.
Definition: optix_types.h:52
OptixResult
Result codes returned from API functions.
Definition: optix_types.h:152
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:2422
OptixModuleCompileState
Module compilation state.
Definition: optix_types.h:1898
struct OptixModule_t * OptixModule
Opaque type representing a module.
Definition: optix_types.h:62
OptixDenoiserModelKind
Model kind used by the denoiser.
Definition: optix_types.h:1595
struct OptixPipeline_t * OptixPipeline
Opaque type representing a pipeline.
Definition: optix_types.h:68
unsigned long long OptixTraversableHandle
Traversable handle.
Definition: optix_types.h:77
OptixTraversableType
Traversable Handles.
Definition: optix_types.h:1542
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:261
struct OptixTask_t * OptixTask
Opaque type representing a work task.
Definition: optix_types.h:74
struct OptixDeviceContext_t * OptixDeviceContext
Opaque type representing a device context.
Definition: optix_types.h:59
@ OPTIX_ERROR_LIBRARY_NOT_FOUND
Definition: optix_types.h:187
@ OPTIX_ERROR_LIBRARY_UNLOAD_FAILURE
Definition: optix_types.h:189
@ OPTIX_ERROR_ENTRY_SYMBOL_NOT_FOUND
Definition: optix_types.h:188
@ OPTIX_SUCCESS
Definition: optix_types.h:153
@ OPTIX_ERROR_INVALID_VALUE
Definition: optix_types.h:154
@ OPTIX_ERROR_UNSUPPORTED_ABI_VERSION
Definition: optix_types.h:184
@ OPTIX_ERROR_INVALID_ENTRY_FUNCTION_OPTIONS
Definition: optix_types.h:186
@ OPTIX_ERROR_FUNCTION_TABLE_SIZE_MISMATCH
Definition: optix_types.h:185
OptixResult optixInit(void)
Loads the OptiX library and initializes the function table used by the stubs below.
Definition: optix_stubs.h:240
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:251
OptixResult optixInitWithHandle(void **handlePtr)
Loads the OptiX library and initializes the function table used by the stubs below.
Definition: optix_stubs.h:204
OptiX public API header.
#define OPTIX_ABI_VERSION
The OptiX ABI version.
Definition: optix_function_table.h:29
OptixResult optixConvertPointerToTraversableHandle(OptixDeviceContext onDevice, CUdeviceptr pointer, OptixTraversableType traversableType, OptixTraversableHandle *traversableHandle)
OptixResult optixSbtRecordPackHeader(OptixProgramGroup programGroup, void *sbtRecordHeaderHostPointer)
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.
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...
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...
OptixResult optixDeviceContextGetCacheEnabled(OptixDeviceContext context, int *enabled)
Indicates whether the disk cache is enabled or disabled.
OptixResult optixPipelineDestroy(OptixPipeline pipeline)
Thread safety: A pipeline must not be destroyed while it is still in use by concurrent API calls in o...
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...
OptixResult optixDisplacementMicromapArrayComputeMemoryUsage(OptixDeviceContext context, const OptixDisplacementMicromapArrayBuildInput *buildInput, OptixMicromapBufferSizes *bufferSizes)
Determine the amount of memory necessary for a Displacement Micromap Array build.
OptixResult optixDenoiserComputeMemoryResources(const OptixDenoiser denoiser, unsigned int outputWidth, unsigned int outputHeight, OptixDenoiserSizes *returnSizes)
Computes the GPU memory resources required to execute the denoiser.
OptixResult optixDeviceContextSetCacheEnabled(OptixDeviceContext context, int enabled)
Enables or disables the disk cache.
OptixResult optixDenoiserCreate(OptixDeviceContext context, OptixDenoiserModelKind modelKind, const OptixDenoiserOptions *options, OptixDenoiser *denoiser)
Creates a denoiser object with the given options, using built-in inference models.
OptixResult optixDeviceContextSetLogCallback(OptixDeviceContext context, OptixLogCallback callbackFunction, void *callbackData, unsigned int callbackLevel)
Sets the current log callback method.
OptixResult optixDeviceContextDestroy(OptixDeviceContext context)
Destroys all CPU and GPU state associated with the device.
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...
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 ...
OptixResult optixOpacityMicromapArrayGetRelocationInfo(OptixDeviceContext context, CUdeviceptr opacityMicromapArray, OptixRelocationInfo *info)
Obtain relocation information, stored in OptixRelocationInfo, for a given context and opacity microma...
OptixResult optixDeviceContextSetCacheLocation(OptixDeviceContext context, const char *location)
Sets the location of the disk cache.
OptixResult optixAccelGetRelocationInfo(OptixDeviceContext context, OptixTraversableHandle handle, OptixRelocationInfo *info)
Obtain relocation information, stored in OptixRelocationInfo, for a given context and acceleration st...
OptixResult optixOpacityMicromapArrayBuild(OptixDeviceContext context, CUstream stream, const OptixOpacityMicromapArrayBuildInput *buildInput, const OptixMicromapBuffers *buffers)
Construct an array of Opacity Micromaps.
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.
OptixResult optixOpacityMicromapArrayComputeMemoryUsage(OptixDeviceContext context, const OptixOpacityMicromapArrayBuildInput *buildInput, OptixMicromapBufferSizes *bufferSizes)
Determine the amount of memory necessary for a Opacity Micromap Array build.
const char * optixGetErrorString(OptixResult result)
Returns the description string for an error code.
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....
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...
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.
OptixResult optixDenoiserDestroy(OptixDenoiser denoiser)
Destroys the denoiser object and any associated host resources.
const char * optixGetErrorName(OptixResult result)
Returns a string containing the name of an error code in the enum.
OptixResult optixDeviceContextGetProperty(OptixDeviceContext context, OptixDeviceProperty property, void *value, size_t sizeInBytes)
Query properties of a device context.
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 ...
OptixResult optixAccelComputeMemoryUsage(OptixDeviceContext context, const OptixAccelBuildOptions *accelOptions, const OptixBuildInput *buildInputs, unsigned int numBuildInputs, OptixAccelBufferSizes *bufferSizes)
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....
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)
OptixResult optixModuleGetCompilationState(OptixModule module, OptixModuleCompileState *state)
When creating a module with tasks, the current state of the module can be queried using this function...
OptixResult optixDisplacementMicromapArrayBuild(OptixDeviceContext context, CUstream stream, const OptixDisplacementMicromapArrayBuildInput *buildInput, const OptixMicromapBuffers *buffers)
FIXME Construct an array of Displacement Micromap (DMMs).
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...
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...
OptixResult optixDeviceContextSetCacheDatabaseSizes(OptixDeviceContext context, size_t lowWaterMark, size_t highWaterMark)
Sets the low and high water marks for disk cache garbage collection.
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....
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.
OptixResult optixDeviceContextCreate(CUcontext fromContext, const OptixDeviceContextOptions *options, OptixDeviceContext *context)
Create a device context associated with the CUDA context specified with 'fromContext'.
OptixResult optixModuleDestroy(OptixModule module)
Call for OptixModule objects created with optixModuleCreate and optixModuleDeserialize.
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 ...
OptixResult optixPipelineSetStackSize(OptixPipeline pipeline, unsigned int directCallableStackSizeFromTraversal, unsigned int directCallableStackSizeFromState, unsigned int continuationStackSize, unsigned int maxTraversableGraphDepth)
Sets the stack sizes for a pipeline.
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...
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...
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,...
OptixResult optixProgramGroupDestroy(OptixProgramGroup programGroup)
Thread safety: A program group must not be destroyed while it is still in use by concurrent API calls...
static void * optixLoadWindowsDllFromName(const char *optixDllName)
Definition: optix_stubs.h:68
static void * optixLoadWindowsDll()
Definition: optix_stubs.h:186
Struct for querying builder allocation requirements.
Definition: optix_types.h:1339
Build options for acceleration structures.
Definition: optix_types.h:1317
Specifies a type and output destination for emitted post-build properties.
Definition: optix_types.h:1371
Build inputs.
Definition: optix_types.h:1018
Specifies the options for retrieving an intersection program for a built-in primitive type....
Definition: optix_types.h:2434
Guide layer for the denoiser.
Definition: optix_types.h:1635
Input/Output layers for the denoiser.
Definition: optix_types.h:1676
Options used by the denoiser.
Definition: optix_types.h:1623
Definition: optix_types.h:1708
Various sizes related to the denoiser.
Definition: optix_types.h:1740
Parameters used for optixDeviceContextCreate()
Definition: optix_types.h:280
Inputs to displacement micromaps array construction.
Definition: optix_types.h:519
The function table containing all API functions.
Definition: optix_function_table.h:56
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:299
OptixResult(* optixDeviceContextSetLogCallback)(OptixDeviceContext context, OptixLogCallback callbackFunction, void *callbackData, unsigned int callbackLevel)
See optixDeviceContextSetLogCallback().
Definition: optix_function_table.h:80
OptixResult(* optixDeviceContextGetCacheDatabaseSizes)(OptixDeviceContext context, size_t *lowWaterMark, size_t *highWaterMark)
See optixDeviceContextGetCacheDatabaseSizes().
Definition: optix_function_table.h:101
OptixResult(* optixOpacityMicromapArrayGetRelocationInfo)(OptixDeviceContext context, CUdeviceptr opacityMicromapArray, OptixRelocationInfo *info)
See optixOpacityMicromapArrayGetRelocationInfo().
Definition: optix_function_table.h:269
OptixResult(* optixDeviceContextGetProperty)(OptixDeviceContext context, OptixDeviceProperty property, void *value, size_t sizeInBytes)
See optixDeviceContextGetProperty().
Definition: optix_function_table.h:77
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:174
OptixResult(* optixOpacityMicromapArrayBuild)(OptixDeviceContext context, CUstream stream, const OptixOpacityMicromapArrayBuildInput *buildInput, const OptixMicromapBuffers *buffers)
See optixOpacityMicromapArrayBuild().
Definition: optix_function_table.h:263
OptixResult(* optixDenoiserComputeAverageColor)(OptixDenoiser handle, CUstream stream, const OptixImage2D *inputImage, CUdeviceptr outputAverageColor, CUdeviceptr scratch, size_t scratchSizeInBytes)
See optixDenoiserComputeAverageColor().
Definition: optix_function_table.h:357
const char *(* optixGetErrorName)(OptixResult result)
See optixGetErrorName().
Definition: optix_function_table.h:61
OptixResult(* optixDenoiserCreate)(OptixDeviceContext context, OptixDenoiserModelKind modelKind, const OptixDenoiserOptions *options, OptixDenoiser *returnHandle)
See optixDenoiserCreate().
Definition: optix_function_table.h:313
OptixResult(* optixOpacityMicromapArrayComputeMemoryUsage)(OptixDeviceContext context, const OptixOpacityMicromapArrayBuildInput *buildInput, OptixMicromapBufferSizes *bufferSizes)
See optixOpacityMicromapArrayComputeMemoryUsage().
Definition: optix_function_table.h:258
OptixResult(* optixDeviceContextSetCacheDatabaseSizes)(OptixDeviceContext context, size_t lowWaterMark, size_t highWaterMark)
See optixDeviceContextSetCacheDatabaseSizes().
Definition: optix_function_table.h:92
OptixResult(* optixDenoiserCreateWithUserModel)(OptixDeviceContext context, const void *data, size_t dataSizeInBytes, OptixDenoiser *returnHandle)
See optixDenoiserCreateWithUserModel().
Definition: optix_function_table.h:365
OptixResult(* optixConvertPointerToTraversableHandle)(OptixDeviceContext onDevice, CUdeviceptr pointer, OptixTraversableType traversableType, OptixTraversableHandle *traversableHandle)
See optixConvertPointerToTraversableHandle().
Definition: optix_function_table.h:252
OptixResult(* optixDenoiserDestroy)(OptixDenoiser handle)
See optixDenoiserDestroy().
Definition: optix_function_table.h:316
OptixResult(* optixDisplacementMicromapArrayBuild)(OptixDeviceContext context, CUstream stream, const OptixDisplacementMicromapArrayBuildInput *buildInput, const OptixMicromapBuffers *buffers)
See optixDisplacementMicromapArrayBuild().
Definition: optix_function_table.h:286
const char *(* optixGetErrorString)(OptixResult result)
See optixGetErrorString().
Definition: optix_function_table.h:64
OptixResult(* optixCheckRelocationCompatibility)(OptixDeviceContext context, const OptixRelocationInfo *info, int *compatible)
See optixCheckRelocationCompatibility().
Definition: optix_function_table.h:223
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:228
OptixResult(* optixDeviceContextDestroy)(OptixDeviceContext context)
See optixDeviceContextDestroy().
Definition: optix_function_table.h:74
OptixResult(* optixProgramGroupGetStackSize)(OptixProgramGroup programGroup, OptixStackSizes *stackSizes, OptixPipeline pipeline)
See optixProgramGroupGetStackSize().
Definition: optix_function_table.h:167
OptixResult(* optixTaskExecute)(OptixTask task, OptixTask *additionalTasks, unsigned int maxNumAdditionalTasks, unsigned int *numAdditionalTasksCreated)
See optixTaskExecute().
Definition: optix_function_table.h:146
OptixResult(* optixDeviceContextGetCacheEnabled)(OptixDeviceContext context, int *enabled)
See optixDeviceContextGetCacheEnabled().
Definition: optix_function_table.h:95
OptixResult(* optixDeviceContextSetCacheEnabled)(OptixDeviceContext context, int enabled)
See optixDeviceContextSetCacheEnabled().
Definition: optix_function_table.h:86
OptixResult(* optixDisplacementMicromapArrayComputeMemoryUsage)(OptixDeviceContext context, const OptixDisplacementMicromapArrayBuildInput *buildInput, OptixMicromapBufferSizes *bufferSizes)
See optixDisplacementMicromapArrayComputeMemoryUsage().
Definition: optix_function_table.h:281
OptixResult(* optixPipelineDestroy)(OptixPipeline pipeline)
See optixPipelineDestroy().
Definition: optix_function_table.h:184
OptixResult(* optixDeviceContextSetCacheLocation)(OptixDeviceContext context, const char *location)
See optixDeviceContextSetCacheLocation().
Definition: optix_function_table.h:89
OptixResult(* optixModuleGetCompilationState)(OptixModule module, OptixModuleCompileState *state)
See optixModuleGetCompilationState().
Definition: optix_function_table.h:129
OptixResult(* optixBuiltinISModuleGet)(OptixDeviceContext context, const OptixModuleCompileOptions *moduleCompileOptions, const OptixPipelineCompileOptions *pipelineCompileOptions, const OptixBuiltinISOptions *builtinISOptions, OptixModule *builtinModule)
See optixBuiltinISModuleGet().
Definition: optix_function_table.h:135
OptixResult(* optixDeviceContextGetCacheLocation)(OptixDeviceContext context, char *location, size_t locationSize)
See optixDeviceContextGetCacheLocation().
Definition: optix_function_table.h:98
OptixResult(* optixPipelineSetStackSize)(OptixPipeline pipeline, unsigned int directCallableStackSizeFromTraversal, unsigned int directCallableStackSizeFromState, unsigned int continuationStackSize, unsigned int maxTraversableGraphDepth)
See optixPipelineSetStackSize().
Definition: optix_function_table.h:187
OptixResult(* optixAccelGetRelocationInfo)(OptixDeviceContext context, OptixTraversableHandle handle, OptixRelocationInfo *info)
See optixAccelGetRelocationInfo().
Definition: optix_function_table.h:219
OptixResult(* optixAccelEmitProperty)(OptixDeviceContext context, CUstream stream, OptixTraversableHandle handle, const OptixAccelEmitDesc *emittedProperty)
See optixAccelComputeMemoryUsage().
Definition: optix_function_table.h:246
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:325
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:118
OptixResult(* optixDeviceContextCreate)(CUcontext fromContext, const OptixDeviceContextOptions *options, OptixDeviceContext *context)
See optixDeviceContextCreate().
Definition: optix_function_table.h:71
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:108
OptixResult(* optixSbtRecordPackHeader)(OptixProgramGroup programGroup, void *sbtRecordHeaderHostPointer)
See optixConvertPointerToTraversableHandle().
Definition: optix_function_table.h:296
OptixResult(* optixOpacityMicromapArrayRelocate)(OptixDeviceContext context, CUstream stream, const OptixRelocationInfo *info, CUdeviceptr targetOpacityMicromapArray, size_t targetOpacityMicromapArraySizeInBytes)
See optixOpacityMicromapArrayRelocate().
Definition: optix_function_table.h:274
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:205
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:335
OptixResult(* optixModuleDestroy)(OptixModule module)
See optixModuleDestroy().
Definition: optix_function_table.h:132
OptixResult(* optixAccelCompact)(OptixDeviceContext context, CUstream stream, OptixTraversableHandle inputHandle, CUdeviceptr outputBuffer, size_t outputBufferSizeInBytes, OptixTraversableHandle *outputHandle)
See optixAccelCompact().
Definition: optix_function_table.h:239
OptixResult(* optixProgramGroupDestroy)(OptixProgramGroup programGroup)
See optixProgramGroupDestroy().
Definition: optix_function_table.h:164
OptixResult(* optixAccelComputeMemoryUsage)(OptixDeviceContext context, const OptixAccelBuildOptions *accelOptions, const OptixBuildInput *buildInputs, unsigned int numBuildInputs, OptixAccelBufferSizes *bufferSizes)
See optixAccelComputeMemoryUsage().
Definition: optix_function_table.h:198
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:155
OptixResult(* optixDenoiserComputeMemoryResources)(const OptixDenoiser handle, unsigned int maximumInputWidth, unsigned int maximumInputHeight, OptixDenoiserSizes *returnSizes)
See optixDenoiserComputeMemoryResources().
Definition: optix_function_table.h:319
OptixResult(* optixDenoiserComputeIntensity)(OptixDenoiser handle, CUstream stream, const OptixImage2D *inputImage, CUdeviceptr outputIntensity, CUdeviceptr scratch, size_t scratchSizeInBytes)
See optixDenoiserComputeIntensity().
Definition: optix_function_table.h:349
Image descriptor used by the denoiser.
Definition: optix_types.h:1573
Conservative memory requirements for building a opacity/displacement micromap array.
Definition: optix_types.h:1245
Buffer inputs for opacity/displacement micromap array builds.
Definition: optix_types.h:1252
Compilation options for module.
Definition: optix_types.h:2025
Inputs to opacity micromap array construction.
Definition: optix_types.h:1220
Compilation options for all modules of a pipeline.
Definition: optix_types.h:2309
Descriptor for program groups.
Definition: optix_types.h:2136
Program group options.
Definition: optix_types.h:2162
Relocation inputs.
Definition: optix_types.h:1042
Used to store information related to relocation of optix data structures.
Definition: optix_types.h:1384
Describes the shader binding table (SBT)
Definition: optix_types.h:2355
Describes the stack size requirements of a program group.
Definition: optix_types.h:2395