Skip to content

Commit ccf908e

Browse files
author
Declan Russell
committed
Upgrade to OptiX 6.5
1 parent 7809b01 commit ccf908e

File tree

12 files changed

+1667
-374
lines changed

12 files changed

+1667
-374
lines changed

SConstruct

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if PLATFORM.name == "win32":
2424

2525

2626
LIBS = []
27-
LIBS.append("optix.6.0.0")
27+
LIBS.append("optix.6.5.0")
2828
LIBS.append("OpenImageIO")
2929

3030
LINKFLAGS = []
@@ -33,9 +33,9 @@ if PLATFORM.name == "win32":
3333
ENV.Append(CPPDEFINES = "NOMINMAX")
3434

3535
# Copy over the OptiX dlls to the bin directory
36-
ENV.Command("bin/cudnn64_7.dll", "./contrib/optix/bin/cudnn64_7.dll", Copy("$TARGET", "$SOURCE"))
37-
ENV.Command("bin/optix.6.0.0.dll", "./contrib/optix/bin/optix.6.0.0.dll", Copy("$TARGET", "$SOURCE"))
38-
ENV.Command("bin/optix_denoiser.6.0.0.dll", "./contrib/optix/bin/optix_denoiser.6.0.0.dll", Copy("$TARGET", "$SOURCE"))
36+
#ENV.Command("bin/cudnn64_7.dll", "./contrib/optix/bin/cudnn64_7.dll", Copy("$TARGET", "$SOURCE"))
37+
ENV.Command("bin/optix.6.5.0.dll", "./contrib/optix/bin/optix.6.5.0.dll", Copy("$TARGET", "$SOURCE"))
38+
#ENV.Command("bin/optix_denoiser.6.0.0.dll", "./contrib/optix/bin/optix_denoiser.6.0.0.dll", Copy("$TARGET", "$SOURCE"))
3939

4040
# Copy all of OIIO many dependancies!
4141
ENV.Command("bin/boost_atomic-vc141-mt-x64-1_67.dll", "./contrib/OpenImageIO/bin/boost_atomic-vc141-mt-x64-1_67.dll", Copy("$TARGET", "$SOURCE"))

contrib/optix/bin/optix.6.0.0.lib

-113 KB
Binary file not shown.

contrib/optix/bin/optix.6.5.0.lib

115 KB
Binary file not shown.

contrib/optix/include/internal/optix_declarations.h

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ typedef enum
348348
RT_DEVICE_ATTRIBUTE_TCC_DRIVER, /*!< TCC driver sizeof(int) */
349349
RT_DEVICE_ATTRIBUTE_CUDA_DEVICE_ORDINAL, /*!< CUDA device ordinal sizeof(int) */
350350
RT_DEVICE_ATTRIBUTE_PCI_BUS_ID, /*!< PCI Bus Id */
351-
RT_DEVICE_ATTRIBUTE_COMPATIBLE_DEVICES /*!< Ordinals of compatible devices sizeof(int=N) + N*sizeof(int) */
351+
RT_DEVICE_ATTRIBUTE_COMPATIBLE_DEVICES, /*!< Ordinals of compatible devices sizeof(int=N) + N*sizeof(int) */
352+
RT_DEVICE_ATTRIBUTE_RTCORE_VERSION /*!< RT core version (0 for no support, 10 for version 1.0) sizeof(int) */
352353
} RTdeviceattribute;
353354

354355
/*! Global attributes */
@@ -376,6 +377,8 @@ typedef enum
376377
RT_CONTEXT_ATTRIBUTE_PUBLIC_VENDOR_KEY, /*!< variable */
377378
RT_CONTEXT_ATTRIBUTE_DISK_CACHE_LOCATION, /*!< sizeof(char*) */
378379
RT_CONTEXT_ATTRIBUTE_DISK_CACHE_MEMORY_LIMITS, /*!< sizeof(RTsize[2]) */
380+
RT_CONTEXT_ATTRIBUTE_PREFER_WATERTIGHT_TRAVERSAL, /*!< sizeof(int) */
381+
RT_CONTEXT_ATTRIBUTE_MAX_CONCURRENT_LAUNCHES, /*!< sizeof(int) */
379382
RT_CONTEXT_ATTRIBUTE_AVAILABLE_DEVICE_MEMORY = 0x10000000 /*!< sizeof(RTsize) */
380383
} RTcontextattribute;
381384

