Skip to content

Commit d17fcf9

Browse files
committed
Merge branch 'next_release'
2 parents 286e28b + d95b167 commit d17fcf9

File tree

548 files changed

+20234
-2385
lines changed

Some content is hidden

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

548 files changed

+20234
-2385
lines changed

CMakeLists.txt

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
2828

2929
## Establish project
3030

31-
project(anari VERSION 0.7.2 LANGUAGES C CXX)
31+
project(anari VERSION 0.8.0 LANGUAGES C CXX)
3232

3333
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
3434
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
@@ -51,12 +51,9 @@ cmake_dependent_option(BUILD_VIEWER
5151
"BUILD_EXAMPLES"
5252
OFF
5353
)
54-
cmake_dependent_option(INSTALL_VIEWER_LIBRARY
55-
"Install anari::anari_viewer library target"
56-
OFF
57-
"BUILD_EXAMPLES;BUILD_VIEWER"
58-
OFF
59-
)
54+
option(INSTALL_VIEWER_LIBRARY "Install anari::anari_viewer library target" ON)
55+
option(INSTALL_VIEWER "Install anariViewer app" OFF)
56+
mark_as_advanced(INSTALL_VIEWER)
6057

6158
## The generate_all targets collects all offline code generation targets
6259

@@ -69,10 +66,6 @@ include(cmake/anari_sdk_fetch_project.cmake)
6966

7067
## Add library and executable targets
7168

72-
set(glm_DIR ${CMAKE_CURRENT_LIST_DIR}/external/glm/lib/cmake/glm)
73-
find_package(glm REQUIRED)
74-
mark_as_advanced(glm_DIR)
75-
7669
add_subdirectory(libs)
7770
add_subdirectory(external)
7871
add_subdirectory(code_gen)

README.md

Lines changed: 16 additions & 3 deletions

cmake/anariConfig.cmake.in

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55

66
include(CMakeFindDependencyMacro)
77

8-
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
9-
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
10-
find_dependency(Threads)
11-
128
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@_Exports.cmake)
139

