NVIDIA OptiX 8.1 nvidia_logo_transpbg.gif Up
optix_stubs.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2019 - 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 * SPDX-License-Identifier: BSD-3-Clause
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * 3. Neither the name of the copyright holder nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
34
35#ifndef OPTIX_OPTIX_STUBS_H
36#define OPTIX_OPTIX_STUBS_H
37
39
40#ifdef _WIN32
41#ifndef WIN32_LEAN_AND_MEAN
42#define WIN32_LEAN_AND_MEAN 1
43#endif
44#include <windows.h>
45// The cfgmgr32 header is necessary for interrogating driver information in the registry.
46// For convenience the library is also linked in automatically using the #pragma command.
47#include <cfgmgr32.h>
48#pragma comment( lib, "Cfgmgr32.lib" )
49#include <string.h>
50#else
51#include <dlfcn.h>
52#endif
53
56#ifndef OPTIXAPI
57# ifdef OPTIX_ENABLE_SDK_MIXING
58# define OPTIXAPI static
59# else // OPTIX_ENABLE_SDK_MIXING
60# ifdef __cplusplus
61# define OPTIXAPI extern "C"
62# else // __cplusplus
63# define OPTIXAPI
64# endif // __cplusplus
65# endif // OPTIX_ENABLE_SDK_MIXING
66#endif // OPTIXAPI
67
68#ifdef __cplusplus
69extern "C" {
70#endif
71
72// The function table needs to be defined in exactly one translation unit. This can be
73// achieved by including optix_function_table_definition.h in that translation unit.
75
76#ifdef __cplusplus
77}
78#endif
79
80#ifdef _WIN32
81#if defined( _MSC_VER )
82// Visual Studio produces warnings suggesting strcpy and friends being replaced with _s
83// variants. All the string lengths and allocation sizes have been calculated and should
84// be safe, so we are disabling this warning to increase compatibility.
85#pragma warning( push )
86#pragma warning( disable : 4996 )
87#endif
88static void* optixLoadWindowsDllFromName( const char* optixDllName )
89{
90 void* handle = NULL;
91
92 // Try the bare dll name first. This picks it up in the local path, followed by
93 // standard Windows paths.
94 handle = LoadLibraryA( (LPSTR)optixDllName );
95 if( handle )
96 return handle;
97// If we don't find it in the default dll search path, try the system paths
98
99 // Get the size of the path first, then allocate
100 unsigned int size = GetSystemDirectoryA( NULL, 0 );
101 if( size == 0 )
102 {
103 // Couldn't get the system path size, so bail
104 return NULL;
105 }
106 size_t pathSize = size + 1 + strlen( optixDllName );
107 char* systemPath = (char*)malloc( pathSize );
108 if( systemPath == NULL )
109 return NULL;
110 if( GetSystemDirectoryA( systemPath, size ) != size - 1 )
111 {
112 // Something went wrong
113 free( systemPath );
114 return NULL;
115 }
116 strcat( systemPath, "\\" );
117 strcat( systemPath, optixDllName );
118 handle = LoadLibraryA( systemPath );
119 free( systemPath );
120 if( handle )
121 return handle;
122
123 // If we didn't find it, go looking in the register store. Since nvoptix.dll doesn't
124 // have its own registry entry, we are going to look for the opengl driver which lives
125 // next to nvoptix.dll. 0 (null) will be returned if any errors occured.
126
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 )
131 {
132 return NULL;
133 }
134 char* deviceNames = (char*)malloc( deviceListSize );
135 if( deviceNames == NULL )
136 return NULL;
137 if( CM_Get_Device_ID_ListA( deviceInstanceIdentifiersGUID, deviceNames, deviceListSize, flags ) )
138 {
139 free( deviceNames );
140 return NULL;
141 }
142 DEVINST devID = 0;
143 char* dllPath = NULL;
144
145 // Continue to the next device if errors are encountered.
146 for( char* deviceName = deviceNames; *deviceName; deviceName += strlen( deviceName ) + 1 )
147 {
148 if( CM_Locate_DevNodeA( &devID, deviceName, CM_LOCATE_DEVNODE_NORMAL ) != CR_SUCCESS )
149 {
150 continue;
151 }
152 HKEY regKey = 0;
153 if( CM_Open_DevNode_Key( devID, KEY_QUERY_VALUE, 0, RegDisposition_OpenExisting, &regKey, CM_REGISTRY_SOFTWARE ) != CR_SUCCESS )
154 {
155 continue;
156 }
157 const char* valueName = "OpenGLDriverName";
158 DWORD valueSize = 0;
159 LSTATUS ret = RegQueryValueExA( regKey, valueName, NULL, NULL, NULL, &valueSize );
160 if( ret != ERROR_SUCCESS )
161 {
162 RegCloseKey( regKey );
163 continue;
164 }
165 char* regValue = (char*)malloc( valueSize );
166 if( regValue == NULL )
167 {
168 RegCloseKey( regKey );
169 continue;
170 }
171 ret = RegQueryValueExA( regKey, valueName, NULL, NULL, (LPBYTE)regValue, &valueSize );
172 if( ret != ERROR_SUCCESS )
173 {
174 free( regValue );
175 RegCloseKey( regKey );
176 continue;
177 }
178 // Strip the opengl driver dll name from the string then create a new string with
179 // the path and the nvoptix.dll name
180 for( int i = (int)valueSize - 1; i >= 0 && regValue[i] != '\\'; --i )
181 regValue[i] = '\0';
182 size_t newPathSize = strlen( regValue ) + strlen( optixDllName ) + 1;
183 dllPath = (char*)malloc( newPathSize );
184 if( dllPath == NULL )
185 {
186 free( regValue );
187 RegCloseKey( regKey );
188 continue;
189 }
190 strcpy( dllPath, regValue );
191 strcat( dllPath, optixDllName );
192 free( regValue );
193 RegCloseKey( regKey );
194 handle = LoadLibraryA( (LPCSTR)dllPath );
195 free( dllPath );
196 if( handle )
197 break;
198 }
199 free( deviceNames );
200 return handle;
201}
202#if defined( _MSC_VER )
203#pragma warning( pop )
204#endif
205
207{
208 return optixLoadWindowsDllFromName( "nvoptix.dll" );
209}
210#endif
211
214
224OPTIXAPI inline OptixResult optixInitWithHandle( void** handlePtr )
225{
226 // Make sure these functions get initialized to zero in case the DLL and function
227 // table can't be loaded
230
231 if( !handlePtr )
233
234#ifdef _WIN32
235 *handlePtr = optixLoadWindowsDll();
236 if( !*handlePtr )
238
239 void* symbol = (void*)GetProcAddress( (HMODULE)*handlePtr, "optixQueryFunctionTable" );
240 if( !symbol )
242#else
243 *handlePtr = dlopen( "libnvoptix.so.1", RTLD_NOW );
244 if( !*handlePtr )
246
247 void* symbol = dlsym( *handlePtr, "optixQueryFunctionTable" );
248 if( !symbol )
250#endif
251
252 OptixQueryFunctionTable_t* optixQueryFunctionTable = (OptixQueryFunctionTable_t*)symbol;
253
254 return optixQueryFunctionTable( OPTIX_ABI_VERSION, 0, 0, 0, &OPTIX_FUNCTION_TABLE_SYMBOL, sizeof( OPTIX_FUNCTION_TABLE_SYMBOL ) );
255}
256
261{
262 void* handle;
263 return optixInitWithHandle( &handle );
264}
265
272{
273 if( !handle )
275#ifdef _WIN32
276 if( !FreeLibrary( (HMODULE)handle ) )
278#else
279 if( dlclose( handle ) )
281#endif
283#ifdef __cplusplus
284 {}
285#else
286 = { 0 }
287#endif
288 ;
290 return OPTIX_SUCCESS;
291}
292
293 // end group optix_utilities
295
296#ifndef OPTIX_DOXYGEN_SHOULD_SKIP_THIS
297
298// Stub functions that forward calls to the corresponding function pointer in the function table.
299
300OPTIXAPI inline const char* optixGetErrorName( OptixResult result )
301{
304
305 // If the DLL and symbol table couldn't be loaded, provide a set of error strings
306 // suitable for processing errors related to the DLL loading.
307 switch( result )
308 {
309 case OPTIX_SUCCESS:
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";
325 default:
326 return "Unknown OptixResult code";
327 }
328}
329
330OPTIXAPI inline const char* optixGetErrorString( OptixResult result )
331{
334
335 // If the DLL and symbol table couldn't be loaded, provide a set of error strings
336 // suitable for processing errors related to the DLL loading.
337 switch( result )
338 {
339 case OPTIX_SUCCESS:
340 return "Success";
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";
355 default:
356 return "Unknown OptixResult code";
357 }
358}
359
360OPTIXAPI inline OptixResult optixDeviceContextCreate( CUcontext fromContext, const OptixDeviceContextOptions* options, OptixDeviceContext* context )
361{
362 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDeviceContextCreate( fromContext, options, context );
363}
364
366{
368}
369
370OPTIXAPI inline OptixResult optixDeviceContextGetProperty( OptixDeviceContext context, OptixDeviceProperty property, void* value, size_t sizeInBytes )
371{
372 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDeviceContextGetProperty( context, property, value, sizeInBytes );
373}
374
376 OptixLogCallback callbackFunction,
377 void* callbackData,
378 unsigned int callbackLevel )
379{
380 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDeviceContextSetLogCallback( context, callbackFunction, callbackData, callbackLevel );
381}
382
384{
386}
387
389{
391}
392
393OPTIXAPI inline OptixResult optixDeviceContextSetCacheDatabaseSizes( OptixDeviceContext context, size_t lowWaterMark, size_t highWaterMark )
394{
395 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDeviceContextSetCacheDatabaseSizes( context, lowWaterMark, highWaterMark );
396}
397
399{
401}
402
403OPTIXAPI inline OptixResult optixDeviceContextGetCacheLocation( OptixDeviceContext context, char* location, size_t locationSize )
404{
405 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDeviceContextGetCacheLocation( context, location, locationSize );
406}
407
408OPTIXAPI inline OptixResult optixDeviceContextGetCacheDatabaseSizes( OptixDeviceContext context, size_t* lowWaterMark, size_t* highWaterMark )
409{
410 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDeviceContextGetCacheDatabaseSizes( context, lowWaterMark, highWaterMark );
411}
412
414 const OptixModuleCompileOptions* moduleCompileOptions,
415 const OptixPipelineCompileOptions* pipelineCompileOptions,
416 const char* input,
417 size_t inputSize,
418 char* logString,
419 size_t* logStringSize,
420 OptixModule* module )
421{
422 return OPTIX_FUNCTION_TABLE_SYMBOL.optixModuleCreate( context, moduleCompileOptions, pipelineCompileOptions, input,
423 inputSize, logString, logStringSize, module );
424}
425
427 const OptixModuleCompileOptions* moduleCompileOptions,
428 const OptixPipelineCompileOptions* pipelineCompileOptions,
429 const char* input,
430 size_t inputSize,
431 char* logString,
432 size_t* logStringSize,
433 OptixModule* module,
434 OptixTask* firstTask )
435{
436 return OPTIX_FUNCTION_TABLE_SYMBOL.optixModuleCreateWithTasks( context, moduleCompileOptions, pipelineCompileOptions, input,
437 inputSize, logString, logStringSize, module, firstTask );
438}
439
441{
443}
444
446{
448}
449
451 const OptixModuleCompileOptions* moduleCompileOptions,
452 const OptixPipelineCompileOptions* pipelineCompileOptions,
453 const OptixBuiltinISOptions* builtinISOptions,
454 OptixModule* builtinModule )
455{
456 return OPTIX_FUNCTION_TABLE_SYMBOL.optixBuiltinISModuleGet( context, moduleCompileOptions, pipelineCompileOptions,
457 builtinISOptions, builtinModule );
458}
459
461 OptixTask* additionalTasks,
462 unsigned int maxNumAdditionalTasks,
463 unsigned int* numAdditionalTasksCreated )
464{
465 return OPTIX_FUNCTION_TABLE_SYMBOL.optixTaskExecute( task, additionalTasks, maxNumAdditionalTasks, numAdditionalTasksCreated );
466}
467
469 const OptixProgramGroupDesc* programDescriptions,
470 unsigned int numProgramGroups,
471 const OptixProgramGroupOptions* options,
472 char* logString,
473 size_t* logStringSize,
474 OptixProgramGroup* programGroups )
475{
476 return OPTIX_FUNCTION_TABLE_SYMBOL.optixProgramGroupCreate( context, programDescriptions, numProgramGroups, options,
477 logString, logStringSize, programGroups );
478}
479
481{
483}
484
486{
487 return OPTIX_FUNCTION_TABLE_SYMBOL.optixProgramGroupGetStackSize( programGroup, stackSizes, pipeline );
488}
489
491 const OptixPipelineCompileOptions* pipelineCompileOptions,
492 const OptixPipelineLinkOptions* pipelineLinkOptions,
493 const OptixProgramGroup* programGroups,
494 unsigned int numProgramGroups,
495 char* logString,
496 size_t* logStringSize,
497 OptixPipeline* pipeline )
498{
499 return OPTIX_FUNCTION_TABLE_SYMBOL.optixPipelineCreate( context, pipelineCompileOptions, pipelineLinkOptions, programGroups,
500 numProgramGroups, logString, logStringSize, pipeline );
501}
502
504{
506}
507
509 unsigned int directCallableStackSizeFromTraversal,
510 unsigned int directCallableStackSizeFromState,
511 unsigned int continuationStackSize,
512 unsigned int maxTraversableGraphDepth )
513{
514 return OPTIX_FUNCTION_TABLE_SYMBOL.optixPipelineSetStackSize( pipeline, directCallableStackSizeFromTraversal,
515 directCallableStackSizeFromState,
516 continuationStackSize, maxTraversableGraphDepth );
517}
518
520 const OptixAccelBuildOptions* accelOptions,
521 const OptixBuildInput* buildInputs,
522 unsigned int numBuildInputs,
523 OptixAccelBufferSizes* bufferSizes )
524{
525 return OPTIX_FUNCTION_TABLE_SYMBOL.optixAccelComputeMemoryUsage( context, accelOptions, buildInputs, numBuildInputs, bufferSizes );
526}
527
529 CUstream stream,
530 const OptixAccelBuildOptions* accelOptions,
531 const OptixBuildInput* buildInputs,
532 unsigned int numBuildInputs,
533 CUdeviceptr tempBuffer,
534 size_t tempBufferSizeInBytes,
535 CUdeviceptr outputBuffer,
536 size_t outputBufferSizeInBytes,
537 OptixTraversableHandle* outputHandle,
538 const OptixAccelEmitDesc* emittedProperties,
539 unsigned int numEmittedProperties )
540{
541 return OPTIX_FUNCTION_TABLE_SYMBOL.optixAccelBuild( context, stream, accelOptions, buildInputs, numBuildInputs, tempBuffer,
542 tempBufferSizeInBytes, outputBuffer, outputBufferSizeInBytes,
543 outputHandle, emittedProperties, numEmittedProperties );
544}
545
546
548{
549 return OPTIX_FUNCTION_TABLE_SYMBOL.optixAccelGetRelocationInfo( context, handle, info );
550}
551
552
554{
555 return OPTIX_FUNCTION_TABLE_SYMBOL.optixCheckRelocationCompatibility( context, info, compatible );
556}
557
559 CUstream stream,
560 const OptixRelocationInfo* info,
561 const OptixRelocateInput* relocateInputs,
562 size_t numRelocateInputs,
563 CUdeviceptr targetAccel,
564 size_t targetAccelSizeInBytes,
565 OptixTraversableHandle* targetHandle )
566{
567 return OPTIX_FUNCTION_TABLE_SYMBOL.optixAccelRelocate( context, stream, info, relocateInputs, numRelocateInputs,
568 targetAccel, targetAccelSizeInBytes, targetHandle );
569}
570
572 CUstream stream,
573 OptixTraversableHandle inputHandle,
574 CUdeviceptr outputBuffer,
575 size_t outputBufferSizeInBytes,
576 OptixTraversableHandle* outputHandle )
577{
578 return OPTIX_FUNCTION_TABLE_SYMBOL.optixAccelCompact( context, stream, inputHandle, outputBuffer,
579 outputBufferSizeInBytes, outputHandle );
580}
581
583 CUstream stream,
585 const OptixAccelEmitDesc* emittedProperty )
586{
587 return OPTIX_FUNCTION_TABLE_SYMBOL.optixAccelEmitProperty( context, stream, handle, emittedProperty );
588}
589
591 CUdeviceptr pointer,
592 OptixTraversableType traversableType,
593 OptixTraversableHandle* traversableHandle )
594{
595 return OPTIX_FUNCTION_TABLE_SYMBOL.optixConvertPointerToTraversableHandle( onDevice, pointer, traversableType, traversableHandle );
596}
597
599 const OptixOpacityMicromapArrayBuildInput* buildInput,
600 OptixMicromapBufferSizes* bufferSizes )
601{
602 return OPTIX_FUNCTION_TABLE_SYMBOL.optixOpacityMicromapArrayComputeMemoryUsage( context, buildInput, bufferSizes );
603}
604
606 CUstream stream,
607 const OptixOpacityMicromapArrayBuildInput* buildInput,
608 const OptixMicromapBuffers* buffers )
609{
610 return OPTIX_FUNCTION_TABLE_SYMBOL.optixOpacityMicromapArrayBuild( context, stream, buildInput, buffers );
611}
612
614 CUdeviceptr opacityMicromapArray,
615 OptixRelocationInfo* info )
616{
617 return OPTIX_FUNCTION_TABLE_SYMBOL.optixOpacityMicromapArrayGetRelocationInfo( context, opacityMicromapArray, info );
618}
619
621 CUstream stream,
622 const OptixRelocationInfo* info,
623 CUdeviceptr targetOpacityMicromapArray,
624 size_t targetOpacityMicromapArraySizeInBytes )
625{
626 return OPTIX_FUNCTION_TABLE_SYMBOL.optixOpacityMicromapArrayRelocate( context, stream, info, targetOpacityMicromapArray,
627 targetOpacityMicromapArraySizeInBytes );
628}
629
632 OptixMicromapBufferSizes* bufferSizes )
633{
634 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDisplacementMicromapArrayComputeMemoryUsage( context, buildInput, bufferSizes );
635}
636
638 CUstream stream,
640 const OptixMicromapBuffers* buffers )
641{
642 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDisplacementMicromapArrayBuild( context, stream, buildInput, buffers );
643}
644
645OPTIXAPI inline OptixResult optixSbtRecordPackHeader( OptixProgramGroup programGroup, void* sbtRecordHeaderHostPointer )
646{
647 return OPTIX_FUNCTION_TABLE_SYMBOL.optixSbtRecordPackHeader( programGroup, sbtRecordHeaderHostPointer );
648}
649
651 CUstream stream,
652 CUdeviceptr pipelineParams,
653 size_t pipelineParamsSize,
654 const OptixShaderBindingTable* sbt,
655 unsigned int width,
656 unsigned int height,
657 unsigned int depth )
658{
659 return OPTIX_FUNCTION_TABLE_SYMBOL.optixLaunch( pipeline, stream, pipelineParams, pipelineParamsSize, sbt, width, height, depth );
660}
661
663 OptixDenoiserModelKind modelKind,
664 const OptixDenoiserOptions* options,
665 OptixDenoiser* returnHandle )
666{
667 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDenoiserCreate( context, modelKind, options, returnHandle );
668}
669
671 const void* data,
672 size_t dataSizeInBytes,
673 OptixDenoiser* returnHandle )
674{
675 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDenoiserCreateWithUserModel( context, data, dataSizeInBytes, returnHandle );
676}
677
679{
681}
682
684 unsigned int maximumInputWidth,
685 unsigned int maximumInputHeight,
686 OptixDenoiserSizes* returnSizes )
687{
688 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDenoiserComputeMemoryResources( handle, maximumInputWidth, maximumInputHeight, returnSizes );
689}
690
692 CUstream stream,
693 unsigned int inputWidth,
694 unsigned int inputHeight,
695 CUdeviceptr denoiserState,
696 size_t denoiserStateSizeInBytes,
697 CUdeviceptr scratch,
698 size_t scratchSizeInBytes )
699{
700 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDenoiserSetup( denoiser, stream, inputWidth, inputHeight, denoiserState,
701 denoiserStateSizeInBytes, scratch, scratchSizeInBytes );
702}
703
705 CUstream stream,
706 const OptixDenoiserParams* params,
707 CUdeviceptr denoiserData,
708 size_t denoiserDataSize,
709 const OptixDenoiserGuideLayer* guideLayer,
710 const OptixDenoiserLayer* layers,
711 unsigned int numLayers,
712 unsigned int inputOffsetX,
713 unsigned int inputOffsetY,
714 CUdeviceptr scratch,
715 size_t scratchSizeInBytes )
716{
717 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDenoiserInvoke( handle, stream, params, denoiserData, denoiserDataSize,
718 guideLayer, layers, numLayers, inputOffsetX, inputOffsetY,
719 scratch, scratchSizeInBytes );
720}
721
723 CUstream stream,
724 const OptixImage2D* inputImage,
725 CUdeviceptr outputIntensity,
726 CUdeviceptr scratch,
727 size_t scratchSizeInBytes )
728{
729 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDenoiserComputeIntensity( handle, stream, inputImage, outputIntensity,
730 scratch, scratchSizeInBytes );
731}
732
734 CUstream stream,
735 const OptixImage2D* inputImage,
736 CUdeviceptr outputAverageColor,
737 CUdeviceptr scratch,
738 size_t scratchSizeInBytes )
739{
740 return OPTIX_FUNCTION_TABLE_SYMBOL.optixDenoiserComputeAverageColor( handle, stream, inputImage, outputAverageColor,
741 scratch, scratchSizeInBytes );
742}
743
744#endif // OPTIX_DOXYGEN_SHOULD_SKIP_THIS
745
746#endif // OPTIX_OPTIX_STUBS_H
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
OptiX public API header.
#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
Build inputs.
Definition: optix_types.h:1031
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
Inputs to displacement micromaps array construction.
Definition: optix_types.h:532
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
Inputs to opacity micromap array construction.
Definition: optix_types.h:1233
Compilation options for all modules of a pipeline.
Definition: optix_types.h:2247
Descriptor for program groups.
Definition: optix_types.h:2155
Program group options.
Definition: optix_types.h:2181
Relocation inputs.
Definition: optix_types.h:1055
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