28#ifndef OPTIX_OPTIX_HOST_H
29#define OPTIX_OPTIX_HOST_H
32#if !defined( OPTIX_DONT_INCLUDE_CUDA )
40#include <exp/misc/optix_nvconfig_translate.h>
138 unsigned int callbackLevel );
266 unsigned int numProgramGroups,
268 size_t* logStringSize,
297 unsigned int directCallableStackSizeFromTraversal,
298 unsigned int directCallableStackSizeFromState,
299 unsigned int continuationStackSize,
300 unsigned int maxTraversableGraphDepth );
342 size_t* logStringSize,
391 size_t* logStringSize,
485 unsigned int numProgramGroups,
488 size_t* logStringSize,
528 size_t pipelineParamsSize,
532 unsigned int depth );
551 unsigned int numBuildInputs,
570 unsigned int numBuildInputs,
572 size_t tempBufferSizeInBytes,
574 size_t outputBufferSizeInBytes,
577 unsigned int numEmittedProperties );
652 size_t numRelocateInputs,
654 size_t targetAccelSizeInBytes,
678 size_t outputBufferSizeInBytes,
787 size_t targetOpacityMicromapArraySizeInBytes );
851 const void* userData,
size_t userDataSizeInBytes,
OptixDenoiser* denoiser );
876 unsigned int outputWidth,
877 unsigned int outputHeight,
898 unsigned int inputWidth,
899 unsigned int inputHeight,
901 size_t denoiserStateSizeInBytes,
903 size_t scratchSizeInBytes );
974 size_t denoiserStateSizeInBytes,
977 unsigned int numLayers,
978 unsigned int inputOffsetX,
979 unsigned int inputOffsetY,
981 size_t scratchSizeInBytes );
1011 size_t scratchSizeInBytes );
1032 size_t scratchSizeInBytes );
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
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
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...
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
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
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
Compilation options for all modules of a pipeline.
Definition: optix_types.h:2309
Link options for a pipeline.
Definition: optix_types.h:2344
Descriptor for program groups.
Definition: optix_types.h:2136
Program group options.
Definition: optix_types.h:2162
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