From 6e15fdf2faa437616b64b34d612b8f4a2c0b26c6 Mon Sep 17 00:00:00 2001 From: Jefferson Amstutz Date: Mon, 14 Aug 2023 21:17:08 -0500 Subject: [PATCH 1/5] fix bug when using the installed viewer library in multiple subdirectories --- cmake/anariConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/anariConfig.cmake.in b/cmake/anariConfig.cmake.in index 1fb06dbc..5301e144 100644 --- a/cmake/anariConfig.cmake.in +++ b/cmake/anariConfig.cmake.in @@ -31,7 +31,7 @@ if (@INSTALL_CODE_GEN_SCRIPTS@) include(${CMAKE_CURRENT_LIST_DIR}/cmake/anari_generate_codegen.cmake) endif() -if (@INSTALL_VIEWER_LIBRARY@) +if (@INSTALL_VIEWER_LIBRARY@ AND NOT TARGET anari_viewer) include(${CMAKE_CURRENT_LIST_DIR}/cmake/anari_sdk_fetch_project.cmake) include(${CMAKE_CURRENT_LIST_DIR}/cmake/cmake_project_commands.cmake) add_subdirectory( From b5d8ac047499b51d4618ee579207608c73c83613 Mon Sep 17 00:00:00 2001 From: Jefferson Amstutz Date: Tue, 15 Aug 2023 13:55:46 -0500 Subject: [PATCH 2/5] fix attribute indexing when using indexed sphere geometry --- libs/helide/scene/surface/geometry/Sphere.cpp | 10 +++++++++- libs/helide/scene/surface/geometry/Sphere.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/helide/scene/surface/geometry/Sphere.cpp b/libs/helide/scene/surface/geometry/Sphere.cpp index 0f4d9be8..d71ccb6f 100644 --- a/libs/helide/scene/surface/geometry/Sphere.cpp +++ b/libs/helide/scene/surface/geometry/Sphere.cpp @@ -53,13 +53,18 @@ void Sphere::commit() sizeof(float4), numSpheres); + m_attributeIndex.clear(); + if (m_index) { + m_attributeIndex.reserve(m_index->size()); + const auto *begin = m_index->beginAs(); const auto *end = m_index->endAs(); const auto *vertices = m_vertexPosition->beginAs(); size_t sphereID = 0; std::transform(begin, end, vr, [&](uint32_t i) { + m_attributeIndex.push_back(i); const auto &v = vertices[i]; const float r = radius ? radius[i] : m_globalRadius; return float4(v.x, v.y, v.z, r); @@ -88,7 +93,10 @@ float4 Sphere::getAttributeValue(const Attribute &attr, const Ray &ray) const if (!attributeArray) return Geometry::getAttributeValue(attr, ray); - return readAttributeValue(attributeArray, ray.primID); + const auto primID = + m_attributeIndex.empty() ? ray.primID : m_attributeIndex[ray.primID]; + + return readAttributeValue(attributeArray, primID); } void Sphere::cleanup() diff --git a/libs/helide/scene/surface/geometry/Sphere.h b/libs/helide/scene/surface/geometry/Sphere.h index b4fa986b..6e54bfdf 100644 --- a/libs/helide/scene/surface/geometry/Sphere.h +++ b/libs/helide/scene/surface/geometry/Sphere.h @@ -23,6 +23,7 @@ struct Sphere : public Geometry helium::IntrusivePtr m_vertexPosition; helium::IntrusivePtr m_vertexRadius; std::array, 5> m_vertexAttributes; + std::vector m_attributeIndex; float m_globalRadius{0.f}; }; From c9aa6d72aa50bda66c505e6ea12dc2bdb5575ca4 Mon Sep 17 00:00:00 2001 From: Jefferson Amstutz Date: Fri, 18 Aug 2023 17:57:06 -0500 Subject: [PATCH 3/5] fix incorrect property name for querying device extensions --- libs/helide/HelideDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/helide/HelideDevice.cpp b/libs/helide/HelideDevice.cpp index 881ff1c1..85d1885b 100644 --- a/libs/helide/HelideDevice.cpp +++ b/libs/helide/HelideDevice.cpp @@ -241,7 +241,7 @@ int HelideDevice::getProperty(ANARIObject object, { if (handleIsDevice(object)) { std::string_view prop = name; - if (prop == "feature" && type == ANARI_STRING_LIST) { + if (prop == "extension" && type == ANARI_STRING_LIST) { helium::writeToVoidP(mem, query_extensions()); return 1; } else if (prop == "helide" && type == ANARI_BOOL) { From 3c598a7410cabf926990415b13cdfccb04f5306a Mon Sep 17 00:00:00 2001 From: Jefferson Amstutz Date: Tue, 22 Aug 2023 12:41:53 -0500 Subject: [PATCH 4/5] bump version number --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4b66a87..4df49c43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) ## Establish project -project(anari VERSION 0.7.0 LANGUAGES C CXX) +project(anari VERSION 0.7.1 LANGUAGES C CXX) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) From 6a39d520a64a9600d447e6fb98561f223945c5e5 Mon Sep 17 00:00:00 2001 From: Jefferson Amstutz Date: Tue, 22 Aug 2023 12:43:58 -0500 Subject: [PATCH 5/5] make sure 'next_release' branch is covered with CI --- .github/workflows/anari_sdk_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/anari_sdk_ci.yml b/.github/workflows/anari_sdk_ci.yml index e1c8da3b..c6a82856 100644 --- a/.github/workflows/anari_sdk_ci.yml +++ b/.github/workflows/anari_sdk_ci.yml @@ -4,7 +4,7 @@ on: push: branches: [ jda/remote-device ] pull_request: - branches: [ main ] + branches: [ main, next_release ] env: ANARI_LIBRARY: helide