NVIDIA OptiX 7.1 API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
optix_function_table.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property and proprietary
5  * rights in and to this software, related documentation and any modifications thereto.
6  * Any use, reproduction, disclosure or distribution of this software and related
7  * documentation without an express license agreement from NVIDIA Corporation is strictly
8  * prohibited.
9  *
10  * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS*
11  * AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED,
12  * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
13  * PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY
14  * SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT
15  * LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
16  * BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
17  * INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF
18  * SUCH DAMAGES
19  */
20 
24 
25 #ifndef __optix_optix_function_table_h__
26 #define __optix_optix_function_table_h__
27 
29 #define OPTIX_ABI_VERSION 36
30 
31 #ifndef OPTIX_DEFINE_ABI_VERSION_ONLY
32 
33 #include "optix_types.h"
34 
35 #if !defined( OPTIX_DONT_INCLUDE_CUDA )
36 // If OPTIX_DONT_INCLUDE_CUDA is defined, cuda driver types must be defined through other
37 // means before including optix headers.
38 #include <cuda.h>
39 #endif
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
47 
52 typedef struct OptixFunctionTable
56 {
58  //@ {
59 
61  const char* ( *optixGetErrorName )( OptixResult result );
62 
64  const char* ( *optixGetErrorString )( OptixResult result );
65 
66  //@ }
68  //@ {
69 
71  OptixResult ( *optixDeviceContextCreate )( CUcontext fromContext, const OptixDeviceContextOptions* options, OptixDeviceContext* context );
72 
75 
77  OptixResult ( *optixDeviceContextGetProperty )( OptixDeviceContext context, OptixDeviceProperty property, void* value, size_t sizeInBytes );
78 
81  OptixLogCallback callbackFunction,
82  void* callbackData,
83  unsigned int callbackLevel );
84 
87 
89  OptixResult ( *optixDeviceContextSetCacheLocation )( OptixDeviceContext context, const char* location );
90 
92  OptixResult ( *optixDeviceContextSetCacheDatabaseSizes )( OptixDeviceContext context, size_t lowWaterMark, size_t highWaterMark );
93 
96 
98  OptixResult ( *optixDeviceContextGetCacheLocation )( OptixDeviceContext context, char* location, size_t locationSize );
99 
101  OptixResult ( *optixDeviceContextGetCacheDatabaseSizes )( OptixDeviceContext context, size_t* lowWaterMark, size_t* highWaterMark );
102 
103  //@ }
105  //@ {
106 
109  const OptixModuleCompileOptions* moduleCompileOptions,
110  const OptixPipelineCompileOptions* pipelineCompileOptions,
111  const char* PTX,
112  size_t PTXsize,
113  char* logString,
114  size_t* logStringSize,
115  OptixModule* module );
116 
119 
122  const OptixModuleCompileOptions* moduleCompileOptions,
123  const OptixPipelineCompileOptions* pipelineCompileOptions,
124  const OptixBuiltinISOptions* builtinISOptions,
125  OptixModule* builtinModule);
126 
127  //@ }
129  //@ {
130 
133  const OptixProgramGroupDesc* programDescriptions,
134  unsigned int numProgramGroups,
135  const OptixProgramGroupOptions* options,
136  char* logString,
137  size_t* logStringSize,
138  OptixProgramGroup* programGroups );
139 
142 
145 
146  //@ }
148  //@ {
149 
152  const OptixPipelineCompileOptions* pipelineCompileOptions,
153  const OptixPipelineLinkOptions* pipelineLinkOptions,
154  const OptixProgramGroup* programGroups,
155  unsigned int numProgramGroups,
156  char* logString,
157  size_t* logStringSize,
158  OptixPipeline* pipeline );
159 
162 
165  unsigned int directCallableStackSizeFromTraversal,
166  unsigned int directCallableStackSizeFromState,
167  unsigned int continuationStackSize,
168  unsigned int maxTraversableGraphDepth );
169 
170  //@ }
172  //@ {
173 
176  const OptixAccelBuildOptions* accelOptions,
177  const OptixBuildInput* buildInputs,
178  unsigned int numBuildInputs,
179  OptixAccelBufferSizes* bufferSizes );
180 
183  CUstream stream,
184  const OptixAccelBuildOptions* accelOptions,
185  const OptixBuildInput* buildInputs,
186  unsigned int numBuildInputs,
187  CUdeviceptr tempBuffer,
188  size_t tempBufferSizeInBytes,
189  CUdeviceptr outputBuffer,
190  size_t outputBufferSizeInBytes,
191  OptixTraversableHandle* outputHandle,
192  const OptixAccelEmitDesc* emittedProperties,
193  unsigned int numEmittedProperties );
194 
197 
198 
201  const OptixAccelRelocationInfo* info,
202  int* compatible );
203 
206  CUstream stream,
207  const OptixAccelRelocationInfo* info,
208  CUdeviceptr instanceTraversableHandles,
209  size_t numInstanceTraversableHandles,
210  CUdeviceptr targetAccel,
211  size_t targetAccelSizeInBytes,
212  OptixTraversableHandle* targetHandle );
213 
214 
217  CUstream stream,
218  OptixTraversableHandle inputHandle,
219  CUdeviceptr outputBuffer,
220  size_t outputBufferSizeInBytes,
221  OptixTraversableHandle* outputHandle );
222 
225  CUdeviceptr pointer,
226  OptixTraversableType traversableType,
227  OptixTraversableHandle* traversableHandle );
228 
229  //@ }
231  //@ {
232 
234  OptixResult ( *optixSbtRecordPackHeader )( OptixProgramGroup programGroup, void* sbtRecordHeaderHostPointer );
235 
238  CUstream stream,
239  CUdeviceptr pipelineParams,
240  size_t pipelineParamsSize,
241  const OptixShaderBindingTable* sbt,
242  unsigned int width,
243  unsigned int height,
244  unsigned int depth );
245 
246  //@ }
248  //@ {
249 
252 
255 
258  unsigned int maximumInputWidth,
259  unsigned int maximumInputHeight,
260  OptixDenoiserSizes* returnSizes );
261 
264  CUstream stream,
265  unsigned int inputWidth,
266  unsigned int inputHeight,
267  CUdeviceptr state,
268  size_t stateSizeInBytes,
269  CUdeviceptr scratch,
270  size_t scratchSizeInBytes );
271 
272 
275  CUstream stream,
276  const OptixDenoiserParams* params,
277  CUdeviceptr denoiserState,
278  size_t denoiserStateSizeInBytes,
279  const OptixImage2D* inputLayers,
280  unsigned int numInputLayers,
281  unsigned int inputOffsetX,
282  unsigned int inputOffsetY,
283  const OptixImage2D* outputLayer,
284  CUdeviceptr scratch,
285  size_t scratchSizeInBytes );
286 
288  OptixResult ( *optixDenoiserSetModel )( OptixDenoiser handle, OptixDenoiserModelKind kind, void* data, size_t sizeInBytes );
289 
292  CUstream stream,
293  const OptixImage2D* inputImage,
294  CUdeviceptr outputIntensity,
295  CUdeviceptr scratch,
296  size_t scratchSizeInBytes );
297 
298  //@ }
299 
301  // end group optix_function_table
303 
304 #ifdef __cplusplus
305 }
306 #endif
307 
308 #endif /* OPTIX_DEFINE_ABI_VERSION_ONLY */
309 
310 #endif /* __optix_optix_function_table_h__ */
311