14-
check_required_components(@PROJECT_NAME@)
15-
1610
if (NOT TARGET anari::anari)
1711
message(FATAL_ERROR "CMAKE_PREFIX_PATH or anari_DIR are pointing to an \
1812
ANARI-SDK build directory. Please do a full install of the SDK \
@@ -29,16 +23,27 @@ if (@INSTALL_CODE_GEN_SCRIPTS@)
2923
set(ANARI_CODE_GEN_ROOT ${ANARI_DATAROOTDIR}/code_gen)
3024
include(${CMAKE_CURRENT_LIST_DIR}/cmake/anari_generate_frontend.cmake)
3125
include(${CMAKE_CURRENT_LIST_DIR}/cmake/anari_generate_codegen.cmake)
26+
set(anari_code_gen_FOUND 1)
27+
elseif(anari_FIND_REQUIRED_code_gen)
28+
message(ERROR "The 'code_gen' component was requested but not found. To
29+
enable this component, the SDK must be built with \
30+
INSTALL_CODE_GEN_SCRIPTS=ON")
3231
endif()
3332

3433
include(${CMAKE_CURRENT_LIST_DIR}/cmake/anari_sdk_fetch_project.cmake)
3534
include(${CMAKE_CURRENT_LIST_DIR}/cmake/cmake_project_commands.cmake)
3635

37-
if (@INSTALL_VIEWER_LIBRARY@ AND NOT TARGET anari_viewer)
36+
if (TARGET anari::anari_viewer)
37+
set(anari_viewer_FOUND 1)
38+
elseif (anari_FIND_REQUIRED_viewer AND @INSTALL_VIEWER_LIBRARY@)
3839
add_subdirectory(
3940
${ANARI_DATAROOTDIR}/anari_viewer
4041
${CMAKE_CURRENT_BINARY_DIR}/anari_viewer
4142
)
43+
set(anari_viewer_FOUND 1)
44+
elseif(anari_FIND_REQUIRED_viewer)
45+
message(ERROR "The 'viewer' component was requested but not found. To
46+
enable this component, the SDK must be built with INSTALL_VIEWER_LIBRARY=ON")
4247
endif()
4348

44-
set(ANARI_FOUND TRUE)
49+
check_required_components(@PROJECT_NAME@)

code_gen/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.12")
5858
if (INSTALL_CODE_GEN_SCRIPTS)
5959
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
6060
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/anari
61+
COMPONENT code_gen
6162
FILES_MATCHING
6263
PATTERN *.py
6364
PATTERN *.h
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"info" : {
3+
"name" : "KHR_FRAME_ACCUMULATION",
4+
"type" : "extension",
5+
"dependencies" : ["anari_core_1_0"]
6+
},
7+
8+
"objects" : [
9+
{
10+
"type" : "ANARI_FRAME",
11+
"parameters" : [
12+
{
13+
"name" : "accumulation",
14+
"types" : ["ANARI_BOOL"],
15+
"tags" : [],
16+
"description" : "enable device internal buffers for frame accumulation"
17+
}
18+
]
19+
}
20+
]
21+
}

code_gen/devices/experimental_device.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"khr_camera_rolling_shutter",
2121
"khr_camera_stereo",
2222
"khr_device_synchronization",
23+
"khr_frame_accumulation",
2324
"khr_frame_channel_albedo",
2425
"khr_frame_channel_instance_id",
2526
"khr_frame_channel_normal",

code_gen/pyanari_build.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ def _from_type_list(x):
168168
def _from_parameter_list(x):
169169
result = []
170170
if x != ffi.NULL:
171-
print(x)
172-
print(x[0].name)
173171
i = 0
174172
while x[i].name != ffi.NULL:
175173
result.append((str(ffi.string(x[i].name), 'utf-8'), x[i].type))
@@ -189,7 +187,7 @@ def _convert_pointer(dataType, x):
189187
elif dataType == lib.ANARI_PARAMETER_LIST:
190188
return _from_parameter_list(x)
191189
elif dataType == lib.ANARI_STRING:
192-
return str(ffi.string(x[i]), 'utf-8')
190+
return str(ffi.string(x), 'utf-8')
193191
elif _elements[dataType]==1:
194192
return x[0]
195193
elif _elements[dataType]==2:
@@ -219,9 +217,13 @@ def _convert_pointer(dataType, x):
219217
220218
''',
221219
'anariLoadLibrary' :
222-
'''def anariLoadLibrary(name, callback):
223-
device = lib.anariLoadLibrary(name.encode('utf-8'), lib.ANARIStatusCallback_python, callback)
224-
return ffi.gc(device, lib.anariUnloadLibrary)
220+
'''def anariLoadLibrary(name, callback = ffi.NULL):
221+
cbwrapper = ffi.NULL if callback == ffi.NULL else lib.ANARIStatusCallback_python
222+
device = lib.anariLoadLibrary(name.encode('utf-8'), cbwrapper, callback)
223+
if device == ffi.NULL:
224+
return None
225+
else:
226+
return ffi.gc(device, lib.anariUnloadLibrary)
225227
226228
''',
227229
'anariNewArray1D' :

cts/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ set(REFERENCE_LIB helide)
1515

1616
project(anariCTSBackend LANGUAGES CXX)
1717

18+
set(glm_DIR ${CMAKE_CURRENT_LIST_DIR}/external/glm/lib/cmake/glm)
19+
find_package(glm REQUIRED)
20+
mark_as_advanced(glm_DIR)
21+
1822
find_package(anari REQUIRED)
1923
include(pybind11.cmake)
2024

@@ -38,7 +42,7 @@ PUBLIC
3842

3943
target_link_libraries(${PROJECT_NAME} PUBLIC glm::glm helium anari_test_scenes)
4044

41-
find_package(Python3 REQUIRED COMPONENTS Interpreter)
45+
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
4246

4347
file(GLOB python_files ${CMAKE_CURRENT_LIST_DIR}/*.py)
4448

File renamed without changes.

0 commit comments

Comments
 (0)