diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index fccb6b99f..1742ebb2d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -25,10 +25,6 @@ jobs: image: rockylinux:8.7 env-from-files: .github/workflows/dpcpp.env cmd: | - module load cmake/3.25.3 - module load mpi/mpich-x86_64 - export CC=clang - export CXX=clang++ scripts/build/linux.sh -DBUILD_GPU_SUPPORT=ON artifact-out: build-linux artifact-path: build/install/ospray build/CMakeCache.txt build/*/build/CMakeCache.txt @@ -41,7 +37,6 @@ jobs: secrets: inherit with: runs-on: '"vis-perf-x8280-1"' - setup-benny: true cmd: | scripts/tests/run-benchmarks.sh artifact-in: build-linux @@ -52,7 +47,6 @@ jobs: secrets: inherit with: runs-on: '"vis-perf-x8380-1"' - setup-benny: true cmd: | scripts/tests/run-benchmarks.sh artifact-in: build-linux @@ -63,7 +57,6 @@ jobs: secrets: inherit with: runs-on: '"vis-perf-a3970x-1"' - setup-benny: true cmd: | scripts/tests/run-benchmarks.sh artifact-in: build-linux @@ -74,7 +67,6 @@ jobs: secrets: inherit with: runs-on: '"vis-perf-i9-12900k-1"' - setup-benny: true cmd: | scripts/tests/run-benchmarks.sh artifact-in: build-linux @@ -88,7 +80,6 @@ jobs: env-from-files: .github/workflows/gfx-ubuntu22.env options: --device=/dev/dri:/dev/dri runs-on: '"vis-perf-dg2-01"' - setup-benny: true cmd: | scripts/tests/run-benchmarks.sh GPU artifact-in: build-linux @@ -102,7 +93,6 @@ jobs: env-from-files: .github/workflows/gfx-ubuntu22.env options: --device=/dev/dri:/dev/dri runs-on: '"vis-perf-spr-pvc-01"' - setup-benny: true cmd: | scripts/tests/run-benchmarks.sh GPU artifact-in: build-linux diff --git a/.github/workflows/ci.linux.gpu.yml b/.github/workflows/ci.linux.gpu.yml index af71f39bc..cee3295e3 100644 --- a/.github/workflows/ci.linux.gpu.yml +++ b/.github/workflows/ci.linux.gpu.yml @@ -24,9 +24,6 @@ jobs: image: ubuntu:22.04 env-from-files: .github/workflows/dpcpp.env cmd: | - module load cmake/3.25.3 - export CC=clang - export CXX=clang++ scripts/build/linux.sh -G Ninja -DBUILD_GLFW=OFF -DBUILD_GPU_SUPPORT=ON -DBUILD_OSPRAY_MODULE_MPI=ON -DBUILD_OSPRAY_MODULE_MULTIDEVICE=ON artifact-out: build-ubuntu2204-mpi-dpcpp artifact-path: build/install/ospray build/CMakeCache.txt build/*/build/CMakeCache.txt @@ -38,8 +35,10 @@ jobs: with: image: ubuntu:22.04 env-from-files: .github/workflows/icx-linux.env .github/workflows/gfx-ubuntu22.env # OIDN AOT needs ocloc + options: --device=/dev/dri:/dev/dri + runs-on: '"dg2"' cmd: | - module load cmake/3.25.3 + unset no_proxy && unset NO_PROXY && apt update -y && apt install -y intel-ocloc # for OIDN AOT 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 artifact-out: build-ubuntu2204-mpi-icx artifact-path: build/install/ospray build/CMakeCache.txt build/*/build/CMakeCache.txt @@ -49,10 +48,9 @@ jobs: uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main secrets: inherit with: - image: opensuse/leap:15.3 + image: opensuse/leap:15.4 env-from-files: .github/workflows/icx-linux.env 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 rocky8-mpich-dpcpp-build: @@ -62,10 +60,7 @@ jobs: image: rockylinux:8 env-from-files: .github/workflows/dpcpp.env cmd: | - module load cmake/3.25.3 - module load mpi/mpich-x86_64 - export CC=clang - export CXX=clang++ + export PATH=/usr/lib64/mpich/bin:$PATH scripts/build/linux.sh -DBUILD_GPU_SUPPORT=ON -DBUILD_OSPRAY_MODULE_MPI=ON -DBUILD_OSPRAY_MODULE_MULTIDEVICE=ON artifact-out: build-rocky8-mpich-dpcpp artifact-path: build/install/ospray build/CMakeCache.txt build/*/build/CMakeCache.txt @@ -74,6 +69,20 @@ jobs: ### TEST JOBS ### + dpcpp-cpu-ubu22-test: + needs: ubu22-mpi-dpcpp-build + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main + secrets: inherit + with: + image: ubuntu:22.04 + artifact-in: build-ubuntu2204-mpi-dpcpp + artifact-out: test-ubuntu2204-dpcpp-cpu + artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* + artifact-on-failure: true + cmd: | + export PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" + scripts/tests/run_tests.sh "$GITHUB_WORKSPACE" + dpcpp-dg2-ubu22-test: needs: ubu22-mpi-dpcpp-build uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main @@ -89,7 +98,42 @@ jobs: artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* artifact-on-failure: true cmd: | - module load cmake/3.25.3 + export PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" + scripts/tests/run_gpu_tests.sh "$GITHUB_WORKSPACE" + + dpcpp-bmg-ubu22-test: + needs: ubu22-mpi-dpcpp-build + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main + secrets: inherit + with: + timeout-minutes: 100 + image: ubuntu:22.04 + env-from-files: .github/workflows/gfx-ubuntu22.env + options: --device=/dev/dri:/dev/dri + runs-on: '"bmg"' + artifact-in: build-ubuntu2204-mpi-dpcpp + artifact-out: test-ubuntu2204-dpcpp-bmg + artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* + artifact-on-failure: true + cmd: | + export PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" + scripts/tests/run_gpu_tests.sh "$GITHUB_WORKSPACE" + + dpcpp-lnl-ubu22-test: + needs: ubu22-mpi-dpcpp-build + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main + secrets: inherit + with: + timeout-minutes: 100 + image: ubuntu:22.04 + env-from-files: .github/workflows/gfx-ubuntu22.env + options: --device=/dev/dri:/dev/dri + runs-on: '"lnl"' + artifact-in: build-ubuntu2204-mpi-dpcpp + artifact-out: test-ubuntu2204-dpcpp-lnl + artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* + artifact-on-failure: true + cmd: | export PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" scripts/tests/run_gpu_tests.sh "$GITHUB_WORKSPACE" @@ -108,7 +152,6 @@ jobs: artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* artifact-on-failure: true cmd: | - module load cmake/3.25.3 export PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" scripts/tests/run_gpu_tests.sh "$GITHUB_WORKSPACE" @@ -127,7 +170,6 @@ jobs: artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* artifact-on-failure: true cmd: | - module load cmake/3.25.3 export PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 scripts/tests/run_gpu_tests.sh "$GITHUB_WORKSPACE" SKIP_GPU TEST_MPI @@ -146,7 +188,6 @@ jobs: artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* artifact-on-failure: true cmd: | - module load cmake/3.25.3 export PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" scripts/tests/run_gpu_tests.sh "$GITHUB_WORKSPACE" SKIP_GPU TEST_MULTIDEVICE diff --git a/.github/workflows/ci.linux.yml b/.github/workflows/ci.linux.yml index 858440754..53c16e7ba 100644 --- a/.github/workflows/ci.linux.yml +++ b/.github/workflows/ci.linux.yml @@ -68,11 +68,8 @@ jobs: secrets: inherit with: image: rockylinux:8 + env-from-files: .github/workflows/icx-linux.env cmd: | - module load cmake - module load intel/2022.1 - export CC=icx - export CXX=icpx export CXXFLAGS="-fhonor-infinities -fhonor-nans" export CFLAGS=$CXXFLAGS export LDFLAGS="-static-intel" @@ -86,8 +83,7 @@ jobs: with: image: rockylinux:8 cmd: | - module load cmake - module load impi/2021.6 + export PATH=$STORAGE_PATH/packages/apps/intel/oneAPI/mpi/latest/bin:$PATH scripts/build/linux.sh -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OPENVKL_FROM_SOURCE=ON -DBUILD_OIDN=OFF -DBUILD_OSPRAY_MODULE_MPI=ON -DBUILD_ISA_AVX512=OFF -DTBB_VERSION=2021.9.0 build-rocky8-mpi-mpich: @@ -96,8 +92,7 @@ jobs: with: image: rockylinux:8 cmd: | - module load cmake - module load mpi/mpich-x86_64 + export PATH=/usr/lib64/mpich/bin:$PATH scripts/build/linux.sh -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OPENVKL_FROM_SOURCE=ON -DBUILD_OIDN=OFF -DBUILD_OSPRAY_MODULE_MPI=ON -DBUILD_ISA_AVX512=OFF -DTBB_VERSION=2021.9.0 artifact-out: build-rocky8-mpi-mpich artifact-path: build/install/ospray build/CMakeCache.txt build/*/build/CMakeCache.txt @@ -108,8 +103,7 @@ jobs: with: image: rockylinux:8 cmd: | - module load cmake - module load mpi/openmpi-x86_64 + export PATH=/usr/lib64/openmpi/bin:$PATH scripts/build/linux.sh -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OPENVKL_FROM_SOURCE=ON -DBUILD_OIDN=OFF -DBUILD_OSPRAY_MODULE_MPI=ON -DBUILD_ISA_AVX512=OFF -DTBB_VERSION=2021.9.0 build-centos8: @@ -128,7 +122,7 @@ jobs: with: image: centos:8 cmd: | - module load mpi/mpich-x86_64 + export PATH=/usr/lib64/mpich/bin:$PATH scripts/build/linux.sh -DBUILD_OSPRAY_MODULE_MPI=ON build-centos8-mpi-openmpi: @@ -137,7 +131,7 @@ jobs: with: image: centos:8 cmd: | - module load mpi/openmpi-x86_64 + export PATH=/usr/lib64/openmpi/bin:$PATH scripts/build/linux.sh -DBUILD_OSPRAY_MODULE_MPI=ON build-rocky8-oidn-mpi: @@ -146,8 +140,7 @@ jobs: with: image: rockylinux:8 cmd: | - module load cmake/3.15.2 - module load mpi/mpich-x86_64 + export PATH=/usr/lib64/mpich/bin:$PATH scripts/build/linux.sh -DBUILD_OSPRAY_MODULE_MPI=ON artifact-out: build-rocky8-oidn-mpi artifact-path: build/install/ospray build/CMakeCache.txt build/*/build/CMakeCache.txt @@ -227,8 +220,8 @@ jobs: with: image: rockylinux:8 cmd: | - module load cmake - module load mpi/mpich-x86_64 + export PATH=/usr/lib64/mpich/bin:$PATH + export LD_LIBRARY_PATH=/usr/lib64/mpich/lib:$LD_LIBRARY_PATH PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" scripts/tests/run_tests.sh "$GITHUB_WORKSPACE" TEST_MPI artifact-in: build-rocky8-mpi-mpich artifact-out: test-rocky8-gcc-mpi-mpich-avx2 @@ -281,8 +274,8 @@ jobs: image: rockylinux:8 runs-on: '"avx512"' cmd: | - module load cmake/3.15.2 - module load mpi/mpich-x86_64 + export PATH=/usr/lib64/mpich/bin:$PATH + export LD_LIBRARY_PATH=/usr/lib64/mpich/lib:$LD_LIBRARY_PATH export OIDN_DEFAULT_DEVICE=cpu PATH="$GITHUB_WORKSPACE/build/install/ospray/bin:$PATH" scripts/tests/run_tests.sh "$GITHUB_WORKSPACE" TEST_MPI artifact-in: build-rocky8-oidn-mpi @@ -296,7 +289,6 @@ jobs: with: image: centos:8 cmd: | - module load cmake mkdir buildtut cd buildtut cmake -D ospray_DIR=`echo $GITHUB_WORKSPACE/build/install/ospray/lib/cmake/ospray-*` ../apps/ospTutorial/ospTutorialFindospray @@ -390,8 +382,8 @@ jobs: with: image: rockylinux:8 cmd: | - module load cmake/3.15.2 - module load mpi/mpich-x86_64 + export PATH=/usr/lib64/mpich/bin:$PATH + export LD_LIBRARY_PATH=/usr/lib64/mpich/lib:$LD_LIBRARY_PATH scripts/tests/run_tutorials.sh TEST_MPI artifact-in: build-rocky8-oidn-mpi diff --git a/.github/workflows/ci.windows.gpu.yml b/.github/workflows/ci.windows.gpu.yml index 43a3a59c2..33e398cfa 100644 --- a/.github/workflows/ci.windows.gpu.yml +++ b/.github/workflows/ci.windows.gpu.yml @@ -23,6 +23,7 @@ jobs: with: runs-on: '["build", "mpi"]' env-from-files: .github/workflows/dpcpp.env + msvc-version: 2022 cmd: | $env:SYCL_BUNDLE_ROOT = $env:DPCPP_ROOT # disable warnings which lead to excessively large log files @@ -38,7 +39,8 @@ 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 + msvc-version: 2022 + ocloc-version: oneAPI/ocloc/2025.3 cmd: | # disable warnings which lead to excessively large log files $env:CXXFLAGS = '-w' @@ -51,7 +53,20 @@ jobs: ### TEST JOBS ### - dpcpp-test: + cpu-dpcpp-test: + needs: dpcpp-build + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main + secrets: inherit + with: + cmd: | + $env:Path += ";$env:GITHUB_WORKSPACE\build\install\ospray\bin" + scripts\tests\run_tests.ps1 "$env:GITHUB_WORKSPACE" + artifact-in: build-windows-dpcpp + artifact-out: test-windows-dpcpp-cpu + artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* + artifact-on-failure: true + + dg2-dpcpp-test: needs: dpcpp-build uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main secrets: inherit @@ -63,7 +78,39 @@ jobs: $env:Path += ";$env:GITHUB_WORKSPACE\build\install\ospray\bin" scripts\tests\run_gpu_tests.ps1 "$env:GITHUB_WORKSPACE" artifact-in: build-windows-dpcpp - artifact-out: test-windows-dpcpp + artifact-out: test-windows-dpcpp-dg2 + artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* + artifact-on-failure: true + + bmg-dpcpp-test: + needs: dpcpp-build + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main + secrets: inherit + with: + timeout-minutes: 100 + runs-on: '"bmg"' + env-from-files: .github/workflows/gfx-windows.env + cmd: | + $env:Path += ";$env:GITHUB_WORKSPACE\build\install\ospray\bin" + scripts\tests\run_gpu_tests.ps1 "$env:GITHUB_WORKSPACE" + artifact-in: build-windows-dpcpp + artifact-out: test-windows-dpcpp-bmg + artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* + artifact-on-failure: true + + lnl-dpcpp-test: + needs: dpcpp-build + uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main + secrets: inherit + with: + timeout-minutes: 100 + runs-on: '"lnl"' + env-from-files: .github/workflows/gfx-windows.env + cmd: | + $env:Path += ";$env:GITHUB_WORKSPACE\build\install\ospray\bin" + scripts\tests\run_gpu_tests.ps1 "$env:GITHUB_WORKSPACE" + artifact-in: build-windows-dpcpp + artifact-out: test-windows-dpcpp-lnl artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* artifact-on-failure: true @@ -90,7 +137,7 @@ jobs: secrets: inherit with: timeout-minutes: 100 - runs-on: '"dg2"' + runs-on: '"lnl"' env-from-files: .github/workflows/icx-windows.env .github/workflows/gfx-windows.env cmd: | $env:Path += ";$env:GITHUB_WORKSPACE\build\install\ospray\bin" diff --git a/.github/workflows/dpcpp.env b/.github/workflows/dpcpp.env index 7372f6cea..38f83f753 100644 --- a/.github/workflows/dpcpp.env +++ b/.github/workflows/dpcpp.env @@ -1 +1 @@ -DPCPP_VERSION=intel-llvm/nightly-2023-10-26-rk +DPCPP_VERSION=intel-llvm/v6.3.0 diff --git a/.github/workflows/gfx-windows.env b/.github/workflows/gfx-windows.env index 9f00830aa..095bfbec9 100644 --- a/.github/workflows/gfx-windows.env +++ b/.github/workflows/gfx-windows.env @@ -1 +1 @@ -GFX_DRIVER_VERSION=windows-101.5768 +GFX_DRIVER_VERSION=windows-latest diff --git a/.github/workflows/icx-linux.env b/.github/workflows/icx-linux.env index e046beb03..77ec5b260 100644 --- a/.github/workflows/icx-linux.env +++ b/.github/workflows/icx-linux.env @@ -1 +1 @@ -DPCPP_VERSION=intel/2024.2.1 +DPCPP_VERSION=intel/2025.3 diff --git a/.github/workflows/icx-windows.env b/.github/workflows/icx-windows.env index bd643a941..77ec5b260 100644 --- a/.github/workflows/icx-windows.env +++ b/.github/workflows/icx-windows.env @@ -1 +1 @@ -DPCPP_VERSION=oneAPI/compiler/2024.2 +DPCPP_VERSION=intel/2025.3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c483dbb72..d2d36a2d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,10 +44,7 @@ jobs: image: rockylinux:8 env-from-files: .github/workflows/dpcpp.env cmd: | - module load cmake/3.25.3 - module load mpi/mpich-x86_64 - export CC=clang - export CXX=clang++ + export PATH=/usr/lib64/mpich/bin:$PATH scripts/release/linux.sh cp build_release/*.gz $STORAGE_PATH/packages/renderkit/ || true artifact-in: pdf @@ -103,6 +100,7 @@ jobs: with: runs-on: '["build", "mpi"]' env-from-files: .github/workflows/dpcpp.env + msvc-version: 2022 cmd: | $env:SYCL_BUNDLE_ROOT = $env:DPCPP_ROOT # disable warnings which lead to excessively large log files @@ -127,10 +125,8 @@ jobs: secrets: inherit uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@main with: - coverity: true project: OSPRay prebuild: > - module load impi/latest && echo "Configure dependencies" && cmake -L -S scripts/superbuild -B build_deps -DBUILD_DEPENDENCIES_ONLY=ON -DBUILD_EMBREE_FROM_SOURCE=ON -DBUILD_OPENVKL_FROM_SOURCE=ON -DBUILD_OIDN_FROM_SOURCE=ON -DBUILD_OSPRAY_MODULE_MPI=ON -DINSTALL_IN_SEPARATE_DIRECTORIES=OFF -DBUILD_ISA_AVX512=OFF && echo "Build dependencies" && @@ -204,7 +200,6 @@ jobs: with: image: rockylinux:8 cmd: | - module load cmake/3.15.2 tar -xzf build_release/*.gz export PATH=$GITHUB_WORKSPACE/$(ls -d1 ./ospray-*/bin):$PATH scripts/tests/run_tests.sh $GITHUB_WORKSPACE @@ -216,8 +211,8 @@ jobs: with: image: rockylinux:8 cmd: | - module load cmake/3.15.2 - module load mpi/mpich-x86_64 + export PATH=/usr/lib64/mpich/bin:$PATH + export LD_LIBRARY_PATH=/usr/lib64/mpich/lib:$LD_LIBRARY_PATH tar -xzf build_release/*.gz export PATH=$GITHUB_WORKSPACE/$(ls -d1 ./ospray-*/bin):$PATH scripts/tests/run_tests.sh $GITHUB_WORKSPACE SKIP_CPU TEST_MPI @@ -234,7 +229,6 @@ jobs: options: --device=/dev/dri:/dev/dri runs-on: '"dg2"' cmd: | - module load cmake/3.15.2 tar -xzf build_release/*.gz export PATH=$GITHUB_WORKSPACE/$(ls -d1 ./ospray-*/bin):$PATH export OIDN_DEFAULT_DEVICE=sycl diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 47afeb5e1..e42db86c6 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -40,16 +40,6 @@ jobs: artifact-out: build-linux-debug-all artifact-path: build/install/ospray build/CMakeCache.txt build/*/build/CMakeCache.txt - # build-mpi-cluster: - # with: - # runs-on: '["Cluster", "build"]' - # script: - # - module load cmake - # - module load impi - # - module load gnu - # - scripts/build/linux.sh -DBUILD_OSPRAY_MODULE_MPI=ON -DOSPRAY_BUILD_GLM=OFF -DBUILD_OSPRAY_MODULE_MULTIDEVICE=ON - # <<: *build_artifacts - build-windows-debug-all: uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main secrets: inherit @@ -82,17 +72,6 @@ jobs: artifact-path: build_regression_tests/tests*.xml build_regression_tests/failed* artifact-on-failure: true - # test-mpi-cluster: - # <<: *test_job_unix_avx512skx - # tags: [cluster] - # script: - # - module load impi - # - module load gnu - # - LD_LIBRARY_PATH="$CI_PROJECT_DIR/build/install/ospray/lib:$LD_LIBRARY_PATH" PATH="$CI_PROJECT_DIR/build/install/ospray/bin:$PATH" scripts/tests/run_tests.sh "$CI_PROJECT_DIR" TEST_MPI TEST_MULTIDEVICE - # env: - # needs: build-mpi-cluster - # needs: ${{ env.needs }} - test-windows-debug-all: needs: build-windows-debug-all uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main diff --git a/CHANGELOG.md b/CHANGELOG.md index 526c67f99..cca04bbe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,22 @@ Version History - Initialization of OpenGL on OSX - `OSP_DISJOINT` curves had disks at the end of the first and last cone/cylinder +- Update packaged Open Image Denoise v2.4.1 to bring the following + improvements: + - Added Intel Panther Lake, BMG-G31, Wildcat Lake, Nova Lake, and + Crescent Island GPU support + - Added Intel AMX-FP16 support, dramatically improving performance + on Intel Granite Rapids CPUs + - Improved performance for Intel Lunar Lake and Battlemage GPUs + - Added NVIDIA Blackwell GPU support + - Added AMD RDNA 3.5, RDNA 4, and GFX1152 GPU support, extended + RDNA 2 support + - Improved performance for AMD RDNA 3 GPUs +- The new minimum versions of dependencies: + - ISPC v1.30.0 (uses IEEE 754 compliant instructions on ARM for + min/max, performance improvements, bug fixes) + - rkcommon v1.15.2 + - CMake v3.10 ### Changes in v3.2.0: diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fafecf1a..ad426eef1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ ## Copyright 2009 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.10) ############################################################## # Language setup diff --git a/README.md b/README.md index dd13419a0..cc87a347b 100644 --- a/README.md +++ b/README.md @@ -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.30.0 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`. diff --git a/apps/common/external/imgui/imgui.patch b/apps/common/external/imgui/imgui.patch index fca50af7f..3752275fe 100644 --- a/apps/common/external/imgui/imgui.patch +++ b/apps/common/external/imgui/imgui.patch @@ -1,9 +1,12 @@ --- a/imconfig.h +++ b/imconfig.h -@@ -21,20 +21,29 @@ - - //---- Define attributes of all API symbols declarations, e.g. for DLL under Windows +@@ -24,18 +24,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) @@ -11,17 +14,12 @@ +# 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. @@ -33,12 +31,16 @@ //---- 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 @@ +@@ -43,10 +49,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) +#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies) //#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function. //#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions(). - //#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available + //#define IMGUI_DISABLE_DEFAULT_FONT // Disable default embedded fonts (ProggyClean/ProggyForever), remove ~9 KB + ~14 KB from output binary. AddFontDefaultXXX() functions will assert. diff --git a/apps/ospTutorial/ospTutorialFindospray/CMakeLists.txt b/apps/ospTutorial/ospTutorialFindospray/CMakeLists.txt index a558350f1..b6a4d2263 100644 --- a/apps/ospTutorial/ospTutorialFindospray/CMakeLists.txt +++ b/apps/ospTutorial/ospTutorialFindospray/CMakeLists.txt @@ -12,7 +12,7 @@ # should build the ospTutorial app from that install and NOT use your # local build. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(ospTutorialFindospray LANGUAGES C) diff --git a/cmake/compiler/dpcpp.cmake b/cmake/compiler/dpcpp.cmake index daf57a83e..06ce49682 100644 --- a/cmake/compiler/dpcpp.cmake +++ b/cmake/compiler/dpcpp.cmake @@ -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") diff --git a/cmake/compiler/ispc.cmake b/cmake/compiler/ispc.cmake index daa1ab027..b1e04ec3d 100644 --- a/cmake/compiler/ispc.cmake +++ b/cmake/compiler/ispc.cmake @@ -20,7 +20,7 @@ endmacro () ############################################################################### ## Find ISPC ## -find_program(ISPC_EXECUTABLE ispc HINTS ${ISPC_DIR_HINT} DOC "Path to the ISPC executable.") +find_program(ISPC_EXECUTABLE ispc DOC "Path to the ISPC executable.") if (NOT ISPC_EXECUTABLE) message(FATAL_ERROR "Could not find ISPC. Exiting.") else() @@ -29,6 +29,9 @@ else() OUTPUT_VARIABLE ISPC_INFO) string(REGEX MATCH "(.*), ([0-9]*\.[0-9]*\.[0-9]*[a-z]*) (.*)" _ ${ISPC_INFO}) set(ISPC_VERSION ${CMAKE_MATCH_2}) + if (ISPC_VERSION VERSION_LESS ISPC_VERSION_REQUIRED) + message(FATAL_ERROR "Need at least version ${ISPC_VERSION_REQUIRED} of Intel SPMD Compiler (ISPC).") + endif() message(STATUS "Found ISPC v${ISPC_VERSION}: ${ISPC_EXECUTABLE}") # Execute "ispc --help" and parse supported archs execute_process(COMMAND ${ISPC_EXECUTABLE} "--help" diff --git a/cmake/compiler/msvc.cmake b/cmake/compiler/msvc.cmake index 1fd89cfb0..d0882f374 100644 --- a/cmake/compiler/msvc.cmake +++ b/cmake/compiler/msvc.cmake @@ -3,7 +3,8 @@ set(COMMON_CXX_FLAGS "/EHsc /MP /GR /bigobj") if (MSVC_VERSION GREATER_EQUAL 1914) - string(APPEND COMMON_CXX_FLAGS " /Zc:__cplusplus") + # defined __cplusplus messes with ISPC alignment macro, so we define it here as well + string(APPEND COMMON_CXX_FLAGS " /Zc:__cplusplus /D\"__ISPC_ALIGNED_STRUCT__(s)=struct __ISPC_ALIGN__(s)\"") endif() set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}") diff --git a/cmake/ospray_cmake_config/osprayConfig.cmake.in b/cmake/ospray_cmake_config/osprayConfig.cmake.in index d6be1b313..93bcce539 100644 --- a/cmake/ospray_cmake_config/osprayConfig.cmake.in +++ b/cmake/ospray_cmake_config/osprayConfig.cmake.in @@ -200,6 +200,9 @@ set_target_properties(ospray::ospray_module_cpu PROPERTIES if (MSVC AND (MSVC_VERSION GREATER_EQUAL 1914)) set_property(TARGET ospray::ospray APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "$<$:/Zc:__cplusplus>") + # defined __cplusplus messes with ISPC alignment macro, so we define it here as well + set_property(TARGET ospray::ospray APPEND PROPERTY + INTERFACE_COMPILE_OPTIONS "$<$:/D\"__ISPC_ALIGNED_STRUCT__(s)=struct __ISPC_ALIGN__(s)\">") endif() # Reset CMake module path to its state when this script was called. diff --git a/cmake/ospray_options.cmake b/cmake/ospray_options.cmake index cae4c0fce..154826253 100644 --- a/cmake/ospray_options.cmake +++ b/cmake/ospray_options.cmake @@ -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(RKCOMMON_VERSION_REQUIRED 1.14.2) +set(ISPC_VERSION_REQUIRED 1.30.0) +set(RKCOMMON_VERSION_REQUIRED 1.15.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 6ded5230d043aa32c755e65c910c2af5002fb9f9) # v1.92.6 set(OSPRAY_STB_GIT_TAG 013ac3beddff3dbffafd5177e7972067cd2b5083) # v2.30 / v1.16 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) diff --git a/cmake/ospray_redistribute_deps.cmake b/cmake/ospray_redistribute_deps.cmake index f90cd0858..361345392 100644 --- a/cmake/ospray_redistribute_deps.cmake +++ b/cmake/ospray_redistribute_deps.cmake @@ -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() diff --git a/doc/compilation.md b/doc/compilation.md index 8f6a5c0e8..39520f2ad 100644 --- a/doc/compilation.md +++ b/doc/compilation.md @@ -91,7 +91,7 @@ Finding an OSPRay Install with CMake Client applications using OSPRay can find it with CMake's `find_package()` command. For example, - find_package(ospray 3.0.0 REQUIRED) + find_package(ospray 3.3.0 REQUIRED) finds OSPRay via OSPRay's configuration file `osprayConfig.cmake`^[This file is usually in diff --git a/doc/prerequisites.md b/doc/prerequisites.md index 400cd2e7f..bf9393ebe 100644 --- a/doc/prerequisites.md +++ b/doc/prerequisites.md @@ -15,13 +15,14 @@ before you can build OSPRay you need the following prerequisites: git clone https://github.com/RenderKit/ospray.git -- To build OSPRay you need [CMake](http://www.cmake.org), any form of +- To build OSPRay you need [CMake](http://www.cmake.org) version 3.10 + or higher, any form of C++11 compiler (we recommend using GCC, but also support Clang, MSVC, and [Intel® C++ Compiler (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.30.0 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 diff --git a/modules/cpu/CMakeLists.txt b/modules/cpu/CMakeLists.txt index 579219719..7df9c4ace 100644 --- a/modules/cpu/CMakeLists.txt +++ b/modules/cpu/CMakeLists.txt @@ -404,6 +404,7 @@ endif() if (OSPRAY_MODULE_GPU) + message("************* GPU *********************") if (WIN32) cmake_minimum_required(VERSION 3.25) else() @@ -472,8 +473,8 @@ if (OSPRAY_MODULE_GPU) varying= unmasked= export= - rtcIntersectV=rtcIntersect1 - rtcOccludedV=rtcOccluded1 + rtcTraversableIntersectV=rtcTraversableIntersect1 + rtcTraversableOccludedV=rtcTraversableOccluded1 rtcInterpolateV1=rtcInterpolate1 vklComputeSampleV=vklComputeSample vklComputeGradientV=vklComputeGradient diff --git a/modules/cpu/camera/Camera.cpp b/modules/cpu/camera/Camera.cpp index 707187811..9a2448053 100644 --- a/modules/cpu/camera/Camera.cpp +++ b/modules/cpu/camera/Camera.cpp @@ -57,15 +57,17 @@ void Camera::commit() embreeGeometry = rtcNewGeometry( getISPCDevice().getEmbreeDevice(), RTC_GEOMETRY_TYPE_INSTANCE); embreeScene = rtcNewScene(getISPCDevice().getEmbreeDevice()); + rtcSetGeometryInstancedScene(embreeGeometry, embreeScene); // dummy rtcAttachGeometryByID(embreeScene, embreeGeometry, 0); } motionTransform.setEmbreeTransform(embreeGeometry); + rtcCommitScene(embreeScene); + getSh()->traversable = rtcGetSceneTraversable(embreeScene); if (shutter.lower == shutter.upper || !motionTransform.motionBlur) { // directly interpolate to single shutter time - rtcGetGeometryTransformFromScene(embreeScene, - 0, + rtcGetGeometryTransform(embreeGeometry, shutter.lower, RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &motionTransform.transform); @@ -76,8 +78,7 @@ void Camera::commit() if (motionTransform.motionBlur) { // use main direction at center of shutter time affine3f middleTransform; - rtcGetGeometryTransformFromScene(embreeScene, - 0, + rtcGetGeometryTransform(embreeGeometry, shutter.center(), RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &middleTransform); @@ -109,7 +110,6 @@ void Camera::commit() getSh()->subImage.upper = imageEnd; getSh()->shutter = shutter; getSh()->motionBlur = motionTransform.motionBlur; - getSh()->scene = embreeScene; getSh()->globalShutter = shutterType == OSP_SHUTTER_GLOBAL; getSh()->rollingShutterHorizontal = (shutterType == OSP_SHUTTER_ROLLING_RIGHT || shutterType == OSP_SHUTTER_ROLLING_LEFT); diff --git a/modules/cpu/camera/CameraShared.h b/modules/cpu/camera/CameraShared.h index c51c2540b..b8aebed65 100644 --- a/modules/cpu/camera/CameraShared.h +++ b/modules/cpu/camera/CameraShared.h @@ -47,7 +47,7 @@ struct Camera bool needTimeSample; bool rollingShutterHorizontal; float rollingShutterDuration; - RTCScene scene; // only to call rtcGetGeometryTransformFromScene + RTCTraversable traversable; // only for rtcGetGeometryTransformFromTraversable #ifdef __cplusplus Camera() @@ -62,7 +62,7 @@ struct Camera needTimeSample(false), rollingShutterHorizontal(false), rollingShutterDuration(0.f), - scene(nullptr) + traversable(nullptr) {} }; } // namespace ispc diff --git a/modules/cpu/camera/OrthographicCamera.ispc b/modules/cpu/camera/OrthographicCamera.ispc index 9d6ce986f..376ad44df 100644 --- a/modules/cpu/camera/OrthographicCamera.ispc +++ b/modules/cpu/camera/OrthographicCamera.ispc @@ -28,8 +28,11 @@ SYCL_EXTERNAL void OrthographicCamera_initRay(const Camera *uniform _self, const uniform FeatureFlagsOther ffo = getFeatureFlagsOther(ffh); if (self->super.motionBlur && (ffo & FFO_CAMERA_MOTION_BLUR)) { AffineSpace3f xfm; - rtcGetGeometryTransformFromScene( - self->super.scene, 0, time, RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &xfm); + rtcGetGeometryTransformFromTraversable(self->super.traversable, + 0, + time, + RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, + &xfm); // we cannot just transform the final org & dir, because interpolated // transforms can scale (even if original transforms are without scale) diff --git a/modules/cpu/camera/PanoramicCamera.ispc b/modules/cpu/camera/PanoramicCamera.ispc index f12f6b85e..f4065a553 100644 --- a/modules/cpu/camera/PanoramicCamera.ispc +++ b/modules/cpu/camera/PanoramicCamera.ispc @@ -65,8 +65,11 @@ SYCL_EXTERNAL void PanoramicCamera_initRay(const Camera *uniform _self, const uniform FeatureFlagsOther ffo = getFeatureFlagsOther(ffh); if (self->super.motionBlur && (ffo & FFO_CAMERA_MOTION_BLUR)) { AffineSpace3f xfm; - rtcGetGeometryTransformFromScene( - self->super.scene, 0, time, RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &xfm); + rtcGetGeometryTransformFromTraversable(self->super.traversable, + 0, + time, + RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, + &xfm); // we cannot just transform the final org & dir, because interpolated // transforms can scale (even if original transforms are without scale) diff --git a/modules/cpu/camera/PerspectiveCamera.ispc b/modules/cpu/camera/PerspectiveCamera.ispc index 1287a5438..013ea5a32 100644 --- a/modules/cpu/camera/PerspectiveCamera.ispc +++ b/modules/cpu/camera/PerspectiveCamera.ispc @@ -89,8 +89,8 @@ SYCL_EXTERNAL void PerspectiveCamera_initRayMB(const Camera *uniform _self, const float time = Camera_shutterTime(_self, screen, sample.time); AffineSpace3f xfm; - rtcGetGeometryTransformFromScene( - self->super.scene, 0, time, RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &xfm); + rtcGetGeometryTransformFromTraversable( + self->super.traversable, 0, time, RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &xfm); vec3f org = xfmPoint(xfm, self->org); vec3f dir = normalize(xfmVector(xfm, self->dir_00)); diff --git a/modules/cpu/common/DeviceRTImpl_ispc.cpp b/modules/cpu/common/DeviceRTImpl_ispc.cpp index 0423091cd..b2b077a9c 100644 --- a/modules/cpu/common/DeviceRTImpl_ispc.cpp +++ b/modules/cpu/common/DeviceRTImpl_ispc.cpp @@ -381,6 +381,31 @@ void *DeviceImpl::getSyclQueuePtr() // SYCL not used return nullptr; } +void *DeviceImpl::createImageMemHandle(void **hostData, + const size_t width, + const size_t height, + const unsigned int numLevels, + const OSPTextureFormat format) +{ + std::cout<<"Using DeviceImpl in DeviceRTImpl_ispc.cpp"<() << " device (provided externally)"; } +DeviceImpl::~DeviceImpl() +{ + + for (auto &entry : imageMemCache) + syclexp::free_image_mem(entry.second.memHandle, syclexp::image_type::standard, queue); + imageMemCache.clear(); + for (auto &h : sampledHandleCache) + syclexp::destroy_image_handle(h, queue); + sampledHandleCache.clear(); +} void *DeviceImpl::deviceMalloc(std::size_t size) { return sycl::malloc_device(size, queue); @@ -213,5 +223,177 @@ void *DeviceImpl::getSyclQueuePtr() return &queue; } +void *DeviceImpl::createImageMemHandle(void **hostData, + const size_t width, + const size_t height, + const unsigned int numLevels, + const OSPTextureFormat format) +{ + // std::cout << "DeviceRTImpl_sycl::createImageMemHandle(" + // << "width=" << width << ", height=" << height + // << ", numLevels=" << numLevels << ", format=" << format + // << ")" << std::endl; + if (!hostData) { + std::cerr << "ERROR: createImageMemHandle hostData is null" << std::endl; + return nullptr; + } + for (unsigned int i = 0; i < numLevels; ++i) { + if (!hostData[i]) { + std::cerr << "ERROR: hostData[" << i << "] is null" << std::endl; + return nullptr; + } + } + + // Determine number of channels and channel data type based on the texture format + size_t numChannels = 0; + sycl::image_channel_type channelType; + + switch (format) { + case OSP_TEXTURE_RGBA8: + case OSP_TEXTURE_SRGBA: + numChannels = 4; + channelType = sycl::image_channel_type::unorm_int8; + break; + case OSP_TEXTURE_RGBA32F: + numChannels = 4; + channelType = sycl::image_channel_type::fp32; + break; + case OSP_TEXTURE_RGBA16: + numChannels = 4; + channelType = sycl::image_channel_type::unorm_int16; + break; + case OSP_TEXTURE_RGBA16F: + numChannels = 4; + channelType = sycl::image_channel_type::fp16; + break; + case OSP_TEXTURE_RGB8: + case OSP_TEXTURE_SRGB: + numChannels = 3; + channelType = sycl::image_channel_type::unorm_int8; + break; + case OSP_TEXTURE_RGB32F: + numChannels = 3; + channelType = sycl::image_channel_type::fp32; + break; + case OSP_TEXTURE_RGB16: + numChannels = 3; + channelType = sycl::image_channel_type::unorm_int16; + break; + case OSP_TEXTURE_RGB16F: + numChannels = 3; + channelType = sycl::image_channel_type::fp16; + break; + case OSP_TEXTURE_RA8: + case OSP_TEXTURE_LA8: + numChannels = 2; + channelType = sycl::image_channel_type::unorm_int8; + break; + case OSP_TEXTURE_RA32F: + numChannels = 2; + channelType = sycl::image_channel_type::fp32; + break; + case OSP_TEXTURE_RA16: + numChannels = 2; + channelType = sycl::image_channel_type::unorm_int16; + break; + case OSP_TEXTURE_RA16F: + numChannels = 2; + channelType = sycl::image_channel_type::fp16; + break; + case OSP_TEXTURE_R8: + case OSP_TEXTURE_L8: + numChannels = 1; + channelType = sycl::image_channel_type::unorm_int8; + break; + case OSP_TEXTURE_R32F: + numChannels = 1; + channelType = sycl::image_channel_type::fp32; + break; + case OSP_TEXTURE_R16: + numChannels = 1; + channelType = sycl::image_channel_type::unorm_int16; + break; + case OSP_TEXTURE_R16F: + numChannels = 1; + channelType = sycl::image_channel_type::fp16; + break; + default: + throw std::runtime_error("Unsupported texture format for bindless images"); + } + // Construct the image descriptor. + syclexp::image_descriptor imgDesc( + {width, height}, + numChannels, + channelType, + syclexp::image_type::standard); + + syclexp::image_mem_handle memHandle = syclexp::alloc_image_mem(imgDesc, queue); + queue.ext_oneapi_copy(hostData[0], memHandle, imgDesc); + + ImageMemEntry imgMemEntry; + imgMemEntry.desc = imgDesc; + imgMemEntry.memHandle = memHandle; + imageMemCache[(void*)memHandle.raw_handle] = imgMemEntry; + queue.wait_and_throw(); + return (void*)memHandle.raw_handle; +} + +void DeviceImpl::freeImageMemHandle(void *handle) +{ + syclexp::image_mem_handle memHandle; + memHandle.raw_handle = (syclexp::sampled_image_handle::raw_image_handle_type)handle; + syclexp::free_image_mem(memHandle, syclexp::image_type::standard, queue); + imageMemCache.erase(handle); +} + +void *DeviceImpl::createSampledImageHandle( + void *imgMemHandlePtr, const OSPTextureFilter filter, const vec2ui wrapMode) +{ + //std::cout<<"createSampledImageHandle "<(32), + 0.f); + //Get the image descriptor for this image handle + syclexp::image_descriptor imgDesc = imageMemCache[imgMemHandlePtr].desc; + //Rebuild the image handle from the pointer + syclexp::image_mem_handle memHandle; + memHandle.raw_handle = (syclexp::sampled_image_handle::raw_image_handle_type)imgMemHandlePtr; + + syclexp::sampled_image_handle sampledHandle = + syclexp::create_image(memHandle, sampler, imgDesc, queue); + sampledHandleCache.push_back(sampledHandle); + return reinterpret_cast(sampledHandle.raw_handle); +} + +void DeviceImpl::freeSampledImageHandle(void *handle) { + syclexp::sampled_image_handle sampledHandle; + sampledHandle.raw_handle = reinterpret_cast(handle); + syclexp::destroy_image_handle(sampledHandle, queue); +} + } // namespace devicert } // namespace ospray diff --git a/modules/cpu/common/DeviceRTImpl_sycl.h b/modules/cpu/common/DeviceRTImpl_sycl.h index 95b6b1de5..6b0068dcc 100644 --- a/modules/cpu/common/DeviceRTImpl_sycl.h +++ b/modules/cpu/common/DeviceRTImpl_sycl.h @@ -6,7 +6,7 @@ #include "common/DeviceRT.h" #include - +namespace syclexp = sycl::ext::oneapi::experimental; namespace ospray { namespace devicert { @@ -43,6 +43,7 @@ struct OSPRAY_SDK_INTERFACE DeviceImpl : public Device DeviceImpl(bool debug); DeviceImpl(uint32_t deviceId, bool debug); DeviceImpl(void *devicePtr, void *contextPtr, bool debug); + ~DeviceImpl(); // Allocate device memory void *deviceMalloc(std::size_t size) override; @@ -89,7 +90,28 @@ struct OSPRAY_SDK_INTERFACE DeviceImpl : public Device void *getSyclContextPtr() override; void *getSyclQueuePtr() override; + void *createImageMemHandle(void ** hostData, + const size_t width, + const size_t height, + const unsigned int numLevels, + const OSPTextureFormat format) override; + + void freeImageMemHandle(void *handle) override; + + void *createSampledImageHandle(void *imgMemHandle, + const OSPTextureFilter filter, + const vec2ui wrapMode) override; + + void freeSampledImageHandle(void *handle) override; + private: + + struct ImageMemEntry { + syclexp::image_mem_handle memHandle; + syclexp::image_descriptor desc; + }; + std::unordered_map imageMemCache; + std::vector sampledHandleCache; sycl::device device; sycl::context context; sycl::queue queue; diff --git a/modules/cpu/common/Instance.cpp b/modules/cpu/common/Instance.cpp index e2afb7707..d4ed49fe8 100644 --- a/modules/cpu/common/Instance.cpp +++ b/modules/cpu/common/Instance.cpp @@ -55,11 +55,9 @@ void Instance::setEmbreeGeom(RTCScene scene, unsigned int geomID) { RTCGeometry geom = rtcGetGeometry(scene, geomID); motionTransform.setEmbreeTransform(geom); - getSh()->scene = scene; getSh()->geomID = geomID; if (getSh()->motionBlur) { - rtcGetGeometryTransformFromScene(scene, - geomID, + rtcGetGeometryTransform(geom, .5f, RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &getSh()->xfm); // for SciVis diff --git a/modules/cpu/common/Instance.h b/modules/cpu/common/Instance.h index 155906e76..bb0692437 100644 --- a/modules/cpu/common/Instance.h +++ b/modules/cpu/common/Instance.h @@ -24,6 +24,10 @@ struct OSPRAY_SDK_INTERFACE Instance box3f getBounds() const override; void setEmbreeGeom(RTCScene scene, unsigned int geomID); + void setEmbreeGeom(RTCTraversable traversable) + { + getSh()->traversable = traversable; + } Ref group; const Ref groupAPI; diff --git a/modules/cpu/common/Instance.ih b/modules/cpu/common/Instance.ih index dd7fa247a..0c0cbf0b1 100644 --- a/modules/cpu/common/Instance.ih +++ b/modules/cpu/common/Instance.ih @@ -23,8 +23,11 @@ inline uniform AffineSpace3f Instance_getTransform( const Instance *uniform self, const uniform float time) { uniform AffineSpace3f xfm; - rtcGetGeometryTransformFromScene( - self->scene, self->geomID, time, RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &xfm); + rtcGetGeometryTransformFromTraversable(self->traversable, + self->geomID, + time, + RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, + &xfm); return xfm; } @@ -34,8 +37,11 @@ inline AffineSpace3f Instance_getTransform( const Instance *uniform self, const float time) { AffineSpace3f xfm; - rtcGetGeometryTransformFromScene( - self->scene, self->geomID, time, RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, &xfm); + rtcGetGeometryTransformFromTraversable(self->traversable, + self->geomID, + time, + RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR, + &xfm); return xfm; } diff --git a/modules/cpu/common/InstanceShared.h b/modules/cpu/common/InstanceShared.h index 1912c7ad8..775bbca82 100644 --- a/modules/cpu/common/InstanceShared.h +++ b/modules/cpu/common/InstanceShared.h @@ -13,8 +13,8 @@ struct Instance { Group *group; - // Scene and geomID are used to call rtcGetGeometryTransformFromScene only - RTCScene scene; + // traversable and geomID are only for rtcGetGeometryTransformFromTraversable + RTCTraversable traversable; unsigned int geomID; AffineSpace3f xfm; @@ -26,7 +26,7 @@ struct Instance #ifdef __cplusplus Instance() : group(nullptr), - scene(nullptr), + traversable(nullptr), geomID(0), xfm(one), rcp_xfm(one), diff --git a/modules/cpu/common/World.cpp b/modules/cpu/common/World.cpp index 8af457bf8..66494e34a 100644 --- a/modules/cpu/common/World.cpp +++ b/modules/cpu/common/World.cpp @@ -47,12 +47,12 @@ static void freeAndNullifyEmbreeScene(RTCScene &scene) World::~World() { // Release Embree scenes - freeAndNullifyEmbreeScene(getSh()->embreeSceneHandleGeometries); + freeAndNullifyEmbreeScene(embreeSceneHandleGeometries); #ifdef OSPRAY_ENABLE_VOLUMES - freeAndNullifyEmbreeScene(getSh()->embreeSceneHandleVolumes); + freeAndNullifyEmbreeScene(embreeSceneHandleVolumes); #endif #ifndef OSPRAY_TARGET_SYCL - freeAndNullifyEmbreeScene(getSh()->embreeSceneHandleClippers); + freeAndNullifyEmbreeScene(embreeSceneHandleClippers); #endif } @@ -69,19 +69,14 @@ std::string World::toString() const void World::commit() { - RTCScene &esGeom = getSh()->embreeSceneHandleGeometries; -#ifdef OSPRAY_ENABLE_VOLUMES - RTCScene &esVol = getSh()->embreeSceneHandleVolumes; -#endif -#ifndef OSPRAY_TARGET_SYCL - RTCScene &esClip = getSh()->embreeSceneHandleClippers; -#endif - + RTCScene &esGeom = embreeSceneHandleGeometries; freeAndNullifyEmbreeScene(esGeom); #ifdef OSPRAY_ENABLE_VOLUMES + RTCScene &esVol = embreeSceneHandleVolumes; freeAndNullifyEmbreeScene(esVol); #endif #ifndef OSPRAY_TARGET_SYCL + RTCScene &esClip = embreeSceneHandleClippers; freeAndNullifyEmbreeScene(esClip); #endif @@ -114,18 +109,13 @@ void World::commit() RTCDevice embreeDevice = getISPCDevice().getEmbreeDevice(); if (instances) { - for (auto &&inst : *instances) -#ifndef OSPRAY_TARGET_SYCL - if (inst->group->sceneClippers) - getSh()->numInvertedClippers += inst->group->numInvertedClippers; -#endif - // Create shared buffers for instance pointers instanceArray = devicert::make_buffer_shared_unique( getISPCDevice().getDRTDevice(), sizeof(ispc::Instance *) * numInstances); getSh()->instances = instanceArray->sharedPtr(); + // Phase 1 // Populate shared buffer with instance pointers, // create Embree instances featureFlags.reset(); @@ -144,6 +134,7 @@ void World::commit() #endif #ifndef OSPRAY_TARGET_SYCL if (inst->group->sceneClippers) { + getSh()->numInvertedClippers += inst->group->numInvertedClippers; addGeometryInstance( esClip, inst->group->sceneClippers, inst, embreeDevice, id); } @@ -168,12 +159,14 @@ void World::commit() rtcSetSceneFlags(esGeom, static_cast(sceneFlags)); rtcSetSceneBuildQuality(esGeom, buildQuality); rtcCommitScene(esGeom); + getSh()->embreeTraversableHandleGeometries = rtcGetSceneTraversable(esGeom); } #ifdef OSPRAY_ENABLE_VOLUMES if (esVol) { rtcSetSceneFlags(esVol, static_cast(sceneFlags)); rtcSetSceneBuildQuality(esVol, buildQuality); rtcCommitScene(esVol); + getSh()->embreeTraversableHandleVolumes = rtcGetSceneTraversable(esVol); } #endif #ifndef OSPRAY_TARGET_SYCL @@ -183,8 +176,27 @@ void World::commit() sceneFlags | RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS)); rtcSetSceneBuildQuality(esClip, buildQuality); rtcCommitScene(esClip); + getSh()->embreeTraversableHandleClippers = rtcGetSceneTraversable(esClip); } #endif + + if (instances) { + // Phase 2: set traversable at instances + // Note: the same instance transform is set in each scene, the instance + // only needs to access one for interpolation (thus fine to overwrite) + for (auto &&inst : *instances) { + if (inst->group->sceneGeometries) + inst->setEmbreeGeom(getSh()->embreeTraversableHandleGeometries); +#ifdef OSPRAY_ENABLE_VOLUMES + if (inst->group->sceneVolumes) + inst->setEmbreeGeom(getSh()->embreeTraversableHandleVolumes); +#endif +#ifndef OSPRAY_TARGET_SYCL + if (inst->group->sceneClippers) + inst->setEmbreeGeom(getSh()->embreeTraversableHandleClippers); +#endif + } + } } box3f World::getBounds() const @@ -192,15 +204,14 @@ box3f World::getBounds() const box3f sceneBounds; box4f bounds; // NOTE(jda) - Embree expects box4f, NOT box3f... - if (getSh()->embreeSceneHandleGeometries) { - rtcGetSceneBounds( - getSh()->embreeSceneHandleGeometries, (RTCBounds *)&bounds); + if (embreeSceneHandleGeometries) { + rtcGetSceneBounds(embreeSceneHandleGeometries, (RTCBounds *)&bounds); sceneBounds.extend(box3f(vec3f(&bounds.lower[0]), vec3f(&bounds.upper[0]))); } #ifdef OSPRAY_ENABLE_VOLUMES - if (getSh()->embreeSceneHandleVolumes) { - rtcGetSceneBounds(getSh()->embreeSceneHandleVolumes, (RTCBounds *)&bounds); + if (embreeSceneHandleVolumes) { + rtcGetSceneBounds(embreeSceneHandleVolumes, (RTCBounds *)&bounds); sceneBounds.extend(box3f(vec3f(&bounds.lower[0]), vec3f(&bounds.upper[0]))); } #endif diff --git a/modules/cpu/common/World.h b/modules/cpu/common/World.h index 848e74917..e4fca7907 100644 --- a/modules/cpu/common/World.h +++ b/modules/cpu/common/World.h @@ -34,6 +34,14 @@ struct OSPRAY_SDK_INTERFACE World // Data members // + RTCScene embreeSceneHandleGeometries{nullptr}; +#ifdef OSPRAY_ENABLE_VOLUMES + RTCScene embreeSceneHandleVolumes{nullptr}; +#endif +#ifndef OSPRAY_TARGET_SYCL + RTCScene embreeSceneHandleClippers{nullptr}; +#endif + Ref> instances; Ref> lights; diff --git a/modules/cpu/common/World.ih b/modules/cpu/common/World.ih index 3ebbb15b4..f9dcc3dce 100644 --- a/modules/cpu/common/World.ih +++ b/modules/cpu/common/World.ih @@ -31,7 +31,7 @@ inline void traceGeometryRay(const World *uniform world, const uniform FeatureFlagsHandler &ffh) { // Skip if no geometries scene - if (!world->embreeSceneHandleGeometries) + if (!world->embreeTraversableHandleGeometries) return; const uniform FeatureFlags ff = getFeatureFlags(ffh); @@ -46,7 +46,7 @@ inline void traceGeometryRay(const World *uniform world, intersectArgs.feature_mask = (uniform RTCFeatureFlags)( (ff.geometry & ~FFG_OSPRAY_MASK) | RTC_FEATURE_FLAG_INSTANCE); - rtcIntersectV(world->embreeSceneHandleGeometries, + rtcTraversableIntersectV(world->embreeTraversableHandleGeometries, (varying RTCRayHit * uniform) & ray, &intersectArgs); } @@ -56,7 +56,7 @@ inline void traceVolumeRay( const World *uniform world, varying Ray &ray, VolumeInterval &interval) { initVolumeInterval(interval); - if (!world->embreeSceneHandleVolumes) + if (!world->embreeTraversableHandleVolumes) return; VolumeIntervals intervals; @@ -80,7 +80,7 @@ inline void traceVolumeRay( intersectArgs.feature_mask = RTC_FEATURE_FLAG_INSTANCE | RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_ARGUMENTS; - rtcIntersectV(world->embreeSceneHandleVolumes, + rtcTraversableIntersectV(world->embreeTraversableHandleVolumes, (varying RTCRayHit * uniform) & ray, &intersectArgs); @@ -101,7 +101,7 @@ inline void traceVolumeRay( inline void traceVolumeRay( const World *uniform world, varying Ray &ray, VolumeIntervals &intervals) { - if (!world->embreeSceneHandleVolumes) + if (!world->embreeTraversableHandleVolumes) return; uniform RayQueryContextVolume context; @@ -114,7 +114,7 @@ inline void traceVolumeRay( intersectArgs.feature_mask = RTC_FEATURE_FLAG_INSTANCE | RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_ARGUMENTS; - rtcIntersectV(world->embreeSceneHandleVolumes, + rtcTraversableIntersectV(world->embreeTraversableHandleVolumes, (varying RTCRayHit * uniform) & ray, &intersectArgs); @@ -156,7 +156,7 @@ inline void traceClippingRay(const World *uniform world, return; #else // A scene with clipping geometries has to exist - if (!world->embreeSceneHandleClippers) { + if (!world->embreeTraversableHandleClippers) { rayIntervals.intervals[0] = make_box1f(ray.t0, ray.t); rayIntervals.count = 1; return; @@ -184,7 +184,7 @@ inline void traceClippingRay(const World *uniform world, // even distant intersections affect visibility of close objects float origT = ray.t; ray.t = inf; - rtcIntersectV(world->embreeSceneHandleClippers, + rtcTraversableIntersectV(world->embreeTraversableHandleClippers, (varying RTCRayHit * uniform) & ray, &intersectArgs); ray.t = origT; @@ -294,7 +294,7 @@ inline void traceRay(const World *uniform world, traceGeometryRay(world, ray, ffh); #else // Fast path if no clipping geometry - if (!world->embreeSceneHandleClippers) { + if (!world->embreeTraversableHandleClippers) { traceGeometryRay(world, ray, ffh); return; } @@ -313,7 +313,7 @@ inline bool isOccludedNoClipping(const World *uniform world, const uniform FeatureFlagsHandler &ffh) { // Skip if no geometries scene - if (!world->embreeSceneHandleGeometries) + if (!world->embreeTraversableHandleGeometries) return false; const uniform FeatureFlags ff = getFeatureFlags(ffh); @@ -327,7 +327,7 @@ inline bool isOccludedNoClipping(const World *uniform world, occludedArgs.feature_mask = (uniform RTCFeatureFlags)( (ff.geometry & ~FFG_OSPRAY_MASK) | RTC_FEATURE_FLAG_INSTANCE); - rtcOccludedV(world->embreeSceneHandleGeometries, + rtcTraversableOccludedV(world->embreeTraversableHandleGeometries, (varying RTCRay * uniform) & ray, &occludedArgs); @@ -363,7 +363,7 @@ inline bool isOccluded(const World *uniform world, return isOccludedNoClipping(world, ray, ffh); #else // Fast path if no clipping geometry - if (!world->embreeSceneHandleClippers) { + if (!world->embreeTraversableHandleClippers) { return isOccludedNoClipping(world, ray, ffh); } diff --git a/modules/cpu/common/WorldShared.h b/modules/cpu/common/WorldShared.h index 8531e1c36..7f8707c1a 100644 --- a/modules/cpu/common/WorldShared.h +++ b/modules/cpu/common/WorldShared.h @@ -17,12 +17,12 @@ struct World Instance **instances; int32 numInvertedClippers; - RTCScene embreeSceneHandleGeometries; + RTCTraversable embreeTraversableHandleGeometries; #ifdef OSPRAY_ENABLE_VOLUMES - RTCScene embreeSceneHandleVolumes; + RTCTraversable embreeTraversableHandleVolumes; #endif #ifndef OSPRAY_TARGET_SYCL - RTCScene embreeSceneHandleClippers; + RTCTraversable embreeTraversableHandleClippers; #endif SciVisData *scivisData; @@ -32,12 +32,12 @@ struct World World() : instances(nullptr), numInvertedClippers(0), - embreeSceneHandleGeometries(nullptr), + embreeTraversableHandleGeometries(nullptr), #ifdef OSPRAY_ENABLE_VOLUMES - embreeSceneHandleVolumes(nullptr), + embreeTraversableHandleVolumes(nullptr), #endif #ifndef OSPRAY_TARGET_SYCL - embreeSceneHandleClippers(nullptr), + embreeTraversableHandleClippers(nullptr), #endif scivisData(nullptr), pathtracerData(nullptr) diff --git a/modules/cpu/texture/Texture2D.cpp b/modules/cpu/texture/Texture2D.cpp index 655014139..280046125 100644 --- a/modules/cpu/texture/Texture2D.cpp +++ b/modules/cpu/texture/Texture2D.cpp @@ -45,8 +45,10 @@ Texture2D::~Texture2D() // If no one else is referencing the MIP map buffer (just this object and the // cache map), we need to remove it from the MIP map cache so the buffer will // be deleted as well +#ifndef OSPRAY_TARGET_SYCL if (mipMapData && mipMapData.use_count() == 2) getISPCDevice().getMipMapCache().remove(texData->data()); +#endif } std::string Texture2D::toString() const @@ -56,6 +58,7 @@ std::string Texture2D::toString() const void Texture2D::commit() { + std::cout<<"Texture2D::commit()"<("data"); if (!texData || texData->numItems.z > 1) { @@ -141,6 +144,25 @@ void Texture2D::commit() // Initialize ispc shared structure getSh()->set( size, dataPtr.data(), dataPtr.size() - 1, format, filter, wrapMode); + + + // Create bindless image handle for GPU path (single level for now) + size_t levelWidth = size.x; + size_t levelHeight = size.y; + const unsigned int numLevels = static_cast(dataPtr.size()); + for (unsigned int i = 0; i < numLevels; ++i) { + void *imgMemHandle = getISPCDevice().getDRTDevice().createImageMemHandle(&dataPtr[i], levelWidth, levelHeight, 1, format); + if (imgMemHandle) { + void *sampledHandle = getISPCDevice().getDRTDevice().createSampledImageHandle(imgMemHandle, filter, wrapMode); + if (sampledHandle){ + getSh()->data[i] = sampledHandle; + } + + } + levelWidth = std::max(levelWidth / 2, size_t(1)); + levelHeight = std::max(levelHeight / 2, size_t(1)); + } + } } // namespace ospray diff --git a/modules/cpu/texture/Texture2D.ispc b/modules/cpu/texture/Texture2D.ispc index c183a6fab..c278fac30 100644 --- a/modules/cpu/texture/Texture2D.ispc +++ b/modules/cpu/texture/Texture2D.ispc @@ -5,7 +5,10 @@ #include "Texture2DFormats.ih" OSPRAY_BEGIN_ISPC_NAMESPACE - +#ifdef OSPRAY_TARGET_SYCL +using half = sycl::half; +namespace syclexp = sycl::ext::oneapi::experimental; +#endif // TODO tiling // Texture coordinate utilities @@ -132,10 +135,55 @@ inline vec4f Texture2D_bilinear_l( const Vec4fPack vp = Texture2D_getTexel4(self->format, data, idx); return bilerp(cs.frac, vp.v1, vp.v2, vp.v3, vp.v4); } +#ifdef OSPRAY_TARGET_SYCL +inline sycl::float4 fixChannelFormat(sycl::float4 s, OSPTextureFormat format) { + if (format == OSP_TEXTURE_R8 || format == OSP_TEXTURE_L8 + || format == OSP_TEXTURE_R32F || format == OSP_TEXTURE_R16 + || format == OSP_TEXTURE_R16F) { + return sycl::float4(s.x(), s.x(), s.x(), 1.f); + } else if (format == OSP_TEXTURE_RA8 || format == OSP_TEXTURE_LA8 + || format == OSP_TEXTURE_RA16 || format == OSP_TEXTURE_RA32F + || format == OSP_TEXTURE_RA16F) { + return sycl::float4(s.x(), s.x(), s.x(), s.y()); + } + return s; +} +#endif SYCL_EXTERNAL __noinline vec4f Texture2D_get( const Texture2D *uniform self, const vec2f &st, const float pixelFootprint) { + #ifdef OSPRAY_TARGET_SYCL + const bool filter_nearest = self->filter & OSP_TEXTURE_FILTER_NEAREST; + int level0 = 0; + int level1 = 0; + float frac = 0.f; + + if (self->maxLevel) { + const float lambda = max(0.f, calcLambda(pixelFootprint, self->size, filter_nearest)); + level0 = min((int)lambda, self->maxLevel - 1); + level1 = min(level0 + 1, self->maxLevel); + frac = min(lambda - (float)level0, 1.f); + } + + syclexp::sampled_image_handle handle0( + (syclexp::sampled_image_handle::raw_image_handle_type)self->data[level0]); + sycl::float4 s0 = syclexp::sample_image( + handle0, sycl::float2{st.x, st.y}); + s0 = fixChannelFormat(s0, self->format); + + if (frac == 0.f) + return make_vec4f(s0.x(), s0.y(), s0.z(), s0.w()); + + syclexp::sampled_image_handle handle1( + (syclexp::sampled_image_handle::raw_image_handle_type)self->data[level1]); + sycl::float4 s1 = syclexp::sample_image( + handle1, sycl::float2{st.x, st.y}); + s1 = fixChannelFormat(s1, self->format); + + sycl::float4 res = s0 + frac * (s1 - s0); + return make_vec4f(res.x(), res.y(), res.z(), res.w()); +#else int mipLevel = 0; float frac = 0.f; const uniform bool filter_nearest = self->filter & OSP_TEXTURE_FILTER_NEAREST; @@ -145,15 +193,14 @@ SYCL_EXTERNAL __noinline vec4f Texture2D_get( mipLevel = min((int)lambda, self->maxLevel - 1); frac = min(lambda - mipLevel, 1.f); } - vec4f t0 = filter_nearest ? Texture2D_nearest_l(self, st, mipLevel) : Texture2D_bilinear_l(self, st, mipLevel); if (frac == 0.f) return t0; - vec4f t1 = filter_nearest ? Texture2D_nearest_l(self, st, mipLevel + 1) : Texture2D_bilinear_l(self, st, mipLevel + 1); return lerp(frac, t0, t1); +#endif } export void *uniform Texture2D_get_addr(const uniform uint32 type) diff --git a/modules/mpi/ospray/common/DistributedWorld.cpp b/modules/mpi/ospray/common/DistributedWorld.cpp index 43a64bf54..44bc4da07 100644 --- a/modules/mpi/ospray/common/DistributedWorld.cpp +++ b/modules/mpi/ospray/common/DistributedWorld.cpp @@ -59,19 +59,17 @@ void DistributedWorld::commit() // either for data-parallel rendering or to switch to replicated // rendering box3f localBounds; - if (getSh()->super.embreeSceneHandleGeometries) { + if (getSh()->super.embreeTraversableHandleGeometries) { box4f b; - rtcGetSceneBounds( - getSh()->super.embreeSceneHandleGeometries, (RTCBounds *)&b); + rtcGetSceneBounds(embreeSceneHandleGeometries, (RTCBounds *)&b); localBounds.extend(box3f(vec3f(b.lower.x, b.lower.y, b.lower.z), vec3f(b.upper.x, b.upper.y, b.upper.z))); } #ifdef OSPRAY_ENABLE_VOLUMES - if (getSh()->super.embreeSceneHandleVolumes) { + if (getSh()->super.embreeTraversableHandleVolumes) { box4f b; - rtcGetSceneBounds( - getSh()->super.embreeSceneHandleVolumes, (RTCBounds *)&b); + rtcGetSceneBounds(embreeSceneHandleVolumes, (RTCBounds *)&b); localBounds.extend(box3f(vec3f(b.lower.x, b.lower.y, b.lower.z), vec3f(b.upper.x, b.upper.y, b.upper.z))); } @@ -120,7 +118,7 @@ void DistributedWorld::commit() getSh()->localRegions = myRegions.data(); getSh()->numLocalRegions = myRegions.size(); getSh()->numRegions = allRegions.size(); - getSh()->regionScene = regionScene; + getSh()->regionTraversable = rtcGetSceneTraversable(regionScene); } void DistributedWorld::exchangeRegions() diff --git a/modules/mpi/ospray/common/DistributedWorldShared.h b/modules/mpi/ospray/common/DistributedWorldShared.h index 200b4f477..869808100 100644 --- a/modules/mpi/ospray/common/DistributedWorldShared.h +++ b/modules/mpi/ospray/common/DistributedWorldShared.h @@ -16,14 +16,14 @@ struct DistributedWorld box3f *localRegions; int numLocalRegions; int numRegions; - RTCScene regionScene; + RTCTraversable regionTraversable; #ifdef __cplusplus DistributedWorld() : localRegions(nullptr), numLocalRegions(0), numRegions(0), - regionScene(nullptr) + regionTraversable(nullptr) {} }; } // namespace ispc diff --git a/modules/mpi/ospray/render/distributed/DistributedRenderer.ispc b/modules/mpi/ospray/render/distributed/DistributedRenderer.ispc index 61d3c3454..34f05286e 100644 --- a/modules/mpi/ospray/render/distributed/DistributedRenderer.ispc +++ b/modules/mpi/ospray/render/distributed/DistributedRenderer.ispc @@ -163,7 +163,7 @@ task screenSample.ray.t = min(screenSample.ray.t, tMax); - if (world->regionScene) { + if (world->regionTraversable) { uniform RayQueryContextRegion context; rtcInitRayQueryContext(&context.ectx); context.ffh = &ffh; @@ -181,7 +181,7 @@ task | RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_ARGUMENTS); intersectArgs.context = &context.ectx; - rtcIntersectV(world->regionScene, + rtcTraversableIntersectV(world->regionTraversable, (varying RTCRayHit * uniform) & screenSample.ray, &intersectArgs); } diff --git a/modules/mpi/tutorials/GLFWDistribOSPRayWindow.cpp b/modules/mpi/tutorials/GLFWDistribOSPRayWindow.cpp index fbc77dfd5..86dffe9f9 100644 --- a/modules/mpi/tutorials/GLFWDistribOSPRayWindow.cpp +++ b/modules/mpi/tutorials/GLFWDistribOSPRayWindow.cpp @@ -4,6 +4,7 @@ #include "GLFWDistribOSPRayWindow.h" #include #include +#include #include #include #include "imgui.h" @@ -289,7 +290,7 @@ void GLFWDistribOSPRayWindow::motion(const vec2f &position) void GLFWDistribOSPRayWindow::display() { // clock used to compute frame rate - static auto displayStart = std::chrono::high_resolution_clock::now(); + static auto displayStart = std::chrono::steady_clock::now(); if (showUi && uiCallback) { ImGuiWindowFlags flags = ImGuiWindowFlags_AlwaysAutoResize; @@ -305,8 +306,8 @@ void GLFWDistribOSPRayWindow::display() static bool firstFrame = true; if (firstFrame || currentFrame.isReady()) { // display frame rate in window title - auto displayEnd = std::chrono::high_resolution_clock::now(); - auto durationMilliseconds = + const auto displayEnd = std::chrono::steady_clock::now(); + const auto durationMilliseconds = std::chrono::duration_cast( displayEnd - displayStart); @@ -331,7 +332,7 @@ void GLFWDistribOSPRayWindow::display() framebuffer.unmap(fb); // Start new frame and reset frame timing interval start - displayStart = std::chrono::high_resolution_clock::now(); + displayStart = std::chrono::steady_clock::now(); firstFrame = false; } diff --git a/ospray/common/DeviceRT.h b/ospray/common/DeviceRT.h index b920117a0..4aff5ba74 100644 --- a/ospray/common/DeviceRT.h +++ b/ospray/common/DeviceRT.h @@ -187,7 +187,20 @@ struct OSPRAY_CORE_INTERFACE Device virtual void *getSyclDevicePtr() = 0; virtual void *getSyclContextPtr() = 0; virtual void *getSyclQueuePtr() = 0; - + // For bindless image support: + virtual void *createImageMemHandle(void **hostData, + const size_t width, + const size_t height, + const unsigned int numLevels, + const OSPTextureFormat format + ) = 0; + + //Receives what comes from createImageMemHandle and creates a handle for the sampled image + virtual void *createSampledImageHandle(void *imgMemHandle, + const OSPTextureFilter filter, + const vec2ui wrapMode) = 0; + virtual void freeImageMemHandle(void *handle) = 0; + virtual void freeSampledImageHandle(void *handle) = 0; // Check if device is in debug mode bool isDebug() const; diff --git a/scripts/release/macosx.sh b/scripts/release/macosx.sh index 4f198b6e2..7e8f80658 100755 --- a/scripts/release/macosx.sh +++ b/scripts/release/macosx.sh @@ -66,11 +66,11 @@ export CMAKE_PREFIX_PATH=$DEP_DIR # set release and installer settings cmake -L \ "$@" \ - -D OSPRAY_BUILD_ISA=ALL \ -D TBB_ROOT=$DEP_DIR \ -D OSPRAY_ZIP_MODE=ON \ - -D OSPRAY_MODULE_DENOISER=ON \ + -D OSPRAY_BUILD_ISA=ALL \ -D OSPRAY_INSTALL_DEPENDENCIES=ON \ + -D OSPRAY_MODULE_DENOISER=ON \ -D CMAKE_INSTALL_INCLUDEDIR=include \ -D CMAKE_INSTALL_LIBDIR=lib \ -D CMAKE_INSTALL_DOCDIR=doc \ diff --git a/scripts/superbuild/CMakeLists.txt b/scripts/superbuild/CMakeLists.txt index 88b953480..3d5a919bb 100644 --- a/scripts/superbuild/CMakeLists.txt +++ b/scripts/superbuild/CMakeLists.txt @@ -3,7 +3,7 @@ ## Global settings ## -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.10) set(CMAKE_INSTALL_MESSAGE LAZY) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/dependencies) @@ -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.30.0" 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.30.0") if (APPLE) if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64") - set(ISPC_HASH "7f3891d0157aed3cab159fbc5235235b62797053db9387f5a61c8d0a22369ae0") + set(ISPC_HASH "01b05547ee3bed3a428c1ba2e72ec98743c8ad848c7db11c725bcd1e77889626") else() - set(ISPC_HASH "986eb172fe9db3e8da560e9d0d788832991638fab61ca80587d87eb175ffb520") + set(ISPC_HASH "e415277f5c3fa238f040135085630436bc1a1b87c14cc6f507b7c47c1c25cfd9") endif() elseif (WIN32) - set(ISPC_HASH "a7c21cb2434f5364acbdf0933af6de49198458ed6f0b62012e03c3325c972649") + set(ISPC_HASH "e126a78fd15f12475bac6204f2536b3986e07973127e4f8e7336c3d304c4a69f") else() if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64") - set(ISPC_HASH "890ad5f31581091bf4ae9f235a7bb6fd9cabcbd6cf1670104ad61f1ad2da4c76") + set(ISPC_HASH "509399c399ec162d746889458a10cc13797a1aed1c0164b2bd3faddf7d023f13") else() - set(ISPC_HASH "79885d4482356dba7c01da312b6449fd575b097845ebcb90344dac5c178b43f5") + set(ISPC_HASH "63e7d61037849fa1ed644f0398d21740ee9f880b9bf81f017c65eebe1d42c02b") endif() endif() endif() @@ -110,27 +110,27 @@ else() mark_as_advanced(FORCE ISPC_VERSION) endif() -set(RKCOMMON_VERSION "1.14.2" CACHE STRING "Which version of rkcommon to build?") -if (RKCOMMON_VERSION STREQUAL "1.14.2") - set(RKCOMMON_HASH "79334ef3dadddb03ec0483fbf49bf690fb8902d5c2732d977b2c116651484cc6") +set(RKCOMMON_VERSION "1.15.2" CACHE STRING "Which version of rkcommon to build?") +if (RKCOMMON_VERSION STREQUAL "1.15.2") + set(RKCOMMON_HASH "9128642e5187b963385dbf1655f3b143d3ef46310cc2e27114d220b347d0e2f2") 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.3.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 "01598a46c1162c27253a0de0236f520fd8ee8166e9ebb84a4243574f88e6e50a") else() if (APPLE) - set(TBB_HASH "e9aa143de91f65ea15b62ceeba5845bbc914c882d32bf9c9a405e6b8b5a70ade") + set(TBB_HASH "f9f9369e956bd1cb1efbe6eab400291970e55fad1f3ae2a33bc96d991882ed38") elseif (WIN32) - set(TBB_HASH "0a7b19b52ec9d8eaa10cbbe396e955130815489c544642acecda8ef8d2d7f64d") + set(TBB_HASH "e1b2373f25558bf47d16b4c89cf0a31e6689aaf7221400d209e8527afc7c9eee") else() - set(TBB_HASH "f5c9304710051f0193a07fb91b6d6ada5a3e0a6d623951ee176b1897816ecf4c") + set(TBB_HASH "7be34b376c9bdba9afe1ebacaf94ed6dc15af8377d73b539ec932f141195f6ec") endif() endif() endif() @@ -140,7 +140,7 @@ else() endif() option(BUILD_EMBREE_FROM_SOURCE "Build Embree or use pre-built version?" OFF) -set(EMBREE_VERSION "4.3.3" CACHE STRING "Which version of Embree to build?") +set(EMBREE_VERSION "4.4.0" CACHE STRING "Which version of Embree to build?") if (EMBREE_VERSION STREQUAL "4.3.3") if (BUILD_EMBREE_FROM_SOURCE) set(EMBREE_HASH "8a3bc3c3e21aa209d9861a28f8ba93b2f82ed0dc93341dddac09f1f03c36ef2d") @@ -163,7 +163,7 @@ endif() option(BUILD_OPENVKL "Build Open VKL as a part of the superbuild." ON) if (BUILD_OPENVKL) - set(OPENVKL_VERSION "2.0.1" CACHE STRING "Which version of OpenVKL to build?") + set(OPENVKL_VERSION "2.0.2" CACHE STRING "Which version of OpenVKL to build?") mark_as_advanced(CLEAR OPENVKL_VERSION) # XXX need to build VKL from source when installing in single directory, # otherwise its packaged, stale Embree will overwrite the already installed @@ -175,16 +175,16 @@ if (BUILD_OPENVKL) ON ) mark_as_advanced(CLEAR BUILD_OPENVKL_FROM_SOURCE) - if (OPENVKL_VERSION STREQUAL "2.0.1") + if (OPENVKL_VERSION STREQUAL "2.0.2") if (BUILD_OPENVKL_FROM_SOURCE) - set(OPENVKL_HASH "6676f2171f9d61844ef2a417df79275226026bc4210a4afc61da2160ecaaf5ed") + set(OPENVKL_HASH "9e1c730c196dde51e80f58b5ceb8fa2ea92d42cc460d18f9660b23feb81ae06e") else() if (APPLE) - set(OPENVKL_HASH "b04ab7a3376334ec6cf58014e41052d6d1d07cbd49c02f9a0f461849b79a0f45") + set(OPENVKL_HASH "5657292515990b81eb0a7d8d45e6c30736d4df7ca2b4c2d7c9c50f809fb4b0eb") elseif(WIN32) - set(OPENVKL_HASH "634500d449e80da324e317d78abb5c6a634ae8c3d8b049261d49c49e1e8c7daa") + set(OPENVKL_HASH "7ec05767fe939aa6a72145e65b5ae65b39d07d05c9abf95fdb560ce1399bc7c5") else() - set(OPENVKL_HASH "74939c835ec533c9de7af975e5cd0ee6db74a748388d89c915e3a08ebf274ad0") + set(OPENVKL_HASH "5622f802ac41d9f5d4a478b4cb1c65ac7a678bde03a4732faeb26ede37908fa0") endif() endif() endif() @@ -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.4.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.4.1") if (BUILD_OIDN_FROM_SOURCE) - set(OIDN_HASH "cce3010962ec84e0ba1acd8c9055a3d8de402fedb1b463517cfeb920a276e427") + set(OIDN_HASH "9c7c77ae0d57e004479cddb7aaafd405c2cc745153bed4805413c21be610e17b") else() if (APPLE) if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64") - set(OIDN_HASH "9dc42edba6461082e940c8c8cf19e6528d3d40f7f45c695fab33671b39414627") + set(OIDN_HASH "f1d7370bc09242bbd72d405b424ba240fd4d64103f3e607cdfeeaa2f2718cfb8") else() - set(OIDN_HASH "8b3285d2d8c431c061a2cf0c5bf90fd519b5ad5fb6db828b07dc6662daa9e07b") + set(OIDN_HASH "b9addf2855ee36d7768fd02d4d540e64612096487bad302e608d04e639ae1584") endif() elseif (WIN32) - set(OIDN_HASH "272781c9398eec7aeef9cd1be5b5aad7bb3debfc574308ce930b8e55ee51effd") + set(OIDN_HASH "682d94ba57525ed177d73412e0ed903f576867bd048f830a5c6f63c56b25e8b8") else() - set(OIDN_HASH "02693c3eb3888eeb0c59c9bb1142b28b899ac8dd02bad4397beaffb5f8bef863") + set(OIDN_HASH "b69ca2443a226ef692ca46bdc4f89995b1e99091f2665b906cbe07e9673e48cc") endif() endif() endif() diff --git a/scripts/superbuild/dependencies/dep_benchmark.cmake b/scripts/superbuild/dependencies/dep_benchmark.cmake index 878a3c489..c40e6edfc 100644 --- a/scripts/superbuild/dependencies/dep_benchmark.cmake +++ b/scripts/superbuild/dependencies/dep_benchmark.cmake @@ -10,8 +10,8 @@ else() endif() ExternalProject_Add(${COMPONENT_NAME} - URL "https://github.com/google/benchmark/archive/refs/tags/v1.9.0.tar.gz" - URL_HASH "SHA256=35a77f46cc782b16fac8d3b107fbfbb37dcd645f7c28eee19f3b8e0758b48994" + URL "https://github.com/google/benchmark/archive/refs/tags/v1.9.5.tar.gz" + URL_HASH "SHA256=9631341c82bac4a288bef951f8b26b41f69021794184ece969f8473977eaa340" # Skip updating on subsequent builds (faster) UPDATE_COMMAND "" diff --git a/scripts/superbuild/dependencies/dep_glm.cmake b/scripts/superbuild/dependencies/dep_glm.cmake index 73a7bc8ab..4f2a69943 100644 --- a/scripts/superbuild/dependencies/dep_glm.cmake +++ b/scripts/superbuild/dependencies/dep_glm.cmake @@ -15,8 +15,8 @@ ExternalProject_Add(${COMPONENT_NAME} SOURCE_DIR ${COMPONENT_NAME}/src BINARY_DIR ${COMPONENT_NAME}/build LIST_SEPARATOR | # Use the alternate list separator - URL "https://github.com/g-truc/glm/archive/refs/tags/1.0.1.tar.gz" - URL_HASH "SHA256=9f3174561fd26904b23f0db5e560971cbf9b3cbda0b280f04d5c379d03bf234c" + URL "https://github.com/g-truc/glm/archive/refs/tags/1.0.3.tar.gz" + URL_HASH "SHA256=6775e47231a446fd086d660ecc18bcd076531cfedd912fbd66e576b118607001" CMAKE_ARGS -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX:PATH=${COMPONENT_PATH} diff --git a/scripts/superbuild/dependencies/dep_gtest.cmake b/scripts/superbuild/dependencies/dep_gtest.cmake index a2930693d..b8860510b 100644 --- a/scripts/superbuild/dependencies/dep_gtest.cmake +++ b/scripts/superbuild/dependencies/dep_gtest.cmake @@ -11,8 +11,8 @@ endif() # Google Test follows the "Live Head" philosophy and therefore recommends # using the latest commit to 'master' ExternalProject_Add(${COMPONENT_NAME} - URL "https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip" - URL_HASH "SHA256=1f357c27ca988c3f7c6b4bf68a9395005ac6761f034046e9dde0896e3aba00e4" + URL "https://github.com/google/googletest/archive/refs/tags/v1.17.0.zip" + URL_HASH "SHA256=40d4ec942217dcc84a9ebe2a68584ada7d4a33a8ee958755763278ea1c5e18ff" # # Skip updating on subsequent builds (faster) UPDATE_COMMAND "" diff --git a/scripts/superbuild/dependencies/dep_ispc.cmake b/scripts/superbuild/dependencies/dep_ispc.cmake index cb96d3a4b..77d7ee984 100644 --- a/scripts/superbuild/dependencies/dep_ispc.cmake +++ b/scripts/superbuild/dependencies/dep_ispc.cmake @@ -16,7 +16,7 @@ else() if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64|aarch64") set(ISPC_OSSUFFIX "linux.aarch64.tar.gz") else() - set(ISPC_OSSUFFIX "linux-oneapi.tar.gz") + set(ISPC_OSSUFFIX "linux.tar.gz") endif() endif() diff --git a/scripts/tests/run-benchmarks.sh b/scripts/tests/run-benchmarks.sh index 91901c7d3..3589db812 100755 --- a/scripts/tests/run-benchmarks.sh +++ b/scripts/tests/run-benchmarks.sh @@ -46,49 +46,33 @@ SUBSUITE_NAME="BoxesAO" SUBSUITE_REGEX="^boxes" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -# wait to insert contexts (which will be reused for all subsequent benchmark runs) -# until first benchmark successfully finishes. -benny insert code_context "${PROJECT_NAME}" ${SOURCE_ROOT} --save-json code_context.json -benny insert run_context ${BENNY_SYSTEM_TOKEN} ./code_context.json --save-json run_context.json - -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json - -# subsequent subsuite runs... - SUBSUITE_NAME="CornellBoxSPP" SUBSUITE_REGEX="^cornell_box" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json SUBSUITE_NAME="GravitySpheresVolumeDIM" SUBSUITE_REGEX="^gravity_spheres_volume" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json SUBSUITE_NAME="PerlinNoiseVolumes" SUBSUITE_REGEX="^perlin_noise_volumes" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json SUBSUITE_NAME="ParticleVolumes" SUBSUITE_REGEX="^particle_volume" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json SUBSUITE_NAME="UnstructuredVolumes" SUBSUITE_REGEX="^unstructured_volume" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json SUBSUITE_NAME="Clipping" SUBSUITE_REGEX="^clip" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json SUBSUITE_NAME="Other" SUBSUITE_REGEX="^(random_spheres|streamlines|planes|vdb_volume|gravity_spheres_amr)" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json ################### # Microbenchmarks # @@ -99,4 +83,3 @@ SUITE_NAME="Microbenchmarks" SUBSUITE_NAME="Setup" SUBSUITE_REGEX="^setup" ./ospBenchmark ${BENCHMARK_FLAGS} --benchmark_filter=${SUBSUITE_REGEX} --benchmark_out=results-${SUITE_NAME}-${SUBSUITE_NAME}.json -benny insert googlebenchmark ./run_context.json ${SUITE_NAME} ${SUBSUITE_NAME} ./results-${SUITE_NAME}-${SUBSUITE_NAME}.json diff --git a/scripts/tests/run_gpu_tests.ps1 b/scripts/tests/run_gpu_tests.ps1 index 5e8fc3892..080707fac 100755 --- a/scripts/tests/run_gpu_tests.ps1 +++ b/scripts/tests/run_gpu_tests.ps1 @@ -73,6 +73,12 @@ $test_filters+=":Primitive/IDBuffer.*" # Different noise $test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/1" +# XXX AMR until VKL fix for #34 +$test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/18" +$test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/19" +$test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/20" + + # Artifacts, Windows only (driver?) $test_filters+=":TestScenesPtMaterials/FromOsprayTesting.test_scenes/4" $test_filters+=":TestScenesPtMaterials/FromOsprayTesting.test_scenes/5" diff --git a/scripts/tests/run_gpu_tests.sh b/scripts/tests/run_gpu_tests.sh index 25abd1463..bf0a915eb 100755 --- a/scripts/tests/run_gpu_tests.sh +++ b/scripts/tests/run_gpu_tests.sh @@ -87,6 +87,12 @@ test_filters+=":Primitive/IDBuffer.*" # Different noise test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/1" +# XXX AMR until VKL fix for #34 +test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/18" +test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/19" +test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/20" + + export ONEAPI_DEVICE_SELECTOR=level_zero:* export SYCL_CACHE_PERSISTENT=1 export OIDN_VERBOSE=2 diff --git a/scripts/tests/run_tests.ps1 b/scripts/tests/run_tests.ps1 index d8e28d862..cc202efbf 100755 --- a/scripts/tests/run_tests.ps1 +++ b/scripts/tests/run_tests.ps1 @@ -35,9 +35,15 @@ if ($LastExitCode) { cmake --build . --config Release --target ospray_test_data if ($LastExitCode) { $exitCode++ } +### temporary disable tests +# XXX AMR until VKL fix for #34 +$test_filters="TestScenesVolumes/FromOsprayTesting.test_scenes/18" +$test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/19" +$test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/20" + if ($testCPU) { md failed - ospTestSuite.exe --gtest_output=xml:tests.xml --baseline-dir=regression_test_baseline\ --failed-dir=failed + ospTestSuite.exe --gtest_output=xml:tests.xml --baseline-dir=regression_test_baseline\ --failed-dir=failed --gtest_filter="-$test_filters" if ($LastExitCode) { $exitCode++ } } diff --git a/scripts/tests/run_tests.sh b/scripts/tests/run_tests.sh index 932afa353..0e4830a27 100755 --- a/scripts/tests/run_tests.sh +++ b/scripts/tests/run_tests.sh @@ -55,13 +55,12 @@ 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 +### temporary disable tests +# XXX AMR until VKL fix for #34 +test_filters="TestScenesVolumes/FromOsprayTesting.test_scenes/18" +test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/19" +test_filters+=":TestScenesVolumes/FromOsprayTesting.test_scenes/20" + export OIDN_VERBOSE=2 diff --git a/test_image_data/CMakeLists.txt b/test_image_data/CMakeLists.txt index a819ebc68..9612c74e6 100644 --- a/test_image_data/CMakeLists.txt +++ b/test_image_data/CMakeLists.txt @@ -1,7 +1,7 @@ ## Copyright 2009 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(ospray_test_data NONE) diff --git a/test_image_data/baseline/Light_AmbientLight.parameter_0.png.md5 b/test_image_data/baseline/Light_AmbientLight.parameter_0.png.md5 index 539d6ec98..01fb79893 100644 --- a/test_image_data/baseline/Light_AmbientLight.parameter_0.png.md5 +++ b/test_image_data/baseline/Light_AmbientLight.parameter_0.png.md5 @@ -1 +1 @@ -a100db7848f2317876f3a003bddef5c1 +9f7a889d91f8c0e119026500869d39b5 diff --git a/test_image_data/baseline/TestScenesVolumes_UnstructuredVolume.simple_3.png.md5 b/test_image_data/baseline/TestScenesVolumes_UnstructuredVolume.simple_3.png.md5 index c18d2a14f..73a58ec5a 100644 --- a/test_image_data/baseline/TestScenesVolumes_UnstructuredVolume.simple_3.png.md5 +++ b/test_image_data/baseline/TestScenesVolumes_UnstructuredVolume.simple_3.png.md5 @@ -1 +1 @@ -5a5ebc39ddcc3a2f3355ef3bc5ae5753 +63f50cc7fa6cea3295ccc343bdf3a60f