Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies, fix initialization of OpenGL on OSX #603

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.linux.gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ jobs:
image: ubuntu:22.04
env-from-files: .github/workflows/icx-linux.env .github/workflows/gfx-ubuntu22.env # OIDN AOT needs ocloc
cmd: |
unset no_proxy && unset NO_PROXY && apt update -y && apt install -y intel-ocloc # for OIDN AOT
module load cmake/3.25.3
scripts/build/linux.sh -G Ninja -DBUILD_GLFW=OFF -DBUILD_GPU_SUPPORT=ON -DBUILD_OSPRAY_MODULE_MPI=ON -DBUILD_OSPRAY_MODULE_MULTIDEVICE=ON -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OPENVKL_FROM_SOURCE=ON -DBUILD_OIDN_FROM_SOURCE=ON
scripts/build/linux.sh -G Ninja -DBUILD_GLFW=OFF -DBUILD_GPU_SUPPORT=ON -DBUILD_OSPRAY_MODULE_MPI=ON -DBUILD_OSPRAY_MODULE_MULTIDEVICE=ON -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OPENVKL_FROM_SOURCE=ON -DBUILD_OIDN_FROM_SOURCE=ON -DEMBREE_VERSION=devel # XXX Embree devel until v4.3.4
artifact-out: build-ubuntu2204-mpi-icx
artifact-path: build/install/ospray build/CMakeCache.txt build/*/build/CMakeCache.txt

Expand All @@ -49,11 +50,11 @@ jobs:
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
secrets: inherit
with:
image: opensuse/leap:15.3
env-from-files: .github/workflows/icx-linux.env
image: opensuse/leap:15.4
dpcpp-version: intel/2024.2.2 # issues with 2025.0
cmd: |
module load cmake/3.25.3
scripts/build/linux.sh -DBUILD_GPU_SUPPORT=ON -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OPENVKL_FROM_SOURCE=ON
scripts/build/linux.sh -DBUILD_GPU_SUPPORT=ON -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OPENVKL_FROM_SOURCE=ON -DEMBREE_VERSION=devel # XXX Embree devel until v4.3.4

rocky8-mpich-dpcpp-build:
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.windows.gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
runs-on: '["build", "mpi"]'
env-from-files: .github/workflows/icx-windows.env
ocloc-version: 77a13ae6-6100-4ddc-b069-0086ff44730c/ocloc_win_101.5082
ocloc-version: oneAPI/ocloc/2025.0
cmd: |
# disable warnings which lead to excessively large log files
$env:CXXFLAGS = '-w'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gfx-windows.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GFX_DRIVER_VERSION=windows-101.5768
GFX_DRIVER_VERSION=windows-101.6130
2 changes: 1 addition & 1 deletion .github/workflows/icx-linux.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DPCPP_VERSION=intel/2024.2.1
DPCPP_VERSION=intel/2025.0
2 changes: 1 addition & 1 deletion .github/workflows/icx-windows.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DPCPP_VERSION=oneAPI/compiler/2024.2
DPCPP_VERSION=intel/2025.0
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Version History
improving compatibility with glTF `KHR_materials_specular`
- Improvements to and documentation of the pathtracer's Shadow Catcher
feature (enabled via parameter `shadowCatcherPlane`)
- The new minimum versions of dependencies:
- ISPCRT v1.25.2 (uses IEEE 754 compliant instructions on ARM for
min/max)

### Changes in v3.2.0:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ before you can build OSPRay you need the following prerequisites:
Linux development tools.

- Additionally you require a copy of the [Intel® Implicit SPMD Program
Compiler (ISPC)](http://ispc.github.io), version 1.23.0 or later.
Compiler (ISPC)](http://ispc.github.io), version 1.25.2 or later.
Please obtain a release of ISPC from the [ISPC downloads
page](https://ispc.github.io/downloads.html). If ISPC is not found by
CMake its location can be hinted with the variable `ISPC_EXECUTABLE`.
Expand Down
22 changes: 12 additions & 10 deletions apps/common/external/imgui/imgui.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
--- a/imconfig.h
+++ b/imconfig.h
@@ -21,20 +21,29 @@

//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
@@ -23,18 +23,24 @@
// Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
// - Windows DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
-//#define IMGUI_API __declspec(dllexport) // MSVC Windows: DLL export
-//#define IMGUI_API __declspec(dllimport) // MSVC Windows: DLL import
-//#define IMGUI_API __attribute__((visibility("default"))) // GCC/Clang: override visibility when set is hidden
+#ifdef _WIN32
+# ifdef ospray_imgui_EXPORTS
+# define IMGUI_API __declspec(dllexport)
+# else
+# define IMGUI_API __declspec(dllimport)
+# endif
+#else
+# define IMGUI_API
+# define IMGUI_API __attribute__((visibility("default")))
+#endif
// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
//#define IMGUI_API __declspec( dllexport )
//#define IMGUI_API __declspec( dllimport )

//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names.
-//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
+#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87+ disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This is automatically done by IMGUI_DISABLE_OBSOLETE_FUNCTIONS.

//---- Disable all of Dear ImGui or don't implement standard windows/tools.
// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp.
Expand All @@ -33,8 +31,12 @@

//---- Don't implement some functions to reduce linkage requirements.
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
@@ -44,7 +53,7 @@
@@ -42,10 +48,10 @@
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a)
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, IME).
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
-//#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS // Don't implement default platform_io.Platform_OpenInShellFn() handler (Win32: ShellExecute(), require shell32.lib/.a, Mac/Linux: use system("")).
+#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS // Don't implement default platform_io.Platform_OpenInShellFn() handler (Win32: ShellExecute(), require shell32.lib/.a, Mac/Linux: use system("")).
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
-//#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies)
Expand Down
2 changes: 1 addition & 1 deletion apps/ospExamples/GLFWOSPRayWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ GLFWOSPRayWindow::GLFWOSPRayWindow(

glfwWindowHint(GLFW_SRGB_CAPABLE, GLFW_TRUE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
#ifdef __APPLE_
#ifdef __APPLE__
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
const char *glslVersion = "#version 150";
Expand Down
7 changes: 7 additions & 0 deletions cmake/compiler/dpcpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ set(OSPRAY_COMPILER_NEEDS_X_CPP TRUE)
get_filename_component(SYCL_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
if (WIN32 AND (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx"))
include(msvc) # icx on Windows behaves like msvc
foreach(FLAG
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
)
string(REPLACE "/MP" "" ${FLAG} ${${FLAG}}) # /MP is not supported by icx for offloading
endforeach()
set(CMAKE_CXX_FLAGS "/fp:precise ${CMAKE_CXX_FLAGS}")
set(OSPRAY_COMPILER_NEEDS_X_CPP FALSE) # icx on Win does not support "-x"
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /Qoption,link,/DEPENDENTLOADFLAG:0x2000")
Expand Down
4 changes: 2 additions & 2 deletions cmake/ospray_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ include(CMakeDependentOption)
set(OSPRAY_CMAKECONFIG_DIR
"${CMAKE_INSTALL_LIBDIR}/cmake/ospray-${OSPRAY_VERSION}")

set(ISPC_VERSION_REQUIRED 1.23.0)
set(ISPC_VERSION_REQUIRED 1.25.2)
set(RKCOMMON_VERSION_REQUIRED 1.14.2)
set(EMBREE_VERSION_REQUIRED 4.3.3)
set(OPENVKL_VERSION_REQUIRED 2.0.1)
set(OIDN_VERSION_REQUIRED 2.3.0)
set(OSPRAY_IMGUI_GIT_TAG cb16be3a3fc1f9cd146ae24d52b615f8a05fa93d) # v1.90.9
set(OSPRAY_IMGUI_GIT_TAG f401021d5a5d56fe2304056c391e78f81c8d4b8f) # v1.91.5
set(OSPRAY_STB_GIT_TAG 013ac3beddff3dbffafd5177e7972067cd2b5083) # v2.30 / v1.16

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
Expand Down
37 changes: 27 additions & 10 deletions cmake/ospray_redistribute_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,34 @@ if (OSPRAY_MODULE_GPU OR OSPRAY_MODULE_DENOISER)
endif()

if (WIN32)
file(GLOB SYCL_LIB LIST_DIRECTORIES FALSE
"${SYCL_DIR}/sycl?.dll"
"${SYCL_DIR}/pi_level_zero.dll"
"${SYCL_DIR}/pi_win_proxy_loader.dll"
"${SYCL_DIR}/win_proxy_loader.dll"
)
if(EXISTS "${SYCL_DIR}/../bin/pi_level_zero.dll")
file(GLOB SYCL_LIB LIST_DIRECTORIES FALSE
"${SYCL_DIR}/sycl?.dll"
"${SYCL_DIR}/pi_level_zero.dll"
"${SYCL_DIR}/pi_win_proxy_loader.dll"
"${SYCL_DIR}/win_proxy_loader.dll"
)
else()
file(GLOB SYCL_LIB LIST_DIRECTORIES FALSE
"${SYCL_DIR}/sycl?.dll"
"${SYCL_DIR}/ur_loader.dll"
"${SYCL_DIR}/ur_adapter_level_zero.dll"
"${SYCL_DIR}/ur_win_proxy_loader.dll"
)
endif()
else()
file(GLOB SYCL_LIB LIST_DIRECTORIES FALSE
"${SYCL_DIR}/libsycl.so.?"
"${SYCL_DIR}/libpi_level_zero.so"
)
if(EXISTS "${SYCL_DIR}/libpi_level_zero.so")
file(GLOB SYCL_LIB LIST_DIRECTORIES FALSE
"${SYCL_DIR}/libsycl.so.?"
"${SYCL_DIR}/libpi_level_zero.so"
)
else()
file(GLOB SYCL_LIB LIST_DIRECTORIES FALSE
"${SYCL_DIR}/libsycl.so.?"
"${SYCL_DIR}/libur_loader.so"
"${SYCL_DIR}/libur_adapter_level_zero.so"
)
endif()
endif()
list(APPEND DEPENDENT_LIBS ${SYCL_LIB})
endif()
Expand Down
2 changes: 1 addition & 1 deletion doc/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ before you can build OSPRay you need the following prerequisites:
(icc)](https://software.intel.com/en-us/c-compilers)), and standard
Linux development tools.
- Additionally you require a copy of the [Intel® Implicit SPMD Program
Compiler (ISPC)](http://ispc.github.io), version 1.23.0 or later.
Compiler (ISPC)](http://ispc.github.io), version 1.25.2 or later.
Please obtain a release of ISPC from the [ISPC downloads
page](https://ispc.github.io/downloads.html).
If ISPC is not found by CMake its location can be hinted with the
Expand Down
2 changes: 1 addition & 1 deletion modules/mpi/tutorials/GLFWDistribOSPRayWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GLFWDistribOSPRayWindow::GLFWDistribOSPRayWindow(const vec2i &windowSize,

glfwWindowHint(GLFW_SRGB_CAPABLE, GLFW_TRUE);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
#ifdef __APPLE_
#ifdef __APPLE__
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
const char *glslVersion = "#version 150";
Expand Down
40 changes: 20 additions & 20 deletions scripts/superbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@ endif()

option(DOWNLOAD_ISPC "Download ISPC or use the one found in the system environment?" ON)
if (DOWNLOAD_ISPC)
set(ISPC_VERSION "1.24.0" CACHE STRING "Which version of ISPC to download?")
set(ISPC_VERSION "1.25.3" CACHE STRING "Which version of ISPC to download?")
mark_as_advanced(CLEAR ISPC_VERSION)
if (ISPC_VERSION STREQUAL "1.24.0")
if (ISPC_VERSION STREQUAL "1.25.3")
if (APPLE)
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64")
set(ISPC_HASH "7f3891d0157aed3cab159fbc5235235b62797053db9387f5a61c8d0a22369ae0")
set(ISPC_HASH "a2bc150402bb9523261063d45a0f0deae50900c62238ae031cf9b9530393a4ac")
else()
set(ISPC_HASH "986eb172fe9db3e8da560e9d0d788832991638fab61ca80587d87eb175ffb520")
set(ISPC_HASH "6f35c5aec01a607c98d5661ef0f9e4d13665011247b17dfbc2f6a326120cb2aa")
endif()
elseif (WIN32)
set(ISPC_HASH "a7c21cb2434f5364acbdf0933af6de49198458ed6f0b62012e03c3325c972649")
set(ISPC_HASH "3a97e325f236c34a68013bf56fcb4e23c811b404207a60c010dc38fa24e60c55")
else()
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64")
set(ISPC_HASH "890ad5f31581091bf4ae9f235a7bb6fd9cabcbd6cf1670104ad61f1ad2da4c76")
set(ISPC_HASH "990c509244f32189c7b6e4ea49793706a62445e727b41f10b0883d98fc66f696")
else()
set(ISPC_HASH "79885d4482356dba7c01da312b6449fd575b097845ebcb90344dac5c178b43f5")
set(ISPC_HASH "526fe36638e675b9e1bb0618ac30f5286339e7a7e7f5a8441cd7607177292804")
endif()
endif()
endif()
Expand All @@ -117,20 +117,20 @@ endif()

option(DOWNLOAD_TBB "Download TBB or use the one found in the system environment?" ON)
if (DOWNLOAD_TBB)
set(TBB_VERSION "2021.13.0" CACHE STRING "Which version of TBB to download?")
set(TBB_VERSION "2022.0.0" CACHE STRING "Which version of TBB to download?")
mark_as_advanced(CLEAR TBB_VERSION)
option(BUILD_TBB_FROM_SOURCE "Build TBB from source or use pre-built version?" OFF)
mark_as_advanced(CLEAR BUILD_TBB_FROM_SOURCE)
if (TBB_VERSION STREQUAL "2021.13.0")
if (TBB_VERSION STREQUAL "2022.0.0")
if (BUILD_TBB_FROM_SOURCE)
set(TBB_HASH "3ad5dd08954b39d113dc5b3f8a8dc6dc1fd5250032b7c491eb07aed5c94133e1")
set(TBB_HASH "e8e89c9c345415b17b30a2db3095ba9d47647611662073f7fbf54ad48b7f3c2a")
else()
if (APPLE)
set(TBB_HASH "e9aa143de91f65ea15b62ceeba5845bbc914c882d32bf9c9a405e6b8b5a70ade")
set(TBB_HASH "9d0280d9c4ef71f0fe0985c298c20c105757e1bccedcf6676cba5d92877cfe0c")
elseif (WIN32)
set(TBB_HASH "0a7b19b52ec9d8eaa10cbbe396e955130815489c544642acecda8ef8d2d7f64d")
set(TBB_HASH "660f3555de26bee8cd4daef1105d5d9e93e695b2fcfa9c57db3aa38c6afe5675")
else()
set(TBB_HASH "f5c9304710051f0193a07fb91b6d6ada5a3e0a6d623951ee176b1897816ecf4c")
set(TBB_HASH "1b669eb357dd90f3135f27e3c9a78683c6ecc74edf2799f7cb7df92a5423cb76")
endif()
endif()
endif()
Expand Down Expand Up @@ -195,24 +195,24 @@ endif()

option(BUILD_OIDN "Build OpenImageDenoise as a part of the superbuild." ON)
if (BUILD_OIDN)
set(OIDN_VERSION "2.3.0" CACHE STRING "Which version of OpenImageDenoise to build?")
set(OIDN_VERSION "2.3.1" CACHE STRING "Which version of OpenImageDenoise to build?")
mark_as_advanced(CLEAR OIDN_VERSION)
option(BUILD_OIDN_FROM_SOURCE "Build OpenImageDenoise or use pre-built version?" OFF)
mark_as_advanced(CLEAR BUILD_OIDN_FROM_SOURCE)
if (OIDN_VERSION STREQUAL "2.3.0")
if (OIDN_VERSION STREQUAL "2.3.1")
if (BUILD_OIDN_FROM_SOURCE)
set(OIDN_HASH "cce3010962ec84e0ba1acd8c9055a3d8de402fedb1b463517cfeb920a276e427")
set(OIDN_HASH "225879b4225bfe015273f0372bf6e7a69d01030043c8aefa017196b41ecf8148")
else()
if (APPLE)
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64")
set(OIDN_HASH "9dc42edba6461082e940c8c8cf19e6528d3d40f7f45c695fab33671b39414627")
set(OIDN_HASH "4174eaa3c26251a50922596ef6417ef3b7227139e332ce169f75768cdb4050fb")
else()
set(OIDN_HASH "8b3285d2d8c431c061a2cf0c5bf90fd519b5ad5fb6db828b07dc6662daa9e07b")
set(OIDN_HASH "04f0f428de3a9926ca9ad1919e49e3b50c96931f92c129bfafd2b2304da00b53")
endif()
elseif (WIN32)
set(OIDN_HASH "272781c9398eec7aeef9cd1be5b5aad7bb3debfc574308ce930b8e55ee51effd")
set(OIDN_HASH "61f579986d5b5c0e2f3f96db46869a77191f45bc001e558c3d91450b053894f0")
else()
set(OIDN_HASH "02693c3eb3888eeb0c59c9bb1142b28b899ac8dd02bad4397beaffb5f8bef863")
set(OIDN_HASH "379c6879880d856d354b99afe73d7e92eac0350df1be7a2046263e43ad040049")
endif()
endif()
endif()
Expand Down
8 changes: 0 additions & 8 deletions scripts/tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ export CMAKE_BUILD_PARALLEL_LEVEL=32
cmake --build . --target ospray_test_data
let exitCode+=$?

### Excluded tests
##################
# due to IEEE 754 uncompliant NaN handling on ARM NEON,
# see https://github.com/ispc/ispc/issues/3048
if [[ `uname -m` =~ arm|aarch ]] ; then
test_filters="TestShadowCatcher/ShadowCatcher.multipleLights/0"
fi

export OIDN_VERBOSE=2

if [ $TEST_CPU ]; then
Expand Down