@@ -385,7 +388,8 @@ typedef enum
385388
RT_BUFFER_ATTRIBUTE_STREAM_FORMAT, /*!< Format string */
386389
RT_BUFFER_ATTRIBUTE_STREAM_BITRATE, /*!< sizeof(int) */
387390
RT_BUFFER_ATTRIBUTE_STREAM_FPS, /*!< sizeof(int) */
388-
RT_BUFFER_ATTRIBUTE_STREAM_GAMMA /*!< sizeof(float) */
391+
RT_BUFFER_ATTRIBUTE_STREAM_GAMMA, /*!< sizeof(float) */
392+
RT_BUFFER_ATTRIBUTE_PAGE_SIZE /*!< sizeof(int) */
389393
} RTbufferattribute;
390394

391395
/*! Motion border modes*/
@@ -412,21 +416,58 @@ typedef enum {
412416
/*! Material-dependent flags set on Geometry/GeometryTriangles */
413417
typedef enum {
414418
RT_GEOMETRY_FLAG_NONE = 0x00, /*!< No special flags set */
415-
RT_GEOMETRY_FLAG_DISABLE_ANYHIT = 0x01, /*!< Opaque flag, any hit program will be skipped */
416-
RT_GEOMETRY_FLAG_NO_SPLITTING = 0x02, /*!< Disable primitive splitting to avoid potential duplicate any hit program execution for a single intersection */
419+
RT_GEOMETRY_FLAG_DISABLE_ANYHIT = 0x01, /*!< Disable any-hit program execution (execution will be skipped,including the no-op any-hit program
420+
used when an any-hit program is not specified).
421+
Can be overridden by ray and instance flags, precedence: RTrayflags > RTinstanceflags > RTgeometryflags */
422+
RT_GEOMETRY_FLAG_NO_SPLITTING = 0x02, /*!< Disable primitive splitting to avoid potential multiple any-hit program execution for a single intersection */
417423
} RTgeometryflags;
418424

419425
/*! Instance flags which override the behavior of geometry. */
420426
typedef enum {
421427
RT_INSTANCE_FLAG_NONE = 0u, /*!< No special flag set */
422-
RT_INSTANCE_FLAG_DISABLE_TRIANGLE_CULLING = 1u << 0, /*!< Prevent triangles from getting culled */
423-
RT_INSTANCE_FLAG_FLIP_TRIANGLE_FACING = 1u << 1, /*!< Flip triangle orientation. This affects front/backface culling. */
424-
RT_INSTANCE_FLAG_DISABLE_ANYHIT = 1u << 2, /*!< Disable any-hit programs.
428+
RT_INSTANCE_FLAG_DISABLE_TRIANGLE_CULLING = 1u << 0, /*!< Prevent triangles from getting culled due to face orientation (overrides ray culling flags). */
429+
RT_INSTANCE_FLAG_FLIP_TRIANGLE_FACING = 1u << 1, /*!< Flip triangle orientation. This affects front/back face culling. */
430+
RT_INSTANCE_FLAG_DISABLE_ANYHIT = 1u << 2, /*!< Disable any-hit program execution (including the no-op any-hit program
431+
used when an any-hit program is not specified).
425432
This may yield significantly higher performance even in cases
426-
where no any-hit programs are set. */
427-
RT_INSTANCE_FLAG_ENFORCE_ANYHIT = 1u << 3 /*!< Override @ref RT_GEOMETRY_FLAG_DISABLE_ANYHIT */
433+
where no any-hit programs are set.
434+
Mutually exclusive with RT_INSTANCE_FLAG_FORCE_ANYHIT.
435+
If set, overrides any potentially set @ref RT_RAY_FLAG_FORCE_ANYHIT, @ref RT_RAY_FLAG_DISABLE_ANYHIT, @ref RT_GEOMETRY_FLAG_DISABLE_ANYHIT.
436+
Can be overridden by ray flag @ref RT_RAY_FLAG_FORCE_ANYHIT.
437+
Precedence: RTrayflags > RTinstanceflags > RTgeometryflags */
438+
RT_INSTANCE_FLAG_FORCE_ANYHIT = 1u << 3 /*!< Force any-hit program execution.
439+
Mutually exclusive with RT_INSTANCE_FLAG_DISABLE_ANYHIT.
440+
If set, overrides any potentially set @ref RT_RAY_FLAG_FORCE_ANYHIT, @ref RT_RAY_FLAG_DISABLE_ANYHIT, @ref RT_GEOMETRY_FLAG_DISABLE_ANYHIT.
441+
Can be overridden by ray flag @ref RT_RAY_FLAG_DISABLE_ANYHIT.
442+
Overriding precedence: RTrayflags > RTinstanceflags > RTgeometryflags */
428443
} RTinstanceflags;
429444

445+
/*! Ray flags */
446+
typedef enum {
447+
RT_RAY_FLAG_NONE = 0u,
448+
RT_RAY_FLAG_DISABLE_ANYHIT = 1u << 0, /*!< Disable any-hit program execution for the ray (execution will be skipped,including the no-op any-hit program
449+
used when an any-hit program is not specified).
450+
Mutually exclusive with RT_RAY_FLAG_FORCE_ANYHIT.
451+
If set, overrides any potentially set @ref RT_INSTANCE_FLAG_FORCE_ANYHIT.
452+
Overriding precedence: RTrayflags > RTinstanceflags > RTgeometryflags */
453+
RT_RAY_FLAG_FORCE_ANYHIT = 1u << 1, /*!< Force any-hit program execution for the ray. See @ref RT_RAY_FLAG_DISABLE_ANYHIT.
454+
Mutually exclusive with RT_RAY_FLAG_DISABLE_ANYHIT.
455+
If set, overrides any potentially set @ref RT_GEOMETRY_FLAG_DISABLE_ANYHIT, @ref RT_INSTANCE_FLAG_DISABLE_ANYHIT.
456+
Overriding precedence: RTrayflags > RTinstanceflags > RTgeometryflags */
457+
RT_RAY_FLAG_TERMINATE_ON_FIRST_HIT = 1u << 2, /*!< Terminate the ray after the first hit, also reports the first hit as closest hit. */
458+
RT_RAY_FLAG_DISABLE_CLOSESTHIT = 1u << 3, /*!< Disable closest-hit program execution for the ray. */
459+
RT_RAY_FLAG_CULL_BACK_FACING_TRIANGLES = 1u << 4, /*!< Do not intersect triangle back faces. */
460+
RT_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES = 1u << 5, /*!< Do not intersect triangle front faces. */
461+
RT_RAY_FLAG_CULL_DISABLED_ANYHIT = 1u << 6, /*!< Do not intersect geometry which disables any-hit programs (due to any geometry, instance, or ray flag). */
462+
RT_RAY_FLAG_CULL_ENABLED_ANYHIT = 1u << 7 /*!< Do not intersect geometry which executes any-hit programs (i.e., forced or not disabled any-hit program execution, this includes a potential no-op any-hit program). */
463+
} RTrayflags;
464+
465+
typedef unsigned int RTvisibilitymask;
466+
467+
enum {
468+
RT_VISIBILITY_ALL = 0xFFu /*!< Default @ref RTvisibilitymask */
469+
};
470+
430471
/*! Sentinel values */
431472
typedef enum {
432473
RT_BUFFER_ID_NULL = 0 /*!< sentinel for describing a non-existent buffer id */
@@ -444,25 +485,6 @@ typedef enum {
444485
RT_POSTPROCESSING_STAGE_ID_NULL = 0 /*!< sentinel for describing a non-existent post-processing stage id */
445486
} RTpostprocessingstagenull;
446487

447-
/*! Ray flags */
448-
typedef enum {
449-
RT_RAY_FLAG_NONE = 0u,
450-
RT_RAY_FLAG_DISABLE_ANYHIT = 1u << 0, /*!< Disables any-hit programs for the ray. */
451-
RT_RAY_FLAG_ENFORCE_ANYHIT = 1u << 1, /*!< Forces any-hit program execution for the ray. */
452-
RT_RAY_FLAG_TERMINATE_ON_FIRST_HIT = 1u << 2, /*!< Terminates the ray after the first hit. */
453-
RT_RAY_FLAG_DISABLE_CLOSESTHIT = 1u << 3, /*!< Disables closest-hit programs for the ray. */
454-
RT_RAY_FLAG_CULL_BACK_FACING_TRIANGLES = 1u << 4, /*!< Do not intersect triangle back faces. */
455-
RT_RAY_FLAG_CULL_FRONT_FACING_TRIANGLES = 1u << 5, /*!< Do not intersect triangle front faces. */
456-
RT_RAY_FLAG_CULL_DISABLED_ANYHIT = 1u << 6, /*!< Do not intersect geometry which disables any-hit programs. */
457-
RT_RAY_FLAG_CULL_ENFORCED_ANYHIT = 1u << 7 /*!< Do not intersect geometry which enforces any-hit programs. */
458-
} RTrayflags;
459-
460-
typedef unsigned int RTvisibilitymask;
461-
462-
enum {
463-
RT_VISIBILITY_ALL = 0xFFu /*!< Default @ref RTvisibilitymask */
464-
};
465-
466488
#ifdef __cplusplus
467489
} /* extern "C" */
468490
#endif

0 commit comments

Comments
 (0)