Compare commits

...
923 Commits
Author SHA1 Message Date
Florian Reibold 800794931f fix typo in max_triangles_per_leaf option. 2024-06-12 10:06:51 +02:00
Jordan Saunders 578fa2d470 Fix triangle splitting crash where FP error causes binning differences
Ultimately the root problem here is that when we do the binning stage we use a
different method to test the first stage and the second. In the first stage we
use bin() to get an integer bin associated with a point in space. In the second
we get the floating point division point on the axis we have chosen to bin on
and do FP comparisons instead. Under most circumstances this is fine.

Occasionally these binning differences will result in unprofitable splits
happening but still building a usable tree.

In the test case I've given, the unprofitable splits we erroneously choose
fill up the split limit and we don't end up splitting the triangles the
previous stage had intended to choose. As a result, we can't split those
triangles. Then when we do the real bifurcation, everything is on the same
side. This resulted in an assertion failure in production (1).

(1) We never noticed that the RelWithDebInfo build in MSVC still has assertions
enabled. I can provide another change disabling these since I think it's
unintentional.
2024-06-12 10:06:51 +02:00
Jordan Saunders e4b1a6c9ad Provide a configuration setting for limiting leaf size 2024-06-12 10:06:51 +02:00
Florian Reibold ae91575ad5 use composite mode in release job for pvc testing due to switch to older
dpcpp.
2024-05-22 11:28:25 +02:00
Florian Reibold b61520b6be clean up continouus tests and move some to nightly. 2024-05-17 21:51:08 +02:00
Florian Reibold 870607d1b7 use same compiler version for release as last time. 2024-05-17 21:51:08 +02:00
Florian Reibold 7363032ded remove ICX-RC tests. ICX 2024.1 is out. 2024-05-17 16:34:57 +02:00
Florian Reibold a1103da9a2 turn L0RTAS builder off for nightly validation test. 2024-05-17 16:34:57 +02:00
Florian Reibold 3244cdefe4 add known issue about ISPC and macOS universal binary in changelog. 2024-05-17 16:34:57 +02:00
Florian Reibold 56d12bac07 use UMD migration for PVC for now because KMD migration is buggy. 2024-05-17 16:34:57 +02:00
Florian Reibold 905a655674 move function for USM prefetch into embree4.dll 2024-05-17 16:34:57 +02:00
Florian Reibold 1f3d3fcbf2 add test function dummy 2024-05-17 16:34:57 +02:00
Florian Reibold 1562c5fe97 turn level zero raytracing acceleration structure build on by default. 2024-05-17 16:34:57 +02:00
Florian Reibold acfd961a20 update tests to ICX 2024.1 compiler. 2024-05-17 16:34:57 +02:00
Florian Reibold 593203cc2d add instruction to install intel-level-zero-gpu-raytracing to docu and
changelog.
2024-05-17 16:34:57 +02:00
Florian Reibold c66ffcaa60 fix misleading "USM allocation not enabled" exception thrown Tutorial destructor when a SYCL device could not be created successfully. 2024-05-17 16:34:57 +02:00
Florian Reibold 5b0607ad57 update linux internal driver. 2024-05-17 16:34:57 +02:00
Florian Reibold 29dd82134b add embree_info and embree_minimal to CI tests for debugging purposes. 2024-05-17 16:34:57 +02:00
Florian Reibold a6582330c2 check for driver support for building RTAS properly. 2024-05-17 16:34:57 +02:00
Florian Reibold 34950db33a update Linux drivers. 2024-05-17 16:34:57 +02:00
Florian Reibold 5b0b109840 update Windows drivers. 2024-05-17 16:34:57 +02:00
Daniel Opitz cda4cf1919 fix output operator, issue #486 2024-05-17 15:08:21 +02:00
Florian Reibold 51f12d4729 add scene flag to trigger USM shared prefetch to GPU at the end of
rtcCommitScene
2024-05-08 14:13:32 +02:00
Florian Reibold afb90364a5 update PVC tests. 2024-05-08 14:13:32 +02:00
Florian Reibold fee2afe0cb remove references to obsolete CMake variables 2024-05-08 14:13:32 +02:00
Florian Reibold de6729720c more tests with sycl rc. 2024-05-08 14:13:32 +02:00
Florian Reibold 6c1ee46e7c use public driver for nightly PVC tests, too. 2024-05-08 14:13:32 +02:00
Florian Reibold fa07e8cab8 regress to older SYCL version due to issues with getting profiling information. 2024-05-08 14:13:32 +02:00
Florian Reibold fc2dfcdc2b handle exception in device info querying code. 2024-05-08 14:13:32 +02:00
Florian Reibold ecc2b5017b fix dpcpp download script for new versions of the compiler 2024-05-08 14:13:32 +02:00
Florian Reibold 291d69079a build Windows DG2 tests with sycl-nightly, too 2024-05-08 14:13:32 +02:00
Florian Reibold 695ca92ef3 fix release CI job. 2024-04-30 15:19:20 -04:00
Florian Reibold 11eb5f6031 Documentation update 2024-04-30 15:19:20 -04:00
Florian Reibold a4b8d4a3d0 version and changelog 2024-04-30 15:19:20 -04:00
Florian Reibold eb8f09d6fc use sycl-5-2-0 for release binaries. 2024-04-30 15:19:20 -04:00
Florian Reibold 5443670bf6 bump cmake_minimum_required verion to 3.5 2024-04-30 15:19:20 -04:00
DDxPlague 9f33b2be06 Fix tbb macOS port name
The tbb-devel port does not exist, and is actually called tbb. (https://ports.macports.org/port/tbb/)
2024-04-30 15:19:20 -04:00
Florian Reibold 9b33e7afd2 add static assert for proper RTCHitNt<N> alignment in verify. 2024-04-30 15:19:20 -04:00
Daniel Simon 819aedb442 Added alignment definitions to RTCHitNt and RTCRayNt
Added alignment definitions to RTCHitNt and RTCRayNt templates so they match the C definitions provided. As the alignment calculation is nasty without requiring the alignof keyword, or constexpr functions, this could instead be hidden behind a macro. Maybe RTC_ALIGN_SOA_AT_LEAST(N, MIN)?

The code is equivalent to:
```
constexpr std::size_t AlignSOAAtLeast(unsigned N, std::size_t min_alignment) noexcept {
    if (std::has_single_bit<unsigned>(N)) {
        return std::max<std::size_t>(min_alignment, N * alignof(float));
    } else {
        return min_alignment;
    }
}
```
Checking this works is as simple as adding a few static assertions:
```
static_assert(alignof(embree::RTCRayNt<1>) == alignof(embree::RTCRay));
static_assert(alignof(embree::RTCRayNt<4>) == alignof(embree::RTCRay4));
static_assert(alignof(embree::RTCRayNt<8>) == alignof(embree::RTCRay8));
static_assert(alignof(embree::RTCRayNt<16>) == alignof(embree::RTCRay16));
```
2024-04-30 15:19:20 -04:00
Patrick Shriwise 17fa6e82bb Fix for barycentric coordinate verification in 2024-04-30 15:19:20 -04:00
Florian Reibold e363c4e733 remove unused image code. 2024-04-30 15:19:20 -04:00
Florian Reibold f816f353d0 use public drivers for PVC, too. 2024-04-30 15:19:20 -04:00
Florian Reibold 8c47331b86 fixes for current sycl nightly and some warning fixes 2024-04-30 15:19:20 -04:00
Florian Reibold a9fe3d3eda add tests for syclos release candidate. 2024-04-25 09:25:43 -04:00
Florian Reibold 8990cc91bd add macOS universal binary build test. 2024-04-24 14:37:39 -04:00
Florian Reibold a617ac32c0 update to TBB 2021.12.0 2024-04-24 14:37:39 -04:00
Florian Reibold e3deefcc07 Build for ARM on Apple silicon machines by default when CMAKE_OSX_ARCHITECTURES is not set. 2024-04-24 14:37:39 -04:00
Werner, Stefan c61b24be1b Enabled support for Universal Binaries on macOS
It is now checking CMAKE_OSX_ARCHITECTURES to derive the compiler flags.
2024-04-24 14:37:39 -04:00
Daniel Opitz 532a1cc415 update drivers
enable l0rtas in continuous and nigtly tests
2024-04-23 06:00:52 -07:00
Daniel 13bbc328d2 Do/upgrade outdated os tests (#2711)
* minimum os version of fedora 29

* removed legacy os tests

* updated readme and continuous yaml
2024-04-10 10:48:54 +00:00
Florian Reibold 0c236df6f3 add token permissions for github workflows. 2024-03-21 21:02:24 +01:00
Florian Reibold 93189eacda add buildbench to performance CI pipeline 2024-03-12 12:24:20 +01:00
Florian Reibold a3aa2d8e43 add SYCL version of buildbench 2024-03-12 12:24:20 +01:00
Tomasz Pyra 0d29bfc3b8 fine tuning google benchmark 2024-03-05 08:40:07 -06:00
Tomasz Pyra 0a0c0cfffd more precise perf-CI measurements 2024-03-05 08:40:07 -06:00
Daniel 614793fe96 Do/scripts cleanup (#2701)
* delete scripts

* more cleanup
2024-02-22 09:50:29 +00:00
Florian Reibold 6c798e906b better output of which ISPC executable is found/used 2024-02-20 13:28:13 -06:00
Florian Reibold d5757f95b6 test ispc 1.23.0 2024-02-20 13:28:13 -06:00
Daniel 9eb89a70a1 Do/performance regression tests (#2699)
repaired performance tests
2024-02-20 11:33:30 +01:00
Florian Reibold 901306395b remove printf 2024-02-15 11:16:21 -06:00
Florian Reibold 766d120e8f test AVX512 compilation on x86 macOS in continuous test. 2024-02-15 08:24:32 -06:00
Florian Reibold 926df8ac78 Run Embree in AVX512 mode on AVX512 capable x86_64 machines running macOS. 2024-02-15 08:24:32 -06:00
Florian Reibold 7b4a2c22cf compile embree_info also for ARM. 2024-02-15 08:24:32 -06:00
Florian Reibold bb86c822c0 print warning about "flush to zero" and "denormals are zero" only on x86 systems 2024-02-15 08:24:32 -06:00
Daniel Opitz 23e5fa2902 fix missing backslash for overwriting EMBREE_TESTING_INTENSITY 2024-02-14 16:13:04 +01:00
Daniel 3920a980af fix path for macos-arm binary analysis and antivirus scan (#2692) 2024-02-14 12:06:10 +00:00
Florian Reibold daa8de0e71 allow overriding of EMBREE_TESTING_INTENSITY for tests 2024-02-09 11:30:18 -06:00
Florian Reibold 94a55e6992 update documentation 2024-02-09 11:30:18 -06:00
Florian Reibold 01b7dcc4f3 apply internally needed patch to glfw only when explicitly stated. 2024-02-09 11:30:18 -06:00
Florian Reibold e3f3be419b use same self-compiled tbb on macOS for x86_64 and arm64 versions. 2024-02-09 11:30:18 -06:00
Daniel Opitz cf5be6f9af update drivers 2024-02-09 12:54:51 +01:00
Florian Reibold f7d807bcb2 some issues with nightly tests 2024-02-09 00:35:47 +01:00
Florian Reibold 17721d46a7 add bdba and virus scan for arm binaries, too 2024-02-09 00:35:47 +01:00
Florian Reibold c57032c25a use TBB compiled for NAS for ARM release package 2024-02-09 00:35:47 +01:00
Florian Reibold 4a779d690e fix find command in package test check 2024-02-09 00:35:47 +01:00
Florian Reibold 608c019c37 docu 2024-02-09 00:35:47 +01:00
Florian Reibold 39a3e87e06 increase test epsilon for Apple Clang 14 on macOS ARM 2024-02-09 00:35:47 +01:00
Florian Reibold e81584bc2f add missing tests of release packages 2024-02-09 00:35:47 +01:00
Florian Reibold 15617d1aa2 some fixes. 2024-02-09 00:35:47 +01:00
Florian Reibold cdae188cfa different names for x86 and arm macOS packages 2024-02-09 00:35:47 +01:00
Florian Reibold 28abd2346c update to TBB 2021.11 and ISPC 1.22 2024-02-09 00:35:47 +01:00
Florian Reibold fe449425b8 bump embree version to 4.3.1 2024-02-09 00:35:47 +01:00
Florian Reibold 5f82bedf51 add NEON and NEON2X tests to continuous jobs again. 2024-02-09 00:35:47 +01:00
Florian Reibold 930a8ac459 update sycl-nightly and ICX RC 2024-02-09 00:35:47 +01:00
Daniel 9f2f9614ce Do/macos notarization update (#2684)
signing and notarization on macos x64 + arm
2024-02-01 17:17:10 +00:00
Daniel 1b589beb48 removed AOEUAOEU string from integration test exe (#2683) 2024-02-01 10:44:36 +00:00
DanielandFlorian Reibold 133f52ef71 Do/devel (#2682)
* Fail when no tests are executed.
* no more os specifix build and test scripts, converted CI jobs to cmake scripted test execution
* fix cmake error: could not load cache
* fix could not find libtbb_debug.so
* testintensity 0 -> 1
* test single primitive config error, added embree options for tests

---------

Co-authored-by: Florian Reibold <florian.reibold@intel.com>
2024-02-01 10:31:55 +01:00
Florian Reibold 289dee276c add dependloadflag also for msvc 2024-01-30 20:10:38 +01:00
Florian Reibold 3c50949440 Fail when no tests are executed. 2024-01-19 21:07:30 +01:00
Daniel dce4f47c84 Do/fix macos test execution (#2677)
* building as package
* removing signfile from macos package json
* build macos tests as release
* macos tests without arm, for merging
2024-01-19 10:19:50 +00:00
Woop, Sven bdcc53d143 updating PVC deviceID check 2024-01-19 07:22:29 +01:00
Florian Reibold 43c883a36f fix artifact name 2024-01-17 22:13:10 +01:00
Florian Reibold fc0061622d move Windows DG2 ICX tests to continuous again. 2024-01-17 21:17:13 +01:00
Florian Reibold 70edad3b58 update docu regarding supported compilers. 2024-01-17 21:17:13 +01:00
Florian Reibold 49e29dee45 update Windows public driver version again. 2024-01-17 21:17:13 +01:00
Florian Reibold d79241c534 remove Windows release driver version. We use official version now. 2024-01-17 11:41:53 +01:00
Florian Reibold 24c0859fe6 drop ICX versions from 2023 2024-01-17 11:41:53 +01:00
Florian Reibold cd018d7236 remove EMBREE_LEVEL_ZERO CMake variable from presets 2024-01-17 11:41:53 +01:00
Florian Reibold dda1fed6e2 disable ARM emultation tests for now because runner seems to be broken 2024-01-17 11:41:53 +01:00
Florian Reibold 68f1fa283d cleanups
* remove ICX version from cmake presets
* macOS builds/tests/release not using ICX anymore. Release binaries with
  AppleClang
2024-01-17 11:41:53 +01:00
Florian Reibold 3567ff9210 fixes for nightly tests 2024-01-17 11:41:53 +01:00
Florian Reibold b03916b5a2 revert public Windows driver 2024-01-17 11:41:53 +01:00
Florian Reibold aef82ba8fb add DG2 Windows tests with public and release drivers in continous CI, too 2024-01-17 11:41:53 +01:00
Daniel Opitz 67418a3927 added back notarization with TODO comment to mac tests 2024-01-16 16:33:51 +01:00
Daniel Opitz a16218e05e make notarize.sh executable 2024-01-16 16:33:51 +01:00
Daniel Opitz f4b0106831 update to correct icx version 2024-01-16 16:33:51 +01:00
Florian Reibold 271f14581e add missing feature flag checks 2024-01-15 18:15:18 +01:00
Daniel c9c58f2117 Do/release macos extern notarize (#2670)
* pulled notarization out of release build for macos

* trigger release macosx notarize only on workflow dispatch
2024-01-15 13:18:18 +00:00
Florian Reibold 3828b23773 Run Windows tests in CI again 2024-01-12 20:40:04 +01:00
DanielandFlorian Reibold 14f1996e4b Do/driver update (#2668)
* use dpcpp nightly 2023-12-18

* update drivers

ubuntu release: neo-releases-23.53.28202.1
ubuntu embargo: ci-master-15557
ubuntu internal: ci-neo-master-028280
ubuntu public: neo-releases-23.53.2802.1
windows internal: ci-master-15557
windows release: 24ww01-ci-master-15503

* change environment variable for PVC

* update Windows public driver, too

---------

Co-authored-by: Florian Reibold <florian.reibold@intel.com>
2024-01-11 14:50:33 +01:00
Daniel 767d72d5f2 Do/threadsanitizer issue (#2667)
* use atomic_bool in parallel_any_of
2024-01-10 11:01:24 +01:00
Florian Reibold dfae972074 fix dll dependency location for ICX 2024 2024-01-09 15:21:26 +01:00
Florian Reibold a5cec89a24 add dependent load flag to executables and shared libraries. 2024-01-09 15:21:26 +01:00
Florian Reibold 2851deb075 test intel-llvm/nightly-2023-12-18 2024-01-08 14:27:03 +01:00
Florian Reibold eead26e0ea update continouus ICX tests to 2024.0 and remove RC tests. 2024-01-08 14:27:03 +01:00
Woop, Sven be20c01707 catching exceptions in rthwif tests 2024-01-04 10:45:55 +01:00
Woop, Sven 846a6b9d61 adding compare threshold to cornell_box test 2024-01-04 10:45:55 +01:00
Daniel 42f637060e windows testing ICX 2023.2.1 (#2663)
* using force-delete for windows CI

* windows tests upgrade to ICX 2023.2.1
2023-12-08 09:48:59 +01:00
Daniel f18f9ce733 using force-delete for windows CI (#2662) 2023-12-06 14:31:10 +00:00
Daniel 6730b2afc4 fix nightly L0RTAS typo error (#2661) 2023-12-06 13:40:16 +00:00
DanielandSebastian Herholz d5270e18bb Sh/simd sse2neon 1.6.0 (#2660)
* Adding missing scalar functions asInt and asFloat and missing AVX512 functions isvalid and xchg

* Updating sse2neon to version 1.6.0

* testing sonoma

* fixed arm tests, upgrade to sse2neon-1.6.0

---------

Co-authored-by: Sebastian Herholz <sebastian.herholz@intel.com>
2023-12-05 11:41:40 +00:00
Daniel 076d80e333 fix coverity, upgrade all CI cmakepresets, accelerate continuous (#2659)
* clean up all yml
* dg2 split windows build and test
* investigate missing libsvml.so
* fix integration tests
* fix preset names
* coverity fix with tasking internal
2023-12-05 10:11:30 +00:00
Florian Reibold 388557c960 add nightly test for validation api 2023-11-22 14:26:16 +01:00
Florian Reibold 1cc5d59e67 EMBREE_SYCL_RT_VALIDATION_API=ON and EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS=OFF works again 2023-11-22 14:26:16 +01:00
Florian Reibold 1f84ca8586 add ze_api header to repository directly. 2023-10-24 21:11:14 +02:00
Florian Reibold 5c4edbf519 WA compiler issues under Windows with -D_DEBUG. 2023-10-24 21:11:14 +02:00
Florian Reibold 6eed3eb16e make rthwif tests compatible with TBB 2023 2023-10-12 21:00:10 +02:00
Florian Reibold 798d1c1d25 fix static linking issues with ze_wrapper library 2023-10-12 21:00:10 +02:00
Daniel fff2e0f6e0 user-defined thread count precedence
Ensure that user-defined thread count takes precedence over getNumberOfLogicalThreads() (#2642)
2023-10-11 09:29:58 +02:00
Woop, Sven b5eed25cdd moving most Windows DG2 tests to nightly testing 2023-10-04 08:12:30 +02:00
Woop, Sven f71d3e4fc8 enabling usage of L0RTAS builder in CI under Windows 2023-10-04 07:40:51 +02:00
Woop, Sven 1f045f3c58 requiring RTAS extension when enabling EMBREE_SYCL_L0_RTAS_BUILDER 2023-10-04 07:40:51 +02:00
Woop, Sven 1292561053 updating gfx-driver 2023-10-04 07:40:51 +02:00
Johannes Günther 9d67ce7bbf Add missing EMBREE_GEOMETRY_??? to embree-config.cmake 2023-09-29 11:32:18 +02:00
Florian Reibold be0accfd0b updates
* use syclos 20230922 for release
* use proper public driver on Windows
* update ispc to 1.21.0
* update TBB to 2021.10.0
* update ICX RK to 20230926
2023-09-27 20:56:07 +02:00
Florian Reibold decc2ff04c add old include/lib directory structure for ICX 2024, too.
The decision is not finalized yet, which folder layout the new ICX
release will have. We now add both versions and hope for the best.
2023-09-27 12:09:46 +02:00
Florian Reibold 5536c11647 add also weird libsycl.so version (libsycl.so.7.0.0-8 ?!?!?) 2023-09-27 01:39:27 +02:00
Florian Reibold 23536d20c2 add pi_win_proxy_loader.dll to release package 2023-09-27 01:39:27 +02:00
Florian Reibold d1a7e57185 update documentation 2023-09-27 01:39:27 +02:00
Florian Reibold 67bebc4b07 use rockylinux for release and split linux sycl 2023-09-27 01:39:27 +02:00
Florian Reibold f0fcca77fb update compilation docu and version number 2023-09-27 01:39:27 +02:00
Florian Reibold 09cd83ec21 add instance array geometry type. 2023-09-26 23:48:54 +02:00
Daniel Opitz 9253096652 disable nightly bezier_round furball tests on 2 windows configs for now
see issue
https://github.com/intel-innersource/libraries.graphics.renderkit.embree/issues/2640
2023-09-25 17:31:57 +02:00
Florian Reibold 6e78c34376 add tests for sycl-nightly RK version 2023-09-22 21:25:26 +02:00
Florian Reibold c6ab6e511b Update changelog.md 2023-09-22 12:08:48 +02:00
Florian Reibold 19218b2409 add ICX release candidate tests 2023-09-22 10:48:38 +02:00
Florian Reibold 2231ed62b7 WA for changed sycl include headers in oneAPI DPC++ 2024.0 2023-09-22 10:48:38 +02:00
Woop, Sven 79b02724ed validating that rtasFormat is not ZE_RTAS_FORMAT_EXP_INVALID 2023-09-15 11:59:47 +02:00
Woop, Sven 906539d21a added argument to set resolution support for cornell_box test 2023-09-15 11:59:47 +02:00
Daniel 550dff8be6 integration of coverity
* coverity test
* fixing coverity issues
* disable klockwork
2023-09-13 13:10:52 +02:00
Woop, Sven 644f052aa1 disabling L0 RTAS builder by default 2023-09-12 08:33:54 +02:00
Woop, Sven b11d5f3922 disabling L0 rtas builder only for release 2023-09-07 12:53:07 +02:00
Woop, Sven a7149514a6 added cmake option to enable usage of L0 rtas builder 2023-09-07 10:53:03 +02:00
Woop, Sven 271aa76219 properly checking if rtas extension can get loaded 2023-09-07 10:53:03 +02:00
Woop, Sven bfc11336af not using rtas_builder extension by default in rthwif tests 2023-09-07 10:53:03 +02:00
Woop, Sven 1c173b4055 not using rtas_builder extension by default yet 2023-09-06 12:07:05 +02:00
Woop, Sven bbe4feee98 removed unused file 2023-09-01 07:45:04 +02:00
Woop, Sven 4e93800b99 fixed deviceID check for PVC 2023-09-01 07:45:04 +02:00
Daniel e1406d749b cherry pick from carlocab (#2623)
The semanic equivalend of `$ORIGIN` on macOS is `@loader_path`.
2023-08-31 15:05:51 +00:00
Daniel 0bbe11b64e do not sign the zip package after build for windows any more (#2624) 2023-08-31 11:22:16 +00:00
Florian Reibold 4af9535743 update to intel-llvm 20230830 2023-08-30 22:53:15 +02:00
Florian Reibold e479a834a8 remove using sycl::fmax and using sycl::fmin
it causes problems with new versions of dpcpp compiler:
    /common/sys/sycl.h:34:13: error: target of using declaration conflicts with declaration already in scope
       34 | using sycl::fmax;
2023-08-30 22:53:15 +02:00
Daniel 32129f8d30 Do/update compiler cmakepreset (#2621)
* update ispc version in cmake preset

* dpcpp-version referenced workflow from @freibold/devel to @main

* dpcpp-version workflow to docker_gpu@main
2023-08-14 14:00:13 +02:00
Florian Reibold 9c07dcffe7 use ubuntu 20.04 for release again and update release driver 2023-08-03 14:20:03 +02:00
Florian Reibold 4e8f066a53 do not source dpcpp environment manually
Please enter the commit message for your changes. Lines starting
2023-08-03 14:20:03 +02:00
Woop, Sven 89399c10e8 consistently using main version of reusable workflow 2023-08-01 17:18:15 +02:00
Woop, Sven c892749430 Revert "use DPCPP_SETUP_SCRIPT environment variable in test.py script"
This reverts commit 2fe0b4fa48.
2023-08-01 17:18:15 +02:00
Woop, Sven 05a6b0767f updated graphics drivers in CI 2023-07-31 19:31:36 +02:00
Florian Reibold 2fe0b4fa48 use DPCPP_SETUP_SCRIPT environment variable in test.py script 2023-07-31 19:31:36 +02:00
Tomasz Pyra b88b4b5451 CI-perf sycl build on Ubuntu 22.04 (#2617)
* ubuntu 22.04 docker

* docker_gpu.yml@main
2023-07-26 15:06:17 +02:00
Tomasz Pyra 90f437c7cb docker GPU image for perf CI to embree/ubuntu:22.04 (#2615)
* ubuntu 22.04 docker

* docker_gpu.yml@main
2023-07-26 12:36:11 +00:00
Woop, Sven c4b3140192 cleanups to sycl namespace usage 2023-07-25 13:22:12 +02:00
Woop, Sven 4b07dc6a2d fixed sub_group related compile warning 2023-07-25 13:22:12 +02:00
Woop, Sven 8ebc4e3e28 - updating to dpcpp compiler sycl-nightly/20230724
- fixing compile issues in rthwif tests
2023-07-25 13:22:12 +02:00
Woop, Sven ced8b40f7c rthwif tests use RTAS build extension only when available 2023-07-24 19:43:12 +02:00
Woop, Sven 53e20c928d using L0 RTAS build extension only when available 2023-07-21 12:23:36 +02:00
Woop, Sven a0ff9e16ff implemented varying version of rtcGetGeometryTransform for ISPC 2023-07-20 10:58:18 +02:00
Woop, Sven c91bc704ae matching rcp math between rthwif_test and BVH builder 2023-07-19 19:36:25 +02:00
Anthony Roberts 50f2fbc696 Add support for ARM64 windows platform cmake
This adds a check for ARM64 in the CMakeLists file, which is the name of
the system processor on native Windows ARM64 machines
2023-07-19 19:36:25 +02:00
Woop, Sven 9341ffede5 added configuration to run rtas builder tests using internal or level zero implementation 2023-07-19 11:22:58 +02:00
Daniel 117b26d00a Do/update driver (#2607)
* update dpcpp-sycl-nightly

* update gfx-ubuntu22-embargo

* update gfx-ubuntu22-internal

* update gfx-ubuntu22-public

* update dpcpp-sycl-nightly

* update gfx-ubuntu22-embargo

* update gfx-ubuntu22-internal

* update gfx-ubuntu22-public
2023-07-18 15:32:51 +00:00
Florian Reibold e69fe7cc1e add memory monitor to GPU BVH build 2023-07-17 13:57:07 +02:00
Florian Reibold 3a81dbe970 fix imgui empty label complaint on Windows 2023-07-17 13:57:07 +02:00
Woop, Sven 62731728d6 adding check if rtas extension present and properly initialized 2023-07-17 08:15:54 +02:00
Sven Woop 82f5485c0f checking ze_rtas_builder_procedural_geometry_info_exp_t reserved member to be 0 2023-07-17 08:15:54 +02:00
Daniel 341ef8c45d Do/release (#2601)
* fix release test package build

* fix embree version for windows integration tests

* fix cmake presets trailing comma

* test fix for windows integration tests

* embree docs run tests

* update docs

* added sign file back to windows packages
2023-07-04 09:17:39 +00:00
Daniel 58ac8e3f3d Do/release (#2597)
* fix release test package build

* fix embree version for windows integration tests

* fix cmake presets trailing comma

* test fix for windows integration tests

* embree docs run tests

* update docs
2023-06-30 09:12:09 +02:00
Daniel c5d4f158da fix typo (#2592) 2023-06-22 10:16:09 +00:00
Tomasz Pyra d4509034be removed extra comma (#2591) 2023-06-21 17:02:21 +00:00
Sven Woop 7ee36d1a36 setting version to 4.2.0 2023-06-21 07:53:09 +02:00
Sven Woop 6af3fa61fa SYCL version of Embree with GPU support is no longer in beta phase. 2023-06-21 07:53:09 +02:00
Sven Woop 6d1c92ad9f updated changelog 2023-06-21 07:53:09 +02:00
Tomasz Pyra fdf44d201a Added PVC runner to perf CI (#2588) 2023-06-20 16:48:50 +02:00
Sven Woop aebb7d7a49 clarified that rtcOccluded and occlusion filter cannot get used to gather next n hits 2023-06-19 12:46:29 +02:00
Sven Woop 32bde766e3 Added rtcGetGeometryTransformFromScene API function that can get used inside SYCL kernels. 2023-06-16 08:07:24 +02:00
Tomasz Pyra 922d7f935a Added CI feature to store results in database (#2584) 2023-06-15 18:31:51 +02:00
Daniel 1ef7d35a9e Do/fix release package name sycl (#2583)
* fixed package names for sycl release packages

* removed some verbose messages from testing package

* added testing package as release artifact
2023-06-15 11:37:40 +00:00
Daniel 6d201d9216 Do/release test package (#2579)
* removed MSVC 2015 support (v140 + v141)

* fixed release test package generation
2023-06-13 13:00:08 +00:00
Sven Woop ac6379a476 passing dispatch globals for through debug RTAS build API extension 2023-06-12 12:28:47 +02:00
Sven Woop 7a03af8136 fix to get dispatch globals allocation working again for debugging purposes 2023-06-05 21:18:54 +02:00
Tomasz Pyra 293622b567 New model repository address (#2575) 2023-06-05 14:17:16 +02:00
Sven Woop 572e5144e2 Improved BVH build performance on many core machines by avoiding spin locks. 2023-06-02 07:40:23 +02:00
Sven Woop a0a386174e using zeDeviceGetProperties to query RTAS device properties 2023-06-01 11:56:41 +02:00
Sven Woop 4a9089b4c3 - using new rtas API header
- properly returning ZE_RESULT_EXP_RTAS_BUILD_DEFERRED and ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE error codes
2023-06-01 11:56:41 +02:00
Sven Woop c9896d283d adding RTASBuilder support to ze_wrapper 2023-06-01 11:56:41 +02:00
Sven Woop 1b5475fdc6 moving ze_rtas.h to level_zero folder 2023-06-01 11:56:41 +02:00
Sven Woop abe945845e using decltype to get function types in ze_wrapper 2023-06-01 11:56:41 +02:00
Florian Reibold 2750ae9962 init ZeWrapper in rthwif tests. 2023-05-31 21:25:42 +02:00
Florian Reibold 20b09d04ca fix rthwif tests with new level zero runtime loading change. 2023-05-31 21:25:42 +02:00
Sven Woop 55c1b772bd adding MTL support 2023-05-31 07:46:08 +02:00
Sven Woop 0a9ece3019 fixing experimental disable of deviceID check 2023-05-30 11:31:32 +02:00
kraszkowandDaniel Opitz 14512e7a6e fix rthwif tests for test package (#2567)
Co-authored-by: Daniel Opitz <daniel.opitz@intel.com>
2023-05-30 10:22:15 +02:00
Florian Reibold c97b61a28c load ze_loader library during runtime with dlopen/LoadLibrary. Remove
EMBREE_LEVEL_ZERO CMake variable. It is used now by default.
2023-05-24 18:01:57 +02:00
Daniel 05ba861ff1 Do/integration (#2562)
added integration tests with cmake-presets
2023-05-23 12:13:42 +00:00
Sven Woop 637e1c8aa7 adding Impl to RTAS builder to have separate symbols to API function names 2023-05-22 14:28:21 +02:00
Daniel 3908b8d261 added filter files for test execution (#2541)
* added filter files for test execution

* changed cmake version of test project to 3.1.0

* added error message test filter file not found

* fixed missing NO_SYCL flag in embree-addtests.cmake

* added win_proxy_loader.dll to windows package install

* made install win_proxy_loader.dll optional
2023-05-17 10:43:40 +00:00
Daniel 9d6ebf2c2a Do/fix fopen (#2558)
* do not use fopen any more in FileStream

* removed unnecessary warning suppression
2023-05-16 15:32:21 +02:00
Daniel e4ea425127 replace insecure fopen with secure std::ifstream (#2557) 2023-05-16 09:37:16 +02:00
Sven Woop 752ee7f8a4 using ZE_RESULT_EXP_ERROR_RETRY_RTAS_BUILD error code to re-try rtas build operation 2023-05-15 09:06:12 +02:00
Sven Woop 30d16425db removed zeRTASInitExp/zeRTASExitExp functions 2023-05-15 09:06:12 +02:00
Sven Woop a625f5a3b2 checking that number of geometries is in range 2023-05-15 09:06:12 +02:00
Sven Woop 64247187d6 prepared L0 rtas builder to support multiple rtas formats 2023-05-15 09:06:12 +02:00
Sven Woop b4277f37ac limiting triangle pair primID delta to 5 bits 2023-05-15 09:06:12 +02:00
Sven Woop c49eff027c L0 ray tracing support tests can use rtcore SW simulation 2023-05-15 09:06:12 +02:00
Daniel 0fcb306c91 Do/release (#2554)
* fixed nightly windows STORAGE_PATH env variable
* fixed release.yml binary/antivirus scan artifact name
2023-05-11 09:26:18 +00:00
Daniel 67a6f40c6c rebase release branch into devel (#2553)
* changed mac release package compiler to clang
* fix mac release runs-on
* updated docs
2023-05-11 08:02:55 +00:00
Daniel aad183b993 Do/release (#2551)
* added dpcpp-sycl-release.env
* upgrade to icx2023.1.0 for windows
* updated compilation.md
* fix macos runner selection in release.yml
* fixed klocwork job
* fixed artifact names in release.yml
2023-05-10 11:17:49 +00:00
Tomasz Pyra 3759bb572d changed package filenames (#2550) 2023-05-09 21:17:34 +02:00
Sven Woop 28f5fa9d07 adding always_inline for Embree SYCL API functions 2023-05-09 11:18:47 +02:00
Florian Reibold dcb283e279 make EMBREE_NO_SPLASH a proper CMake option. 2023-05-03 16:39:17 +02:00
Sven Woop e087eefe5a making ze_rtas_builder_geometry_exp_flag_t opaque by default 2023-05-03 12:40:18 +02:00
Sven Woop 6ac6171b54 updated to latest L0 rtas build API spec 2023-05-03 12:40:18 +02:00
Sven Woop b37b536253 checking if rtas allocation is in 48 bit address range 2023-05-03 10:23:41 +02:00
Sven Woop 658f94ab6c using proper ZE_STRUCTURE_TYPE_RAYTRACING_MEM_ALLOC_EXT_DESC stype for rtas allocations 2023-05-03 10:23:41 +02:00
Sven Woop 8ddad2a3f5 - changed version to 4.1.0
- added support for Intel(R) Data Center GPU Max series to changelog
- removed limitation of support to specific Arc/Flex version, all products are supported now.
- updated DPC++, driver, and compute-runtime versions to use
2023-05-03 10:23:41 +02:00
Sven Woop 36d36e5b6e returning ZE_RESULT_ERROR_INVALID_ENUMERATION error when stype is not as expected 2023-04-28 18:31:10 +02:00
Sven Woop 02d0038a99 properly checking for stype of builder properties and descriptor 2023-04-28 10:11:48 +02:00
Sven Woop 113239e8aa adding Level Zero rtas header from spec 2023-04-28 10:11:48 +02:00
Sven Woop 53e8e0047d updates to compile Level Zero ray tracing builder API to match spec 2023-04-28 10:11:48 +02:00
Sven Woop 2080cc0543 using argument structure in bounds callback for Level Zero ray tracing build API 2023-04-28 10:11:48 +02:00
Sven Woop bdae2bdd04 using standard Level Zero results in Level Zero rtas build API 2023-04-28 10:11:48 +02:00
Sven Woop 8a72fb41fd removing ze_raytracing CI tests 2023-04-28 10:11:48 +02:00
Daniel 627ac7ba2c Do/remove macosx embree tag (#2543)
* fixed macosx embree label issue in CI
* updated base workflow files for macosx CI tests in release/nightly/continuous
2023-04-26 13:29:25 +00:00
Sven Woop 71a9563cd8 Merge pull request #2542 from intel-innersource/swoop/devel
Swoop/devel
2023-04-26 11:28:16 +02:00
Sven Woop f8bcaa2001 cleanups to cornell_box rtas build example 2023-04-26 10:32:28 +02:00
Sven Woop d439076261 only including rttrace.h 2023-04-26 10:24:03 +02:00
Sven Woop 5db1005e8d renamed rtbuild and rttrace API header files 2023-04-26 10:11:35 +02:00
Sven Woop 8c881fb01a returning proper error codes in rtas builder 2023-04-26 09:27:17 +02:00
Sven Woop eb5f9fc707 adding flags to rtas builder properties 2023-04-26 07:34:51 +02:00
Sven Woop 7c7e3eed8b adjusted Level Zero ray tracing Build API struct member names to match spec 2023-04-25 10:58:03 +02:00
Sven Woop 9e2ca6d4e4 adjusted Level Zero ray tracing Build API function names to match spec 2023-04-25 10:16:59 +02:00
Sven Woop d7eb0d2a44 implemented rtas device properties query for L0 ray tracing build API 2023-04-25 09:50:08 +02:00
Sven Woop 2f7f118105 adjusted property query for parallel operation object in L0 ray tracing build API 2023-04-25 07:35:35 +02:00
Sven Woop 90ae80b5fe removed not required update of build arguments 2023-04-25 07:04:26 +02:00
Sven Woop d8e955002f adopted build and size query functions of L0 ray tracing build API 2023-04-24 12:03:34 +02:00
Sven Woop d29232b282 introduced rtas builder concept to L0 ray tracing API 2023-04-24 10:57:45 +02:00
Sven Woop 272f5feb2a using L0 ray tracing API to build acceleration structure for cornell_box test 2023-04-24 09:18:17 +02:00
Werner, Stefan 7723b92932 * Added CMake options for sphere and curve backface culling
* Moved sphere backface culling documentation to the right place
2023-04-19 13:28:07 +02:00
Werner, Stefan 8251272aaf Added EMBREE_BACKFACE_CULLING_SPHERES option
This follows the same method that Cycles uses to ignore backfacing
sphere intersections.
2023-04-19 13:28:07 +02:00
Florian Reibold ee1c56c6bc do not use exception mechanism for BVH build retry due to TBB 2020.3 2023-04-18 13:37:41 +02:00
Florian Reibold c819f3bacd update dpcpp to 20230417 and fix deprecation warnings 2023-04-18 11:46:32 +02:00
Daniel 570d59289c fix config error in generated embree-addtest.cmake (#2536) 2023-04-14 10:37:11 +00:00
Daniel c9ee19a5d2 fix tarball package unpacks into single folder (#2535) 2023-04-05 15:48:31 +02:00
Sven Woop f59c6d3ef1 using proper RT allocation function to allocate RTDispatchGlobals 2023-03-31 09:35:02 +02:00
Sven Woop b2234567b7 fixed issue that caused allocation of RTDispatchGlobals by default 2023-03-30 17:43:46 +02:00
Daniel 619b0e5ea2 build a deliverable testing package (#2532)
- separate cpack test component
 - new ADD_EMBREE_TEST cmake macro
 - moved reference image directly beside test definition files
 - updated package scripts
2023-03-29 17:32:08 +02:00
Sven Woop 9ef2018879 fixed success job 2023-03-16 12:37:46 +01:00
Sven Woop 8de6a5fdf8 updates to compile ze_raytracing builder in isolation in separate repository 2023-03-16 12:37:46 +01:00
Sven Woop baa030dd36 properly destroying parallel build operations 2023-03-16 12:37:46 +01:00
Krzysztof Raszkowski 8b63714aca ci: update gfx-driver internal to ci-neo-025905 2023-03-15 11:24:52 +01:00
Sven Woop dac55b1974 all names of ze_raytracing build API implementation match spec 2023-03-15 10:20:17 +01:00
Sven Woop be3e00be56 fixed interface of some ze_raytracing API functions 2023-03-15 10:20:17 +01:00
Sven Woop 403818c7c0 implemented zeRaytracingAccelFormatCompatibilityExt in ze_raytracing build API 2023-03-15 10:20:17 +01:00
Sven Woop 1bc8b94bbd implemented build flag to skip duplicate any hit shader invokation 2023-03-15 10:20:17 +01:00
Sven Woop 8918ed32db added stype and pNext to ze_raytracing build API implementation descriptors 2023-03-15 10:20:17 +01:00
Sven Woop 6008fdf64e removed rthwifGetSupportedFeatures from ze_raytracing build API 2023-03-15 10:20:17 +01:00
Sven Woop cbf9a336f8 introduced triangle format, quad format, and vertex format in ze_raytracing build API 2023-03-15 10:20:17 +01:00
Daniel 0ee27e4af1 added arm support to changelog and doc (#2524) 2023-03-14 16:49:05 +01:00
Daniel 66e3f8af2b added EMBREE_ISA_NEON2X to embree-config.cmake (#2526) 2023-03-14 12:54:39 +01:00
Tomasz Pyra 957ae983df Minor fixes to performance CI (#2525)
* removed 'perf' tag from A770

* more precise wildcards
2023-03-13 18:27:03 +01:00
Tomasz Pyra df51d78be8 performance-CI update
- use Google Benchmark for testing
- find and use all models from embree-models repo
- use docker_gpu.yml for GPU testing
- schedule cron for daily performance testing
2023-03-10 17:19:02 +01:00
Tomasz Pyra e22d74ec07 Use all models from repo 2023-03-10 16:15:07 +01:00
Daniel b498e2b87e added arm emulation testing to nightly (#2520)
- Increase test timeout of bvh_builder test
- always disable SSE2 for imgui
2023-03-10 10:23:04 +01:00
Sven Woop 825c513d9c turning EMBREE_LEVEL_ZERO on in one CI test 2023-03-10 09:05:24 +01:00
Sven Woop f4a0f38636 fixed success CI task 2023-03-10 09:05:24 +01:00
Florian Reibold 02192dc3f9 update doc and fix intelstyle repo url 2023-03-09 16:17:59 +01:00
Florian Reibold 3e73c5a634 disable furball hermite round test for now. 2023-03-09 09:48:17 +01:00
Florian Reibold d1e3beabdd use cmake --build instead of make in package scripts 2023-03-08 23:40:47 +01:00
Florian Reibold 152c872700 don't use -no-intel-lib along with -static-intel on Linux with SYCL
enabled
2023-03-08 23:40:47 +01:00
Florian Reibold b913e0a97b add imf-use-svml=false even though it seems to not work 2023-03-08 23:40:47 +01:00
Florian Reibold 55a256fcb0 set next Embree version to 4.0.1 2023-03-08 23:40:47 +01:00
Florian Reibold a0f0ca62ff make EMBREE_LEVEL_ZERO a proper CMake option 2023-03-08 23:40:47 +01:00
Florian Reibold d89ec96e80 add frexp implementation for DPC++ with -no-intel-lib 2023-03-08 23:40:47 +01:00
Florian Reibold 899a643c43 changelog 2023-03-08 23:40:47 +01:00
Florian Reibold 989676fbba try no-intel-libs again along with static-intel flag 2023-03-08 23:40:47 +01:00
Sven Woop 4b3a9c2676 - rthwif can get build standalone
- creating libze_raytracing packages in CI
2023-03-08 13:32:41 +01:00
Sven Woop a22f547b77 Intel(R) Data Center GPU Flex Series is supported now 2023-03-08 07:48:11 +01:00
Florian Reibold 68b7b1b968 update drivers 2023-03-06 22:08:53 +01:00
Tomasz Pyra 9f50ecb447 add EMBREE_NO_SPLASH enviroment to disable beta splash screen (#2504)
add EMBREE_NO_SPLASH enviroment to disable beta splash screen
2023-03-06 17:54:43 +01:00
Florian Reibold 24cd595d3a update sycl-nightly to 20230304 2023-03-06 14:39:12 +01:00
Daniel 45ba72c2d8 Increase compare threshold for known issue with Apple AVX2 linear curves (#2508) 2023-03-06 11:48:27 +01:00
Sven Woop 4210192399 Revert "disabling spatial splits in rthwif builder"
This reverts commit b41ff99cc1.
2023-03-06 07:38:41 +01:00
Florian Reibold 6e4ee61697 use cmake --build instead of make to be able to use Ninja 2023-03-03 20:10:27 +01:00
Florian Reibold b45ccb2224 use Ninja for DPC++ builds 2023-03-03 20:10:27 +01:00
Tomasz Pyra 015e18081e fixed issue with EMBREE_BUILD_GOOGLE_BENCHMARK_FROM_SOURCE 2023-03-03 12:11:21 +01:00
Florian Reibold 0c3bb6145d fix renamed benchmark target name for ispc tutorials 2023-03-03 12:11:21 +01:00
Florian Reibold 873f706e93 fix struct/class redeclaration warning 2023-03-03 12:11:21 +01:00
Florian Reibold 7f0d043f7b clean up google benchmark CMake cache variables 2023-03-03 12:11:21 +01:00
Florian Reibold 427315af93 download and build google benchmark from source 2023-03-03 12:11:21 +01:00
Sven Woop 287ec6bc07 rthwif builder no longer throws RTCError exception 2023-03-01 16:30:58 +01:00
Sven Woop 81b52c81c7 introduced separate priminfo_mb.h file and moved primref into builders folder 2023-03-01 16:30:58 +01:00
Sven Woop b41ff99cc1 disabling spatial splits in rthwif builder 2023-03-01 16:30:58 +01:00
Sven Woop 80c27d148c separated rtbuild and rttrace in rthwif 2023-03-01 16:30:58 +01:00
Sven Woop af4c9b36b4 removed Embree specific code out of rthwif 2023-03-01 16:30:58 +01:00
Daniel 90a8af975d Do/improvetesting (#2499)
* improve testing 
 - integrate model repository into embree and bugfixes
 - added additional primitive tests
 - added sde support to execute on arbitrary architecture
 - fixed conflicts with updated devel
 - removed README.md from tutorials, this file is generated
 - Removed not required LICENSE files.
 - Removed no longer required EMBREE_SYCL_MBLUR check.
 - disable curve5 test for pathtracer for now.
 - added --time 0.5 to primitive tests and updated references
 - added sde invocation to one continuous.yaml test
 - fixed make reference for primitive tests
 - added furball test
 - added occlusion buffer to primitive tests
 - removed embree_models dir update on test
 - fix hermite_round occlusion
 - Changed background of uv and Ng shader to black
 - building and testing for linux with arm
 - added EMBREE_TESTING_ONLY_SYCL_TESTS option
 - using exr for model and tutorial tests references
 - fix broken yaml from rebase
2023-03-01 10:27:38 +01:00
Florian Reibold 4473277560 workaround for accidentally installed glfw (setting directory properties
only works for CMake >= 3.22)
2023-02-28 16:44:39 +01:00
Florian Reibold e8a2beb7bc don't install embree_info source code to src folder in release package 2023-02-28 16:44:39 +01:00
Florian Reibold a285434d5c prevent creation of default sycl device to make CPU versions of tutorials
runnable on systems without available GPU drivers
2023-02-28 16:44:39 +01:00
Sven Woop a7079386b3 - added usage example to L0 rt build API
- added zeRaytracingAccelCompatibilityExt function to L0 rt build API
- added device input to ze_raytracing_build_accel_ext_desc_t descriptor
2023-02-28 12:22:40 +01:00
Krzysztof Raszkowski b662f1feff ci: add ATS-M testing job 2023-02-28 11:30:16 +01:00
Florian Reibold 50f6aa3805 fix release sycl linux build 2023-02-22 15:35:21 +01:00
Sven Woop 32e691b022 Fixed a bug that limited the size of meshes supported in RT hardware BVH builder. 2023-02-21 17:19:21 +01:00
Florian Reibold 53a97b3713 changelog 2023-02-21 14:44:35 +01:00
Florian Reibold d30ade7cdc add continuous sycl test with TBB 2020.3 2023-02-21 14:44:35 +01:00
Florian Reibold 0868a94c1a fix rthwif build retry for TBB 2020.3 2023-02-21 14:44:35 +01:00
Sven Woop a4e1f187cd added support for RT software simulation for validation purposes 2023-02-20 12:36:14 +01:00
Florian Reibold 0698545830 Frei/devel (#2489)
* update drivers
* AOT -> JIT testing
* cleanup
2023-02-17 21:00:10 +01:00
Sven Woop 5135ebb7a9 Updates to L0 ray tracing build API
- properly naming flag enum and introducing flags uint
- renaming ze_raytracing_accel_size_ext_desc_t to ze_raytracing_accel_size_ext_properties_t
- introducing ze_raytracing_format_ext_t and specifying format for triangle, quad, and vertex buffers
- removed ZE_RAYTRACING_BUILD_EXT_FLAG_DYNAMIC
2023-02-17 11:59:36 +01:00
Daniel Opitz c59e62d8ee fix line.gather with time interpolation causing inconsistent sphere cap intersections 2023-02-17 08:41:16 +01:00
Sven Woop d6119cc78d calculating improved epsilon for triangles and quads in pathtracer 2023-02-15 18:11:45 +01:00
Florian Reibold 90441b555e fix small errors in test.py 2023-02-15 15:30:34 +01:00
Florian Reibold 4859243b1e fix set but unused warning in tinyexr 2023-02-15 15:30:34 +01:00
Florian Reibold c85363d7aa fix sycl deprecation warning 2023-02-15 15:30:34 +01:00
Florian Reibold edbb4e8bd1 update release jobs, too 2023-02-15 15:30:34 +01:00
Florian Reibold 789e95377f reintroduce setup_dpcpp and setup_gfx stages again 2023-02-14 21:13:05 +01:00
Florian Reibold ec3454c6b3 update to sycl-nightly/20230209 and clean up .ci-env 2023-02-14 21:13:05 +01:00
Daniel Opitz e422002bc6 initialize debug data with time if --time is passed 2023-02-14 16:19:33 +01:00
Florian Reibold 0decdea616 fix linux-PVC-2T job to use docker_gpu 2023-02-13 16:13:33 +01:00
Krzysztof Raszkowski 304dd18bd8 Remove core.autocrlf from CMake patch command 2023-02-13 15:38:41 +01:00
Florian Reibold 3f9b1e6cba set autocrlf to fix glfw patch issues in new reusable workflows (thanks
@Krzysztof!)
2023-02-13 15:38:41 +01:00
Florian Reibold 0a5fc42010 use Trevors GHA for installing drivers on-the-fly. 2023-02-13 15:38:41 +01:00
Florian Reibold c35929c30c move 2 continuous mac tests to nightly 2023-02-13 15:38:41 +01:00
Sven Woop d6779e2015 throwing error when build hardware BVH is too deep 2023-02-13 11:07:07 +01:00
Sven Woop 9748b95235 further updates to L0 ray tracing build extension 2023-02-13 10:14:41 +01:00
Sven Woop 50dd06d0a3 fixed issue with winding order in perfect watertight ray/triangle intersector 2023-02-13 10:14:41 +01:00
Sven Woop 6edfd43b46 - Using proper naming convention for L0 ray tracing build extension
- Adding Doxygen support to documentation of L0 ray tracing build extension
- Updating documentation of L0 ray tracing build extension
2023-02-13 10:14:41 +01:00
Sven Woop 8ef1e35f29 added back missing check_arm_neon.cpp file 2023-02-09 16:20:25 +01:00
Sven Woop 0e5f92e7e3 Improved performance for Tiger Lake, Comet Lake, Cannon Lake, Kaby Lake, and Skylake client CPUs by using 256 bit SIMD instructions by default. 2023-02-09 16:20:25 +01:00
Sven Woop 1d2627ce85 rthwif already uses resize, which allocates exact for static scenes, and may over allocate for dynamic scenes that increase in size 2023-02-09 16:20:25 +01:00
Sven Woop 072e4e8944 Resize of empty embree vector allocates exact size to match std::vector behavior. 2023-02-09 16:20:25 +01:00
Krzysztof Raszkowski fde9583d4a ci: switch internal driver to ci-neo-master-025593 2023-02-09 10:15:23 +01:00
Florian Reibold b38761a0c9 add missing .so files for Linux CPU only version. 2023-02-08 20:40:50 +01:00
Sven Woop 91b2ff7594 allocating proper BVH buffer size 2023-02-08 11:20:32 +01:00
Sven Woop 887e4b9ff0 using ZE_RELAXED_ALLOCATION_LIMITS_EXP_FLAG_MAX_SIZE mode to allocate large BVH buffers with L0 2023-02-08 11:20:32 +01:00
Sven Woop ed9b98619c throwing Embree error when BVH memory allocation failed 2023-02-08 11:20:32 +01:00
Sven Woop 35c5d21d74 properly initalizing pNext member of ze_raytracing_mem_alloc_ext_desc_t 2023-02-08 11:20:32 +01:00
Sven Woop d3c96f59a7 Improved performance for Tiger Lake CPUs. 2023-02-08 10:40:04 +01:00
Sven Woop f7bf75cc29 setting version to v4.1.0 2023-02-08 10:40:04 +01:00
Florian Reibold ee2263634f without -no-intel-lib, svml_dispmd.dll is also needed for CPU only
version.
2023-02-07 13:28:45 +01:00
Florian Reibold 7c52285bef turn off no-intel-lib for now. this causes ICX compiler bugs. 2023-02-07 10:45:33 +01:00
Mark Jarrell 17bef2e44d Fix build error in rtcore_common.isph
Change uniform unsigned to uniform unsigned int
2023-02-07 10:45:33 +01:00
Florian Reibold cf5a9a05a2 update GLFW to latest version 2023-02-07 10:45:33 +01:00
Florian Reibold d411a39530 some fixes in embree-config.cmake for static Embree build. 2023-02-07 10:45:33 +01:00
Florian Reibold 1a4dc8597e add CMake variable to control building GLFW from source 2023-02-07 10:45:33 +01:00
Florian Reibold 594c845c99 patch DLL loading path in ImGUI. 2023-02-07 10:45:33 +01:00
Florian Reibold 837a7f8815 download GLFW from source and patch DLL loading path. 2023-02-07 10:45:33 +01:00
Florian Reibold 61639aaf51 add vcruntime and msvcp DLLs when packaging Embree. 2023-02-07 10:45:33 +01:00
Florian Reibold 839f3f7a4f clean up search for SYCL dependencies. 2023-02-07 10:45:33 +01:00
Florian Reibold 154ff43b58 also add tbbmalloc.dll/.so when packaging Embree 2023-02-07 10:45:33 +01:00
Florian Reibold 56eb2e91c9 WA on Windows when using -no-intel-lib. 2023-02-07 10:45:33 +01:00
Florian Reibold 3025376c8a Windows debug mode WA for std::vector operator[] access in SYCL kernel. 2023-02-06 17:02:34 +01:00
Florian Reibold 378f347f32 cleanup of source_sycl_env.sh 2023-02-06 17:02:34 +01:00
Florian Reibold 4bc3bdf2a2 disable statically linked TBB for rthwif builder by default. 2023-02-06 17:02:34 +01:00
Sven Woop c3fdfe39fc Updated beta statement and regenerated documentation. 2023-02-03 08:27:40 +01:00
Daniel Opitz b7b2d00bce fixed interchanged windows/linux build artifacts in release.yaml 2023-02-02 18:18:55 -06:00
Sven Woop 277d9e676e regenerated documentation 2023-02-02 21:05:40 +01:00
Sven Woop d862de67f8 Added messages what Embree SYCL version is still in beta phase. 2023-02-02 21:05:40 +01:00
Florian Reibold aad7cb8338 Fix docu with regard to setting embree_DIR path correctly 2023-01-26 14:49:12 -06:00
Florian Reibold 0f824ee323 remove unused device parameter from test.py invokations 2023-01-26 14:49:12 -06:00
Florian Reibold a98b5be8a7 remove iGPU enabled problem from known issues 2023-01-26 14:49:12 -06:00
Florian Reibold cd201a8374 add "threads per EU" as criteria to filter out non RTHW cards and add
max num of EUs as device selection score
2023-01-24 20:44:32 +00:00
Florian Reibold 3c43580d94 add embree_info tutorial and printSYCLDevice functionality 2023-01-24 20:44:32 +00:00
Florian Reibold 10640cc96c add creation of startup.bat script in download_dpcpp.sh 2023-01-24 20:44:32 +00:00
Florian Reibold 063062906b Spelling compilation.md 2023-01-24 20:44:32 +00:00
Tomasz Pyra 3d6eac638f Perf-CI compiler change to ICX (#2451) 2023-01-20 17:51:41 +01:00
Florian Reibold 6e38e40638 small changes in release package names 2023-01-20 11:02:42 +01:00
Florian Reibold d0ea94ced1 add note about deprecated Intel Compiler being not officially supported
anymore
2023-01-20 11:02:42 +01:00
Florian Reibold e6aef89c36 Fix alignment problem in ray mask tutorial 2023-01-20 11:02:42 +01:00
Florian Reibold b3532cad72 Turn ispc support off by default 2023-01-20 11:02:42 +01:00
Sven Woop 3cdb284dda Added third-party-programs file for Intel(R) oneAPI DPC++/C++ compiler 2023-01-20 08:41:40 +01:00
Florian Reibold 26783d69ab Add reference to minimal CMake version in compile docu. 2023-01-19 23:20:19 +01:00
Florian Reibold 35fd78f551 update supported compilers and remove MAX_ISA from cmake config
example
2023-01-19 23:20:19 +01:00
Florian Reibold c13cf1318e rename RTC_FEATURE_FLAG_RAY_MASK to RTC_FEATURE_FLAG_32_BIT_RAY_MASK 2023-01-19 21:20:10 +01:00
Florian Reibold cb086e9e27 modify minimal_sycl tutorial to match documentation wrt specialization
constants
2023-01-19 21:20:10 +01:00
Florian Reibold fefaedee4f set maximum glibc version to 2.28 on Linux CPU release 2023-01-19 21:20:10 +01:00
Florian Reibold 96d6d02241 Add documenation for compilation with the Intel(R) oneAPI DPC++/C++
compiler.
2023-01-19 15:54:28 +01:00
Florian Reibold 8c6d2c895f change kernel.rc encoding to UTF-8 2023-01-19 15:54:28 +01:00
Florian Reibold 71e2533140 fix memleak in ray mask tutorial 2023-01-19 15:54:28 +01:00
Florian Reibold 60615a1d92 add explanation of the RTC_FEATURE_FLAG_RAY_MASK flag 2023-01-19 15:54:28 +01:00
Florian Reibold cf5d981190 add test for ray mask tutorial 2023-01-19 15:54:28 +01:00
Florian Reibold 6831b56259 modify ray tutorial to pass klockwork scan 2023-01-19 15:54:28 +01:00
Florian Reibold 8bfd38b889 fix SYCL code when ray masks are turned off. 2023-01-19 15:54:28 +01:00
Florian Reibold 57891fac6a execute trav loop when ray masks are used. 2023-01-19 15:54:28 +01:00
Florian Reibold 67c1d27c96 add ray mask tutorial 2023-01-19 15:54:28 +01:00
Florian Reibold 9f08568d8c libmmd is needed on Windows with ICX in CPU only mode 2023-01-18 14:24:38 +01:00
Florian Reibold dbd4afb54a don't link against DPC++ intel libs when SYCL support is off. 2023-01-18 14:24:38 +01:00
Florian Reibold ba2367fb91 use oneTBB 2021.7.0 for mac release 2023-01-17 21:42:10 +01:00
Florian Reibold 0492251bc9 remove WA for old sycl standard of ICX 2023-01-17 12:28:34 +01:00
Florian Reibold 5388de9126 windows and linux release use ispc 1.18.1 and tbb 2021.7.0 2023-01-17 12:28:34 +01:00
Florian Reibold a66fbf5caf cleanup unused configuration options 2023-01-17 12:28:34 +01:00
Florian Reibold 6f901d9ab8 remove unneccessary --include-intel-llvm 2023-01-17 12:28:34 +01:00
Florian Reibold 6ece03e38a turn off vsync in tutorial 2023-01-17 12:28:34 +01:00
Florian Reibold 6e73a58d30 clean up continuous test names 2023-01-17 12:28:34 +01:00
Florian Reibold 2332d4f62f test tbb 2021.7.0 and ispc 1.18.1 2023-01-17 12:28:34 +01:00
Florian Reibold d0dbeef7c6 update package_linux.sh script (changes cherry-picked from Raszkowski,
Krzysztof)
2023-01-17 12:28:34 +01:00
Florian Reibold 2ab71d16d3 fix Linux SYCL packaging for ICX 2023.0.0 2023-01-17 12:28:34 +01:00
Florian Reibold 3a5ea4a391 fix test script invokation on ubuntu 22.04 2023-01-17 12:28:34 +01:00
Florian Reibold 9eda3259af update glibc requirements for Linux CPU build (ICX2023.0.0 requirements) 2023-01-17 12:28:34 +01:00
Florian Reibold bb6666c125 update continuous and nightly tests and replace ICC with ICX 2023-01-17 12:28:34 +01:00
Florian Reibold 9a28d653cb use Rocky Linux 8.7 for Linux CPU release (req. of ICX 2023.0.0) 2023-01-17 12:28:34 +01:00
Florian Reibold 6ed9e0f9db fix artifact names in SYCL releases 2023-01-17 12:28:34 +01:00
Florian Reibold 8ef78b0828 also package svml_dispmd.dll and libmmd.dll form the DPC++
redistributables on Windows
2023-01-17 12:28:34 +01:00
Florian Reibold b9aadc2f62 remove dpcpp specific package script for Windows 2023-01-17 12:28:34 +01:00
Florian Reibold 7c49cc78d4 do not copy ze_loader library/dll. it is in the driver. 2023-01-17 12:28:34 +01:00
Florian Reibold ae21628afe Windows now uses ICX and Ninja for release build package 2023-01-17 12:28:34 +01:00
Florian Reibold fa9d847118 update failing nightly tests to use ICX 2023.0.0 2023-01-17 12:28:34 +01:00
Florian Reibold db88a22c93 use correct stack protection flag on Linux for ICX 2023-01-17 12:28:34 +01:00
Florian Reibold 78e20297f7 update release builds to use ICX 2023.0.0 and TBB 2021.5.0 2023-01-17 12:28:34 +01:00
Florian Reibold bef3cdc648 move debug linux ICX test into nightly (takes too long) and change build type to release 2023-01-17 12:28:34 +01:00
Tomasz Pyra 86ae9b0e15 new perf CI runners, added asia_dragon workload (#2440) 2023-01-16 21:23:44 +01:00
Florian Reibold 9ad8a13e8f add tests for oneAPI DPC++ 2023.0.0 compiler 2023-01-13 14:03:17 +01:00
Tomasz Pyra 5c21ca5bec Added simple performance measurements to CI (#2435) 2023-01-12 13:23:14 +01:00
Sven Woop 008d038f9e added cmake option EMBREE_RTHWIF_TBB_GIT_REPOSITORY to set git repository location of TBB 2023-01-11 07:54:03 +01:00
Sven Woop 90acc22d8b added cmake option EMBREE_RTHWIF_TBB_URL to set URL to TBB version to use 2023-01-10 20:25:32 +01:00
Daniel Opitz fa843a9ea1 bugfix linei missing sphere cap use select for linei leftExists filter 2023-01-10 20:25:32 +01:00
Daniel Opitz 610e2eab46 added rudimentary fur ball to scenegraph/xml_loader 2023-01-10 17:41:08 +01:00
Daniel Opitz e397c9e8d3 read/write images with tinyexr and stb_image 2023-01-10 17:41:08 +01:00
Florian Reibold aace53ceda fix imgui event handling 2023-01-09 20:53:27 +01:00
Sven Woop fb0af88f48 compiling DPC++ release builds with all ISAs enabled 2023-01-09 09:11:11 +01:00
Sven Woop f7e053197e added list of supported Arc GPUs 2023-01-06 08:26:23 +01:00
Sven Woop 3f4fed0d88 updated documentation to DPC++ compiler 2022-12-14 2023-01-06 08:26:23 +01:00
Sven Woop 31052e3432 increasing testing intensity of DPC++ release builds to 4 2023-01-06 08:26:23 +01:00
Sven Woop 832fcd64be added SYCL windows release build with JIT mode 2023-01-06 08:26:23 +01:00
Sven Woop 98db4d3046 fixing path to SYCL libraries when creating package under Windows 2023-01-05 08:24:39 +01:00
Sven Woop b68a7e7f51 fixing imgui compile issues under macOS with ICC 2023-01-05 08:24:39 +01:00
Sven Woop 876486e63e bugfix of SYCL compilation when AVX enabled 2023-01-05 08:24:39 +01:00
Sven Woop b1ab195e3f referencing embree_rthwif-targets.cmake in embree-config only when Embree compiled to static library 2023-01-03 13:18:30 +01:00
Sven Woop 3a7c0f10f9 updates to device ID detection 2023-01-02 10:07:16 +01:00
Florian Reibold 481f68c2b0 make oneAPI DPC++ compiler (ICX) work with EMBREE_SYCL_SUPPORT on
Windows
2022-12-16 22:10:36 +01:00
Florian Reibold 6c8ae90341 add CMake option to disable direct usage of level zero 2022-12-16 22:10:36 +01:00
Florian Reibold 8bf3602ea6 some fixes for oneAPI dpcpp compiler. still WIP. 2022-12-16 22:10:36 +01:00
Florian Reibold 114a7dcd70 ICX works again (without EMBREE_SYCL_SUPPORT) under Windows 2022-12-16 22:10:36 +01:00
Florian Reibold e6ab9de32f clean up dpcpp.cmake on Windos and fix compile warnings 2022-12-16 22:10:36 +01:00
Florian Reibold a55b29811c prevent warnings on Windows caused by TBB, and use of getenv and fopen 2022-12-16 22:10:36 +01:00
Florian Reibold 0319c4eb8f add stack protector option to dpcpp on Windows 2022-12-16 22:10:36 +01:00
Sven Woop 0cfd45a5c8 removed RTC_ERROR_UNSUPPORTED_GPU error code as not required 2022-12-16 07:36:36 +01:00
Florian Reibold 26bafeea69 update sycl-nightly to 20221214 2022-12-15 18:35:56 +01:00
Florian Reibold 60443356ff update ImGUI 2022-12-15 18:35:56 +01:00
Florian Reibold 4a08d4b584 Revert "switching VS studio tests <= 2017 to release mode due to long path problem."
This reverts commit 9d87771341.
2022-12-14 20:40:41 +01:00
Sven Woop 7a776ea326 using proper SYCL device and context to allocate ray tracing hardware BVH 2022-12-14 14:32:47 +01:00
Sven Woop 970b0cce01 bugfix to rtcSYCLDeviceSelector API function 2022-12-14 14:32:47 +01:00
Sven Woop 17f18161a1 building Embree SYCL release on Ubuntu 20.04 2022-12-14 09:52:33 +01:00
Sven Woop a9bac4107b removing level=2 workaround in intersection_filter_sycl, seems no longer required 2022-12-14 09:52:33 +01:00
Sven Woop 9808e020f3 matching intel_ray_flags_t layout for RTCRayQueryFlags 2022-12-14 08:31:32 +01:00
Sven Woop 33c19dcd5e - renamed RTCIntersectContext to RTCRayQueryContext
- renamed RTCIntersectContextFlags to RTCRayQueryFlags
2022-12-14 08:31:32 +01:00
Sven Woop 69efc70169 updates to API documentation 2022-12-13 09:38:24 +01:00
Sven Woop 7acf2de0d9 Upgrading to gfx-driver-ci-master-12953, ci-neo-master-025103 in CI 2022-12-13 08:18:30 +01:00
Sven Woop e63d793a90 Merge branch 'devel3' into devel 2022-12-13 07:32:17 +01:00
Florian Reibold 9d87771341 switching VS studio tests <= 2017 to release mode due to long path problem. 2022-12-12 20:26:14 +01:00
Florian Reibold db15739c60 prefix all executables with embree_ 2022-12-12 20:26:14 +01:00
Sven Woop 469af0da0e setting version to v4.0.0 2022-12-12 12:07:42 +01:00
Sven Woop 2071bfcf0c updated Embree version from 3 to 4 in man pages 2022-12-12 12:07:42 +01:00
Sven Woop 8770945360 embree_rthwif is static library now to not have additional shared libraries in release package 2022-12-12 12:07:42 +01:00
Sven Woop ec35eb0286 renamed embree_sycl.a to embree4_sycl.a 2022-12-12 12:07:42 +01:00
Sven Woop d1f518dab0 renamed RTC_FEATURE_FLAGS_ to RTC_FEATURE_FLAG_ to be consistent with other API flag namings 2022-12-12 11:16:30 +01:00
Sven Woop c1f0b9d37c fixed download link, properly installing rthwif 2022-12-12 09:35:14 +01:00
Sven Woop 05a61154a3 - passing DPC++ include path is not required for -fsycl compilations
- cleanups to minimal tutorial CMakeList.txt
2022-12-12 09:35:14 +01:00
Sven Woop 8a4cb2be0d using gfx-driver-ci-master-12917 in CI and disabling implicit scaling workaround 2022-12-08 17:17:20 +01:00
Sven Woop dfa6fd0192 updates to documentation 2022-12-08 12:17:04 +01:00
Sven Woop 488ed9e52f added documentation of rtcGetSYCLDeviceFunctionPointer 2022-12-08 12:17:04 +01:00
Sven Woop 3ce37e26a3 added documentation of rtcSetGeometryEnableFilterFunctionFromArguments API function 2022-12-08 12:17:04 +01:00
Sven Woop 580720036c documented rtcNewSYCLDevice, rtcIsSYCLDeviceSupported, rtcSYCLDeviceSelector, and rtcSetDeviceSYCLDevice API functions. 2022-12-08 12:17:04 +01:00
Sven Woop 872244a8b5 enabling rthwif testing also under Windows 2022-12-08 12:17:04 +01:00
Sven Woop 8105038576 updated docu link to compute runtime, documenting need to pass path to DPC++ headers 2022-12-08 12:17:04 +01:00
Sven Woop 852392131d removed need of using special linker and -L on Windows from documentation 2022-12-07 19:00:51 +01:00
Sven Woop 35e595e57b documentation updates 2022-12-07 14:36:24 +01:00
Sven Woop efd2d3f673 introduced RTC_INTERSECT_CONTEXT_FLAG_INVOKE_ARGUMENT_FILTER to enforce argument filter invokation for each geometry 2022-12-07 14:36:24 +01:00
Florian Reibold b3cc487a84 use lld-link which is now shipped with dpcpp. 2022-12-07 12:17:26 +01:00
Florian Reibold 1bef971a55 turn EMBREE_SYCL_SUPPORT off on Windows when DPC++ compiler is not used. 2022-12-07 12:17:26 +01:00
Sven Woop 502da96c8f using releases_22ww49-ci-master-12886 windows driver in CI 2022-12-07 09:13:53 +01:00
Sven Woop 4cb241b02b enabling curves in DPCPP release builds 2022-12-07 07:41:02 +01:00
Sven Woop 76d3f4dc57 removed some workaround that disable CI tests 2022-12-06 20:44:08 +01:00
Sven Woop 5d670c5dca using neo-releases-22.43.24595.35 NEO release in CI 2022-12-06 17:15:13 +01:00
Sven Woop 892ba6ff39 removing rt_validation_api:OFF from CI, validation API is OFF by default 2022-12-06 13:09:56 +01:00
Sven Woop 2bffb487c7 upgrading CI to gfx-driver-ci-master-12886 and disabling ZEBinary workarounds 2022-12-06 13:09:56 +01:00
Sven Woop 165f7fd28a upgrading CI to ci-neo-master-025028 and removing ZEBinary workarounds 2022-12-06 10:49:30 +01:00
Sven Woop 2720391971 disabing benchmark output for rthwif_test_builder_instances CI tests 2022-12-06 10:49:30 +01:00
Sven Woop a37d69cf0b marking most SYCL cmake options as advanced 2022-12-06 10:49:30 +01:00
Sven Woop 32947abb8e removed EMBREE_SYCL_MBLUR cmake option 2022-12-06 10:49:30 +01:00
Sven Woop 99c0863f47 changes to upgrading from Embree 3 to Embree 4 section as will as changelog 2022-12-06 10:49:30 +01:00
Sven Woop 21d7bf823e updates to section Embree SYCL known issues 2022-12-06 10:49:30 +01:00
Sven Woop 7e64f9e7fa documented that JIT compilation is preferred 2022-12-06 10:49:30 +01:00
Sven Woop 558d4a0d79 updates to CMake configuration docu section 2022-12-06 10:49:30 +01:00
Sven Woop 2c31adfce1 updates to Building Embree SYCL Applications section 2022-12-06 10:49:30 +01:00
Sven Woop ad265eb05f added optimization section on generic pointers 2022-12-06 10:49:30 +01:00
Sven Woop 90aa2efd65 documented RTCFeatureFlags 2022-12-05 11:39:34 +01:00
Sven Woop c5a799cd37 updated documentation of rtcIntersect1/4/8/16 and rtcOccluded1/4/8/16 2022-12-05 11:39:34 +01:00
Sven Woop b9fe049361 updates to Embree SYCL API documentation 2022-12-05 11:39:34 +01:00
Sven Woop de6dfc1219 enabling pre-splits in rthwif BVH builder only in high quality mode 2022-12-05 07:54:38 +01:00
Sven Woop bc2df82748 checking if ray tracing extension supported by L0 2022-12-02 13:56:05 +01:00
Sven Woop b40903be53 enabled geometry callbacks for some CPP tutorials for testing purposes 2022-12-02 13:56:05 +01:00
Sven Woop 097a5dcc16 added rtcSetGeometryEnableFilterFunctionFromArguments API function 2022-12-02 13:56:05 +01:00
Sven Woop 02bdca66c5 multiscene_geometry tutorial uses proper feature mask 2022-12-02 10:16:35 +01:00
Sven Woop 3a8022b079 regenerated CPP tutorials from ISPC version 2022-12-02 10:16:35 +01:00
Sven Woop 9696aec1e8 updates to fix ISPC to CPP tutorial conversion 2022-12-02 10:16:35 +01:00
Sven Woop 2892258183 - updating to ci-neo-master-024996 and gfx-driver-ci-master-12868 in CI
- enabling production ray tracing API in CI tests
- enabling production ray tracing API by default in cmake
- switching Windows SYCL CI tests to AOT mode
2022-12-01 13:49:33 +01:00
Sven Woop d267ae2a9e introduced RTCOccludedArguments to API 2022-12-01 11:57:42 +01:00
Sven Woop 503e2e2da7 optimizations to intersection_filter tutorial 2022-12-01 11:57:42 +01:00
Sven Woop 8506eaeb4d removed _IN_GEOMETRY and _IN_ARGUMENTS cmake options as no longer required 2022-12-01 11:57:42 +01:00
Sven Woop 75ef03f919 fixing issues with using Embree install package 2022-12-01 09:32:43 +01:00
Sven Woop a8a31ce57d disabling SYCL by default 2022-12-01 08:45:21 +01:00
Sven Woop 48c4670690 updating to neo-releases-22.43.24595.34 in CI 2022-11-30 20:35:28 +01:00
Sven Woop fddb490299 rtcSetDeviceSYCLDevice does not check if device is supported by Embree as user may not necessarily run on that device 2022-11-30 20:35:28 +01:00
Florian Reibold c3b291fa69 update sign file location 2022-11-30 13:22:11 +01:00
Sven Woop 07d4ea79b9 added missing dependency from embree_rthwif to embree_rthwif_sycl 2022-11-30 12:04:28 +01:00
Sven Woop e8a45f636f added rtcSetDeviceSYCLDevice API call 2022-11-30 10:09:00 +01:00
Sven Woop 8fefc7c80a disabling geometry callbacks by default in SYCL only 2022-11-30 10:09:00 +01:00
Sven Woop fce5fb5822 using ci-neo-master-024982 in CI 2022-11-30 08:52:19 +01:00
Sven Woop f6553e08c8 adding rthwif_production into embree_rthwif target 2022-11-29 20:28:01 +01:00
Sven Woop 5406fccd5d avoiding dispatch globals allocation when implicit dispatch globals are used 2022-11-29 10:50:02 +01:00
Sven Woop 1950e3028e marking TBB cmake variables as advanced 2022-11-29 10:02:28 +01:00
Sven Woop f93aac0af5 some DPC++ to SYCL replacements in docu 2022-11-29 10:02:28 +01:00
Sven Woop 8b92ac387d updating Linux DPC++ compilation and driver install instructions 2022-11-29 10:02:28 +01:00
Sven Woop b96174019a added L0 code to query if RT hardware supported, still kept disabled due to issues 2022-11-29 10:02:28 +01:00
Sven Woop d1fb8eb0bd printing render frame rate and total frame rate in window 2022-11-29 08:36:25 +01:00
Sven Woop 6066aafbc0 setting device revision again for DG2 in AOT mode as a temporary workaround 2022-11-29 08:36:25 +01:00
Sven Woop aa8decf2f2 measuring frame rate displayed in the application window on the device 2022-11-28 12:44:11 +01:00
Sven Woop b55e153af2 added benchmark mode for dynamic_scene tutorial 2022-11-28 12:44:11 +01:00
Sven Woop 2d45f07b39 no longer passing arrays through TutorialArguments for quaternion_motion_blur tutorial 2022-11-28 12:44:11 +01:00
Sven Woop 0add4062f0 no longer passing arrays through TutorialArguments for motion_blur_geometry tutorial 2022-11-28 12:44:11 +01:00
Sven Woop b87561e9b7 No longer passing arrays through TutorialArguments for user_geometry and instanced_geometry tutorials.
Using USM allocations for these arrays significantly improved performance.
2022-11-28 12:44:11 +01:00
Sven Woop d971145475 making accumulation buffer read/write 2022-11-28 11:19:33 +01:00
Sven Woop 87c1c05675 - using SYCL JIT compilation by default
- using EMBREE_CI_DEVICE to determine GPU test is run on
- removing EMBREE_SYCL_AOT_DEVICE_REVISION cmake variable, no longer required
2022-11-28 09:33:49 +01:00
Sven Woop 5a7c52e13d Setting default frequency level to SIMD256 for ARM on all platforms. 2022-11-28 08:27:19 +01:00
Sven Woop 3aec5fc02f Refactoring of CI testing:
- mainly testing JIT in continuous tests
- testing internal an public release driver in continuous tests
- moved some less important tests to nighty testing
2022-11-28 08:17:33 +01:00
Sven Woop c2386dbdae - building releases with public gfx driver
- building releases in JIT mode
- DEFAULT gfx version renamed to INTERNAL
2022-11-25 14:13:14 +01:00
Sven Woop 28b6ba0cee using neo-releases-22.43.24595.29 as public gfx driver in CI 2022-11-25 11:55:41 +01:00
Sven Woop 852bc04c36 using gfx-driver-ci-master-12830 in CI 2022-11-24 17:58:24 +01:00
Sven Woop 16ae9a4832 removed geometry filter invokation from quaternion_motion_blur tutorial 2022-11-24 09:36:16 +01:00
Sven Woop c48d4e8820 - renamed rtcFilterIntersection to rtcInvokeIntersectFilterFromGeometry
- renamed rtcFilterOcclusion to rtcInvokeOccludedFilterFromGeometry
2022-11-24 09:36:16 +01:00
Sven Woop 13671e8f1a rtcFilterIntersection and rtcFilterOcclusion only invokes geometry filter function
This reverts commit a714a0cbfa.
2022-11-24 09:36:16 +01:00
Sven Woop a5e86253cb adding instID argument to rtcForwardIntersect/Occluded functions 2022-11-24 09:36:16 +01:00
Sven Woop 3d44cb5b7a fixed compile warning 2022-11-24 07:50:07 +01:00
Sven Woop dff9a579c0 rtcForwardIntersect/Occluded do not need to handle NULL intersect arguments 2022-11-24 07:50:07 +01:00
Sven Woop e677b4a701 using default RTCIntersectContext whenever possible 2022-11-24 07:50:07 +01:00
Sven Woop 07ea5d3baf moving RTCIntersectContext to RTCIntersectArguments 2022-11-24 07:50:07 +01:00
Florian Reibold d119c19dd3 update Ubuntu docker to 22.04 for all SYCL/GPU builds 2022-11-23 13:07:59 +01:00
Sven Woop 1ac7c3080c implemented argument filter function support in pathtracer, keeping filter functions disabled 2022-11-22 17:03:10 +01:00
Sven Woop f5b6020ae5 - disabling filter function in pathtracer
- disabling pathtracer tests that require filter function
- enabling pathtracer testing in JIT mode
2022-11-22 17:03:10 +01:00
Sven Woop a36a5762b3 removed OBJ intersection filter from pathtracer to simplify filter callbacks 2022-11-22 17:03:10 +01:00
Sven Woop a721de1983 removed unused intersectionFilterReject function from pathtracer 2022-11-22 17:03:10 +01:00
Sven Woop dd34312db0 motion blur tutorial supports argument intersect function 2022-11-22 17:03:10 +01:00
Sven Woop db40f66965 quaternion motion blur tutorial uses argument intersect function 2022-11-22 17:03:10 +01:00
Sven Woop eed9c10fbb updated overview and platforms documentation sections 2022-11-18 12:19:38 +01:00
Sven Woop 246f85a99b optimization to next_hit tutorial to allow inlining of filter callback 2022-11-18 12:19:38 +01:00
Sven Woop a3bb8e2375 - hair_geometry tutorial uses argument version of filter function
- improved performance of hair_geometry tutorial by stopping shadow rays when transparency close to 0
2022-11-18 12:19:38 +01:00
Sven Woop b77e220f1b not using open-linux driver for release builds for now 2022-11-18 09:43:38 +01:00
Sven Woop 94b8a9b68d also using open-linux-driver-ci-dev_igc-12785 in CI 2022-11-17 14:34:12 +01:00
Sven Woop 8e9824b6ae enabling ray masking by default in cmake 2022-11-17 09:07:57 +01:00
Sven Woop 4c6a2dcee6 bugfix on ray mask test in verify 2022-11-17 09:07:57 +01:00
Sven Woop 574aba75b3 updating CI to gfx-driver-ci-master-12767 2022-11-17 09:07:57 +01:00
Sven Woop c4eb67c760 bugfix on ray mask test in verify 2022-11-17 08:48:16 +01:00
Sven Woop d37d6d9940 renamed IN_CONTEXT -> IN_ARGUMENTS for cmake variables and feature flags 2022-11-16 13:44:42 +01:00
Sven Woop fed14bffc5 documented that an Embree SYCL device can only get used on the GPU 2022-11-16 13:44:42 +01:00
Sven Woop b663c2bb62 moved invokation of CPU and GPU builder to separate functions in scene.cpp 2022-11-16 13:44:42 +01:00
Sven Woop 4b45e29c81 removed unused is_build variable from Embree scene 2022-11-16 13:44:42 +01:00
Sven Woop 0d2bbcf44d Removing stream tracing API 2022-11-16 09:19:40 +01:00
Sven Woop a714a0cbfa rtcFilterIntersection and rtcFilterOcclusion invokes geometry and context filter function 2022-11-15 16:43:37 +01:00
Sven Woop 07c1dcbb40 using faster copy of org and dir for rtcForwardIntersect/Occluded 2022-11-15 16:43:37 +01:00
Sven Woop 5f37c89eb6 - documented rtcForwardIntersect1/4/8/16 and rtcForwardOccluded1/4/8/16
- ray forwarding only forwards ray origin and direction
2022-11-15 16:43:37 +01:00
Sven Woop 7290eeb430 passing SYCL context and device objects directly to rtcNewSYCLDevice 2022-11-15 16:43:37 +01:00
Sven Woop 7ecd06bb73 renamed RTC_FEATURE_ to RTC_FEATURE_FLAGS_ in Embree API 2022-11-15 16:43:37 +01:00
Sven Woop 7eb1af9d12 using gfx-driver-ci-master-12725 in CI 2022-11-14 07:33:28 +01:00
gerdya 20ef1bab95 Changes required for Windows ARM64 2022-11-14 07:29:47 +01:00
Sven Woop 607541cdab bugfix to user_geometry tutorial when compiled without context user geometry callbacks 2022-11-11 07:38:00 +01:00
Sven Woop 39bbcbddec using gfx-driver-ci-master-12700 in CI 2022-11-10 15:23:46 +01:00
Florian Reibold 3dea890136 update mac jobs to at least TBB 2021.1.1 2022-11-10 12:14:48 +01:00
Florian Reibold 64c6efec84 macOS jobs use the "build" tag. 2022-11-10 12:14:48 +01:00
Sven Woop bfe33678a5 fixed in export map files due to slightly changed name mangling in clang when using Embree API namespace 2022-11-10 11:50:34 +01:00
Sven Woop a46b2bc3f7 passing context and device to rtcNewSYCLDevice 2022-11-10 11:22:24 +01:00
Sven Woop 5785dbe19b removed RTC_SYCL_KERNEL makro as no longer required 2022-11-10 11:22:24 +01:00
Sven Woop 9bc6062432 rtcForwardIntersect pushes instance ID 2022-11-10 11:22:24 +01:00
Sven Woop 416d81d7b8 user_geometry tutorial pushes instance geomID 2022-11-10 11:22:24 +01:00
Sven Woop 903bf14134 renamed rtcGetSYCLFunctionPointer to rtcGetSYCLDeviceFunctionPointer 2022-11-10 11:22:24 +01:00
Sven Woop 859c898514 added rtcSYCLDeviceSelector API function 2022-11-10 11:22:24 +01:00
Sven Woop 7ec50b62a6 renamed RTC_ERROR_UNSUPPORTED_DEVICE to RTC_ERROR_UNSUPPORTED_GPU 2022-11-10 11:22:24 +01:00
Sven Woop 529ed1bd9c removed workaround that avoided passing function pointer types as kernel argument 2022-11-10 11:22:24 +01:00
Sven Woop 752ff668b8 removed unnecessary casting to user geometry and filter callback types 2022-11-10 11:22:24 +01:00
Sven Woop e27f1c1e50 fixed compile issue when user geometries were disabled 2022-11-10 11:22:24 +01:00
Sven Woop b62e2d3bf6 using proper argument types for API callback type definitions 2022-11-09 15:12:05 +01:00
Sven Woop 99d5c8e163 - passing RTCIntersectContext to rtcIntersect and rtcOccluded functions
- removing rtcIntersectEx1 function
- moving all RTCIntersectContext members to RTCIntersectArguments, except instance stack
2022-11-09 15:12:05 +01:00
Sven Woop ee077ad4bc added -cl-intel-greater-than-4GB-buffer-required flag to rthwif tests as bug workaround 2022-11-08 08:08:42 +01:00
Sven Woop fa82a16413 disabling some IGC workarounds 2022-11-07 18:01:21 +01:00
Sven Woop 5f668108c6 using gfx-driver-ci-master-12316 in CI 2022-11-07 09:43:53 +01:00
Sven Woop fe069d4772 geometry user callback and geometry filter callback can get properly disabled using feature mask 2022-11-07 09:03:20 +01:00
Sven Woop dfb7457acc added support to use production version of ray tracing API 2022-11-04 11:30:25 +01:00
Sven Woop 3b00158de4 Merge branch 'devel3' into swoop/devel 2022-11-04 07:02:45 +01:00
Sven Woop b088b0e1bf removed ARM detection using TRY_COMPILE, no longer required 2022-11-03 10:16:36 +01:00
Florian Reibold 6d37e15774 add rthwif CMake export 2022-11-02 15:36:33 +00:00
George H. Silva db38462ce1 Section title format fix for "Embree Support and Contact"
Added a new line to fix formatting issue that was mixing the section title with the previous paragraph.
2022-10-27 08:01:30 +02:00
Sven Woop b0917072ec fixed compile warning 2022-10-26 10:11:04 +02:00
Will Usher 8f46375bbd Set EXCLUDE_FROM_ALL on the tbb_static build dir to not install it
Without excluding the directory we end up installing the static build of
TBB alongside the Embree install. We don't need to package/redistribute
this and it causes issues in OSPRay's superbuild, so we can exclude it
from the default targets.
2022-10-25 06:56:50 +02:00
Sven Woop 4d3dd95676 enabling intensive JIT testing for DG2 2022-10-24 19:31:40 +02:00
Sven Woop 39a25fd855 embree_rthwif can get compiled stand alone 2022-10-24 11:38:47 +02:00
Sven Woop dcd5cdb551 using new allocator in rthwif builder implementation 2022-10-24 11:38:47 +02:00
Sven Woop 2d14a6f409 - adding --frames <int> command line option and testing triangle_geometry_sycl with many frames
- enabling triangle_geometry_sycl tutorial in PVC CI again
2022-10-24 08:30:45 +02:00
Sven Woop 0ee1c388e4 disabling windows ICX test temporarily 2022-10-20 07:04:44 +02:00
Florian Reibold fece5e1992 Frei/devel (#2309)
* automatically download GFX driver and DPCPP compiler in CI also on Windows

* fix linking for sycl lib with ABI numbering on Windows

* use full gfx driver path for downloading.
2022-10-18 15:47:42 +02:00
Sven Woop 5f8aa3d167 added ZE_RESULT_RAYTRACING_OPERATION_DEFERRED result to rthwif_builder_spec 2022-10-17 04:22:54 -05:00
Sven Woop b1dd5db65a first draft of L0 version of rthwif_builder API 2022-10-14 05:41:20 -05:00
Sven Woop 609159bf08 removing SYCL dependency from rthwif_builder API 2022-10-14 05:41:20 -05:00
Sven Woop f9cef47292 making TBB content fetching verbose 2022-10-14 04:37:55 -05:00
Sven Woop 5f430613ca fixed compile warning related to specialization constant usage 2022-10-14 04:37:55 -05:00
Sven Woop 65295f494c made rthwif_production implementation independent to embree specific headers 2022-10-14 04:37:55 -05:00
Sven Woop f9c1fbc8fa Improvements and bugfixes to scene based feature mask selection
- scene hierarchy is traversed completely
- curves and point s sub-types are detected properly
- ISPC crash fixed
- pathtracers properly disables specialization constant usage in AOT mode
2022-10-14 00:45:50 -05:00
Werner, Stefan 8629802739 Viewer and Pathtracer are now determining their specialization constants based on the scene 2022-10-14 00:45:50 -05:00
Sven Woop 1fb2c7f413 renamed EMBREE_DPCPP cmake variables to EMBREE_SYCL 2022-10-13 00:45:42 -05:00
Sven Woop d1ff5bf7b7 rthwif_test: adding scratch and accel buffer bounds checking 2022-10-12 04:02:48 -05:00
Sven Woop 1573a6c6ab rthwif_test: adding multi-threading 2022-10-12 04:02:48 -05:00
Sven Woop aac5b07775 rthwif_test: adding benchmark mode 2022-10-12 04:02:48 -05:00
Sven Woop facb5cd25b rthwif_build: returning new size estimate from failed build 2022-10-11 05:39:14 -05:00
Sven Woop 4b29171a4c rthwif_build: returning acceleration structure size 2022-10-11 05:39:14 -05:00
Sven Woop 9090fd4251 rthwif_builder: using estimateSize function from SAH builder 2022-10-11 05:39:14 -05:00
Sven Woop 79779442d8 rthwif_test: adding random NULL geometries for testing 2022-10-11 05:39:14 -05:00
Sven Woop 8ad2befce1 rthwif_test: adding test of worst case accel bytes 2022-10-11 05:39:14 -05:00
Sven Woop 6114d33b9e removing EMBREE_DPCPP_IMPLICIT_DISPATCH_GLOBALS define and added EMBREE_DPCPP_ALLOC_DISPATCH_GLOBALS define 2022-10-11 01:56:25 -05:00
Sven Woop bc50bac086 using intel_ray_query_abandon 2022-10-11 01:56:25 -05:00
Sven Woop 608a5e8dd9 Using ray tracing allocation desciptor (ze_raytracing_mem_alloc_ext_desc_t) to allocate acceleration structure data. 2022-10-11 01:56:25 -05:00
Sven Woop bda501591d fixed to rtcore_scene.h 2022-10-11 01:56:25 -05:00
Sven Woop c68e72873a rthwif_build: builder uses scratch buffer 2022-10-11 01:56:25 -05:00
Sven Woop 8c86d5a5d3 rthwif_build: matching implementation header with specification 2022-10-11 01:56:25 -05:00
Sven Woop b0961491c5 rthwif_test: using device_read_only USM allocations and increased test size 2022-10-11 01:56:25 -05:00
Sven Woop 588d25f92e rthwif_test: added mixed geometry type BVH build test 2022-10-11 01:56:25 -05:00
Sven Woop 1bc27317b7 rthwif_test: added instance geometry BVH test 2022-10-11 01:56:25 -05:00
Sven Woop cc1ef8c7dd rthwif_test: added procedural geometries BVH build test 2022-10-11 01:56:25 -05:00
Sven Woop 95f453c6bb rthwif_test: generalized calculation of expected output 2022-10-11 01:56:25 -05:00
Sven Woop e6c725bc68 rthwif_test: testing also meshes that cannot get quadified 2022-10-11 01:56:25 -05:00
Sven Woop 99c358f230 rthwif_test: random triangle selection 2022-10-11 01:56:25 -05:00
Sven Woop 44be27bf19 rthwif_test: storing triangle ID as 4th triangle index 2022-10-11 01:56:25 -05:00
Sven Woop 94e329ea4c rthwif_test: adding first BVH build test 2022-10-11 01:56:25 -05:00
Sven Woop 73a6454681 rthwif_test: moved expected output generation to separate function 2022-10-11 01:56:25 -05:00
Sven Woop bce61f9d89 introduced instance transformation formats in rthwif build API 2022-10-11 01:56:25 -05:00
Sven Woop ad1271db3d rthwif build API uses bounds pointer for instances to avoid read from hardware accel in top-level build 2022-10-11 01:56:25 -05:00
Sven Woop b9a69e17a8 rthwif builder performs check of geometry descriptors 2022-10-11 01:56:25 -05:00
Krzysztof Raszkowski a7d222f1e0 Add --compare argument to rthwif_cornell_box test 2022-10-10 03:43:55 -05:00
Krzysztof Raszkowski e3652a6c09 Fix download gfx_driver & dpcpp scripts 2022-10-07 05:03:40 -05:00
Sven Woop ae0142710d added EMBREE_DISABLE_DEVICEID_CHECK env option to disable deviceID check 2022-10-07 02:39:13 -05:00
Sven Woop cc31a74309 enabling spill compression disable workaround again 2022-09-30 11:28:24 -05:00
Sven Woop c7c3d15443 upgrading CI to DPC++ compiler 20220914 2022-09-30 04:38:22 -05:00
Sven Woop 7402ec4e44 using sycl::gpu_selector_v for newer DPC++ compiler versions 2022-09-30 04:38:22 -05:00
Sven Woop 2070a1fdb4 updates to rthwif_builder_spec, improved transformation layout spec and naming 2022-09-30 02:29:36 -05:00
Sven Woop 1cc4f415b0 running release CI workflow only in nightly build 2022-09-30 02:29:36 -05:00
Sven Woop 8cf55d6de0 building separate mblur BVHs over static and mblur geometry 2022-09-29 08:56:21 -05:00
Sven Woop bd5f291b5b removing internal rthw BVH builder that was directly connected to Embree scene 2022-09-29 08:56:21 -05:00
Sven Woop 067b6c956e using statically build TBB in rthwif_builder implementation 2022-09-29 03:20:59 -05:00
Sven Woop 522a0bcc9b implemented rthwif builder thread join interface 2022-09-29 03:20:59 -05:00
Sven Woop 129585a2ad enabling binary rthw BVH build interface by default 2022-09-28 02:43:23 -05:00
Sven Woop 78d7d2e574 Disabling Windows DG2 CI test for internal tasking system to get faster CI turn arounds. 2022-09-28 02:43:23 -05:00
Sven Woop 9ca9407a4e fixed bug with invalid instance bounds in rthw BVH builder 2022-09-28 02:43:23 -05:00
Sven Woop 846b3a9934 enabling implicit dispatch globals usage by default 2022-09-23 08:21:51 -05:00
Sven Woop 0fabc2654e using default sub group size for kernels 2022-09-22 17:39:47 +02:00
Sven Woop 06d76804f9 running continuous workflow no longer on pull requests 2022-09-22 10:58:06 +02:00
Sven Woop 9a5e193e3e Extensions to rthwif build API:
- adding format for transformations
- adding list of acceleration structures to be intersected sequentially
- adding parallel build operation for parallelization
2022-09-22 10:58:06 +02:00
Sven Woop f644a820d8 enabled CI test for binary HW BVH build interface 2022-09-22 10:58:06 +02:00
Sven Woop facdf1261c introduced EmbreeHWAccel struct to access list of HWAccels 2022-09-22 10:58:06 +02:00
Sven Woop 3a826418bd upgrading to CI to gfx-driver-ci-master-12316 2022-09-22 09:22:05 +02:00
Sven Woop 01e277a994 fixed include paths to parallel_for.h 2022-09-21 11:35:35 +02:00
Sven Woop ad194c1551 removing spill compression disable workaround 2022-09-21 11:35:35 +02:00
kraszkow 7c630ce2fb ci: leave only benchmark jobs in gitlab (#2270) 2022-09-21 07:35:55 +02:00
Sven Woop b77caa8e1a remove inplace version of RTHWIF_GEOMETRY_TYPE_INSTANCE 2022-09-19 17:51:57 +02:00
Sven Woop 184a43a9ef updates to rthwif_test 2022-09-19 17:50:53 +02:00
Sven Woop 0e27bd0ae8 rthwif_builder uses new procedural callback that returns array of bounds 2022-09-19 17:50:43 +02:00
Sven Woop 1f7f8bccba renames to make rthwif_builder match spec 2022-09-19 09:26:02 +02:00
Sven Woop e756e20b02 documented accelBufferBytesOut semantics when build succeeds/fails 2022-09-19 09:26:02 +02:00
Sven Woop 58b7ea36e9 further changes to rthwif_builder_spec 2022-09-19 09:26:02 +02:00
Sven Woop f957f46151 added improved and documented rthwif_builder_spec 2022-09-19 09:26:02 +02:00
Werner, Stefan 3429d3e0fb Make SYCL tutorials work when iGPU is present:
The SYCL context passed to rtcNewSYCLDevice() must contain only RT capable devices.
The default context we get from a queue contains all level zero devices, so
better create a new context with just the device we intend to use.
2022-09-15 14:19:36 +02:00
Sven Woop bab4432eda fixed bug in hardware BVH builder when geometries where NULL 2022-09-14 08:12:33 +02:00
Sven Woop 02a31b9ef8 using internal gfx-driver for DPC++ release build for now 2022-09-09 09:55:42 +02:00
Sven Woop ec4d5c4fda running nightly release build in github at 00:00 UTC 2022-09-09 09:50:06 +02:00
Sven Woop b0d66941f0 setting JIT and AOT compile options 2022-09-08 13:51:34 +02:00
Sven Woop bf0f9da925 increased SYCL test timeout to 50s 2022-09-08 13:13:47 +02:00
Sven Woop 1ca49df973 disabling public gfx driver tests 2022-09-08 12:50:44 +02:00
Sven Woop a294083635 removed no longer required disabling of EU fusion workaround 2022-09-08 10:33:17 +02:00
Sven Woop 9e3fe8ba3b running nightly github CI at 00:00 UTC 2022-09-08 07:38:14 +02:00
Tomasz Pyra a37de47cfe added cmake option to generate dbg info in dpcpp kernels 2022-09-06 13:36:44 +00:00
Krzysztof Raszkowski 9257cad10a ci: add github actions workflows 2022-09-06 10:38:34 +02:00
Sven Woop 6fd9b19f61 Merge branch 'devel3' into swoop/merge_devel3_into_devel 2022-09-05 13:59:28 +02:00
Sven Woop 8988853d79 using high instance mask bit in instance_geometry tutorial 2022-09-05 08:32:14 +02:00
Sven Woop 230e7bcd86 fixed instance mask bug with high mask bits were used 2022-09-05 08:28:31 +02:00
Sven Woop eac1d0cd73 Enabled trav_loop always when instances are enabled to fix issues with high instance mask bits set. 2022-09-02 07:33:22 +00:00
Sven Woop f1d7e40302 Merge branch 'swoop/rt_production_api_naming' into 'devel'
rt_production API updates

See merge request renderkit/embree!1262
2022-09-02 07:32:11 +00:00
Sven Woop 18b28f67db getting rt_production API in sync with spec 2022-09-02 08:05:59 +02:00
Sven Woop 682d2ccb50 removed bvh_id from ray query and ray forward intrinsics 2022-09-02 08:03:32 +02:00
Sven Woop c27aa7247e removed bvh_level from intel_ray_query_forward_ray intrinsic 2022-09-02 07:36:32 +02:00
Sven Woop d363ebcb75 properly using intel_ray_flags_t type in rt_production API 2022-09-02 07:30:43 +02:00
Sven Woop 6f6d508e9a Using some more descriptive names for some rt_production API functions:
- intel_get_hit_barys -> intel_get_hit_barycentrics
- intel_get_hit_geomID -> intel_get_hit_geometry_id
- intel_get_hit_primID -> intel_get_hit_primitive_id
- intel_get_hit_primID_triangle -> intel_get_hit_triangle_primitive_id
- intel_get_hit_primID_procedural -> intel_get_hit_procedural_primitive_id
- intel_get_hit_instID -> intel_get_hit_instance_id
- intel_get_hit_instUserID -> intel_get_hit_instance_user_id
- intel_get_hit_triangle_verts -> intel_get_hit_triangle_vertices
2022-09-02 07:30:43 +02:00
Sven Woop 3a9ebc9484 renaming intel_ray_desc_t members O/D to origin/direction in rt_production API 2022-09-02 07:30:43 +02:00
Sven Woop 32c834c7bd removed bvh_level from intel_ray_query_init instrinsic in rt_production API 2022-09-02 07:30:43 +02:00
Sven Woop 5428ceffdb changed enumerants in rt_production API to be lower case 2022-09-02 07:30:43 +02:00
Sven Woop 1a1a9105e4 Renamed structs in rt_production RT API:
- RayFlagsINTEL -> intel_ray_flags_t
- RayDescINTEL -> intel_ray_desc_t
- ray_query_INTEL -> intel_ray_query_t
- raytracing_acceleration_structure_INTEL -> intel_raytracing_acceleration_structure_t
- float4x3_INTEL -> intel_float4x3
- HitTypeINTEL -> intel_hit_type
- CandidateTypeINTEL -> intel_candidate_type_t
2022-09-02 07:30:43 +02:00
Sven Woop 0c1829d096 added cmake option to switch between internal and driver RT hardware BVH builder 2022-09-01 16:43:05 +02:00
Sven Woop 441c92abbf removed old direct connection of HW BVH builder to Embree 2022-09-01 16:43:05 +02:00
Sven Woop f51958cc5c first attempt to unify internal HW builder and API HW builder 2022-09-01 16:43:05 +02:00
Sven Woop 1ee0b3ca62 parsing --jit-cache command line option in rthwif_test application 2022-09-01 09:09:35 +02:00
Krzysztof Raszkowski 3abbf405f9 TBB: Stop task_scheduler_observer when TaskScheduler is destroyed 2022-08-31 16:19:05 +02:00
Sven Woop 9395eccf98 upgrading gfx driver to gfx-driver-ci-master-12117 2022-08-30 10:10:58 +02:00
Sven Woop d986851869 using sycl namespace instead of cl::sycl namespace 2022-08-30 07:04:02 +02:00
Sven Woop 26a56fa72c fixed rtcForwardIntersect/Occluded implementation when driver HW BVH interface is used 2022-08-12 10:59:04 +02:00
Sven Woop ae2ec95bee fixed wrong primitive counting in driver HW BVH interface implementation 2022-08-12 10:54:49 +02:00
Sven Woop f2e36dd223 fixed wrong instanced accel passed when driver HW BUILD interface was used 2022-08-12 10:52:16 +02:00
Sven Woop fbbc01cd3d fixed wrong bounds propagation when driver HW BVH build interface was used 2022-08-12 10:48:41 +02:00
Sven Woop 41b015d9ef passing ray_query_INTEL* to each rt_production API function 2022-08-12 09:22:20 +02:00
Sven Woop 68c7bbca0f renamed ray_query_t to ray_query_INTEL, and rtas_t to raytracing_acceleration_structure_INTEL 2022-08-12 06:51:02 +02:00
Sven Woop 67dac5b626 added time to RayDescINTEL 2022-08-11 09:55:04 +02:00
Sven Woop ceaf0884a0 renamed CandidateType to CandidateTypeINTEL and prepended all enumerators with CANDIDATE_TYPE_INTEL_ 2022-08-11 09:45:06 +02:00
Sven Woop ae62b6b0f2 HitType -> HitTypeINTEL and prepending HIT_TYPE_INTEL_ to all enumerants 2022-08-11 09:35:41 +02:00
Sven Woop 94c5a173c9 prepending RAY_FLAGS_INTEL_ to RayFlagsINTEL enumerants 2022-08-11 09:26:08 +02:00
Sven Woop abe152b8af RayFlagsIntel -> RayFlagsINTEL 2022-08-11 09:26:08 +02:00
Sven Woop b2b91eece2 rayquery_t -> ray_query_t 2022-08-11 09:26:08 +02:00
Sven Woop 8134951b52 rt_production test uses randomized transformation for instancing 2022-08-11 09:26:08 +02:00
Sven Woop 07dbbd2fb6 rt_production API test checks local2world and world2local output 2022-08-11 09:26:08 +02:00
Sven Woop 0a3212af03 moved TraceRayCtrl to rthwif_internal.h 2022-08-11 09:26:08 +02:00
Will Usher 895bd755b7 Include dpcpp compilation target info in CMake config file export 2022-08-10 16:26:31 +00:00
Will Usher 1e9fc02118 Fix rounded kernel dispatch size to round up when there's a remainder 2022-08-10 16:26:31 +00:00
Sven Woop 3020907c41 fixed bug in rthwif_test when internal task scheduler is used 2022-08-10 17:14:55 +02:00
Sven Woop c910e1f645 - renamed intel_sync_ray_query to intel_ray_query_sync
- using pointers to rayquery_t instead of references
- renamed intel_get_ray_tnear to intel_get_ray_tmin
- remove intel_get_hit_instanced_accel function
2022-08-10 11:47:41 +02:00
Sven Woop 6b2cd74c61 no longer passing Embree device to binary HW BVH build interface 2022-08-10 11:15:53 +02:00
Sven Woop c35f343857 using intel_get_hit_instID short form in intel_rt_production API to be consistent with geomID/primID naming 2022-08-10 08:43:49 +02:00
Sven Woop 8e2a48bcf6 added testing for intel_get_hit_instanceUserID 2022-08-10 08:33:16 +02:00
Sven Woop 03d130cce5 implemented intel_get_hit_instanceUserID, intel_get_hit_world_to_object and intel_get_hit_object_to_world 2022-08-10 08:09:06 +02:00
Sven Woop 5b2a1ddfac cleanups to rthwif_production implementation 2022-08-10 07:25:32 +02:00
Sven Woop 6f4685d46f all software instancing rt_production API tests are working 2022-08-10 07:19:26 +02:00
Sven Woop 90d72f8dd9 software instancing rt_production API test works mostly 2022-08-10 07:19:26 +02:00
Sven Woop 93529bb9d0 procedural triangle rt_production API test works 2022-08-10 07:19:26 +02:00
Sven Woop 8e7d7cd868 skipping rt_production test when using public gfx driver and limiting number of errors printed 2022-08-10 07:19:26 +02:00
Sven Woop e61729aca2 adding manual dispatch globals allocation support to rt_production tests 2022-08-10 07:19:26 +02:00
Sven Woop 03daba5aa9 first procedural triangle test 2022-08-10 07:19:26 +02:00
Sven Woop 4ab3ece12c preparing test code to support procedural triangles 2022-08-10 07:19:26 +02:00
Sven Woop b5bbfdf78f hwinstancing tests work 2022-08-10 07:19:26 +02:00
Sven Woop f83f6804b2 rt_production test can create instances 2022-08-10 07:19:26 +02:00
Sven Woop ebeb2756d8 moved buildAccel to scene object 2022-08-10 07:19:26 +02:00
Sven Woop dddea4e368 started to add instancing support to rt_production API test 2022-08-10 07:19:26 +02:00
Sven Woop 173516cf97 added rthwif_test_triangles_anyhit_shader_commit/reject tests 2022-08-10 07:19:26 +02:00
Sven Woop 902603c8c1 rt_production API test checks committed and potential hit 2022-08-10 07:19:26 +02:00
Sven Woop 55182accb2 rt_production API test uses multiple geometries 2022-08-10 07:19:26 +02:00
Sven Woop ab8e7afb01 enabled user_geometry again when implicit globals are used 2022-08-10 07:19:26 +02:00
Sven Woop f8d7765d22 first version of rt_producton API testing 2022-08-10 07:19:26 +02:00
Sven Woop d86baad3a6 working around some regression 2022-08-10 07:19:26 +02:00
Sven Woop e7357c2c01 bugfix 2022-08-10 07:19:26 +02:00
Sven Woop 3afa6af001 fixed compile issue 2022-08-10 07:19:26 +02:00
Sven Woop 00d1b273ad added driver HW BVH builder support for mixed mblur and static geometry scenes 2022-08-10 07:19:26 +02:00
Sven Woop 530753feb7 first motion blur support in driver HW BVH builder 2022-08-10 07:19:26 +02:00
Sven Woop e7b76ea6d9 updates 2022-08-10 07:19:26 +02:00
Sven Woop 3b446526bd worked around compilation issue under Windows 2022-08-10 07:19:26 +02:00
Sven Woop db945a8757 fixed compile issue with disabled DPCPP support 2022-08-10 07:19:26 +02:00
Sven Woop f6d7c840ea - making rthwifGetAccelSize future proof
- added support of rthw_builder=default/driver to switch between both ray tracing hardware builders
2022-08-10 07:19:26 +02:00
Sven Woop 9ee431eca2 connected binary interface HW BVH builder to Embree 2022-08-10 07:19:26 +02:00
Sven Woop 643c293466 first version of binary interface to HW BVH builder 2022-08-10 07:19:26 +02:00
Will Usher f883f05299 Fix check for if we're compiling without AOT 2022-08-05 10:43:27 +00:00
Sven Woop 72fdc1333e using sycl::ext::oneapi::property::usm::device_read_only() mode and no longer using SYCL_PI_LEVEL_ZERO_USM_ALLOCATOR explicitely 2022-08-05 09:42:12 +00:00
Sven Woop 8cc11076f1 fixed tagging of wrong functions with RTC_SYCL_INDIRECTLY_CALLABLE in user_geometry tutorial 2022-08-05 10:35:24 +02:00
Sven Woop a55b9f8a6f upgrading to DPC++ compiler 20220802 2022-08-03 10:59:57 +02:00
Sven Woop d32fc2ab96 added cornell_box test for production RT API 2022-07-28 10:28:52 +02:00
Sven Woop 4ff0bd406c using fixed 128 bytes offset to root node in HW accel 2022-07-28 10:28:16 +02:00
Sven Woop 6e0797b11b added support to use intel_get_implicit_dispatch_globals intrinsic (disabled by default) 2022-07-27 07:00:04 +02:00
Sven Woop 3a709a3973 adding JIT test for PVC 2022-07-26 07:31:00 +02:00
Sven Woop 8712dfde94 - upgrading to DPC++ compiler sycl-nightly/20220721
- changing CL/sycl.hpp to sycl/sycl.hpp for new dpcpp compilers
2022-07-25 08:04:22 +02:00
Florian Reibold d1ca2ec15d add tutorial benchmarks 2022-07-08 11:23:54 +02:00
Florian Reibold a379d7936a update models for GPU benchmark tests 2022-07-08 11:23:54 +02:00
Tomasz Pyra a2426c370d CMake Large GRF option + enabled for fcall testcases 2022-07-07 09:14:23 +00:00
Sven Woop 534f957323 disabling specialization constant usage in AOT mode due to some DPC++ compiler bug 2022-07-04 16:23:05 +02:00
Sven Woop 9c03365189 switching to sycl-nightly/20220625 2022-06-27 10:50:08 +02:00
Krzysztof Raszkowski ad4c65f312 ci: switch testing to PVC B4 2022-06-24 14:14:49 +02:00
Sven Woop 9b71bda5c5 Merge branch 'devel3' into swoop/devel 2022-06-17 09:05:46 +02:00
Sven Woop bf6b3bbdb5 adding unused option -cl-intel-private-memory-minimal-size-per-thread XXX to dpcpp.cmake which can get used to increase private memory size when stack calls are used 2022-06-07 07:57:06 +02:00
Sven Woop 0f715949d4 disabling EMBREE_INSTALL_DEPENDENCIES again by default 2022-06-07 07:14:21 +02:00
Florian Reibold 9a0311e69d run gpu benchmark in regular ubuntu20.04 docker and clone benchmark
client with secret token
2022-06-02 20:34:47 +02:00
Sven Woop 96506fd585 merging IGC flag settings for windows and linux to common place 2022-06-02 07:48:22 +02:00
Sven Woop 8e58877119 no longer disabling __noinline for SYCL 2022-06-02 07:05:06 +02:00
Sven Woop a5336d60f1 using CMake list for CMAKE_IGC_OPTIONS 2022-06-02 07:04:13 +02:00
Sven Woop 4e53b1aa53 fixed issue where disabling JIT cache did also disable USM chunk allocator 2022-06-01 17:32:38 +02:00
Sven Woop 32fe90502e only enforcing sub-group size when geometry callbacks are enabled 2022-05-30 12:09:15 +02:00
Sven Woop e4a333627a adding CI test that disables geometry callbacks 2022-05-30 12:09:02 +02:00
Sven Woop 9cc348328f added rtcIsSYCLDeviceSupported API function to check if Embree is supported on some SYCL device 2022-05-30 08:08:30 +02:00
Sven Woop e084511dc0 lights no longer defined as indirectly callable 2022-05-30 08:07:18 +02:00
Sven Woop 4227298c8d upgrading to gfx-driver 11261 under Windows 2022-05-27 09:24:56 +02:00
Sven Woop b0331d8336 removed no longer required environment settings from device.cpp 2022-05-27 08:30:32 +02:00
Sven Woop 7dfc8e6080 No longer including sycl.hpp inside Embree API headers. If SYCL support
is required, the user should include sycl.hpp before including the
Embree API headers.
2022-05-25 08:21:17 +02:00
Sven Woop 79b1698901 upgrading to gfx-driver-ci-master-11261 2022-05-24 16:53:22 +02:00
Sven Woop 904352a030 cleanups to rthwif implementation 2022-05-24 11:28:27 +02:00
Sven Woop 2f006d8252 intel_get_hit_instanceID now properly returns instanceIndex 2022-05-24 11:18:09 +02:00
Sven Woop 695258eb80 prepending PATH to DPC++ compiler 2022-05-24 09:14:47 +02:00
Sven Woop 7151e780da added documentation on howto workaround issues when multiple GPUs are present in the system 2022-05-23 11:09:02 +02:00
Sven Woop fd5d25f5c3 using -j 8 in documentation, -j might run out of memory 2022-05-23 09:11:15 +02:00
Sven Woop e3f4689072 enabled JIT caching again when specialization constants are used 2022-05-23 08:17:10 +02:00
Sven Woop fcb1f15089 updating Windows driver version in documentation 2022-05-23 07:51:19 +02:00
Sven Woop 1c01d56ab5 added feature mask to pathtracer tutorial 2022-05-20 14:21:27 +02:00
Sven Woop ea904ec73e upgrading public win gfx driver to sdp/1011433 in CI 2022-05-20 11:02:27 +02:00
Sven Woop b2d27a2415 building Linux DPC++ release without curve support 2022-05-20 10:59:01 +02:00
Sven Woop 4f5eff30f9 proper options to enable large GRF mode 2022-05-20 10:56:18 +02:00
Sven Woop 2e5354ece4 some bugfixes to documentation of compiling Embree with DPC++ 2022-05-20 10:55:49 +02:00
Sven Woop 15dbebbe2b setting version to 4.0.0-alpha 2022-05-20 06:53:22 +02:00
Sven Woop a120065569 updates to README.md.in file for tutorials 2022-05-19 17:42:32 +02:00
Sven Woop 37ec3a2e09 added DPC++ release build 2022-05-19 12:56:49 +02:00
Sven Woop 13d88656fa added Embree DPC++ known issues docu section 2022-05-19 11:49:53 +02:00
Sven Woop 5d0a31b2ba viewer_sycl disables JIT caching when specialization constants are used 2022-05-19 09:48:12 +02:00
Sven Woop d506c8ce1d added --jit-cache command line option to disable JIT caching 2022-05-19 09:48:04 +02:00
Sven Woop ea022d49b4 Exporting tasking lib only for static Embree compilation.
Configuring tutorial/README.md file.
2022-05-19 07:47:16 +02:00
Sven Woop 41fa10a216 setting version to 4.0.0-alpha.0 2022-05-18 16:57:12 +02:00
Sven Woop b4638e3a6f increasing required GLIBCXX version to 3.4.14 2022-05-18 16:27:46 +02:00
Sven Woop 5b3ba15a73 removed Intel Compiler 2015 from supported compilers and CI testing as we trigger some compiler bug 2022-05-18 12:16:12 +02:00
Sven Woop 2b948de8a0 added more shortcuts to specify RTC_FEATURE_LINEAR_CURVES, RTC_FEATURE_BEZIER_CURVES, RTC_FEATURE_BSPLINE_CURVES, RTC_FEATURE_HERMITE_CURVES, and RTC_FEATURE_CURVES 2022-05-18 11:33:20 +02:00
Sven Woop 421bbf9e62 added feature mask to user_geometry tutorial 2022-05-18 11:05:36 +02:00
Sven Woop e8c56d7f94 removed specialization constant usage from triangle_geometry_tutorial, we have the viewer for this 2022-05-18 11:05:29 +02:00
Sven Woop a0df18d86f added feature mask to quaternion_motion_blur tutorial 2022-05-18 11:05:22 +02:00
Sven Woop 4326e69a77 - moved feature mask for point_geometry tutorial to beginning of file
- enabled more testing for point_geometry tutorial
2022-05-18 11:05:13 +02:00
Sven Woop d7410359f0 added feature mask to multi_instanced_geometry tutorial 2022-05-18 11:05:05 +02:00
Sven Woop 9639e32c2c added feature mask to motion_blur_geometry tutorial 2022-05-18 11:04:57 +02:00
Sven Woop b6946242ca added feature mask to minimal_sycl tutorial 2022-05-18 11:04:48 +02:00
Sven Woop 2a72da064e added feature mask to intersection_filter tutorial 2022-05-18 11:04:21 +02:00
Sven Woop bff92fba54 fixed disabling of intersection filter feature through feature mask 2022-05-18 09:51:27 +02:00
Sven Woop 4a14f27b81 added feature mask to instanced_geometry tutorial 2022-05-18 07:46:53 +02:00
Sven Woop b625276b5e added feature mask to hair_geometry tutorial 2022-05-18 07:43:26 +02:00
Sven Woop 4745be5b97 added feature mask to grid_geometry tutorial 2022-05-18 07:32:01 +02:00
Sven Woop ca3b5f30bd added feature mask to dynamic_scene tutorial 2022-05-18 07:28:29 +02:00
Sven Woop 15e53335d4 added feature mask to curve_geometry tutorial 2022-05-18 07:22:29 +02:00
Sven Woop 0740b26a77 improved feature masks for multi-level instancing 2022-05-17 17:29:11 +02:00
Sven Woop c1ccef36d9 using feature mask also for viewer debug shaders 2022-05-17 17:16:59 +02:00
Sven Woop ea687117a4 moved debug shaders to viewer application only, this significantly improved JIT compile time of all other tutorials 2022-05-17 16:39:14 +02:00
Sven Woop 7681ea0694 added specialization constants and command line parsing for feature mask to viewer_sycl 2022-05-17 11:41:46 +02:00
Sven Woop d6744dcef7 fixing issue with feature mask and RTC_MAX_INSTANCE_LEVEL_COUNT > 1 2022-05-17 10:02:04 +02:00
Sven Woop 6c93af818a added feature flags also to ISPC API 2022-05-17 09:21:39 +02:00
Sven Woop 61f76046a2 fixing compile issue when DPC++ support was disabled 2022-05-17 08:42:57 +02:00
Werner, Stefan e464957bb0 Added specialization constant to point geometry tutorial 2022-05-17 08:20:57 +02:00
Werner, Stefan 31bfb98e95 Added missing feature filter for motion blur 2022-05-17 08:11:17 +02:00
Werner, Stefan 2b76179243 Added RTC_FEATURE_NONE to common header 2022-05-17 08:11:06 +02:00
Werner, Stefan 6154a26060 Enabled specialization constants in SYCL triangle tutorial 2022-05-17 08:10:46 +02:00
Werner, Stefan 16add3cc79 Added feature_mask variable to IntersectArguments and condidtionals around features.
This enables the use of SYCL specialization constants to get custom kernel via JIT.
2022-05-17 08:04:37 +02:00
Sven Woop f2296e8aef using work group size (4,4) which works on DG2 and PVC 2022-05-17 07:20:52 +02:00
Sven Woop a409306fed allowing rendering of arbitrary screen resolutions 2022-05-17 07:14:54 +02:00
Sven Woop 981fac5ce4 no longer disabling various warnings for SYCL compilation 2022-05-16 16:52:53 +02:00
Sven Woop 7b1da542ce removing SYCL_LIBS, seems not required 2022-05-16 16:48:27 +02:00
Sven Woop cc3cff6048 removed some workarounds that disabled some tutorials in some configs 2022-05-16 12:57:29 +02:00
Sven Woop ba56b8d823 documenting that user geometry bounds callbacks are host side functions always 2022-05-16 11:16:42 +02:00
Sven Woop 8ee98f8b66 printing CMake warning when filter and user geometry callback support in geometries are enabled 2022-05-16 11:16:34 +02:00
Sven Woop 01876a91ad consistently adding -lsycl to link flags under Windows and Linux 2022-05-16 11:16:22 +02:00
Sven Woop 41ab55d382 fixes to DPC++ application compilation documentation for Windows 2022-05-16 10:33:48 +02:00
Sven Woop 4fab8dfd55 properly installing SYCL dependency under Windows 2022-05-16 10:32:56 +02:00
Sven Woop ffeb58261e documented how to build an Embree DPC++ application 2022-05-16 08:42:39 +02:00
Sven Woop 0bc72bb554 enabled EMBREE_ZIP_MODE and EMBREE_INSTALL_DEPENDENCIES by default 2022-05-16 08:42:29 +02:00
Sven Woop ce2d10135b adding minimal tutorial sources to install package 2022-05-16 08:23:39 +02:00
Florian Reibold 7d584a256a cleanup 2022-05-13 21:37:01 +02:00
Florian Reibold c27b70ec8a hide device's task arena behind execute interface 2022-05-13 21:37:01 +02:00
Florian Reibold b3990a2f2a remove taskingscheduler.h from default.h 2022-05-13 21:37:01 +02:00
Florian Reibold 1e2d84e3d7 don't link embree_sycl to tasking 2022-05-13 21:37:01 +02:00
Florian Reibold 339b5635a3 clean up parallel algorithm headers 2022-05-13 21:37:01 +02:00
Florian Reibold 3faac6e8db move more members in inner structs 2022-05-13 21:37:01 +02:00
Florian Reibold 06a4bbb7c7 move task group members into inner struct 2022-05-13 21:37:01 +02:00
Florian Reibold 27b5808d62 move checkIfModifiedAndSet into scene_verify.cpp 2022-05-13 21:37:01 +02:00
Florian Reibold ea5f29857f tutorial_ispc and tutorial should not link agains embree_sycl 2022-05-13 21:37:01 +02:00
Florian Reibold a1c4838146 fix tasking linking issues and remove rthwif library 2022-05-13 21:37:01 +02:00
Florian Reibold a202ec46e4 add CI tests that use the internal tasking scheduler for sycl 2022-05-13 21:37:01 +02:00
Florian Reibold da9991f236 make internal tasking scheduler's exception handling consistent with TBB 2022-05-13 21:37:01 +02:00
Sven Woop 010748022a adding RTC_SYCL_SIMD_WIDTH to rtcore_config.h 2022-05-13 08:29:12 +02:00
Sven Woop 2de04eeaa8 removed reqd_sub_group_size from API function declarations, enforcing sub group size only works at kernel level 2022-05-13 08:19:10 +02:00
Sven Woop 6d87ef3f5f making dg2 default under Linux and JIT default under Windows 2022-05-13 08:18:45 +02:00
Sven Woop cbc86b10a5 added DPC++ Memory Pooling section to documentation 2022-05-13 08:18:35 +02:00
Sven Woop 413aad098e enabling memory pooling and persistent JIT caching in minimal_sycl tutorial 2022-05-13 08:18:25 +02:00
Sven Woop 73c018f151 always detecting dpcpp when EMBREE_DPCPP_SUPPORT is enabled 2022-05-12 16:44:31 +02:00
Sven Woop ef402a1656 updates to Windows build instructions with DPC++ compiler 2022-05-12 16:40:32 +02:00
Sven Woop f1a94acc0e introduced RTC_SYCL_KERNEL kernel attribute 2022-05-12 07:58:54 +02:00
Sven Woop cd0e089842 linking embree target to embree_sycl target 2022-05-11 17:18:02 +02:00
Sven Woop 79f53a7baa enabled SYCL chunk allocator for shared USM allocations 2022-05-11 11:01:21 +02:00
Sven Woop fdd1a0234a removing SYCL allocation workaround 2022-05-11 10:52:04 +02:00
Sven Woop 68890ee767 allocator.clear() was executed too late in qbvh6_builder_sah 2022-05-11 10:38:48 +02:00
Sven Woop a8e1cebfce minimal_sycl tutorial properly hits triangle now 2022-05-11 09:40:46 +02:00
Sven Woop 38dee7497b increasing timeout for SYCL CI tests to 30s 2022-05-11 09:02:53 +02:00
Sven Woop 9d8fae0226 added rtcSetGeometryUserDataFromScene API function to be used during rendering 2022-05-11 08:30:22 +02:00
Sven Woop dfee935d4b removing rtcInterpolate SYCL implementation 2022-05-11 07:56:19 +02:00
Sven Woop 36040b6f03 enabled user_geometry_sycl again in JIT test 2022-05-10 20:52:16 +02:00
Sven Woop 3a31fd2931 fixed some compile warnings for Release build 2022-05-10 20:48:58 +02:00
Sven Woop 7902b2b000 updated instructions on compiling Embree with DPC++ under Linux 2022-05-10 20:48:58 +02:00
Sven Woop 29985989d1 using TBB2020.2 for Windows CI tests 2022-05-10 20:48:58 +02:00
Sven Woop a3c9bd9fe5 documented that AOT compilation with multiple devices is currently not working 2022-05-10 20:48:58 +02:00
Sven Woop 2dd58264fe Added documentation on how to install Windows HPG drivers. 2022-05-10 20:48:58 +02:00
Sven Woop 73d7e708ba increasing ctest timeout to 20s to properly run JIT tests 2022-05-10 20:48:58 +02:00
Sven Woop dda81883fd Revert "running Linux JIT CI test only on dg2-03 machine"
This reverts commit bd065a69f5.
2022-05-10 20:48:58 +02:00
Sven Woop deab2341e7 getting pathtracer to work when geometry filter functions are disabled 2022-05-10 17:17:06 +02:00
Sven Woop acbc9bc9b5 avoiding function pointers for light sampling and evaluation in pathtracer 2022-05-10 17:03:44 +02:00
Sven Woop bd065a69f5 running Linux JIT CI test only on dg2-03 machine 2022-05-09 18:05:11 +02:00
Sven Woop 90e320fe0b Added Embree DPC++ compilation docu 2022-05-09 12:10:59 +02:00
Sven Woop 63787f5e49 Added Embree DPC++ API docu section 2022-05-09 11:00:14 +02:00
Sven Woop 36bcaf5da5 fixed issue with SYCL benchmarking, dg2-b0-512 device config no longer supported, using just dg2 device 2022-05-06 11:14:01 +02:00
Sven Woop 4ee25cdb1e Added documentation for EMBREE_DPCPP_AOT_DEVICES cmake option.
Cleanup of EMBREE_DPCPP_AOT_DEVICES cmake option.
2022-05-05 14:34:51 +02:00
Sven Woop eb997d8142 installing SYCL dependency only when EMBREE_DPCPP_SUPPORT is enabled 2022-05-05 07:38:25 +02:00
Sven Woop e0d2cc8423 documented EMBREE_DPCPP_SUPPORT cmake option 2022-05-04 16:19:59 +02:00
Sven Woop cc08130cba using newer driver for public CI testing 2022-05-04 10:58:46 +02:00
Sven Woop 3a9ea226ec adding CI tests that use publicly available drivers 2022-05-04 09:36:15 +02:00
Sven Woop 20b8b4ba63 removed unused build.py and conf.py scripts 2022-05-04 08:24:50 +02:00
Sven Woop d081063542 updated third-party-programs files 2022-05-04 08:14:13 +02:00
Sven Woop e741416a0c adding windows JIT test that uses gfx-driver sdp/1011314 2022-05-03 18:43:22 +02:00
Sven Woop 2dcd0cd410 trying gfx-driver-ci-master release build 2022-05-03 17:03:38 +02:00
Sven Woop bb924d03cc updates to the Embree 3 to Embree 4 porting section in documentation 2022-05-03 10:39:01 +02:00
Sven Woop 3e200cc5fd added agama CI test 2022-05-03 10:00:37 +02:00
Sven Woop 184332d75a extending download_gfx script to support agama releases 2022-05-03 09:51:54 +02:00
Sven Woop 9255e5bcd7 passing RTCIntersectArguments through pointer to make API C99 compliant again 2022-05-02 09:46:10 +02:00
Sven Woop 9cc9d2c32d installing only required SYCL libraries 2022-05-02 09:18:00 +02:00
Sven Woop a5733f9368 - Removed Embree 2 to Embree 3 patch script
- Removed Embree 2 to Embree 3 upgrade section from documentation
2022-05-02 08:18:06 +02:00
Sven Woop b621febfd1 renamed all *.3embree3 man files to *.4embree4 2022-05-02 08:17:58 +02:00
Sven Woop a1cb08360e Renamed embree3 API include folder to embree4 2022-05-02 08:17:46 +02:00
Sven Woop 9b9f863f94 updated model hash to devel branch of model repo 2022-04-29 10:39:31 +02:00
Sven Woop 3dc05eff4d Initial commit of SYCL/DPC++ version of Embree with GPU support 2022-04-29 10:24:20 +02:00
1838 changed files with 175155 additions and 48002 deletions
+1 -1
View File
@@ -11,4 +11,4 @@
*.jpg binary
*.png binary
*.pdf binary
*.rc text working-tree-encoding=UTF-16LE-BOM eol=CRLF
*.rc text working-tree-encoding=UTF-8 eol=CRLF
+467 -157
View File
@@ -3,221 +3,531 @@
name: continuous
permissions: read-all
on: [push, workflow_dispatch]
jobs:
################################################################################
################################################################################
# GPU tests
################################################################################
###############################################################################
########################################
# Linux DG2
########################################
linux-DG2-JIT-INTERNAL-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
artifact-out: linux-DG2-JIT-INTERNAL-build
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-INTERNAL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
################################################################################
################################################################################
# CPU tests
################################################################################
################################################################################
linux-DG2-JIT-INTERNAL-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-DG2-JIT-INTERNAL-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/gfx-ubuntu22-internal.env
dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
artifact-in: linux-DG2-JIT-INTERNAL-build
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-INTERNAL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
linux-DG2-JIT-PUBLIC-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
artifact-out: linux-DG2-JIT-PUBLIC-build
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
linux-DG2-JIT-PUBLIC-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-DG2-JIT-PUBLIC-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: linux-DG2-JIT-PUBLIC-build
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
linux-DG2-JIT-PUBLIC-ICX-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env
dpcpp-version: intel/2024.1.0
artifact-out: linux-DG2-JIT-PUBLIC-ICX-build
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
linux-DG2-JIT-PUBLIC-ICX-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-DG2-JIT-PUBLIC-ICX-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel/2024.1.0
artifact-in: linux-DG2-JIT-PUBLIC-ICX-build
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
# ########################################
# # Linux ATS-M
# ########################################
linux-ATSM-JIT-PUBLIC-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-DG2-JIT-PUBLIC-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "atsm" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: linux-DG2-JIT-PUBLIC-build
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
########################################
# Linux
# Linux PVC
########################################
continuous-linux-x64-Debug-ICC2019_4-ISPC1_12_0-AVX512-TBB2021_2_0:
linux-PVC-JIT-INTERNAL-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/fedora:27
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
artifact-out: linux-PVC-JIT-INTERNAL-build
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
# TODO: move to nightly
linux-PVC-JIT-INTERNAL-test-1T:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-PVC-JIT-INTERNAL-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-in: linux-PVC-JIT-INTERNAL-build
cmd: |
export NEOReadDebugKeys=1
export UseKmdMigration=0
export EnableImplicitScaling=0
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
module load cmake/3.25.3
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
linux-PVC-JIT-INTERNAL-test-2T:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-PVC-JIT-INTERNAL-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-in: linux-PVC-JIT-INTERNAL-build
cmd: |
export NEOReadDebugKeys=1
export UseKmdMigration=0
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
module load cmake/3.25.3
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
linux-PVC-JIT-INTERNAL-test-flat:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-PVC-JIT-INTERNAL-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-in: linux-PVC-JIT-INTERNAL-build
cmd: |
module load cmake/3.25.3
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
# linux-PVC-JIT-PUBLIC:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
# with:
# image: embree/ubuntu:22.04
# runs-on: '[ "Linux", "docker", "build" ]'
# artifact-out: linux-PVC-JIT-PUBLIC
# artifact-path: ./build .ctest_conf
# cmd: |
# scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.16.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB intensity:4
# scripts/test.py build --debug
# scripts/test.py build
#
# linux-PVC-JIT-PUBLIC-test:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
# needs: ["linux-PVC-JIT-PUBLIC"]
# with:
# image: embree/ubuntu:22.04
# options: --device=/dev/dri:/dev/dri
# runs-on: '[ "Linux", "docker", "pvc" ]'
# artifact-in: linux-PVC-JIT-PUBLIC
# cmd: |
# scripts/test.py test --debug
# scripts/test.py test
########################################
# Windows DG2
########################################
windows-DG2-JIT-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
with:
force-delete: true
runs-on: '[ "Windows", "NAS", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
artifact-out: windows-DG2-JIT-build
artifact-path: ./build/*.zip
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
windows-DG2-JIT-INTERNAL-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
needs: ["windows-DG2-JIT-build"]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
artifact-in: windows-DG2-JIT-build
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
windows-DG2-JIT-PUBLIC-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
needs: ["windows-DG2-JIT-build"]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
artifact-in: windows-DG2-JIT-build
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
windows-DG2-JIT-ICX-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
dpcpp-version: oneAPI/compiler/2024.1
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-public.env
artifact-out: windows-DG2-JIT-ICX-build
artifact-path: ./build/*.zip
cmd: |
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
windows-DG2-JIT-ICX-INTERNAL-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
needs: ["windows-DG2-JIT-ICX-build"]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
dpcpp-version: oneAPI/compiler/2024.1
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
artifact-in: windows-DG2-JIT-ICX-build
cmd: |
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
windows-DG2-JIT-ICX-PUBLIC-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
needs: ["windows-DG2-JIT-ICX-build"]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
dpcpp-version: oneAPI/compiler/2024.1
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
artifact-in: windows-DG2-JIT-ICX-build
cmd: |
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
# ################################################################################
# ################################################################################
# # CPU tests
# ################################################################################
# ################################################################################
# ########################################
# # Linux
# ########################################
linux-fedora29-CLANG4:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/fedora:29
runs-on: '[ "Linux", "docker", "avx512" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:4
python scripts/test.py build
python scripts/test.py test
module load cmake/3.25.3
cmake --preset linux-fedora29-CLANG4 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
continuous-linux-avx512vl-x64-Debug-ICC2019_4-ISPC1_12_0-AVX512-TBB2021_2_0:
linux-fedora29-CLANG5-INT-ADDRSANITIZER:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/fedora:27
runs-on: '[ "Linux", "docker", "avx512" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:4
python scripts/test.py build
python scripts/test.py test
continuous-linux-avx512vl-x64-Debug-CLANG4_0_0-ISPC1_17_0-AVX512-TBB2021_2_0:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
with:
image: embree/fedora:26
runs-on: '[ "Linux", "docker", "avx512" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd128 tasking:TBB2021.2.0 GLFW:OFF intensity:2
python scripts/test.py build
python scripts/test.py test
continuous-linux-x64-Debug-CLANG5_0_0-ISPC1_17_0-AVX2-INT-ADDRSANITIZER:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
with:
image: embree/fedora:26
image: embree/fedora:29
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.17.0 isa:AVX tasking:INT intensity:1 addrsanitizer:ON
python scripts/test.py build
python scripts/test.py test
module load cmake/3.25.3
cmake --preset linux-fedora29-CLANG5-INT-ADDRSANITIZER -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
continuous-ubuntu20_04-x64-Debug-GCC-ISPC1_12_0-AVX2-TBB-NAMESPACE:
linux-fedora29-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:20.04
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 frequency_level:simd256 tasking:TBB intensity:1 api_namespace:myembree
python scripts/test.py build
python scripts/test.py test
continuous-linux-avx512vl-x64-Debug-ICX2022_1_2-ISPC1_17_0-AVX512-INT:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
with:
image: embree/ubuntu:20.04
image: embree/fedora:29
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
cmd: |
python scripts/test.py configure platform:x64 build:Debug threads:4 compiler:ICX2022.1.2 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd256 tasking:INT intensity:2
python scripts/test.py build
python scripts/test.py test
module load cmake/3.25.3
cmake --preset linux-fedora29-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
#continuous-ubuntu17_10-x64-Debug-GCC-ISPC1_12_0-AVX2-TBB-NAMESPACE:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
# with:
# image: embree/ubuntu:17.10
# runs-on: '[ "Linux", "docker" ]'
# cmd: |
# python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:1 api_namespace:myembree
# python scripts/test.py build
# python scripts/test.py test
continuous-centos7_4-x64-Debug-GCC-ISPC1_17_0-AVX2-TBB:
linux-fedora32-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
with:
image: embree/centos:7.4
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 frequency_level:simd128 tasking:TBB intensity:1
python scripts/test.py build
python scripts/test.py test
continuous-fedora32-x64-Debug-GCC-ISPC-AVX512-TBB:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/fedora:32
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX512 tasking:TBB COMPACT_POLYS:ON MIN_WIDTH:ON intensity:2
python scripts/test.py build
python scripts/test.py test
module load cmake/3.25.3
cmake --preset linux-fedora32-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
linux-ubuntu20_04-GCC-NAMESPACE:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/ubuntu:20.04
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
module load cmake/3.25.3
cmake --preset linux-ubuntu20_04-GCC-NAMESPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
linux-ubuntu20_04-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:20.04
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
cmd: |
module load cmake/3.25.3
cmake --preset linux-ubuntu20_04-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
########################################
# Windows
########################################
continuous-windows-x64-RelWithDebInfo-V140-ISPC1_9_2-SSE2-TBB2020_2:
windows-V142:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
with:
force-delete: true
runs-on: '[ "Windows", "NAS", "build" ]'
dpcpp-version: none
cmd: |
python scripts/test.py configure platform:x64 threads:4 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2020.2 intensity:2
python scripts/test.py build
python scripts/test.py test
cmake --preset windows-V142 -D CMAKE_BUILD_TYPE=RelWithDebInfo -D EMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --target test_package
# continuous-windows-Win32-RelWithDebInfoDebug-V140-ISPC1_12_0-SSE2-TBB2020_2:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build" ]'
# cmd: |
# python scripts/test.py configure platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2020.2 intensity:2
# python scripts/test.py build
# python scripts/test.py test
continuous-windows-x64-RelWithDebInfo-V141-ISPC1_17_0-SSE2-TBB2020_2:
windows-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
with:
runs-on: '[ "Windows", "NAS", "build" ]'
force-delete: true
runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
dpcpp-version: oneAPI/compiler/2024.1
cmd: |
python scripts/test.py configure platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.17.0 isa:SSE2 tasking:TBB2020.2 intensity:2 maxinstancelevelcount:8
python scripts/test.py build
python scripts/test.py test
# continuous-windows-x64-RelWithDebInfo-ICX2022_0_0-ISPC1_16_1-AVX512-INT:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# cmd: |
# python scripts/test.py configure platform:x64 build:RelWithDebInfo compiler:ICX2022.0.0 ispc:ispc1.16.1 isa:AVX512 tasking:INT threads:16 intensity:2
# python scripts/test.py build
# python scripts/test.py test
cmake --preset windows-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
########################################
# MacOS
########################################
continuous-macosx-ARM-Debug-CLANG-ISPC1_17_0-NEON-TBB_HOMEBREW:
macosx-ARM-CLANG-NEON-AVX2:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "arm" ]'
runs-on: '[ "macOS", "build", "arm" ]'
cmd: |
scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:NEON tasking:TBB_HOMEBREW intensity:2
scripts/test.py build
scripts/test.py test
cmake --preset macos-ARM-CLANG-NEON-AVX2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
continuous-macosx-ARM-Debug-CLANG-ISPC1_17_0-NEON-AVX2-TBB_HOMEBREW:
macosx-ARM-CLANG-NEON:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "arm" ]'
runs-on: '[ "macOS", "build", "arm" ]'
cmd: |
scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:NEON2X tasking:TBB_HOMEBREW intensity:2
scripts/test.py build
scripts/test.py test
cmake --preset macos-ARM-CLANG-NEON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
# continuous-macosx-x64-Debug-ICC2020_1-ISPC1_14_1-SSE2-TBB2021_1_1:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
# with:
# runs-on: '[ "macOS", "embree" ]'
# cmd: |
# scripts/test.py configure platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.14.1 isa:SSE2 tasking:TBB2021.1.1 intensity:2
# scripts/test.py build
# scripts/test.py test
continuous-macosx-x64-Debug-CLANG-ISPC1_17_0-SSE2-TBB2020_2:
macosx-x64-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "embree" ]'
runs-on: '[ "macOS", "build", "x86_64" ]'
cmd: |
scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:SSE2 tasking:TBB2020.2 intensity:2
scripts/test.py build
scripts/test.py test
continuous-linux-x64-Debug-GCC-ISPC1_17_0-SSE2-TBB-KLOCWORK:
cmake --preset macos-x64-CLANG -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
macosx-ARM-CLANG-NEON-AVX2-universal-binaries:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_static_analysis.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
image: embree/centos:7.4
runs-on: '[ "Linux", "docker", "build" ]'
runs-on: '[ "macOS", "build", "arm" ]'
cmd: |
export CI_PROJECT_DIR=$GITHUB_WORKSPACE
export CI_JOB_ID=$GITHUB_RUN_ID
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:SSE2 tasking:TBB klocwork:ON intensity:0
python scripts/test.py build
python scripts/test.py test
scripts/klocwork_gen_report.sh
scripts/store_files.sh $GITHUB_REPOSITORY $GITHUB_RUN_ID klocwork "klocwork/report.log"
cmake --preset macos-ARM-CLANG-NEON-AVX2-UB -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DEMBREE_BUILD_GLFW_FROM_SOURCE=ON -DEMBREE_ISPC_SUPPORT=OFF
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
########################################
# Coverity
########################################
static-analysis:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@main
with:
project: Embree
submodules: true
coverity: true
prebuild: >
module load cmake/3.25.3 &&
export NAS_LINUX=$STORAGE_PATH/packages/apps &&
cmake --preset linux-coverity
build: sh scripts/coverity.sh
success:
runs-on: ubuntu-latest
needs:
- linux-DG2-JIT-INTERNAL-test
- linux-DG2-JIT-PUBLIC-test
- linux-ATSM-JIT-PUBLIC-test
- linux-DG2-JIT-PUBLIC-ICX-test
- linux-PVC-JIT-INTERNAL-test-1T
- linux-PVC-JIT-INTERNAL-test-2T
- linux-PVC-JIT-INTERNAL-test-flat
- windows-DG2-JIT-INTERNAL-test
- windows-DG2-JIT-PUBLIC-test
- windows-DG2-JIT-ICX-INTERNAL-test
- windows-DG2-JIT-ICX-PUBLIC-test
- linux-fedora29-CLANG4
- linux-fedora29-CLANG5-INT-ADDRSANITIZER
- linux-fedora29-ICX
- linux-fedora32-ICX
- linux-ubuntu20_04-GCC-NAMESPACE
- linux-ubuntu20_04-ICX
- windows-V142
- windows-ICX
- macosx-ARM-CLANG-NEON-AVX2
- macosx-ARM-CLANG-NEON
- macosx-x64-CLANG
- macosx-ARM-CLANG-NEON-AVX2-universal-binaries
- static-analysis
if: failure() || cancelled()
steps:
- name: Failure
run: |
echo "::notice title=Success::Workflow failed"
exit 1
+1
View File
@@ -0,0 +1 @@
DPCPP_VERSION=
+1
View File
@@ -0,0 +1 @@
DPCPP_VERSION=intel-llvm/nightly-2024-03-17
@@ -0,0 +1 @@
GFX_DRIVER_VERSION=neo-builds/ci/master/ci-neo-master-029525/artifacts/linux/ubuntu/22.04
@@ -0,0 +1 @@
GFX_DRIVER_VERSION=linux-latest
@@ -0,0 +1 @@
GFX_DRIVER_VERSION=gfx-driver-builds/ci/master/gfx-driver-ci-master-16477/artifacts/Windows
+1
View File
@@ -0,0 +1 @@
GFX_DRIVER_VERSION=windows-101.5445
+688
View File
@@ -0,0 +1,688 @@
## Copyright 2022 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
name: integrate
permissions: read-all
# same as nightly...
on:
schedule:
- cron: '00 00 * * *'
workflow_dispatch:
jobs:
#####################################################################
# Integration Tests
####################################################################
# TODO: investigate windows integration tests not working
#####################################################################
## Windows
#####################################################################
# integrate-windows-ICX:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-out: integrate-windows-ICX
# artifact-path: ./build/embree-*.zip
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cmake --preset integrate-windows-icx
# cmake --build build --config Release --target package -j8
# cmake --build build --config Release --target post_package
#
# integrate-windows-ICX-test:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# needs: ["integrate-windows-ICX"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-windows-ICX
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-icx
# cmake --build build --config Release
# .\build\test.exe
#
#
#
#
#
# integrate-windows-v142:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-out: integrate-windows-v142
# artifact-path: ./build/embree-*.zip
# cmd: |
# cmake --preset integrate-windows-v142
# cmake --build build --config Release --target package -j8
# cmake --build build --config Release --target post_package
#
# integrate-windows-v142-test-v142:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
# needs: ["integrate-windows-v142"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-windows-v142
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-v142
# cmake --build build --config Release
# .\build\Release\test.exe
#
# integrate-windows-v142-test-ICX:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# needs: ["integrate-windows-v142"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-windows-v142
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-icx
# cmake --build build --config Release
# .\build\test.exe
#
#
#
#
#
#####################################################################
## Windows STATIC
#####################################################################
# integrate-static-windows-ICX:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-out: integrate-static-windows-ICX
# artifact-path: ./build/embree-*.zip
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cmake --preset integrate-static-windows-icx
# cmake --build build --config Release --target package -j8
# cmake --build build --config Release --target post_package
#
# integrate-static-windows-ICX-test:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# needs: ["integrate-static-windows-ICX"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-static-windows-ICX
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-icx
# cmake --build build --config Release
# .\build\test.exe
#
#
#
#
#
# integrate-static-windows-v142:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-out: integrate-static-windows-v142
# artifact-path: ./build/embree-*.zip
# cmd: |
# cmake --preset integrate-windows-v142
# cmake --build build --config Release --target package -j8
# cmake --build build --config Release --target post_package
#
# integrate-static-windows-v142-test-v142:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
# needs: ["integrate-static-windows-v142"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-static-windows-v142
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-v142
# cmake --build build --config Release
# .\build\Release\test.exe
#
# integrate-static-windows-v142-test-ICX:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# needs: ["integrate-static-windows-v142"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-static-windows-v142
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-icx
# cmake --build build --config Release
# .\build\test.exe
####################################################################
# Linux
####################################################################
integrate-linux-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: integrate-linux-GCC
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-linux-GCC-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-linux-GCC-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-linux-GCC-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-linux-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-out: integrate-linux-ICX
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-linux-ICX-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-linux-ICX-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-linux-ICX-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-static-linux-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: integrate-static-linux-CLANG
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-static-linux-CLANG-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-static-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-static-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-static-linux-CLANG-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-static-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-static-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-static-linux-CLANG-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
####################################################################
# Linux STATIC
####################################################################
integrate-static-linux-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: integrate-static-linux-GCC
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-static-linux-GCC-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-static-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-static-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-static-linux-GCC-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-static-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-static-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-static-linux-GCC-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-static-linux-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-out: integrate-static-linux-ICX
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-static-linux-ICX-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-static-linux-ICX-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-static-linux-ICX-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-linux-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: integrate-linux-CLANG
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-linux-CLANG-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-linux-CLANG-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-linux-CLANG-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
####################################################################
# Linux SYCL
####################################################################
integrate-sycl-linux-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:22.04
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: icx/compiler_ppkg-rel/20240110
artifact-out: integrate-sycl-linux-ICX
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-icx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-sycl-linux-ICX-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-sycl-linux-ICX" ]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: icx/compiler_ppkg-rel/20240110
artifact-in: integrate-sycl-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-sycl-linux-DPCPP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:22.04
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel-llvm/nightly-2023-09-22-rk
artifact-out: integrate-sycl-linux-DPCPP
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
istegrate-sycl-linux-DPCPP-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-sycl-linux-DPCPP" ]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: icx/compiler_ppkg-rel/20240110
artifact-in: integrate-sycl-linux-DPCPP
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
####################################################################
# MacOS
####################################################################
integrate-macos-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-out: integrate-macos-GCC
artifact-path: ./build/*.zip
cmd: |
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
# cmake --build build --config Release --target post_package_notarize TODO: reactivate this when notarization problems are solved
integrate-macos-GCC-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: [ "integrate-macos-GCC" ]
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: integrate-macos-GCC
cmd: |
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-gcc
cmake --build build --config Release --target test_integration
integrate-macos-GCC-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: [ "integrate-macos-GCC" ]
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: integrate-macos-GCC
cmd: |
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-clang
cmake --build build --config Release --target test_integration
# TODO: cant find tbb/tbb.h ???
integrate-macos-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-out: integrate-macos-CLANG
artifact-path: ./build/*.zip
cmd: |
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
# cmake --build build --config Release --target post_package_notarize TODO: reactivate this when notarization problems are solved
integrate-macos-CLANG-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: [ "integrate-macos-CLANG" ]
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: integrate-macos-CLANG
cmd: |
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-gcc
cmake --build build --config Release --target test_integration
integrate-macos-CLANG-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: [ "integrate-macos-CLANG" ]
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: integrate-macos-CLANG
cmd: |
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-clang
cmake --build build --config Release --target test_integration
File diff suppressed because it is too large Load Diff
+179
View File
@@ -0,0 +1,179 @@
## Copyright 2022 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
name: performance
permissions: read-all
on:
schedule:
- cron: '00 01 * * *'
workflow_dispatch:
jobs:
perf-linux-SYCL-DPCPP-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel/2023.0
artifact-out: perf-linux-SYCL-DPCPP
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset perf-linux-icx-sycl -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
perf-linux-DG2-A770-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["perf-linux-SYCL-DPCPP-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2", "perf", "A770" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: perf-linux-SYCL-DPCPP
setup-benny: true
cmd: |
cd build
ls *.tar.gz
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
cd bin
source ../embree-vars.sh
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
perf-linux-PVC-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["perf-linux-SYCL-DPCPP-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc", "perf" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: perf-linux-SYCL-DPCPP
setup-benny: true
cmd: |
# Run it on single tile (disable implicit scaling)
export EnableImplicitScaling=0
export NEOReadDebugKeys=1
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
cd build
ls *.tar.gz
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
cd bin
source ../embree-vars.sh
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
perf-linux-x86-ICX-ISPC-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-out: perf-linux-x86-ICX-ISPC-build
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset perf-linux-icx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
perf-linux-i9-12900k-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["perf-linux-x86-ICX-ISPC-build"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-i9-12900k-1" ]'
artifact-in: perf-linux-x86-ICX-ISPC-build
setup-benny: true
cmd: |
cd build
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
perf-linux-x8380-1-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["perf-linux-x86-ICX-ISPC-build"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-x8380-1" ]'
artifact-in: perf-linux-x86-ICX-ISPC-build
setup-benny: true
cmd: |
cd build
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
perf-linux-x8280-1-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["perf-linux-x86-ICX-ISPC-build"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-x8280-1" ]'
artifact-in: perf-linux-x86-ICX-ISPC-build
setup-benny: true
cmd: |
cd build
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
perf-linux-a3970x-1-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["perf-linux-x86-ICX-ISPC-build"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-a3970x-1" ]'
artifact-in: perf-linux-x86-ICX-ISPC-build
setup-benny: true
cmd: |
cd build
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
linux-DG2-A770-buildbench:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["perf-linux-SYCL-DPCPP-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2", "perf", "A770" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: perf-linux-SYCL-DPCPP
setup-benny: true
cmd: |
cd build
ls *.tar.gz
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
git clone https://github.com/intel-innersource/libraries.graphics.renderkit.embree.models.git embree-models
ls -al
source embree-vars.sh
echo "bin/embree_buildbench --legacy"
bin/embree_buildbench --legacy
echo "bin/embree_buildbench_sycl --legacy"
bin/embree_buildbench_sycl --legacy
echo "bin/embree_buildbench --legacy -c embree-models/crown/crown.ecs"
bin/embree_buildbench --legacy -c embree-models/crown/crown.ecs
echo "bin/embree_buildbench_sycl --legacy -c embree-models/crown/crown.ecs"
bin/embree_buildbench_sycl --legacy -c embree-models/crown/crown.ecs
+234 -36
View File
@@ -3,9 +3,11 @@
name: release
permissions: read-all
on:
schedule:
- cron: '30 04 * * *'
- cron: '00 00 * * *'
workflow_dispatch:
jobs:
@@ -13,73 +15,269 @@ jobs:
#####################################################################
# Release Builds
####################################################################
release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP:
release-windows:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
with:
runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
artifact-out: release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-path: ./build/*.zip
artifact-out: release-windows
artifact-path: ./build/embree-*.zip
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
shell: cmd
cmd: |
python scripts/test.py configure platform:x64 build:Release compiler:ICC19-VC141 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.2.0 intensity:4 package:ZIP
python scripts/test.py build
python scripts/test.py test
cmake --preset release-windows -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP:
release-macosx:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "embree", "sign", "avx2" ]'
artifact-out: release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-path: ./build/*.zip
project: embree
runs-on: '[ "macOS", "build", "x86_64" ]'
cmd: |
scripts/test.py configure platform:x64 build:Release compiler:ICC2021.1.1 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2021.2.0 intensity:4 package:ZIP
scripts/test.py build
scripts/test.py test
source scripts/cmake-presets/macos-env.sh
cmake --preset release-macos -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
rm build/embree-*-testing.zip
notarize-package: build/embree-*.zip
artifact-out: release-macosx
artifact-path: ./build/*.zip
release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP:
verify-package-macosx:
needs: release-macosx
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
image: embree/centos:7.4
project: embree
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: release-macosx
cmd: |
mkdir package
tar -xzvf build/embree-* -C ./package
sign-path-verify: ./package
release-macosx-arm:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
project: embree
runs-on: '[ "macOS13", "test", "arm" ]'
cmd: |
source scripts/cmake-presets/macos-env.sh
cmake --preset release-macos-arm -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
rm build/embree-*-testing.zip
notarize-package: build/embree-*.zip
artifact-out: release-macosx-arm
artifact-path: ./build/*.zip
verify-package-macosx-arm:
needs: release-macosx-arm
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
project: embree
runs-on: '[ "macOS13", "test", "arm" ]'
artifact-in: release-macosx-arm
cmd: |
mkdir package
tar -xzvf build/embree-* -C ./package
sign-path-verify: ./package
release-linux:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-out: release-linux
artifact-path: ./build/*.tar.gz
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
pre-cmd: |
yum -y install epel-release
dnf makecache --refresh
dnf config-manager --set-enabled powertools
dnf -y update
dnf -y install ninja-build
cmd: |
scripts/test.py configure platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.2.0 intensity:4 package:ZIP
scripts/test.py build
scripts/test.py test
module load cmake/3.25.3
cmake --preset release-linux -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
#####################################################################
# DPC++ Release Builds
####################################################################
release-windows-sycl:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/gfx-windows-internal.env
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-out: release-windows-sycl
artifact-path: ./build/*.zip
shell: cmd
cmd: |
cmake --preset release-windows-sycl -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
release-linux-sycl:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: rockylinux:8.7
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-out: release-linux-sycl
artifact-path: ./build/*.tar.gz
pre-cmd: |
yum -y install epel-release
dnf makecache --refresh
dnf config-manager --set-enabled powertools
dnf -y update
dnf -y install ninja-build
cmd: |
module load cmake/3.25.3
cmake --preset release-linux-sycl -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
release-linux-sycl-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["release-linux-sycl"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-in: release-linux-sycl
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --target test_package
release-linux-sycl-pvc-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["release-linux-sycl"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-in: release-linux-sycl
cmd: |
module load cmake/3.25.3
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --target test_package
#####################################################################
# Release binaries scans
#####################################################################
binary-analysis:
needs:
- release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
- release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
- release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
- release-windows
- release-macosx
- release-linux
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
project: embree
artifact-in-linux: release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-in-macos: release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-in-windows: release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-in-windows: release-windows
artifact-in-macos: release-macosx
artifact-in-linux: release-linux
path: "build/*.zip build/*.gz"
antivirus-scan:
needs:
- release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
- release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
- release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
- release-windows
- release-macosx
- release-linux
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-linux: release-windows-x64-Release-ICC19-VC141-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-in-macos: release-macosx-x64-Release-ICC2021_1_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-in-windows: release-linux-x64-Release-ICC2020_1-ISPC1_17_0-TBB2021_2_0-PACKAGE-ZIP
artifact-in-windows: release-windows
artifact-in-macos: release-macosx
artifact-in-linux: release-linux
path: "build/*.zip build/*.gz"
binary-analysis-dpcpp:
needs:
- release-windows-sycl
- release-linux-sycl-test
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
project: embree
artifact-in-windows: release-windows-sycl
artifact-in-linux: release-linux-sycl
path: "build/*.zip build/*.gz"
artifact-out-name: "binary-analysis-dpcpp"
antivirus-scan-dpcpp:
needs:
- release-windows-sycl
- release-linux-sycl-test
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-windows: release-windows-sycl
artifact-in-linux: release-linux-sycl
path: "build/*.zip build/*.gz"
artifact-out-name: "antivirus-scan-dpcpp"
binary-analysis-arm:
needs:
- release-macosx-arm
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
project: embree
artifact-in-macos: release-macosx-arm
path: "build/*.zip"
artifact-out-name: "binary-analysis-arm"
antivirus-scan-arm:
needs:
- release-macosx-arm
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-macos: release-macosx-arm
path: "build/*.zip"
artifact-out-name: "antivirus-scan-arm"
#####################################################################
# Testing package
#####################################################################
test-package:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [release-linux]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: release-linux
artifact-out: release-testing-PACKAGE-ZIP
artifact-path: ./build/*.tar.gz
cmd: |
rm build/embree-4.3.2.x86_64.linux.tar.gz
mv build/embree-4.3.2.x86_64.linux-testing.tar.gz build/embree-4.3.2-testing.tar.gz
+2 -1
View File
@@ -7,5 +7,6 @@ x64
.DS_Store
kernels/config.h
kernels/hash.h
include/embree3/rtcore_config.h
include/embree4/rtcore_config.h
build
out
+37 -728
View File
@@ -1,747 +1,35 @@
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
variables:
COMMON: "platform:x64 compiler:dpcpp ispc:ispc1.16.1 isa:SSE2 tasking:TBB2019.9"
# Retry mechanism knobs in case of sporadic errors
GET_SOURCES_ATTEMPTS: 10
ARTIFACT_DOWNLOAD_ATTEMPTS: 10
EXECUTOR_JOB_SECTION_ATTEMPTS: 3
####################################################################
# Stages
####################################################################
stages:
- build
- test
- benchmark
- release
- scan
- protex
####################################################################
# Templates
####################################################################
.build:
stage: build
script: "python scripts/test.py build"
after_script: [sleep 5] # required to get job log
retry: 1
artifacts:
paths:
- build/
- .ctest_conf
expire_in: 1 day
.test:
stage: test
script: "python scripts/test.py test"
after_script: [sleep 5] # required to get job log
retry: 1
.build_and_test:
stage: build
script:
- "python scripts/test.py build"
- "python scripts/test.py test"
after_script: [sleep 5] # required to get job log
retry: 1
#####################################################################
# Continuous Test
####################################################################
continuous-linux-WebAssembly:
stage: build
script:
- source /emsdk/emsdk_env.sh
- mkdir build
- cd build
- emcmake cmake -DCMAKE_BUILD_TYPE=Release -DEMBREE_TUTORIALS=OFF -DEMBREE_TASKING_SYSTEM=INTERNAL ..
- emmake make -j
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
tags: [embree, docker]
only: [pushes]
continuous-macosx-ARM-Debug-CLANG-ISPC1.17.0-NEON-TBB_HOMEBREW:
extends: .build_and_test
before_script: ["python scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ISPC_SUPPORT:ON ispc:ispc1.17.0 isa:NEON tasking:TBB_HOMEBREW intensity:2"]
tags: [embree, mac-arm]
only: [pushes]
continuous-macosx-ARM-Debug-CLANG-ISPC1.17.0-NEON-AVX2-TBB_HOMEBREW:
extends: .build_and_test
before_script: ["python scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ISPC_SUPPORT:ON ispc:ispc1.17.0 isa:NEON2X tasking:TBB_HOMEBREW intensity:2"]
tags: [embree, mac-arm]
only: [pushes]
#continuous-macosx-x64-Debug-ICC2020.1-ISPC1.14.1-SSE2-TBB2021.1.1:
# extends: .build_and_test
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.14.1 isa:SSE2 tasking:TBB2021.1.1 intensity:2"]
# tags: [embree, mac]
# only: [pushes]
#
continuous-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-SSE2-TBB2021.2.0:
extends: .build_and_test
before_script: ["python scripts/test.py configure platform:x64 threads:4 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:SSE2 tasking:TBB2021.2.0 intensity:2"]
tags: [embree, win10, v120]
only: [pushes]
#continuous-windows-Win32-RelWithDebInfoDebug-V140-ISPC1.12.0-SSE2-TBB2021.2.0:
# extends: .build_and_test
# before_script: ["python scripts\\test.py configure platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2021.2.0 intensity:2"]
# tags: [embree, win10, v140]
# only: [pushes]
continuous-windows-x64-RelWithDebInfo-V141-ISPC1.17.0-SSE2-TBB2021.2.0:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.17.0 isa:SSE2 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:8"]
tags: [embree, win10, v141]
only: [pushes]
#continuous-windows-x64-RelWithDebInfo-ICX2022.0.0-ISPC1.16.1-AVX512:
# extends: .build_and_test
# before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:ICX2022.0.0 ispc:ispc1.16.1 isa:AVX512 tasking:INT threads:16 intensity:2"]
# tags: [embree, win10, avx512vl]
# only: [pushes]
continuous-macosx-x64-Debug-CLANG-ISPC1.17.0-SSE2-TBB2020.2:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:SSE2 tasking:TBB2020.2 intensity:2"]
tags: [embree, mac]
only: [pushes]
continuous-linux-avx512vl-x64-Debug-ICC2019.4-ISPC1.12.0-AVX512-TBB2021.2.0:
extends: .build_and_test
before_script: ["python scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:4"]
image: $DOCKER_REGISTRY/embree/fedora:27
tags: [embree, docker, avx512vl]
only: [pushes]
continuous-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX512-TBB2021.2.0:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd128 tasking:TBB2021.2.0 GLFW:OFF intensity:2"]
image: $DOCKER_REGISTRY/embree/fedora:26
tags: [embree, docker, avx512vl]
only: [pushes]
continuous-linux-x64-Debug-CLANG5.0.0-ISPC1.17.0-AVX2-INT-ADDRSANITIZER:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.17.0 isa:AVX tasking:INT intensity:1 addrsanitizer:ON"]
image: $DOCKER_REGISTRY/embree/fedora:26
tags: [embree, docker]
only: [pushes]
continuous-ubuntu20.04-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB-NAMESPACE:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 frequency_level:simd256 tasking:TBB intensity:1 api_namespace:myembree"]
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
tags: [embree, docker]
only: [pushes]
continuous-linux-avx512vl-x64-Debug-ICX2022.1.2-ISPC1.17.0-AVX512-TBB2021.2.0:
extends: .build_and_test
before_script: ["python scripts/test.py configure platform:x64 build:Debug threads:4 compiler:ICX2022.1.2 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2"]
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
tags: [embree, docker, avx512vl]
only: [pushes]
#continuous-ubuntu17.10-x64-Debug-GCC-ISPC1.12.0-AVX2-TBB-NAMESPACE:
# extends: .build_and_test
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 tasking:TBB intensity:1 api_namespace:myembree"]
# image: $DOCKER_REGISTRY/embree/ubuntu:17.10
# tags: [embree, docker]
# only: [pushes]
continuous-centos7.4-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 frequency_level:simd128 tasking:TBB intensity:1"]
image: $DOCKER_REGISTRY/embree/centos:7.4
tags: [embree, docker]
only: [pushes]
continuous-fedora32-x64-Debug-GCC-ISPC-AVX512-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX512 tasking:TBB COMPACT_POLYS:ON MIN_WIDTH:ON intensity:2"]
image: $DOCKER_REGISTRY/embree/fedora:32
tags: [embree, docker, avx512vl]
only: [pushes]
continuous-linux-x64-Debug-GCC-ISPC1.17.0-SSE2-TBB-KLOCWORK:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:SSE2 tasking:TBB klocwork:ON intensity:0"]
image: $DOCKER_REGISTRY/embree/centos:7.4
tags: [embree, docker]
dependencies: []
artifacts:
paths: [klocwork/*]
continuous-kw-gen-report:
stage: scan
image: $DOCKER_REGISTRY/embree/centos:7.4
needs: ["continuous-linux-x64-Debug-GCC-ISPC1.17.0-SSE2-TBB-KLOCWORK"]
script:
- scripts/klocwork_gen_report.sh
- scripts/store_files.sh $CI_PROJECT_NAME $CI_PIPELINE_ID klocwork "klocwork/report.log"
tags: [embree, docker]
artifacts:
paths: [klocwork/*]
continuous-linux-x64-PROTEX:
stage: protex
image: amd64/openjdk:8
script: "scripts/source_scan_protex.sh"
tags: [embree, docker]
dependencies: []
needs: []
#####################################################################
# Intensive Nightly Tests
####################################################################
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-SSE2-INT:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:SSE2 tasking:INT intensity:2"]
tags: [embree, win10, v120]
only: [web, schedules]
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.9.2-AVX-TBB2019.2:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.9.2 isa:AVX tasking:TBB2019.2 intensity:4"]
tags: [embree, win10, v120, avx]
only: [web, schedules]
nightly-windows-Win32-RelWithDebInfo-V140-ISPC1.12.0-SSE2-TBB2020.2:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:Win32 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2020.2 intensity:2"]
tags: [embree, win10, v140]
only: [web, schedules]
nightly-windows-x64-RelWithDebInfo-V140-ISPC1.12.0-AVX2-PPL:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V140 ispc:ispc1.12.0 isa:AVX2 frequency_level:simd256 tasking:PPL intensity:2"]
tags: [embree, win10, v140, avx2]
only: [web, schedules]
nightly-windows-x64-RelWithDebInfo-V141-ISPC1.13.0-AVX2-TBB2019.9-STATIC:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2019.9 intensity:2 STATIC_LIB:ON"]
tags: [embree, win10, v141]
only: [web, schedules]
nightly-windows-x64-RelWithDebInfo-V142-ISPC1.13.0-AVX2-TBB2020.2-STATIC:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:V142 ispc:ispc1.13.0 isa:AVX2 tasking:TBB2020.2 intensity:2"]
tags: [embree, win10, v142]
only: [web, schedules]
nightly-windows-x64-RelWithDebInfo-LLVM-CLANG-ISPC1.13.0-AVX2-TBB2019.9-NAMESPACE:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:LLVM_CLANG ispc:ispc1.13.0 isa:AVX2 tasking:TBB2019.9 intensity:4 api_namespace:myembree"]
tags: [embree, win10, llvm_clang]
only: [web, schedules]
nightly-windows-x64-RelWithDebInfo-ICC17-ISPC1.13.0-AVX2-TBB2019.2:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:ICC17-VC14 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2019.2 intensity:4"]
tags: [embree, win10, icc17]
only: [web, schedules]
#nightly-windows-x64-RelWithDebInfo-ICC18-ISPC1.13.0-AVX512-TBB2020.2:
# extends: .build_and_test
# before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:ICC18-VC14 ispc:ispc1.13.0 isa:AVX512 tasking:TBB2020.2 intensity:2"]
# tags: [embree, win10, icc18, avx512vl]
# only: [web, schedules]
#
nightly-windows-x64-RelWithDebInfo-ICC19-ISPC1.13.0-AVX512-TBB2019.9:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:RelWithDebInfo compiler:ICC19-VC14 ispc:ispc1.13.0 isa:AVX512 tasking:TBB2019.9 intensity:2"]
tags: [embree, win10, icc19, avx512vl]
only: [web, schedules]
nightly-windows-x64-RelWithDebInfo-ICC17-ISPC1.14.1-AVX2-TBB2021.2.0:
extends: .build_and_test
before_script: ["python scripts\\test.py configure platform:x64 build:Release compiler:V142 ispc:ispc1.14.1 isa:AVX2 tasking:TBB2021.2.0 intensity:2"]
tags: [embree, win10, v142]
only: [web, schedules]
# CLANG compilation and testing of different ISAs
nightly-macosx-x64-Debug-CLANG-ISPC1.12.0-SSE2-TBB2020.2-NAMESPACE:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.12.0 isa:SSE2 tasking:TBB2020.2 intensity:4 api_namespace:myembree maxinstancelevelcount:4"]
tags: [embree, mac]
only: [web, schedules]
nightly-macosx-x64-Debug-CLANG-ISPC1.13.0-AVX-INT:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.13.0 isa:AVX tasking:INT intensity:4"]
tags: [embree, mac] # avx
only: [web, schedules]
nightly-macosx-x64-Debug-CLANG-ISPC1.13.0-SSE2-TBB2019.9-STATIC:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.13.0 isa:SSE2 tasking:TBB2019.9 intensity:4 STATIC_LIB:ON"]
tags: [embree, mac] # avx2
only: [web, schedules]
# ICC compilation and testing of different ISAs
#nightly-macosx-x64-Debug-ICC15-ISPC1.13.0-AVX-INT:
# extends: .build_and_test
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC15 ispc:ispc1.13.0 isa:AVX tasking:INT intensity:4"]
# tags: [embree, mac, icc15]
# only: [web, schedules]
#
#nightly-macosx-x64-Debug-ICC2019.4-ISPC1.13.0-AVX2-TBB2020.2:
# extends: .build_and_test
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd256 tasking:TBB2020.2 intensity:4"]
# tags: [embree, mac]
# only: [web, schedules]
#nightly-macosx-x64-Debug-ICC2020.1-ISPC1.13.0-AVX2-TBB2019.9:
# extends: .build_and_test
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2019.9 intensity:4"]
# tags: [embree, mac]
# only: [web, schedules]
nightly-macosx-x64-Debug-ICC2021.1.1-ISPC1.13.0-AVX2-TBB2021.1.1:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2021.1.1 ispc:ispc1.13.0 isa:AVX2 frequency_level:simd128 tasking:TBB2021.1.1 intensity:4"]
tags: [embree, mac]
only: [web, schedules]
# CLANG compilation and testing of different ISAs
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.12.0-SSE2-TBB-NAMESPACE:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.12.0 isa:SSE2 tasking:TBB2019.9 intensity:4 api_namespace:myembree maxinstancelevelcount:8"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG5.0.0-ISPC1.15.0-AVX2-INT-ADDRSANITIZER:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.15.0 isa:AVX tasking:INT intensity:2 addrsanitizer:ON"]
image: $DOCKER_REGISTRY/embree/fedora:26
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.16.1-AVX2-TBB2021.2.0-STATIC:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.16.1 isa:AVX2 frequency_level:simd128 tasking:TBB2021.2.0 intensity:4 STATIC_LIB:ON"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker] # avx2
only: [web, schedules]
nightly-linux-avx512vl-x64-Debug-CLANG4.0.0-ISPC1.16.1-AVX512-TBB2020.2:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.16.1 isa:AVX512 frequency_level:simd256 tasking:TBB2020.2 intensity:3"]
image: $DOCKER_REGISTRY/embree/fedora:26
tags: [embree, docker, avx512vl]
only: [web, schedules]
# GCC compilation and testing of different ISAs
nightly-linux-x64-Debug-GCC-ISPC1.16.1-SSE2-TBB2021.2.0:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.16.1 isa:SSE2 tasking:TBB2021.2.0 intensity:4"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-GCC-ISPC1.16.1-AVX-TBB2019.9:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.16.1 isa:AVX tasking:TBB2019.9 intensity:4"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker] # avx
only: [web, schedules]
nightly-linux-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB2021.2.0:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 intensity:4"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker] # avx2
only: [web, schedules]
# ICC compilation and testing of different ISAs
nightly-linux-x64-Debug-ICC2015.3-ISPC1.16.1-SSE2-TBB2019.2:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2015.3 ispc:ispc1.16.1 isa:SSE2 tasking:TBB2019.2 intensity:4"]
image: $DOCKER_REGISTRY/embree/centos:7.4
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-ICC2016.3-ISPC1.16.1-AVX-TBB2019.2:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2016.3 ispc:ispc1.16.1 isa:AVX tasking:TBB2019.2 intensity:4"]
image: $DOCKER_REGISTRY/embree/centos:7.4
tags: [embree, docker] # avx
only: [web, schedules]
nightly-linux-avx512vl-x64-Debug-ICC2017.1-ISPC1.16.1-AVX512-TBB2019.2:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2017.1 ispc:ispc1.16.1 isa:AVX512 frequency_level:simd256 tasking:TBB2019.2 intensity:4"]
image: $DOCKER_REGISTRY/embree/centos:7.4
tags: [embree, docker, avx512vl]
only: [web, schedules]
nightly-linux-avx512vl-x64-Debug-ICC2018.0-ISPC1.16.1-AVX512-TBB2019.9:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2018.0 ispc:ispc1.16.1 isa:AVX512 tasking:TBB2019.9 intensity:4"]
image: $DOCKER_REGISTRY/embree/fedora:26
tags: [embree, docker, avx512vl]
only: [web, schedules]
nightly-linux-x64-Debug-ICC2019.4-ISPC1.16.1-AVX2-TBB2021.2.0:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2019.4 ispc:ispc1.16.1 isa:AVX2 tasking:TBB2021.2.0 intensity:4"]
image: $DOCKER_REGISTRY/embree/fedora:26
tags: [embree, docker] # avx2
only: [web, schedules]
nightly-linux-x64-Debug-ICC2020.1-ISPC1.17.0-AVX2-TBB2019.9:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:ICC2020.1 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 intensity:4"]
image: $DOCKER_REGISTRY/embree/centos:7.4
tags: [embree, docker] # avx2
only: [web, schedules]
# Testing on different Linux distributions
nightly-ubuntu20.04-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB intensity:3"]
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
tags: [embree, docker]
only: [web, schedules]
nightly-ubuntu20.04-x64-Release-GCC-ISPC1.14.1-AVX2-TBB2021.2.0:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Release compiler:GCC ispc:ispc1.14.1 isa:AVX2 tasking:TBB2021.2.0 intensity:2"]
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
tags: [embree, docker]
only: [web, schedules]
nightly-ubuntu16.04-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB MIN_WIDTH:ON intensity:3"]
image: $DOCKER_REGISTRY/embree/ubuntu:16.04
tags: [embree, docker]
only: [web, schedules]
nightly-centos7.4-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB COMPACT_POLYS:ON intensity:3"]
image: $DOCKER_REGISTRY/embree/centos:7.4
tags: [embree, docker]
only: [web, schedules]
#nightly-centos7.0-x64-Debug-GCC-ISPC1.17.0-AVX2-TBB:
# extends: .build_and_test
# before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 tasking:TBB intensity:3"]
# image: $DOCKER_REGISTRY/embree/centos:7.0
# tags: [embree, docker]
# only: [web, schedules]
nightly-fedora32-x64-Debug-GCC-ISPC-AVX512-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isas:AVX512 tasking:TBB intensity:3"]
image: $DOCKER_REGISTRY/embree/fedora:32
tags: [embree, docker, avx512vl]
only: [web, schedules]
nightly-fedora28-x64-Debug-GCC-ISPC-AVX512-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB intensity:3"]
image: $DOCKER_REGISTRY/embree/fedora:28
tags: [embree, docker, avx512vl]
only: [web, schedules]
nightly-fedora27-x64-Debug-GCC-ISPC-AVX2-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"]
image: $DOCKER_REGISTRY/embree/fedora:27
tags: [embree, docker]
only: [web, schedules]
nightly-fedora26-x64-Debug-GCC-ISPC-AVX2-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"]
image: $DOCKER_REGISTRY/embree/fedora:26
tags: [embree, docker]
only: [web, schedules]
nightly-fedora25-x64-Debug-GCC-ISPC-AVX2-TBB:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX2 tasking:TBB intensity:3"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
# Compilation test of disabled features
nightly-linux-x64-Debug-CLANG4.0.0-AVX2-TBB2019.9-NO-ISPC:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 ISPC_SUPPORT:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-NO-TUTORIALS:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TUTORIALS:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-BACKFACECULLING:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 BACKFACE_CULLING:ON intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-IGNORE-INVALID-RAYS:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 IGNORE_INVALID_RAYS:ON intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-NO-FILTER-FUNCTION:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 FILTER_FUNCTION:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-RAYMASKS:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 RAY_MASK:ON intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-NO-PACKETS:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 RAY_PACKETS:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-STATCOUNTER:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 STAT_COUNTER:ON intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
# Compilation test of individual ISAs
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-SSE2-TBB2019.9:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:SSE2 tasking:TBB2019.9 intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-SSE42-TBB2021.2.0:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:SSE42 tasking:TBB2021.2.0 intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-AVX-TBB2019.9:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:AVX tasking:TBB2019.9 intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-AVX2-TBB2021.2.0:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:AVX2 tasking:TBB2021.2.0 intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-ISAS-AVX512-TBB2019.9:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isas:AVX512 tasking:TBB2019.9 intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
# Compilation test of individual primitive types enabled
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-TRI:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-QUAD:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 TRI:OFF QUAD:ON GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-GRID:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TRI:OFF QUAD:OFF GRID:ON CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-CURVE:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:ON SUBDIV:OFF USERGEOM:OFF INSTANCE:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-SUBDIV:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:ON USERGEOM:OFF INSTANCE:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2019.9-USERGEOM:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2019.9 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:ON INSTANCE:OFF intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
nightly-linux-x64-Debug-CLANG4.0.0-ISPC1.17.0-AVX2-TBB2021.2.0-INSTANCE:
extends: .build_and_test
before_script: ["scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX2 tasking:TBB2021.2.0 TRI:ON QUAD:OFF GRID:OFF CURVE:OFF SUBDIV:OFF USERGEOM:OFF INSTANCE:ON intensity:0"]
image: $DOCKER_REGISTRY/embree/fedora:25
tags: [embree, docker]
only: [web, schedules]
#####################################################################
# Release Builds
####################################################################
release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP:
stage: release
needs: []
script:
- "python scripts/test.py configure platform:x64 build:Release compiler:ICC19-VC141 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.2.0 intensity:4 package:ZIP"
- "python scripts/test.py build"
- "python scripts/test.py test"
tags: [embree, win10, icc17, avx512vl]
only: [web, schedules]
artifacts:
name: "$env:CI_JOB_NAME"
paths: [build/*.zip]
when: always
expire_in: 2 mos
release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP-manual:
extends: release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP
only: [pushes]
when: manual
release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP:
stage: release
needs: []
script:
- "scripts/test.py configure platform:x64 build:Release compiler:ICC2021.1.1 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2021.2.0 intensity:4 package:ZIP"
- "scripts/test.py build"
- "scripts/test.py test"
tags: [embree, mac, sign]
only: [web, schedules]
artifacts:
name: "$CI_JOB_NAME"
paths: [build/*.zip]
when: always
expire_in: 2 mos
release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP-manual:
extends: release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP
only: [pushes]
when: manual
release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP:
stage: release
needs: []
image: $DOCKER_REGISTRY/embree/centos:7.4
script:
- "scripts/test.py configure platform:x64 build:Release compiler:ICC2020.1 ispc:ispc1.17.0 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.2.0 intensity:4 package:ZIP"
- "scripts/test.py build"
- "scripts/test.py test"
- tar xzf build/embree-*.x86_64.linux.tar.gz
- mv embree*.x86_64.linux embree
- mkdir ospray_build
- cd ospray_build
- cmake ../scripts/ospray
- cmake --build .
- cd ospray/build
- LD_LIBRARY_PATH="$CI_PROJECT_DIR/ospray_build/install/lib:$LD_LIBRARY_PATH" PATH="$CI_PROJECT_DIR/ospray_build/ospray/build/:$PATH" ../src/ospray/scripts/tests/run_tests.sh "$CI_PROJECT_DIR/ospray_build/ospray/src/ospray"
tags: [embree, docker, avx512vl]
only: [web, schedules]
artifacts:
name: "$CI_JOB_NAME"
paths: [build/*.tar.gz]
when: always
expire_in: 2 mos
release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP-manual:
extends: release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP
only: [pushes]
when: manual
#####################################################################
# Release binaries scans
####################################################################
scan-bdba-bin:
stage: scan
image: $DOCKER_REGISTRY/embree/centos:7.4
tags: [docker]
needs: [release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP, release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP, release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP]
script:
- scripts/bdba.sh "build/embree-*"
- scripts/store_files.sh $CI_PROJECT_NAME $CI_PIPELINE_ID bdba "embree-*.pdf"
- scripts/store_files.sh $CI_PROJECT_NAME $CI_PIPELINE_ID bdba "embree-*.csv"
only: [web, schedules]
artifacts:
paths:
- embree-*.pdf
- embree-*.csv
av:
stage: scan
tags: [docker]
image: $DOCKER_REGISTRY/clamav:ubuntu20.04
needs: [release-windows-x64-Release-ICC19-VC141-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP, release-macosx-x64-Release-ICC2021.1.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP, release-linux-x64-Release-ICC2020.1-ISPC1.17.0-TBB2021.2.0-PACKAGE-ZIP]
script:
- freshclam | tee -a /tmp/av_scan.log
- clamscan -va --max-filesize=512M --max-scansize=2048M --alert-broken --alert-exceeds-max build/embree* | tee -a /tmp/av_scan.log
- scripts/store_files.sh $CI_PROJECT_NAME $CI_PIPELINE_ID av /tmp/av_scan.log
only: [web, schedules]
#####################################################################
# Preliminary benchmark setup
####################################################################
.benchmark:
stage: benchmark
tags:
- vis-perf-x8280-1
script:
- "scripts/test.py configure platform:x64 build:Release compiler:GCC ispc:ispc1.17.0 isas:AVX512 tasking:TBB2021.2.0 intensity:0 --benchmark"
- "scripts/test.py configure platform:x64 build:Release compiler:GCC ispc:ispc1.17.0 isas:AVX512 tasking:TBB2021.2.0 intensity:0 EMBREE_USE_GOOGLE_BENCHMARK:ON EMBREE_GOOGLE_BENCHMARK_DIR:/NAS/packages/apps/google-benchmark/vis-perf-x8280-1/lib64/cmake/benchmark"
- "scripts/test.py build"
- "scripts/test.py test"
- "chmod +x scripts/run-benchmark.sh"
- "scripts/run-benchmark.sh"
- "scripts/test.py run-benchmark.sh"
needs: []
benchmark_nightly:
@@ -752,3 +40,24 @@ benchmark_manual:
extends: .benchmark
except: [schedules]
when: manual
.benchmark_gpu:
stage: benchmark
image: $DOCKER_REGISTRY/embree/ubuntu:20.04
tags: [docker-gpu, dg2, perf]
before_script:
- git config --global --add safe.directory $CI_PROJECT_DIR
script:
- "scripts/run-benchmark-gpu.sh"
- "scripts/record-benchmark-gpu.sh"
needs: []
benchmark_gpu_nightly:
extends: .benchmark_gpu
only: [schedules]
benchmark_gpu_manual:
extends: .benchmark_gpu
except: [schedules]
when: manual
+79 -2
View File
@@ -1,6 +1,83 @@
Version History
---------------
### Embree 4.3.2
- MacOS universal binary compilation now works.
- Some bugfixes for AVX512 on MacOS x86 machines.
- Embree now uses level zero raytracing extension to build BVH which enables forward-compatibility.
### Embree 4.3.1
- Add missing EMBREE_GEOMETRY types to embree-config.cmake
- User defined thread count now takes precedence for internal task scheduler
- Fixed static linking issue with ze_wrapper library
- Better error reporting for SYCL platform and driver problems in embree_info and tutorial apps.
- Patch to glfw source is not applied by default anymore.
- Known issue: Running Embree on Intel® Data Center GPU Max Series with 2 tiles (e.g. Intel® Data Center GPU Max 1550) requires setting the environment variable ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE.
- Known issue: Embree build using Apple Clang 15 and ARM support (via the SEE2NEON library) may cause "EXEC_BAD_INSTRUCTION" runtime exceptions. Please use Apple Clang <= 14 on macOS.
### Embree 4.3.0
- Added instance array primitive for reducing memony requirements in scenes
with large amounts of similar instances.
- Properly checks driver if L0 RTAS extension can get loaded.
- Added varying version of rtcGetGeometryTransform for ISPC.
- Fixed signature of RTCMemoryMonitorFunction for ISPC.
- Add support for ARM64 Windows platform in CMake.
### Embree 4.2.0
- SYCL version of Embree with GPU support is no longer in beta phase.
- Improved BVH build performance on many core machines for applications that oversubscribe threads.
- Added rtcGetGeometryTransformFromScene API function that can get used inside SYCL kernels.
- No longer linking to ze_loader in SYCL mode to avoid Intel(R) oneAPI Level Zero dependency
for CPU rendering.
- Releasing test package to test Embree.
### Embree 4.1.0
- Added support for Intel® Data Center GPU Max Series.
- Added ARM64 Linux support.
- Added EMBREE_BACKFACE_CULLING_SPHERES cmake option. The new cmake option defaults to OFF.
### Embree 4.0.1
- Improved performance for Tiger Lake, Comet Lake, Cannon Lake, Kaby Lake,
and Skylake client CPUs by using 256 bit SIMD instructions by default.
- Fixed broken motion blur of RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE geometry type.
- Fixed bvh build retry issue for TBB 2020.3
- Added support for Intel® Data Center GPU Flex Series
- Fixed issue on systems without a SYCL platform.
### Embree 4.0.0
- This Embree release adds support for Intel® Arc™ GPUs through SYCL.
- The SYCL support of Embree is in beta phase. Current functionality, quality,
and GPU performance may not reflect that of the final product. Please read the
documentation section "Embree SYCL Known Issues" for known limitations.
- Embree CPU support in this release as at Gold level, incorporating the same quality
and performance as previous releases.
- A small number of API changes were required to get optimal experience and
performance on the CPU and GPU. See documentation section "Upgrading from Embree 3 to
Embree 4" for details.
- rtcIntersect and rtcOccluded function arguments changed slightly.
- RTCIntersectContext is renamed to RTCRayQuery context and most members moved to
new RTCIntersectArguments and RTCOccludedArguments structures.
- rtcFilterIntersection and rtcFilterOcclusion API calls got replaced by
rtcInvokeIntersectFilterFromGeometry and rtcInvokeOccludedFilterFromGeometry API calls.
- rtcSetGeometryEnableFilterFunctionFromArguments enables argument filter functions for some geometry.
- RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER ray query flag enables argument filter functions for each geometry.
- User geometry callbacks have to return if a valid hit was found.
- Ray masking is enabled by default now as required by most users.
- The default ray mask for geometries got changed from 0xFFFFFFFF to 0x1.
- Removed ray stream API as rarely used with minimal performance benefits over packet tracing.
- Introduced rtcForwardIntersect/rtcForwardOccluded API calls to trace tail recursive rays from user geometry callback.
- The rtcGetGeometryUserDataFromScene API call got added to be used in SYCL code.
- Added support for user geometry callback function pointer passed through ray query context
- Feature flags enable reducing code complexity for optimal performance on the GPU.
- Fixed compilation issues for ARM AArch64 processor under Linux.
- Setting default frequency level to SIMD256 for ARM on all platforms.
This allows using double pumped NEON execution by enabling EMBREE_ISA_NEON2X in cmake under Linux.
- Fixed missing end caps of motion blurred line segments.
- EMBREE_ISPC_SUPPORT is turned OFF by default.
- Embree drops support of the deprecated Intel(R) Compiler. It is replaced by
the Intel(R) oneAPI DPC++/C++ Compiler on Windows and Linux and the
Intel(R) C++ Classic Compiler on MacOS (latest tested versions is 2023.0.0).
### Embree 3.13.5
- Fixed bug in bounding flat Catmull Rom curves of subdivision level 4.
- Improved self intersection avoidance for
@@ -125,7 +202,7 @@ Version History
- For sphere geometries the intersection filter gets now invoked for
front and back hit.
- Fixed some bugs for quaternion motion blur.
- RTCIntersectContext always non-const in Embree API
- RTCRayQueryContext always non-const in Embree API
- Made RTCHit aligned to 16 bytes in Embree API
### New Features in Embree 3.7.0
@@ -398,7 +475,7 @@ Version History
when modifying only the tessellation rate and vertex array.
### New Features in Embree 2.16.2
- Fixed bug that caused NULL intersection context in intersection
- Fixed bug that caused NULL ray query context in intersection
filter when instancing was used.
- Fixed an issue where uv's where outside the triangle (or quad) for
very small triangles (or quads). In robust mode we improved the uv
+131 -37
View File
@@ -1,10 +1,11 @@
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
SET(EMBREE_VERSION_MAJOR 3)
SET(EMBREE_VERSION_MINOR 13)
SET(EMBREE_VERSION_PATCH 5)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
SET(EMBREE_VERSION_MAJOR 4)
SET(EMBREE_VERSION_MINOR 3)
SET(EMBREE_VERSION_PATCH 2)
SET(EMBREE_VERSION_NOTE "")
SET(EMBREE_VERSION ${EMBREE_VERSION_MAJOR}.${EMBREE_VERSION_MINOR}.${EMBREE_VERSION_PATCH})
@@ -12,6 +13,9 @@ MATH(EXPR EMBREE_VERSION_NUMBER "10000*${EMBREE_VERSION_MAJOR} + 100*${EMBREE_VE
SET(CPACK_RPM_PACKAGE_RELEASE 1)
PROJECT(embree${EMBREE_VERSION_MAJOR})
SET(EMBREE_PROJECT_COMPILATION ON)
include(CMakeDependentOption)
# We use our own strip tool on macOS to sign during install. This is required as CMake modifies RPATH of the binary during install.
IF (APPLE AND EMBREE_SIGN_FILE)
@@ -68,7 +72,13 @@ IF(COMMAND cmake_policy)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
ENDIF(COMMAND cmake_policy)
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
ENDIF()
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH)
@@ -81,9 +91,7 @@ MARK_AS_ADVANCED(CLEAR CMAKE_CXX_COMPILER)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/common/cmake" ${CMAKE_MODULE_PATH})
IF (BUILD_TESTING)
INCLUDE(test)
ENDIF()
INCLUDE(test)
set(BUILD_DOC OFF CACHE INTERNAL "build documentation (internal only)")
IF (BUILD_DOC)
@@ -111,7 +119,7 @@ ELSE()
SET(EMBREE_LIB_TYPE SHARED)
ENDIF()
OPTION(EMBREE_ISPC_SUPPORT "Build Embree with support for ISPC applications." ON)
OPTION(EMBREE_ISPC_SUPPORT "Build Embree with support for ISPC applications." OFF)
IF (EMSCRIPTEN)
SET(EMBREE_ISPC_SUPPORT OFF CACHE BOOL "Build Embree with support for ISPC applications." FORCE)
ENDIF()
@@ -126,7 +134,7 @@ ENDIF()
##############################################################################
# Configurations (add configurations also to common/cmake/embree-config.cmake)
OPTION(EMBREE_ZIP_MODE "Create Embree ZIP package" OFF)
OPTION(EMBREE_ZIP_MODE "Create Embree ZIP package" ON)
MARK_AS_ADVANCED(EMBREE_ZIP_MODE)
OPTION(EMBREE_INSTALL_DEPENDENCIES "Install Embree dependencies in binary packages and install" OFF)
@@ -135,23 +143,89 @@ MARK_AS_ADVANCED(EMBREE_INSTALL_DEPENDENCIES)
OPTION(EMBREE_STAT_COUNTERS "Enables statistic counters.")
OPTION(EMBREE_STACK_PROTECTOR "When enabled Embree compiles with stack protection against return address overrides." OFF)
OPTION(EMBREE_RAY_MASK "Enables ray mask support.")
IF (NOT APPLE)
OPTION(EMBREE_SYCL_SUPPORT "Enables SYCL GPU support." OFF)
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_LARGEGRF "Enables SYCL large GRF support." OFF "EMBREE_SYCL_SUPPORT" OFF)
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_DBG "Enables DPC++ debug info." OFF "EMBREE_SYCL_SUPPORT" OFF)
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_GEOMETRY_CALLBACK "Enabled geometry callbacks which are disabled by default for SYCL." OFF "EMBREE_SYCL_SUPPORT" OFF)
MARK_AS_ADVANCED(EMBREE_SYCL_LARGEGRF)
MARK_AS_ADVANCED(EMBREE_SYCL_DBG)
MARK_AS_ADVANCED(EMBREE_SYCL_GEOMETRY_CALLBACK)
IF (EMBREE_SYCL_GEOMETRY_CALLBACK)
message(WARNING "Enabling EMBREE_SYCL_GEOMETRY_CALLBACK is experimental and may result in poor performance.")
ENDIF()
IF (EMBREE_SYCL_SUPPORT)
ADD_DEFINITIONS("-DEMBREE_SYCL_SUPPORT") # FIXME: only use define from rtcore_config.h
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_RT_SIMULATION "Using hardware simulation" OFF "EMBREE_SYCL_SUPPORT" OFF)
MARK_AS_ADVANCED(EMBREE_SYCL_RT_SIMULATION)
IF (EMBREE_SYCL_RT_SIMULATION AND NOT EMBREE_SYCL_RT_VALIDATION_API AND EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
MESSAGE(FATAL_ERROR "Using EMBREE_SYCL_RT_SIMULATION requires EMBREE_SYCL_RT_VALIDATION_API=ON and EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS=OFF")
ENDIF()
IF (EMBREE_SYCL_RT_SIMULATION)
ADD_DEFINITIONS("-DEMBREE_SYCL_RT_SIMULATION")
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_RT_VALIDATION_API "Use rt_validation API instead of IGC provided rt_production API" OFF "EMBREE_SYCL_SUPPORT" OFF)
IF (EMBREE_SYCL_RT_VALIDATION_API)
ADD_DEFINITIONS("-DEMBREE_SYCL_RT_VALIDATION_API")
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS "Using L0 allocated Dispatch Globals" ON "EMBREE_SYCL_RT_VALIDATION_API" OFF)
IF (EMBREE_SYCL_RT_VALIDATION_API AND NOT EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
ADD_DEFINITIONS("-DEMBREE_SYCL_ALLOC_DISPATCH_GLOBALS")
ENDIF()
MARK_AS_ADVANCED(EMBREE_SYCL_RT_VALIDATION_API)
MARK_AS_ADVANCED(EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
IF (EMBREE_SYCL_SUPPORT)
SET(EMBREE_SYCL_AOT_DEVICES "none" CACHE STRING "SYCL devices to use for AOT compilation")
SET_PROPERTY(CACHE EMBREE_SYCL_AOT_DEVICES PROPERTY STRINGS none dg2 pvc XE_HPG_CORE XE_HPC_CORE)
SET(EMBREE_SYCL_AOT_DEVICE_REVISION 0)
IF (EMBREE_SYCL_AOT_DEVICES STREQUAL "dg2")
SET(EMBREE_SYCL_AOT_DEVICE_REVISION 4) # FIXME: bug workaround should get removed
ENDIF()
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_L0_RTAS_BUILDER "Enable Level Zero RTAS builder" ON "EMBREE_SYCL_SUPPORT" OFF)
IF (EMBREE_SYCL_L0_RTAS_BUILDER)
ADD_DEFINITIONS("-DEMBREE_SYCL_L0_RTAS_BUILDER")
ENDIF()
OPTION(EMBREE_RAY_MASK "Enables ray mask support." ON)
OPTION(EMBREE_BACKFACE_CULLING "Enables backface culling.")
OPTION(EMBREE_BACKFACE_CULLING_CURVES "Enables backface culling for curve primitives." OFF)
OPTION(EMBREE_BACKFACE_CULLING_SPHERES "Enables backface culling for sphere primitives." OFF)
OPTION(EMBREE_FILTER_FUNCTION "Enables filter functions." ON)
OPTION(EMBREE_IGNORE_INVALID_RAYS "Ignores invalid rays." OFF) # FIXME: enable by default?
OPTION(EMBREE_COMPACT_POLYS "Enables double indexed poly layout." OFF)
OPTION(EMBREE_GEOMETRY_TRIANGLE "Enables support for triangle geometries." ON)
OPTION(EMBREE_GEOMETRY_QUAD "Enables support for quad geometries." ON)
OPTION(EMBREE_GEOMETRY_CURVE "Enables support for curve geometries." ON)
OPTION(EMBREE_GEOMETRY_SUBDIVISION "Enables support for subdiv geometries." ON)
OPTION(EMBREE_GEOMETRY_USER "Enables support for user geometries." ON)
OPTION(EMBREE_GEOMETRY_INSTANCE "Enables support for instances." ON)
OPTION(EMBREE_GEOMETRY_INSTANCE_ARRAY "Enables support for instance arrays." ON)
SET(EMBREE_MAX_INSTANCE_LEVEL_COUNT 1 CACHE STRING "Maximum number of instance levels.")
IF (NOT EMBREE_GEOMETRY_INSTANCE AND NOT EMBREE_GEOMETRY_INSTANCE_ARRAY AND NOT EMBREE_MAX_INSTANCE_LEVEL_COUNT EQUAL 1)
message(FATAL_ERROR "EMBREE_MAX_INSTANCE_LEVEL_COUNT must be 1 when EMBREE_GEOMETRY_INSTANCE and EMBREE_GEOMETRY_INSTANCE_ARRAY are disabled")
ENDIF()
OPTION(EMBREE_GEOMETRY_GRID "Enables support for grid geometries." ON)
OPTION(EMBREE_GEOMETRY_POINT "Enables support for point geometries." ON)
OPTION(EMBREE_RAY_PACKETS "Enabled support for ray packets." ON)
SET(EMBREE_MAX_INSTANCE_LEVEL_COUNT 1 CACHE STRING "Maximum number of instance levels.")
SET(EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR 2.0 CACHE STRING "Self intersection avoidance factor for flat curves. Specify floating point value in range 0 to inf.")
OPTION(EMBREE_DISC_POINT_SELF_INTERSECTION_AVOIDANCE "Enables self intersection avoidance for ray oriented discs." ON)
OPTION(EMBREE_MIN_WIDTH "Enables min-width feature to enlarge curve and point thickness to pixel width." OFF)
@@ -161,10 +235,10 @@ OPTION(EMBREE_MIN_WIDTH "Enables min-width feature to enlarge curve and point th
##############################################################
# detect ARM compilation
IF (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64"))
IF (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_OSX_ARCHITECTURES STREQUAL "") OR ("arm64" IN_LIST CMAKE_OSX_ARCHITECTURES))
MESSAGE(STATUS "Building for Apple silicon")
SET(EMBREE_ARM ON)
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
MESSAGE(STATUS "Building for AArch64")
SET(EMBREE_ARM ON)
ENDIF()
@@ -201,8 +275,27 @@ ENDIF()
##############################################################
# Compiler
##############################################################
# TODO: fixme, define relwithassert also for icc, msvc, ... or remove when debug build with dpcpp is useable
IF(EMBREE_SYCL_SUPPORT)
SET(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;RelWithAssert")
ELSE()
SET(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo")
ENDIF()
# Validate build type
IF (CMAKE_BUILD_TYPE)
string(FIND "${CONFIGURATION_TYPES}" "${CMAKE_BUILD_TYPE}" MATCHED_CONFIG)
IF (${MATCHED_CONFIG} EQUAL -1)
message(FATAL_ERROR "CMAKE_BUILD_TYPE (${CMAKE_BUILD_TYPE}) allows only the following values: ${CONFIGURATION_TYPES}")
ENDIF()
ENDIF()
message(DEBUG "CMAKE_GENERATOR_TOOLSET: ${CMAKE_GENERATOR_TOOLSET}")
message(DEBUG "CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
message(DEBUG "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-fsycl COMPILER_HAS_SYCL_SUPPORT)
IF (WIN32)
IF (NOT DEFAULT_CMAKE_CONFIGURATION_TYPES_SET)
@@ -211,28 +304,24 @@ IF (WIN32)
ENDIF()
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
#message ("CMAKE_GENERATOR_TOOLSET: ${CMAKE_GENERATOR_TOOLSET}")
#message ("CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}")
#message ("CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
IF (${CMAKE_CXX_COMPILER} MATCHES ".*dpcpp")
message(FATAL_ERROR "DPCPP compiler not supported on Windows yet. Use ICX instead.")
ENDIF()
IF (${CMAKE_CXX_COMPILER_ID} MATCHES "IntelLLVM" OR
(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND ${CMAKE_CXX_COMPILER} MATCHES ".*icx"))
MESSAGE("-- DPCPP detected")
IF ((${CMAKE_CXX_COMPILER_ID} MATCHES "IntelLLVM") OR
(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND COMPILER_HAS_SYCL_SUPPORT))
MESSAGE("-- DPCPP compiler detected")
INCLUDE(dpcpp)
ELSEIF(${CMAKE_GENERATOR_TOOLSET} MATCHES "^LLVM")
MESSAGE("-- CLANG detected")
set(EMBREE_SYCL_SUPPORT OFF)
MESSAGE("-- CLANG compiler detected")
INCLUDE(clang)
ELSEIF(${CMAKE_GENERATOR_TOOLSET} MATCHES "^Intel")
MESSAGE("-- Intel Compiler detected")
set(EMBREE_SYCL_SUPPORT OFF)
MESSAGE("-- Intel compiler detected")
INCLUDE (intel)
ELSEIF(${CMAKE_CXX_COMPILER_FRONTEND_VARIANT} MATCHES "GNU")
MESSAGE("-- GNU-like Compiler detected")
set(EMBREE_SYCL_SUPPORT OFF)
MESSAGE("-- GNU-like compiler detected")
INCLUDE(gnu)
ELSE()
set(EMBREE_SYCL_SUPPORT OFF)
IF (EMBREE_ISA_AVX512)
MESSAGE(FATAL_ERROR "Microsoft Visual C++ Compiler does not support AVX512. Please use Intel Compiler or Clang.")
ENDIF()
@@ -255,6 +344,9 @@ ELSE (WIN32)
IF(${_LOWER_CXX_COMPILER_ID} MATCHES "clang" AND ${CXX_COMPILER_NAME} MATCHES "dpcpp")
STRING(REPLACE "clang" "dpcpp" _LOWER_CXX_COMPILER_ID ${_LOWER_CXX_COMPILER_ID})
ENDIF()
IF (EMBREE_SYCL_SUPPORT)
SET(_LOWER_CXX_COMPILER_ID "dpcpp")
ENDIF()
STRING(TOUPPER "${_LOWER_CXX_COMPILER_ID}" _UPPER_CXX_COMPILER_ID)
MESSAGE("-- ${_UPPER_CXX_COMPILER_ID} detected")
INCLUDE(${_LOWER_CXX_COMPILER_ID} OPTIONAL RESULT_VARIABLE COMPILER_FOUND)
@@ -283,11 +375,6 @@ IF(DEFINED EMBREE_ISA_AVX512SKX)
SET(EMBREE_ISA_AVX512 ${EMBREE_ISA_AVX512SKX} CACHE BOOL "")
ENDIF()
TRY_COMPILE(COMPILER_SUPPORTS_ARM_NEON "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/common/cmake/check_arm_neon.cpp")
IF (COMPILER_SUPPORTS_ARM_NEON)
SET(EMBREE_ARM ON)
ENDIF()
IF (CMAKE_CXX_COMPILER_WRAPPER STREQUAL "CrayPrgEnv")
SET(EMBREE_MAX_ISA "DEFAULT" CACHE STRING "Selects highest ISA to support.")
ELSEIF (EMSCRIPTEN)
@@ -326,6 +413,9 @@ IF (EMBREE_MAX_ISA STREQUAL "NONE")
ELSE()
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." ${COMPILER_SUPPORTS_AVX512})
ENDIF()
# Don't use OPTION, but still set them to OFF, so that embree-config.cmake is consisten with its definitions
SET(EMBREE_ISA_NEON OFF)
SET(EMBREE_ISA_NEON2X OFF)
ENDIF()
ELSEIF (EMBREE_MAX_ISA STREQUAL "DEFAULT")
@@ -560,11 +650,13 @@ include(package)
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/config.h.in"
"${PROJECT_SOURCE_DIR}/kernels/config.h"
)
)
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
CONFIGURE_FILE(
"${PROJECT_SOURCE_DIR}/kernels/rtcore_config.h.in"
"${PROJECT_SOURCE_DIR}/include/embree3/rtcore_config.h"
"${PROJECT_SOURCE_DIR}/include/embree4/rtcore_config.h"
)
CONFIGURE_FILE(
@@ -594,6 +686,8 @@ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(kernels)
ADD_SUBDIRECTORY(tests)
IF (EMBREE_TUTORIALS)
ADD_SUBDIRECTORY(tutorials)
ENDIF()
+103
View File
@@ -0,0 +1,103 @@
{
"version": 4,
"cmakeMinimumRequired": {
"major": 3,
"minor": 11,
"patch": 0
},
"include": [
"scripts/cmake-presets/os.json",
"scripts/cmake-presets/package.json",
"scripts/cmake-presets/compiler.json",
"scripts/cmake-presets/tbb.json",
"scripts/cmake-presets/continuous.json",
"scripts/cmake-presets/nightly.json",
"scripts/cmake-presets/release.json",
"scripts/cmake-presets/integrate.json",
"scripts/cmake-presets/performance.json"
],
"configurePresets": [
{
"name": "package-linux-icx-ispc1_19_0-tbb2021_9_0-perf",
"inherits": ["package-linux", "env", "icx", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512",
"EMBREE_USE_GOOGLE_BENCHMARK": "ON",
"EMBREE_BUILD_GOOGLE_BENCHMARK_FROM_SOURCE": "ON"
}
},
{
"name": "package-linux-icx-sycl-ispc1_19_0-tbb2021_9_0-perf",
"inherits": ["package-linux", "env", "icx", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_SYCL_SUPPORT": "ON",
"EMBREE_SYCL_L0_RTAS_BUILDER" : "OFF",
"EMBREE_SYCL_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512",
"EMBREE_USE_GOOGLE_BENCHMARK": "ON",
"EMBREE_BUILD_GOOGLE_BENCHMARK_FROM_SOURCE": "ON"
}
},
{
"name": "package-windows-v141-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-windows", "env", "v141", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "SSE2"
}
},
{
"name": "package-windows-v140-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-windows", "env", "v140", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "SSE2"
}
},
{
"name": "package-windows-icx-sycl-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-windows", "env", "icx-windows", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_SYCL_SUPPORT": "ON",
"EMBREE_SYCL_L0_RTAS_BUILDER" : "OFF",
"EMBREE_SYCL_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "linux-coverity",
"inherits": ["package-linux", "env", "gcc", "tasking_internal"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "SSE2"
}
}
]
}
+2 -1
View File
@@ -2,4 +2,5 @@
## SPDX-License-Identifier: Apache-2.0
set(CTEST_PROJECT_NAME "Embree")
set(TEST_MODELS_HASH 866df160e2cc1074d68677e1e6e4135f8c324995)
set(TEST_MODELS_HASH 05b5a61035485d3090868f9abf5cc057d1e31101)
+2983 -1484
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -12,7 +12,8 @@ namespace embree
template<typename Index, class UnaryPredicate>
__forceinline bool parallel_any_of (Index first, Index last, UnaryPredicate pred)
{
bool ret = false;
std::atomic_bool ret;
ret = false;
#if defined(TASKING_TBB)
#if TBB_INTERFACE_VERSION >= 12002
+15 -9
View File
@@ -5,7 +5,7 @@
#include "../tasking/taskscheduler.h"
#include "../sys/array.h"
#include "../math/math.h"
#include "../math/emath.h"
#include "../math/range.h"
namespace embree
@@ -14,14 +14,17 @@ namespace embree
template<typename Index, typename Func>
__forceinline void parallel_for( const Index N, const Func& func)
{
#if defined(TASKING_INTERNAL)
#if defined(TASKING_INTERNAL) && !defined(TASKING_TBB)
if (N) {
TaskScheduler::TaskGroupContext context;
TaskScheduler::spawn(Index(0),N,Index(1),[&] (const range<Index>& r) {
assert(r.size() == 1);
func(r.begin());
});
if (!TaskScheduler::wait())
throw std::runtime_error("task cancelled");
},&context);
TaskScheduler::wait();
if (context.cancellingException != nullptr) {
std::rethrow_exception(context.cancellingException);
}
}
#elif defined(TASKING_TBB)
#if TBB_INTERFACE_VERSION >= 12002
@@ -53,10 +56,13 @@ namespace embree
__forceinline void parallel_for( const Index first, const Index last, const Index minStepSize, const Func& func)
{
assert(first <= last);
#if defined(TASKING_INTERNAL)
TaskScheduler::spawn(first,last,minStepSize,func);
if (!TaskScheduler::wait())
throw std::runtime_error("task cancelled");
#if defined(TASKING_INTERNAL) && !defined(TASKING_TBB)
TaskScheduler::TaskGroupContext context;
TaskScheduler::spawn(first,last,minStepSize,func,&context);
TaskScheduler::wait();
if (context.cancellingException != nullptr) {
std::rethrow_exception(context.cancellingException);
}
#elif defined(TASKING_TBB)
#if TBB_INTERFACE_VERSION >= 12002
+2 -2
View File
@@ -175,8 +175,8 @@ namespace embree
/* calculate all left and right ranges that are on the wrong global side */
size_t numMisplacedRangesLeft = 0;
size_t numMisplacedRangesRight = 0;
size_t numMisplacedItemsLeft = 0;
size_t numMisplacedItemsRight = 0;
size_t numMisplacedItemsLeft MAYBE_UNUSED = 0;
size_t numMisplacedItemsRight MAYBE_UNUSED = 0;
for (size_t i=0; i<numTasks; i++)
{
+1 -1
View File
@@ -43,7 +43,7 @@ namespace embree
template<typename Index, typename Value, typename Func, typename Reduction>
__forceinline Value parallel_reduce( const Index first, const Index last, const Index minStepSize, const Value& identity, const Func& func, const Reduction& reduction )
{
#if defined(TASKING_INTERNAL)
#if defined(TASKING_INTERNAL) && !defined(TASKING_TBB)
/* fast path for small number of iterations */
Index taskCount = (last-first+minStepSize-1)/minStepSize;
+1 -1
View File
@@ -37,7 +37,7 @@
#===============================================================================
# We use INTERFACE libraries, which are only supported in 3.x
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.5)
# These two are used to automatically find the root and include directories.
set(_TBB_INCLUDE_SUBDIR "include")
+15 -5
View File
@@ -8,10 +8,19 @@ MACRO(_SET_IF_EMPTY VAR VALUE)
ENDMACRO()
IF (EMBREE_ARM)
SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__")
SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__")
SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
IF ("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES)
# set ARM an x86 flags for macOS universal binary build
SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__ -msse -msse2 -mno-sse4.2")
SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__ -msse4.2")
SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__ -mavx")
SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__ -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
_SET_IF_EMPTY(FLAGS_AVX512 "-march=skx")
ELSE ()
SET(FLAGS_SSE2 "-D__SSE__ -D__SSE2__")
SET(FLAGS_SSE42 "-D__SSE4_2__ -D__SSE4_1__")
SET(FLAGS_AVX "-D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
SET(FLAGS_AVX2 "-D__AVX2__ -D__AVX__ -D__SSE4_2__ -D__SSE4_1__ -D__BMI__ -D__BMI2__ -D__LZCNT__")
ENDIF ()
ELSE ()
# for `thread` keyword
_SET_IF_EMPTY(FLAGS_SSE2 "-msse -msse2 -mno-sse4.2")
@@ -86,7 +95,7 @@ ELSE()
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules
@@ -142,4 +151,5 @@ ELSE()
ENDIF()
ENDIF(APPLE)
ENDIF()
View File
+244 -89
View File
@@ -13,99 +13,253 @@ _SET_IF_EMPTY(FLAGS_AVX "-mavx")
_SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
_SET_IF_EMPTY(FLAGS_AVX512 "-march=skx")
IF (WIN32)
SET(COMMON_CXX_FLAGS "")
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /EHsc") # catch C++ exceptions only and extern "C" functions never throw a C++ exception
# SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /MP") # compile source files in parallel
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GR") # enable runtime type information (on by default)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -Xclang -fcxx-exceptions") # enable C++ exceptions in Clang
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /w") # disable all warnings
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /Gy") # package individual functions
IF (EMBREE_STACK_PROTECTOR)
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS") # protects against return address overrides
ELSE()
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /GS-") # do not protect against return address overrides
ENDIF()
MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
IF (EMBREE_STACK_PROTECTOR)
SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "/GS-")
ENDIF()
ENDMACRO()
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DDEBUG") # enables assertions
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DTBB_USE_DEBUG") # configures TBB in debug mode
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Ox") # enable full optimizations
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Oi") # inline intrinsic functions
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG") # generate debug information
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG") # generate debug information
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox") # enable full optimizations
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi") # inline intrinsic functions
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ox") # enable full optimizations
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Oi") # inline intrinsic functions
SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") # generate debug information
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") # generate debug information
SET(SECURE_LINKER_FLAGS "")
SET(SECURE_LINKER_FLAGS "${SECURE_LINKER_FLAGS} /NXCompat") # compatible with data execution prevention (on by default)
SET(SECURE_LINKER_FLAGS "${SECURE_LINKER_FLAGS} /DynamicBase") # random rebase of executable at load time
IF (CMAKE_SIZEOF_VOID_P EQUAL 4)
SET(SECURE_LINKER_FLAGS "${SECURE_LINKER_FLAGS} /SafeSEH") # invoke known exception handlers (Win32 only, x64 exception handlers are safe by design)
ENDIF()
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SECURE_LINKER_FLAGS}")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SECURE_LINKER_FLAGS}")
INCLUDE(msvc_post)
# workaround for file encoding problems of kernels/embree.rc found here https://gitlab.kitware.com/cmake/cmake/-/issues/18311
set(CMAKE_NINJA_CMCLDEPS_RC OFF)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise") # dpcpp has fp-model fast as default
ELSE()
IF (NOT WIN32)
OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
OPTION(EMBREE_ADDRESS_SANITIZER "Enabled CLANG address sanitizer." OFF)
IF (EMBREE_IGNORE_CMAKE_CXX_FLAGS)
SET(CMAKE_CXX_FLAGS "")
ENDIF()
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM
IF (NOT APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
GET_FILENAME_COMPONENT(SYCL_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
GET_FILENAME_COMPONENT(SYCL_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
IF (NOT SYCL_COMPILER_NAME STREQUAL "clang++")
SET(SYCL_ONEAPI TRUE)
IF (SYCL_COMPILER_NAME STREQUAL "icx" OR SYCL_COMPILER_NAME STREQUAL "icpx")
SET(SYCL_ONEAPI_ICX TRUE)
ELSE()
SET(SYCL_ONEAPI_ICX FALSE)
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enables C++11 features
SET(STORE_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
SET(STORE_CMAKE_CXX_LINK_FLAGS ${CMAKE_CXX_LINK_FLAGS})
IF (NOT EMBREE_SYCL_SUPPORT)
# if EMBREE_SYCL_SUPPORT is off we don't want the -fsycl flags
SET(CMAKE_CXX_FLAGS ${STORE_CMAKE_CXX_FLAGS})
SET(CMAKE_CXX_LINK_FLAGS ${STORE_CMAKE_CXX_LINK_FLAGS})
ENDIF()
ELSE()
SET(SYCL_ONEAPI FALSE)
ADD_DEFINITIONS(-D__INTEL_LLVM_COMPILER)
ENDIF()
IF (EMBREE_SYCL_SUPPORT)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-sycl") # makes dpcpp compiler compatible with clang++
SET(CMAKE_CXX_FLAGS_SYCL "-fsycl -fsycl-unnamed-lambda -Xclang -fsycl-allow-func-ptr")
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -Wno-mismatched-tags -Wno-pessimizing-move -Wno-reorder -Wno-unneeded-internal-declaration -Wno-delete-non-abstract-non-virtual-dtor -Wno-dangling-field -Wno-unknown-pragmas -Wno-logical-op-parentheses")
IF (SYCL_ONEAPI_ICX AND WIN32)
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} /debug:none") # FIXME: debug information generation takes forever in SYCL
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} /DNDEBUG") # FIXME: debug information generation takes forever in SYCL
ELSE()
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -g0") # FIXME: debug information generation takes forever in SYCL
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -UDEBUG -DNDEBUG") # FIXME: assertion still not working in SYCL
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-bitwise-instead-of-logical") # disables "use of bitwise '&' with boolean operands" warning
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -Wno-bitwise-instead-of-logical") # disables "use of bitwise '&' with boolean operands" warning
IF (WIN32)
SET(SYCL_COMPILER_LIB_DIR "${SYCL_COMPILER_DIR}/../lib")
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
file(GLOB SYCL_LIB RELATIVE ${SYCL_COMPILER_LIB_DIR}
${SYCL_COMPILER_LIB_DIR}/sycld.lib
${SYCL_COMPILER_LIB_DIR}/sycl[0-9]d.lib
${SYCL_COMPILER_LIB_DIR}/sycl[0-9][0-9]d.lib)
ELSE()
file(GLOB SYCL_LIB RELATIVE ${SYCL_COMPILER_LIB_DIR}
${SYCL_COMPILER_LIB_DIR}/sycl.lib
${SYCL_COMPILER_LIB_DIR}/sycl[0-9].lib
${SYCL_COMPILER_LIB_DIR}/sycl[0-9][0-9].lib)
ENDIF()
LIST(GET SYCL_LIB 0 SYCL_LIB)
GET_FILENAME_COMPONENT(SYCL_LIB_NAME ${SYCL_LIB} NAME_WE)
ELSE()
SET(SYCL_LIB_NAME "sycl")
ENDIF()
SET(CMAKE_LINK_FLAGS_SYCL "-fsycl")
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableOCLNoInlineAttr=0") # enabled __noinline
#LIST(APPEND CMAKE_IGC_OPTIONS "ControlKernelTotalSize=0")
#LIST(APPEND CMAKE_IGC_OPTIONS "SubroutineThreshold=110000") # Minimal kernel size to enable subroutines
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableUnmaskedFunctions=1") # enables unmasked functions
#LIST(APPEND CMAKE_IGC_OPTIONS "ByPassAllocaSizeHeuristic=64") # puts small arrays into registers
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableIndirectCallOptimization=0") # Enables inlining indirect calls by comparing function addresses
#LIST(APPEND CMAKE_IGC_OPTIONS "FunctionControl=0") # 0 = default, 1 = inline, 2 = subroutine, 3 = stackcall, 4 = keep indirect calls
#LIST(APPEND CMAKE_IGC_OPTIONS "forceGlobalRA=1") # "force global register allocator
#LIST(APPEND CMAKE_IGC_OPTIONS "TotalGRFNum=128") # Total GRF used for register allocation
#LIST(APPEND CMAKE_IGC_OPTIONS "GRFNumToUse=64") # "Set the number of general registers to use (64 to totalGRFNum)
#LIST(APPEND CMAKE_IGC_OPTIONS "ReplaceIndirectCallWithJmpi=1") # Replace indirect call with jmpi instruction (HW WA)
#LIST(APPEND CMAKE_IGC_OPTIONS "DisableUniformAnalysis=1") # Setting this to 1/true adds a compiler switch to disable uniform_analysis
#LIST(APPEND CMAKE_IGC_OPTIONS "DisableLoopUnroll=1") # Setting this to 1/true adds a compiler switch to disable loop unrolling
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableStatelessToStatefull=0") # Enable Stateless To Statefull transformation for global and constant address space in OpenCL kernels
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableRecursionOpenCL=1") # Enable recursion with OpenCL user functions
#LIST(APPEND CMAKE_IGC_OPTIONS "EnableAdvMemOpt=0") # Enable advanced memory optimization
#LIST(APPEND CMAKE_IGC_OPTIONS "UniformMemOptLimit=512") # "Limit of uniform memory optimization in bits
#LIST(APPEND CMAKE_IGC_OPTIONS "EnablePreemption=0") # Enable generating preeemptable code (SKL+)
#LIST(APPEND CMAKE_IGC_OPTIONS "AllowSubroutineAndInirectdCalls=1") # Allow subroutine in the presence of indirect calls
#LIST(APPEND CMAKE_IGC_OPTIONS "AllocaRAPressureThreshold=0") # The threshold for the register pressure potential (this reduces amount of spilling!)
#LIST(APPEND CMAKE_IGC_OPTIONS "AssumeInt64Support=0") # Architecture with partial int64 still promote uniform arrays to registers
LIST(APPEND CMAKE_IGC_OPTIONS "VISAOptions=-scratchAllocForStackInKB 128 ") # this works around some IGC bug in spill compression
IF (CMAKE_BUILD_TYPE STREQUAL "Debug") # to allow printf inside indirectly callable function
LIST(APPEND CMAKE_IGC_OPTIONS "ForceInlineStackCallWithImplArg=0")
LIST(APPEND CMAKE_IGC_OPTIONS "EnableGlobalStateBuffer=1")
ENDIF()
STRING(REPLACE ";" "," CMAKE_IGC_OPTIONS "${CMAKE_IGC_OPTIONS}")
IF (EMBREE_SYCL_AOT_DEVICE_REVISION GREATER 0)
SET(CMAKE_OCL_OPTIONS "${CMAKE_OCL_OPTIONS} -revision_id ${EMBREE_SYCL_AOT_DEVICE_REVISION}") # Enable this to override the stepping/RevId
ENDIF()
SET(CMAKE_OCL_OPTIONS "${CMAKE_OCL_OPTIONS} -cl-intel-greater-than-4GB-buffer-required") # enables support for buffers larger than 4GB
IF (EMBREE_SYCL_LARGEGRF)
SET(CMAKE_OCL_OPTIONS "${CMAKE_OCL_OPTIONS} -internal_options -cl-intel-256-GRF-per-thread") # large GRF mode
ENDIF()
SET(CMAKE_OCL_OTHER_OPTIONS "${CMAKE_OCL_OTHER_OPTIONS} -cl-intel-force-global-mem-allocation -cl-intel-no-local-to-generic")
#SET(CMAKE_OCL_OTHER_OPTIONS "${CMAKE_OCL_OTHER_OPTIONS} -cl-intel-private-memory-minimal-size-per-thread 8192")
IF (EMBREE_SYCL_AOT_DEVICES STREQUAL "none")
SET(CMAKE_CXX_FLAGS_SYCL_AOT "-fsycl-targets=spir64")
ELSE()
SET(CMAKE_CXX_FLAGS_SYCL_AOT "-fsycl-targets=spir64,spir64_gen")
ENDIF()
SET(CMAKE_LINK_FLAGS_SYCL_AOT "${CMAKE_CXX_FLAGS_SYCL_AOT} -Xsycl-target-backend=spir64 \"${CMAKE_OCL_OPTIONS} -options \\\"${CMAKE_OCL_OTHER_OPTIONS} -igc_opts='${CMAKE_IGC_OPTIONS}'\\\"\"")
IF (NOT EMBREE_SYCL_AOT_DEVICES STREQUAL "none")
SET(CMAKE_LINK_FLAGS_SYCL_AOT "${CMAKE_LINK_FLAGS_SYCL_AOT} -Xsycl-target-backend=spir64_gen \"-device ${EMBREE_SYCL_AOT_DEVICES} ${CMAKE_OCL_OPTIONS} -options \\\"${CMAKE_OCL_OTHER_OPTIONS} -igc_opts='${CMAKE_IGC_OPTIONS}'\\\"\"")
ENDIF()
IF (EMBREE_SYCL_DBG)
SET(CMAKE_CXX_FLAGS_SYCL_AOT "-g")
ENDIF()
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} ${CMAKE_CXX_FLAGS_SYCL_AOT}")
SET(CMAKE_LINK_FLAGS_SYCL "${CMAKE_LINK_FLAGS_SYCL} ${CMAKE_LINK_FLAGS_SYCL_AOT}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pessimizing-move") # disabled: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
IF (SYCL_ONEAPI_ICX AND WIN32)
IF (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I\"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -I\"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # disable warning from SYCL header
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I\"${SYCL_COMPILER_DIR}/../include/sycl\" -I\"${SYCL_COMPILER_DIR}/../include/\"") # disable warning from SYCL header
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++17")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
IF (SYCL_ONEAPI_ICX AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 2024.0)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl\" -isystem \"${SYCL_COMPILER_DIR}/../opt/compiler/include/sycl/sycl\"") # disable warning from SYCL header
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${SYCL_COMPILER_DIR}/../include/sycl\" -isystem \"${SYCL_COMPILER_DIR}/../include/\"") # disable warning from SYCL header
ENDIF()
# enable C++17 features
IF (SYCL_ONEAPI_ICX AND WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++17")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
ENDIF()
ENDIF(EMBREE_SYCL_SUPPORT)
IF(SYCL_ONEAPI_ICX)
IF (WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qno-intel-lib")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qno-intel-lib")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qimf-use-svml:false")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qimf-use-svml:false")
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} /Qno-intel-lib")
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} /Qno-intel-lib")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /Qoption,link,/DEPENDENTLOADFLAG:0x2000")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /Qoption,link,/DEPENDENTLOADFLAG:0x2000")
ELSE()
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-intel")
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -static-intel")
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fimf-use-svml=false")
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fimf-use-svml=false")
IF (NOT EMBREE_SYCL_SUPPORT)
SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -no-intel-lib")
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -no-intel-lib")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-intel-lib")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-intel-lib")
ENDIF()
ENDIF()
ENDIF()
IF (EMBREE_STACK_PROTECTOR)
IF (SYCL_ONEAPI_ICX AND WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS") # protects against return address overrides
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides
ENDIF()
ENDIF()
MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
IF (EMBREE_STACK_PROTECTOR)
IF (SYCL_ONEAPI_ICX AND WIN32)
SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "/GS-")
ELSE()
SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "-fno-stack-protector")
ENDIF()
ENDIF()
ENDMACRO()
IF (SYCL_ONEAPI_ICX AND WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise") # makes dpcpp compiler compatible with clang++
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") # catch C++ exceptions only and extern "C" functions never throw a C++ exception
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR") # enable runtime type information (on by default)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fcxx-exceptions") # enable C++ exceptions in Clang
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Gy") # package individual functions
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") # makes all symbols hidden by default
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") # makes all inline symbols hidden by default
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # disables strict aliasing rules
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-vectorize") # disable auto vectorizer
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2") # perform extra security checks for some standard library calls
IF (EMBREE_STACK_PROTECTOR)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector") # protects against return address overrides
ENDIF()
MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
IF (EMBREE_STACK_PROTECTOR)
SET_SOURCE_FILES_PROPERTIES(${file} PROPERTIES COMPILE_FLAGS "-fno-stack-protector")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat char as signed on all processors, including ARM
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") # enables most warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security") # enables string format vulnerability warnings
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise") # makes dpcpp compiler compatible with clang++
ENDIF()
IF (WIN32)
IF (NOT EMBREE_SYCL_SUPPORT)
IF (SYCL_ONEAPI_ICX)
IF (${MSVC_VERSION} VERSION_GREATER_EQUAL 1916)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++14")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qstd=c++11")
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Oi")
ELSE()
IF (${MSVC_VERSION} VERSION_GREATER_EQUAL 1916)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF()
ENDIF()
ENDMACRO()
ENDIF()
INCLUDE(msvc_post)
# workaround for file encoding problems of kernels/embree.rc found here https://gitlab.kitware.com/cmake/cmake/-/issues/18311
set(CMAKE_NINJA_CMCLDEPS_RC OFF)
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") # enables support for more secure position independent execution
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # generate position independent code suitable for shared libraries
OPTION(EMBREE_ADDRESS_SANITIZER "Enabled CLANG address sanitizer." OFF)
IF (EMBREE_ADDRESS_SANITIZER)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-optimize-sibling-calls")
ENDIF()
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-intel") # links intel runtime statically
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-intel") # links intel runtime statically
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise") # dpcpp has fp-model fast as default
SET(CMAKE_CXX_FLAGS_DEBUG "")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") # enable assertions
@@ -121,18 +275,19 @@ ELSE()
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") # disable assertions
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") # enable full optimizations
IF (APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7") # makes sure code runs on older MacOSX versions
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # link against libc++ which supports C++11 features
ELSE(APPLE)
IF (NOT EMBREE_ADDRESS_SANITIZER) # for address sanitizer this causes link errors
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") # issues link error for undefined symbols in shared library
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") # enables position independent execution for executable
ENDIF()
ENDIF(APPLE)
IF(EMBREE_SYCL_SUPPORT)
SET(CMAKE_CXX_FLAGS_RELWITHASSERT "")
SET(CMAKE_CXX_FLAGS_RELWITHASSERT "${CMAKE_CXX_FLAGS_RELWITHASSERT} -DDEBUG") # enable assertions
SET(CMAKE_CXX_FLAGS_RELWITHASSERT "${CMAKE_CXX_FLAGS_RELWITHASSERT} -O3") # enable full optimizations
ENDIF(EMBREE_SYCL_SUPPORT)
IF (NOT EMBREE_ADDRESS_SANITIZER) # for address sanitizer this causes link errors
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") # issues link error for undefined symbols in shared library
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack") # we do not need an executable stack
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z relro -z now") # re-arranges data sections to increase security
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") # enables position independent execution for executable
ENDIF()
ENDIF()
+32 -2
View File
@@ -22,10 +22,13 @@ SET(EMBREE_ISA_AVX2 @EMBREE_ISA_AVX2@)
SET(EMBREE_ISA_AVX512 @EMBREE_ISA_AVX512@)
SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512@) # just for compatibility
SET(EMBREE_ISA_NEON @EMBREE_ISA_NEON@)
SET(EMBREE_ISA_NEON2X @EMBREE_ISA_NEON2X@)
SET(EMBREE_BUILD_TYPE @CMAKE_BUILD_TYPE@)
SET(EMBREE_ISPC_SUPPORT @EMBREE_ISPC_SUPPORT@)
SET(EMBREE_STATIC_LIB @EMBREE_STATIC_LIB@)
SET(EMBREE_SYCL_SUPPORT @EMBREE_SYCL_SUPPORT@)
SET(EMBREE_SYCL_GEOMETRY_CALLBACK @EMBREE_SYCL_GEOMETRY_CALLBACK@)
SET(EMBREE_TUTORIALS @EMBREE_TUTORIALS@)
SET(EMBREE_RAY_MASK @EMBREE_RAY_MASK@)
@@ -42,6 +45,9 @@ SET(EMBREE_GEOMETRY_QUAD @EMBREE_GEOMETRY_QUAD@)
SET(EMBREE_GEOMETRY_CURVE @EMBREE_GEOMETRY_CURVE@)
SET(EMBREE_GEOMETRY_SUBDIVISION @EMBREE_GEOMETRY_SUBDIVISION@)
SET(EMBREE_GEOMETRY_USER @EMBREE_GEOMETRY_USER@)
SET(EMBREE_GEOMETRY_INSTANCE @EMBREE_GEOMETRY_INSTANCE@)
SET(EMBREE_GEOMETRY_INSTANCE_ARRAY @EMBREE_GEOMETRY_INSTANCE_ARRAY@)
SET(EMBREE_GEOMETRY_GRID @EMBREE_GEOMETRY_GRID@)
SET(EMBREE_GEOMETRY_POINT @EMBREE_GEOMETRY_POINT@)
SET(EMBREE_RAY_PACKETS @EMBREE_RAY_PACKETS@)
@@ -50,11 +56,13 @@ SET(EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR @EMBREE_CURVE_SELF_INTERSECT
SET(EMBREE_DISC_POINT_SELF_INTERSECTION_AVOIDANCE @EMBREE_DISC_POINT_SELF_INTERSECTION_AVOIDANCE@)
SET(EMBREE_MIN_WIDTH @EMBREE_MIN_WIDTH@)
IF (EMBREE_TASKING_SYSTEM STREQUAL "TBB")
FIND_PACKAGE(TBB REQUIRED ${EMBREE_TBB_COMPONENT})
IF (EMBREE_STATIC_LIB AND (EMBREE_TASKING_SYSTEM STREQUAL "TBB"))
INCLUDE(CMakeFindDependencyMacro)
FIND_DEPENDENCY(TBB)
ENDIF()
IF (EMBREE_STATIC_LIB)
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/sys-targets.cmake")
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/math-targets.cmake")
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/simd-targets.cmake")
@@ -79,4 +87,26 @@ IF (EMBREE_STATIC_LIB)
ENDIF()
IF (EMBREE_SYCL_SUPPORT)
SET(EMBREE_SYCL_AOT_DEVICES @EMBREE_SYCL_AOT_DEVICES@)
SET(EMBREE_SYCL_LARGEGRF @EMBREE_SYCL_LARGEGRF@)
SET(EMBREE_SYCL_RT_VALIDATION_API @EMBREE_SYCL_RT_VALIDATION_API@)
IF (EMBREE_SYCL_RT_VALIDATION_API)
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_rthwif_sycl-targets.cmake")
ENDIF()
IF (EMBREE_STATIC_LIB)
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_rthwif-targets.cmake")
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/ze_wrapper-targets.cmake")
ENDIF()
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_sycl-targets.cmake")
ENDIF()
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake")
SET(EMBREE_TESTING_ONLY_SYCL_TESTS @EMBREE_TESTING_ONLY_SYCL_TESTS@)
SET(EMBREE_TESTING_INTENSITY @EMBREE_TESTING_INTENSITY@)
SET(EMBREE_TESTING_MEMCHECK @EMBREE_TESTING_MEMCHECK@)
SET(EMBREE_TESTING_BENCHMARK @EMBREE_TESTING_BENCHMARK@)
+7 -6
View File
@@ -1,11 +1,6 @@
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
IF (EMBREE_STATIC_LIB)
INSTALL(TARGETS TBB EXPORT TBB-targets)
INSTALL(EXPORT TBB-targets DESTINATION "${EMBREE_CMAKEEXPORT_DIR}" COMPONENT devel)
ENDIF()
IF (EMBREE_INSTALL_DEPENDENCIES)
IF (TARGET TBB::${EMBREE_TBB_COMPONENT})
GET_TARGET_PROPERTY(LIB_PATH TBB::${EMBREE_TBB_COMPONENT} IMPORTED_LOCATION_RELEASE)
@@ -13,9 +8,15 @@ IF (EMBREE_INSTALL_DEPENDENCIES)
INSTALL(FILES "${LIB_PATH}" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
GET_TARGET_PROPERTY(IMPLIB_PATH TBB::${EMBREE_TBB_COMPONENT} IMPORTED_IMPLIB_RELEASE)
INSTALL(FILES "${IMPLIB_PATH}" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
# Include tbbmalloc.dll even though we don't use or need tbb_malloc.dll because it is searched for by tbb.dll.
GET_FILENAME_COMPONENT(LIB_FOLDER ${LIB_PATH} DIRECTORY)
FILE(GLOB TBB_MALLOC_FILES LIST_DIRECTORIES false "${LIB_FOLDER}/tbbmalloc.dll" "${LIB_FOLDER}/tbbmalloc?.dll")
INSTALL(FILES "${TBB_MALLOC_FILES}" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
ELSE()
GET_FILENAME_COMPONENT(LIB_DIR "${LIB_PATH}" DIRECTORY)
FILE(GLOB LIB_FILES ${LIB_DIR}/libtbb.*)
FILE(GLOB LIB_FILES ${LIB_DIR}/libtbb.* ${LIB_DIR}/libtbbmalloc.so*)
INSTALL(FILES ${LIB_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
ELSE()
+2 -2
View File
@@ -39,8 +39,6 @@ IF (NOT EMBREE_ISPC_EXECUTABLE)
FIND_PROGRAM(EMBREE_ISPC_EXECUTABLE ispc PATHS ${ISPC_DIR_HINT} DOC "Path to the ISPC executable.")
IF (NOT EMBREE_ISPC_EXECUTABLE)
MESSAGE(FATAL_ERROR "Intel SPMD Compiler (ISPC) not found. Disable EMBREE_ISPC_SUPPORT or install ISPC.")
ELSE()
MESSAGE(STATUS "Found Intel SPMD Compiler (ISPC): ${EMBREE_ISPC_EXECUTABLE}")
ENDIF()
ENDIF()
@@ -51,6 +49,8 @@ EXECUTE_PROCESS(COMMAND ${EMBREE_ISPC_EXECUTABLE} --version
IF (NOT ${ISPC_RESULT} STREQUAL "0")
MESSAGE(FATAL_ERROR "Error executing ISPC executable '${EMBREE_ISPC_EXECUTABLE}': ${ISPC_RESULT}")
ELSE()
MESSAGE(STATUS "Found working Intel SPMD Compiler (ISPC): ${EMBREE_ISPC_EXECUTABLE}")
ENDIF()
STRING(REGEX MATCH "([0-9]+[.][0-9]+[.][0-9]+)" DUMMY "${ISPC_OUTPUT}")
+3
View File
@@ -22,6 +22,9 @@ MACRO(DISABLE_STACK_PROTECTOR_FOR_FILE file)
ENDIF()
ENDMACRO()
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x2000")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x2000")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
STRING(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) # disable native runtime checks
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DDEBUG") # enables assertions
+171 -27
View File
@@ -19,22 +19,130 @@ ELSE()
ENDIF()
ENDIF()
##############################################################
# Install SYCL specific files
##############################################################
# SYCL library
IF (EMBREE_SYCL_SUPPORT AND EMBREE_INSTALL_DEPENDENCIES)
GET_FILENAME_COMPONENT(DPCPP_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
IF (WIN32)
FILE(GLOB LIB_SYCL_LIB_FILES LIST_DIRECTORIES FALSE
"${DPCPP_COMPILER_DIR}/../lib/sycl.lib"
"${DPCPP_COMPILER_DIR}/../lib/sycl?.lib")
INSTALL(FILES ${LIB_SYCL_LIB_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
FILE(GLOB LIB_SYCL_DLL_FILES LIST_DIRECTORIES FALSE
"${DPCPP_COMPILER_DIR}/../bin/sycl.dll"
"${DPCPP_COMPILER_DIR}/../bin/sycl?.dll")
INSTALL(FILES ${LIB_SYCL_DLL_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
INSTALL(FILES "${DPCPP_COMPILER_DIR}/pi_level_zero.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
INSTALL(FILES "${DPCPP_COMPILER_DIR}/win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib OPTIONAL)
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/svml_dispmd.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/svml_dispmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/libmmd.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/pi_win_proxy_loader.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/pi_win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
ELSE()
FILE(GLOB LIB_SYCL_FILES LIST_DIRECTORIES FALSE
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?.?"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?.?-?")
INSTALL(FILES ${LIB_SYCL_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../lib/libpi_level_zero.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libsvml.so")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libsvml.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libirng.so")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libirng.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libimf.so")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libimf.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so")
FILE(GLOB LIB_SYCL_FILES LIST_DIRECTORIES FALSE
"${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so"
"${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so.?")
INSTALL(FILES ${LIB_SYCL_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
ENDIF()
ENDIF()
##############################################################
# Install MSVC runtime
##############################################################
IF (WIN32)
IF(SYCL_ONEAPI_ICX AND EMBREE_INSTALL_DEPENDENCIES)
GET_FILENAME_COMPONENT(DPCPP_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}//libmmd.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/svml_dispmd.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/svml_dispmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
ENDIF()
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS TRUE)
INCLUDE(InstallRequiredSystemLibraries)
LIST(FILTER CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS INCLUDE REGEX ".*msvcp[0-9]+\.dll|.*vcruntime[0-9]+\.dll|.*vcruntime[0-9]+_[0-9]+\.dll")
INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ELSE()
IF(SYCL_ONEAPI_ICX AND EMBREE_INSTALL_DEPENDENCIES)
GET_FILENAME_COMPONENT(DPCPP_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libsvml.so")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libsvml.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libirng.so")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libirng.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libimf.so")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libimf.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so")
FILE(GLOB LIB_SYCL_FILES LIST_DIRECTORIES FALSE
"${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so"
"${DPCPP_COMPILER_DIR}/../compiler/lib/intel64_lin/libintlc.so.?")
INSTALL(FILES ${LIB_SYCL_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
ENDIF()
ENDIF()
ENDIF()
##############################################################
# Install Headers
##############################################################
INSTALL(DIRECTORY include/embree3 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT devel)
INSTALL(DIRECTORY include/embree4 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT devel)
IF (NOT WIN32)
INSTALL(DIRECTORY man/man3 DESTINATION "${CMAKE_INSTALL_MANDIR}" COMPONENT devel)
ENDIF()
@@ -57,6 +165,9 @@ INSTALL(FILES "${PROJECT_SOURCE_DIR}/README.md" DESTINATION "${CMAKE_INSTALL_DOC
INSTALL(FILES "${PROJECT_SOURCE_DIR}/readme.pdf" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs-TBB.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs-OIDN.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs-DPCPP.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
INSTALL(FILES "${PROJECT_SOURCE_DIR}/third-party-programs-oneAPI-DPCPP.txt" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT lib)
##############################################################
# Install scripts to set embree paths
@@ -130,7 +241,11 @@ INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION "$
##############################################################
SET(CPACK_PACKAGE_NAME "Intel(R) Embree Ray Tracing Kernels")
SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}${EMBREE_VERSION_NOTE}")
IF (EMBREE_SYCL_SUPPORT)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.sycl")
SET(EMBREE_VERSION_SUFFIX)
ENDIF()
#SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png")
#SET(CPACK_PACKAGE_RELOCATABLE TRUE)
SET(CPACK_STRIP_FILES TRUE)
@@ -142,14 +257,25 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Intel(R) Embree implements high performan
SET(CPACK_PACKAGE_VENDOR "Intel Corporation")
SET(CPACK_PACKAGE_CONTACT embree_support@intel.com)
SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
SET(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP)
SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "Library")
SET(CPACK_COMPONENT_LIB_DESCRIPTION "The Embree library including documentation.")
SET(CPACK_COMPONENT_LIB_GROUP "embree")
SET(CPACK_COMPONENT_DEVEL_DISPLAY_NAME "Development")
SET(CPACK_COMPONENT_DEVEL_DESCRIPTION "Header Files for C and ISPC required to develop applications with Embree.")
SET(CPACK_COMPONENT_DEVEL_GROUP "embree")
SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Tutorials demonstrating how to use Embree.")
SET(CPACK_COMPONENT_EXAMPLES_GROUP "embree")
SET(CPACK_COMPONENT_TESTING_DISPLAY_NAME "Testing")
SET(CPACK_COMPONENT_TESTING_DESCRIPTION "Models and reference images for tests")
SET(CPACK_COMPONENT_TESTING_GROUP "embree-testing")
# dependencies between components
#SET(CPACK_COMPONENT_DEVEL_DEPENDS lib)
@@ -162,7 +288,6 @@ SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt")
# Windows specific settings
IF(WIN32)
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(ARCH x64)
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME} x64")
@@ -171,18 +296,10 @@ IF(WIN32)
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME} Win32")
ENDIF()
IF (MSVC12)
SET(VCVER vc12)
ELSEIF(MSVC14) # also for VC15, which is toolset v141
SET(VCVER vc14)
ENDIF()
SET(CPACK_GENERATOR ZIP)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.${VCVER}.windows")
SET(CPACK_MONOLITHIC_INSTALL 1)
IF (EMBREE_TESTING_PACKAGE)
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/package_win.bat" ${CMAKE_BUILD_TYPE} "${CPACK_PACKAGE_FILE_NAME}.zip")
ENDIF()
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.windows")
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
SET(PACKAGE_EXT "zip")
# MacOSX specific settings
ELSEIF(APPLE)
@@ -191,25 +308,52 @@ ELSEIF(APPLE)
SET(CPACK_RESOURCE_FILE_README "${PROJECT_BINARY_DIR}/README.txt")
SET(CPACK_GENERATOR ZIP)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
SET(CPACK_MONOLITHIC_INSTALL 1)
IF (EMBREE_TESTING_PACKAGE)
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/package_macosx.sh" ${CMAKE_BUILD_TYPE} "${CPACK_PACKAGE_FILE_NAME}.zip" "${EMBREE_SIGN_FILE}")
IF (EMBREE_ARM)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.arm64.macosx")
ELSE()
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
ENDIF()
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
SET(PACKAGE_EXT "zip")
add_custom_target(
post_package_notarize "${PROJECT_SOURCE_DIR}/scripts/package_post_build_notarize_macosx.sh" ${PACKAGE_BASE_NAME} ${EMBREE_SIGN_FILE}
)
# Linux specific settings
ELSE()
SET(CPACK_GENERATOR TGZ)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
SET(CPACK_MONOLITHIC_INSTALL 1)
IF (EMBREE_TESTING_PACKAGE)
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/package_linux.sh"
${EMBREE_ZIP_MODE} ${EMBREE_LIBRARY_NAME} ${EMBREE_VERSION} ${EMBREE_VERSION_MAJOR} "${EMBREE_SIGN_FILE}")
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
SET(PACKAGE_EXT "tar.gz")
IF (EMBREE_SYCL_SUPPORT)
SET(EMBREE_VERSION_SYCL_SUFFIX ".sycl")
ENDIF()
ENDIF()
IF (EMBREE_TESTING_PACKAGE)
SET_TESTS_PROPERTIES(BuildPackage PROPERTIES TIMEOUT 1200)
ENDIF()
add_custom_target(
build ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target package -j8
COMMAND ${CMAKE_COMMAND} -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_build.cmake
)
add_custom_target(
test_package ${CMAKE_COMMAND} -DWHAT="UNPACK" -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
COMMAND cd embree_install/testing && ${CMAKE_COMMAND} -B build -DEMBREE_TESTING_INTENSITY=${EMBREE_TESTING_INTENSITY}
COMMAND ctest --test-dir ${CMAKE_CURRENT_BINARY_DIR}/embree_install/testing/build -VV -C ${CMAKE_BUILD_TYPE} --output-log ctest.output
COMMAND ${CMAKE_COMMAND} -DWHAT="CHECK" -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
)
if(WIN32)
set(INTEGRATE_BINARY "./build/Release/test.exe")
else()
set(INTEGRATE_BINARY "./build/test")
endif()
add_custom_target(
test_integration ${CMAKE_COMMAND} -DWHAT="UNPACK" -DPACKAGE_BASENAME=${PACKAGE_BASE_NAME} -DPACKAGE_EXT=${PACKAGE_EXT} -P ${PROJECT_SOURCE_DIR}/scripts/package_test.cmake
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${CMAKE_COMMAND} -B build --preset ${EMBREE_TESTING_INTEGRATION_PRESET} -Dembree_DIR="${CMAKE_CURRENT_BINARY_DIR}/embree_install/lib/cmake/embree-${EMBREE_VERSION}"
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${CMAKE_COMMAND} --build build --config Release
COMMAND cd ${PROJECT_SOURCE_DIR}/tests/integration/test_embree_release && ${INTEGRATE_BINARY}
)
+559 -116
View File
@@ -1,126 +1,569 @@
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
if (BUILD_TESTING OR EMBREE_TESTING_INSTALL_TESTS)
INCLUDE(CTest)
INCLUDE(CTest)
IF (WIN32)
IF(${CMAKE_CXX_COMPILER} MATCHES ".*icx")
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
if (EMBREE_TESTING_INSTALL_TESTS)
SET(EMBREE_INSTALL_CTESTTESTFILE "${CMAKE_CURRENT_BINARY_DIR}/embree-addtests.cmake")
file(WRITE "${EMBREE_INSTALL_CTESTTESTFILE}" "")
endif()
if (NOT EMBREE_TESTING_PACKAGE_TEST_PROJECT)
IF (WIN32)
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
ELSE()
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
ENDIF()
ELSE()
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
ENDIF()
ELSE()
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
ENDIF()
else()
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${EMBREE_INSTALL_BINDIR}")
endif()
FIND_PATH(EMBREE_TESTING_MODEL_DIR
NAMES test-models-intensity2.txt
PATHS "${PROJECT_SOURCE_DIR}/models"
DOC "Path to the folder containing the Embree models for regression testing."
NO_DEFAULT_PATHS)
if (NOT EMBREE_TESTING_PACKAGE_TEST_PROJECT)
SET(EMBREE_TESTING_INTENSITY 1 CACHE STRING "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing, 4 = very intensive testing.")
SET_PROPERTY(CACHE EMBREE_TESTING_INTENSITY PROPERTY STRINGS 0 1 2 3 4)
SET(EMBREE_TESTING_ONLY_SYCL_TESTS OFF CACHE BOOL "Run only tests with the sycl support.")
SET(EMBREE_TESTING_MEMCHECK OFF CACHE BOOL "Turns on memory checking for some tests.")
SET(EMBREE_TESTING_BENCHMARK OFF CACHE BOOL "Turns benchmarking on.")
SET(EMBREE_TESTING_BENCHMARK_DATABASE "${PROJECT_BINARY_DIR}" CACHE PATH "Path to database for benchmarking.")
SET(EMBREE_TESTING_PACKAGE OFF CACHE BOOL "Packages release as test.")
SET(EMBREE_TESTING_KLOCWORK OFF CACHE BOOL "Runs Kocwork as test.")
SET(EMBREE_TESTING_SDE OFF CACHE STRING "Uses SDE to run tests for specified CPU.")
SET_PROPERTY(CACHE EMBREE_TESTING_SDE PROPERTY STRINGS OFF pnr nhm wsm snb ivb hsw bdw knl skl skx cnl)
endif()
SET(EMBREE_TESTING_INTENSITY 1 CACHE STRING "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing.")
SET_PROPERTY(CACHE EMBREE_TESTING_INTENSITY PROPERTY STRINGS 0 1 2 3)
SET(EMBREE_TESTING_MEMCHECK OFF CACHE BOOL "Turns on memory checking for some tests.")
SET(EMBREE_TESTING_BENCHMARK OFF CACHE BOOL "Turns benchmarking on.")
SET(EMBREE_TESTING_BENCHMARK_DATABASE "${PROJECT_BINARY_DIR}" CACHE PATH "Path to database for benchmarking.")
SET(EMBREE_TESTING_PACKAGE OFF CACHE BOOL "Packages release as test.")
SET(EMBREE_TESTING_KLOCWORK OFF CACHE BOOL "Runs Kocwork as test.")
SET(EMBREE_TESTING_SDE OFF CACHE STRING "Uses SDE to run tests for specified CPU.")
SET_PROPERTY(CACHE EMBREE_TESTING_SDE PROPERTY STRINGS OFF pnr nhm wsm snb ivb hsw bdw knl skl skx cnl)
FUNCTION (SET_EMBREE_TEST_PROPERTIES testname)
SET(variants "_cpp;_ispc;_sycl")
foreach(v ${variants})
if (v STREQUAL "_cpp")
SET(v "")
endif()
set(testnamedef "EMBREE_TEST_${testname}${v}_DEFINED")
if(${testnamedef})
SET_TESTS_PROPERTIES(${testname}${v} ${ARGN})
endif()
endforeach()
SET(EMBREE_MODEL_DIR "none")
IF (EMBREE_TESTING_MODEL_DIR)
SET(EMBREE_MODEL_DIR "${EMBREE_TESTING_MODEL_DIR}")
ENDIF()
MACRO (ADD_EMBREE_NORMAL_CPP_TEST name reference executable args)
IF (BUILD_TESTING)
ADD_TEST(NAME ${name}
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable} --compare "${EMBREE_MODEL_DIR}/reference/${reference}.tga" ${args})
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_NORMAL_ISPC_TEST name reference executable args)
IF (BUILD_TESTING AND EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
ADD_TEST(NAME ${name}_ispc
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable}_ispc --compare "${EMBREE_MODEL_DIR}/reference/${reference}.tga" ${args})
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_NORMAL_TEST name reference executable args)
ADD_EMBREE_NORMAL_CPP_TEST(${name} ${reference} ${executable} "${args}")
ADD_EMBREE_NORMAL_ISPC_TEST(${name} ${reference} ${executable} "${args}")
ENDMACRO()
MACRO (ADD_EMBREE_TEST name)
ADD_EMBREE_NORMAL_TEST(${name} ${name} ${name} "")
ENDMACRO()
MACRO (ADD_EMBREE_TEST2 name exe args)
ADD_EMBREE_NORMAL_TEST(${name} ${exe} ${exe} "${args}")
ENDMACRO()
MACRO (ADD_EMBREE_MODEL_TEST name reference executable args model)
IF (BUILD_TESTING)
ADD_TEST(NAME ${name}
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable} -c "${EMBREE_MODEL_DIR}/${model}" --compare "${EMBREE_MODEL_DIR}/reference/${reference}.tga" ${args})
ENDIF()
IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
IF (BUILD_TESTING)
ADD_TEST(NAME ${name}_ispc
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND COMMAND ${executable}_ispc -c "${EMBREE_MODEL_DIR}/${model}" --compare "${EMBREE_MODEL_DIR}/reference/${reference}.tga" ${args})
ENDIF()
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_MODELS_TEST model_list_file name reference executable)
IF (BUILD_TESTING)
SET(full_model_list_file "${EMBREE_TESTING_MODEL_DIR}/${model_list_file}")
IF(NOT EXISTS "${full_model_list_file}")
MESSAGE(FATAL_ERROR "File ${EMBREE_TESTING_MODEL_DIR}/${model_list_file} does not exist!")
ENDIF()
FILE(READ "${full_model_list_file}" models)
STRING(REGEX REPLACE "\n" ";" models "${models}")
FOREACH (model ${models})
IF (model MATCHES "^#")
CONTINUE()
ENDIF()
STRING(REGEX REPLACE " .*" "" modelname "${model}")
STRING(REGEX REPLACE "/" "_" modelname "${modelname}")
STRING(REGEX REPLACE ".ecs" "" modelname "${modelname}")
ADD_EMBREE_MODEL_TEST(${name}_${modelname} ${reference}_${modelname} ${executable} "${ARGN}" ${model})
ENDFOREACH()
ENDIF()
ENDMACRO()
# add klocwork test
IF (EMBREE_TESTING_KLOCWORK)
ADD_TEST(NAME Klocwork-Build WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/klocwork_build.sh")
ADD_TEST(NAME Klocwork-Check WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/klocwork_check.sh")
SET_TESTS_PROPERTIES(Klocwork-Build PROPERTIES TIMEOUT 2400)
SET_TESTS_PROPERTIES(Klocwork-Check PROPERTIES TIMEOUT 300)
ENDIF()
# add valgrind test
IF (EMBREE_TESTING_MEMCHECK)
find_program( EMBREE_MEMORYCHECK_COMMAND valgrind )
set( EMBREE_MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=1" )
IF (NOT EMBREE_MEMORYCHECK_COMMAND)
MESSAGE(FATAL_ERROR "valgrind not found")
ENDIF()
FUNCTION(ADD_MEMCHECK_TEST name binary)
set(memcheck_command "${EMBREE_MEMORYCHECK_COMMAND} ${EMBREE_MEMORYCHECK_COMMAND_OPTIONS}")
separate_arguments(memcheck_command)
add_test(NAME ${name} COMMAND ${memcheck_command} "${MY_PROJECT_BINARY_DIR}/${binary}" ${ARGN})
if (EMBREE_TESTING_INSTALL_TESTS)
file(APPEND "${EMBREE_INSTALL_CTESTTESTFILE}" "SET_EMBREE_TEST_PROPERTIES(${testname} ${ARGN}) \n")
endif()
ENDFUNCTION()
ENDIF()
MACRO (ADD_EMBREE_GENERIC_TEST testname executable)
ADD_TEST(NAME ${testname}
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable} ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
SET(${testnamedef} "1" CACHE INTERNAL "")
ENDMACRO()
MACRO (ADD_EMBREE_GENERIC_CPP_TEST testname executable)
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
ADD_TEST(NAME ${testname}
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable} ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
SET(${testnamedef} "1" CACHE INTERNAL "")
endif()
ENDMACRO()
MACRO (ADD_EMBREE_GENERIC_ISPC_TEST testname executable)
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
ADD_TEST(NAME ${testname}_ispc
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable}_ispc ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_ispc_DEFINED)
SET(${testnamedef} "1" CACHE INTERNAL "")
ENDIF()
endif()
ENDMACRO()
MACRO (ADD_EMBREE_GENERIC_SYCL_TEST testname executable)
IF (EMBREE_SYCL_SUPPORT)
ADD_TEST(NAME ${testname}_sycl
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
COMMAND ${executable}_sycl ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_sycl_DEFINED)
SET(${testnamedef} 1 CACHE INTERNAL "")
SET_TESTS_PROPERTIES(${testname}_sycl PROPERTIES TIMEOUT 50)
ENDIF()
ENDMACRO()
# Checks if the current cmake configuration is compatible with <condition>
# condition may be a triple of CMAKE_VARIABLE_NAME op VALUE
# supported operators for op are: ==, !=, <, <=, >, >=
FUNCTION (EMBREE_TESTING_CHECK_OPTION out condition)
# parse condition into list
string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" tokens "${condition}")
LIST(LENGTH tokens token_count)
IF (NOT ${token_count} EQUAL 3)
message(FATAL_ERROR "illegal embree_opitons condition: ${condition}")
ENDIF()
# we require every condition to follow the scheme "variable_name op value"
LIST(GET tokens 0 option)
LIST(GET tokens 1 comp)
LIST(GET tokens 2 value)
STRING(STRIP ${option} option)
STRING(STRIP ${comp} comp)
STRING(STRIP ${value} value)
SET(${out} 0 PARENT_SCOPE)
if ("${comp}" STREQUAL "==")
if ("${${option}}" STREQUAL "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL "!=")
if (NOT ("${${option}}" STREQUAL "${value}"))
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL ">")
if ("${${option}}" GREATER "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL ">=")
if ("${${option}}" GREATER_EQUAL "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL "<")
if ("${${option}}" LESS "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL "<=")
if ("${${option}}" LESS_EQUAL "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
else()
message(FATAL_ERROR "Could not parse embree_option condition: ${condition}")
endif()
ENDFUNCTION()
# Checks multiple options from a list with EMBREE_TESTING_CHECK_OPTION
FUNCTION (EMBREE_TESTING_CHECK_OPTIONS_LIST out conditions)
SET(${out} 1 PARENT_SCOPE)
FOREACH (c ${conditions})
EMBREE_TESTING_CHECK_OPTION(myout ${c})
IF (myout EQUAL 0)
SET(${out} 0 PARENT_SCOPE)
BREAK()
ENDIF()
ENDFOREACH()
ENDFUNCTION()
# looks for ifile in multiple possible locations and outputs a file with absolute path in ofile
FUNCTION (EMBREE_FIND_TEST_FILE ifile ofile errmsgflavor)
if (EXISTS "${ifile}") # abs path, use get_filename_component because it could also be relative to cwd
get_filename_component(absifile "${ifile}" ABSOLUTE)
SET(${ofile} ${absifile} PARENT_SCOPE)
elseif(EXISTS "${PROJECT_SOURCE_DIR}/tests/${ifile}") # testing dir
set(${ofile} "${PROJECT_SOURCE_DIR}/tests/${ifile}" PARENT_SCOPE)
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ifile}") # relative to source folder
set(${ofile} "${CMAKE_CURRENT_SOURCE_DIR}/${ifile}" PARENT_SCOPE)
else()
set(${ofile} "" PARENT_SCOPE)
if (errmsgflavor)
message(FATAL_ERROR
"Could not find ${errmsgflavor} \"${ifile}\"\n"
"looked for:\n"
" ${inputfile}\n"
" ${PROJECT_SOURCE_DIR}/tests/${ifile}\n"
" ${CMAKE_CURRENT_SOURCE_DIR}/${ifile}\n"
)
endif()
endif()
ENDFUNCTION()
FUNCTION (EMBREE_ADD_TEST_PARSE_SUBLIST args keyword sublist)
SET(myargs ${args})
SET(mysublist "")
SET(keywords "ECS;XML;NO_REFERENCE;REFERENCE;REFERENCE_SUFFIX;INTENSITY;CONDITION_FILE;CONDITION;ARGS;NO_CPP;NO_ISPC;NO_SYCL;GEN_REFERENCE;")
list(FIND nargs ${keyword} istart)
if (NOT(istart EQUAL -1))
list(LENGTH myargs iend)
foreach(k ${keywords})
list(FIND myargs ${k} i)
if (NOT(i EQUAL -1) AND (i GREATER istart) AND (i LESS iend))
SET(iend ${i})
endif()
endforeach()
MATH(EXPR i "${istart}+1")
while (i LESS iend)
list(GET myargs ${i} elem)
list(APPEND mysublist ${elem})
MATH(EXPR i "${i}+1")
endwhile()
endif()
SET(${sublist} ${mysublist} PARENT_SCOPE)
ENDFUNCTION()
FUNCTION (EMBREE_ADD_TEST_PARSE_FLAG args keyword value)
SET(myargs ${args})
SET(${value} OFF PARENT_SCOPE)
list(FIND nargs ${keyword} i)
if (NOT(i EQUAL -1))
SET(${value} ON PARENT_SCOPE)
endif()
ENDFUNCTION()
# ADD_EMBREE_TEST_ECS(testname exename [ECS <file> | XML <file>] [NO_REFERENCE | REFERENCE <path> | REFERENCE_SUFFIX <suffix>] [INTENSITY <i>] [CONDITION <conds>] [ARGS <args>] [GEN_REFERENCE])
# [ECS <file> | XML <inputfile> | OPTIONS <inputfile>]
# - looks for file and calls the test command with either "-c <inputfile>.ecs" or "-i <inputfile>.xml"
#
# [NO_REFERENCE | REFERENCE <path> | REFERENCE_SUFFIX <suffix>]
# - if not found a reference is will be expected in the same folder as *.ecs with name *.ecs.exename.exr
# - NO_REFERENCE: don't look for a reference (no --compare in test command)
# - REFERENCE <path>: use the reference located in <path>. Same rules aplly as for finding ecs files: absolute or relative to CMAKE_CURRENT_SOURCE_DIR path, must not be located outside the embree root dir.
# - REFERENCE_SUFFIX <suffix>: use the default reference location and name with a suffix before the last file extension, e.g. *.ecs.exename<suffix>.exr
# - if this argument is not specified, looks for
# 1. <inputfile>.exename.exr, or
# 2. <testname>.exr, if no <inputfile> was given
#
# [INTENSITY <i>]
# - default i = 1
# - sets the intensity level for the test, test is only run if ${EMBREE_TESTING_INTENSITY} GREATER_EQUAL i
# - could be done with an *.embree_options file, but this is more flexible, e.g. you can easier share reference images without specifying an absolute path
# - DOES NOT overrite EMBREE_TESTING_INTENSITY, if specified in *.embree_options
#
# [CONDITION_FILE <file>]
# - file containing additional conditions
# - conditions are specified linewise in form of: EMBREE_OPTION op VALUE, where EMBREE_OPTION is a cmake variable used during embree configuration and op is one of ==, !=, <, <=, >, >=
# - if this argument is not specified, looks for
# 1. <inputfile>.embree_options, or
# 2. <testname>.embree_options, if no <inputfile> was given
#
# [CONDITION <conds>]
# - cmake list of additional conditions, specified the same way as in an embree_options file
#
# [ARGS <args>]
# - additional arguments for the test command
#
# [GEN_REFERENCE]
# - writes the reference to the expected location
# - could also be done with the ARGS parameter, but this way we don't have to deal with paths
#
# EXAMPLES
#
# all optional arguments default,
# - looks for points.ecs.embree_options to filter out test by configured options, if not found no restrictions
# - runs for EMBREE_TESTING_INTENSITY >= 1
# - reference will be expected in the same folder as points.ecs with name points.ecs.embree_viewer.exr
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs") # 1)
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "${PROJECT_SOURCE_DIR}/models/xxx/points.ecs") # 2) same as 1) but with absolute path to ecs
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "points.ecs") # 3) same as 1) but looks for points.ecs in the ${CMAKE_CURRENT_SOURCE_DIR} i.e. <embree_root>/tutorials/viewer/points.ecs
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" ARGS --coherent INTENSITY 2) # 4) same as 1) but runs only at EMBREE_TESTING_INTENSITY >= 2
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" REFERENCE_SUFFIX "_quads" ARGS
# --coherent
# --convert-triangles-to-quads INTENSITY 2) # 5) same as 4) but expects reference name points.ecr.embree_viewer_quads.ecs
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" REFERENCE "special.exr" ARGS
# --coherent
# --convert-triangles-to-quads INTENSITY 2) # 5) same as 4) but expects reference <embree-root>/tutorials/viewer/special.exr
## 1) - 5) all share the same base input arguments defined in points.ecs as well as the points.ecs.embree_options
#ADD_EMBREE_TEST_ECS(point_geometry embree_point_geometry) # 6) no ecs file, uses point_geometry.embree_options if exists, expects reference ${CMAKE_CURRENT_SOURCE_DIR}/point_geometry.exr
#ADD_EMBREE_TEST_ECS(verify verify NO_REFERENCE) # 7) no ecs file, uses verify.embree_options if exists, no reference
#ADD_EMBREE_TEST_ECS(verify_memcheck verify NO_REFERENCE CONDITIONS "EMBREE_TESTING_MEMCHECK == ON") # 8) same as 7) but with extra condition
FUNCTION (ADD_EMBREE_TEST_ECS testname executable)
if (EMBREE_TESTING_FILTER_TESTNAMES)
list(FIND EMBREE_TESTING_FILTER_TESTNAMES "${testname}" i)
if (${i} EQUAL -1)
return()
endif()
endif()
SET(nargs ${ARGN})
# disable everything
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
SET(${testnamedef} "0" CACHE INTERNAL "")
SET(testnamedef EMBREE_TEST_${testname}_ispc_DEFINED)
SET(${testnamedef} "0" CACHE INTERNAL "")
SET(testnamedef EMBREE_TEST_${testname}_sycl_DEFINED)
SET(${testnamedef} "0" CACHE INTERNAL "")
# parsing input file
# ECS mode -> single parameter with filename after ECS keyword
list(FIND nargs "ECS" i)
if (NOT(i EQUAL -1))
SET(inputtype "-c")
MATH(EXPR i "${i}+1")
list(GET nargs ${i} out)
EMBREE_FIND_TEST_FILE("${out}" inputfile "test file")
endif()
# XML mode -> single parameter with filename after XML keyword
list(FIND nargs "XML" i)
if (NOT(i EQUAL -1))
SET(inputtype "-i")
MATH(EXPR i "${i}+1")
list(GET nargs ${i} out)
EMBREE_FIND_TEST_FILE("${out}" inputfile "test file")
endif()
# no filetype keyword -> look for <testname>.ecs/xml
# does not need to be specified
if (NOT inputtype)
EMBREE_FIND_TEST_FILE("${testname}.ecs" inputfile "")
if(inputfile)
SET(inputtype "-c")
endif()
EMBREE_FIND_TEST_FILE("${testname}.ecs" inputfile "")
if(inputfile)
SET(inputtype "-i")
endif()
endif()
# parsing refernce image
# no reference image mode -> no additional parameter to parse
list(FIND nargs "NO_REFERENCE" i)
if (NOT(i EQUAL -1))
SET(no_reference ON)
endif()
# reference suffix mode -> singe parameter with suffix to default reference file name
list(FIND nargs "REFERENCE_SUFFIX" i)
if (NOT(i EQUAL -1))
MATH(EXPR i "${i}+1")
list(GET nargs ${i} out)
EMBREE_FIND_TEST_FILE("${inputfile}.${executable}${out}.exr" referencefile "reference image")
endif()
# reference mode -> singe parameter with absolute path to reference image
list(FIND nargs "REFERENCE" i)
if (NOT(i EQUAL -1))
MATH(EXPR i "${i}+1")
list(GET nargs ${i} out)
EMBREE_FIND_TEST_FILE("${out}" referencefile "reference image")
endif()
# no reference keyword -> look for <testname>.exr and <inputfile>.<executable>.exr respectively
if ((NOT no_reference) AND (NOT referencefile))
if (NOT inputfile)
EMBREE_FIND_TEST_FILE("${testname}.exr" referencefile "reference image")
else()
EMBREE_FIND_TEST_FILE("${inputfile}.${executable}.exr" referencefile "reference image")
endif()
endif()
# parsing intensity
# single integer parameter
SET(intensity 1)
list(FIND nargs "INTENSITY" i)
if (NOT(i EQUAL -1))
MATH(EXPR i "${i}+1")
list(GET nargs ${i} intensity)
endif()
# parsing condition
SET(conditions "")
SET(conditionsfile)
list(FIND nargs "CONDITION_FILE" i)
# condition file -> single parameter to absolute path of conditions file
if (NOT(i EQUAL -1))
list(GET nargs ${i} conditionsfile)
EMBREE_FIND_TEST_FILE("${conditionsfile}" conditionsfile "")
# no <inputfile> specified -> look for <testname>.embree_options
elseif (NOT inputtype)
EMBREE_FIND_TEST_FILE("${testname}.embree_options" conditionsfile "")
# <inputfile> specified -> look for <inputfile>.embree_options
else()
EMBREE_FIND_TEST_FILE("${inputfile}.embree_options" conditionsfile "")
endif()
if (conditionsfile)
file(READ "${conditionsfile}" lines)
string(REGEX REPLACE "\n" ";" conditions "${lines}")
endif()
# parsing additional conditions
EMBREE_ADD_TEST_PARSE_SUBLIST("${nargs}" "CONDITION" extra_conditions)
list(APPEND conditions ${extra_conditions})
# parsing extra args
EMBREE_ADD_TEST_PARSE_SUBLIST("${nargs}" "ARGS" extraargs)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "MEMCHECK" memcheck)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_CPP" no_cpp)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_ISPC" no_ispc)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_SYCL" no_sycl)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_POSTFIX" no_postfix)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "GEN_REFERENCE" gen_reference)
# add the test, if the conditions are met
SET(matchconditions ON)
if (conditions)
EMBREE_TESTING_CHECK_OPTIONS_LIST(out "${conditions}")
if (out EQUAL 0)
SET(matchconditions OFF)
endif()
endif()
# LESS_EQUAL not supported on all CI runners
if (matchconditions AND ((intensity LESS EMBREE_TESTING_INTENSITY) OR (intensity EQUAL EMBREE_TESTING_INTENSITY)))
SET(args "")
if (inputfile)
list(APPEND args "${inputtype} ${inputfile}")
endif()
if (NOT no_reference)
list(APPEND args "--compare ${referencefile}")
endif()
if (gen_reference)
list(APPEND args "-o ${referencefile}")
endif()
foreach(a ${extraargs})
list(APPEND args "${a}")
endforeach()
if (memcheck)
list(PREPEND args "${MY_PROJECT_BINARY_DIR}/${executable}")
list(PREPEND args "${EMBREE_MEMORYCHECK_COMMAND_OPTIONS}")
if (no_postfix)
ADD_EMBREE_GENERIC_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
else()
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
if (NOT(no_cpp))
ADD_EMBREE_GENERIC_CPP_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
endif()
if (NOT(no_ispc))
ADD_EMBREE_GENERIC_ISPC_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
endif()
endif()
if (NOT(no_sycl))
ADD_EMBREE_GENERIC_SYCL_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
endif()
endif()
else()
if (no_postfix)
ADD_EMBREE_GENERIC_TEST(${testname} ${executable} ${args})
else()
if (NOT(no_cpp))
ADD_EMBREE_GENERIC_CPP_TEST(${testname} ${executable} ${args})
endif()
if (NOT(no_ispc))
ADD_EMBREE_GENERIC_ISPC_TEST(${testname} ${executable} ${args})
endif()
if (NOT(no_sycl))
ADD_EMBREE_GENERIC_SYCL_TEST(${testname} ${executable} ${args})
endif()
endif()
endif()
endif()
if (EMBREE_TESTING_INSTALL_TESTS)
if (inputfile)
get_filename_component(inputpath ${inputfile} DIRECTORY)
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" inputpath "${inputpath}")
INSTALL(FILES "${inputfile}"
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${inputpath}"
COMPONENT testing)
endif()
if (conditionsfile)
get_filename_component(conditionspath ${conditionsfile} DIRECTORY)
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" conditionspath "${conditionspath}")
INSTALL(FILES "${conditionsfile}"
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${conditionspath}"
COMPONENT testing)
endif()
if (referencefile)
get_filename_component(referencepath ${referencefile} DIRECTORY)
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" referencepath "${referencepath}")
INSTALL(FILES "${referencefile}"
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${referencepath}"
COMPONENT testing)
endif()
SET(testcall "ADD_EMBREE_TEST_ECS(${testname} ${executable}")
if (inputfile)
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" inputfile "${inputfile}")
if (inputtype STREQUAL "-c")
SET(testcall "${testcall} \n ECS ${inputfile}")
elseif (inputtype STREQUAL "-i")
SET(testcall "${testcall} \n XML ${inputfile}")
endif()
endif()
if (no_reference)
SET(testcall "${testcall} \n NO_REFERENCE")
else()
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" referencefile "${referencefile}")
SET(testcall "${testcall} \n REFERENCE ${referencefile}")
endif()
SET(testcall "${testcall} \n INTENSITY ${intensity}")
if (${memcheck})
SET(testcall "${testcall} \n MEMCHECK")
endif()
if (${no_cpp})
SET(testcall "${testcall} \n NO_CPP")
endif()
if (${no_ispc})
SET(testcall "${testcall} \n NO_ISPC")
endif()
if (${no_sycl})
SET(testcall "${testcall} \n NO_SYCL")
endif()
if (${no_postfix})
SET(testcall "${testcall} \n NO_POSTFIX")
endif()
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" conditionsfile "${conditionsfile}")
SET(testcall "${testcall} \n CONDITION_FILE ${conditionsfile}")
SET(testcall "${testcall} \n CONDITION ")
foreach(c ${conditions})
SET(testcall "${testcall} \"${c}\"")
endforeach()
SET(testcall "${testcall} \n ARGS ")
foreach(a ${extraargs})
SET(testcall "${testcall} ${a}")
endforeach()
SET(testcall "${testcall})\n\n")
file(APPEND "${EMBREE_INSTALL_CTESTTESTFILE}" "${testcall}")
endif()
ENDFUNCTION()
else()
FUNCTION(ADD_EMBREE_TEST_ECS testname executable)
ENDFUNCTION()
FUNCTION(ADD_EMBREE_GENERIC_TEST testname executable)
ENDFUNCTION()
FUNCTION(ADD_EMBREE_GENERIC_CPP_TEST testname executable)
ENDFUNCTION()
FUNCTION(ADD_EMBREE_GENERIC_SYCL_TEST testname executable)
ENDFUNCTION()
FUNCTION(ADD_EMBREE_GENERIC_ISPC_TEST testname executable)
ENDFUNCTION()
FUNCTION(SET_EMBREE_TEST_PROPERTIES testname)
ENDFUNCTION()
endif()
+25 -12
View File
@@ -5,21 +5,34 @@
# if ADDITIONAL_LIBRARIES is set these will be included during linking
MACRO (ADD_TUTORIAL TUTORIAL_NAME)
ADD_EXECUTABLE(${TUTORIAL_NAME} ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
TARGET_LINK_LIBRARIES(${TUTORIAL_NAME} embree image tutorial noise ${ADDITIONAL_LIBRARIES})
SET_PROPERTY(TARGET ${TUTORIAL_NAME} PROPERTY FOLDER tutorials/single)
SET_PROPERTY(TARGET ${TUTORIAL_NAME} APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
INSTALL(TARGETS ${TUTORIAL_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
SIGN_TARGET(${TUTORIAL_NAME})
ADD_EXECUTABLE(embree_${TUTORIAL_NAME} ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
TARGET_LINK_LIBRARIES(embree_${TUTORIAL_NAME} embree image tutorial noise ${ADDITIONAL_LIBRARIES})
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME} PROPERTY FOLDER tutorials/single)
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME} APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
INSTALL(TARGETS embree_${TUTORIAL_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
SIGN_TARGET(embree_${TUTORIAL_NAME})
ENDMACRO ()
MACRO (ADD_TUTORIAL_SYCL TUTORIAL_NAME)
IF (EMBREE_SYCL_SUPPORT)
ADD_EXECUTABLE(embree_${TUTORIAL_NAME}_sycl ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.cpp ${ARGN})
TARGET_LINK_LIBRARIES(embree_${TUTORIAL_NAME}_sycl embree image tutorial_sycl noise ${ADDITIONAL_LIBRARIES})
TARGET_COMPILE_DEFINITIONS(embree_${TUTORIAL_NAME}_sycl PUBLIC EMBREE_SYCL_TUTORIAL)
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_sycl PROPERTY FOLDER tutorials/sycl)
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_sycl APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST} ${CMAKE_CXX_FLAGS_SYCL}")
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_sycl APPEND PROPERTY LINK_FLAGS "${CMAKE_LINK_FLAGS_SYCL}")
INSTALL(TARGETS embree_${TUTORIAL_NAME}_sycl DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
SIGN_TARGET(embree_${TUTORIAL_NAME}_sycl)
ENDIF()
ENDMACRO ()
MACRO (ADD_TUTORIAL_ISPC TUTORIAL_NAME)
IF (EMBREE_ISPC_SUPPORT)
ADD_EMBREE_ISPC_EXECUTABLE(${TUTORIAL_NAME}_ispc ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.ispc ${ARGN})
TARGET_LINK_LIBRARIES(${TUTORIAL_NAME}_ispc embree image tutorial_ispc noise noise_ispc)
SET_PROPERTY(TARGET ${TUTORIAL_NAME}_ispc PROPERTY FOLDER tutorials/ispc)
SET_PROPERTY(TARGET ${TUTORIAL_NAME}_ispc APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
INSTALL(TARGETS ${TUTORIAL_NAME}_ispc DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
SIGN_TARGET(${TUTORIAL_NAME}_ispc)
ADD_EMBREE_ISPC_EXECUTABLE(embree_${TUTORIAL_NAME}_ispc ../../kernels/embree.rc ${TUTORIAL_NAME}.cpp ${TUTORIAL_NAME}_device.ispc ${ARGN})
TARGET_LINK_LIBRARIES(embree_${TUTORIAL_NAME}_ispc embree image tutorial_ispc noise noise_ispc)
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_ispc PROPERTY FOLDER tutorials/ispc)
SET_PROPERTY(TARGET embree_${TUTORIAL_NAME}_ispc APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
INSTALL(TARGETS embree_${TUTORIAL_NAME}_ispc DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT examples)
SIGN_TARGET(embree_${TUTORIAL_NAME}_ispc)
ENDIF()
ENDMACRO ()
+10 -10
View File
@@ -6,7 +6,7 @@
#include "../sys/platform.h"
#include "../sys/ref.h"
#include "../sys/filename.h"
#include "../sys/string.h"
#include "../sys/estring.h"
#include <vector>
#include <iostream>
@@ -122,17 +122,16 @@ namespace embree
class FileStream : public Stream<int>
{
public:
FileStream (FILE* file, const std::string& name = "file")
: file(file), lineNumber(1), colNumber(0), charNumber(0), name(std::shared_ptr<std::string>(new std::string(name))) {}
FileStream (const FileName& fileName)
: lineNumber(1), colNumber(0), charNumber(0), name(std::shared_ptr<std::string>(new std::string(fileName.str())))
{
file = fopen(fileName.c_str(),"r");
if (file == nullptr) THROW_RUNTIME_ERROR("cannot open file " + fileName.str());
if (ifs) ifs.close();
ifs.open(fileName.str());
if (!ifs.is_open()) THROW_RUNTIME_ERROR("cannot open file " + fileName.str());
}
~FileStream() {
if (ifs) ifs.close();
}
~FileStream() { if (file) fclose(file); }
public:
ParseLocation location() {
@@ -140,14 +139,15 @@ namespace embree
}
int next() {
int c = fgetc(file);
int c = ifs.get();
if (c == '\n') { lineNumber++; colNumber = 0; } else if (c != '\r') colNumber++;
charNumber++;
return c;
}
private:
FILE* file;
std::ifstream ifs;
ssize_t lineNumber; /// the line number the token is from
ssize_t colNumber; /// the character number in the current line
ssize_t charNumber; /// the character in the file
+1 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
#include "tokenstream.h"
#include "../math/math.h"
#include "../math/emath.h"
namespace embree
{
+1 -1
View File
@@ -337,7 +337,7 @@ namespace embree
if (D) *D = sqrtf(D_x);
return true;
}
__forceinline void AffineSpace3fa_store_unaligned(const AffineSpace3fa &source, AffineSpace3fa* ptr)
{
Vec3fa::storeu(&ptr->l.vx, source.l.vx);
+5
View File
@@ -56,6 +56,11 @@ namespace embree
return BBox(min(a.lower, b.lower), max(a.upper, b.upper));
}
/*! intersects two boxes */
__forceinline static const BBox intersect (const BBox& a, const BBox& b) {
return BBox(max(a.lower, b.lower), min(a.upper, b.upper));
}
/*! enlarge box by some scaling factor */
__forceinline BBox enlarge_by(const float a) const {
return BBox(lower - T(a)*abs(lower), upper + T(a)*abs(upper));
+1 -1
View File
@@ -3,7 +3,7 @@
#pragma once
#include "math.h"
#include "emath.h"
namespace embree
{
+1 -1
View File
@@ -3,7 +3,7 @@
#pragma once
#include "math.h"
#include "emath.h"
namespace embree
{
+10
View File
@@ -3,6 +3,10 @@
#pragma once
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
# include "color_sycl.h"
#else
#include "constants.h"
#include "col3.h"
#include "col4.h"
@@ -64,6 +68,10 @@ namespace embree
d.b = (unsigned char)(s[2]);
d.a = (unsigned char)(s[3]);
}
__forceinline void set(float &f) const
{
f = 0.2126f*r+0.7125f*g+0.0722f*b; // sRGB luminance.
}
////////////////////////////////////////////////////////////////////////////////
/// Constants
@@ -256,3 +264,5 @@ namespace embree
return cout << "(" << a.r << ", " << a.g << ", " << a.b << ")";
}
}
#endif
+219
View File
@@ -0,0 +1,219 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "constants.h"
#include "col3.h"
#include "col4.h"
#include "../simd/sse.h"
namespace embree
{
////////////////////////////////////////////////////////////////////////////////
/// SSE RGBA Color Class
////////////////////////////////////////////////////////////////////////////////
struct Color4
{
struct { float r,g,b,a; };
////////////////////////////////////////////////////////////////////////////////
/// Construction
////////////////////////////////////////////////////////////////////////////////
__forceinline Color4 () {}
//__forceinline Color4 ( const __m128 a ) : m128(a) {}
__forceinline explicit Color4 (const float v) : r(v), g(v), b(v), a(v) {}
__forceinline Color4 (const float r, const float g, const float b, const float a) : r(r), g(g), b(b), a(a) {}
__forceinline explicit Color4 ( const Col3uc& other ) : r(other.r/255.0f), g(other.g/255.0f), b(other.b/255.0f), a(1.0f) {}
__forceinline explicit Color4 ( const Col3f& other ) : r(other.r), g(other.g), b(other.b), a(1.0f) {}
__forceinline explicit Color4 ( const Col4uc& other ) : r(other.r/255.0f), g(other.g/255.0f), b(other.b/255.0f), a(other.a/255.0f) {}
__forceinline explicit Color4 ( const Col4f& other ) : r(other.r), g(other.g), b(other.b), a(other.a) {}
//__forceinline Color4 ( const Color4& other ) : m128(other.m128) {}
//__forceinline Color4& operator=( const Color4& other ) { m128 = other.m128; return *this; }
//__forceinline operator const __m128&() const { return m128; }
//__forceinline operator __m128&() { return m128; }
////////////////////////////////////////////////////////////////////////////////
/// Set
////////////////////////////////////////////////////////////////////////////////
__forceinline void set(Col3f& d) const { d.r = r; d.g = g; d.b = b; }
__forceinline void set(Col4f& d) const { d.r = r; d.g = g; d.b = b; d.a = a; }
__forceinline void set(Col3uc& d) const
{
d.r = (unsigned char)(clamp(r)*255.0f);
d.g = (unsigned char)(clamp(g)*255.0f);
d.b = (unsigned char)(clamp(b)*255.0f);
}
__forceinline void set(Col4uc& d) const
{
d.r = (unsigned char)(clamp(r)*255.0f);
d.g = (unsigned char)(clamp(g)*255.0f);
d.b = (unsigned char)(clamp(b)*255.0f);
d.a = (unsigned char)(clamp(a)*255.0f);
}
__forceinline void set(float &f) const
{
f = 0.2126f*r+0.7125f*g+0.0722f*b; // sRGB luminance.
}
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
__forceinline Color4( ZeroTy ) : r(0.0f), g(0.0f), b(0.0f), a(0.0f) {}
__forceinline Color4( OneTy ) : r(1.0f), g(1.0f), b(1.0f), a(1.0f) {}
//__forceinline Color4( PosInfTy ) : m128(_mm_set1_ps(pos_inf)) {}
//__forceinline Color4( NegInfTy ) : m128(_mm_set1_ps(neg_inf)) {}
};
////////////////////////////////////////////////////////////////////////////////
/// SSE RGB Color Class
////////////////////////////////////////////////////////////////////////////////
struct Color
{
struct { float r,g,b; };
////////////////////////////////////////////////////////////////////////////////
/// Construction
////////////////////////////////////////////////////////////////////////////////
__forceinline Color () {}
//__forceinline Color ( const __m128 a ) : m128(a) {}
__forceinline explicit Color (const float v) : r(v), g(v), b(v) {}
__forceinline Color (const float r, const float g, const float b) : r(r), g(g), b(b) {}
//__forceinline Color ( const Color& other ) : m128(other.m128) {}
//__forceinline Color& operator=( const Color& other ) { m128 = other.m128; return *this; }
//__forceinline Color ( const Color4& other ) : m128(other.m128) {}
//__forceinline Color& operator=( const Color4& other ) { m128 = other.m128; return *this; }
//__forceinline operator const __m128&() const { return m128; }
//__forceinline operator __m128&() { return m128; }
////////////////////////////////////////////////////////////////////////////////
/// Set
////////////////////////////////////////////////////////////////////////////////
__forceinline void set(Col3f& d) const { d.r = r; d.g = g; d.b = b; }
__forceinline void set(Col4f& d) const { d.r = r; d.g = g; d.b = b; d.a = 1.0f; }
#if 0
__forceinline void set(Col3uc& d) const
{
vfloat4 s = clamp(vfloat4(m128))*255.0f;
d.r = (unsigned char)(s[0]);
d.g = (unsigned char)(s[1]);
d.b = (unsigned char)(s[2]);
}
__forceinline void set(Col4uc& d) const
{
vfloat4 s = clamp(vfloat4(m128))*255.0f;
d.r = (unsigned char)(s[0]);
d.g = (unsigned char)(s[1]);
d.b = (unsigned char)(s[2]);
d.a = 255;
}
#endif
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
__forceinline Color( ZeroTy ) : r(0.0f), g(0.0f), b(0.0f) {}
__forceinline Color( OneTy ) : r(1.0f), g(1.0f), b(1.0f) {}
//__forceinline Color( PosInfTy ) : m128(_mm_set1_ps(pos_inf)) {}
//__forceinline Color( NegInfTy ) : m128(_mm_set1_ps(neg_inf)) {}
};
////////////////////////////////////////////////////////////////////////////////
/// Unary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline const Color operator +( const Color& a ) { return a; }
__forceinline const Color operator -( const Color& a ) { return Color(-a.r, -a.g, -a.b); }
__forceinline const Color abs ( const Color& a ) { return Color(abs(a.r), abs(a.g), abs(a.b)); }
__forceinline const Color rcp ( const Color& a ) { return Color(1.0f/a.r, 1.0f/a.g, 1.0f/a.b); }
__forceinline const Color rsqrt( const Color& a ) { return Color(1.0f/sqrt(a.r), 1.0f/sqrt(a.g), 1.0f/sqrt(a.b)); }
__forceinline const Color sqrt ( const Color& a ) { return Color(sqrt(a.r), sqrt(a.g), sqrt(a.b)); }
////////////////////////////////////////////////////////////////////////////////
/// Binary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline const Color operator +( const Color& a, const Color& b ) { return Color(a.r+b.r, a.g+b.g, a.b+b.b); }
__forceinline const Color operator -( const Color& a, const Color& b ) { return Color(a.r-b.r, a.g-b.g, a.b-b.b); }
__forceinline const Color operator *( const Color& a, const Color& b ) { return Color(a.r*b.r, a.g*b.g, a.b*b.b); }
__forceinline const Color operator *( const Color& a, const float b ) { return a * Color(b); }
__forceinline const Color operator *( const float a, const Color& b ) { return Color(a) * b; }
__forceinline const Color operator /( const Color& a, const Color& b ) { return a * rcp(b); }
__forceinline const Color operator /( const Color& a, const float b ) { return a * rcp(b); }
__forceinline const Color min( const Color& a, const Color& b ) { return Color(min(a.r,b.r), min(a.g,b.g), min(a.b,b.b)); }
__forceinline const Color max( const Color& a, const Color& b ) { return Color(max(a.r,b.r), max(a.g,b.g), max(a.b,b.b)); }
////////////////////////////////////////////////////////////////////////////////
/// Assignment Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline const Color operator+=(Color& a, const Color& b) { return a = a + b; }
__forceinline const Color operator-=(Color& a, const Color& b) { return a = a - b; }
__forceinline const Color operator*=(Color& a, const Color& b) { return a = a * b; }
__forceinline const Color operator/=(Color& a, const Color& b) { return a = a / b; }
__forceinline const Color operator*=(Color& a, const float b ) { return a = a * b; }
__forceinline const Color operator/=(Color& a, const float b ) { return a = a / b; }
////////////////////////////////////////////////////////////////////////////////
/// Reductions
////////////////////////////////////////////////////////////////////////////////
__forceinline float reduce_add(const Color& v) { return v.r+v.g+v.b; }
__forceinline float reduce_mul(const Color& v) { return v.r*v.g*v.b; }
__forceinline float reduce_min(const Color& v) { return min(v.r,v.g,v.b); }
__forceinline float reduce_max(const Color& v) { return max(v.r,v.g,v.b); }
////////////////////////////////////////////////////////////////////////////////
/// Comparison Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline bool operator ==( const Color& a, const Color& b ) { return a.r == b.r && a.g == b.g && a.b == b.b; }
__forceinline bool operator !=( const Color& a, const Color& b ) { return a.r != b.r || a.g != b.g || a.b != b.b; }
__forceinline bool operator < ( const Color& a, const Color& b ) {
if (a.r != b.r) return a.r < b.r;
if (a.g != b.g) return a.g < b.g;
if (a.b != b.b) return a.b < b.b;
return false;
}
////////////////////////////////////////////////////////////////////////////////
/// Select
////////////////////////////////////////////////////////////////////////////////
__forceinline const Color select( bool s, const Color& t, const Color& f ) {
return s ? t : f;
}
////////////////////////////////////////////////////////////////////////////////
/// Special Operators
////////////////////////////////////////////////////////////////////////////////
/*! computes luminance of a color */
__forceinline float luminance (const Color& a) { return madd(0.212671f,a.r,madd(0.715160f,a.g,0.072169f*a.b)); }
/*! output operator */
inline std::ostream& operator<<(std::ostream& cout, const Color& a) {
return cout << "(" << a.r << ", " << a.g << ", " << a.b << ")";
}
}
+14 -1
View File
@@ -8,6 +8,10 @@
#include "constants.h"
#include <cmath>
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
# include "math_sycl.h"
#else
#if defined(__ARM_NEON)
#include "../simd/arm/emulation.h"
#else
@@ -44,6 +48,9 @@ namespace embree
__forceinline int toInt (const float& a) { return int(a); }
__forceinline float toFloat(const int& a) { return float(a); }
__forceinline int asInt (const float& a) { return *((int*)&a); }
__forceinline float asFloat(const int& a) { return *((float*)&a); }
#if defined(__WIN32__)
__forceinline bool finite ( const float x ) { return _finite(x) != 0; }
#endif
@@ -351,7 +358,11 @@ __forceinline float nmsub ( const float a, const float b, const float c) { retur
__forceinline int select(bool s, int t, int f) { return s ? t : f; }
__forceinline float select(bool s, float t, float f) { return s ? t : f; }
__forceinline bool all(bool s) { return s; }
__forceinline bool none(bool s) { return !s; }
__forceinline bool all (bool s) { return s; }
__forceinline bool any (bool s) { return s; }
__forceinline unsigned movemask (bool s) { return (unsigned)s; }
__forceinline float lerp(const float v0, const float v1, const float t) {
return madd(1.0f-t,v0,t*v1);
@@ -453,3 +464,5 @@ __forceinline float nmsub ( const float a, const float b, const float c) { retur
return x | (y << 1) | (z << 2);
}
}
#endif
+42
View File
@@ -179,6 +179,48 @@ namespace embree
bounds1 = b1;
}
/*! calculates the linear bounds for target_time_range of primitive with it's time_range_in and bounds */
__forceinline LBBox(const BBox1f& time_range_in, const LBBox<T> lbounds, const BBox1f& target_time_range)
{
const BBox3f bounds0 = lbounds.bounds0;
const BBox3f bounds1 = lbounds.bounds1;
/* normalize global target_time_range to local time_range_in */
const BBox1f time_range((target_time_range.lower-time_range_in.lower)/time_range_in.size(),
(target_time_range.upper-time_range_in.lower)/time_range_in.size());
const BBox1f clipped_time_range(max(0.0f,time_range.lower), min(1.0f,time_range.upper));
/* compute bounds at begin and end of clipped time range */
BBox<T> b0 = lerp(bounds0,bounds1,clipped_time_range.lower);
BBox<T> b1 = lerp(bounds0,bounds1,clipped_time_range.upper);
/* make sure that b0 is properly bounded at time_range_in.lower */
{
const BBox<T> bt = lerp(b0, b1, (0.0f - time_range.lower) / time_range.size());
const T dlower = min(bounds0.lower-bt.lower, T(zero));
const T dupper = max(bounds0.upper-bt.upper, T(zero));
b0.lower += dlower; b1.lower += dlower;
b0.upper += dupper; b1.upper += dupper;
}
/* make sure that b1 is properly bounded at time_range_in.upper */
{
const BBox<T> bt = lerp(b0, b1, (1.0f - time_range.lower) / time_range.size());
const T dlower = min(bounds1.lower-bt.lower, T(zero));
const T dupper = max(bounds1.upper-bt.upper, T(zero));
b0.lower += dlower; b1.lower += dlower;
b0.upper += dupper; b1.upper += dupper;
}
this->bounds0 = b0;
this->bounds1 = b1;
}
/*! calculates the linear bounds for target_time_range of primitive with it's time_range_in and bounds */
__forceinline LBBox(const BBox1f& time_range_in, const BBox<T>& bounds0, const BBox<T>& bounds1, const BBox1f& target_time_range)
: LBBox(time_range_in,LBBox(bounds0,bounds1),target_time_range) {}
public:
__forceinline bool empty() const {
+1
View File
@@ -18,6 +18,7 @@ namespace embree
/*! default matrix constructor */
__forceinline LinearSpace2 ( ) {}
__forceinline LinearSpace2 ( const LinearSpace2& other ) { vx = other.vx; vy = other.vy; }
__forceinline LinearSpace2& operator=( const LinearSpace2& other ) { vx = other.vx; vy = other.vy; return *this; }
+6 -2
View File
@@ -19,6 +19,7 @@ namespace embree
/*! default matrix constructor */
__forceinline LinearSpace3 ( ) {}
__forceinline LinearSpace3 ( const LinearSpace3& other ) { vx = other.vx; vy = other.vy; vz = other.vz; }
__forceinline LinearSpace3& operator=( const LinearSpace3& other ) { vx = other.vx; vy = other.vy; vz = other.vz; return *this; }
@@ -90,17 +91,20 @@ namespace embree
Vector vx,vy,vz;
};
#if !defined(__SYCL_DEVICE_ONLY__)
/*! compute transposed matrix */
template<> __forceinline const LinearSpace3<Vec3fa> LinearSpace3<Vec3fa>::transposed() const {
vfloat4 rx,ry,rz; transpose((vfloat4&)vx,(vfloat4&)vy,(vfloat4&)vz,vfloat4(zero),rx,ry,rz);
return LinearSpace3<Vec3fa>(Vec3fa(rx),Vec3fa(ry),Vec3fa(rz));
}
#endif
template<typename T>
__forceinline const LinearSpace3<T> transposed(const LinearSpace3<T>& xfm) {
return xfm.transposed();
}
////////////////////////////////////////////////////////////////////////////////
// Unary Operators
////////////////////////////////////////////////////////////////////////////////
+279
View File
@@ -0,0 +1,279 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "../sys/platform.h"
#include "../sys/intrinsics.h"
#include "constants.h"
#include <cmath>
namespace embree
{
__forceinline bool isvalid ( const float& v ) {
return (v > -FLT_LARGE) & (v < +FLT_LARGE);
}
__forceinline int cast_f2i(float f) {
return __builtin_bit_cast(int,f);
}
__forceinline float cast_i2f(int i) {
return __builtin_bit_cast(float,i);
}
__forceinline int toInt (const float& a) { return int(a); }
__forceinline float toFloat(const int& a) { return float(a); }
__forceinline float asFloat(const int a) { return __builtin_bit_cast(float,a); }
__forceinline int asInt (const float a) { return __builtin_bit_cast(int,a); }
//__forceinline bool finite ( const float x ) { return _finite(x) != 0; }
__forceinline float sign ( const float x ) { return x<0?-1.0f:1.0f; }
__forceinline float sqr ( const float x ) { return x*x; }
__forceinline float rcp ( const float x ) {
return sycl::native::recip(x);
}
__forceinline float signmsk(const float a) { return asFloat(asInt(a) & 0x80000000); }
//__forceinline float signmsk ( const float x ) {
// return _mm_cvtss_f32(_mm_and_ps(_mm_set_ss(x),_mm_castsi128_ps(_mm_set1_epi32(0x80000000))));
//}
//__forceinline float xorf( const float x, const float y ) {
// return _mm_cvtss_f32(_mm_xor_ps(_mm_set_ss(x),_mm_set_ss(y)));
//}
//__forceinline float andf( const float x, const unsigned y ) {
// return _mm_cvtss_f32(_mm_and_ps(_mm_set_ss(x),_mm_castsi128_ps(_mm_set1_epi32(y))));
//}
__forceinline float rsqrt( const float x ) {
return sycl::rsqrt(x);
}
//__forceinline float nextafter(float x, float y) { if ((x<y) == (x>0)) return x*(1.1f+float(ulp)); else return x*(0.9f-float(ulp)); }
//__forceinline double nextafter(double x, double y) { return _nextafter(x, y); }
//__forceinline int roundf(float f) { return (int)(f + 0.5f); }
__forceinline float abs ( const float x ) { return sycl::fabs(x); }
__forceinline float acos ( const float x ) { return sycl::acos(x); }
__forceinline float asin ( const float x ) { return sycl::asin(x); }
__forceinline float atan ( const float x ) { return sycl::atan(x); }
__forceinline float atan2( const float y, const float x ) { return sycl::atan2(y, x); }
__forceinline float cos ( const float x ) { return sycl::cos(x); }
__forceinline float cosh ( const float x ) { return sycl::cosh(x); }
__forceinline float exp ( const float x ) { return sycl::exp(x); }
__forceinline float fmod ( const float x, const float y ) { return sycl::fmod(x, y); }
__forceinline float log ( const float x ) { return sycl::log(x); }
__forceinline float log10( const float x ) { return sycl::log10(x); }
__forceinline float pow ( const float x, const float y ) { return sycl::pow(x, y); }
__forceinline float sin ( const float x ) { return sycl::sin(x); }
__forceinline float sinh ( const float x ) { return sycl::sinh(x); }
__forceinline float sqrt ( const float x ) { return sycl::sqrt(x); }
__forceinline float tan ( const float x ) { return sycl::tan(x); }
__forceinline float tanh ( const float x ) { return sycl::tanh(x); }
__forceinline float floor( const float x ) { return sycl::floor(x); }
__forceinline float ceil ( const float x ) { return sycl::ceil(x); }
__forceinline float frac ( const float x ) { return x-floor(x); }
//__forceinline double abs ( const double x ) { return ::fabs(x); }
//__forceinline double sign ( const double x ) { return x<0?-1.0:1.0; }
//__forceinline double acos ( const double x ) { return ::acos (x); }
//__forceinline double asin ( const double x ) { return ::asin (x); }
//__forceinline double atan ( const double x ) { return ::atan (x); }
//__forceinline double atan2( const double y, const double x ) { return ::atan2(y, x); }
//__forceinline double cos ( const double x ) { return ::cos (x); }
//__forceinline double cosh ( const double x ) { return ::cosh (x); }
//__forceinline double exp ( const double x ) { return ::exp (x); }
//__forceinline double fmod ( const double x, const double y ) { return ::fmod (x, y); }
//__forceinline double log ( const double x ) { return ::log (x); }
//__forceinline double log10( const double x ) { return ::log10(x); }
//__forceinline double pow ( const double x, const double y ) { return ::pow (x, y); }
//__forceinline double rcp ( const double x ) { return 1.0/x; }
//__forceinline double rsqrt( const double x ) { return 1.0/::sqrt(x); }
//__forceinline double sin ( const double x ) { return ::sin (x); }
//__forceinline double sinh ( const double x ) { return ::sinh (x); }
//__forceinline double sqr ( const double x ) { return x*x; }
//__forceinline double sqrt ( const double x ) { return ::sqrt (x); }
//__forceinline double tan ( const double x ) { return ::tan (x); }
//__forceinline double tanh ( const double x ) { return ::tanh (x); }
//__forceinline double floor( const double x ) { return ::floor (x); }
//__forceinline double ceil ( const double x ) { return ::ceil (x); }
/*
#if defined(__SSE4_1__)
__forceinline float mini(float a, float b) {
const __m128i ai = _mm_castps_si128(_mm_set_ss(a));
const __m128i bi = _mm_castps_si128(_mm_set_ss(b));
const __m128i ci = _mm_min_epi32(ai,bi);
return _mm_cvtss_f32(_mm_castsi128_ps(ci));
}
#endif
#if defined(__SSE4_1__)
__forceinline float maxi(float a, float b) {
const __m128i ai = _mm_castps_si128(_mm_set_ss(a));
const __m128i bi = _mm_castps_si128(_mm_set_ss(b));
const __m128i ci = _mm_max_epi32(ai,bi);
return _mm_cvtss_f32(_mm_castsi128_ps(ci));
}
#endif
*/
template<typename T>
__forceinline T twice(const T& a) { return a+a; }
__forceinline int min(int a, int b) { return sycl::min(a,b); }
__forceinline unsigned min(unsigned a, unsigned b) { return sycl::min(a,b); }
__forceinline int64_t min(int64_t a, int64_t b) { return sycl::min(a,b); }
__forceinline float min(float a, float b) { return sycl::fmin(a,b); }
__forceinline double min(double a, double b) { return sycl::fmin(a,b); }
#if defined(__X86_64__)
__forceinline size_t min(size_t a, size_t b) { return sycl::min(a,b); }
#endif
template<typename T> __forceinline T min(const T& a, const T& b, const T& c) { return min(min(a,b),c); }
template<typename T> __forceinline T min(const T& a, const T& b, const T& c, const T& d) { return min(min(a,b),min(c,d)); }
template<typename T> __forceinline T min(const T& a, const T& b, const T& c, const T& d, const T& e) { return min(min(min(a,b),min(c,d)),e); }
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c) { return mini(mini(a,b),c); }
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c, const T& d) { return mini(mini(a,b),mini(c,d)); }
// template<typename T> __forceinline T mini(const T& a, const T& b, const T& c, const T& d, const T& e) { return mini(mini(mini(a,b),mini(c,d)),e); }
__forceinline int max(int a, int b) { return sycl::max(a,b); }
__forceinline unsigned max(unsigned a, unsigned b) { return sycl::max(a,b); }
__forceinline int64_t max(int64_t a, int64_t b) { return sycl::max(a,b); }
__forceinline float max(float a, float b) { return sycl::fmax(a,b); }
__forceinline double max(double a, double b) { return sycl::fmax(a,b); }
#if defined(__X86_64__)
__forceinline size_t max(size_t a, size_t b) { return sycl::max(a,b); }
#endif
template<typename T> __forceinline T max(const T& a, const T& b, const T& c) { return max(max(a,b),c); }
template<typename T> __forceinline T max(const T& a, const T& b, const T& c, const T& d) { return max(max(a,b),max(c,d)); }
template<typename T> __forceinline T max(const T& a, const T& b, const T& c, const T& d, const T& e) { return max(max(max(a,b),max(c,d)),e); }
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c) { return maxi(maxi(a,b),c); }
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c, const T& d) { return maxi(maxi(a,b),maxi(c,d)); }
// template<typename T> __forceinline T maxi(const T& a, const T& b, const T& c, const T& d, const T& e) { return maxi(maxi(maxi(a,b),maxi(c,d)),e); }
template<typename T> __forceinline T clamp(const T& x, const T& lower = T(zero), const T& upper = T(one)) { return max(min(x,upper),lower); }
template<typename T> __forceinline T clampz(const T& x, const T& upper) { return max(T(zero), min(x,upper)); }
template<typename T> __forceinline T deg2rad ( const T& x ) { return x * T(1.74532925199432957692e-2f); }
template<typename T> __forceinline T rad2deg ( const T& x ) { return x * T(5.72957795130823208768e1f); }
template<typename T> __forceinline T sin2cos ( const T& x ) { return sqrt(max(T(zero),T(one)-x*x)); }
template<typename T> __forceinline T cos2sin ( const T& x ) { return sin2cos(x); }
__forceinline float madd ( const float a, const float b, const float c) { return +sycl::fma(+a,b,+c); }
__forceinline float msub ( const float a, const float b, const float c) { return +sycl::fma(+a,b,-c); }
__forceinline float nmadd ( const float a, const float b, const float c) { return +sycl::fma(-a,b,+c); }
__forceinline float nmsub ( const float a, const float b, const float c) { return -sycl::fma(+a,b,+c); }
/*! random functions */
/*
template<typename T> T random() { return T(0); }
template<> __forceinline int random() { return int(rand()); }
template<> __forceinline uint32_t random() { return uint32_t(rand()) ^ (uint32_t(rand()) << 16); }
template<> __forceinline float random() { return rand()/float(RAND_MAX); }
template<> __forceinline double random() { return rand()/double(RAND_MAX); }
*/
/*! selects */
__forceinline bool select(bool s, bool t , bool f) { return s ? t : f; }
__forceinline int select(bool s, int t, int f) { return s ? t : f; }
__forceinline float select(bool s, float t, float f) { return s ? t : f; }
__forceinline bool none(bool s) { return !s; }
__forceinline bool all (bool s) { return s; }
__forceinline bool any (bool s) { return s; }
__forceinline unsigned movemask (bool s) { return (unsigned)s; }
__forceinline float lerp(const float v0, const float v1, const float t) {
return madd(1.0f-t,v0,t*v1);
}
template<typename T>
__forceinline T lerp2(const float x0, const float x1, const float x2, const float x3, const T& u, const T& v) {
return madd((1.0f-u),madd((1.0f-v),T(x0),v*T(x2)),u*madd((1.0f-v),T(x1),v*T(x3)));
}
/*! exchange */
template<typename T> __forceinline void xchg ( T& a, T& b ) { const T tmp = a; a = b; b = tmp; }
/* load/store */
template<typename Ty> struct mem;
template<> struct mem<float> {
static __forceinline float load (bool mask, const void* ptr) { return mask ? *(float*)ptr : 0.0f; }
static __forceinline float loadu(bool mask, const void* ptr) { return mask ? *(float*)ptr : 0.0f; }
static __forceinline void store (bool mask, void* ptr, const float v) { if (mask) *(float*)ptr = v; }
static __forceinline void storeu(bool mask, void* ptr, const float v) { if (mask) *(float*)ptr = v; }
};
/*! bit reverse operation */
template<class T>
__forceinline T bitReverse(const T& vin)
{
T v = vin;
v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1);
v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2);
v = ((v >> 4) & 0x0F0F0F0F) | ((v & 0x0F0F0F0F) << 4);
v = ((v >> 8) & 0x00FF00FF) | ((v & 0x00FF00FF) << 8);
v = ( v >> 16 ) | ( v << 16);
return v;
}
/*! bit interleave operation */
template<class T>
__forceinline T bitInterleave(const T& xin, const T& yin, const T& zin)
{
T x = xin, y = yin, z = zin;
x = (x | (x << 16)) & 0x030000FF;
x = (x | (x << 8)) & 0x0300F00F;
x = (x | (x << 4)) & 0x030C30C3;
x = (x | (x << 2)) & 0x09249249;
y = (y | (y << 16)) & 0x030000FF;
y = (y | (y << 8)) & 0x0300F00F;
y = (y | (y << 4)) & 0x030C30C3;
y = (y | (y << 2)) & 0x09249249;
z = (z | (z << 16)) & 0x030000FF;
z = (z | (z << 8)) & 0x0300F00F;
z = (z | (z << 4)) & 0x030C30C3;
z = (z | (z << 2)) & 0x09249249;
return x | (y << 1) | (z << 2);
}
/*! bit interleave operation for 64bit data types*/
template<class T>
__forceinline T bitInterleave64(const T& xin, const T& yin, const T& zin){
T x = xin & 0x1fffff;
T y = yin & 0x1fffff;
T z = zin & 0x1fffff;
x = (x | x << 32) & 0x1f00000000ffff;
x = (x | x << 16) & 0x1f0000ff0000ff;
x = (x | x << 8) & 0x100f00f00f00f00f;
x = (x | x << 4) & 0x10c30c30c30c30c3;
x = (x | x << 2) & 0x1249249249249249;
y = (y | y << 32) & 0x1f00000000ffff;
y = (y | y << 16) & 0x1f0000ff0000ff;
y = (y | y << 8) & 0x100f00f00f00f00f;
y = (y | y << 4) & 0x10c30c30c30c30c3;
y = (y | y << 2) & 0x1249249249249249;
z = (z | z << 32) & 0x1f00000000ffff;
z = (z | z << 16) & 0x1f0000ff0000ff;
z = (z | z << 8) & 0x100f00f00f00f00f;
z = (z | z << 4) & 0x10c30c30c30c30c3;
z = (z | z << 2) & 0x1249249249249249;
return x | (y << 1) | (z << 2);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
#pragma once
#include "../sys/platform.h"
#include "../math/math.h"
#include "../math/emath.h"
namespace embree
{
+3 -2
View File
@@ -3,7 +3,7 @@
#pragma once
#include "math.h"
#include "emath.h"
namespace embree
{
@@ -34,7 +34,7 @@ namespace embree
__forceinline Vec2( const T& x, const T& y ) : x(x), y(y) {}
__forceinline Vec2( const Vec2& other ) { x = other.x; y = other.y; }
__forceinline Vec2( const Vec2fa& other );
Vec2( const Vec2fa& other );
template<typename T1> __forceinline Vec2( const Vec2<T1>& a ) : x(T(a.x)), y(T(a.y)) {}
template<typename T1> __forceinline Vec2& operator =( const Vec2<T1>& other ) { x = other.x; y = other.y; return *this; }
@@ -232,4 +232,5 @@ namespace embree
#if defined(__AVX512F__)
template<> __forceinline Vec2<vfloat16>::Vec2(const Vec2fa& a) : x(a.x), y(a.y) {}
#endif
}
+8 -1
View File
@@ -4,7 +4,12 @@
#pragma once
#include "../sys/alloc.h"
#include "math.h"
#include "emath.h"
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
# include "vec2fa_sycl.h"
#else
#include "../simd/sse.h"
namespace embree
@@ -316,3 +321,5 @@ namespace embree
typedef Vec2fa Vec2fa_t;
}
#endif
+270
View File
@@ -0,0 +1,270 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "../sys/alloc.h"
#include "emath.h"
#include "../simd/sse.h"
namespace embree
{
struct Vec3fa;
////////////////////////////////////////////////////////////////////////////////
/// SSE Vec2fa Type
////////////////////////////////////////////////////////////////////////////////
struct __aligned(16) Vec2fa
{
//ALIGNED_STRUCT_(16);
typedef float Scalar;
enum { N = 2 };
struct { float x,y; };
////////////////////////////////////////////////////////////////////////////////
/// Constructors, Assignment & Cast Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec2fa( ) {}
//__forceinline Vec2fa( const __m128 a ) : m128(a) {}
explicit Vec2fa(const Vec3fa& a);
__forceinline explicit Vec2fa( const vfloat<4>& a ) {
x = a[0];
y = a[1];
}
__forceinline Vec2fa ( const Vec2<float>& other ) { x = other.x; y = other.y; }
__forceinline Vec2fa& operator =( const Vec2<float>& other ) { x = other.x; y = other.y; return *this; }
__forceinline Vec2fa ( const Vec2fa& other ) { x = other.x; y = other.y; }
__forceinline Vec2fa& operator =( const Vec2fa& other ) { x = other.x; y = other.y; return *this; }
__forceinline explicit Vec2fa( const float a ) : x(a), y(a) {}
__forceinline Vec2fa( const float x, const float y) : x(x), y(y) {}
//__forceinline explicit Vec2fa( const __m128i a ) : m128(_mm_cvtepi32_ps(a)) {}
//__forceinline operator const __m128&() const { return m128; }
//__forceinline operator __m128&() { return m128; }
////////////////////////////////////////////////////////////////////////////////
/// Loads and Stores
////////////////////////////////////////////////////////////////////////////////
static __forceinline Vec2fa load( const void* const a ) {
const float* ptr = (const float*)a;
return Vec2fa(ptr[0],ptr[1]);
}
static __forceinline Vec2fa loadu( const void* const a ) {
const float* ptr = (const float*)a;
return Vec2fa(ptr[0],ptr[1]);
}
static __forceinline void storeu ( void* a, const Vec2fa& v ) {
float* ptr = (float*)a;
ptr[0] = v.x; ptr[1] = v.y;
}
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec2fa( ZeroTy ) : x(0.0f), y(0.0f) {}
__forceinline Vec2fa( OneTy ) : x(1.0f), y(1.0f) {}
__forceinline Vec2fa( PosInfTy ) : x(+INFINITY), y(+INFINITY) {}
__forceinline Vec2fa( NegInfTy ) : x(-INFINITY), y(-INFINITY) {}
////////////////////////////////////////////////////////////////////////////////
/// Array Access
////////////////////////////////////////////////////////////////////////////////
//__forceinline const float& operator []( const size_t index ) const { assert(index < 2); return (&x)[index]; }
//__forceinline float& operator []( const size_t index ) { assert(index < 2); return (&x)[index]; }
};
////////////////////////////////////////////////////////////////////////////////
/// Unary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec2fa operator +( const Vec2fa& a ) { return a; }
__forceinline Vec2fa operator -( const Vec2fa& a ) { return Vec2fa(-a.x,-a.y); }
__forceinline Vec2fa abs ( const Vec2fa& a ) { return Vec2fa(sycl::fabs(a.x),sycl::fabs(a.y)); }
__forceinline Vec2fa sign ( const Vec2fa& a ) { return Vec2fa(sycl::sign(a.x),sycl::sign(a.y)); }
//__forceinline Vec2fa rcp ( const Vec2fa& a ) { return Vec2fa(sycl::native::recip(a.x),sycl::native::recip(a.y)); }
__forceinline Vec2fa rcp ( const Vec2fa& a ) { return Vec2fa(sycl::native::recip(a.x),sycl::native::recip(a.y)); }
__forceinline Vec2fa sqrt ( const Vec2fa& a ) { return Vec2fa(sycl::sqrt(a.x),sycl::sqrt(a.y)); }
__forceinline Vec2fa sqr ( const Vec2fa& a ) { return Vec2fa(a.x*a.x,a.y*a.y); }
__forceinline Vec2fa rsqrt( const Vec2fa& a ) { return Vec2fa(sycl::rsqrt(a.x),sycl::rsqrt(a.y)); }
__forceinline Vec2fa zero_fix(const Vec2fa& a) {
const float x = sycl::fabs(a.x) < min_rcp_input ? min_rcp_input : a.x;
const float y = sycl::fabs(a.y) < min_rcp_input ? min_rcp_input : a.y;
return Vec2fa(x,y);
}
__forceinline Vec2fa rcp_safe(const Vec2fa& a) {
return rcp(zero_fix(a));
}
__forceinline Vec2fa log ( const Vec2fa& a ) {
return Vec2fa(sycl::log(a.x),sycl::log(a.y));
}
__forceinline Vec2fa exp ( const Vec2fa& a ) {
return Vec2fa(sycl::exp(a.x),sycl::exp(a.y));
}
////////////////////////////////////////////////////////////////////////////////
/// Binary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec2fa operator +( const Vec2fa& a, const Vec2fa& b ) { return Vec2fa(a.x+b.x, a.y+b.y); }
__forceinline Vec2fa operator -( const Vec2fa& a, const Vec2fa& b ) { return Vec2fa(a.x-b.x, a.y-b.y); }
__forceinline Vec2fa operator *( const Vec2fa& a, const Vec2fa& b ) { return Vec2fa(a.x*b.x, a.y*b.y); }
__forceinline Vec2fa operator *( const Vec2fa& a, const float b ) { return a * Vec2fa(b); }
__forceinline Vec2fa operator *( const float a, const Vec2fa& b ) { return Vec2fa(a) * b; }
__forceinline Vec2fa operator /( const Vec2fa& a, const Vec2fa& b ) { return Vec2fa(a.x/b.x, a.y/b.y); }
__forceinline Vec2fa operator /( const Vec2fa& a, const float b ) { return Vec2fa(a.x/b, a.y/b); }
__forceinline Vec2fa operator /( const float a, const Vec2fa& b ) { return Vec2fa(a/b.x, a/b.y); }
__forceinline Vec2fa min( const Vec2fa& a, const Vec2fa& b ) {
return Vec2fa(sycl::fmin(a.x,b.x), sycl::fmin(a.y,b.y));
}
__forceinline Vec2fa max( const Vec2fa& a, const Vec2fa& b ) {
return Vec2fa(sycl::fmax(a.x,b.x), sycl::fmax(a.y,b.y));
}
/*
#if defined(__SSE4_1__)
__forceinline Vec2fa mini(const Vec2fa& a, const Vec2fa& b) {
const vint4 ai = _mm_castps_si128(a);
const vint4 bi = _mm_castps_si128(b);
const vint4 ci = _mm_min_epi32(ai,bi);
return _mm_castsi128_ps(ci);
}
#endif
#if defined(__SSE4_1__)
__forceinline Vec2fa maxi(const Vec2fa& a, const Vec2fa& b) {
const vint4 ai = _mm_castps_si128(a);
const vint4 bi = _mm_castps_si128(b);
const vint4 ci = _mm_max_epi32(ai,bi);
return _mm_castsi128_ps(ci);
}
#endif
__forceinline Vec2fa pow ( const Vec2fa& a, const float& b ) {
return Vec2fa(powf(a.x,b),powf(a.y,b));
}
*/
////////////////////////////////////////////////////////////////////////////////
/// Ternary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec2fa madd ( const Vec2fa& a, const Vec2fa& b, const Vec2fa& c) { return Vec2fa(madd(a.x,b.x,c.x), madd(a.y,b.y,c.y)); }
__forceinline Vec2fa msub ( const Vec2fa& a, const Vec2fa& b, const Vec2fa& c) { return Vec2fa(msub(a.x,b.x,c.x), msub(a.y,b.y,c.y)); }
__forceinline Vec2fa nmadd ( const Vec2fa& a, const Vec2fa& b, const Vec2fa& c) { return Vec2fa(nmadd(a.x,b.x,c.x), nmadd(a.y,b.y,c.y)); }
__forceinline Vec2fa nmsub ( const Vec2fa& a, const Vec2fa& b, const Vec2fa& c) { return Vec2fa(nmsub(a.x,b.x,c.x), nmsub(a.y,b.y,c.y)); }
__forceinline Vec2fa madd ( const float a, const Vec2fa& b, const Vec2fa& c) { return madd(Vec2fa(a),b,c); }
__forceinline Vec2fa msub ( const float a, const Vec2fa& b, const Vec2fa& c) { return msub(Vec2fa(a),b,c); }
__forceinline Vec2fa nmadd ( const float a, const Vec2fa& b, const Vec2fa& c) { return nmadd(Vec2fa(a),b,c); }
__forceinline Vec2fa nmsub ( const float a, const Vec2fa& b, const Vec2fa& c) { return nmsub(Vec2fa(a),b,c); }
////////////////////////////////////////////////////////////////////////////////
/// Assignment Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec2fa& operator +=( Vec2fa& a, const Vec2fa& b ) { return a = a + b; }
__forceinline Vec2fa& operator -=( Vec2fa& a, const Vec2fa& b ) { return a = a - b; }
__forceinline Vec2fa& operator *=( Vec2fa& a, const Vec2fa& b ) { return a = a * b; }
__forceinline Vec2fa& operator *=( Vec2fa& a, const float b ) { return a = a * b; }
__forceinline Vec2fa& operator /=( Vec2fa& a, const Vec2fa& b ) { return a = a / b; }
__forceinline Vec2fa& operator /=( Vec2fa& a, const float b ) { return a = a / b; }
////////////////////////////////////////////////////////////////////////////////
/// Reductions
////////////////////////////////////////////////////////////////////////////////
__forceinline float reduce_add(const Vec2fa& v) { return v.x+v.y; }
__forceinline float reduce_mul(const Vec2fa& v) { return v.x*v.y; }
__forceinline float reduce_min(const Vec2fa& v) { return sycl::fmin(v.x,v.y); }
__forceinline float reduce_max(const Vec2fa& v) { return sycl::fmax(v.x,v.y); }
////////////////////////////////////////////////////////////////////////////////
/// Comparison Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline bool operator ==( const Vec2fa& a, const Vec2fa& b ) { return a.x == b.x && a.y == b.y; }
__forceinline bool operator !=( const Vec2fa& a, const Vec2fa& b ) { return a.x != b.x || a.y != b.y; }
////////////////////////////////////////////////////////////////////////////////
/// Euclidian Space Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline float dot ( const Vec2fa& a, const Vec2fa& b ) {
return reduce_add(a*b);
}
__forceinline Vec2fa cross ( const Vec2fa& a ) {
return Vec2fa(-a.y,a.x);
}
__forceinline float sqr_length ( const Vec2fa& a ) { return dot(a,a); }
__forceinline float rcp_length ( const Vec2fa& a ) { return rsqrt(dot(a,a)); }
__forceinline float rcp_length2( const Vec2fa& a ) { return rcp(dot(a,a)); }
__forceinline float length ( const Vec2fa& a ) { return sqrt(dot(a,a)); }
__forceinline Vec2fa normalize( const Vec2fa& a ) { return a*rsqrt(dot(a,a)); }
__forceinline float distance ( const Vec2fa& a, const Vec2fa& b ) { return length(a-b); }
////////////////////////////////////////////////////////////////////////////////
/// Select
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec2fa select( bool s, const Vec2fa& t, const Vec2fa& f ) {
return Vec2fa(s ? t.x : f.x, s ? t.y : f.y);
}
__forceinline Vec2fa lerp(const Vec2fa& v0, const Vec2fa& v1, const float t) {
return madd(1.0f-t,v0,t*v1);
}
__forceinline int maxDim ( const Vec2fa& a )
{
const Vec2fa b = abs(a);
if (b.x > b.y) return 0;
else return 1;
}
////////////////////////////////////////////////////////////////////////////////
/// Rounding Functions
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec2fa trunc( const Vec2fa& a ) { return Vec2fa(sycl::trunc(a.x),sycl::trunc(a.y)); }
__forceinline Vec2fa floor( const Vec2fa& a ) { return Vec2fa(sycl::floor(a.x),sycl::floor(a.y)); }
__forceinline Vec2fa ceil ( const Vec2fa& a ) { return Vec2fa(sycl::ceil (a.x),sycl::ceil (a.y)); }
////////////////////////////////////////////////////////////////////////////////
/// Output Operators
////////////////////////////////////////////////////////////////////////////////
inline embree_ostream operator<<(embree_ostream cout, const Vec2fa& a) {
return cout << "(" << a.x << ", " << a.y << ")";
}
/*template<>
__forceinline vfloat_impl<4>::vfloat_impl(const Vec2fa& a)
{
v = 0;
const unsigned int lid = get_sub_group_local_id();
if (lid == 0) v = a.x;
if (lid == 1) v = a.y;
}*/
typedef Vec2fa Vec2fa_t;
}
+22 -1
View File
@@ -3,7 +3,7 @@
#pragma once
#include "math.h"
#include "emath.h"
namespace embree
{
@@ -286,6 +286,8 @@ namespace embree
template<> __forceinline Vec3<float>::Vec3(const Vec3fa& a) { x = a.x; y = a.y; z = a.z; }
#if !defined(__SYCL_DEVICE_ONLY__)
#if defined(__AVX__)
template<> __forceinline Vec3<vfloat4>::Vec3(const Vec3fa& a) {
x = a.x; y = a.y; z = a.z;
@@ -333,4 +335,23 @@ namespace embree
#if defined(__AVX512F__)
template<> __forceinline Vec3<vfloat16>::Vec3(const Vec3fa& a) : x(a.x), y(a.y), z(a.z) {}
#endif
#else
#if defined(__SSE__)
template<> __forceinline Vec3<vfloat4>::Vec3(const Vec3fa& a) {
x = a.x; y = a.y; z = a.z;
}
#endif
#if defined(__AVX__)
template<> __forceinline Vec3<vfloat8>::Vec3(const Vec3fa& a) {
x = a.x; y = a.y; z = a.z;
}
#endif
#if defined(__AVX512F__)
template<> __forceinline Vec3<vfloat16>::Vec3(const Vec3fa& a) {
x = a.x; y = a.y; z = a.z;
}
#endif
#endif
}
+8 -1
View File
@@ -4,7 +4,12 @@
#pragma once
#include "../sys/alloc.h"
#include "math.h"
#include "emath.h"
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
# include "vec3ba_sycl.h"
#else
#include "../simd/sse.h"
namespace embree
@@ -118,3 +123,5 @@ namespace embree
return cout << "(" << (a.x ? "1" : "0") << ", " << (a.y ? "1" : "0") << ", " << (a.z ? "1" : "0") << ")";
}
}
#endif
+115
View File
@@ -0,0 +1,115 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "../sys/alloc.h"
#include "emath.h"
#include "../simd/sse.h"
namespace embree
{
////////////////////////////////////////////////////////////////////////////////
/// SSE Vec3ba Type
////////////////////////////////////////////////////////////////////////////////
struct __aligned(16) Vec3ba
{
//ALIGNED_STRUCT_(16);
struct { bool x,y,z; };
typedef bool Scalar;
enum { N = 3 };
////////////////////////////////////////////////////////////////////////////////
/// Constructors, Assignment & Cast Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ba( ) {}
//__forceinline Vec3ba( const __m128 input ) : m128(input) {}
__forceinline Vec3ba( const Vec3ba& other ) : x(other.x), y(other.y), z(other.z) {}
__forceinline Vec3ba& operator =(const Vec3ba& other) { x = other.x; y = other.y; z = other.z; return *this; }
__forceinline explicit Vec3ba( bool a ) : x(a), y(a), z(a) {}
__forceinline Vec3ba( bool a, bool b, bool c) : x(a), y(b), z(c) {}
//__forceinline operator const __m128&() const { return m128; }
//__forceinline operator __m128&() { return m128; }
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ba( FalseTy ) : x(false), y(false), z(false) {}
__forceinline Vec3ba( TrueTy ) : x(true), y(true), z(true) {}
////////////////////////////////////////////////////////////////////////////////
/// Array Access
////////////////////////////////////////////////////////////////////////////////
//__forceinline const int& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
//__forceinline int& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
};
////////////////////////////////////////////////////////////////////////////////
/// Unary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ba operator !( const Vec3ba& a ) { return Vec3ba(!a.x,!a.y,!a.z); }
////////////////////////////////////////////////////////////////////////////////
/// Binary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ba operator &( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x & b.x, a.y & b.y, a.z & b.z); }
__forceinline Vec3ba operator |( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x | b.x, a.y | b.y, a.z | b.z); }
__forceinline Vec3ba operator ^( const Vec3ba& a, const Vec3ba& b ) { return Vec3ba(a.x != b.x, a.y != b.y, a.z != b.z); }
////////////////////////////////////////////////////////////////////////////////
/// Assignment Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ba& operator &=( Vec3ba& a, const Vec3ba& b ) { return a = a & b; }
__forceinline Vec3ba& operator |=( Vec3ba& a, const Vec3ba& b ) { return a = a | b; }
__forceinline Vec3ba& operator ^=( Vec3ba& a, const Vec3ba& b ) { return a = a ^ b; }
////////////////////////////////////////////////////////////////////////////////
/// Comparison Operators + Select
////////////////////////////////////////////////////////////////////////////////
__forceinline bool operator ==( const Vec3ba& a, const Vec3ba& b ) {
return a.x == b.x && a.y == b.y && a.z == b.z;
}
__forceinline bool operator !=( const Vec3ba& a, const Vec3ba& b ) {
return a.x != b.x || a.y != b.y || a.z != b.z;
}
/*
__forceinline bool operator < ( const Vec3ba& a, const Vec3ba& b ) {
if (a.x != b.x) return a.x < b.x;
if (a.y != b.y) return a.y < b.y;
if (a.z != b.z) return a.z < b.z;
return false;
}
*/
////////////////////////////////////////////////////////////////////////////////
/// Reduction Operations
////////////////////////////////////////////////////////////////////////////////
__forceinline bool reduce_and( const Vec3ba& a ) { return a.x & a.y & a.z; }
__forceinline bool reduce_or ( const Vec3ba& a ) { return a.x | a.y | a.z; }
__forceinline bool all ( const Vec3ba& b ) { return reduce_and(b); }
__forceinline bool any ( const Vec3ba& b ) { return reduce_or(b); }
__forceinline bool none ( const Vec3ba& b ) { return !reduce_or(b); }
////////////////////////////////////////////////////////////////////////////////
/// Output Operators
////////////////////////////////////////////////////////////////////////////////
inline embree_ostream operator<<(embree_ostream cout, const Vec3ba& a) {
return cout;
}
}
+8 -2
View File
@@ -4,7 +4,12 @@
#pragma once
#include "../sys/alloc.h"
#include "math.h"
#include "emath.h"
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
# include "vec3fa_sycl.h"
#else
#include "../simd/sse.h"
namespace embree
@@ -441,7 +446,6 @@ namespace embree
//__forceinline Vec3fx& operator =( const Vec3<float>& other ) { m128 = _mm_set_ps(0, other.z, other.y, other.x); return *this; }
__forceinline Vec3fx ( const Vec3fx& other ) { m128 = other.m128; }
__forceinline Vec3fx& operator =( const Vec3fx& other ) { m128 = other.m128; return *this; }
__forceinline explicit Vec3fx( const float a ) : m128(_mm_set1_ps(a)) {}
@@ -783,3 +787,5 @@ namespace embree
typedef Vec3fx Vec3ff;
}
#endif
+617
View File
@@ -0,0 +1,617 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "../sys/alloc.h"
#include "emath.h"
#include "../simd/sse.h"
namespace embree
{
////////////////////////////////////////////////////////////////////////////////
/// SSE Vec3fa Type
////////////////////////////////////////////////////////////////////////////////
struct __aligned(16) Vec3fa
{
//ALIGNED_STRUCT_(16);
typedef float Scalar;
enum { N = 3 };
struct { float x,y,z, do_not_use; };
////////////////////////////////////////////////////////////////////////////////
/// Constructors, Assignment & Cast Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fa( ) {}
//__forceinline Vec3fa( const __m128 a ) : m128(a) {}
//__forceinline explicit Vec3fa(const vfloat4& a) : x(a[0]), y(a[1]), z(a[2]) {}
__forceinline Vec3fa ( const Vec3<float>& other ) { x = other.x; y = other.y; z = other.z; }
//__forceinline Vec3fa& operator =( const Vec3<float>& other ) { x = other.x; y = other.y; z = other.z; return *this; }
__forceinline Vec3fa ( const Vec3fa& other ) { x = other.x; y = other.y; z = other.z; }
__forceinline Vec3fa& operator =( const Vec3fa& other ) { x = other.x; y = other.y; z = other.z; return *this; }
__forceinline explicit Vec3fa( const float a ) : x(a), y(a), z(a) {}
__forceinline Vec3fa( const float x, const float y, const float z) : x(x), y(y), z(z) {}
__forceinline explicit Vec3fa( const Vec3ia& a ) : x((float)a.x), y((float)a.y), z((float)a.z) {}
//__forceinline operator const __m128&() const { return m128; }
//__forceinline operator __m128&() { return m128; }
__forceinline operator vfloat4() const { return vfloat4(x,y,z,0.0f); } // FIXME: we should not need this!!
//friend __forceinline Vec3fa copy_a( const Vec3fa& a, const Vec3fa& b ) { Vec3fa c = a; c.a = b.a; return c; }
////////////////////////////////////////////////////////////////////////////////
/// Loads and Stores
////////////////////////////////////////////////////////////////////////////////
static __forceinline Vec3fa load( const void* const a ) {
const float* ptr = (const float*)a;
return Vec3fa(ptr[0],ptr[1],ptr[2]);
}
static __forceinline Vec3fa loadu( const void* const a ) {
const float* ptr = (const float*)a;
return Vec3fa(ptr[0],ptr[1],ptr[2]);
}
static __forceinline void storeu ( void* a, const Vec3fa& v ) {
float* ptr = (float*)a;
ptr[0] = v.x; ptr[1] = v.y; ptr[2] = v.z;
}
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fa( ZeroTy ) : x(0.0f), y(0.0f), z(0.0f) {}
__forceinline Vec3fa( OneTy ) : x(1.0f), y(1.0f), z(1.0f) {}
__forceinline Vec3fa( PosInfTy ) : x(+INFINITY), y(+INFINITY), z(+INFINITY) {}
__forceinline Vec3fa( NegInfTy ) : x(-INFINITY), y(-INFINITY), z(-INFINITY) {}
////////////////////////////////////////////////////////////////////////////////
/// Array Access
////////////////////////////////////////////////////////////////////////////////
__forceinline const float& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
__forceinline float& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
};
////////////////////////////////////////////////////////////////////////////////
/// Unary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fa operator +( const Vec3fa& a ) { return a; }
__forceinline Vec3fa operator -( const Vec3fa& a ) { return Vec3fa(-a.x,-a.y,-a.z); }
__forceinline Vec3fa abs ( const Vec3fa& a ) { return Vec3fa(sycl::fabs(a.x),sycl::fabs(a.y),sycl::fabs(a.z)); }
__forceinline Vec3fa sign ( const Vec3fa& a ) { return Vec3fa(sycl::sign(a.x),sycl::sign(a.y),sycl::sign(a.z)); }
//__forceinline Vec3fa rcp ( const Vec3fa& a ) { return Vec3fa(sycl::recip(a.x),sycl::recip(a.y),sycl::recip(a.z)); }
__forceinline Vec3fa rcp ( const Vec3fa& a ) { return Vec3fa(sycl::native::recip(a.x),sycl::native::recip(a.y),sycl::native::recip(a.z)); }
__forceinline Vec3fa sqrt ( const Vec3fa& a ) { return Vec3fa(sycl::sqrt(a.x),sycl::sqrt(a.y),sycl::sqrt(a.z)); }
__forceinline Vec3fa sqr ( const Vec3fa& a ) { return Vec3fa(a.x*a.x,a.y*a.y,a.z*a.z); }
__forceinline Vec3fa rsqrt( const Vec3fa& a ) { return Vec3fa(sycl::rsqrt(a.x),sycl::rsqrt(a.y),sycl::rsqrt(a.z)); }
__forceinline Vec3fa zero_fix(const Vec3fa& a) {
const float x = sycl::fabs(a.x) < min_rcp_input ? min_rcp_input : a.x;
const float y = sycl::fabs(a.y) < min_rcp_input ? min_rcp_input : a.y;
const float z = sycl::fabs(a.z) < min_rcp_input ? min_rcp_input : a.z;
return Vec3fa(x,y,z);
}
__forceinline Vec3fa rcp_safe(const Vec3fa& a) {
return rcp(zero_fix(a));
}
__forceinline Vec3fa log ( const Vec3fa& a ) {
return Vec3fa(sycl::log(a.x),sycl::log(a.y),sycl::log(a.z));
}
__forceinline Vec3fa exp ( const Vec3fa& a ) {
return Vec3fa(sycl::exp(a.x),sycl::exp(a.y),sycl::exp(a.z));
}
////////////////////////////////////////////////////////////////////////////////
/// Binary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fa operator +( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x+b.x, a.y+b.y, a.z+b.z); }
__forceinline Vec3fa operator -( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x-b.x, a.y-b.y, a.z-b.z); }
__forceinline Vec3fa operator *( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x*b.x, a.y*b.y, a.z*b.z); }
__forceinline Vec3fa operator *( const Vec3fa& a, const float b ) { return a * Vec3fa(b); }
__forceinline Vec3fa operator *( const float a, const Vec3fa& b ) { return Vec3fa(a) * b; }
__forceinline Vec3fa operator /( const Vec3fa& a, const Vec3fa& b ) { return Vec3fa(a.x/b.x, a.y/b.y, a.z/b.z); }
__forceinline Vec3fa operator /( const Vec3fa& a, const float b ) { return Vec3fa(a.x/b, a.y/b, a.z/b); }
__forceinline Vec3fa operator /( const float a, const Vec3fa& b ) { return Vec3fa(a/b.x, a/b.y, a/b.z); }
__forceinline Vec3fa min( const Vec3fa& a, const Vec3fa& b ) {
return Vec3fa(sycl::fmin(a.x,b.x), sycl::fmin(a.y,b.y), sycl::fmin(a.z,b.z));
}
__forceinline Vec3fa max( const Vec3fa& a, const Vec3fa& b ) {
return Vec3fa(sycl::fmax(a.x,b.x), sycl::fmax(a.y,b.y), sycl::fmax(a.z,b.z));
}
/*
#if defined(__SSE4_1__)
__forceinline Vec3fa mini(const Vec3fa& a, const Vec3fa& b) {
const vint4 ai = _mm_castps_si128(a);
const vint4 bi = _mm_castps_si128(b);
const vint4 ci = _mm_min_epi32(ai,bi);
return _mm_castsi128_ps(ci);
}
#endif
#if defined(__SSE4_1__)
__forceinline Vec3fa maxi(const Vec3fa& a, const Vec3fa& b) {
const vint4 ai = _mm_castps_si128(a);
const vint4 bi = _mm_castps_si128(b);
const vint4 ci = _mm_max_epi32(ai,bi);
return _mm_castsi128_ps(ci);
}
#endif
*/
__forceinline Vec3fa pow ( const Vec3fa& a, const float& b ) {
return Vec3fa(powf(a.x,b),powf(a.y,b),powf(a.z,b));
}
////////////////////////////////////////////////////////////////////////////////
/// Ternary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fa madd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(madd(a.x,b.x,c.x), madd(a.y,b.y,c.y), madd(a.z,b.z,c.z)); }
__forceinline Vec3fa msub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(msub(a.x,b.x,c.x), msub(a.y,b.y,c.y), msub(a.z,b.z,c.z)); }
__forceinline Vec3fa nmadd ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(nmadd(a.x,b.x,c.x), nmadd(a.y,b.y,c.y), nmadd(a.z,b.z,c.z)); }
__forceinline Vec3fa nmsub ( const Vec3fa& a, const Vec3fa& b, const Vec3fa& c) { return Vec3fa(nmsub(a.x,b.x,c.x), nmsub(a.y,b.y,c.y), nmsub(a.z,b.z,c.z)); }
__forceinline Vec3fa madd ( const float a, const Vec3fa& b, const Vec3fa& c) { return madd(Vec3fa(a),b,c); }
__forceinline Vec3fa msub ( const float a, const Vec3fa& b, const Vec3fa& c) { return msub(Vec3fa(a),b,c); }
__forceinline Vec3fa nmadd ( const float a, const Vec3fa& b, const Vec3fa& c) { return nmadd(Vec3fa(a),b,c); }
__forceinline Vec3fa nmsub ( const float a, const Vec3fa& b, const Vec3fa& c) { return nmsub(Vec3fa(a),b,c); }
////////////////////////////////////////////////////////////////////////////////
/// Assignment Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fa& operator +=( Vec3fa& a, const Vec3fa& b ) { return a = a + b; }
__forceinline Vec3fa& operator -=( Vec3fa& a, const Vec3fa& b ) { return a = a - b; }
__forceinline Vec3fa& operator *=( Vec3fa& a, const Vec3fa& b ) { return a = a * b; }
__forceinline Vec3fa& operator *=( Vec3fa& a, const float b ) { return a = a * b; }
__forceinline Vec3fa& operator /=( Vec3fa& a, const Vec3fa& b ) { return a = a / b; }
__forceinline Vec3fa& operator /=( Vec3fa& a, const float b ) { return a = a / b; }
////////////////////////////////////////////////////////////////////////////////
/// Reductions
////////////////////////////////////////////////////////////////////////////////
__forceinline float reduce_add(const Vec3fa& v) { return v.x+v.y+v.z; }
__forceinline float reduce_mul(const Vec3fa& v) { return v.x*v.y*v.z; }
__forceinline float reduce_min(const Vec3fa& v) { return sycl::fmin(sycl::fmin(v.x,v.y),v.z); }
__forceinline float reduce_max(const Vec3fa& v) { return sycl::fmax(sycl::fmax(v.x,v.y),v.z); }
////////////////////////////////////////////////////////////////////////////////
/// Comparison Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline bool operator ==( const Vec3fa& a, const Vec3fa& b ) { return a.x == b.x && a.y == b.y && a.z == b.z; }
__forceinline bool operator !=( const Vec3fa& a, const Vec3fa& b ) { return a.x != b.x || a.y != b.y || a.z != b.z; }
__forceinline Vec3ba eq_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x == b.x, a.y == b.y, a.z == b.z); }
__forceinline Vec3ba neq_mask(const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x != b.x, a.y != b.y, a.z != b.z); }
__forceinline Vec3ba lt_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x < b.x, a.y < b.y, a.z < b.z); }
__forceinline Vec3ba le_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x <= b.x, a.y <= b.y, a.z <= b.z); }
__forceinline Vec3ba gt_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x > b.x, a.y > b.y, a.z > b.z); }
__forceinline Vec3ba ge_mask( const Vec3fa& a, const Vec3fa& b ) { return Vec3ba(a.x >= b.x, a.y >= b.y, a.z >= b.z); }
__forceinline bool isvalid ( const Vec3fa& v ) {
return all(gt_mask(v,Vec3fa(-FLT_LARGE)) & lt_mask(v,Vec3fa(+FLT_LARGE)));
}
__forceinline bool is_finite ( const Vec3fa& a ) {
return all(ge_mask(a,Vec3fa(-FLT_MAX)) & le_mask(a,Vec3fa(+FLT_MAX)));
}
////////////////////////////////////////////////////////////////////////////////
/// Euclidian Space Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline float dot ( const Vec3fa& a, const Vec3fa& b ) {
return reduce_add(a*b);
}
__forceinline Vec3fa cross ( const Vec3fa& a, const Vec3fa& b ) {
return Vec3fa(msub(a.y,b.z,a.z*b.y), msub(a.z,b.x,a.x*b.z), msub(a.x,b.y,a.y*b.x));
}
__forceinline float sqr_length ( const Vec3fa& a ) { return dot(a,a); }
__forceinline float rcp_length ( const Vec3fa& a ) { return rsqrt(dot(a,a)); }
__forceinline float rcp_length2( const Vec3fa& a ) { return rcp(dot(a,a)); }
__forceinline float length ( const Vec3fa& a ) { return sqrt(dot(a,a)); }
__forceinline Vec3fa normalize( const Vec3fa& a ) { return a*rsqrt(dot(a,a)); }
__forceinline float distance ( const Vec3fa& a, const Vec3fa& b ) { return length(a-b); }
__forceinline float halfArea ( const Vec3fa& d ) { return madd(d.x,(d.y+d.z),d.y*d.z); }
__forceinline float area ( const Vec3fa& d ) { return 2.0f*halfArea(d); }
__forceinline Vec3fa normalize_safe( const Vec3fa& a ) {
const float d = dot(a,a); if (unlikely(d == 0.0f)) return a; else return a*rsqrt(d);
}
/*! differentiated normalization */
__forceinline Vec3fa dnormalize(const Vec3fa& p, const Vec3fa& dp)
{
const float pp = dot(p,p);
const float pdp = dot(p,dp);
return (pp*dp-pdp*p)*rcp(pp)*rsqrt(pp);
}
////////////////////////////////////////////////////////////////////////////////
/// Select
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fa select( bool s, const Vec3fa& t, const Vec3fa& f ) {
return Vec3fa(s ? t.x : f.x, s ? t.y : f.y, s ? t.z : f.z);
}
__forceinline Vec3fa select( const Vec3ba& s, const Vec3fa& t, const Vec3fa& f ) {
return Vec3fa(s.x ? t.x : f.x, s.y ? t.y : f.y, s.z ? t.z : f.z);
}
__forceinline Vec3fa lerp(const Vec3fa& v0, const Vec3fa& v1, const float t) {
return madd(1.0f-t,v0,t*v1);
}
__forceinline int maxDim ( const Vec3fa& a )
{
const Vec3fa b = abs(a);
if (b.x > b.y) {
if (b.x > b.z) return 0; else return 2;
} else {
if (b.y > b.z) return 1; else return 2;
}
}
////////////////////////////////////////////////////////////////////////////////
/// Rounding Functions
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fa trunc( const Vec3fa& a ) { return Vec3fa(sycl::trunc(a.x),sycl::trunc(a.y),sycl::trunc(a.z)); }
__forceinline Vec3fa floor( const Vec3fa& a ) { return Vec3fa(sycl::floor(a.x),sycl::floor(a.y),sycl::floor(a.z)); }
__forceinline Vec3fa ceil ( const Vec3fa& a ) { return Vec3fa(sycl::ceil (a.x),sycl::ceil (a.y),sycl::ceil (a.z)); }
////////////////////////////////////////////////////////////////////////////////
/// Output Operators
////////////////////////////////////////////////////////////////////////////////
inline embree_ostream operator<<(embree_ostream cout, const Vec3fa& a) {
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ")";
}
__forceinline Vec2fa::Vec2fa(const Vec3fa& a)
: x(a.x), y(a.y) {}
__forceinline Vec3ia::Vec3ia( const Vec3fa& a )
: x((int)a.x), y((int)a.y), z((int)a.z) {}
typedef Vec3fa Vec3fa_t;
////////////////////////////////////////////////////////////////////////////////
/// SSE Vec3fx Type
////////////////////////////////////////////////////////////////////////////////
struct __aligned(16) Vec3fx
{
//ALIGNED_STRUCT_(16);
typedef float Scalar;
enum { N = 3 };
struct { float x,y,z; union { int a; unsigned u; float w; }; };
////////////////////////////////////////////////////////////////////////////////
/// Constructors, Assignment & Cast Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fx( ) {}
//__forceinline Vec3fx( const __m128 a ) : m128(a) {}
__forceinline explicit Vec3fx(const vfloat4& a) : x(a[0]), y(a[1]), z(a[2]), w(a[3]) {}
__forceinline explicit Vec3fx(const Vec3fa& v) : x(v.x), y(v.y), z(v.z), w(0.0f) {}
__forceinline operator Vec3fa() const { return Vec3fa(x,y,z); }
__forceinline explicit Vec3fx ( const Vec3<float>& other ) { x = other.x; y = other.y; z = other.z; }
//__forceinline Vec3fx& operator =( const Vec3<float>& other ) { x = other.x; y = other.y; z = other.z; return *this; }
//__forceinline Vec3fx ( const Vec3fx& other ) { *(sycl::float4*)this = *(const sycl::float4*)&other; }
//__forceinline Vec3fx& operator =( const Vec3fx& other ) { *(sycl::float4*)this = *(const sycl::float4*)&other; return *this; }
__forceinline explicit Vec3fx( const float a ) : x(a), y(a), z(a), w(a) {}
__forceinline Vec3fx( const float x, const float y, const float z) : x(x), y(y), z(z), w(z) {}
__forceinline Vec3fx( const Vec3fa& other, const int a1) : x(other.x), y(other.y), z(other.z), a(a1) {}
__forceinline Vec3fx( const Vec3fa& other, const unsigned a1) : x(other.x), y(other.y), z(other.z), u(a1) {}
__forceinline Vec3fx( const Vec3fa& other, const float w1) : x(other.x), y(other.y), z(other.z), w(w1) {}
//__forceinline Vec3fx( const float x, const float y, const float z, const int a) : x(x), y(y), z(z), a(a) {} // not working properly!
//__forceinline Vec3fx( const float x, const float y, const float z, const unsigned a) : x(x), y(y), z(z), u(a) {} // not working properly!
__forceinline Vec3fx( const float x, const float y, const float z, const float w) : x(x), y(y), z(z), w(w) {}
__forceinline explicit Vec3fx( const Vec3ia& a ) : x((float)a.x), y((float)a.y), z((float)a.z), w(0.0f) {}
//__forceinline operator const __m128&() const { return m128; }
//__forceinline operator __m128&() { return m128; }
__forceinline operator vfloat4() const { return vfloat4(x,y,z,w); }
//friend __forceinline Vec3fx copy_a( const Vec3fx& a, const Vec3fx& b ) { Vec3fx c = a; c.a = b.a; return c; }
////////////////////////////////////////////////////////////////////////////////
/// Loads and Stores
////////////////////////////////////////////////////////////////////////////////
static __forceinline Vec3fx load( const void* const a ) {
const float* ptr = (const float*)a;
return Vec3fx(ptr[0],ptr[1],ptr[2],ptr[3]);
}
static __forceinline Vec3fx loadu( const void* const a ) {
const float* ptr = (const float*)a;
return Vec3fx(ptr[0],ptr[1],ptr[2],ptr[3]);
}
static __forceinline void storeu ( void* a, const Vec3fx& v ) {
float* ptr = (float*)a;
ptr[0] = v.x; ptr[1] = v.y; ptr[2] = v.z; ptr[3] = v.w;
}
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fx( ZeroTy ) : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}
__forceinline Vec3fx( OneTy ) : x(1.0f), y(1.0f), z(1.0f), w(1.0f) {}
__forceinline Vec3fx( PosInfTy ) : x(+INFINITY), y(+INFINITY), z(+INFINITY), w(+INFINITY) {}
__forceinline Vec3fx( NegInfTy ) : x(-INFINITY), y(-INFINITY), z(-INFINITY), w(-INFINITY) {}
////////////////////////////////////////////////////////////////////////////////
/// Array Access
////////////////////////////////////////////////////////////////////////////////
__forceinline const float& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
__forceinline float& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
};
////////////////////////////////////////////////////////////////////////////////
/// Unary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fx operator +( const Vec3fx& a ) { return a; }
__forceinline Vec3fx operator -( const Vec3fx& a ) { return Vec3fx(-a.x,-a.y,-a.z,-a.w); }
__forceinline Vec3fx abs ( const Vec3fx& a ) { return Vec3fx(sycl::fabs(a.x),sycl::fabs(a.y),sycl::fabs(a.z),sycl::fabs(a.w)); }
__forceinline Vec3fx sign ( const Vec3fx& a ) { return Vec3fx(sycl::sign(a.x),sycl::sign(a.y),sycl::sign(a.z),sycl::sign(a.z)); }
//__forceinline Vec3fx rcp ( const Vec3fx& a ) { return Vec3fx(sycl::recip(a.x),sycl::recip(a.y),sycl::recip(a.z)); }
__forceinline Vec3fx rcp ( const Vec3fx& a ) { return Vec3fx(sycl::native::recip(a.x),sycl::native::recip(a.y),sycl::native::recip(a.z),sycl::native::recip(a.w)); }
__forceinline Vec3fx sqrt ( const Vec3fx& a ) { return Vec3fx(sycl::sqrt(a.x),sycl::sqrt(a.y),sycl::sqrt(a.z),sycl::sqrt(a.w)); }
__forceinline Vec3fx sqr ( const Vec3fx& a ) { return Vec3fx(a.x*a.x,a.y*a.y,a.z*a.z,a.w*a.w); }
__forceinline Vec3fx rsqrt( const Vec3fx& a ) { return Vec3fx(sycl::rsqrt(a.x),sycl::rsqrt(a.y),sycl::rsqrt(a.z),sycl::rsqrt(a.w)); }
__forceinline Vec3fx zero_fix(const Vec3fx& a) {
const float x = sycl::fabs(a.x) < min_rcp_input ? min_rcp_input : a.x;
const float y = sycl::fabs(a.y) < min_rcp_input ? min_rcp_input : a.y;
const float z = sycl::fabs(a.z) < min_rcp_input ? min_rcp_input : a.z;
return Vec3fx(x,y,z);
}
__forceinline Vec3fx rcp_safe(const Vec3fx& a) {
return rcp(zero_fix(a));
}
__forceinline Vec3fx log ( const Vec3fx& a ) {
return Vec3fx(sycl::log(a.x),sycl::log(a.y),sycl::log(a.z));
}
__forceinline Vec3fx exp ( const Vec3fx& a ) {
return Vec3fx(sycl::exp(a.x),sycl::exp(a.y),sycl::exp(a.z));
}
////////////////////////////////////////////////////////////////////////////////
/// Binary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fx operator +( const Vec3fx& a, const Vec3fx& b ) { return Vec3fx(a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w); }
__forceinline Vec3fx operator -( const Vec3fx& a, const Vec3fx& b ) { return Vec3fx(a.x-b.x, a.y-b.y, a.z-b.z, a.w-b.w); }
__forceinline Vec3fx operator *( const Vec3fx& a, const Vec3fx& b ) { return Vec3fx(a.x*b.x, a.y*b.y, a.z*b.z, a.w*b.w); }
__forceinline Vec3fx operator *( const Vec3fx& a, const float b ) { return a * Vec3fx(b); }
__forceinline Vec3fx operator *( const float a, const Vec3fx& b ) { return Vec3fx(a) * b; }
__forceinline Vec3fx operator /( const Vec3fx& a, const Vec3fx& b ) { return Vec3fx(a.x/b.x, a.y/b.y, a.z/b.z, a.w/b.w); }
__forceinline Vec3fx operator /( const Vec3fx& a, const float b ) { return Vec3fx(a.x/b, a.y/b, a.z/b, a.w/b); }
__forceinline Vec3fx operator /( const float a, const Vec3fx& b ) { return Vec3fx(a/b.x, a/b.y, a/b.z, a/b.w); }
__forceinline Vec3fx min( const Vec3fx& a, const Vec3fx& b ) {
return Vec3fx(sycl::fmin(a.x,b.x), sycl::fmin(a.y,b.y), sycl::fmin(a.z,b.z), sycl::fmin(a.w,b.w));
}
__forceinline Vec3fx max( const Vec3fx& a, const Vec3fx& b ) {
return Vec3fx(sycl::fmax(a.x,b.x), sycl::fmax(a.y,b.y), sycl::fmax(a.z,b.z), sycl::fmax(a.w,b.w));
}
/*
#if defined(__SSE4_1__)
__forceinline Vec3fx mini(const Vec3fx& a, const Vec3fx& b) {
const vint4 ai = _mm_castps_si128(a);
const vint4 bi = _mm_castps_si128(b);
const vint4 ci = _mm_min_epi32(ai,bi);
return _mm_castsi128_ps(ci);
}
#endif
#if defined(__SSE4_1__)
__forceinline Vec3fx maxi(const Vec3fx& a, const Vec3fx& b) {
const vint4 ai = _mm_castps_si128(a);
const vint4 bi = _mm_castps_si128(b);
const vint4 ci = _mm_max_epi32(ai,bi);
return _mm_castsi128_ps(ci);
}
#endif
__forceinline Vec3fx pow ( const Vec3fx& a, const float& b ) {
return Vec3fx(powf(a.x,b),powf(a.y,b),powf(a.z,b));
}
*/
////////////////////////////////////////////////////////////////////////////////
/// Ternary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fx madd ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return Vec3fx(madd(a.x,b.x,c.x), madd(a.y,b.y,c.y), madd(a.z,b.z,c.z), madd(a.w,b.w,c.w)); }
__forceinline Vec3fx msub ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return Vec3fx(msub(a.x,b.x,c.x), msub(a.y,b.y,c.y), msub(a.z,b.z,c.z), msub(a.w,b.w,c.w)); }
__forceinline Vec3fx nmadd ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return Vec3fx(nmadd(a.x,b.x,c.x), nmadd(a.y,b.y,c.y), nmadd(a.z,b.z,c.z), nmadd(a.w,b.w,c.w)); }
__forceinline Vec3fx nmsub ( const Vec3fx& a, const Vec3fx& b, const Vec3fx& c) { return Vec3fx(nmsub(a.x,b.x,c.x), nmsub(a.y,b.y,c.y), nmsub(a.z,b.z,c.z), nmsub(a.w,b.w,c.w)); }
__forceinline Vec3fx madd ( const float a, const Vec3fx& b, const Vec3fx& c) { return madd(Vec3fx(a),b,c); }
__forceinline Vec3fx msub ( const float a, const Vec3fx& b, const Vec3fx& c) { return msub(Vec3fx(a),b,c); }
__forceinline Vec3fx nmadd ( const float a, const Vec3fx& b, const Vec3fx& c) { return nmadd(Vec3fx(a),b,c); }
__forceinline Vec3fx nmsub ( const float a, const Vec3fx& b, const Vec3fx& c) { return nmsub(Vec3fx(a),b,c); }
////////////////////////////////////////////////////////////////////////////////
/// Assignment Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fx& operator +=( Vec3fx& a, const Vec3fx& b ) { return a = a + b; }
__forceinline Vec3fx& operator -=( Vec3fx& a, const Vec3fx& b ) { return a = a - b; }
__forceinline Vec3fx& operator *=( Vec3fx& a, const Vec3fx& b ) { return a = a * b; }
__forceinline Vec3fx& operator *=( Vec3fx& a, const float b ) { return a = a * b; }
__forceinline Vec3fx& operator /=( Vec3fx& a, const Vec3fx& b ) { return a = a / b; }
__forceinline Vec3fx& operator /=( Vec3fx& a, const float b ) { return a = a / b; }
////////////////////////////////////////////////////////////////////////////////
/// Reductions
////////////////////////////////////////////////////////////////////////////////
__forceinline float reduce_add(const Vec3fx& v) { return v.x+v.y+v.z; }
__forceinline float reduce_mul(const Vec3fx& v) { return v.x*v.y*v.z; }
__forceinline float reduce_min(const Vec3fx& v) { return sycl::fmin(sycl::fmin(v.x,v.y),v.z); }
__forceinline float reduce_max(const Vec3fx& v) { return sycl::fmax(sycl::fmax(v.x,v.y),v.z); }
////////////////////////////////////////////////////////////////////////////////
/// Comparison Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline bool operator ==( const Vec3fx& a, const Vec3fx& b ) { return a.x == b.x && a.y == b.y && a.z == b.z; }
__forceinline bool operator !=( const Vec3fx& a, const Vec3fx& b ) { return a.x != b.x || a.y != b.y || a.z != b.z; }
__forceinline Vec3ba eq_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x == b.x, a.y == b.y, a.z == b.z); }
__forceinline Vec3ba neq_mask(const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x != b.x, a.y != b.y, a.z != b.z); }
__forceinline Vec3ba lt_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x < b.x, a.y < b.y, a.z < b.z); }
__forceinline Vec3ba le_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x <= b.x, a.y <= b.y, a.z <= b.z); }
__forceinline Vec3ba gt_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x > b.x, a.y > b.y, a.z > b.z); }
__forceinline Vec3ba ge_mask( const Vec3fx& a, const Vec3fx& b ) { return Vec3ba(a.x >= b.x, a.y >= b.y, a.z >= b.z); }
__forceinline bool isvalid ( const Vec3fx& v ) {
return all(gt_mask(v,Vec3fx(-FLT_LARGE)) & lt_mask(v,Vec3fx(+FLT_LARGE)));
}
__forceinline bool is_finite ( const Vec3fx& a ) {
return all(ge_mask(a,Vec3fx(-FLT_MAX)) & le_mask(a,Vec3fx(+FLT_MAX)));
}
__forceinline bool isvalid4 ( const Vec3fx& v ) {
const bool valid_x = v.x >= -FLT_LARGE & v.x <= +FLT_LARGE;
const bool valid_y = v.y >= -FLT_LARGE & v.y <= +FLT_LARGE;
const bool valid_z = v.z >= -FLT_LARGE & v.z <= +FLT_LARGE;
const bool valid_w = v.w >= -FLT_LARGE & v.w <= +FLT_LARGE;
return valid_x & valid_y & valid_z & valid_w;
}
__forceinline bool is_finite4 ( const Vec3fx& v ) {
const bool finite_x = v.x >= -FLT_MAX & v.x <= +FLT_MAX;
const bool finite_y = v.y >= -FLT_MAX & v.y <= +FLT_MAX;
const bool finite_z = v.z >= -FLT_MAX & v.z <= +FLT_MAX;
const bool finite_w = v.w >= -FLT_MAX & v.w <= +FLT_MAX;
return finite_x & finite_y & finite_z & finite_w;
}
////////////////////////////////////////////////////////////////////////////////
/// Euclidian Space Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline float dot ( const Vec3fx& a, const Vec3fx& b ) {
return reduce_add(a*b);
}
__forceinline Vec3fx cross ( const Vec3fx& a, const Vec3fx& b ) {
return Vec3fx(msub(a.y,b.z,a.z*b.y), msub(a.z,b.x,a.x*b.z), msub(a.x,b.y,a.y*b.x));
}
__forceinline float sqr_length ( const Vec3fx& a ) { return dot(a,a); }
__forceinline float rcp_length ( const Vec3fx& a ) { return rsqrt(dot(a,a)); }
__forceinline float rcp_length2( const Vec3fx& a ) { return rcp(dot(a,a)); }
__forceinline float length ( const Vec3fx& a ) { return sqrt(dot(a,a)); }
__forceinline Vec3fx normalize( const Vec3fx& a ) { return a*rsqrt(dot(a,a)); }
__forceinline float distance ( const Vec3fx& a, const Vec3fx& b ) { return length(a-b); }
__forceinline float halfArea ( const Vec3fx& d ) { return madd(d.x,(d.y+d.z),d.y*d.z); }
__forceinline float area ( const Vec3fx& d ) { return 2.0f*halfArea(d); }
__forceinline Vec3fx normalize_safe( const Vec3fx& a ) {
const float d = dot(a,a); if (unlikely(d == 0.0f)) return a; else return a*rsqrt(d);
}
/*! differentiated normalization */
__forceinline Vec3fx dnormalize(const Vec3fx& p, const Vec3fx& dp)
{
const float pp = dot(p,p);
const float pdp = dot(p,dp);
return (pp*dp-pdp*p)*rcp(pp)*rsqrt(pp);
}
////////////////////////////////////////////////////////////////////////////////
/// Select
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fx select( bool s, const Vec3fx& t, const Vec3fx& f ) {
return Vec3fx(s ? t.x : f.x, s ? t.y : f.y, s ? t.z : f.z, s ? t.w : f.w);
}
__forceinline Vec3fx select( const Vec3ba& s, const Vec3fx& t, const Vec3fx& f ) {
return Vec3fx(s.x ? t.x : f.x, s.y ? t.y : f.y, s.z ? t.z : f.z);
}
__forceinline Vec3fx lerp(const Vec3fx& v0, const Vec3fx& v1, const float t) {
return madd(1.0f-t,v0,t*v1);
}
__forceinline int maxDim ( const Vec3fx& a )
{
const Vec3fx b = abs(a);
if (b.x > b.y) {
if (b.x > b.z) return 0; else return 2;
} else {
if (b.y > b.z) return 1; else return 2;
}
}
////////////////////////////////////////////////////////////////////////////////
/// Rounding Functions
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3fx trunc( const Vec3fx& a ) { return Vec3fx(sycl::trunc(a.x),sycl::trunc(a.y),sycl::trunc(a.z),sycl::trunc(a.w)); }
__forceinline Vec3fx floor( const Vec3fx& a ) { return Vec3fx(sycl::floor(a.x),sycl::floor(a.y),sycl::floor(a.z),sycl::floor(a.w)); }
__forceinline Vec3fx ceil ( const Vec3fx& a ) { return Vec3fx(sycl::ceil (a.x),sycl::ceil (a.y),sycl::ceil (a.z),sycl::ceil (a.w)); }
////////////////////////////////////////////////////////////////////////////////
/// Output Operators
////////////////////////////////////////////////////////////////////////////////
inline embree_ostream operator<<(embree_ostream cout, const Vec3fx& a) {
return cout << "(" << a.x << ", " << a.y << ", " << a.z << "," << a.w << ")";
}
typedef Vec3fx Vec3ff;
//__forceinline Vec2fa::Vec2fa(const Vec3fx& a)
// : x(a.x), y(a.y) {}
//__forceinline Vec3ia::Vec3ia( const Vec3fx& a )
// : x((int)a.x), y((int)a.y), z((int)a.z) {}
}
+8 -1
View File
@@ -4,7 +4,12 @@
#pragma once
#include "../sys/alloc.h"
#include "math.h"
#include "emath.h"
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
# include "vec3ia_sycl.h"
#else
#include "../simd/sse.h"
namespace embree
@@ -194,3 +199,5 @@ namespace embree
return cout << "(" << a.x << ", " << a.y << ", " << a.z << ")";
}
}
#endif
+178
View File
@@ -0,0 +1,178 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "../sys/alloc.h"
#include "emath.h"
#include "../simd/sse.h"
namespace embree
{
////////////////////////////////////////////////////////////////////////////////
/// SSE Vec3ia Type
////////////////////////////////////////////////////////////////////////////////
struct __aligned(16) Vec3ia
{
ALIGNED_STRUCT_(16);
struct { int x,y,z; };
typedef int Scalar;
enum { N = 3 };
////////////////////////////////////////////////////////////////////////////////
/// Constructors, Assignment & Cast Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ia( ) {}
//__forceinline Vec3ia( const __m128i a ) : m128(a) {}
__forceinline Vec3ia( const Vec3ia& other ) : x(other.x), y(other.y), z(other.z) {}
__forceinline Vec3ia& operator =(const Vec3ia& other) { x = other.x; y = other.y; z = other.z; return *this; }
__forceinline explicit Vec3ia( const int a ) : x(a), y(a), z(a) {}
__forceinline Vec3ia( const int x, const int y, const int z) : x(x), y(y), z(z) {}
//__forceinline explicit Vec3ia( const __m128 a ) : m128(_mm_cvtps_epi32(a)) {}
__forceinline explicit Vec3ia(const vint4& a) : x(a[0]), y(a[1]), z(a[2]) {}
__forceinline explicit Vec3ia( const Vec3fa& a );
//__forceinline operator const __m128i&() const { return m128; }
//__forceinline operator __m128i&() { return m128; }
__forceinline operator vint4() const { return vint4(x,y,z,z); }
////////////////////////////////////////////////////////////////////////////////
/// Constants
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ia( ZeroTy ) : x(0), y(0), z(0) {}
__forceinline Vec3ia( OneTy ) : x(1), y(1), z(1) {}
__forceinline Vec3ia( PosInfTy ) : x(0x7FFFFFFF), y(0x7FFFFFFF), z(0x7FFFFFFF) {}
__forceinline Vec3ia( NegInfTy ) : x(0x80000000), y(0x80000000), z(0x80000000) {}
////////////////////////////////////////////////////////////////////////////////
/// Array Access
////////////////////////////////////////////////////////////////////////////////
__forceinline const int& operator []( const size_t index ) const { assert(index < 3); return (&x)[index]; }
__forceinline int& operator []( const size_t index ) { assert(index < 3); return (&x)[index]; }
};
////////////////////////////////////////////////////////////////////////////////
/// Unary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ia operator +( const Vec3ia& a ) { return Vec3ia(+a.x,+a.y,+a.z); }
__forceinline Vec3ia operator -( const Vec3ia& a ) { return Vec3ia(-a.x,-a.y,-a.z); }
__forceinline Vec3ia abs ( const Vec3ia& a ) { return Vec3ia(sycl::abs(a.x),sycl::abs(a.y),sycl::abs(a.z)); }
////////////////////////////////////////////////////////////////////////////////
/// Binary Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ia operator +( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x+b.x, a.y+b.y, a.z+b.z); }
__forceinline Vec3ia operator +( const Vec3ia& a, const int b ) { return a+Vec3ia(b); }
__forceinline Vec3ia operator +( const int a, const Vec3ia& b ) { return Vec3ia(a)+b; }
__forceinline Vec3ia operator -( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x-b.x, a.y-b.y, a.z-b.z); }
__forceinline Vec3ia operator -( const Vec3ia& a, const int b ) { return a-Vec3ia(b); }
__forceinline Vec3ia operator -( const int a, const Vec3ia& b ) { return Vec3ia(a)-b; }
__forceinline Vec3ia operator *( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x*b.x, a.y*b.y, a.z*b.z); }
__forceinline Vec3ia operator *( const Vec3ia& a, const int b ) { return a * Vec3ia(b); }
__forceinline Vec3ia operator *( const int a, const Vec3ia& b ) { return Vec3ia(a) * b; }
__forceinline Vec3ia operator &( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x&b.x, a.y&b.y, a.z&b.z); }
__forceinline Vec3ia operator &( const Vec3ia& a, const int b ) { return a & Vec3ia(b); }
__forceinline Vec3ia operator &( const int a, const Vec3ia& b ) { return Vec3ia(a) & b; }
__forceinline Vec3ia operator |( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x|b.x, a.y|b.y, a.z|b.z); }
__forceinline Vec3ia operator |( const Vec3ia& a, const int b ) { return a | Vec3ia(b); }
__forceinline Vec3ia operator |( const int a, const Vec3ia& b ) { return Vec3ia(a) | b; }
__forceinline Vec3ia operator ^( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(a.x^b.x, a.y^b.y, a.z^b.z); }
__forceinline Vec3ia operator ^( const Vec3ia& a, const int b ) { return a ^ Vec3ia(b); }
__forceinline Vec3ia operator ^( const int a, const Vec3ia& b ) { return Vec3ia(a) ^ b; }
__forceinline Vec3ia operator <<( const Vec3ia& a, const int n ) { return Vec3ia(a.x<<n, a.y<<n, a.z<<n); }
__forceinline Vec3ia operator >>( const Vec3ia& a, const int n ) { return Vec3ia(a.x>>n, a.y>>n, a.z>>n); }
__forceinline Vec3ia sll ( const Vec3ia& a, const int b ) { return Vec3ia(a.x<<b, a.y<<b, a.z<<b); }
__forceinline Vec3ia sra ( const Vec3ia& a, const int b ) { return Vec3ia(a.x>>b, a.y>>b, a.z>>b); }
__forceinline Vec3ia srl ( const Vec3ia& a, const int b ) { return Vec3ia(unsigned(a.x)>>b, unsigned(a.y)>>b, unsigned(a.z)>>b); }
////////////////////////////////////////////////////////////////////////////////
/// Assignment Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ia& operator +=( Vec3ia& a, const Vec3ia& b ) { return a = a + b; }
__forceinline Vec3ia& operator +=( Vec3ia& a, const int& b ) { return a = a + b; }
__forceinline Vec3ia& operator -=( Vec3ia& a, const Vec3ia& b ) { return a = a - b; }
__forceinline Vec3ia& operator -=( Vec3ia& a, const int& b ) { return a = a - b; }
__forceinline Vec3ia& operator *=( Vec3ia& a, const Vec3ia& b ) { return a = a * b; }
__forceinline Vec3ia& operator *=( Vec3ia& a, const int& b ) { return a = a * b; }
__forceinline Vec3ia& operator &=( Vec3ia& a, const Vec3ia& b ) { return a = a & b; }
__forceinline Vec3ia& operator &=( Vec3ia& a, const int& b ) { return a = a & b; }
__forceinline Vec3ia& operator |=( Vec3ia& a, const Vec3ia& b ) { return a = a | b; }
__forceinline Vec3ia& operator |=( Vec3ia& a, const int& b ) { return a = a | b; }
__forceinline Vec3ia& operator <<=( Vec3ia& a, const int& b ) { return a = a << b; }
__forceinline Vec3ia& operator >>=( Vec3ia& a, const int& b ) { return a = a >> b; }
////////////////////////////////////////////////////////////////////////////////
/// Reductions
////////////////////////////////////////////////////////////////////////////////
__forceinline int reduce_add(const Vec3ia& v) { return v.x+v.y+v.z; }
__forceinline int reduce_mul(const Vec3ia& v) { return v.x*v.y*v.z; }
__forceinline int reduce_min(const Vec3ia& v) { return sycl::min(sycl::min(v.x,v.y),v.z); }
__forceinline int reduce_max(const Vec3ia& v) { return sycl::max(sycl::max(v.x,v.y),v.z); }
////////////////////////////////////////////////////////////////////////////////
/// Comparison Operators
////////////////////////////////////////////////////////////////////////////////
__forceinline bool operator ==( const Vec3ia& a, const Vec3ia& b ) { return a.x == b.x & a.y == b.y & a.z == b.z; }
__forceinline bool operator !=( const Vec3ia& a, const Vec3ia& b ) { return a.x != b.x & a.y != b.y & a.z != b.z; }
/*
__forceinline bool operator < ( const Vec3ia& a, const Vec3ia& b ) {
if (a.x != b.x) return a.x < b.x;
if (a.y != b.y) return a.y < b.y;
if (a.z != b.z) return a.z < b.z;
return false;
}
*/
__forceinline Vec3ba eq_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x == b.x, a.y == b.y, a.z == b.z); }
__forceinline Vec3ba lt_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x < b.x, a.y < b.y, a.z < b.z); }
__forceinline Vec3ba gt_mask( const Vec3ia& a, const Vec3ia& b ) { return Vec3ba(a.x > b.x, a.y > b.y, a.z > b.z); }
////////////////////////////////////////////////////////////////////////////////
/// Select
////////////////////////////////////////////////////////////////////////////////
__forceinline Vec3ia select( const Vec3ba& m, const Vec3ia& t, const Vec3ia& f ) {
const int x = m.x ? t.x : f.x;
const int y = m.y ? t.y : f.y;
const int z = m.z ? t.z : f.z;
return Vec3ia(x,y,z);
}
__forceinline Vec3ia min( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(sycl::min(a.x,b.x), sycl::min(a.y,b.y), sycl::min(a.z,b.z)); }
__forceinline Vec3ia max( const Vec3ia& a, const Vec3ia& b ) { return Vec3ia(sycl::max(a.x,b.x), sycl::max(a.y,b.y), sycl::max(a.z,b.z)); }
////////////////////////////////////////////////////////////////////////////////
/// Output Operators
////////////////////////////////////////////////////////////////////////////////
inline embree_ostream operator<<(embree_ostream cout, const Vec3ia& a) {
return cout;
}
}
+24 -1
View File
@@ -3,7 +3,7 @@
#pragma once
#include "math.h"
#include "emath.h"
#include "vec3.h"
namespace embree
@@ -221,6 +221,8 @@ namespace embree
{
template<> __forceinline Vec4<float>::Vec4( const Vec3fx& a ) { x = a.x; y = a.y; z = a.z; w = a.w; }
#if !defined(__SYCL_DEVICE_ONLY__)
#if defined(__AVX__)
template<> __forceinline Vec4<vfloat4>::Vec4( const Vec3fx& a ) {
x = a.x; y = a.y; z = a.z; w = a.w;
@@ -240,4 +242,25 @@ namespace embree
#if defined(__AVX512F__)
template<> __forceinline Vec4<vfloat16>::Vec4( const Vec3fx& a ) : x(a.x), y(a.y), z(a.z), w(a.w) {}
#endif
#else
#if defined(__SSE__)
template<> __forceinline Vec4<vfloat4>::Vec4(const Vec3fx& a) {
x = a.x; y = a.y; z = a.z; w = a.w;
}
#endif
#if defined(__AVX__)
template<> __forceinline Vec4<vfloat8>::Vec4(const Vec3fx& a) {
x = a.x; y = a.y; z = a.z; w = a.w;
}
#endif
#if defined(__AVX512F__)
template<> __forceinline Vec4<vfloat16>::Vec4(const Vec3fx& a) {
x = a.x; y = a.y; z = a.z; w = a.w;
}
#endif
#endif
}
+2
View File
@@ -34,6 +34,7 @@ __forceinline __m128 _mm_broadcast_ss (float const * mem_addr)
#define _MM_SET_EXCEPTION_MASK(x)
// #define _MM_SET_FLUSH_ZERO_MODE(x)
/*
__forceinline int _mm_getcsr()
{
return 0;
@@ -43,6 +44,7 @@ __forceinline void _mm_mfence()
{
__sync_synchronize();
}
*/
__forceinline __m128i _mm_load4epu8_epi32(__m128i *ptr)
{
+2053 -685
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -31,4 +31,3 @@
#if defined(__AVX512F__)
#include "avx512.h"
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
#pragma once
#include "../math/math.h"
#include "../math/emath.h"
/* include SSE wrapper classes */
#if defined(__SSE__) || defined(__ARM_NEON)
+2 -2
View File
@@ -15,7 +15,7 @@ namespace embree
__forceinline const float& operator [](size_t index) const { assert(index < N); return f[index]; }
__forceinline float& operator [](size_t index) { assert(index < N); return f[index]; }
};
template<int N>
struct vdouble_impl
{
@@ -31,7 +31,7 @@ namespace embree
__forceinline const int& operator [](size_t index) const { assert(index < N); return i[index]; }
__forceinline int& operator [](size_t index) { assert(index < N); return i[index]; }
};
template<int N>
struct vuint_impl
{
+1 -1
View File
@@ -119,7 +119,7 @@ namespace embree
#if defined(__aarch64__)
template<int i0, int i1, int i2, int i3>
__forceinline vboolf4 shuffle(const vboolf4& v) {
return vreinterpretq_f32_u8(vqtbl1q_u8( vreinterpretq_u8_s32(v), _MN_SHUFFLE(i0, i1, i2, i3)));
return vreinterpretq_f32_u8(vqtbl1q_u8( vreinterpretq_u8_s32((int32x4_t)v.v), _MN_SHUFFLE(i0, i1, i2, i3)));
}
template<int i0, int i1, int i2, int i3>
+11
View File
@@ -316,6 +316,17 @@ namespace embree
return madd(t,b-a,a);
}
__forceinline bool isvalid (const vfloat16& v) {
return all((v > vfloat16(-FLT_LARGE)) & (v < vfloat16(+FLT_LARGE)));
}
__forceinline void xchg(vboolf16 m, vfloat16& a, vfloat16& b)
{
vfloat16 c = a;
a = select(m,b,a);
b = select(m,c,b);
}
////////////////////////////////////////////////////////////////////////////////
/// Rounding Functions
////////////////////////////////////////////////////////////////////////////////
+2
View File
@@ -32,6 +32,8 @@ namespace embree
__forceinline vfloat() {}
__forceinline vfloat(const vfloat4& other) { v = other.v; }
//__forceinline vfloat(const vfloat4& other) = default;
__forceinline vfloat4& operator =(const vfloat4& other) { v = other.v; return *this; }
__forceinline vfloat(__m128 a) : v(a) {}
+1 -1
View File
@@ -3,7 +3,7 @@
#pragma once
#include "../math/math.h"
#include "../math/emath.h"
#define vboolf vboolf_impl
#define vboold vboold_impl
+1 -1
View File
@@ -3,7 +3,7 @@
#pragma once
#include "../math/math.h"
#include "../math/emath.h"
#define vboolf vboolf_impl
#define vboold vboold_impl
+4 -1
View File
@@ -10,7 +10,7 @@ ADD_LIBRARY(sys STATIC
filename.cpp
library.cpp
thread.cpp
string.cpp
estring.cpp
regression.cpp
mutex.cpp
condition.cpp
@@ -21,6 +21,9 @@ SET_PROPERTY(TARGET sys PROPERTY FOLDER common)
SET_PROPERTY(TARGET sys APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
TARGET_LINK_LIBRARIES(sys ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
IF (EMBREE_SYCL_SUPPORT)
TARGET_LINK_LIBRARIES(sys ${SYCL_LIB_NAME})
ENDIF()
IF (EMBREE_STATIC_LIB)
INSTALL(TARGETS sys EXPORT sys-targets ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT devel)
+118 -6
View File
@@ -12,30 +12,142 @@
namespace embree
{
void* alignedMalloc(size_t size, size_t align)
size_t total_allocations = 0;
#if defined(EMBREE_SYCL_SUPPORT)
__thread sycl::context* tls_context_tutorial = nullptr;
__thread sycl::device* tls_device_tutorial = nullptr;
__thread sycl::context* tls_context_embree = nullptr;
__thread sycl::device* tls_device_embree = nullptr;
void enableUSMAllocEmbree(sycl::context* context, sycl::device* device)
{
if (tls_context_embree != nullptr) throw std::runtime_error("USM allocation already enabled");
if (tls_device_embree != nullptr) throw std::runtime_error("USM allocation already enabled");
tls_context_embree = context;
tls_device_embree = device;
}
void disableUSMAllocEmbree()
{
if (tls_context_embree == nullptr) throw std::runtime_error("USM allocation not enabled");
if (tls_device_embree == nullptr) throw std::runtime_error("USM allocation not enabled");
tls_context_embree = nullptr;
tls_device_embree = nullptr;
}
void enableUSMAllocTutorial(sycl::context* context, sycl::device* device)
{
//if (tls_context_tutorial != nullptr) throw std::runtime_error("USM allocation already enabled");
//if (tls_device_tutorial != nullptr) throw std::runtime_error("USM allocation already enabled");
tls_context_tutorial = context;
tls_device_tutorial = device;
}
void disableUSMAllocTutorial()
{
//if (tls_context_tutorial == nullptr) throw std::runtime_error("USM allocation not enabled");
//if (tls_device_tutorial == nullptr) throw std::runtime_error("USM allocation not enabled");
tls_context_tutorial = nullptr;
tls_device_tutorial = nullptr;
}
#endif
void* alignedMalloc(size_t size, size_t align)
{
if (size == 0)
return nullptr;
assert((align & (align-1)) == 0);
void* ptr = _mm_malloc(size,align);
if (size != 0 && ptr == nullptr)
throw std::bad_alloc();
return ptr;
}
void alignedFree(void* ptr)
{
if (ptr)
_mm_free(ptr);
}
#if defined(EMBREE_SYCL_SUPPORT)
void* alignedSYCLMalloc(sycl::context* context, sycl::device* device, size_t size, size_t align, EmbreeUSMMode mode)
{
assert(context);
assert(device);
if (size == 0)
return nullptr;
assert((align & (align-1)) == 0);
total_allocations++;
void* ptr = nullptr;
if (mode == EMBREE_USM_SHARED_DEVICE_READ_ONLY)
ptr = sycl::aligned_alloc_shared(align,size,*device,*context,sycl::ext::oneapi::property::usm::device_read_only());
else
ptr = sycl::aligned_alloc_shared(align,size,*device,*context);
if (size != 0 && ptr == nullptr)
throw std::bad_alloc();
return ptr;
}
static MutexSys g_alloc_mutex;
void* alignedSYCLMalloc(size_t size, size_t align, EmbreeUSMMode mode)
{
if (tls_context_tutorial) return alignedSYCLMalloc(tls_context_tutorial, tls_device_tutorial, size, align, mode);
if (tls_context_embree ) return alignedSYCLMalloc(tls_context_embree, tls_device_embree, size, align, mode);
return nullptr;
}
void alignedSYCLFree(sycl::context* context, void* ptr)
{
assert(context);
if (ptr) {
sycl::free(ptr,*context);
}
}
void alignedSYCLFree(void* ptr)
{
if (tls_context_tutorial) return alignedSYCLFree(tls_context_tutorial, ptr);
if (tls_context_embree ) return alignedSYCLFree(tls_context_embree, ptr);
}
#endif
void* alignedUSMMalloc(size_t size, size_t align, EmbreeUSMMode mode)
{
#if defined(EMBREE_SYCL_SUPPORT)
if (tls_context_embree || tls_context_tutorial)
return alignedSYCLMalloc(size,align,mode);
else
#endif
return alignedMalloc(size,align);
}
void alignedUSMFree(void* ptr)
{
#if defined(EMBREE_SYCL_SUPPORT)
if (tls_context_embree || tls_context_tutorial)
return alignedSYCLFree(ptr);
else
#endif
return alignedFree(ptr);
}
static bool huge_pages_enabled = false;
static MutexSys os_init_mutex;
__forceinline bool isHugePageCandidate(const size_t bytes)
__forceinline bool isHugePageCandidate(const size_t bytes)
{
if (!huge_pages_enabled)
return false;
+86 -6
View File
@@ -9,20 +9,72 @@
namespace embree
{
#define ALIGNED_STRUCT_(align) \
void* operator new(size_t size) { return alignedMalloc(size,align); } \
void operator delete(void* ptr) { alignedFree(ptr); } \
#if defined(EMBREE_SYCL_SUPPORT)
/* enables SYCL USM allocation */
void enableUSMAllocEmbree(sycl::context* context, sycl::device* device);
void enableUSMAllocTutorial(sycl::context* context, sycl::device* device);
/* disables SYCL USM allocation */
void disableUSMAllocEmbree();
void disableUSMAllocTutorial();
#endif
#define ALIGNED_STRUCT_(align) \
void* operator new(size_t size) { return alignedMalloc(size,align); } \
void operator delete(void* ptr) { alignedFree(ptr); } \
void* operator new[](size_t size) { return alignedMalloc(size,align); } \
void operator delete[](void* ptr) { alignedFree(ptr); }
#define ALIGNED_CLASS_(align) \
#define ALIGNED_STRUCT_USM_(align) \
void* operator new(size_t size) { return alignedUSMMalloc(size,align); } \
void operator delete(void* ptr) { alignedUSMFree(ptr); } \
void* operator new[](size_t size) { return alignedUSMMalloc(size,align); } \
void operator delete[](void* ptr) { alignedUSMFree(ptr); }
#define ALIGNED_CLASS_(align) \
public: \
ALIGNED_STRUCT_(align) \
ALIGNED_STRUCT_(align) \
private:
#define ALIGNED_CLASS_USM_(align) \
public: \
ALIGNED_STRUCT_USM_(align) \
private:
enum EmbreeUSMMode {
EMBREE_USM_SHARED = 0,
EMBREE_USM_SHARED_DEVICE_READ_WRITE = 0,
EMBREE_USM_SHARED_DEVICE_READ_ONLY = 1
};
/*! aligned allocation */
void* alignedMalloc(size_t size, size_t align);
void alignedFree(void* ptr);
/*! aligned allocation using SYCL USM */
void* alignedUSMMalloc(size_t size, size_t align = 16, EmbreeUSMMode mode = EMBREE_USM_SHARED_DEVICE_READ_ONLY);
void alignedUSMFree(void* ptr);
#if defined(EMBREE_SYCL_SUPPORT)
/*! aligned allocation using SYCL USM */
void* alignedSYCLMalloc(sycl::context* context, sycl::device* device, size_t size, size_t align, EmbreeUSMMode mode);
void alignedSYCLFree(sycl::context* context, void* ptr);
// deleter functor to use as deleter in std unique or shared pointers that
// capture raw pointers created by sycl::malloc and it's variants
template<typename T>
struct sycl_deleter
{
void operator()(T const* ptr)
{
alignedUSMFree((void*)ptr);
}
};
#endif
/*! allocator that performs aligned allocations */
template<typename T, size_t alignment>
@@ -95,6 +147,34 @@ namespace embree
bool hugepages;
};
/*! allocator that newer performs allocations */
template<typename T>
struct no_allocator
{
typedef T value_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
__forceinline pointer allocate( size_type n ) {
throw std::runtime_error("no allocation supported");
}
__forceinline void deallocate( pointer p, size_type n ) {
}
__forceinline void construct( pointer p, const_reference val ) {
new (p) T(val);
}
__forceinline void destroy( pointer p ) {
p->~T();
}
};
/*! allocator for IDs */
template<typename T, size_t max_id>
struct IDPool
+2 -2
View File
@@ -36,7 +36,7 @@ namespace embree
};
template<typename T>
__forceinline void atomic_min(std::atomic<T>& aref, const T& bref)
__forceinline void _atomic_min(std::atomic<T>& aref, const T& bref)
{
const T b = bref.load();
while (true) {
@@ -47,7 +47,7 @@ namespace embree
}
template<typename T>
__forceinline void atomic_max(std::atomic<T>& aref, const T& bref)
__forceinline void _atomic_max(std::atomic<T>& aref, const T& bref)
{
const T b = bref.load();
while (true) {
@@ -1,7 +1,7 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#include "string.h"
#include "estring.h"
#include <algorithm>
#include <ctype.h>
@@ -28,6 +28,42 @@ namespace embree
std::streamsize precision;
};
struct IndentOStream : public std::streambuf
{
explicit IndentOStream(std::ostream &ostream, int indent = 2)
: streambuf(ostream.rdbuf())
, start_of_line(true)
, ident_str(indent, ' ')
, stream(&ostream)
{
// set streambuf of ostream to this and save original streambuf
stream->rdbuf(this);
}
virtual ~IndentOStream()
{
if (stream != NULL) {
// restore old streambuf
stream->rdbuf(streambuf);
}
}
protected:
virtual int overflow(int ch) {
if (start_of_line && ch != '\n') {
streambuf->sputn(ident_str.data(), ident_str.size());
}
start_of_line = ch == '\n';
return streambuf->sputc(ch);
}
private:
std::streambuf *streambuf;
bool start_of_line;
std::string ident_str;
std::ostream *stream;
};
std::string toLowerCase(const std::string& s);
std::string toUpperCase(const std::string& s);
-12
View File
@@ -35,18 +35,6 @@ namespace embree
filename.resize(filename.size()-1);
}
/*! returns path to home folder */
FileName FileName::homeFolder()
{
#ifdef __WIN32__
const char* home = getenv("UserProfile");
#else
const char* home = getenv("HOME");
#endif
if (home) return home;
return "";
}
/*! returns path to executable */
FileName FileName::executableFolder() {
return FileName(getExecutableFileName()).path();
-3
View File
@@ -20,9 +20,6 @@ namespace embree
/*! create a valid filename from a string */
FileName (const std::string& filename);
/*! returns path to home folder */
static FileName homeFolder();
/*! returns path to executable */
static FileName executableFolder();
+65 -48
View File
@@ -64,7 +64,7 @@ namespace embree
/// Windows Platform
////////////////////////////////////////////////////////////////////////////////
#if defined(__WIN32__)
#if defined(__WIN32__) && !defined(__INTEL_LLVM_COMPILER)
__forceinline size_t read_tsc()
{
@@ -89,7 +89,7 @@ namespace embree
#endif
}
#if defined(__X86_64__)
#if defined(__X86_64__) || defined (__aarch64__)
__forceinline size_t bsf(size_t v) {
#if defined(__AVX2__)
return _tzcnt_u64(v);
@@ -113,7 +113,7 @@ namespace embree
return i;
}
#if defined(__X86_64__)
#if defined(__X86_64__) || defined (__aarch64__)
__forceinline size_t bscf(size_t& v)
{
size_t i = bsf(v);
@@ -138,7 +138,7 @@ namespace embree
#endif
}
#if defined(__X86_64__)
#if defined(__X86_64__) || defined (__aarch64__)
__forceinline size_t bsr(size_t v) {
#if defined(__AVX2__)
return 63 -_lzcnt_u64(v);
@@ -196,49 +196,6 @@ namespace embree
#else
#if defined(__i386__) && defined(__PIC__)
__forceinline void __cpuid(int out[4], int op)
{
asm volatile ("xchg{l}\t{%%}ebx, %1\n\t"
"cpuid\n\t"
"xchg{l}\t{%%}ebx, %1\n\t"
: "=a"(out[0]), "=r"(out[1]), "=c"(out[2]), "=d"(out[3])
: "0"(op));
}
__forceinline void __cpuid_count(int out[4], int op1, int op2)
{
asm volatile ("xchg{l}\t{%%}ebx, %1\n\t"
"cpuid\n\t"
"xchg{l}\t{%%}ebx, %1\n\t"
: "=a" (out[0]), "=r" (out[1]), "=c" (out[2]), "=d" (out[3])
: "0" (op1), "2" (op2));
}
#elif defined(__X86_ASM__)
__forceinline void __cpuid(int out[4], int op) {
#if defined(__ARM_NEON)
if (op == 0) { // Get CPU name
out[0] = 0x41524d20;
out[1] = 0x41524d20;
out[2] = 0x41524d20;
out[3] = 0x41524d20;
}
#else
asm volatile ("cpuid" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "a"(op));
#endif
}
#if !defined(__ARM_NEON)
__forceinline void __cpuid_count(int out[4], int op1, int op2) {
asm volatile ("cpuid" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "a"(op1), "c"(op2));
}
#endif
#endif
__forceinline uint64_t read_tsc() {
#if defined(__X86_ASM__)
uint32_t high,low;
@@ -263,6 +220,13 @@ namespace embree
#endif
#endif
}
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
__forceinline unsigned int bsf(unsigned v) {
return sycl::ctz(v);
}
#else
#if defined(__64BIT__)
__forceinline unsigned bsf(unsigned v)
@@ -280,6 +244,13 @@ namespace embree
#endif
}
#endif
#endif
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
__forceinline size_t bsf(size_t v) {
return sycl::ctz(v);
}
#else
__forceinline size_t bsf(size_t v) {
#if defined(__AVX2__) && !defined(__aarch64__)
@@ -294,6 +265,7 @@ namespace embree
return __builtin_ctzl(v);
#endif
}
#endif
__forceinline int bscf(int& v)
{
@@ -434,6 +406,41 @@ namespace embree
#endif
#if !defined(__WIN32__)
#if defined(__i386__) && defined(__PIC__)
__forceinline void __cpuid(int out[4], int op)
{
asm volatile ("xchg{l}\t{%%}ebx, %1\n\t"
"cpuid\n\t"
"xchg{l}\t{%%}ebx, %1\n\t"
: "=a"(out[0]), "=r"(out[1]), "=c"(out[2]), "=d"(out[3])
: "0"(op));
}
__forceinline void __cpuid_count(int out[4], int op1, int op2)
{
asm volatile ("xchg{l}\t{%%}ebx, %1\n\t"
"cpuid\n\t"
"xchg{l}\t{%%}ebx, %1\n\t"
: "=a" (out[0]), "=r" (out[1]), "=c" (out[2]), "=d" (out[3])
: "0" (op1), "2" (op2));
}
#elif defined(__X86_ASM__)
__forceinline void __cpuid(int out[4], int op) {
asm volatile ("cpuid" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "a"(op));
}
__forceinline void __cpuid_count(int out[4], int op1, int op2) {
asm volatile ("cpuid" : "=a"(out[0]), "=b"(out[1]), "=c"(out[2]), "=d"(out[3]) : "a"(op1), "c"(op2));
}
#endif
#endif
////////////////////////////////////////////////////////////////////////////////
/// All Platforms
////////////////////////////////////////////////////////////////////////////////
@@ -459,8 +466,16 @@ namespace embree
#endif
#endif
#if defined(__SSE4_2__) || defined(__ARM_NEON)
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
__forceinline unsigned int popcnt(unsigned int in) {
return sycl::popcount(in);
}
#else
#if defined(__SSE4_2__) || defined(__ARM_NEON)
__forceinline int popcnt(int in) {
return _mm_popcnt_u32(in);
}
@@ -475,6 +490,8 @@ namespace embree
}
#endif
#endif
#endif
#if defined(__X86_ASM__)
+2 -2
View File
@@ -86,8 +86,8 @@ namespace embree
class PaddedSpinLock : public SpinLock
{
private:
char padding[CPU_CACHELINE_SIZE - sizeof(SpinLock)];
private:
MAYBE_UNUSED char padding[CPU_CACHELINE_SIZE - sizeof(SpinLock)];
};
/*! safe mutex lock and unlock helper */
template<typename Mutex> class Lock {
+236 -5
View File
@@ -3,7 +3,9 @@
#pragma once
#if !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <cstddef>
#include <cassert>
@@ -18,6 +20,30 @@
#include <cstring>
#include <stdint.h>
#include <functional>
#include <mutex>
#if defined(EMBREE_SYCL_SUPPORT)
#define __SYCL_USE_NON_VARIADIC_SPIRV_OCL_PRINTF__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-W#pragma-messages"
#include <sycl/sycl.hpp>
#pragma clang diagnostic pop
#include "sycl.h"
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
#define CONSTANT __attribute__((opencl_constant))
#else
#define CONSTANT
#endif
#endif
////////////////////////////////////////////////////////////////////////////////
/// detect platform
@@ -115,7 +141,7 @@
#else
#define __restrict__ //__restrict // causes issues with MSVC
#endif
#if !defined(__thread)
#if !defined(__thread) && !defined(__INTEL_LLVM_COMPILER)
#define __thread __declspec(thread)
#endif
#if !defined(__aligned)
@@ -148,6 +174,10 @@
#define MAYBE_UNUSED
#endif
#if !defined(_unused)
#define _unused(x) ((void)(x))
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1900) // before VS2015 deleted functions are not supported properly
#define DELETED
#else
@@ -155,7 +185,7 @@
#endif
#if !defined(likely)
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) || defined(__SYCL_DEVICE_ONLY__)
#define likely(expr) (expr)
#define unlikely(expr) (expr)
#else
@@ -171,12 +201,17 @@
/* debug printing macros */
#define STRING(x) #x
#define TOSTRING(x) STRING(x)
#define PING embree_cout << __FILE__ << " (" << __LINE__ << "): " << __FUNCTION__ << embree_endl
#define PING embree_cout_uniform << __FILE__ << " (" << __LINE__ << "): " << __FUNCTION__ << embree_endl
#define PRINT(x) embree_cout << STRING(x) << " = " << (x) << embree_endl
#define PRINT2(x,y) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << embree_endl
#define PRINT3(x,y,z) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << embree_endl
#define PRINT4(x,y,z,w) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << embree_endl
#define UPRINT(x) embree_cout_uniform << STRING(x) << " = " << (x) << embree_endl
#define UPRINT2(x,y) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << embree_endl
#define UPRINT3(x,y,z) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << embree_endl
#define UPRINT4(x,y,z,w) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << embree_endl
#if defined(DEBUG) // only report file and line in debug mode
#define THROW_RUNTIME_ERROR(str) \
throw std::runtime_error(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
@@ -315,13 +350,209 @@ __forceinline std::string toString(long long value) {
#define DISABLE_DEPRECATED_WARNING __pragma(warning (disable: 4996)) // warning: function was declared deprecated
#define ENABLE_DEPRECATED_WARNING __pragma(warning (enable : 4996)) // warning: function was declared deprecated
#endif
////////////////////////////////////////////////////////////////////////////////
/// SYCL specific
////////////////////////////////////////////////////////////////////////////////
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
#define sycl_printf0(format, ...) { \
static const CONSTANT char fmt[] = format; \
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true))) \
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
}
#define sycl_printf0_(format) { \
static const CONSTANT char fmt[] = format; \
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true))) \
sycl::ext::oneapi::experimental::printf(fmt); \
}
#else
#define sycl_printf0(format, ...) { \
static const CONSTANT char fmt[] = format; \
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
}
#define sycl_printf0_(format) { \
static const CONSTANT char fmt[] = format; \
sycl::ext::oneapi::experimental::printf(fmt); \
}
#endif
#define sycl_printf(format, ...) { \
static const CONSTANT char fmt[] = format; \
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
}
#define sycl_printf_(format) { \
static const CONSTANT char fmt[] = format; \
sycl::ext::oneapi::experimental::printf(fmt); \
}
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
namespace embree
{
struct sycl_ostream_ {
sycl_ostream_ (bool uniform) : uniform(uniform) {}
bool uniform = false;
};
struct sycl_endl_ {};
#define embree_ostream embree::sycl_ostream_
#define embree_cout embree::sycl_ostream_(false)
#define embree_cout_uniform embree::sycl_ostream_(true)
#define embree_endl embree::sycl_endl_()
inline sycl_ostream_ operator <<(sycl_ostream_ cout, int i)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%i",i);
}
else
sycl_printf("%i ",i);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, unsigned int i)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%u",i);
} else
sycl_printf("%u ",i);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, float f)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%f",f);
} else
sycl_printf("%f ",f);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, double d)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%f",d);
} else
sycl_printf("%f ",d);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, uint64_t l)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%lu",l);
} else
sycl_printf("%lu ",l);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, long l)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%l",l);
} else
sycl_printf("%l ",l);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, void* p)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%p",p);
} else
sycl_printf("%p ",p);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, const char* c)
{
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%s",c);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, sycl_endl_)
{
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf_("\n");
return cout;
}
}
#else
/* embree output stream */
#define embree_ostream std::ostream&
#define embree_cout std::cout
#define embree_cout_uniform std::cout
#define embree_endl std::endl
#endif
#if defined(EMBREE_SYCL_SUPPORT)
/* printing out sycle vector types */
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::float4& v) {
return out << "(" << v.x() << "," << v.y() << "," << v.z() << "," << v.w() << ")";
}
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::float3& v) {
return out << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
}
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::float2& v) {
return out << "(" << v.x() << "," << v.y() << ")";
}
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::int4& v) {
return out << "(" << v.x() << "," << v.y() << "," << v.z() << "," << v.w() << ")";
}
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::int3& v) {
return out << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
}
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::int2& v) {
return out << "(" << v.x() << "," << v.y() << ")";
}
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::uint4& v) {
return out << "(" << v.x() << "," << v.y() << "," << v.z() << "," << v.w() << ")";
}
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::uint3& v) {
return out << "(" << v.x() << "," << v.y() << "," << v.z() << ")";
}
__forceinline embree_ostream operator<<(embree_ostream out, const sycl::uint2& v) {
return out << "(" << v.x() << "," << v.y() << ")";
}
#endif
inline void tab(std::ostream& cout, int n) {
for (int i=0; i<n; i++) cout << " ";
}
inline std::string tab(int depth) {
return std::string(2*depth,' ');
}
////////////////////////////////////////////////////////////////////////////////
/// Some macros for static profiling
////////////////////////////////////////////////////////////////////////////////
+314
View File
@@ -0,0 +1,314 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "platform.h"
using sycl::float16;
using sycl::float8;
using sycl::float4;
using sycl::float3;
using sycl::float2;
using sycl::int16;
using sycl::int8;
using sycl::int4;
using sycl::int3;
using sycl::int2;
using sycl::uint16;
using sycl::uint8;
using sycl::uint4;
using sycl::uint3;
using sycl::uint2;
using sycl::uchar16;
using sycl::uchar8;
using sycl::uchar4;
using sycl::uchar3;
using sycl::uchar2;
using sycl::ushort16;
using sycl::ushort8;
using sycl::ushort4;
using sycl::ushort3;
using sycl::ushort2;
#ifdef __SYCL_DEVICE_ONLY__
#define GLOBAL __attribute__((opencl_global))
#define LOCAL __attribute__((opencl_local))
SYCL_EXTERNAL extern int work_group_reduce_add(int x);
SYCL_EXTERNAL extern float work_group_reduce_min(float x);
SYCL_EXTERNAL extern float work_group_reduce_max(float x);
SYCL_EXTERNAL extern float atomic_min(volatile GLOBAL float *p, float val);
SYCL_EXTERNAL extern float atomic_min(volatile LOCAL float *p, float val);
SYCL_EXTERNAL extern float atomic_max(volatile GLOBAL float *p, float val);
SYCL_EXTERNAL extern float atomic_max(volatile LOCAL float *p, float val);
SYCL_EXTERNAL extern "C" unsigned int intel_sub_group_ballot(bool valid);
SYCL_EXTERNAL extern "C" void __builtin_IB_assume_uniform(void *p);
// Load message caching control
enum LSC_LDCC {
LSC_LDCC_DEFAULT,
LSC_LDCC_L1UC_L3UC, // Override to L1 uncached and L3 uncached
LSC_LDCC_L1UC_L3C, // Override to L1 uncached and L3 cached
LSC_LDCC_L1C_L3UC, // Override to L1 cached and L3 uncached
LSC_LDCC_L1C_L3C, // Override to L1 cached and L3 cached
LSC_LDCC_L1S_L3UC, // Override to L1 streaming load and L3 uncached
LSC_LDCC_L1S_L3C, // Override to L1 streaming load and L3 cached
LSC_LDCC_L1IAR_L3C, // Override to L1 invalidate-after-read, and L3 cached
};
// Store message caching control (also used for atomics)
enum LSC_STCC {
LSC_STCC_DEFAULT,
LSC_STCC_L1UC_L3UC, // Override to L1 uncached and L3 uncached
LSC_STCC_L1UC_L3WB, // Override to L1 uncached and L3 written back
LSC_STCC_L1WT_L3UC, // Override to L1 written through and L3 uncached
LSC_STCC_L1WT_L3WB, // Override to L1 written through and L3 written back
LSC_STCC_L1S_L3UC, // Override to L1 streaming and L3 uncached
LSC_STCC_L1S_L3WB, // Override to L1 streaming and L3 written back
LSC_STCC_L1WB_L3WB, // Override to L1 written through and L3 written back
};
///////////////////////////////////////////////////////////////////////
// LSC Loads
///////////////////////////////////////////////////////////////////////
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_uchar_to_uint (const GLOBAL uint8_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D8U32
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_ushort_to_uint(const GLOBAL uint16_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D16U32
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_uint (const GLOBAL uint32_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V1
SYCL_EXTERNAL /* extern "C" */ sycl::uint2 __builtin_IB_lsc_load_global_uint2 (const GLOBAL sycl::uint2 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V2
SYCL_EXTERNAL /* extern "C" */ sycl::uint3 __builtin_IB_lsc_load_global_uint3 (const GLOBAL sycl::uint3 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V3
SYCL_EXTERNAL /* extern "C" */ sycl::uint4 __builtin_IB_lsc_load_global_uint4 (const GLOBAL sycl::uint4 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V4
SYCL_EXTERNAL /* extern "C" */ sycl::uint8 __builtin_IB_lsc_load_global_uint8 (const GLOBAL sycl::uint8 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V8
SYCL_EXTERNAL /* extern "C" */ uint64_t __builtin_IB_lsc_load_global_ulong (const GLOBAL uint64_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V1
SYCL_EXTERNAL /* extern "C" */ sycl::ulong2 __builtin_IB_lsc_load_global_ulong2 (const GLOBAL sycl::ulong2 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V2
SYCL_EXTERNAL /* extern "C" */ sycl::ulong3 __builtin_IB_lsc_load_global_ulong3 (const GLOBAL sycl::ulong3 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V3
SYCL_EXTERNAL /* extern "C" */ sycl::ulong4 __builtin_IB_lsc_load_global_ulong4 (const GLOBAL sycl::ulong4 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V4
SYCL_EXTERNAL /* extern "C" */ sycl::ulong8 __builtin_IB_lsc_load_global_ulong8 (const GLOBAL sycl::ulong8 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V8
// global address space
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uchar_from_uint (GLOBAL uint8_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D8U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ushort_from_uint(GLOBAL uint16_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D16U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint (GLOBAL uint32_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D32V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint2 (GLOBAL sycl::uint2 *base, int immElemOff, sycl::uint2 val, enum LSC_STCC cacheOpt); //D32V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint3 (GLOBAL sycl::uint3 *base, int immElemOff, sycl::uint3 val, enum LSC_STCC cacheOpt); //D32V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint4 (GLOBAL sycl::uint4 *base, int immElemOff, sycl::uint4 val, enum LSC_STCC cacheOpt); //D32V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint8 (GLOBAL sycl::uint8 *base, int immElemOff, sycl::uint8 val, enum LSC_STCC cacheOpt); //D32V8
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong (GLOBAL uint64_t *base, int immElemOff, uint64_t val, enum LSC_STCC cacheOpt); //D64V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong2 (GLOBAL sycl::ulong2 *base, int immElemOff, sycl::ulong2 val, enum LSC_STCC cacheOpt); //D64V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong3 (GLOBAL sycl::ulong3 *base, int immElemOff, sycl::ulong3 val, enum LSC_STCC cacheOpt); //D64V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong4 (GLOBAL sycl::ulong4 *base, int immElemOff, sycl::ulong4 val, enum LSC_STCC cacheOpt); //D64V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong8 (GLOBAL sycl::ulong8 *base, int immElemOff, sycl::ulong8 val, enum LSC_STCC cacheOpt); //D64V8
///////////////////////////////////////////////////////////////////////
// prefetching
///////////////////////////////////////////////////////////////////////
//
// LSC Pre-Fetch Load functions with CacheControls
// global address space
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uchar (const GLOBAL uint8_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D8U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ushort(const GLOBAL uint16_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D16U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint (const GLOBAL uint32_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint2 (const GLOBAL sycl::uint2 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint3 (const GLOBAL sycl::uint3 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint4 (const GLOBAL sycl::uint4 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint8 (const GLOBAL sycl::uint8 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V8
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong (const GLOBAL uint64_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong2(const GLOBAL sycl::ulong2 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong3(const GLOBAL sycl::ulong3 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong4(const GLOBAL sycl::ulong4 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong8(const GLOBAL sycl::ulong8 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V8
#else
#define GLOBAL
#define LOCAL
/* dummy functions for host */
inline int work_group_reduce_add(int x) { return x; }
inline float work_group_reduce_min(float x) { return x; }
inline float work_group_reduce_max(float x) { return x; }
inline float atomic_min(volatile float *p, float val) { return val; };
inline float atomic_max(volatile float *p, float val) { return val; };
inline uint32_t intel_sub_group_ballot(bool valid) { return 0; }
#endif
/* creates a temporary that is enforced to be uniform */
#define SYCL_UNIFORM_VAR(Ty,tmp,k) \
Ty tmp##_data; \
Ty* p##tmp##_data = (Ty*) sub_group_broadcast((uint64_t)&tmp##_data,k); \
Ty& tmp = *p##tmp##_data;
#if !defined(__forceinline)
#define __forceinline inline __attribute__((always_inline))
#endif
#if __SYCL_COMPILER_VERSION < 20210801
#define all_of_group all_of
#define any_of_group any_of
#define none_of_group none_of
#define group_broadcast broadcast
#define reduce_over_group reduce
#define exclusive_scan_over_group exclusive_scan
#define inclusive_scan_over_group inclusive_scan
#endif
namespace embree
{
template<typename T>
__forceinline T cselect(const bool mask, const T &a, const T &b)
{
return sycl::select(b,a,(int)mask);
}
template<typename T, typename M>
__forceinline T cselect(const M &mask, const T &a, const T &b)
{
return sycl::select(b,a,mask);
}
#define XSTR(x) STR(x)
#define STR(x) #x
__forceinline const sycl::sub_group this_sub_group() {
#if __LIBSYCL_MAJOR_VERSION >= 8
return sycl::ext::oneapi::this_work_item::get_sub_group();
#else
return sycl::ext::oneapi::experimental::this_sub_group();
#endif
}
__forceinline const uint32_t get_sub_group_local_id() {
return this_sub_group().get_local_id()[0];
}
__forceinline const uint32_t get_sub_group_size() {
return this_sub_group().get_max_local_range().size();
}
__forceinline const uint32_t get_sub_group_id() {
return this_sub_group().get_group_id()[0];
}
__forceinline const uint32_t get_num_sub_groups() {
return this_sub_group().get_group_range().size();
}
__forceinline uint32_t sub_group_ballot(bool pred) {
return intel_sub_group_ballot(pred);
}
__forceinline bool sub_group_all_of(bool pred) {
return sycl::all_of_group(this_sub_group(),pred);
}
__forceinline bool sub_group_any_of(bool pred) {
return sycl::any_of_group(this_sub_group(),pred);
}
__forceinline bool sub_group_none_of(bool pred) {
return sycl::none_of_group(this_sub_group(),pred);
}
template <typename T> __forceinline T sub_group_broadcast(T x, sycl::id<1> local_id) {
return sycl::group_broadcast<sycl::sub_group>(this_sub_group(),x,local_id);
}
template <typename T> __forceinline T sub_group_make_uniform(T x) {
return sub_group_broadcast(x,sycl::ctz(intel_sub_group_ballot(true)));
}
__forceinline void assume_uniform_array(void* ptr) {
#ifdef __SYCL_DEVICE_ONLY__
__builtin_IB_assume_uniform(ptr);
#endif
}
template <typename T, class BinaryOperation> __forceinline T sub_group_reduce(T x, BinaryOperation binary_op) {
return sycl::reduce_over_group<sycl::sub_group>(this_sub_group(),x,binary_op);
}
template <typename T, class BinaryOperation> __forceinline T sub_group_reduce(T x, T init, BinaryOperation binary_op) {
return sycl::reduce_over_group<sycl::sub_group>(this_sub_group(),x,init,binary_op);
}
template <typename T> __forceinline T sub_group_reduce_min(T x, T init) {
return sub_group_reduce(x, init, sycl::ext::oneapi::minimum<T>());
}
template <typename T> __forceinline T sub_group_reduce_min(T x) {
return sub_group_reduce(x, sycl::ext::oneapi::minimum<T>());
}
template <typename T> __forceinline T sub_group_reduce_max(T x) {
return sub_group_reduce(x, sycl::ext::oneapi::maximum<T>());
}
template <typename T> __forceinline T sub_group_reduce_add(T x) {
return sub_group_reduce(x, sycl::ext::oneapi::plus<T>());
}
template <typename T, class BinaryOperation> __forceinline T sub_group_exclusive_scan(T x, BinaryOperation binary_op) {
return sycl::exclusive_scan_over_group(this_sub_group(),x,binary_op);
}
template <typename T, class BinaryOperation> __forceinline T sub_group_exclusive_scan_min(T x) {
return sub_group_exclusive_scan(x,sycl::ext::oneapi::minimum<T>());
}
template <typename T, class BinaryOperation> __forceinline T sub_group_exclusive_scan(T x, T init, BinaryOperation binary_op) {
return sycl::exclusive_scan_over_group(this_sub_group(),x,init,binary_op);
}
template <typename T, class BinaryOperation> __forceinline T sub_group_inclusive_scan(T x, BinaryOperation binary_op) {
return sycl::inclusive_scan_over_group(this_sub_group(),x,binary_op);
}
template <typename T, class BinaryOperation> __forceinline T sub_group_inclusive_scan(T x, BinaryOperation binary_op, T init) {
return sycl::inclusive_scan_over_group(this_sub_group(),x,binary_op,init);
}
template <typename T> __forceinline T sub_group_shuffle(T x, sycl::id<1> local_id) {
return this_sub_group().shuffle(x, local_id);
}
template <typename T> __forceinline T sub_group_shuffle_down(T x, uint32_t delta) {
return this_sub_group().shuffle_down(x, delta);
}
template <typename T> __forceinline T sub_group_shuffle_up(T x, uint32_t delta) {
return this_sub_group().shuffle_up(x, delta);
}
template <typename T> __forceinline T sub_group_load(const void* src) {
return this_sub_group().load(sycl::multi_ptr<T,sycl::access::address_space::global_space>((T*)src));
}
template <typename T> __forceinline void sub_group_store(void* dst, const T& x) {
this_sub_group().store(sycl::multi_ptr<T,sycl::access::address_space::global_space>((T*)dst),x);
}
}
#if __SYCL_COMPILER_VERSION < 20210801
#undef all_of_group
#undef any_of_group
#undef none_of_group
#undef group_broadcast
#undef reduce_over_group
#undef exclusive_scan_over_group
#undef inclusive_scan_over_group
#endif
+23 -1
View File
@@ -1,9 +1,15 @@
// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#if defined(__INTEL_LLVM_COMPILER)
// prevents "'__thiscall' calling convention is not supported for this target" warning from TBB
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wignored-attributes"
#endif
#include "sysinfo.h"
#include "intrinsics.h"
#include "string.h"
#include "estring.h"
#include "ref.h"
#if defined(__FREEBSD__)
#include <sys/cpuset.h>
@@ -338,6 +344,19 @@ namespace embree
if (cpuid_leaf_7[EBX] & CPU_FEATURE_BIT_AVX512VL ) cpu_features |= CPU_FEATURE_AVX512VL;
if (cpuid_leaf_7[ECX] & CPU_FEATURE_BIT_AVX512VBMI) cpu_features |= CPU_FEATURE_AVX512VBMI;
#if defined(__MACOSX__)
if ( (cpu_features & CPU_FEATURE_AVX512F)
|| (cpu_features & CPU_FEATURE_AVX512DQ)
|| (cpu_features & CPU_FEATURE_AVX512CD)
|| (cpu_features & CPU_FEATURE_AVX512BW)
|| (cpu_features & CPU_FEATURE_AVX512VL) )
{
// on macOS AVX512 will be enabled automatically by the kernel when the first AVX512 instruction is called
// see https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L176
// therefore we ignore the state of XCR0
cpu_features |= CPU_FEATURE_ZMM_ENABLED;
}
#endif
return cpu_features;
#elif defined(__ARM_NEON) || defined(__EMSCRIPTEN__)
@@ -696,3 +715,6 @@ namespace embree
}
#endif
#if defined(__INTEL_LLVM_COMPILER)
#pragma clang diagnostic pop
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
#include "thread.h"
#include "sysinfo.h"
#include "string.h"
#include "estring.h"
#include <iostream>
#if defined(__ARM_NEON)
+21 -1
View File
@@ -8,6 +8,8 @@
namespace embree
{
class Device;
template<typename T, typename allocator>
class vector_t
{
@@ -25,6 +27,12 @@ namespace embree
template<typename M>
__forceinline explicit vector_t (M alloc, size_t sz)
: alloc(alloc), size_active(0), size_alloced(0), items(nullptr) { internal_resize_init(sz); }
__forceinline vector_t (Device* alloc)
: vector_t(alloc,0) {}
__forceinline vector_t(void* data, size_t bytes)
: size_active(0), size_alloced(bytes/sizeof(T)), items((T*)data) {}
__forceinline ~vector_t() {
clear();
@@ -65,6 +73,10 @@ namespace embree
return *this;
}
__forceinline allocator& getAlloc() {
return alloc;
}
/********************** Iterators ****************************/
__forceinline iterator begin() { return items; };
@@ -215,6 +227,10 @@ namespace embree
if (new_alloced <= size_alloced)
return size_alloced;
/* if current size is 0 allocate exact requested size */
if (size_alloced == 0)
return new_alloced;
/* resize to next power of 2 otherwise */
size_t new_size_alloced = size_alloced;
while (new_size_alloced < new_alloced) {
@@ -237,8 +253,12 @@ namespace embree
/*! vector class that performs aligned allocations */
template<typename T>
using avector = vector_t<T,aligned_allocator<T,std::alignment_of<T>::value> >;
/*! vector class that performs OS allocations */
template<typename T>
using ovector = vector_t<T,os_allocator<T> >;
/*! vector class with externally managed data buffer */
template<typename T>
using evector = vector_t<T,no_allocator<T>>;
}
+12 -3
View File
@@ -20,18 +20,27 @@ ELSEIF (TASKING_TBB)
TARGET_LINK_LIBRARIES(tasking PUBLIC TBB::${EMBREE_TBB_COMPONENT})
else()
# Try getting TBB via config first
find_package(TBB 2021 COMPONENTS ${EMBREE_TBB_COMPONENT} CONFIG ${TBB_FIND_PACKAGE_OPTION})
find_package(TBB 2020 COMPONENTS ${EMBREE_TBB_COMPONENT} CONFIG ${TBB_FIND_PACKAGE_OPTION})
if (TBB_FOUND)
TARGET_LINK_LIBRARIES(tasking PUBLIC TBB::${EMBREE_TBB_COMPONENT})
message("-- Found TBB: ${TBB_VERSION} at ${TBB_DIR} via TBBConfig.cmake")
else()
# If not found try getting older TBB via module (FindTBB.cmake)
message("-- Using FindTBB.cmake ")
unset(TBB_DIR CACHE)
find_package(TBB 4.1 REQUIRED ${EMBREE_TBB_COMPONENT})
if (TBB_FOUND)
TARGET_LINK_LIBRARIES(tasking PUBLIC TBB)
TARGET_INCLUDE_DIRECTORIES(tasking PUBLIC "${TBB_INCLUDE_DIRS}")
endif()
TARGET_INCLUDE_DIRECTORIES(tasking PUBLIC $<BUILD_INTERFACE:${TBB_INCLUDE_DIRS}>)
IF (EMBREE_STATIC_LIB)
INSTALL(TARGETS TBB EXPORT TBB-targets)
INSTALL(EXPORT TBB-targets DESTINATION ${EMBREE_CMAKEEXPORT_DIR} COMPONENT devel)
ENDIF()
endif()
if (NOT TBB_FOUND)
message("-- Not found TBB")
endif()
+1 -1
View File
@@ -3,7 +3,7 @@
#pragma once
#if defined(TASKING_INTERNAL)
#if defined(TASKING_INTERNAL) && !defined(TASKING_TBB)
# include "taskschedulerinternal.h"
#elif defined(TASKING_TBB)
# include "taskschedulertbb.h"
+13 -17
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
#include "taskschedulerinternal.h"
#include "../math/math.h"
#include "../math/emath.h"
#include "../sys/sysinfo.h"
#include <algorithm>
@@ -49,11 +49,11 @@ namespace embree
Task* prevTask = thread.task;
thread.task = this;
try {
if (thread.scheduler->cancellingException == nullptr)
if (context->cancellingException == nullptr)
closure->execute();
} catch (...) {
if (thread.scheduler->cancellingException == nullptr)
thread.scheduler->cancellingException = std::current_exception();
if (context->cancellingException == nullptr)
context->cancellingException = std::current_exception();
}
thread.task = prevTask;
add_dependencies(-1);
@@ -150,7 +150,8 @@ namespace embree
{
Lock<MutexSys> lock(g_mutex);
assert(newNumThreads);
newNumThreads = min(newNumThreads, (size_t) getNumberOfLogicalThreads());
if (newNumThreads == std::numeric_limits<size_t>::max())
newNumThreads = (size_t) getNumberOfLogicalThreads();
numThreads = newNumThreads;
if (!startThreads && !running) return;
@@ -230,7 +231,8 @@ namespace embree
TaskScheduler::TaskScheduler()
: threadCounter(0), anyTasksRunning(0), hasRootTask(false)
{
threadLocal.resize(2*getNumberOfLogicalThreads()); // FIXME: this has to be 2x as in the compatibility join mode with rtcCommitScene the worker threads also join. When disallowing rtcCommitScene to join a build we can remove the 2x.
assert(threadPool);
threadLocal.resize(2 * TaskScheduler::threadCount()); // FIXME: this has to be 2x as in the compatibility join mode with rtcCommitScene the worker threads also join. When disallowing rtcCommitScene to join a build we can remove the 2x.
for (size_t i=0; i<threadLocal.size(); i++)
threadLocal[i].store(nullptr);
}
@@ -291,8 +293,7 @@ namespace embree
size_t threadIndex = allocThreadIndex();
condition.wait(mutex, [&] () { return hasRootTask.load(); });
mutex.unlock();
std::exception_ptr except = thread_loop(threadIndex);
if (except != nullptr) std::rethrow_exception(except);
thread_loop(threadIndex);
}
void TaskScheduler::reset() {
@@ -316,15 +317,15 @@ namespace embree
return old;
}
dll_export bool TaskScheduler::wait()
dll_export void TaskScheduler::wait()
{
Thread* thread = TaskScheduler::thread();
if (thread == nullptr) return true;
if (thread == nullptr)
return;
while (thread->tasks.execute_local_internal(*thread,thread->task)) {};
return thread->scheduler->cancellingException == nullptr;
}
std::exception_ptr TaskScheduler::thread_loop(size_t threadIndex)
void TaskScheduler::thread_loop(size_t threadIndex)
{
/* allocate thread structure */
std::unique_ptr<Thread> mthread(new Thread(threadIndex,this)); // too large for stack allocation
@@ -346,10 +347,6 @@ namespace embree
threadLocal[threadIndex].store(nullptr);
swapThread(oldThread);
/* remember exception to throw */
std::exception_ptr except = nullptr;
if (cancellingException != nullptr) except = cancellingException;
/* wait for all threads to terminate */
threadCounter--;
#if defined(__WIN32__)
@@ -367,7 +364,6 @@ namespace embree
yield();
#endif
}
return except;
}
bool TaskScheduler::steal_from_other_threads(Thread& thread)
+40 -32
View File
@@ -12,7 +12,7 @@
#include "../sys/ref.h"
#include "../sys/atomic.h"
#include "../math/range.h"
#include "../../include/embree3/rtcore.h"
#include "../../include/embree4/rtcore.h"
#include <list>
@@ -38,6 +38,13 @@ namespace embree
virtual void execute() = 0;
};
struct TaskGroupContext {
TaskGroupContext() : cancellingException(nullptr) {}
std::exception_ptr cancellingException;
};
/*! builds a task interface from a closure */
template<typename Closure>
struct ClosureTaskFunction : public TaskFunction
@@ -76,16 +83,16 @@ namespace embree
: state(DONE) {}
/*! construction of new task */
__forceinline Task (TaskFunction* closure, Task* parent, size_t stackPtr, size_t N)
: dependencies(1), stealable(true), closure(closure), parent(parent), stackPtr(stackPtr), N(N)
__forceinline Task (TaskFunction* closure, Task* parent, TaskGroupContext* context, size_t stackPtr, size_t N)
: dependencies(1), stealable(true), closure(closure), parent(parent), context(context), stackPtr(stackPtr), N(N)
{
if (parent) parent->add_dependencies(+1);
switch_state(DONE,INITIALIZED);
}
/*! construction of stolen task, stealing thread will decrement initial dependency */
__forceinline Task (TaskFunction* closure, Task* parent)
: dependencies(1), stealable(false), closure(closure), parent(parent), stackPtr(-1), N(1)
__forceinline Task (TaskFunction* closure, Task* parent, TaskGroupContext* context)
: dependencies(1), stealable(false), closure(closure), parent(parent), context(context), stackPtr(-1), N(1)
{
switch_state(DONE,INITIALIZED);
}
@@ -95,7 +102,7 @@ namespace embree
{
if (!stealable) return false;
if (!try_switch_state(INITIALIZED,DONE)) return false;
new (&child) Task(closure, this);
new (&child) Task(closure, this, context);
return true;
}
@@ -110,6 +117,7 @@ namespace embree
std::atomic<bool> stealable; //!< true if task can be stolen
TaskFunction* closure; //!< the closure to execute
Task* parent; //!< parent task to signal when we are finished
TaskGroupContext* context;
size_t stackPtr; //!< stack location where closure is stored
size_t N; //!< approximative size of task
};
@@ -129,7 +137,7 @@ namespace embree
}
template<typename Closure>
__forceinline void push_right(Thread& thread, const size_t size, const Closure& closure)
__forceinline void push_right(Thread& thread, const size_t size, const Closure& closure, TaskGroupContext* context)
{
if (right >= TASK_STACK_SIZE)
throw std::runtime_error("task stack overflow");
@@ -137,7 +145,7 @@ namespace embree
/* allocate new task on right side of stack */
size_t oldStackPtr = stackPtr;
TaskFunction* func = new (alloc(sizeof(ClosureTaskFunction<Closure>))) ClosureTaskFunction<Closure>(closure);
new (&(tasks[right.load()])) Task(func,thread.task,oldStackPtr,size);
new (&tasks[right.load()]) Task(func,thread.task,context,oldStackPtr,size);
right++;
/* also move left pointer */
@@ -172,7 +180,7 @@ namespace embree
: threadIndex(threadIndex), task(nullptr), scheduler(scheduler) {}
__forceinline size_t threadCount() {
return scheduler->threadCounter;
return scheduler->threadCounter;
}
size_t threadIndex; //!< ID of this thread
@@ -238,7 +246,7 @@ namespace embree
void wait_for_threads(size_t threadCount);
/*! thread loop for all worker threads */
std::exception_ptr thread_loop(size_t threadIndex);
void thread_loop(size_t threadIndex);
/*! steals a task from a different thread */
bool steal_from_other_threads(Thread& thread);
@@ -248,7 +256,7 @@ namespace embree
/* spawn a new task at the top of the threads task stack */
template<typename Closure>
void spawn_root(const Closure& closure, size_t size = 1, bool useThreadPool = true)
void spawn_root(const Closure& closure, TaskGroupContext* context, size_t size = 1, bool useThreadPool = true)
{
if (useThreadPool) startThreads();
@@ -258,7 +266,7 @@ namespace embree
assert(threadLocal[threadIndex].load() == nullptr);
threadLocal[threadIndex] = &thread;
Thread* oldThread = swapThread(&thread);
thread.tasks.push_right(thread,size,closure);
thread.tasks.push_right(thread,size,closure,context);
{
Lock<MutexSys> lock(mutex);
anyTasksRunning++;
@@ -277,51 +285,52 @@ namespace embree
/* remember exception to throw */
std::exception_ptr except = nullptr;
if (cancellingException != nullptr) except = cancellingException;
if (context->cancellingException != nullptr) except = context->cancellingException;
/* wait for all threads to terminate */
threadCounter--;
while (threadCounter > 0) yield();
cancellingException = nullptr;
context->cancellingException = nullptr;
/* re-throw proper exception */
if (except != nullptr)
if (except != nullptr) {
std::rethrow_exception(except);
}
}
/* spawn a new task at the top of the threads task stack */
template<typename Closure>
static __forceinline void spawn(size_t size, const Closure& closure)
static __forceinline void spawn(size_t size, const Closure& closure, TaskGroupContext* context)
{
Thread* thread = TaskScheduler::thread();
if (likely(thread != nullptr)) thread->tasks.push_right(*thread,size,closure);
else instance()->spawn_root(closure,size);
if (likely(thread != nullptr)) thread->tasks.push_right(*thread,size,closure,context);
else instance()->spawn_root(closure,context,size);
}
/* spawn a new task at the top of the threads task stack */
template<typename Closure>
static __forceinline void spawn(const Closure& closure) {
spawn(1,closure);
static __forceinline void spawn(const Closure& closure, TaskGroupContext* taskGroupContext) {
spawn(1,closure,taskGroupContext);
}
/* spawn a new task set */
template<typename Index, typename Closure>
static void spawn(const Index begin, const Index end, const Index blockSize, const Closure& closure)
static void spawn(const Index begin, const Index end, const Index blockSize, const Closure& closure, TaskGroupContext* context)
{
spawn(end-begin, [=]()
{
if (end-begin <= blockSize) {
return closure(range<Index>(begin,end));
}
const Index center = (begin+end)/2;
spawn(begin,center,blockSize,closure);
spawn(center,end ,blockSize,closure);
wait();
});
{
if (end-begin <= blockSize) {
return closure(range<Index>(begin,end));
}
const Index center = (begin+end)/2;
spawn(begin,center,blockSize,closure,context);
spawn(center,end ,blockSize,closure,context);
wait();
},context);
}
/* work on spawned subtasks and wait until all have finished */
dll_export static bool wait();
dll_export static void wait();
/* returns the ID of the current thread */
dll_export static size_t threadID();
@@ -357,7 +366,6 @@ namespace embree
std::atomic<size_t> threadCounter;
std::atomic<size_t> anyTasksRunning;
std::atomic<bool> hasRootTask;
std::exception_ptr cancellingException;
MutexSys mutex;
ConditionSys condition;
+22
View File
@@ -15,6 +15,12 @@
# define NOMINMAX
#endif
#if defined(__INTEL_LLVM_COMPILER)
// prevents "'__thiscall' calling convention is not supported for this target" warning from TBB
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wignored-attributes"
#endif
// We need to define these to avoid implicit linkage against
// tbb_debug.lib under Windows. When removing these lines debug build
// under Windows fails.
@@ -25,6 +31,18 @@
#include "tbb/tbb.h"
#include "tbb/parallel_sort.h"
#if defined(TASKING_TBB) && (TBB_INTERFACE_VERSION_MAJOR >= 8)
# define USE_TASK_ARENA 1
#else
# define USE_TASK_ARENA 0
#endif
#if defined(TASKING_TBB) && (TBB_INTERFACE_VERSION >= 11009) // TBB 2019 Update 9
# define TASKING_TBB_USE_TASK_ISOLATION 1
#else
# define TASKING_TBB_USE_TASK_ISOLATION 0
#endif
namespace embree
{
struct TaskScheduler
@@ -65,3 +83,7 @@ namespace embree
};
};
#if defined(__INTEL_LLVM_COMPILER)
#pragma clang diagnostic pop
#endif
+1
View File
@@ -12,6 +12,7 @@ endif()
string(REGEX REPLACE "\n$" "" intelstyle_url "${intelstyle_url}")
string(REPLACE "embree" "intelstyle" intelstyle_url "${intelstyle_url}")
string(REPLACE "libraries" "documentation" intelstyle_url "${intelstyle_url}")
message(STATUS "Fetch intelstyle repository ${intelstyle_url}")
include(FetchContent)
+5 -5
View File
@@ -1,7 +1,7 @@
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
images_jpg := $(addprefix images/, $(addsuffix .jpg, displacement_geometry instanced_geometry pathtracer dynamic_scene subdivision_geometry user_geometry hair_geometry intersection_filter triangle_geometry viewer viewer_stream interpolation motion_blur_geometry curve_geometry voronoi closest_point multi_level_instancing point_geometry grid_geometry quaternion_motion_blur collide))
images_jpg := $(addprefix images/, $(addsuffix .jpg, displacement_geometry instanced_geometry pathtracer dynamic_scene subdivision_geometry user_geometry hair_geometry intersection_filter triangle_geometry viewer interpolation motion_blur_geometry curve_geometry voronoi closest_point multi_level_instancing point_geometry grid_geometry quaternion_motion_blur collide))
images_png := $(addprefix images/, $(addsuffix .png, quad_uv triangle_uv half_edges))
images_pdf := $(addprefix images/, $(addsuffix .pdf, quad_uv triangle_uv half_edges))
@@ -10,7 +10,7 @@ webimages := $(addprefix www/, $(images_jpg))
docfiles := $(addprefix doc/, README.md CHANGELOG.md readme.pdf)
spec := embree-spec.rst
man_src := $(wildcard src/api/*.md)
manfiles := $(patsubst src/api/%.md,man/man3/%.3embree3,$(man_src))
manfiles := $(patsubst src/api/%.md,man/man3/%.4embree4,$(man_src))
all: www images man doc spec
www: $(webpages) $(webimages)
@@ -27,9 +27,9 @@ PANDOC := pandoc
### add version
########################################################################
tmp/version: ../include/embree3/rtcore_config.h
tmp/version: ../include/embree4/rtcore_config.h
sed -n 's/#define RTC_VERSION_STRING \"\(.*\)\".*/\1/p' $< > $@
tmp/version_major: ../include/embree3/rtcore_config.h
tmp/version_major: ../include/embree4/rtcore_config.h
sed -n 's/#define RTC_VERSION_MAJOR \([0-9]\)/\1/p' $< > $@
replace_version = sed -e "s/<EMBREE_VERSION>/`cat tmp/version`/g" $< | sed -e "s/<EMBREE_VERSION_MAJOR>/`cat tmp/version_major`/g" > $@
@@ -175,7 +175,7 @@ doc/readme.pdf: tmp/readme.tex tmp/readme_all.tex $(images_jpg) $(images_pdf)
### manpages
########################################################################
man/man3/%.3embree3: src/api/%.md
man/man3/%.4embree4: src/api/%.md
$(PANDOC) -s -t man $< -o $@
########################################################################
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 94 KiB

+88 -34
View File
@@ -3,6 +3,26 @@
```
\pagebreak
## rtcNewSYCLDevice
``` {include=src/api/rtcNewSYCLDevice.md}
```
\pagebreak
## rtcIsSYCLDeviceSupported
``` {include=src/api/rtcIsSYCLDeviceSupported.md}
```
\pagebreak
## rtcSYCLDeviceSelector
``` {include=src/api/rtcSYCLDeviceSelector.md}
```
\pagebreak
## rtcSetDeviceSYCLDevice
``` {include=src/api/rtcSetDeviceSYCLDevice.md}
```
\pagebreak
## rtcRetainDevice
``` {include=src/api/rtcRetainDevice.md}
```
@@ -164,6 +184,11 @@
```
\pagebreak
## RTC_GEOMETRY_TYPE_INSTANCE_ARRAY
``` {include=src/api/RTC_GEOMETRY_TYPE_INSTANCE_ARRAY.md}
```
\pagebreak
## RTCCurveFlags
``` {include=src/api/RTCCurveFlags.md}
```
@@ -219,6 +244,11 @@
```
\pagebreak
## rtcSetGeometryMaxRadiusScale
``` {include=src/api/rtcSetGeometryMaxRadiusScale.md}
```
\pagebreak
## rtcSetGeometryBuffer
``` {include=src/api/rtcSetGeometryBuffer.md}
```
@@ -264,13 +294,18 @@
```
\pagebreak
## rtcFilterIntersection
``` {include=src/api/rtcFilterIntersection.md}
## rtcSetGeometryEnableFilterFunctionFromArguments
``` {include=src/api/rtcSetGeometryEnableFilterFunctionFromArguments.md}
```
\pagebreak
## rtcFilterOcclusion
``` {include=src/api/rtcFilterOcclusion.md}
## rtcInvokeIntersectFilterFromGeometry
``` {include=src/api/rtcInvokeIntersectFilterFromGeometry.md}
```
\pagebreak
## rtcInvokeOccludedFilterFromGeometry
``` {include=src/api/rtcInvokeOccludedFilterFromGeometry.md}
```
\pagebreak
@@ -284,6 +319,10 @@
```
\pagebreak
## rtcGetGeometryUserDataFromScene
``` {include=src/api/rtcGetGeometryUserDataFromScene.md}
```
\pagebreak
## rtcSetGeometryUserPrimitiveCount
``` {include=src/api/rtcSetGeometryUserPrimitiveCount.md}
@@ -310,11 +349,22 @@
```
\pagebreak
## rtcGetSYCLDeviceFunctionPointer
``` {include=src/api/rtcGetSYCLDeviceFunctionPointer.md}
```
\pagebreak
## rtcSetGeometryInstancedScene
``` {include=src/api/rtcSetGeometryInstancedScene.md}
```
\pagebreak
## rtcSetGeometryInstancedScenes
``` {include=src/api/rtcSetGeometryInstancedScenes.md}
```
\pagebreak
## rtcSetGeometryTransform
``` {include=src/api/rtcSetGeometryTransform.md}
```
@@ -330,6 +380,15 @@
```
\pagebreak
## rtcGetGeometryTransformEx
``` {include=src/api/rtcGetGeometryTransformEx.md}
```
\pagebreak
## rtcGetGeometryTransformFromScene
``` {include=src/api/rtcGetGeometryTransformFromScene.md}
```
\pagebreak
## rtcSetGeometryTessellationRate
``` {include=src/api/rtcSetGeometryTessellationRate.md}
@@ -447,8 +506,23 @@
```
\pagebreak
## rtcInitIntersectContext
``` {include=src/api/rtcInitIntersectContext.md}
## RTCFeatureFlags
``` {include=src/api/RTCFeatureFlags.md}
```
\pagebreak
## rtcInitIntersectArguments
``` {include=src/api/rtcInitIntersectArguments.md}
```
\pagebreak
## rtcInitOccludedArguments
``` {include=src/api/rtcInitOccludedArguments.md}
```
\pagebreak
## rtcInitRayQueryContext
``` {include=src/api/rtcInitRayQueryContext.md}
```
\pagebreak
@@ -472,43 +546,23 @@
```
\pagebreak
## rtcIntersect1M
``` {include=src/api/rtcIntersect1M.md}
## rtcForwardIntersect1
``` {include=src/api/rtcForwardIntersect1.md}
```
\pagebreak
## rtcOccluded1M
``` {include=src/api/rtcOccluded1M.md}
## rtcForwardOccluded1
``` {include=src/api/rtcForwardOccluded1.md}
```
\pagebreak
## rtcIntersect1Mp
``` {include=src/api/rtcIntersect1Mp.md}
## rtcForwardIntersect4/8/16
``` {include=src/api/rtcForwardIntersect4.md}
```
\pagebreak
## rtcOccluded1Mp
``` {include=src/api/rtcOccluded1Mp.md}
```
\pagebreak
## rtcIntersectNM
``` {include=src/api/rtcIntersectNM.md}
```
\pagebreak
## rtcOccludedNM
``` {include=src/api/rtcOccludedNM.md}
```
\pagebreak
## rtcIntersectNp
``` {include=src/api/rtcIntersectNp.md}
```
\pagebreak
## rtcOccludedNp
``` {include=src/api/rtcOccludedNp.md}
## rtcForwardOccluded4/8/16
``` {include=src/api/rtcForwardOccluded4.md}
```
\pagebreak
+423 -277
View File
@@ -4,299 +4,343 @@ Embree API
``` {include=src/intro.md}
```
Upgrading from Embree 2 to Embree 3
Embree SYCL API
===============
Embree supports ray tracing on Intel GPUs by using the SYCL
programming language. SYCL is a Khronos standardized C++ based
language for single source heterogenous programming for
acceleration offload, see the [SYCL
webpage](https://www.khronos.org/sycl/) for details.
The Embree SYCL API is designed for photorealistic rendering use
cases, where scene setup is performed on the host, and rendering on
the device. The Embree SYCL API is very similar to the standard Embree
C99 API, and supports most of its features, such as all triangle-type
geometries, all curve types and basis functions, point geometry types,
user geometries, filter callbacks, multi-level instancing, and motion
blur.
To enable SYCL support you have to include the
`sycl.hpp` file before the Embree API headers:
#include <sycl/sycl.hpp>
#include <embree4/rtcore.h>
Next you need to initializes an Embree SYCL device using the
`rtcNewSYCLDevice` API function by providing a SYCL context.
Embree provides the `rtcIsSYCLDeviceSupported` API function to check
if some SYCL device is supported by Embree. You can also use the
`rtcSYCLDeviceSelector` to conveniently select the first SYCL device that
is supported by Embree, e.g.:
sycl::device device(rtcSYCLDeviceSelector);
sycl::queue queue(device, exception_handler);
sycl::context context(device);
RTCDevice device = rtcNewSYCLDevice(context,"");
Scenes created with an Embree SYCL device can only get used to trace
rays using SYCL on the GPU, it is not possible to trace rays on the
CPU with such a device. To render on the CPU and GPU in parallel, the
user has to create a second Embree device and create a second
scene to be used on the CPU.
Files containing SYCL code, have to get compiled with the Intel®
oneAPI DPC++ compiler. Please see section [Linux SYCL Compilation] and
[Windows SYCL Compilation] for supported compilers. The DPC++ compiler
performs a two-phase compilation, where host code is compiled in a
first phase, and device code compiled in a second compilation phase.
Standard Embree API functions for scene construction can get used on
the host but not the device. Data buffers that are shared with Embree
(e.g. for vertex of index buffers) have to get allocated as SYCL
unified shared memory (USM memory), using the `sycl::malloc` or
`sycl::aligned_alloc` calls with `sycl::usm::alloc::shared` property,
or the sycl::aligned_alloc_shared call, e.g:
void* ptr = sycl::aligned_alloc(16, bytes, queue, sycl::usm::alloc::shared);
These shared allocations have to be valid during rendering, as Embree
may access contained data when tracing rays. Embree does not support
device-only memory allocations, as the BVH builder implemented on the
CPU relies on reading the data buffers.
Device side rendering can get invoked by submitting a SYCL
`parallel_for` to the SYCL queue:
const sycl::specialization_id<RTCFeatureFlags> feature_mask;
RTCFeatureFlags required_features = RTC_FEATURE_FLAG_TRIANGLE;
queue.submit([=](sycl::handler& cgh)
{
cgh.set_specialization_constant<feature_mask>(required_features);
cgh.parallel_for(sycl::range<1>(1),[=](sycl::id<1> item, sycl::kernel_handler kh)
{
RTCIntersectArguments args;
rtcInitIntersectArguments(&args);
const RTCFeatureFlags features = kh.get_specialization_constant<feature_mask>();
args.feature_mask = features;
struct RTCRayHit rayhit;
rayhit.ray.org_x = ox;
rayhit.ray.org_y = oy;
rayhit.ray.org_z = oz;
rayhit.ray.dir_x = dx;
rayhit.ray.dir_y = dy;
rayhit.ray.dir_z = dz;
rayhit.ray.tnear = 0;
rayhit.ray.tfar = std::numeric_limits<float>::infinity();
rayhit.ray.mask = -1;
rayhit.ray.flags = 0;
rayhit.hit.geomID = RTC_INVALID_GEOMETRY_ID;
rayhit.hit.instID[0] = RTC_INVALID_GEOMETRY_ID;
rtcIntersect1(scene, &rayhit, &args);
result->geomID = rayhit.hit.geomID;
result->primID = rayhit.hit.primID;
result->tfar = rayhit.ray.tfar;
});
});
queue.wait_and_throw();
This example passes a feature mask using a specialization contant to
the `rtcIntersect1` function, which is recommended for GPU
rendering. For best performance, this feature mask should get used to
enable only features required by the application to render the scene,
e.g. just triangles in this example.
Inside the SYCL `parallel_for` loop you can use rendering related functions,
such as the `rtcIntersect1` and `rtcOccluded1` functions to trace rays,
`rtcForwardIntersect1/Ex` and `rtcForwardOccluded1/Ex` to continue object
traversal from inside a user geometry callback,
and `rtcGetGeometryUserDataFromScene` to get the user data pointer of some
geometry.
Have a look at the [Minimal] tutorial for a minimal SYCL example.
SYCL JIT caching
-----------------
Compile times for just in time compilation (JIT compilation) can be
large. To resolve this issue we recommend enabling persistent JIT
compilation caching inside your application, by setting the
`SYCL_CACHE_PERSISTENT` environment variable to `1`, and the
`SYCL_CACHE_DIR` environment variable to some proper directory where
the JIT cache should get stored. These environment variables have to
get set before the SYCL device is created, e.g:
setenv("SYCL_CACHE_PERSISTENT","1",1);
setenv("SYCL_CACHE_DIR","cache_dir",1);
sycl::device device(rtcSYCLDeviceSelector);
...
SYCL Memory Pooling
--------------------
Memory Pooling is a mechanism where small USM memory allocations are
packed into larger allocation blocks. This mode is required when your
application performs many small USM allocations, as otherwise only a
small fraction of GPU memory is usable and data transfer performance
will be low.
Memory pooling is supported for USM allocations that are read-only by
the device. The following example allocated device read-only memory
with memory pooling support:
sycl::aligned_alloc_shared(align, bytes, queue,
sycl::ext::oneapi::property::usm::device_read_only());
Embree SYCL Limitations
-----------------------
Embree only supports Xe HPC and HPG GPUs as SYCL devices, thus in
particular the CPU and other GPUs cannot get used as a SYCL
device. To render on the CPU just use the standard C99 API without
relying on SYCL.
The SYCL language spec puts some restrictions to device functions,
such as disallowing: global variable access, malloc, invokation of
virtual functions, function pointers, runtime type information,
exceptions, recursion, etc. See Section `5.4. Language Restrictions
for device functions` of the [SYCL
specification](https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:language.restrictions.kernels)
for more details.
Using Intel's oneAPI DPC++ compiler invoking an indirectly called
function is allowed, but we do not recommend this for performance
reasons.
Some features are not supported by the Embree SYCL API thus cannot
get used on the GPU:
- The packet tracing functions `rtcIntersect4/8/16` and
`rtcOccluded4/8/16` are not supported in SYCL
device side code. Using these functions makes no sense for SYCL, as
the programming model is implicitely executed in SIMT mode on the
GPU anyway.
- Filter and user geometry callbacks stored inside the geometry
objects are not supported on SYCL. Please use the alternative
approach of passing the function pointer through the
`RTCIntersectArguments` (or `RTCOccludedArguments`) structures to
the tracing function, which enables inlining on the GPU.
- The `rtcInterpolate` function cannot get used on the the device. For
most primitive types the vertex data interpolation is anyway a
trivial operation, and an API call just introduces overheads. On the
CPU that overhead is acceptable, but on the GPU it is not. The
`rtcInterpolate` function does not know the geometry type it is
interpolating over, thus its implementation on the GPU would contain
a large switch statement for all potential geometry types.
- Tracing rays using `rtcIntersect1` and `rtcOccluded1` functions from
user geometry callbacks is not supported in SYCL. Please use the
tail recursive `rtcForwardIntersect1` and `rtcForwardOccluded1`
calls instead.
- Subdivision surfaces are not supported for Embree SYCL devices.
- Collision detection (`rtcCollide` API call) is not supported in SYCL
device side code.
- Point queries (`rtcPointQuery` API call) are not supported in SYCL
device side code.
Embree SYCL Known Issues
------------------------
- The SYCL support of Embree is in beta phase. Current functionality,
quality, and GPU performance may not reflect that of the final
product.
- Compilation with build configuration "debug" is currently not working on
Windows.
Upgrading from Embree 3 to Embree 4
===================================
We decided to introduce an improved API in Embree 3 that is not
backward compatible with the Embree 2 API. This step was required to
remove various deprecated API functions that accumulated over time,
improve extensibility of the API, fix suboptimal design decisions,
fix design mistakes (such as incompatible single ray and ray packet
layouts), clean up inconsistent naming, and increase flexibility.
This section summarizes API changes between Embree 3 and Embree4. Most
of these changes are motivated by GPU performance and having a
consistent API that works properly for the CPU and GPU.
To make porting to the new API easy, we provide a conversion script
that can do most of the work, and will annotate the code with
remaining changes required. The script can be invoked the following
way for CPP files:
- The API include folder got renamed from embree3 to embree4, to be
able to install Embree 3 and Embree 4 side by side, without having
conflicts in API folder.
./scripts/cpp-patch.py --patch embree2_to_embree3.patch
--in infile.cpp --out outfile.cpp
- The `RTCIntersectContext` is renamed to `RTCRayQueryContext` and the
`RTCIntersectContextFlags` got renamed to `RTCRayQueryFlags`.
When invoked for Intel® ISPC files, add the `--ispc` option:
- There are some changes to the `rtcIntersect` and `rtcOccluded`
functions. Most members of the old intersect context have been
moved to some optional `RTCIntersectArguments` (and
`RTCOccludedArguments`) structures, which also contains a pointer to
the new ray query context. The argument structs fulfill the task of
providing additional advanced arguments to the traversal
functions. The ray query context can get used to pass additional
data to callbacks, and to maintain an instID stack in case
instancing is done manually inside user geometry callbacks. The
arguments struct is not available inside callbacks. This change was
in particular necessary for SYCL to allow inlining of function
pointers provided to the traversal functions, and to reduce the
amount of state passed to callbacks, which both improves GPU
performance. Most applications can just drop passing the ray query
context to port to Embree 4.
- The `rtcFilterIntersection` and `rtcFilterOcclusion` API calls that
invoke both, the geometry and argument version of the filter
callback, from a user geometry callback are no longer
supported. Instead applications should use the
`rtcInvokeIntersectFilterFromGeometry` and
`rtcInvokeOccludedFilterFromGeometry` API calls that invoke just the
geometry version of the filter function, and invoke the argument
filter function manually if required.
./scripts/cpp-patch.py --ispc --patch embree2_to_embree3.patch
--in infile.ispc --out outfile.ispc
- The filter function passed as arguments to `rtcIntersect` and
`rtcOccluded` functions is only invoked for some geometry if enabled through
`rtcSetGeometryEnableFilterFunctionFromArguments` for that
geometry. Alternatively, argument filter functions can get enabled
for all geometries using the
`RTC_RAY_QUERY_FLAG_INVOKE_ARGUMENT_FILTER` ray query flag.
Apply the script to each source file of your project that contains
Embree API calls or types. The input file and output file can also be
identical to perform the patch in-place. Please always backup your
original code before running the script, and inspect the code changes
done by the script using diff (e.g. `git diff`), to make sure no
undesired code locations got changed. Grep the code for comments
containing `EMBREE_FIXME` and perform the action described in the
comment.
- User geometry callbacks get a valid vector as input to identify
valid and invalid rays. In Embree 3 the user geometry callback just
had to update the ray hit members when an intersection was found and
perform no operation otherwise. In Embree 4 the callback
additionally has to return valid=-1 when a hit was found, and
valid=0 when no hit was found. This allows Embree to properly pass
the new hit distance to the ray tracing hardware only in the case a
hit was found.
The following changes need to be performed when switching from Embree
2 to Embree 3. Most of these changes are automatically done by the
script if not described differently.
- Further ray masking is enabled by default now as required by most
applications and the default ray mask for geometries got changed
from 0xFFFFFFFF to 0x1.
We strongly recommend to set an error callback function (see
`rtcSetDeviceErrorFunction`) when porting to Embree 3 to detect all
runtime errors early.
- The stream tracing functions `rtcIntersect1M`, `rtcIntersect1Mp`,
`rtcIntersectNM`, `rtcIntersectNp`, `rtcOccluded1M`,
`rtcOccluded1Mp`, `rtcOccludedNM`, and `rtcOccludedNp` got removed
as they were rarely used and did not provide relevant performance
benefits. As alternative the application can just iterate over
`rtcIntersect1` and potentially `rtcIntersect4/8/16` to get similar
performance.
To use Embree through SYCL on the CPU and GPU additional changes are
required:
Device
------
- Embree 3 allows to use `rtcIntersect` recursively from a user
geometry or intersection filter callback to continue a ray inside an
instantiated object. In Embree 4 using `rtcIntersect` recursively is
disallowed on the GPU but still supported on the CPU. To properly
continue a ray inside an instantiated object use the new
`rtcForwardIntersect1` and `rtcForwardOccluded1` functions.
* `rtcInit` and `rtcExit` got removed. Please use the device concept
using the `rtcNewDevice` and `rtcReleaseDevice` functions
instead.
- The geometry object of Embree 4 is a host side only object, thus
accessing it during rendering from the GPU is not allowed. Thus all
API functions that take an RTCGeometry object as argument cannot get
used during rendering. Thus in particular the
`rtcGetGeometryUserData(RTCGeometry)` call cannot get used, but
there is an alternative function
`rtcGetGeometryUserDataFromScene(RTCScene scene,uint geomID)` that
should get used instead.
* Functions that conceptually should operate on a device but did not
get a device argument got removed. The upgrade script replaces
these functions by the proper functions that operate on a device,
however, manually propagating the device handle to these function
calls might still be required.
- The user geometry callback and filter callback functions should get
passed through the intersection and occlusion argument structures to
the `rtcIntersect1` and `rtcOccluded1` functions directly to allow
inlining. The experimental geometry version of the callbacks is
disabled in SYCL and should not get used.
Scene
-----
- The feature flags should get used in SYCL to minimal GPU code for
optimal performance.
* The API no longer distinguishes between a static and a dynamic
scene. Some users had issues as they wanted to do minor
modifications to static scenes, but maintain high traversal
performance.
- The `rtcInterpolate` function cannot get used on the device, and
vertex data interpolation should get implemented by the application.
The new approach gives more flexibility, as each scene is
changeable, and build quality settings can be changed on a commit
basis to balance between build performance and render performance.
* The `rtcCommitThread` function got removed; use
`rtcJoinCommitScene` instead.
* The scene now supports different build quality settings. Please use
those instead of the previous way of `RTC_SCENE_STATIC`,
`RTC_SCENE_DYNAMIC`, and `RTC_SCENE_HIGH_QUALITY` flags.
Geometry
--------
* There is now only one `rtcNewGeometry` function to create geometries
which gets passed an enum to specify the type of geometry to create.
The number of vertices and primitives of the geometries is inferred
from the size of data buffers.
* We introduced an object type `RTCGeometry` for all geometries.
Previously a geometry was not a standalone object and could only
exist inside a scene. The new approach comes with more flexibility
and more readable code.
Operations like `rtcInterpolate` can now be performed on the
geometry object directly without the need of a scene. Further, an
application can choose to create its geometries independent of a
scene, e.g. each time a geometry node is added to its scene graph.
This modification changed many API functions to get passed one
`RTCGeometry` object instead of a `RTCScene` and `geomID`. The
script does all required changed automatically. However, in some
cases the script may introduce `rtcGetGeometry(scene, geomID)`
calls to retrieve the geometry handle. Best store the geometry
handle inside your scene representation (and release it in the
destructor) and access the handle directly instead of calling
`rtcGetGeometry`.
* Geometries are not included inside a scene anymore but can be
attached to a multiple scenes using the `rtcAttachGeomety` or
`rtcAttachGeometryByID` functions.
* As geometries are separate objects, commit semantics got introduced
for them too. Thus geometries must be committed through the
`rtcCommitGeometry` call before getting used. This allows for
earlier error checking and pre-calculating internal data per
geometry object.
Such commit points were previously not required in the Embree 2
API. The upgrade script attempts to insert the commits
automatically, but cannot do so properly under all
circumstances. Thus please check if every `rtcCommitGeometry` call
inserted by the script is properly placed, and if a
`rtcCommitGeometry` call is placed after a sequence of
changes to a geometry.
* Only the latest version of the previous displacement function call
(`RTCDisplacementFunc2`) is now supported, and the callback is
passed as a structure containing all arguments.
* The deprecated `RTCBoundaryMode` type and `rtcSetBoundaryMode`
function got removed and replaced by `RTCSubdivisionMode` enum and
the `rtcSetGeometrySubdivisionMode` function. The script does this
replacement automatically.
* Ribbon curves and lines now avoid self-intersections automatically
The application can be simplified by removing special code paths
that previously did the self-intersection handling.
* The previous Embree 2 way of instancing was suboptimal as it
required user geometries to update the `instID` field of the ray
differently when used inside an instanced scene or inside a
top-level scene. The user geometry intersection code now just
has to copy the `context.instID` field into the `ray.instID`
field to function properly under all circumstances.
* The internal instancing code will update the `context.instID` field
properly when entering or leaving an instance. When instancing is
implemented manually through user geometries, the code must be
modified to set the `context.instID` field properly and no longer
pass `instID` through the ray. This change must done manually
and cannot be performed by the script.
* We flipped the direction of the geometry normal to the widely used
convention that a shape with counter-clockwise layout of vertices
has the normal pointing upwards (right-hand rule). Most modeling tools
follow that convention.
The conversion script does not perform this change, thus if
required adjust your code to flip `Ng` for triangle, quad, and
subdivision surfaces.
Buffers
-------
* With Embree 3 we are introducing explicit `RTCBuffer` objects.
However, you can still use the short way of sharing buffers with
Embree through the `rtcSetSharedGeometryBuffer` call.
* The `rtcMapBuffer` and `rtcUnmapBuffer` API calls were removed, and
we added the `rtcGetBufferData` call instead.
Previously the `rtcMapBuffer` call had the semantics of creating
an internal buffer when no buffer was shared for the corresponding
buffer slot. These invocations of `rtcMapBuffer` must be
replaced by an explicit creation of an internally managed buffer
using the `rtcNewGeometryBuffer` function.
The upgrade script cannot always detect if the `rtcMapBuffer` call
would create an internal buffer or just map the buffer pointer.
Thus check whether the `rtcNewGeometryBuffer` and
`rtcGetBufferData` calls are correct after the conversion.
* The `rtcUpdateGeometryBuffer` function now must be called for
every buffer that got modified by the application. Note that the
conversion script cannot automatically detect each location where
a buffer update is now required.
* The buffer type no longer encodes the time step or user vertex
buffer index. Now `RTC_VERTEX_BUFFER_TYPE` and additional `slot`
specifies the vertex buffer for a specific time step, and
`RTC_USER_VERTEX_BUFFER_TYPE` and additional `slot` specifies a
vertex attribute.
Miscellaneous
-------------
* The header files for Embree 3 are now inside the `embree3` folder
(instead of `embree2` folder) and `libembree.so` is now called
`libembree3.so` to be able to install multiple Embree versions side
by side. We made the headers C99 compliant.
* All API objects are now reference counted with release functions to
decrement and retain functions to increment the reference count
(if required).
* Most callback functions no longer get different arguments as input,
but a pointer to a structure containing all arguments. This
results in more readable code, faster callback invocation (as some
arguments do not change between invocations) and is extensible, as
new members to the structure can be later added in a backward
compatible way (if required).
The conversion script can convert the definition and declaration
of the old callback functions in most cases. Before running the
script, make sure that you never type-cast a callback function
when assigning it (as this has the danger of assigning a callback
function with a wrong type if the conversion did not detect some
callbacks as such). If the script does not detect a callback
function, make sure the argument types match exactly the types in
the header (e.g. write `const int` instead of `int const` or
convert the callback manually).
* An intersection context is now required for each ray query
invocation. The context should be initialized using the
`rtcInitIntersectContext` function.
* The `rtcIntersect`-type functions get as input an `RTCRayHit` type,
which is similar to before, but has the ray and hit parts split
into two sub-structures.
The `rtcOccluded`-type functions get as input an `RTCRay` type,
which does not contain hit data anymore. When an occlusion is
found, the `tfar` element of the ray is set to `-inf`.
Required code changes cannot be done by the upgrade script and
need to be done manually.
* The ray layout for single rays and packets of rays had certain
incompatibilities (alignment of `org` and `dir` for single rays
caused gaps in the single ray layout that were not in the ray
packet layout). This issue never showed up because single rays
and ray packets were separate in the system initially. This layout
issue is now fixed, and a single ray has the same layout as a ray
packet of size 1.
* Previously Embree supported placing additional data at the end of
the ray structure, and accessing that data inside user geometry
callbacks and filter callback functions.
With Embree 3 this is no longer supported, and the ray passed to a
callback function may be copied to a different memory location. To
attach additional data to your ray, simply extend the intersection
context with a pointer to that data.
This change cannot be done by the script. Further, code will still
work if you extend the ray as the implementation did not change yet.
* The ray structure now contains an additional `id` and `flags`
field. The `id` can be used to store the index of the ray with
respect to a ray packet or ray stream. The `flags` is reserved for
future use, and currently must be set to 0.
* All previous intersection filter callback variants have been
removed, except for the `RTCFilterFuncN` which gets a varying size
ray packet as input. The semantics of this filter function type
have changed from copying the hit on acceptance to clearing the
ray's valid argument in case of non-acceptance. This way, chaining
multiple filters is more efficient.
We kept the guarantee that for `rtcIntersect1/4/8/16` and
`rtcOccluded1/4/8/16` calls the packet size and ray order will not
change from the initial size and ordering when entering a filter
callback.
* We no longer export Intel® ISPC-specific symbols. This has the advantage
that certain linking issues went away, e.g. it is now possible to
link an Intel® ISPC application compiled for any combination of ISAs, and
link this to an Embree library compiled with a different set of
ISAs. Previously the ISAs of the application had to be a subset of
the ISAs of Embree, and when the user enabled exactly one ISA, they
had to do this in Embree and the application.
* We no longer export the Intel® ISPC tasking system, which means that the
application has the responsibility to implement the Intel® ISPC tasking
system itself. Intel® ISPC comes with example code on how to do this. This
change is not performed by the script and must be done manually.
* Fixed many naming inconsistencies, and changed names of further API
functions. All these renamings are properly done by the script and
need no further attention.
- Indirectly called functions must be declared with
`RTC_SYCL_INDIRECTLY_CALLABLE` when used as filter or user geometry
callbacks.
\pagebreak
Embree API Reference
====================
``` {include=src/api-ref.md}
```
Performance Recommendations
===========================
CPU Performance Recommendations
===============================
MXCSR control and status register
---------------------------------
@@ -345,14 +389,11 @@ Fast Coherent Rays
------------------
For getting the highest performance for highly coherent rays, e.g.
primary or hard shadow rays, it is recommended to use packets or
streams of single rays/packets with setting the
`RTC_INTERSECT_CONTEXT_FLAG_COHERENT` flag in the
`RTCIntersectContext` passed to the `rtcIntersect`/`rtcOccluded`
calls. The total number of rays in a coherent stream of ray packets
should be around 64, e.g. 8 times 8-wide packets, or 4 times 16-wide
packets. The rays inside each packet should be grouped as coherent as
possible.
primary or hard shadow rays, it is recommended to use packets with
setting the `RTC_RAY_QUERY_FLAG_COHERENT` flag in the
`RTCIntersectArguments` struct passed to the
`rtcIntersect`/`rtcOccluded` calls. The rays inside each packet should
be grouped as coherent as possible.
Huge Page Support
-----------------
@@ -442,3 +483,108 @@ is reading these components using SSE loads later on.
\pagebreak
GPU Performance Recommendations
================================
Low Code Complexity
-------------------
As a general rule try to keep code complexity low, to avoid spill code
generation. To achieve this we recommend splitting your renderer into
separate kernels instead of using a single Uber kernel invokation.
Code can further get reduced by using SYCL specialization constants to
just enable rendering features required to render a given scene.
Feature Flags
-------------
Use SYCL specialization constants and the feature flags (see section
[RTCFeatureFlags]) of the `rtcIntersect1` and `rtcOccluded1` calls to
JIT compile minimal code. The passed feature flags should just contain
features required to render the current scene. If JIT compile times
are an issue, reduce the number of feature masks used and use JIT
caching (see section [SYCL JIT caching]).
Inline Indirect Calls
---------------------
Attaching user geometry and intersection filter callbacks to the
geometries of the scene is not supported in SYCL for performance reasons.
Instead directly pass the user geometry and intersection filter
callback functions through the `RTCIntersectArguments` (and
`RTCOccludedArguments`) struct to `rtcIntersect1` (and `rtcOccluded1`)
API functions as in the following example:
RTC_SYCL_INDIRECTLY_CALLABLE void intersectionFilter(
const RTCFilterFunctionNArguments* args
) { ... }
RTCIntersectArguments args;
rtcInitIntersectArguments(&args);
args.filter = intersectionFilter;
rtcIntersect1(scene,&ray,&args);
If the callback function is directly passed that way, the SYCL
compiler can inline the indirect call, which gives a huge performance
benefit. Do *not* read a function pointer form some memory location
and pass it to `rtcIntersect1` (and `rtcOccluded1`) as this will also
prevent inlining.
7 Bit Ray Mask
--------------
Use just the lower 7 bits of the ray and geometry mask if possible,
even though Embree supports 32 bit ray masks for geometry masking. On
the CPU using any of the 32 bits yields the same performance, but the
ray tracing hardware only supports an 8 bit mask, thus Embree has to
emulate 32 bit masking if used. For that reason the lower 7 mask bits are
hardware accelerated and fast, while the mask bits 7-31 require some
software intervention and using them reduces performance. To turn on 32 bit
ray masks use the RTC_FEATURE_FLAG_32_BIT_RAY_MASK (see section [RTCFeatureFlags]).
Limit Motion Blur Motions
-------------------------
The motion blur implementation on SYCL has some limitations regarding
supported motion. Primitive motion should be maximally as large as a
small multiple of the primitive size, otherwise performance can
degrade a lot. If detailed geometry moves fast, best put the geometry
into an instance, and apply motion blur to the instance itself, which
efficiently allows larger motions. As a fallback, problematic scenes
can always still get rendered robustly on the CPU.
Generic Pointers
----------------
Embree uses standard C++ pointers in its implementation. SYCL might
not be able to detect the memory space these pointers refer to and has
to treat them as generic pointers which are not performing optimal. The DPC++
compiler has advanced optimizations to infer the proper address space
to avoid usage of generic pointers.
However, if you still encounter the following warning during ahead of
time compilation of SYCL kernels, then loads from generic pointer are
present:
warning: Adding XX occurrences of additional control flow due to presence
of generic address space operations in function YYY.
To work around this issue we recommend:
- Do not use local memory inside kernels that trace rays. In this case
the DPC++ compiler knows that no local memory pointer can exist and
will optimize generic loads. As this is typically the case for
renderers, generic pointer will typically not cause issues.
- Indirectly callable functions may still cause problems, even if your
kernel does not use local memory. Thus best use SYCL pointers like
sycl::global_ptr<T> and sycl::private_ptr<T> in indirectly callable
functions to avoid generic address space usage.
- You can also enforce usage of global pointers using the following
DPC++ compile flags: `-cl-intel-force-global-mem-allocation
-cl-intel-no-local-to-generic`.
+8 -2
View File
@@ -1,4 +1,4 @@
% RTCBufferType(3) | Embree Ray Tracing Kernels 3
% RTCBufferType(3) | Embree Ray Tracing Kernels 4
#### NAME
@@ -6,7 +6,7 @@
#### SYNOPSIS
#include <embree3/rtcore_ray.h>
#include <embree4/rtcore_ray.h>
enum RTCBufferType
{
@@ -26,6 +26,8 @@
RTC_BUFFER_TYPE_VERTEX_CREASE_INDEX = 20,
RTC_BUFFER_TYPE_VERTEX_CREASE_WEIGHT = 21,
RTC_BUFFER_TYPE_HOLE = 22,
RTC_BUFFER_TYPE_TRANSFORM = 23,
RTC_BUFFER_TYPE_FLAGS = 32
};
@@ -60,6 +62,10 @@ The `RTC_BUFFER_TYPE_FACE`, `RTC_BUFFER_TYPE_LEVEL`,
special buffers required to create subdivision meshes (see
[RTC_GEOMETRY_TYPE_SUBDIVISION]).
The `RTC_BUFFER_TYPE_TRANSFORM` buffer is used to provide instance
transformation information for instance array geometries (see
[RTC_GEOMETRY_TYPE_INSTANCE_ARRAY]).
The `RTC_BUFFER_TYPE_FLAGS` can get used to add additional flag per
primitive of a geometry, and is currently only used for linear curves.
+7 -7
View File
@@ -1,4 +1,4 @@
% RTCCurveFlags(3) | Embree Ray Tracing Kernels 3
% RTCCurveFlags(3) | Embree Ray Tracing Kernels 4
#### NAME
@@ -6,13 +6,13 @@
#### SYNOPSIS
#include <embree3/rtcore.h>
#include <embree4/rtcore.h>
enum RTCCurveFlags
{
RTC_CURVE_FLAG_NEIGHBOR_LEFT = (1 << 0),
RTC_CURVE_FLAG_NEIGHBOR_RIGHT = (1 << 1)
};
enum RTCCurveFlags
{
RTC_CURVE_FLAG_NEIGHBOR_LEFT = (1 << 0),
RTC_CURVE_FLAG_NEIGHBOR_RIGHT = (1 << 1)
};
#### DESCRIPTION
+181
View File
@@ -0,0 +1,181 @@
% RTCFeatureFlags(3) | Embree Ray Tracing Kernels 4
#### NAME
RTCFeatureFlags - specifies features to enable
for ray queries
#### SYNOPSIS
#include <embree4/rtcore_ray.h>
enum RTCFeatureFlags
{
RTC_FEATURE_FLAG_NONE = 0,
RTC_FEATURE_FLAG_MOTION_BLUR = 1 << 0,
RTC_FEATURE_FLAG_TRIANGLE = 1 << 1,
RTC_FEATURE_FLAG_QUAD = 1 << 2,
RTC_FEATURE_FLAG_GRID = 1 << 3,
RTC_FEATURE_FLAG_SUBDIVISION = 1 << 4,
RTC_FEATURE_FLAG_POINT = ... ,
RTC_FEATURE_FLAG_CURVES = ... ,
RTC_FEATURE_FLAG_CONE_LINEAR_CURVE = 1 << 5,
RTC_FEATURE_FLAG_ROUND_LINEAR_CURVE = 1 << 6,
RTC_FEATURE_FLAG_FLAT_LINEAR_CURVE = 1 << 7,
RTC_FEATURE_FLAG_ROUND_BEZIER_CURVE = 1 << 8,
RTC_FEATURE_FLAG_FLAT_BEZIER_CURVE = 1 << 9,
RTC_FEATURE_FLAG_NORMAL_ORIENTED_BEZIER_CURVE = 1 << 10,
RTC_FEATURE_FLAG_ROUND_BSPLINE_CURVE = 1 << 11,
RTC_FEATURE_FLAG_FLAT_BSPLINE_CURVE = 1 << 12,
RTC_FEATURE_FLAG_NORMAL_ORIENTED_BSPLINE_CURVE = 1 << 13,
RTC_FEATURE_FLAG_ROUND_HERMITE_CURVE = 1 << 14,
RTC_FEATURE_FLAG_FLAT_HERMITE_CURVE = 1 << 15,
RTC_FEATURE_FLAG_NORMAL_ORIENTED_HERMITE_CURVE = 1 << 16,
RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE = 1 << 17,
RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE = 1 << 18,
RTC_FEATURE_FLAG_NORMAL_ORIENTED_CATMULL_ROM_CURVE = 1 << 19,
RTC_FEATURE_FLAG_SPHERE_POINT = 1 << 20,
RTC_FEATURE_FLAG_DISC_POINT = 1 << 21,
RTC_FEATURE_FLAG_ORIENTED_DISC_POINT = 1 << 22,
RTC_FEATURE_FLAG_ROUND_CURVES = ... ,
RTC_FEATURE_FLAG_FLAT_CURVES = ... ,
RTC_FEATURE_FLAG_NORMAL_ORIENTED_CURVES = ... ,
RTC_FEATURE_FLAG_LINEAR_CURVES = ... ,
RTC_FEATURE_FLAG_BEZIER_CURVES = ... ,
RTC_FEATURE_FLAG_BSPLINE_CURVES = ... ,
RTC_FEATURE_FLAG_HERMITE_CURVES = ... ,
RTC_FEATURE_FLAG_INSTANCE = 1 << 23,
RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS = 1 << 24,
RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_GEOMETRY = 1 << 25,
RTC_FEATURE_FLAG_FILTER_FUNCTION = ... ,
RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_ARGUMENTS = 1 << 26,
RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_GEOMETRY = 1 << 27,
RTC_FEATURE_FLAG_USER_GEOMETRY = ... ,
RTC_FEATURE_FLAG_32_BIT_RAY_MASK = 1 << 28,
RTC_FEATURE_FLAG_ALL = 0xffffffff
};
#### DESCRIPTION
The `RTCFeatureFlags` enum specify a bit mask to enable specific ray
tracing features for ray query operations. The feature flags are
passed to the `rtcIntersect1/4/8/16` and `rtcOccluded1/4/8/16`
functions through the `RTCIntersectArguments` and
`RTCOccludedArguments` structures. Only a ray tracing feature whose
bit is enabled in the feature mask can get used. If a feature bit is
not set, the behaviour is undefined, thus the feature may work or
not. To enable multiple features the respective features have to get
combined using a bitwise `OR` operation.
The purpose of feature flags is to reduce code size on the GPU by
enabling just the features required to render the scene. On the CPU
there is no need to use feature flags, and the default of all features
enabled (`RTC_FEATURE_FLAG_ALL`) can just be kept.
The following features can get enabled using feature flags:
- RTC_FEATURE_FLAG_MOTION_BLUR: Enables motion blur for all geometry types.
- RTC_FEATURE_FLAG_TRIANGLE: Enables triangle geometries (RTC_GEOMETRY_TYPE_TRIANGLE).
- RTC_FEATURE_FLAG_QUAD: Enables quad geometries (RTC_GEOMETRY_TYPE_QUAD).
- RTC_FEATURE_FLAG_GRID: Enables grid geometries (RTC_GEOMETRY_TYPE_GRID).
- RTC_FEATURE_FLAG_SUBDIVISION: Enables subdivision geometries (RTC_GEOMETRY_TYPE_SUBDIVISION).
- RTC_FEATURE_FLAG_POINT: Enables all point geometry types (RTC_GEOMETRY_TYPE_XXX_POINT)
- RTC_FEATURE_FLAG_CURVES: Enables all curve geometry types (RTC_GEOMETRY_TYPE_XXX_YYY_CURVE)
- RTC_FEATURE_FLAG_ROUND_CURVES: Enables all round curves (RTC_GEOMETRY_TYPE_ROUND_XXX_CURVE).
- RTC_FEATURE_FLAG_FLAT_CURVES: Enables all flat curves (RTC_GEOMETRY_TYPE_FLAT_XXX_CURVE).
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_CURVES: Enables all normal oriented curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_XXX_CURVE).
- RTC_FEATURE_FLAG_LINEAR_CURVES: Enables all linear curves (RTC_GEOMETRY_TYPE_XXX_LINEAR_CURVE).
- RTC_FEATURE_FLAG_BEZIER_CURVES: Enables all Bézier curves (RTC_GEOMETRY_TYPE_XXX_BEZIER_CURVE).
- RTC_FEATURE_FLAG_BSPLINE_CURVES: Enables all B-spline curves (RTC_GEOMETRY_TYPE_XXX_BSPLINE_CURVE).
- RTC_FEATURE_FLAG_HERMITE_CURVES: Enables all Hermite curves (RTC_GEOMETRY_TYPE_XXX_HERMITE_CURVE).
- RTC_FEATURE_FLAG_CONE_LINEAR_CURVE: Enables cone geometry type (RTC_GEOMETRY_TYPE_CONE_LINEAR_CURVE).
- RTC_FEATURE_FLAG_ROUND_LINEAR_CURVE: Enables round linear curves (RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE).
- RTC_FEATURE_FLAG_FLAT_LINEAR_CURVE: Enables flat linear curves (RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE).
- RTC_FEATURE_FLAG_ROUND_BEZIER_CURVE: Enables round Bézier curves (RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE).
- RTC_FEATURE_FLAG_FLAT_BEZIER_CURVE: Enables flat Bézier curves (RTC_GEOMETRY_TYPE_FLAT_BEZIER_CURVE).
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_BEZIER_CURVE: Enables normal oriented Bézier curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BEZIER_CURVE).
- RTC_FEATURE_FLAG_ROUND_BSPLINE_CURVE: Enables round B-spline curves (RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE).
- RTC_FEATURE_FLAG_FLAT_BSPLINE_CURVE: Enables flat B-spline curves (RTC_GEOMETRY_TYPE_FLAT_BSPLINE_CURVE).
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_BSPLINE_CURVE: Enables normal oriented B-spline curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_BSPLINE_CURVE).
- RTC_FEATURE_FLAG_ROUND_HERMITE_CURVE: Enables round Hermite curves (RTC_GEOMETRY_TYPE_ROUND_HERMITE_CURVE).
- RTC_FEATURE_FLAG_FLAT_HERMITE_CURVE: Enables flat Hermite curves (RTC_GEOMETRY_TYPE_FLAT_HERMITE_CURVE).
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_HERMITE_CURVE: Enables normal oriented Hermite curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_HERMITE_CURVE).
- RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE: Enables round Catmull Rom curves (RTC_GEOMETRY_TYPE_ROUND_CATMULL_ROM_CURVE).
- RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE: Enables flat Catmull Rom curves (RTC_GEOMETRY_TYPE_FLAT_CATMULL_ROM_CURVE).
- RTC_FEATURE_FLAG_NORMAL_ORIENTED_CATMULL_ROM_CURVE: Enables normal oriented Catmull Rom curves (RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE).
- RTC_FEATURE_FLAG_SPHERE_POINT: Enables sphere geometry type (RTC_GEOMETRY_TYPE_SPHERE_POINT).
- RTC_FEATURE_FLAG_DISC_POINT: Enables disc geometry type (RTC_GEOMETRY_TYPE_DISC_POINT).
- RTC_FEATURE_FLAG_ORIENTED_DISC_POINT: Enables oriented disc geometry types (RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT).
- RTC_FEATURE_FLAG_INSTANCE: Enables instance geometries (RTC_GEOMETRY_TYPE_INSTANCE).
- RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS: Enables filter functions passed through intersect arguments.
- RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_GEOMETRY: Enable filter functions passed through geometry.
- RTC_FEATURE_FLAG_FILTER_FUNCTION: Enables filter functions (argument and geometry version).
- RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_ARGUMENTS: Enables RTC_GEOMETRY_TYPE_USER with function pointer passed through intersect arguments.
- RTC_FEATURE_FLAG_USER_GEOMETRY_CALLBACK_IN_GEOMETRY: Enables RTC_GEOMETRY_TYPE_USER with function pointer passed through geometry object.
- RTC_FEATURE_FLAG_USER_GEOMETRY: Enables RTC_GEOMETRY_TYPE_USER geometries (both argument and geometry callback versions).
- RTC_FEATURE_FLAG_32_BIT_RAY_MASK: Enables full 32 bit ray masks. If not used, only the lower 7 bits in the ray mask are handled correctly.
- RTC_FEATURE_FLAG_ALL: Enables all features (default).
#### EXIT STATUS
#### SEE ALSO
[rtcIntersect1], [rtcIntersect4/8/16], [rtcOccluded1], [rtcOccluded4/8/16],
+16 -11
View File
@@ -1,4 +1,4 @@
% RTCFormat(3) | Embree Ray Tracing Kernels 3
% RTCFormat(3) | Embree Ray Tracing Kernels 4
#### NAME
@@ -6,7 +6,7 @@
#### SYNOPSIS
#include <embree3/rtcore_ray.h>
#include <embree4/rtcore_ray.h>
enum RTCFormat
{
@@ -39,7 +39,9 @@
RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR,
RTC_FORMAT_GRID,
};
RTC_FORMAT_QUATERNION_DECOMPOSITION
};
#### DESCRIPTION
@@ -58,14 +60,16 @@ of (size 2,3,4, etc.). This format is typcally used to specify to
format of vertex buffers, e.g. the `RTC_FORMAT_FLOAT3` type for vertex
buffers of triangle meshes.
The `RTC_FORMAT_FLOAT3X4_ROW_MAJOR` and
`RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR` formats, specify a 3x4 floating
point matrix layed out either row major or column major. The
`RTC_FORMAT_FLOAT4X4_ROW_MAJOR` and `RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`
formats, specify a 4x4 floating point matrix layed out either row
major or column major. These matrix formats are used in the
[rtcSetGeometryTransform] function in order to set a transformation
matrix for geometries.
The `RTC_FORMAT_FLOAT3X4_ROW_MAJOR` and `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`
formats, specify a 3x4 floating point matrix layed out either row major or
column major. The `RTC_FORMAT_FLOAT4X4_ROW_MAJOR` and
`RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR` formats, specify a 4x4 floating point matrix
layed out either row major or column major. The
`RTC_FORMAT_QUATERNION_DECOMPOSITION` format specifies a structure that
represents a quaternion decomposition (see [RTCQuaternionDecomposition]) of an affine
transformation. These formats are used in the [rtcSetGeometryTransform]
function or in geometry buffers with type `RTC_BUFFER_TYPE_TRANSFORM` in order
to set a transformation matrix for instance and instance array geometries.
The `RTC_FORMAT_GRID` is a special data format used to specify grid
primitives of layout RTCGrid when creating grid geometries
@@ -77,3 +81,4 @@ primitives of layout RTCGrid when creating grid geometries
[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer],
[rtcSetNewGeometryBuffer], [rtcSetGeometryTransform]
[RTCQuaternionDecomposition]

Some files were not shown because too many files have changed in this diff Show More