Skip to content

Commit 2310033

Browse files
committed
Merge branch 'next_release'
2 parents 1577fa9 + 0da4184 commit 2310033

File tree

517 files changed

+1380347
-23509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

517 files changed

+1380347
-23509
lines changed

.github/workflows/tsd_ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: TSD CI
2+
3+
on:
4+
push:
5+
branches: [ next_release ]
6+
pull_request:
7+
branches: [ main, next_release ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest]
15+
config: [Release, Debug]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Install Packages
21+
if: ${{ matrix.os == 'ubuntu-latest' }}
22+
run: sudo apt install -y libtbb-dev
23+
24+
- name: Configure ANARI-SDK CMake
25+
run: >
26+
cmake -LA -B ${{github.workspace}}/deps_build
27+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/deps
28+
${{github.workspace}}/tsd/cmake/build_deps
29+
30+
- name: Build + install ANARI-SDK
31+
run: cmake --build ${{ github.workspace }}/deps_build --config ${{ matrix.config }}
32+
33+
- name: Configure TSD CMake
34+
run: >
35+
cmake -LA -B ${{github.workspace}}/build
36+
-DBUILD_INTERACTIVE_APPS=OFF
37+
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps
38+
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
39+
-DTSD_USE_ASSIMP=OFF
40+
-DTSD_USE_CUDA=OFF
41+
-DTSD_USE_HDF5=OFF
42+
-DTSD_USE_OPENGL=OFF
43+
-DTSD_USE_TBB=OFF
44+
-DTSD_ENABLE_SERIALIZATION=OFF
45+
${{ github.workspace }}/tsd
46+
47+
- name: Build
48+
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.config }}
49+
50+
- name: Unit Tests
51+
working-directory: ${{ github.workspace }}/build
52+
run: ctest -C ${{ matrix.config }} --output-on-failure

CMakeLists.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ set(CMAKE_CXX_STANDARD 17)
3535
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3636
set(CMAKE_CXX_EXTENSIONS OFF)
3737

38+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
39+
3840
set(CMAKE_BUILD_TYPE_INIT "Release")
3941

4042
set(CMAKE_INSTALL_RPATH "$ORIGIN")
@@ -49,10 +51,12 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
4951
if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
5052
if (CMAKE_VERSION VERSION_LESS "3.23")
5153
set(CMAKE_CUDA_ARCHITECTURES OFF)
54+
else()
55+
set(CMAKE_CUDA_ARCHITECTURES all-major)
5256
endif()
5357
endif()
5458

55-
project(VisRTX VERSION 0.9.0 LANGUAGES C CXX)
59+
project(VisRTX VERSION 0.10.0 LANGUAGES C CXX)
5660

5761
include(GNUInstallDirs)
5862

@@ -63,6 +67,15 @@ option(
6367
)
6468
mark_as_advanced(VISRTX_SET_SOVERSION)
6569

