29#if !defined( __OPTIX_INCLUDE_INTERNAL_HEADERS__ )
30#error("optix_device_impl_exception.h is an internal header file and must not be used directly. Please use optix_device.h or optix.h instead.")
33#ifndef OPTIX_OPTIX_DEVICE_IMPL_EXCEPTION_H
34#define OPTIX_OPTIX_DEVICE_IMPL_EXCEPTION_H
36#if !defined(__CUDACC_RTC__)
48 printf(
"(%4i,%4i,%4i) OptixStaticTransform@%p = {\n"
50 " transform = { %f,%f,%f,%f,\n"
53 index.x,index.y,index.z,
55 (
void*)traversable->
child,
68 printf(
"(%4i,%4i,%4i) OptixMatrixMotionTransform@%p = {\n"
70 " motionOptions = { numKeys = %i, flags = %i, timeBegin = %f, timeEnd = %f },\n"
71 " transform = { { %f,%f,%f,%f,\n"
73 " %f,%f,%f,%f }, ... }\n",
74 index.x,index.y,index.z,
76 (
void*)traversable->
child,
90 printf(
"(%4i,%4i,%4i) OptixSRTMotionTransform@%p = {\n"
92 " motionOptions = { numKeys = %i, flags = %i, timeBegin = %f, timeEnd = %f },\n"
93 " srtData = { { sx = %f, a = %f, b = %f, pvx = %f,\n"
94 " sy = %f, c = %f, pvy = %f, sz = %f,\n"
95 " pvz = %f, qx = %f, qy = %f, qz = %f,\n"
96 " qw = %f, tx = %f, ty = %f, tz = %f }, ... }\n",
97 index.x,index.y,index.z,
99 (
void*)traversable->
child,
116 printf(
"(%4i,%4i,%4i) OptixInstance = {\n"
117 " instanceId = %i,\n"
118 " transform = { %f,%f,%f,%f,\n"
120 " %f,%f,%f,%f } }\n",
121 index.x,index.y,index.z,
123 transform[0].x, transform[0].y, transform[0].z, transform[0].w,
124 transform[1].x, transform[1].y, transform[1].z, transform[1].w,
125 transform[2].x, transform[2].y, transform[2].z, transform[2].w );
160 printf(
"(%4i,%4i,%4i) transform list of size %i:\n", index.x,index.y,index.z, tlistSize);
162 for(
unsigned int i = 0 ; i < tlistSize ; ++i )
165 printf(
"(%4i,%4i,%4i) transform[%i] = %p\n", index.x, index.y, index.z, i, (
void*)handle);
172 bool dumpTlist =
false;
178 printf(
"(%4i,%4i,%4i) error: stack overflow\n", index.x,index.y,index.z);
182 printf(
"(%4i,%4i,%4i) error: trace depth exceeded\n", index.x,index.y,index.z);
186 printf(
"(%4i,%4i,%4i) error: traversal depth exceeded\n", index.x,index.y,index.z);
192 printf(
"(%4i,%4i,%4i) error: invalid traversable %p\n", index.x,index.y,index.z, (
void*)handle);
198 printf(
"(%4i,%4i,%4i) error: invalid miss sbt of %i\n", index.x,index.y,index.z, sbtOffset);
203 printf(
"(%4i,%4i,%4i) error: invalid hit sbt of %i at primitive with gas sbt index %i\n", index.x,index.y,index.z, sbtOffset,
optixGetSbtGASIndex() );
209 printf(
"(%4i,%4i,%4i) error: shader encountered unsupported builtin type\n"
215 printf(
"(%4i,%4i,%4i) error: encountered an invalid ray:\n", index.x, index.y, index.z );
217 " origin: [%f, %f, %f]\n"
218 " direction: [%f, %f, %f]\n"
222 " call location: %s\n",
223 ray.origin.x, ray.origin.y, ray.origin.z, ray.direction.x, ray.direction.y,
229 printf(
"(%4i,%4i,%4i) error: parameter mismatch in callable call.\n", index.x, index.y, index.z );
231 " passed packed arguments: %u 32 Bit values\n"
232 " expected packed parameters: %u 32 Bit values\n"
234 " called function: %s\n"
235 " call location: %s\n",
236 details.passedArgumentCount, details.expectedParameterCount, details.sbtIndex,
242 printf(
"(%4i,%4i,%4i) error: mismatch between builtin IS shader and build input\n"
248 printf(
"(%4i,%4i,%4i) error: invalid sbt offset of %i for callable program\n", index.x, index.y, index.z, sbtOffset );
253 printf(
"(%4i,%4i,%4i) error: invalid sbt offset of %i for direct callable program\n", index.x, index.y, index.z, sbtOffset );
258 printf(
"(%4i,%4i,%4i) error: invalid sbt offset of %i for continuation callable program\n", index.x, index.y, index.z, sbtOffset );
263 printf(
"(%4i,%4i,%4i) error: unsupported single GAS traversable graph %p\n", index.x,index.y,index.z, (
void*)handle);
272 printf(
"(%4i,%4i,%4i) error: unsupported random data access\n", index.x,index.y,index.z);
276 printf(
"(%4i,%4i,%4i) error: payload type mismatch between program and optixTrace call\n", index.x,index.y,index.z);
278 else if( exceptionCode >= 0 )
281 printf(
"(%4i,%4i,%4i) error: user exception with error code %i\n"
286 printf(
"(%4i,%4i,%4i) error: unknown exception with error code %i\n", index.x,index.y,index.z, exceptionCode);
OptixTransformType
Transform.
Definition: optix_types.h:1831
unsigned long long OptixTraversableHandle
Traversable handle.
Definition: optix_types.h:77
@ OPTIX_EXCEPTION_CODE_UNSUPPORTED_DATA_ACCESS
Tried to access data on an AS without random data access support (See OptixBuildFlags).
Definition: optix_types.h:2275
@ OPTIX_EXCEPTION_CODE_STACK_OVERFLOW
Stack overflow of the continuation stack. no exception details.
Definition: optix_types.h:2183
@ OPTIX_EXCEPTION_CODE_TRAVERSAL_INVALID_TRAVERSABLE
Traversal encountered an invalid traversable type. Exception details: optixGetTransformListSize() opt...
Definition: optix_types.h:2200
@ OPTIX_EXCEPTION_CODE_CALLABLE_PARAMETER_MISMATCH
The shader encountered a call to either optixDirectCall or optixCallableCall where the argument count...
Definition: optix_types.h:2241
@ OPTIX_EXCEPTION_CODE_TRAVERSAL_INVALID_HIT_SBT
The traversal hit SBT record index out of bounds.
Definition: optix_types.h:2224
@ OPTIX_EXCEPTION_CODE_TRAVERSAL_DEPTH_EXCEEDED
The traversal depth is exceeded. Exception details: optixGetTransformListSize() optixGetTransformList...
Definition: optix_types.h:2193
@ OPTIX_EXCEPTION_CODE_INVALID_VALUE_ARGUMENT_2
Definition: optix_types.h:2272
@ OPTIX_EXCEPTION_CODE_TRACE_DEPTH_EXCEEDED
The trace depth is exceeded. no exception details.
Definition: optix_types.h:2187
@ OPTIX_EXCEPTION_CODE_UNSUPPORTED_SINGLE_LEVEL_GAS
Tried to directly traverse a single gas while single gas traversable graphs are not enabled (see Opti...
Definition: optix_types.h:2266
@ OPTIX_EXCEPTION_CODE_TRAVERSAL_INVALID_MISS_SBT
The miss SBT record index is out of bounds A miss SBT record index is valid within the range [0,...
Definition: optix_types.h:2206
@ OPTIX_EXCEPTION_CODE_CALLABLE_NO_DC_SBT_RECORD
Tried to call a direct callable using an SBT offset of a record that was built from a program group t...
Definition: optix_types.h:2254
@ OPTIX_EXCEPTION_CODE_BUILTIN_IS_MISMATCH
The invoked builtin IS does not match the current GAS.
Definition: optix_types.h:2244
@ OPTIX_EXCEPTION_CODE_INVALID_VALUE_ARGUMENT_0
argument passed to an optix call is not within an acceptable range of values.
Definition: optix_types.h:2270
@ OPTIX_EXCEPTION_CODE_PAYLOAD_TYPE_MISMATCH
The program payload type doesn't match the trace payload type.
Definition: optix_types.h:2278
@ OPTIX_EXCEPTION_CODE_CALLABLE_NO_CC_SBT_RECORD
Tried to call a continuation callable using an SBT offset of a record that was built from a program g...
Definition: optix_types.h:2258
@ OPTIX_EXCEPTION_CODE_CALLABLE_INVALID_SBT
Tried to call a callable program using an SBT offset that is larger than the number of passed in call...
Definition: optix_types.h:2250
@ OPTIX_EXCEPTION_CODE_INVALID_RAY
The shader encountered a call to optixTrace with at least one of the float arguments being inf or nan...
Definition: optix_types.h:2234
@ OPTIX_EXCEPTION_CODE_UNSUPPORTED_PRIMITIVE_TYPE
The shader encountered an unsupported primitive type (See OptixPipelineCompileOptions::usesPrimitiveT...
Definition: optix_types.h:2228
@ OPTIX_TRANSFORM_TYPE_SRT_MOTION_TRANSFORM
Definition: optix_types.h:1835
@ OPTIX_TRANSFORM_TYPE_STATIC_TRANSFORM
Definition: optix_types.h:1833
@ OPTIX_TRANSFORM_TYPE_INSTANCE
Definition: optix_types.h:1836
@ OPTIX_TRANSFORM_TYPE_MATRIX_MOTION_TRANSFORM
Definition: optix_types.h:1834
@ OPTIX_TRANSFORM_TYPE_NONE
Not a transformation.
Definition: optix_types.h:1832
Definition: optix_device_impl_exception.h:40
static __forceinline__ __device__ void optixDumpSrtMatrixTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl_exception.h:84
static __forceinline__ __device__ void optixDumpStaticTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl_exception.h:42
static __forceinline__ __device__ void optixDumpExceptionDetails()
Definition: optix_device_impl_exception.h:170
static __forceinline__ __device__ void optixDumpMotionMatrixTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl_exception.h:62
static __forceinline__ __device__ void optixDumpTransformList()
Definition: optix_device_impl_exception.h:155
static __forceinline__ __device__ void optixDumpInstanceFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl_exception.h:108
static __forceinline__ __device__ void optixDumpTransform(OptixTraversableHandle handle)
Definition: optix_device_impl_exception.h:129
static __forceinline__ __device__ const OptixStaticTransform * optixGetStaticTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:964
static __forceinline__ __device__ OptixParameterMismatchExceptionDetails optixGetExceptionParameterMismatch()
Definition: optix_device_impl.h:1524
static __forceinline__ __device__ char * optixGetExceptionLineInfo()
Definition: optix_device_impl.h:1539
static __forceinline__ __device__ int optixGetExceptionCode()
Definition: optix_device_impl.h:1440
static __forceinline__ __device__ const OptixMatrixMotionTransform * optixGetMatrixMotionTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:978
static __forceinline__ __device__ uint3 optixGetLaunchIndex()
Definition: optix_device_impl.h:1334
static __forceinline__ __device__ int optixGetExceptionInvalidSbtOffset()
Definition: optix_device_impl.h:1501
static __forceinline__ __device__ unsigned int optixGetInstanceIdFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:985
static __forceinline__ __device__ OptixTraversableHandle optixGetTransformListHandle(unsigned int index)
Definition: optix_device_impl.h:950
static __forceinline__ __device__ OptixInvalidRayExceptionDetails optixGetExceptionInvalidRay()
Definition: optix_device_impl.h:1508
static __forceinline__ __device__ const float4 * optixGetInstanceTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:999
static __forceinline__ __device__ unsigned int optixGetTransformListSize()
Definition: optix_device_impl.h:943
static __forceinline__ __device__ unsigned int optixGetSbtGASIndex()
Definition: optix_device_impl.h:1220
static __forceinline__ __device__ const OptixSRTMotionTransform * optixGetSRTMotionTransformFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:971
static __forceinline__ __device__ OptixTraversableHandle optixGetExceptionInvalidTraversable()
Definition: optix_device_impl.h:1494
static __forceinline__ __device__ OptixTransformType optixGetTransformTypeFromHandle(OptixTraversableHandle handle)
Definition: optix_device_impl.h:957
unsigned short numKeys
If numKeys > 1, motion is enabled. timeBegin, timeEnd and flags are all ignored when motion is disabl...
Definition: optix_types.h:1301
float timeBegin
Point in time where motion starts. Must be lesser than timeEnd.
Definition: optix_types.h:1307
float timeEnd
Point in time where motion ends. Must be greater than timeBegin.
Definition: optix_types.h:1310
unsigned short flags
Combinations of OptixMotionFlags.
Definition: optix_types.h:1304
float qz
Definition: optix_types.h:1484
float b
Definition: optix_types.h:1484
float tz
Definition: optix_types.h:1484
float qx
Definition: optix_types.h:1484
float sz
Definition: optix_types.h:1484
float c
Definition: optix_types.h:1484
float sy
Definition: optix_types.h:1484
float pvz
Definition: optix_types.h:1484
float qw
Definition: optix_types.h:1484
float ty
Definition: optix_types.h:1484
float pvy
Definition: optix_types.h:1484
float pvx
Definition: optix_types.h:1484
float sx
Definition: optix_types.h:1484
float a
Definition: optix_types.h:1484
float qy
Definition: optix_types.h:1484
float tx
Definition: optix_types.h:1484