70+
option(VISRTX_BUILD_TSD "Build TSD sample applications" OFF)
71+
mark_as_advanced(VISRTX_BUILD_TSD)
72+
73+
option(
74+
VISRTX_ENABLE_MDL_SUPPORT
75+
"Whether to enable NVIDIA MDL support for VisRTX materials"
76+
OFF
77+
)
78+
6679
if (VISRTX_SET_SOVERSION)
6780
set(VISRTX_CMAKE_INSTALL_DESTINATION
6881
${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
@@ -76,7 +89,7 @@ endif()
7689
## Dependencies ###############################################################
7790

7891
# ANARI-SDK
79-
set(ANARI_REQUIRED_VERSION 0.10.0)
92+
set(ANARI_REQUIRED_VERSION 0.12.0)
8093
find_package(anari ${ANARI_REQUIRED_VERSION} REQUIRED)
8194

8295
# CUDA
@@ -106,6 +119,10 @@ enable_testing()
106119
add_subdirectory(devices)
107120
add_subdirectory(examples)
108121
add_subdirectory(tests)
122+
add_subdirectory(shaders)
123+
if (VISRTX_BUILD_TSD)
124+
add_subdirectory(tsd)
125+
endif()
109126

110127
## Configure CMake find_package() config files ################################
111128

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ In addition to standard `ANARI_KHR` extensions, the following extensions are
7979
also implemented in the `visrtx` device. Note that all extensions are subject to
8080
change
8181

82+
#### "VISRTX_ARRAY_CUDA" (experimental)
83+
84+
This extension indicates that applications can use pointers to CUDA device
85+
memory when created shared and captured arrays when using VisRTX. This is
86+
currently only working with `sharedStructured` spatial fields and is under
87+
active development.
88+
8289
#### "VISRTX_CUDA_OUTPUT_BUFFERS"
8390

8491
This extension indicates that raw CUDA GPU buffers from frame objects can be
@@ -92,10 +99,19 @@ GPU pointers returned by `anariMapFrame()` are device pointers intended to be
9299
kept on the device. Applications which desire to copy data from the device back
93100
to the host should instead map the ordinary `color` and `depth` channels.
94101

95-
#### "VISRTX_UNIFORM_ATTRIBUTES" (experimental)
102+
#### "VISRTX_INSTANCE_ATTRIBUTES" (experimental)
96103

97104
This extension indicates that all attributes can be set as a single
98-
`ANARI_FLOAT32_VEC4` value, which is constant over the entire geometry.
105+
`ANARI_FLOAT32_VEC4` value on the instance, which overrides any values on the
106+
geometries within the instanced group.
107+
108+
#### "VISRTX_SPATIAL_FIELD_NANOVDB" (experimental)
109+
110+
This extension adds the ability to render
111+
[NanoVDB](https://developer.nvidia.com/nanovdb) spatial fields. This subtype
112+
takes a single array parameter called `data`, where the array is of type `UINT8`
113+
containing the raw bytes containing of the grid data. Currently `float`,
114+
`nanovdb::Fp4/8/16/N` grids are supported.
99115

100116
#### "VISRTX_TRIANGLE_FACE_VARYING_ATTRIBUTES" (experimental)
101117

@@ -155,6 +171,7 @@ The following extensions are either partially or fully implemented by VisRTX:
155171

156172
- `KHR_ARRAY1D_REGION`
157173
- `KHR_AUXILIARY_BUFFERS`
174+
- `KHR_CAMERA_DEPTH_OF_FIELD`
158175
- `KHR_CAMERA_ORTHOGRAPHIC`
159176
- `KHR_CAMERA_PERSPECTIVE`
160177
- `KHR_DEVICE_SYNCHRONIZATION`
@@ -169,6 +186,7 @@ The following extensions are either partially or fully implemented by VisRTX:
169186
- `KHR_GEOMETRY_SPHERE`
170187
- `KHR_GEOMETRY_TRIANGLE`
171188
- `KHR_INSTANCE_TRANSFORM`
189+
- `KHR_INSTANCE_TRANSFORM_ARRAY`
172190
- `KHR_LIGHT_DIRECTIONAL`
173191
- `KHR_LIGHT_POINT`
174192
- `KHR_MATERIAL_MATTE`
@@ -179,9 +197,12 @@ The following extensions are either partially or fully implemented by VisRTX:
179197
- `KHR_SAMPLER_TRANSFORM`
180198
- `KHR_SPATIAL_FIELD_STRUCTURED_REGULAR`
181199
- `KHR_VOLUME_TRANSFER_FUNCTION1D`
200+
- `VISRTX_ARRAY_CUDA`
182201
- `VISRTX_CUDA_OUTPUT_BUFFERS`
202+
- `VISRTX_INSTANCE_ATTRIBUTES`
203+
- `VISRTX_SPATIAL_FIELD_NANOVDB`
204+
- `VISRTX_TRIANGLE_BACK_FACE_CULLING`
183205
- `VISRTX_TRIANGLE_FACE_VARYING_ATTRIBUTES`
184-
- `VISRTX_UNIFORM_ATTRIBUTES`
185206

186207
For any found bugs in extensions that are implemented, please [open an
187208
issue](https://github.com/NVIDIA/VisRTX/issues/new)!

ci/.gitlab-ci.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

ci/build_linux.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

ci/build_win.ps1

Lines changed: 0 additions & 7 deletions
This file was deleted.

cmake/FindMDL_SDK.cmake

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are met:
6+
#
7+
# 1. Redistributions of source code must retain the above copyright notice,
8+
# this list of conditions and the following disclaimer.
9+
#
10+
# 2. Redistributions in binary form must reproduce the above copyright notice,
11+
# this list of conditions and the following disclaimer in the documentation
12+
# and/or other materials provided with the distribution.
13+
#
14+
# 3. Neither the name of the copyright holder nor the names of its
15+
# contributors may be used to endorse or promote products derived from
16+
# this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28+
# POSSIBILITY OF SUCH DAMAGE.
29+
30+
if (TARGET MDL_SDK::MDL_SDK)
31+
return()
32+
endif()
33+
34+
find_path(MDL_SDK_ROOT NAMES "include/mi/mdl_sdk.h" PATHS ${MDL_SDK_PATH} ENV MDL_SDK_PATH)
35+
36+
include(FindPackageHandleStandardArgs)
37+
find_package_handle_standard_args(MDL_SDK DEFAULT_MSG MDL_SDK_ROOT)
38+
39+
40+
set(MDL_SDK_INCLUDE_DIR ${MDL_SDK_ROOT}/include)
41+
set(MDL_SDK_INCLUDE_DIRS ${MDL_SDK_ROOT}/include)
42+
mark_as_advanced(MDL_SDK_INCLUDE_DIR MDL_SDK_INCLUDE_DIRS)
43+
44+
add_library(MDL_SDK::MDL_SDK INTERFACE IMPORTED)
45+
target_include_directories(MDL_SDK::MDL_SDK INTERFACE ${MDL_SDK_INCLUDE_DIR})

devices/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929

3030
option(VISRTX_BUILD_RTX_DEVICE "Build CUDA/OptiX device" ON)
3131
if (VISRTX_BUILD_RTX_DEVICE)
32+
if(VISRTX_ENABLE_MDL_SUPPORT)
33+
add_subdirectory(libmdl)
34+
endif()
3235
add_subdirectory(rtx)
3336
endif()
3437

devices/gl/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ anari_generate_frontend(
4848
JSON ${CMAKE_CURRENT_SOURCE_DIR}
4949
)
5050

51-
add_subdirectory(generated)
52-
5351
set(CMAKE_INSTALL_RPATH "$ORIGIN")
5452

5553
add_library(${PROJECT_NAME} SHARED
@@ -85,10 +83,16 @@ add_library(${PROJECT_NAME} SHARED
8583
generated/VisGLObjects.cpp
8684
generated/VisGLDeviceFactories.cpp
8785
generated/VisGLString.cpp
88-
generated/VisGLQueries.cpp
8986
src/glad/src/gl.c
9087
)
9188

89+
anari_generate_queries(
90+
DEVICE_TARGET ${PROJECT_NAME}
91+
CPP_NAMESPACE visgl
92+
JSON_ROOT_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}
93+
JSON_DEFINITIONS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/visgl_device.json
94+
)
95+
9296
generate_export_header(${PROJECT_NAME}
9397
EXPORT_MACRO_NAME "VISGL_DEVICE_INTERFACE"
9498
)

devices/gl/generated/VisGLObjects.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Device::Device(ANARIDevice device, ANARIObject o) : device(device), object(o) {
6060
glAPI.set(device, object, ANARI_STRING, value);
6161
}
6262
{
63-
int32_t value[] = {INT32_C(0)};
63+
int8_t value[] = {INT8_C(0)};
6464
glDebug.set(device, object, ANARI_BOOL, value);
6565
}
6666
{
@@ -112,7 +112,7 @@ void Device::unset(const char *paramname) {
112112
return;
113113
case 35: //glDebug
114114
{
115-
int32_t value[] = {INT32_C(0)};
115+
int8_t value[] = {INT8_C(0)};
116116
glDebug.set(device, object, ANARI_BOOL, value);
117117
}
118118
return;

0 commit comments

Comments
 (0)