Compare commits

...
341 Commits
Author SHA1 Message Date
Daniel Simon 6c6ebd9530 Update rtcore_scene.h (#555)
Add missing forward declaration for RTCGeometry in rtcore_scene.h
2026-07-09 09:21:11 +02:00
Chris Gyurgyik f03a7c7f0e Fix comment in triangle.h 2026-06-22 15:18:45 +02:00
Stefan Werner 7ba9359784 Use latest Level Zero RT API (#595)
* Update vendored Level Zero ze_api.h to upstream
* Migrate Embree RTAS integration from EXP to EXT API
* Check for relaxed allocation limit L0 extension before using it
2026-05-29 11:12:15 +02:00
Stefan Werner fcae907bf1 Curves: reduce transcendentals, divergence, and loads on Intel iGPU (#598)
* Curves: reduce transcendentals, divergence, and loads on Intel iGPU

Targets the SYCL/Xe code paths in the curve intersectors:

* curve_intersector_sweep.h (intersect_bezier_iterative_jacobian): share a single rsqrt(dot(dPdu,dPdu)) between the tangent normalization and the cos_err = P_err/length(dPdu) term, saving one sqrt/rsqrt per Jacobian iteration. Runs on both CPU and SYCL.

* curve_intersector_sweep.h (SYCL intersect_bezier_recursive_jacobian): replace the well-behaved test 'm < 0.2*length(W)' with the equivalent squared-form comparison 'm*m < 0.04*dot(W,W)', removing one sqrt per recursion step.

* curve_intersector_distance.h (DistanceCurve1Intersector1::intersect): the duplicated first-iteration prologue is now CPU-only (#if !defined(__SYCL_DEVICE_ONLY__)). On SYCL where W=1 the duplication only inflated kernel size; control flow now falls straight into the unified loop.
2026-05-08 11:46:26 +02:00
Tim BlechmannandStefan Werner 02e73a7a26 internalize loadTransform(RTCFormat, const float*) (#559)
loadTransform(RTCFormat, const float*) is an implementation detail of
rtcore.cpp, so it should be declared as `static` to prevent it from
being exported from static library builds.

Co-authored-by: Stefan Werner <stefan.werner@intel.com>
2026-04-13 14:08:44 +02:00
Tim Blechmann d7b5a300d3 include missing headers
`std::alignment_of` is in `type_traits`, `std::exception_ptr` is in
<exxception> so they need to be included.
Fixes a compile error with xcode when compiling in c++23.
2026-04-13 12:11:56 +02:00
Krzysztof Raszkowski f590db83ef ci: Remove cmake-presets system and refactor workflows
Replace cmake-presets with inline workflow configuration across all
GitHub Actions. Add new test scripts and remove deprecated utilities.
Simplifies build system by eliminating abstraction layer.
2026-03-17 08:41:53 +01:00
Werner, Stefan 1a3cca4f8b Added PTL support to release notes 2026-03-16 22:56:40 +01:00
Werner, Stefan a0e08eba6e Updated documentation to 4.4.1 2026-03-16 22:56:40 +01:00
Stefan Werner 068d90f6c8 Updated version to 4.4.1 2026-03-16 22:56:40 +01:00
Stefan Werner d436cb396b Updating CI workflows: (#585)
* dropped Ubuntu 20.04
* upgraded to Fedora 42
* changed clang version to Fedora default instead of 4/5
2026-02-13 11:45:11 +01:00
Stefan Werner 7643460a6e Updated TinyEXR to fix resource leaks 2026-02-05 12:55:01 +01:00
Stefan Werner 0b10642882 Fixed potentially uninitialized variables 2026-02-05 12:55:01 +01:00
Stefan Werner bff3281ba8 Initializing HitList in next hit tutorial before use 2026-02-05 12:55:01 +01:00
Stefan Werner f743ffb8a8 Checking for potential divide by zero 2026-02-05 12:55:01 +01:00
Stefan Werner e2f984aedb Fixed integer over/underflows 2026-02-05 12:55:01 +01:00
Stefan Werner 1f1c7922f4 Reduced copies, using move semantics in more places 2026-02-05 12:55:01 +01:00
Stefan Werner 6e7df3a22c Fix Win32/ARM build
The wrong type (DWORD instead of usngined long) was used for bitscan.
2026-02-05 12:15:38 +01:00
Stefan Werner 40466c7858 Added specialization constants for curves and motion blur (#563)
Added specialization constants for curves and motion blur. Reduces kernel complexity when using curves without motion blur.
2026-01-16 11:35:07 +01:00
Stefan Werner 4c25c13557 Fixed a typo in verifyHit() (#581) 2026-01-15 17:09:57 +01:00
Johannes Günther 3a0f8c6923 Bump CMake minimum required version to 3.10 (#568)
Newer CMake v4.x dropped support for versions < 3.10
2026-01-15 10:48:25 +01:00
Werner, Stefan 6a81136d73 AVX512 flags in GCC are now closer to clang's 2026-01-14 15:34:51 +01:00
Krzysztof Raszkowski a8e4195108 ci: refactor release workflow 2026-01-13 08:39:24 +01:00
Stefan Werner 72cf45bd89 Updated TinyEXR, fixing resource leaks 2025-12-17 11:21:18 +01:00
Stefan WernerandKrzysztof Raszkowski 9cc2f3e960 Workaround GCC AVX512 movemask truncation issue (#574)
* Workaround GCC AVX512 movemask truncation issue

* ci: add Ubuntu 24.04 GCC AVX512 test job

---------

Co-authored-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
2025-12-04 14:26:57 +01:00
Stefan Werner 515904d2a0 Fixed asserts, simplified bounds check 2025-11-24 12:00:21 +01:00
Stefan Werner 0be7017a54 Added bounds check for grid dimensions 2025-11-24 12:00:21 +01:00
Stefan Werner e6a60c8698 Fixed bounds checks to allow 0 offset, 0 buffer size 2025-11-24 12:00:21 +01:00
Stefan Werner 377f611e78 More size checks for buffers 2025-11-24 12:00:21 +01:00
Stefan Werner 198156be14 Added size limit check for buffer stride 2025-11-24 12:00:21 +01:00
Krzysztof Raszkowski c4ad4a5506 ci: add more GPU tests (BMG, LNL) & cleanup 2025-11-24 07:55:58 +01:00
Krzysztof Raszkowski acadfd413f ci: switch to intel-llvm/v6.2.0 SYCL compiler 2025-11-24 07:55:58 +01:00
Krzysztof Raszkowski 9f10068a9c ci: add PVC testing to continuous & nightly workflows 2025-11-20 08:32:54 +01:00
Krzysztof Raszkowski 59980b358b rthwif_embree_builder: apply WA for PVC device memory allocation bug 2025-11-20 08:32:54 +01:00
Krzysztof Raszkowski ce619796f6 ci: multiple fixes for internal CI workflows 2025-11-18 19:09:25 +01:00
Daniel Opitz e9b8633e1d fix coverity static analysis 2025-10-29 10:23:58 +01:00
Daniel Opitz 5d1725d34c added gpu debug build to ci 2025-10-29 10:23:58 +01:00
Stefan Werner 1970895eb9 SYCL fix:
pass procedural UVs directly to prevent data loss from UNORM conversion
2025-10-10 11:10:43 +02:00
Stefan Werner a509d1e41a Fixed compilation with internal task scheduler
Internal task scheduler is now outside of RTC namespace
matching the other schedulers.
2025-10-08 10:17:40 +02:00
Stefan Werner 46a17a0b0e Explicit lambda captures to silence warnings 2025-10-08 10:16:36 +02:00
Stefan Werner 04b3911e3d Fixed gcc warnings when casting to reference types 2025-10-08 09:37:10 +02:00
Daniel Simon 1372ca0865 Add missing RTC_NAMESPACE definition to rtcore_config
`rtcore_config.h.in does` not define `RTC_NAMESPACE` when `EMBREE_API_NAMESPACE` is not defined when it should be defined but empty. This can cause a problem with forward declarations like the following:
```c++
RTC_NAMESPACE_BEGIN
typedef struct RTCSceneTy* RTCScene;
RTC_NAMESPACE_END

void my_function(RTC_NAMESPACE::RTCScene scene);
```
2025-08-07 10:10:00 +02:00
Stefan Werner 756ff3510f Added specialization constants for motion blurred instances
Improves performance in embree_forest_sycl by about 50%.
2025-07-04 09:22:33 +02:00
Stefan Werner 13dcb333fd Enabled AVX512 support with MSVC. Fixes #206 2025-06-17 16:30:24 +02:00
Stefan Werner 6f1d59ea0c Fix gcc warnings/errors when compiling with C++26. Fixes #397 2025-06-16 12:00:10 +02:00
Stefan Werner 0ce7bd2f70 Fixed signature of ISPC memory monitor in forest tutorial 2025-06-16 10:44:13 +02:00
Krishnan Ramachandran d9b7eaab50 Fix manpage section: rename *.4embree4 to *.3embree4, update Makefile rule, and remove obsolete *.4embree4 files. Section 3 is for library calls, not section 4. 2025-06-06 21:09:32 +02:00
Stefan Werner cd72eb4627 Fixed morton builder for instance arrays - arguments were mismatched 2025-06-02 11:30:11 +02:00
Stefan Werner 024cd7eb2b Fixed double/float conversion warnings 2025-06-02 11:12:25 +02:00
Stefan Werner 95d34e7f0d Fixed signed/unsigned mismatches 2025-06-02 11:12:25 +02:00
Werner, Stefan fa3136f389 Removed duplicate device release in voronoi tutorial 2025-05-30 12:53:03 +02:00
Stefan Werner 74084b62a6 Removed unused DeviceEnterLeave class. 2025-05-30 12:53:03 +02:00
Stefan Werner 5d3fb16f52 Removed superfluous device enter/leave 2025-05-30 12:53:03 +02:00
Attila Afra c9d95ba0a5 fix rare hang in rtcNewDevice with start_threads=1 2025-05-21 17:36:40 +02:00
Opitz, Daniel ffc56d50a3 fix update doc 2025-04-14 15:06:34 +02:00
Opitz, Daniel ff9381774d renamed test-package job, needed for creating zip with test data 2025-04-03 11:23:50 +02:00
Opitz, Daniel 019ba6d17a update doc 2025-04-03 11:23:50 +02:00
Krzysztof Raszkowski 10ae03d055 ci: disable signing on windows for non-release build jobs 2025-04-03 11:23:50 +02:00
Krzysztof Raszkowski addfbe445f ci: fix integrate workflow 2025-04-03 11:23:50 +02:00
Krzysztof Raszkowski e5462f2cfa ci: remove unused test-package job from release workflow 2025-04-03 11:23:50 +02:00
Krzysztof Raszkowski 83638b8d8c Remove unused .gitlab-ci.yml file 2025-04-03 11:23:50 +02:00
Daniel Opitz 4b61757b22 removed dpcpp-version from release-linux-sycl-test job 2025-04-03 11:23:50 +02:00
Daniel Opitz 93c9c89681 using libXXX.so* semantics 2025-04-03 11:23:50 +02:00
Daniel Opitz 64b76be95c updated dpcpp v6.0.0 runtime in package.cmake 2025-04-03 11:23:50 +02:00
Werner, Stefan c5537a6bd6 Disabled memory compression for acceleration buffer 2025-04-03 11:23:50 +02:00
Werner, Stefan ba517079fe Ensuring that instances point to acceleration structures
in device memory, not host memory.
2025-04-03 11:23:50 +02:00
Stefan Werner 63149e6130 Removed vscode files, not part of this PR 2025-04-03 11:23:50 +02:00
Daniel Opitz 80314bf690 update compiler to intel llvm v6.0.0 for all release jobs also CPU 2025-04-03 11:23:50 +02:00
Daniel Opitz f5e0758c00 update compiler to intel llvm v6.0.0 for all release jobs 2025-04-03 11:23:50 +02:00
Opitz, Daniel 6f93917407 fixing host_device tutorial race condition 2025-04-03 11:23:50 +02:00
Daniel Opitz 4b57496a8a fixing embree_info and embree_minimal sycl tutorials missing DL_LIBS 2025-04-03 11:23:50 +02:00
Daniel Opitz a3919b2c92 disabled internal driver tests 2025-04-03 11:23:50 +02:00
Werner, Stefan ea542e245a Moved buffer releases in host/device tutorial 2025-04-03 11:23:50 +02:00
Daniel Opitz c8e3beccf4 disabled internal driver tests for release 2025-04-03 11:23:50 +02:00
Daniel Opitz 61b12a6403 removed bvh data host device test, not needed any more 2025-04-03 11:23:50 +02:00
Daniel Opitz b906dd1528 updated windows internal driver version 2025-04-03 11:23:50 +02:00
Opitz, Daniel fc8faf2eca updated windows public driver, upgraded dg2 tests to ubuntu24.04
fixed coverity issue
update gfx-ubuntu24-internal/public.env for CI
update linux intenal drivers
fix linux release CI
fix integration CI
2025-04-03 11:23:50 +02:00
Werner, Stefan f7ad905b48 Fixed mistake in async buffer copies
Fixed forest tutorial
Skip pvc tests in nightly.yml
fixed unititialized empty geometry commit segfault
2025-04-03 11:23:50 +02:00
Werner, Stefan 60758bac66 Removed redundant copies in host/device tutorial 2025-04-03 11:23:50 +02:00
Daniel Opitz 603b99ecbe skip pvc tests 2025-04-03 11:23:50 +02:00
Daniel Opitz bb03d0566a removed EMBREE_SYCL_BVH_DATA_HOST_DEVICE cmake option and made it enabled by default 2025-04-03 11:23:50 +02:00
Werner, Stefan af901d03bc little cleanup 2025-04-03 11:23:50 +02:00
Werner, Stefan a11ba1c566 Fixed uninitialized memory 2025-04-03 11:23:50 +02:00
Werner, Stefan 2c07ed91c7 Device buffers are now automatically updated on Geometry::commit()
Fixed missing changes in last commit

fix build without SYCL
2025-04-03 11:23:50 +02:00
Opitz, Daniel 8ebdca48ff documentation: rtcTraversable invalidation on rtcCommit 2025-04-03 11:23:50 +02:00
Opitz, Daniel ae0d25af1b removed internal rtas builder, made EMBREE_SYCL_L0_RTAS_BUILDER the default 2025-04-03 11:23:50 +02:00
Florian Reibold ad783d61b3 fix issues with host/device memory API on iGPU
fix blender segfault with geometry == NULL inside geometries array
2025-04-03 11:23:50 +02:00
Florian Reibold 8270bf6add remove timing output from dynamic scene tutorial 2025-04-03 11:23:50 +02:00
Florian Reibold 64ff62c186 update internal Linux and Window driver in CI 2025-04-03 11:23:50 +02:00
Florian Reibold cddc5568fa changelog, typos 2025-04-03 11:23:50 +02:00
Florian Reibold f947535e3a add CI test for BVH data in host device memory 2025-04-03 11:23:50 +02:00
Florian Reibold 02f75622b1 add export filters for commit with queue API functions 2025-04-03 11:23:50 +02:00
Florian Reibold dd6a858626 more general documentation 2025-04-03 11:23:50 +02:00
Florian Reibold 2910c1cb9c documentation for ray queries using RTCTraversable 2025-04-03 11:23:50 +02:00
Florian Reibold 3af46d8b0d updating general intro documentation 2025-04-03 11:23:50 +02:00
Florian Reibold 3637dbac2a make rtcCommitSceneWithQueue work with out-of-order SYCL queues, too 2025-04-03 11:23:50 +02:00
Florian Reibold cc1607391f change rtcCommit???WithQueue interface to return sycl::event 2025-04-03 11:23:50 +02:00
Florian Reibold 6cf2559b68 docu fixes 2025-04-03 11:23:50 +02:00
Florian Reibold 69d40956f6 revert accidental changes in ray flag settings 2025-04-03 11:23:50 +02:00
Florian Reibold 9c7cb086a1 rename memory types and account for host unified memory in buffer constructor 2025-04-03 11:23:50 +02:00
Florian Reibold 82fd9f914a update rtcCommitScene(|WithQueue) documentation 2025-04-03 11:23:50 +02:00
Florian Reibold f13f1e1a92 update rtcSet(New|Shared)GeometryBuffer(|HostDevice) documentation 2025-04-03 11:23:50 +02:00
Florian Reibold 29a9ab4a81 fix wrong deallocation in multi_instance_geometry tutorial. 2025-04-03 11:23:50 +02:00
Florian Reibold 22c905ed1d update documentation for RTCBuffer 2025-04-03 11:23:50 +02:00
Florian Reibold 4b314d6f80 add nightly Windows multilevel test. 2025-04-03 11:23:50 +02:00
Florian Reibold e998566224 refactor alloc. remove global (tls) SYCL context and device. 2025-04-03 11:23:50 +02:00
Florian Reibold ae0216c37b rename host_device_memory tutorial and add CI tests 2025-04-03 11:23:50 +02:00
Florian Reibold a6ef3c576b clear host scratch space for static scenes 2025-04-03 11:23:50 +02:00
Florian Reibold 4b12d9ccd7 add cmake option for explicit host/device BVH data 2025-04-03 11:23:50 +02:00
Florian Reibold 20a3271158 add sycl events for sychronization 2025-04-03 11:23:50 +02:00
Florian Reibold 41e5c508dc less alloc/free when creating device representation of scenen/geometry 2025-04-03 11:23:50 +02:00
Florian Reibold 841c38d479 small fix for validation API 2025-04-03 11:23:50 +02:00
Florian Reibold dc04f514f5 add padding to tree vertex and color data buffers for safe SIMD
access.
2025-04-03 11:23:50 +02:00
Florian Reibold 262ddeab3f create CPP from ISPC tutorials 2025-04-03 11:23:50 +02:00
Florian Reibold 8c61fa8e6b add ISPC API using RTCTraversable 2025-04-03 11:23:50 +02:00
Florian Reibold 0bd824bc42 change API naming for buffers form 'Ex' to 'HostDevice' 2025-04-03 11:23:50 +02:00
Florian Reibold 3884815a2a port forest tutorial to new host/device memory support 2025-04-03 11:23:50 +02:00
Florian Reibold e165912ff7 port of multi_instanced_geometry tutorial to RTCTraversable
interface was missing
2025-04-03 11:23:50 +02:00
Florian Reibold 586ab7dac0 do not use ALIGNED_STRUCT_ macro for Scene and Geometry 2025-04-03 11:23:50 +02:00
Florian Reibold ec485c0fa3 cleanups 2025-04-03 11:23:50 +02:00
Florian Reibold d31a716ef0 test address sanitizer issue 2025-04-03 11:23:50 +02:00
Florian Reibold 7ac3bc9215 rework buffer interface 2025-04-03 11:23:50 +02:00
Florian Reibold b8d5cb62de memory passing interface 2025-04-03 11:23:50 +02:00
Florian Reibold fe29c248b3 scene is now in device memory, too. USM shared memory is now only
used in tutorials.

introduced read only handle RTCTraversable which is accessible on
the device.
2025-04-03 11:23:50 +02:00
Florian Reibold 438bed4153 add debug tutorial and restore state of other tutorials 2025-04-03 11:23:50 +02:00
Florian Reibold f2b1f68a38 BVH buffer in explicitly managed host/device memory on systems
without unified memory (e.g. dGPUs) geometry data works
2025-04-03 11:23:50 +02:00
Florian Reibold b8a39ceb63 fix wrong assert about maxTimeSegments. fix missing sign-extension when using device memory for BVH data. 2025-04-03 11:23:50 +02:00
Werner, Stefan 9d68d984ee Suppressed warnings with latest clang/sycl compiler
warning: first argument in call to 'memset' is a pointer to non-trivially copyable type
2025-04-03 11:23:50 +02:00
Stefan Werner 8ea9d339db Version update to 4.4.0 2025-04-03 11:23:50 +02:00
Krzysztof Raszkowski 7d3ffd6ace internal ci: update dependencies 2025-04-03 11:23:50 +02:00
Florian Reibold d0e68a8505 remove requirement for CPU feature RDRAND 2025-04-03 11:23:50 +02:00
Florian Reibold 1e0cb32530 refactor scene array for (multi-level) instancing into struct 2025-04-03 11:23:50 +02:00
Florian Reibold c588265f39 simplify intersect_instance and intersect_instance_array 2025-04-03 11:23:50 +02:00
Florian Reibold 3d07f067b2 update dpcpp runtime dependencies for installation 2025-04-03 11:23:50 +02:00
Florian Reibold 90ff25e3f7 update driver versions for CI tests 2025-04-03 11:23:50 +02:00
Florian Reibold e4bcb4a421 update sycl nightly version for CI tests 2025-04-03 11:23:50 +02:00
Woop, Sven 285ebef991 Removed usage of no longer supported SYCL subgroup shuffles. 2025-04-03 11:23:50 +02:00
Daniel 3c9936cb6b fix public ci (#2732) 2024-07-23 10:50:26 +00:00
Florian Reibold 5730b15047 update documentation 2024-07-22 13:36:52 +02:00
Florian Reibold 1ad1d3cfb2 update version in testing package 2024-07-19 21:17:02 +02:00
Florian Reibold aa4449b595 update reusable workflows. 2024-07-19 19:01:43 +02:00
Florian Reibold 562ca4c72b bump version and update changelog 2024-07-19 19:01:43 +02:00
Florian Reibold b1979d6587 Compute hwaccel adresses on the fly to prevent back-migration of BVH data. 2024-07-19 19:01:43 +02:00
alvinhochun bc7cf847bc Fix include order causing unwanted dllexport symbols 2024-07-19 19:01:43 +02:00
Florian Reibold cba58a9eea disable unneccessary stripping of files on Windows to WA binary signing issue. 2024-07-19 19:01:43 +02:00
Florian Reibold e76447284a Update API documentation and changelog.
Adds documenation about RTC_ERROR_LEVEL_ZERO_RAYTRACING_SUPPORT_MISSING,
rtcGetDeviceLastErrorMessage, and rtcGetErrorString.
2024-07-19 19:01:43 +02:00
Florian Reibold 7f0ed1bb46 Add RTC_ERROR_LEVEL_ZERO_RAYTRACING_SUPPORT_MISSING and the API
functions rtcGetDeviceLastErrorMessage and rtcGetErrorString.
2024-07-19 19:01:43 +02:00
Florian Reibold 1fbc2c235d fix unused variable warning 2024-07-19 19:01:43 +02:00
Florian Reibold 473de4fd20 fix sycl header path warning 2024-07-19 19:01:43 +02:00
Florian Reibold 8be1eb5635 test new public Windows driver. 2024-07-19 19:01:43 +02:00
Florian Reibold 28bf9e8111 update to sycl nightly-2024-06-12 2024-07-19 19:01:43 +02:00
Werner, Stefan fa975f976a Cleaned up whitespace 2024-07-18 21:13:18 +02:00
Werner, Stefan 1ea2ccbbfe Split array of Scene* into root and instances
Using an array of size > 1 results in the SYCL compiler to move the
data to private memory. By keeping the root Scene* in a separate
variable instead of the same array as instances, the compiler can
now promote it to registers.
2024-07-18 21:13:18 +02:00
Werner, Stefan f849c2fa24 Fixed duplicate SYCL context
The tutorials accientally used two SYCL contexts.
2024-07-18 15:32:05 +02:00
Florian Reibold 9f5d414d82 revert pipeline renaming 2024-07-16 15:31:13 +02:00
Daniel 51069988cd basic public ci (#2725)
* basic public ci

* public CI for rocky 8 and ubuntu 22
2024-07-12 11:26:08 +02:00
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
676 changed files with 45500 additions and 23534 deletions
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
DPCPP_VERSION=
+1 -1
View File
@@ -1 +1 @@
DPCPP_VERSION=sycl-nightly/20230417
DPCPP_VERSION=intel-llvm/v6.2.0
-1
View File
@@ -1 +0,0 @@
DPCPP_VERSION=sycl-nightly/20230417
@@ -1 +0,0 @@
GFX_DRIVER_VERSION=gfx-driver-builds/ci/master/gfx-driver-ci-master-13324/artifacts/Linux/Ubuntu/22.04/Release
+1 -1
View File
@@ -1 +1 @@
GFX_DRIVER_VERSION=neo-builds/ci/master/ci-neo-master-025905/artifacts/linux/ubuntu/22.04
GFX_DRIVER_VERSION=neo-builds/ci/master/ci-neo-master-033051/artifacts/linux/ubuntu/22.04
+1 -1
View File
@@ -1 +1 @@
GFX_DRIVER_VERSION=neo-builds/releases/releases_23.05/neo-releases-23.05.25593.11/artifacts/linux/ubuntu/22.04
GFX_DRIVER_VERSION=linux-latest
@@ -1 +0,0 @@
GFX_DRIVER_VERSION=neo-builds/releases/releases_23.05/neo-releases-23.05.25593.11/artifacts/linux/ubuntu/20.04
@@ -0,0 +1 @@
GFX_DRIVER_VERSION=neo-builds/ci/master/ci-neo-master-033048/artifacts/linux/ubuntu/24.04
@@ -0,0 +1 @@
GFX_DRIVER_VERSION=linux-latest
+1 -1
View File
@@ -1 +1 @@
GFX_DRIVER_VERSION=gfx-driver-builds/ci/master/gfx-driver-ci-master-13324/artifacts/Windows
GFX_DRIVER_VERSION=gfx-driver-ci-master-20127
+1 -1
View File
@@ -1 +1 @@
GFX_DRIVER_VERSION=gfx-driver-builds/prod/releases_23ww08-ci-master-13370/prod-hini-releases_23ww08-ci-master-13370-revenue-pr-1014250/artifacts/Windows/
GFX_DRIVER_VERSION=windows-latest
@@ -1 +0,0 @@
GFX_DRIVER_VERSION=gfx-driver-builds/prod/releases_23ww08-ci-master-13370/prod-hini-releases_23ww08-ci-master-13370-revenue-pr-1014250/artifacts/Windows/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-155
View File
@@ -1,155 +0,0 @@
## Copyright 2022 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
name: performance
on:
schedule:
- cron: '00 01 * * *'
workflow_dispatch:
jobs:
########################################
# Linux build
########################################
linux-build-SYCL-DPCPP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
with:
image: embree/ubuntu:20.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-release.env
artifact-out: linux-SYCL-DPCPP
artifact-path: ./build/*.tar.gz
cmd: |
source scripts/cmake-presets/linux-env.sh
source ${NAS_LINUX}/intel/oneAPI/compiler/2023.0.0/env/vars.sh
$CMAKE_EXE --preset package-linux-icx-sycl-ispc1_19_0-tbb2021_9_0-perf
$CMAKE_EXE --build build --config Release --target package
$CMAKE_EXE --build build --target post_package
linux-build-x86-ICX-ISPC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: linux-build-x86-ICX-ISPC
artifact-path: ./build/*.tar.gz
cmd: |
source scripts/cmake-presets/linux-env.sh
source $NAS_LINUX/intel/oneAPI/compiler/2023.1.0/env/vars.sh
$CMAKE_EXE --preset package-linux-icx-ispc1_19_0-tbb2021_9_0-perf
$CMAKE_EXE --build build --config Release --target package
$CMAKE_EXE --build build --target post_package
linux-test-DG2-A770-perf:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-build-SYCL-DPCPP"]
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-release.env
artifact-in: linux-SYCL-DPCPP
setup-benny: true
cmd: |
source <(scripts/test.py env --debug)
cd build
tar -xf embree-?.?.?.sycl.x86_64.linux.tar.gz
cd bin
chmod +x ../embree-vars.sh
../embree-vars.sh
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
linux-test-PVC-perf:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-build-SYCL-DPCPP"]
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-release.env
artifact-in: linux-SYCL-DPCPP
setup-benny: true
cmd: |
export NEOReadDebugKeys=1
# Run it on single tile (disable implicit scaling)
export EnableImplicitScaling=0
source <(scripts/test.py env --debug)
cd build
tar -xf embree-?.?.?.sycl.x86_64.linux.tar.gz
cd bin
chmod +x ../embree-vars.sh
../embree-vars.sh
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
linux-test-i9-12900k:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@devel
needs: ["linux-build-x86-ICX-ISPC"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-i9-12900k-1" ]'
artifact-in: linux-build-x86-ICX-ISPC
setup-benny: true
cmd: |
cd build
tar -xf embree-?.?.?.x86_64.linux.tar.gz
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
linux-test-x8380-1:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["linux-build-x86-ICX-ISPC"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-x8380-1" ]'
artifact-in: linux-build-x86-ICX-ISPC
setup-benny: true
cmd: |
cd build
tar -xf embree-?.?.?.x86_64.linux.tar.gz
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
linux-test-x8280-1:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["linux-build-x86-ICX-ISPC"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-x8280-1" ]'
artifact-in: linux-build-x86-ICX-ISPC
setup-benny: true
cmd: |
cd build
tar -xf embree-?.?.?.x86_64.linux.tar.gz
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
linux-test-a3970x-1:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["linux-build-x86-ICX-ISPC"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-a3970x-1" ]'
artifact-in: linux-build-x86-ICX-ISPC
setup-benny: true
cmd: |
cd build
tar -xf embree-?.?.?.x86_64.linux.tar.gz
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
+116
View File
@@ -0,0 +1,116 @@
## Copyright 2024 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
name: continuous (public)
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
rocky-8:
runs-on: ubuntu-latest
container:
image: rockylinux:8
steps:
- name: Install packages (rocky 8)
run: |
yum -y install epel-release
yum -y install gcc-c++ clang tar git-lfs make tbb-devel freeglut-devel glfw-devel libXmu-devel libXi-devel python3
yum -y install cmake
yum -y install libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel
yum -y install ncurses-compat-libs
yum -y install environment-modules
dnf makecache --refresh
dnf config-manager --set-enabled powertools
dnf -y update
dnf -y install ninja-build
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build and Run
run: |
mkdir build
cd build
cmake -DBUILD_TESTING=ON -DEMBREE_TUTORIALS=ON -DEMBREE_ISPC_SUPPORT=OFF -DEMBREE_TESTING_INTENSITY=3 ..
make -j$(nproc)
ctest
ubuntu-24-tbb-and-ispc-from-os:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
steps:
- name: Install packages (ubuntu 24.04)
run: |
apt-get update
apt-get -y upgrade
apt-get -y install g++ cmake git-lfs freeglut3-dev libglfw3-dev libxmu-dev libxi-dev unzip xorg-dev pip libtbb-dev ispc
apt-get -y install libopenimageio-dev
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build and Run
run: |
mkdir build
cd build
cmake -DBUILD_TESTING=ON -DEMBREE_TUTORIALS=ON -DEMBREE_ISPC_SUPPORT=ON -DEMBREE_TESTING_INTENSITY=3 ..
make -j$(nproc)
ctest
ubuntu-24-tbb-and-ispc-prebuilt:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
steps:
- name: Install packages (ubuntu 24.04)
run: |
apt-get update
apt-get -y upgrade
apt-get -y install g++ cmake git-lfs freeglut3-dev libglfw3-dev libxmu-dev libxi-dev unzip xorg-dev pip
apt-get -y install libopenimageio-dev
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build and Run
run: |
mkdir build
cd build
cmake -D EMBREE_EXTRA_OPTIONS="-DBUILD_TESTING=ON -DEMBREE_TUTORIALS=ON -DEMBREE_ISPC_SUPPORT=ON -DEMBREE_TESTING_INTENSITY=3" ../superbuild
cmake --build .
cd embree/build
ctest
ubuntu-24-tbb-src-ispc-prebuilt:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
steps:
- name: Install packages (ubuntu 24.04)
run: |
apt-get update
apt-get -y upgrade
apt-get -y install g++ cmake git-lfs freeglut3-dev libglfw3-dev libxmu-dev libxi-dev unzip xorg-dev pip
apt-get -y install libopenimageio-dev
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build and Run
run: |
mkdir build
cd build
cmake -D BUILD_TBB_FROM_SOURCE=ON -D EMBREE_EXTRA_OPTIONS="-DBUILD_TESTING=ON -DEMBREE_TUTORIALS=ON -DEMBREE_ISPC_SUPPORT=ON -DEMBREE_TESTING_INTENSITY=3" ../superbuild
cmake --build .
cd embree/build
ctest
+302 -113
View File
@@ -3,190 +3,379 @@
name: release
permissions: read-all
on:
schedule:
- cron: '00 00 * * *'
- cron: '01 00 * * *'
workflow_dispatch:
jobs:
#####################################################################
# Release Builds
####################################################################
release-windows-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP:
# CPU Builds and Tests
####################################################################
build-windows:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
with:
runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
artifact-out: release-windows-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
runs-on: '[ "Windows", "build"]'
artifact-out: build-windows
artifact-path: ./build/embree-*.zip
shell: cmd
dpcpp-version: intel-llvm/v6.2.0
cmd: |
call "C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\2023.1.0\\env\\vars.bat"
cmake --preset package-windows-icx-ispc1_19_0-tbb2021_9_0
cmake --build build --config Release --target package
cmake --build build --target post_package
cmake --build build --target test_package
$opts = "-DCMAKE_BUILD_TYPE=Release"
$opts += " -DBUILD_TESTING=ON"
$opts += " -DEMBREE_TUTORIALS=ON"
$opts += " -DEMBREE_ISPC_SUPPORT=ON"
$opts += " -DEMBREE_TESTING_INTENSITY=3"
$opts += " -DEMBREE_MAX_ISA=AVX512"
$opts += " -DEMBREE_INSTALL_DEPENDENCIES=ON"
$opts += " -DEMBREE_TESTING_INSTALL_TESTS=ON"
$opts += " -DCMAKE_INSTALL_TESTDIR=testing"
$opts += " -DEMBREE_ZIP_MODE=ON"
cmake -S superbuild -B build -G Ninja -D EMBREE_EXTRA_OPTIONS="$opts"
cmake --build build --config Release
cmake --build build/embree/build --config Release --target build
Copy-Item build/embree/build/embree-*.zip build/ -Force
release-macosx-x64-Release-CLANG-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP:
windows-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@devel
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
needs: ["build-windows"]
strategy:
fail-fast: false
matrix:
platform: [avx2, avx512]
with:
runs-on: '[ "Windows", "${{ matrix.platform }}" ]'
artifact-in: build-windows
cmd: |
$EmbreeDir = .\\scripts\\prepare-test-files.ps1 -TestType ctest
.\\scripts\\run-tests.ps1 -TestType ctest -EmbreeDir $EmbreeDir -CtestConfig Release
build-macosx-x86_64:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-out: release-macosx-x64-Release-CLANG-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-path: ./build/*.zip
cmd: |
source scripts/cmake-presets/macos-env.sh
$CMAKE_EXE --preset package-macos-gcc-ispc1_19_0-tbb2021_9_0
$CMAKE_EXE --build build --config Release --target package
$CMAKE_EXE --build build --target post_package
opts="-DCMAKE_BUILD_TYPE=Release"
opts+=" -DBUILD_TESTING=ON"
opts+=" -DEMBREE_TUTORIALS=ON"
opts+=" -DEMBREE_ISPC_SUPPORT=ON"
opts+=" -DEMBREE_TESTING_INTENSITY=3"
opts+=" -DCMAKE_CXX_COMPILER=clang++"
opts+=" -DCMAKE_C_COMPILER=clang"
opts+=" -DCMAKE_INSTALL_BINDIR=bin"
opts+=" -DCMAKE_INSTALL_DOCDIR=doc"
opts+=" -DCMAKE_INSTALL_INCLUDEDIR=include"
opts+=" -DCMAKE_INSTALL_TESTDIR=testing"
opts+=" -DCMAKE_MACOSX_RPATH=ON"
opts+=" -DCMAKE_SKIP_INSTALL_RPATH=OFF"
opts+=" -DEMBREE_BUILD_GLFW_FROM_SOURCE=ON"
opts+=" -DEMBREE_INSTALL_DEPENDENCIES=ON"
opts+=" -DEMBREE_MAX_ISA=AVX512"
opts+=" -DEMBREE_PATCH_GLFW_SOURCE=ON"
opts+=" -DEMBREE_TASKING_SYSTEM=TBB"
opts+=" -DEMBREE_TESTING_INSTALL_TESTS=ON"
opts+=" -DEMBREE_ZIP_MODE=ON"
opts+=" -DCPACK_PRE_BUILD_SCRIPTS=$CPACK_PRE_BUILD_SIGNING_SCRIPT"
cmake -S superbuild -B build -D EMBREE_EXTRA_OPTIONS="$opts"
cmake --build build --config Release
cmake --build build/embree/build --config Release --target build
cp build/embree/build/embree-*.zip build/
notarize-package: ./build/embree-*.x86_64.macosx.zip
artifact-out: build-macosx-x86_64
artifact-path: ./build/embree-*.zip
release-linux-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP:
test-macosx-x86_64:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: ["build-macosx-x86_64"]
strategy:
fail-fast: false
matrix:
platform: [arm, x86_64]
with:
runs-on: '[ "macOS", "${{ matrix.platform }}" ]'
artifact-in: build-macosx-x86_64
cmd: |
EMBREE_PATH=$(./scripts/prepare-test-files-macos.sh --type ctest)
./scripts/run-tests.sh --type ctest --embree-dir "$EMBREE_PATH" --ctest-config Release
build-macosx-arm:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "build", "arm" ]'
cmd: |
opts="-DCMAKE_BUILD_TYPE=Release"
opts+=" -DBUILD_TESTING=ON"
opts+=" -DEMBREE_TUTORIALS=ON"
opts+=" -DEMBREE_ISPC_SUPPORT=ON"
opts+=" -DEMBREE_TESTING_INTENSITY=3"
opts+=" -DCMAKE_CXX_COMPILER=clang++"
opts+=" -DCMAKE_C_COMPILER=clang"
opts+=" -DCMAKE_INSTALL_BINDIR=bin"
opts+=" -DCMAKE_INSTALL_DOCDIR=doc"
opts+=" -DCMAKE_INSTALL_INCLUDEDIR=include"
opts+=" -DCMAKE_INSTALL_TESTDIR=testing"
opts+=" -DCMAKE_MACOSX_RPATH=ON"
opts+=" -DCMAKE_SKIP_INSTALL_RPATH=OFF"
opts+=" -DEMBREE_BUILD_GLFW_FROM_SOURCE=ON"
opts+=" -DEMBREE_INSTALL_DEPENDENCIES=ON"
opts+=" -DEMBREE_MAX_ISA=NEON2X"
opts+=" -DEMBREE_PATCH_GLFW_SOURCE=ON"
opts+=" -DEMBREE_TASKING_SYSTEM=TBB"
opts+=" -DEMBREE_TESTING_INSTALL_TESTS=ON"
opts+=" -DEMBREE_ZIP_MODE=ON"
opts+=" -DCPACK_PRE_BUILD_SCRIPTS=$CPACK_PRE_BUILD_SIGNING_SCRIPT"
cmake -S superbuild -B build -D BUILD_TBB_FROM_SOURCE=ON -D EMBREE_EXTRA_OPTIONS="$opts"
cmake --build build --config Release
cmake --build build/embree/build --config Release --target build
cp build/embree/build/embree-*.zip build/
notarize-package: build/embree-*.arm64.macosx.zip
artifact-out: build-macosx-arm
artifact-path: ./build/embree-*.zip
test-macosx-arm:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: ["build-macosx-arm"]
strategy:
fail-fast: false
matrix:
platform: [arm]
with:
runs-on: '[ "macOS", "${{ matrix.platform }}" ]'
artifact-in: build-macosx-arm
cmd: |
EMBREE_PATH=$(./scripts/prepare-test-files-macos.sh --type ctest)
./scripts/run-tests.sh --type ctest --embree-dir "$EMBREE_PATH" --ctest-config Release
build-linux:
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: release-linux-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
image: rockylinux:8.7
runs-on: '[ "Linux", "build" ]'
artifact-out: build-linux
artifact-path: ./build/*.tar.gz
dpcpp-version: intel-llvm/v6.2.0
pre-cmd: |
dnf -y install epel-release
dnf -y config-manager --set-enabled powertools
dnf -y install ninja-build
cmd: |
source scripts/cmake-presets/linux-env.sh
source $NAS_LINUX/intel/oneAPI/compiler/2023.1.0/env/vars.sh
$CMAKE_EXE --preset package-linux-icx-ispc1_19_0-tbb2021_9_0
$CMAKE_EXE --build build --config Release --target package
$CMAKE_EXE --build build --target post_package
$CMAKE_EXE --build build --target test_package
opts="-DCMAKE_BUILD_TYPE=Release"
opts+=" -DBUILD_TESTING=ON"
opts+=" -DEMBREE_TUTORIALS=ON"
opts+=" -DEMBREE_ISPC_SUPPORT=ON"
opts+=" -DEMBREE_TESTING_INTENSITY=3"
opts+=" -DEMBREE_MAX_ISA=AVX512"
opts+=" -DEMBREE_INSTALL_DEPENDENCIES=ON"
opts+=" -DEMBREE_TESTING_INSTALL_TESTS=ON"
opts+=" -DCMAKE_INSTALL_TESTDIR=testing"
opts+=" -DEMBREE_ZIP_MODE=ON"
cmake -S superbuild -B build -D EMBREE_EXTRA_OPTIONS="$opts"
cmake --build build --config Release
cmake --build build/embree/build --config Release --target build
cp build/embree/build/embree-*.tar.gz build/
linux-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: ["build-linux"]
strategy:
fail-fast: false
matrix:
platform: [avx512, avx2]
with:
image: ubuntu:24.04
runs-on: '[ "Linux", "${{ matrix.platform }}" ]'
artifact-in: build-linux
cmd: |
EMBREE_PATH=$(./scripts/prepare-test-files.sh --type ctest | tail -1)
./scripts/run-tests.sh --type ctest --embree-dir "$EMBREE_PATH" --ctest-config Release
#####################################################################
# DPC++ Release Builds
####################################################################
release-windows-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP:
# SYCL Builds and Tests
####################################################################
build-windows-sycl:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@devel
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-internal.env
artifact-out: release-windows-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
runs-on: '[ "Windows", "build" ]'
dpcpp-version: intel-llvm/v6.2.0
artifact-out: build-windows-sycl
artifact-path: ./build/*.zip
shell: cmd
cmd: |
call "C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\2023.1.0\\env\\vars.bat"
cmake --preset package-windows-icx-sycl-ispc1_19_0-tbb2021_9_0
cmake --build build --config Release --target package
cmake --build build --target post_package
cmake --build build --target test_package
$opts = "-DCMAKE_BUILD_TYPE=Release"
$opts += " -DBUILD_TESTING=ON"
$opts += " -DEMBREE_TUTORIALS=ON"
$opts += " -DEMBREE_ISPC_SUPPORT=ON"
$opts += " -DEMBREE_TESTING_INTENSITY=3"
$opts += " -DEMBREE_SYCL_SUPPORT=ON"
$opts += " -DEMBREE_SYCL_AOT_DEVICES=none"
$opts += " -DEMBREE_MAX_ISA=AVX512"
$opts += " -DEMBREE_INSTALL_DEPENDENCIES=ON"
$opts += " -DEMBREE_TESTING_INSTALL_TESTS=ON"
$opts += " -DCMAKE_INSTALL_TESTDIR=testing"
$opts += " -DEMBREE_ZIP_MODE=ON"
cmake -S superbuild -B build -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -D EMBREE_EXTRA_OPTIONS="$opts"
cmake --build build --config Release
cmake --build build/embree/build --config Release --target build
Copy-Item build/embree/build/embree-*.zip build/ -Force
# FIXME: remove this AOT release once JIT properly tested in CI
#release-windows-x64-Release-SYCL-ICX2023_0_0-AOT-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "dg2" ]'
# artifact-out: release-windows-x64-Release-SYCL-ICX2023_0_0-AOT-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
# artifact-path: ./build/*.zip
# cmd: |
# python scripts/test.py configure platform:x64 build:Release compiler:dpcpp EMBREE_SYCL_SUPPORT:ON sycl:dg2 gfx:RELEASE ispc:ispc1.18.1 isas:SSE2-SSE42-AVX-AVX2-AVX512 intensity:4 package:ZIP
# python scripts/test.py build
# python scripts/test.py test
release-linux-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP:
build-linux-sycl:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.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-release.env
artifact-out: release-linux-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
image: rockylinux:8.7
runs-on: '[ "Linux", "build" ]'
dpcpp-version: intel-llvm/v6.2.0
artifact-out: build-linux-sycl
artifact-path: ./build/*.tar.gz
pre-cmd: |
dnf -y install epel-release
dnf -y config-manager --set-enabled powertools
dnf -y install ninja-build
cmd: |
source scripts/cmake-presets/linux-env.sh
source ${NAS_LINUX}/intel/oneAPI/compiler/2023.0.0/env/vars.sh
$CMAKE_EXE --preset package-linux-icx-sycl-ispc1_19_0-tbb2021_9_0
$CMAKE_EXE --build build --config Release --target package
$CMAKE_EXE --build build --target post_package
$CMAKE_EXE --build build --target test_package
opts="-DCMAKE_BUILD_TYPE=Release"
opts+=" -DBUILD_TESTING=ON"
opts+=" -DEMBREE_TUTORIALS=ON"
opts+=" -DEMBREE_ISPC_SUPPORT=ON"
opts+=" -DEMBREE_TESTING_INTENSITY=3"
opts+=" -DEMBREE_SYCL_SUPPORT=ON"
opts+=" -DEMBREE_SYCL_AOT_DEVICES=none"
opts+=" -DEMBREE_MAX_ISA=AVX512"
opts+=" -DEMBREE_INSTALL_DEPENDENCIES=ON"
opts+=" -DEMBREE_TESTING_INSTALL_TESTS=ON"
opts+=" -DCMAKE_INSTALL_TESTDIR=testing"
opts+=" -DEMBREE_ZIP_MODE=ON"
cmake -S superbuild -B build -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -D EMBREE_EXTRA_OPTIONS="$opts"
cmake --build build --config Release
cmake --build build/embree/build --config Release --target build
cp build/embree/build/embree-*.tar.gz build/
windows-sycl-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
needs: ["build-windows-sycl"]
strategy:
fail-fast: false
matrix:
platform: [dg2, bmg, lnl]
with:
runs-on: '[ "Windows", "${{ matrix.platform }}" ]'
env-from-files: ./.github/workflows/gfx-windows-public.env
artifact-in: build-windows-sycl
cmd: |
$EmbreeDir = .\\scripts\\prepare-test-files.ps1 -TestType ctest
.\\scripts\\run-tests.ps1 -TestType ctest -EmbreeDir $EmbreeDir -CtestConfig Release
linux-sycl-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: ["build-linux-sycl"]
strategy:
fail-fast: false
matrix:
platform: [dg2, pvc, atsm]
with:
image: ubuntu:24.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "${{ matrix.platform }}" ]'
env-from-files: ./.github/workflows/gfx-ubuntu24-public.env
artifact-in: build-linux-sycl
cmd: |
EMBREE_PATH=$(./scripts/prepare-test-files.sh --type ctest | tail -1)
./scripts/run-tests.sh --type ctest --embree-dir "$EMBREE_PATH" --ctest-config Release
#####################################################################
####################################################################
# Release binaries scans
#####################################################################
####################################################################
binary-analysis:
needs:
- release-windows-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- release-macosx-x64-Release-CLANG-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- release-linux-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- build-windows
- build-macosx-x86_64
- build-linux
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
project: embree
artifact-in-windows: release-windows-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-macos: release-macosx-x64-Release-CLANG-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-linux: release-linux-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-windows: build-windows
artifact-in-macos: build-macosx-x86_64
artifact-in-linux: build-linux
path: "build/*.zip build/*.gz"
antivirus-scan:
needs:
- release-windows-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- release-macosx-x64-Release-CLANG-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- release-linux-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- build-windows
- build-macosx-x86_64
- build-linux
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-windows: release-windows-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-macos: release-macosx-x64-Release-CLANG-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-linux: release-linux-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-windows: build-windows
artifact-in-macos: build-macosx-x86_64
artifact-in-linux: build-linux
path: "build/*.zip build/*.gz"
binary-analysis-dpcpp:
binary-analysis-sycl:
needs:
- release-windows-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- release-linux-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- build-windows-sycl
- build-linux-sycl
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
project: embree
artifact-in-windows: release-windows-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-linux: release-linux-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-windows: build-windows-sycl
artifact-in-linux: build-linux-sycl
path: "build/*.zip build/*.gz"
artifact-out-name: "binary-analysis-dpcpp"
artifact-out-name: "binary-analysis-sycl"
antivirus-scan-dpcpp:
antivirus-scan-sycl:
needs:
- release-windows-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- release-linux-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
- build-windows-sycl
- build-linux-sycl
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-windows: release-windows-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-linux: release-linux-x64-Release-SYCL-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-in-windows: build-windows-sycl
artifact-in-linux: build-linux-sycl
path: "build/*.zip build/*.gz"
artifact-out-name: "antivirus-scan-dpcpp"
artifact-out-name: "antivirus-scan-sycl"
#####################################################################
# Testing package
#####################################################################
test-package:
binary-analysis-arm:
needs:
- build-macosx-arm
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [release-linux-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-release.env
artifact-in: release-linux-x64-Release-ICX2023_1_0-ISPC1_19_0-TBB2021_9_0-PACKAGE-ZIP
artifact-out: release-testing-PACKAGE-ZIP
artifact-path: ./build/*.tar.gz
cmd: |
rm build/embree-4.2.0.x86_64.linux.tar.gz
mv build/embree-4.2.0.x86_64.linux-testing.tar.gz build/embree-4.2.0-testing.tar.gz
artifact-in-macos: build-macosx-arm
path: "build/*.zip"
artifact-out-name: "binary-analysis-arm"
antivirus-scan-arm:
needs:
- build-macosx-arm
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-macos: build-macosx-arm
path: "build/*.zip"
artifact-out-name: "antivirus-scan-arm"
+2
View File
@@ -9,3 +9,5 @@ kernels/config.h
kernels/hash.h
include/embree4/rtcore_config.h
build
build*
out
-63
View File
@@ -1,63 +0,0 @@
## 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:
- benchmark
####################################################################
# 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 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"
- "scripts/test.py run-benchmark.sh"
needs: []
benchmark_nightly:
extends: .benchmark
only: [web, schedules]
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
+56
View File
@@ -1,6 +1,62 @@
Version History
---------------
### Embree 4.4.1
- Enabled support for Intel® Core™ Ultra series 3 integrated GPUs.
- Added specialization constants for curves, motion blur, and motion blurred instances to reduce code complexity.
- Enabled AVX512 support with MSVC compiler.
- Fixed numerous potential uninitialized variables, integer over/underflows, and out-of-bounds accesses.
- Fixed bounds checking for buffer stride and grid dimensions.
- Fixed rare hang in rtcNewDevice when using single thread mode (start_threads=1).
- Fixed morton builder for instance arrays.
- Improved compiler warning handling for C++26, GCC, and ARM builds.
- Improved AVX512 flag consistency between GCC and Clang.
- Updated TinyEXR dependency to fix resource leaks.
- Reduced memory copies and improved move semantics usage.
- Bumped CMake minimum required version to 3.10.
### Embree 4.4.0
- Added support for passing geometry data to Embree using explicit host and SYCL device memory (see `rtcSetSharedGeometryBufferHostDevice`, `rtcNewBufferHostDevice`, and other API calls with `HostDevice` suffix).
- Embree does not use SYCL shared memory anymore internally on systems without host unified memory (i.e., discrete GPUs). Therefore, memory transfers are triggered by specific Embree API calls (e.g. `rtcCommitScene`, `rtcCommitBuffer`).
- Objects of type `RTCScene` are not accessible on a SYCL device anymore. Ray queries on SYCL devices must be performed using `RTCTraversable` objects and the `rtcTraversableIntersect` and `rtcTraversableOccluded` API calls.
- Embree does not query the availability of RDRAND for its ISA detection anymore, which caused issues on some older AMD CPUs.
- Performance improvements on GPU for the two level instancing case (RTC_MAX_INSTANCE_LEVEL_COUNT 2).
### Embree 4.3.3
- Added RTCError RTC_ERROR_LEVEL_ZERO_RAYTRACING_SUPPORT_MISSING which can indicate a GPU driver that is too old or not installed properly.
- Added the API function rtcGetDeviceLastErrorMessage to query additional information about the last RTCError returned by rtcGetDeviceError. This can be used in case device creation failed and a rtcErrorFunction could not be set up for this purpose.
- Added the API function rtcGetErrorString which returns a string representation of a given RTCError error code. This is purely meant for convenient error information reporting on the user application side.
- Performance improvements on GPU for the one level instancing case (RTC_MAX_INSTANCE_LEVEL_COUNT 1).
- Reduced the number of unnecessary GPU-CPU USM back-migrations which can increase build performance for scene with many instances on GPU.
- Started adding public CI tests for streamlining integration of external pull requests.
- Work-around for problem with unsigned Windows binaries.
### Embree 4.3.2
- Embree now uses level zero raytracing extension to build BVH which enables forward-compatibility. On Linux, the package intel-level-zero-gpu-raytracing has to be installed in addition to the other packages listed here [https://dgpu-docs.intel.com/](https://dgpu-docs.intel.com/).
- MacOS universal binary compilation now works.
- Some bugfixes for AVX512 on MacOS x86 machines.
- Known issue: It is recommended to run Embree on Intel® Data Center GPU Max Series (e.g. Intel® Data Center GPU Max 1550) with the following environment settings: NEOReadDebugKeys=1 UseKmdMigration=0
- Known issue: ISPC version of tutorials will not successfully build with MacOS universal binary compilation.
### 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 memory 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.
+13 -22
View File
@@ -1,11 +1,11 @@
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
SET(EMBREE_VERSION_MAJOR 4)
SET(EMBREE_VERSION_MINOR 2)
SET(EMBREE_VERSION_PATCH 0)
SET(EMBREE_VERSION_MINOR 4)
SET(EMBREE_VERSION_PATCH 1)
SET(EMBREE_VERSION_NOTE "")
SET(EMBREE_VERSION ${EMBREE_VERSION_MAJOR}.${EMBREE_VERSION_MINOR}.${EMBREE_VERSION_PATCH})
@@ -57,18 +57,9 @@ IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
ENDIF()
IF(COMMAND cmake_policy)
if (POLICY CMP0003)
cmake_policy(SET CMP0003 NEW)
endif()
if (POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW)
endif()
if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW)
endif()
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
@@ -205,10 +196,11 @@ 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_MAX_INSTANCE_LEVEL_COUNT EQUAL 1)
message(FATAL_ERROR "EMBREE_MAX_INSTANCE_LEVEL_COUNT must be 1 when EMBREE_GEOMETRY_INSTANCE is disabled")
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)
@@ -226,10 +218,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()
@@ -285,6 +277,9 @@ 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)
SET(CMAKE_CONFIGURATION_TYPES "${CONFIGURATION_TYPES}" CACHE STRING "List of generated configurations." FORCE)
@@ -293,8 +288,7 @@ IF (WIN32)
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
IF ((${CMAKE_CXX_COMPILER_ID} MATCHES "IntelLLVM") OR
(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND ${CMAKE_CXX_COMPILER} MATCHES "icx") OR
(${CMAKE_CXX_COMPILER} MATCHES "dpcpp"))
(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND COMPILER_HAS_SYCL_SUPPORT))
MESSAGE("-- DPCPP compiler detected")
INCLUDE(dpcpp)
ELSEIF(${CMAKE_GENERATOR_TOOLSET} MATCHES "^LLVM")
@@ -311,9 +305,6 @@ IF (WIN32)
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()
MESSAGE("-- MSVC detected")
INCLUDE (msvc)
ENDIF()
@@ -397,7 +388,7 @@ IF (EMBREE_MAX_ISA STREQUAL "NONE")
OPTION(EMBREE_ISA_SSE42 "Enables SSE4.2 ISA." ON)
OPTION(EMBREE_ISA_AVX "Enables AVX ISA." ${COMPILER_SUPPORTS_AVX})
OPTION(EMBREE_ISA_AVX2 "Enables AVX2 ISA." ${COMPILER_SUPPORTS_AVX2})
IF (WIN32 OR APPLE)
IF (APPLE)
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." OFF)
ELSE()
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." ${COMPILER_SUPPORTS_AVX512})
-220
View File
@@ -1,220 +0,0 @@
{
"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"
],
"configurePresets": [
{
"name": "package-linux-gcc-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-linux", "env", "gcc", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "package-linux-icx-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-linux", "env", "icx", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"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-clang-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-linux", "env", "clang", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "package-static-linux-gcc-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-linux", "env", "gcc", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "package-static-linux-icx-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-linux", "env", "icx", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "package-static-linux-clang-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-linux", "env", "clang", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "package-linux-icx-sycl-ispc1_19_0-tbb2021_9_0",
"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_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"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_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512",
"EMBREE_USE_GOOGLE_BENCHMARK": "ON",
"EMBREE_BUILD_GOOGLE_BENCHMARK_FROM_SOURCE": "ON"
}
},
{
"name": "package-linux-dpcpp-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-linux", "env", "dpcpp", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_SYCL_SUPPORT": "ON",
"EMBREE_SYCL_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "SSE2"
}
},
{
"name": "package-macos-gcc-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-macos", "env", "gcc", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "package-macos-clang-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-macos", "env", "clang", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "package-windows-icx-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_MAX_ISA": "AVX512"
}
},
{
"name": "package-windows-v142-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-windows", "env", "v142", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "SSE2"
}
},
{
"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-static-windows-icx-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-static-windows", "env", "icx-windows", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "package-static-windows-v142-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-static-windows", "env", "v142", "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_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512"
}
}
]
}
+2041 -613
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
+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.10)
# These two are used to automatically find the root and include directories.
set(_TBB_INCLUDE_SUBDIR "include")
+13 -4
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")
+9
View File
@@ -72,6 +72,7 @@ IF (EMBREE_SYCL_SUPPORT)
${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")
@@ -143,10 +144,16 @@ IF (EMBREE_SYCL_SUPPORT)
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()
@@ -166,6 +173,8 @@ IF(SYCL_ONEAPI_ICX)
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")
+6 -1
View File
@@ -45,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@)
@@ -94,6 +97,7 @@ IF (EMBREE_SYCL_SUPPORT)
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")
@@ -102,6 +106,7 @@ 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@)
SET(EMBREE_TESTING_BENCHMARK @EMBREE_TESTING_BENCHMARK@)
+1 -1
View File
@@ -17,7 +17,7 @@ ELSE ()
_SET_IF_EMPTY(FLAGS_SSE42 "-msse4.2")
_SET_IF_EMPTY(FLAGS_AVX "-mavx")
_SET_IF_EMPTY(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
_SET_IF_EMPTY(FLAGS_AVX512 "-mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mprefer-vector-width=256")
_SET_IF_EMPTY(FLAGS_AVX512 "-march=skylake-avx512")
ENDIF ()
OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
+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}")
+4
View File
@@ -5,6 +5,7 @@ SET(FLAGS_SSE2 "/D__SSE__ /D__SSE2__")
SET(FLAGS_SSE42 "${FLAGS_SSE2} /D__SSE3__ /D__SSSE3__ /D__SSE4_1__ /D__SSE4_2__")
SET(FLAGS_AVX "${FLAGS_SSE42} /arch:AVX")
SET(FLAGS_AVX2 "${FLAGS_SSE42} /arch:AVX2")
SET(FLAGS_AVX512 "${FLAGS_AVX2} /arch:AVX512")
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
@@ -22,6 +23,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
+102 -105
View File
@@ -23,12 +23,11 @@ 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")
@@ -38,48 +37,81 @@ IF (EMBREE_SYCL_SUPPORT AND EMBREE_INSTALL_DEPENDENCIES)
"${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}/../bin/pi_level_zero.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../bin/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)
# copy level zero dll
IF (EXISTS "${DPCPP_COMPILER_DIR}/pi_level_zero.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/pi_level_zero.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)
IF (EXISTS "${DPCPP_COMPILER_DIR}/ur_adapter_level_zero.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/ur_adapter_level_zero.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/../bin/win_proxy_loader.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../bin/win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
# copy unified runtime loader dll
IF(EXISTS "${DPCPP_COMPILER_DIR}/ur_loader.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/ur_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib OPTIONAL)
ENDIF()
# copy proxy loader dll
IF(EXISTS "${DPCPP_COMPILER_DIR}/win_proxy_loader.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib OPTIONAL)
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()
IF(EXISTS "${DPCPP_COMPILER_DIR}/ur_win_proxy_loader.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/ur_win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib OPTIONAL)
ENDIF()
# copy additional oneAPI dlls
IF(SYCL_ONEAPI_ICX)
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()
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.?.?.?"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?.?-?"
"${DPCPP_COMPILER_DIR}/../lib/libur_adapter_level_zero.so*"
"${DPCPP_COMPILER_DIR}/../lib/libur_loader.so*"
"${DPCPP_COMPILER_DIR}/../lib/libumf.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)
# copy additional oneAPI runtime libraries
IF(SYCL_ONEAPI_ICX)
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()
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()
##############################################################
@@ -87,15 +119,6 @@ ENDIF()
##############################################################
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}/../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)
@@ -103,32 +126,6 @@ IF (WIN32)
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()
##############################################################
@@ -241,7 +238,9 @@ IF (EMBREE_SYCL_SUPPORT)
ENDIF()
#SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png")
#SET(CPACK_PACKAGE_RELOCATABLE TRUE)
SET(CPACK_STRIP_FILES TRUE)
IF(NOT WIN32)
SET(CPACK_STRIP_FILES TRUE)
ENDIF()
SET(CPACK_PACKAGE_VERSION_MAJOR ${EMBREE_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${EMBREE_VERSION_MINOR})
@@ -281,7 +280,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")
@@ -293,19 +291,7 @@ IF(WIN32)
SET(CPACK_GENERATOR ZIP)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.windows")
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
#SET(CPACK_MONOLITHIC_INSTALL 1)
IF (EMBREE_TESTING_PACKAGE)
SET(PACKAGE_SCRIPT "${PROJECT_SOURCE_DIR}/scripts/package_win.bat")
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND ${PACKAGE_SCRIPT} ${CMAKE_BUILD_TYPE} "${PACKAGE_BASE_NAME}" "${ARCH}")
ENDIF()
add_custom_target(
post_package "${PROJECT_SOURCE_DIR}/scripts/package_post_build_win.bat" "${PACKAGE_BASE_NAME}" "${EMBREE_SIGN_FILE}"
)
add_custom_target(
test_package "${PROJECT_SOURCE_DIR}/scripts/package_test_win.bat" "${PACKAGE_BASE_NAME}"
)
SET(PACKAGE_EXT "zip")
# MacOSX specific settings
ELSEIF(APPLE)
@@ -314,41 +300,52 @@ ELSEIF(APPLE)
SET(CPACK_RESOURCE_FILE_README "${PROJECT_BINARY_DIR}/README.txt")
SET(CPACK_GENERATOR ZIP)
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
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} "${PACKAGE_BASE_NAME}" "${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 "${PROJECT_SOURCE_DIR}/scripts/package_post_build_macosx.sh" ${PACKAGE_BASE_NAME} ${EMBREE_SIGN_FILE}
)
add_custom_target(
test_package "${PROJECT_SOURCE_DIR}/scripts/package_test_macosx.sh" ${PACKAGE_BASE_NAME}
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(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
SET(PACKAGE_EXT "tar.gz")
IF (EMBREE_SYCL_SUPPORT)
SET(EMBREE_VERSION_SYCL_SUFFIX ".sycl")
ENDIF()
add_custom_target(
post_package "${PROJECT_SOURCE_DIR}/scripts/package_post_build_linux.sh" ${PACKAGE_BASE_NAME}
)
add_custom_target(
test_package "${PROJECT_SOURCE_DIR}/scripts/package_test_linux.sh" ${PACKAGE_BASE_NAME}
)
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}
)
+15 -17
View File
@@ -90,7 +90,7 @@ if (BUILD_TESTING OR EMBREE_TESTING_INSTALL_TESTS)
COMMAND ${executable}_sycl ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_sycl_DEFINED)
SET(${testnamedef} 1 CACHE INTERNAL "")
SET_TESTS_PROPERTIES(${testname}_sycl PROPERTIES TIMEOUT 50)
SET_TESTS_PROPERTIES(${testname}_sycl PROPERTIES TIMEOUT 150)
ENDIF()
ENDMACRO()
@@ -296,7 +296,6 @@ if (BUILD_TESTING OR EMBREE_TESTING_INSTALL_TESTS)
#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)
@@ -442,6 +441,7 @@ if (BUILD_TESTING OR EMBREE_TESTING_INSTALL_TESTS)
endforeach()
if (memcheck)
list(PREPEND args "${MY_PROJECT_BINARY_DIR}/${executable}")
list(PREPEND args "${EMBREE_MEMORYCHECK_COMMAND_OPTIONS}")
@@ -464,13 +464,11 @@ if (BUILD_TESTING OR EMBREE_TESTING_INSTALL_TESTS)
if (no_postfix)
ADD_EMBREE_GENERIC_TEST(${testname} ${executable} ${args})
else()
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
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_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})
@@ -555,17 +553,17 @@ if (BUILD_TESTING OR EMBREE_TESTING_INSTALL_TESTS)
endif()
ENDFUNCTION()
# 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()
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()
+3
View File
@@ -48,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
-2
View File
@@ -75,8 +75,6 @@ namespace embree
__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 float sincos ( const float phi, float* sin, float* cos ) { return *sin = sycl::sincos(phi, cos); }
__forceinline float sincosf ( const float phi, float* sin, float* cos ) { return *sin = sycl::sincos(phi, cos); }
//__forceinline double abs ( const double x ) { return ::fabs(x); }
//__forceinline double sign ( const double x ) { return x<0?-1.0:1.0; }
+2 -2
View File
@@ -95,8 +95,8 @@ namespace embree
__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::recip(a.x),sycl::recip(a.y)); }
__forceinline Vec2fa rcp ( const Vec2fa& a ) { return Vec2fa(__sycl_std::__invoke_native_recip<float>(a.x),__sycl_std::__invoke_native_recip<float>(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); }
+10 -2
View File
@@ -92,7 +92,7 @@ namespace embree
__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_std::__invoke_native_recip<float>(a.x),__sycl_std::__invoke_native_recip<float>(a.y),__sycl_std::__invoke_native_recip<float>(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); }
@@ -393,7 +393,7 @@ namespace embree
__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_std::__invoke_native_recip<float>(a.x),__sycl_std::__invoke_native_recip<float>(a.y),__sycl_std::__invoke_native_recip<float>(a.z),__sycl_std::__invoke_native_recip<float>(a.w)); }
__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); }
@@ -614,4 +614,12 @@ namespace embree
//__forceinline Vec3ia::Vec3ia( const Vec3fx& a )
// : x((int)a.x), y((int)a.y), z((int)a.z) {}
}
#if __SYCL_COMPILER_VERSION >= 20210801
namespace sycl {
template<> struct is_device_copyable<embree::Vec3fa> : std::true_type {};
template<> struct is_device_copyable<const embree::Vec3fa> : std::true_type {};
}
#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)
{
+2051 -687
View File
File diff suppressed because it is too large Load Diff
+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
////////////////////////////////////////////////////////////////////////////////
+43 -85
View File
@@ -12,51 +12,6 @@
namespace embree
{
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)
@@ -71,8 +26,9 @@ namespace embree
void alignedFree(void* ptr)
{
if (ptr)
if (ptr) {
_mm_free(ptr);
}
}
#if defined(EMBREE_SYCL_SUPPORT)
@@ -86,65 +42,67 @@ namespace embree
return nullptr;
assert((align & (align-1)) == 0);
total_allocations++;
void* ptr = nullptr;
if (mode == EMBREE_USM_SHARED_DEVICE_READ_ONLY)
if (mode == EmbreeUSMMode::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;
}
void* alignedSYCLMalloc(sycl::context* context, sycl::device* device, size_t size, size_t align, EmbreeUSMMode mode, EmbreeMemoryType type)
{
assert(context);
assert(device);
if (size == 0)
return nullptr;
assert((align & (align-1)) == 0);
void* ptr = nullptr;
if (type == EmbreeMemoryType::USM_SHARED) {
if (mode == EmbreeUSMMode::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);
}
else if (type == EmbreeMemoryType::USM_HOST) {
ptr = sycl::aligned_alloc_host(align,size,*context);
}
else if (type == EmbreeMemoryType::USM_DEVICE) {
ptr = sycl::aligned_alloc_device(align,size,*device,*context);
}
else {
ptr = alignedMalloc(size,align);
}
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);
sycl::usm::alloc type = sycl::get_pointer_type(ptr, *context);
if (type == sycl::usm::alloc::host || type == sycl::usm::alloc::device || type == sycl::usm::alloc::shared)
sycl::free(ptr,*context);
else {
alignedFree(ptr);
}
}
}
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;
+15 -44
View File
@@ -9,71 +9,42 @@
namespace embree
{
#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_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) \
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);
enum class EmbreeUSMMode {
DEFAULT = 0,
DEVICE_READ_WRITE = 0,
DEVICE_READ_ONLY = 1
};
enum class EmbreeMemoryType {
USM_HOST = 0,
USM_DEVICE = 1,
USM_SHARED = 2,
MALLOC = 3
};
#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* alignedSYCLMalloc(sycl::context* context, sycl::device* device, size_t size, size_t align, EmbreeUSMMode mode, EmbreeMemoryType type);
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 */
+1 -1
View File
@@ -101,7 +101,7 @@ namespace embree
__forceinline void wait()
{
mutex.lock();
count++;
count = count + 1;
if (count == barrierSize) {
count = 0;
-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();
+2 -2
View File
@@ -223,7 +223,7 @@ namespace embree
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
__forceinline unsigned int bsf(unsigned v) {
return SYCL_CTZ::ctz(v);
return sycl::ctz(v);
}
#else
@@ -248,7 +248,7 @@ namespace embree
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
__forceinline size_t bsf(size_t v) {
return SYCL_CTZ::ctz(v);
return sycl::ctz(v);
}
#else
+17 -24
View File
@@ -34,13 +34,6 @@
#pragma clang diagnostic pop
#define SYCL_ONEAPI sycl
#define SYCL_EXT_ONEAPI sycl::ext::oneapi
#define SYCL_SUBGROUP sycl
#define SYCL_EXPERIMENTAL sycl::ext::oneapi::experimental
#define SYCL_INTEL sycl::ext::intel
#define SYCL_CTZ sycl
#include "sycl.h"
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
@@ -367,38 +360,38 @@ __forceinline std::string toString(long long value) {
#define sycl_printf0(format, ...) { \
static const CONSTANT char fmt[] = format; \
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true))) \
SYCL_EXT_ONEAPI::experimental::printf(fmt, __VA_ARGS__ ); \
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::ctz(intel_sub_group_ballot(true))) \
SYCL_EXT_ONEAPI::experimental::printf(fmt); \
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__ ); \
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
}
#define sycl_printf0_(format) { \
static const CONSTANT char fmt[] = format; \
SYCL_EXT_ONEAPI::experimental::printf(fmt); \
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__ ); \
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
}
#define sycl_printf_(format) { \
static const CONSTANT char fmt[] = format; \
SYCL_EXT_ONEAPI::experimental::printf(fmt); \
sycl::ext::oneapi::experimental::printf(fmt); \
}
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
@@ -419,7 +412,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, int i)
{
if (cout.uniform) {
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%i",i);
}
else
@@ -431,7 +424,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, unsigned int i)
{
if (cout.uniform) {
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%u",i);
} else
sycl_printf("%u ",i);
@@ -442,7 +435,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, float f)
{
if (cout.uniform) {
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%f",f);
} else
sycl_printf("%f ",f);
@@ -453,7 +446,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, double d)
{
if (cout.uniform) {
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%f",d);
} else
sycl_printf("%f ",d);
@@ -464,7 +457,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, uint64_t l)
{
if (cout.uniform) {
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%lu",l);
} else
sycl_printf("%lu ",l);
@@ -475,7 +468,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, long l)
{
if (cout.uniform) {
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%l",l);
} else
sycl_printf("%l ",l);
@@ -487,7 +480,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, void* p)
{
if (cout.uniform) {
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf("%p",p);
} else
sycl_printf("%p ",p);
@@ -497,14 +490,14 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, const char* c)
{
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
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::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
sycl_printf_("\n");
return cout;
}
+25 -33
View File
@@ -31,9 +31,6 @@ using sycl::ushort4;
using sycl::ushort3;
using sycl::ushort2;
using sycl::fmax;
using sycl::fmin;
#ifdef __SYCL_DEVICE_ONLY__
#define GLOBAL __attribute__((opencl_global))
#define LOCAL __attribute__((opencl_local))
@@ -184,8 +181,15 @@ namespace embree
return sycl::select(b,a,mask);
}
__forceinline const SYCL_EXT_ONEAPI::sub_group this_sub_group() {
return SYCL_EXPERIMENTAL::this_sub_group();
#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() {
@@ -209,23 +213,23 @@ namespace embree
}
__forceinline bool sub_group_all_of(bool pred) {
return SYCL_ONEAPI::all_of_group(this_sub_group(),pred);
return sycl::all_of_group(this_sub_group(),pred);
}
__forceinline bool sub_group_any_of(bool pred) {
return SYCL_ONEAPI::any_of_group(this_sub_group(),pred);
return sycl::any_of_group(this_sub_group(),pred);
}
__forceinline bool sub_group_none_of(bool pred) {
return SYCL_ONEAPI::none_of_group(this_sub_group(),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_SUBGROUP::group_broadcast<SYCL_EXT_ONEAPI::sub_group>(this_sub_group(),x,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::ctz(intel_sub_group_ballot(true)));
return sub_group_broadcast(x,sycl::ctz(intel_sub_group_ballot(true)));
}
__forceinline void assume_uniform_array(void* ptr) {
@@ -235,59 +239,47 @@ namespace embree
}
template <typename T, class BinaryOperation> __forceinline T sub_group_reduce(T x, BinaryOperation binary_op) {
return SYCL_SUBGROUP::reduce_over_group<SYCL_EXT_ONEAPI::sub_group>(this_sub_group(),x,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_SUBGROUP::reduce_over_group<SYCL_EXT_ONEAPI::sub_group>(this_sub_group(),x,init,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>());
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>());
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>());
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>());
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_SUBGROUP::exclusive_scan_over_group(this_sub_group(),x,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>());
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_SUBGROUP::exclusive_scan_over_group(this_sub_group(),x,init,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_SUBGROUP::inclusive_scan_over_group(this_sub_group(),x,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_SUBGROUP::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);
return sycl::inclusive_scan_over_group(this_sub_group(),x,binary_op,init);
}
template <typename T> __forceinline T sub_group_load(const void* src) {
+13
View File
@@ -344,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__)
+1 -1
View File
@@ -158,7 +158,7 @@ namespace embree
static const int SSE41 = SSSE3 | CPU_FEATURE_SSE41;
static const int SSE42 = SSE41 | CPU_FEATURE_SSE42 | CPU_FEATURE_POPCNT;
static const int AVX = SSE42 | CPU_FEATURE_AVX | CPU_FEATURE_YMM_ENABLED;
static const int AVXI = AVX | CPU_FEATURE_F16C | CPU_FEATURE_RDRAND;
static const int AVXI = AVX | CPU_FEATURE_F16C;
static const int AVX2 = AVXI | CPU_FEATURE_AVX2 | CPU_FEATURE_FMA3 | CPU_FEATURE_BMI1 | CPU_FEATURE_BMI2 | CPU_FEATURE_LZCNT;
static const int AVX512 = AVX2 | CPU_FEATURE_AVX512F | CPU_FEATURE_AVX512DQ | CPU_FEATURE_AVX512CD | CPU_FEATURE_AVX512BW | CPU_FEATURE_AVX512VL | CPU_FEATURE_ZMM_ENABLED;
static const int NEON = CPU_FEATURE_NEON | CPU_FEATURE_SSE | CPU_FEATURE_SSE2;
+4 -1
View File
@@ -5,6 +5,7 @@
#include "alloc.h"
#include <algorithm>
#include <type_traits>
namespace embree
{
@@ -124,8 +125,10 @@ namespace embree
__forceinline T* data() { return items; };
__forceinline const T* data() const { return items; };
/* dangerous only use if you know what you're doing */
__forceinline void setDataPtr(T* data) { items = data; }
/******************** Modifiers **************************/
__forceinline void push_back(const T& nt)
+4 -6
View File
@@ -8,8 +8,6 @@
namespace embree
{
RTC_NAMESPACE_BEGIN
static MutexSys g_mutex;
size_t TaskScheduler::g_numThreads = 0;
__thread TaskScheduler* TaskScheduler::g_instance = nullptr;
@@ -150,7 +148,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 +229,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);
}
@@ -397,6 +397,4 @@ namespace embree
dll_export void TaskScheduler::removeScheduler(const Ref<TaskScheduler>& scheduler) {
threadPool->remove(scheduler);
}
RTC_NAMESPACE_END
}
+2 -12
View File
@@ -3,6 +3,7 @@
#pragma once
#include "../../include/embree4/rtcore.h"
#include "../sys/platform.h"
#include "../sys/alloc.h"
#include "../sys/barrier.h"
@@ -12,17 +13,12 @@
#include "../sys/ref.h"
#include "../sys/atomic.h"
#include "../math/range.h"
#include "../../include/embree4/rtcore.h"
#include <exception>
#include <list>
namespace embree
{
/* The tasking system exports some symbols to be used by the tutorials. Thus we
hide is also in the API namespace when requested. */
RTC_NAMESPACE_BEGIN
struct TaskScheduler : public RefCount
{
ALIGNED_STRUCT_(64);
@@ -375,10 +371,4 @@ namespace embree
static __thread Thread* thread_local_thread;
static ThreadPool* threadPool;
};
RTC_NAMESPACE_END
#if defined(RTC_NAMESPACE)
using RTC_NAMESPACE::TaskScheduler;
#endif
}
+1 -1
View File
@@ -65,7 +65,7 @@ namespace embree
BarrierSys barrier(numThreads);
tbb::parallel_for(size_t(0), size_t(numThreads), size_t(1), [&] ( size_t i ) {
barrier.wait();
});
}, tbb::static_partitioner());
}
}
+1 -1
View File
@@ -22,5 +22,5 @@ FetchContent_Declare(IntelStyle
FetchContent_GetProperties(IntelStyle)
if(NOT IntelStyle_POPULATED)
FetchContent_Populate(IntelStyle)
FetchContent_MakeAvailable(IntelStyle)
endif()
+2 -2
View File
@@ -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/%.4embree4,$(man_src))
manfiles := $(patsubst src/api/%.md,man/man3/%.3embree4,$(man_src))
all: www images man doc spec
www: $(webpages) $(webimages)
@@ -175,7 +175,7 @@ doc/readme.pdf: tmp/readme.tex tmp/readme_all.tex $(images_jpg) $(images_pdf)
### manpages
########################################################################
man/man3/%.4embree4: src/api/%.md
man/man3/%.3embree4: src/api/%.md
$(PANDOC) -s -t man $< -o $@
########################################################################
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

+140 -1
View File
@@ -43,6 +43,16 @@
```
\pagebreak
## rtcGetDeviceLastErrorMessage
``` {include=src/api/rtcGetDeviceLastErrorMessage.md}
```
\pagebreak
## rtcGetErrorString
``` {include=src/api/rtcGetErrorString.md}
```
\pagebreak
## rtcSetDeviceErrorFunction
``` {include=src/api/rtcSetDeviceErrorFunction.md}
```
@@ -103,6 +113,11 @@
```
\pagebreak
## rtcCommitSceneWithQueue
``` {include=src/api/rtcCommitSceneWithQueue.md}
```
\pagebreak
## rtcJoinCommitScene
``` {include=src/api/rtcJoinCommitScene.md}
```
@@ -139,6 +154,11 @@
```
\pagebreak
## rtcGetSceneTraversable
``` {include=src/api/rtcGetSceneTraversable.md}
```
\pagebreak
## rtcNewGeometry
``` {include=src/api/rtcNewGeometry.md}
```
@@ -184,6 +204,11 @@
```
\pagebreak
## RTC_GEOMETRY_TYPE_INSTANCE_ARRAY
``` {include=src/api/RTC_GEOMETRY_TYPE_INSTANCE_ARRAY.md}
```
\pagebreak
## RTCCurveFlags
``` {include=src/api/RTCCurveFlags.md}
```
@@ -254,11 +279,21 @@
```
\pagebreak
## rtcSetSharedGeometryBufferHostDevice
``` {include=src/api/rtcSetSharedGeometryBufferHostDevice.md}
```
\pagebreak
## rtcSetNewGeometryBuffer
``` {include=src/api/rtcSetNewGeometryBuffer.md}
```
\pagebreak
## rtcSetNewGeometryBufferHostDevice
``` {include=src/api/rtcSetNewGeometryBufferHostDevice.md}
```
\pagebreak
## RTCFormat
``` {include=src/api/RTCFormat.md}
```
@@ -274,6 +309,11 @@
```
\pagebreak
## rtcGetGeometryBufferDataDevice
``` {include=src/api/rtcGetGeometryBufferDataDevice.md}
```
\pagebreak
## rtcUpdateGeometryBuffer
``` {include=src/api/rtcUpdateGeometryBuffer.md}
```
@@ -319,6 +359,11 @@
```
\pagebreak
## rtcGetGeometryUserDataFromTraversable
``` {include=src/api/rtcGetGeometryUserDataFromScenTraversable
```
\pagebreak
## rtcSetGeometryUserPrimitiveCount
``` {include=src/api/rtcSetGeometryUserPrimitiveCount.md}
```
@@ -355,6 +400,11 @@
```
\pagebreak
## rtcSetGeometryInstancedScenes
``` {include=src/api/rtcSetGeometryInstancedScenes.md}
```
\pagebreak
## rtcSetGeometryTransform
``` {include=src/api/rtcSetGeometryTransform.md}
```
@@ -370,11 +420,21 @@
```
\pagebreak
## rtcGetGeometryTransformEx
``` {include=src/api/rtcGetGeometryTransformEx.md}
```
\pagebreak
## rtcGetGeometryTransformFromScene
``` {include=src/api/rtcGetGeometryTransformFromScene.md}
```
\pagebreak
## rtcGetGeometryTransformFromTraversable
``` {include=src/api/rtcGetGeometryTransformFromTraversable.md}
```
\pagebreak
## rtcSetGeometryTessellationRate
``` {include=src/api/rtcSetGeometryTessellationRate.md}
```
@@ -435,17 +495,26 @@
```
\pagebreak
## rtcNewBuffer
``` {include=src/api/rtcNewBuffer.md}
```
\pagebreak
## rtcNewBufferHostDevice
``` {include=src/api/rtcNewBufferHostDevice.md}
```
\pagebreak
## rtcNewSharedBuffer
``` {include=src/api/rtcNewSharedBuffer.md}
```
\pagebreak
## rtcNewSharedBufferHostDevice
``` {include=src/api/rtcNewSharedBufferHostDevice.md}
```
\pagebreak
## rtcRetainBuffer
``` {include=src/api/rtcRetainBuffer.md}
```
@@ -461,6 +530,21 @@
```
\pagebreak
## rtcGetBufferDataDevice
``` {include=src/api/rtcGetBufferDataDevice.md}
```
\pagebreak
## rtcCommitBuffer
``` {include=src/api/rtcCommitBuffer.md}
```
\pagebreak
## rtcCommitBufferWithQueue
``` {include=src/api/rtcCommitBufferWithQueue.md}
```
\pagebreak
## RTCRay
``` {include=src/api/RTCRay.md}
```
@@ -516,41 +600,81 @@
```
\pagebreak
## rtcTraversableIntersect1
``` {include=src/api/rtcTraversableIntersect1.md}
```
\pagebreak
## rtcOccluded1
``` {include=src/api/rtcOccluded1.md}
```
\pagebreak
## rtcTraversableOccluded1
``` {include=src/api/rtcTraversableOccluded1.md}
```
\pagebreak
## rtcIntersect4/8/16
``` {include=src/api/rtcIntersect4.md}
```
\pagebreak
## rtcTraversableIntersect4/8/16
``` {include=src/api/rtcTraversableIntersect4.md}
```
\pagebreak
## rtcOccluded4/8/16
``` {include=src/api/rtcOccluded4.md}
```
\pagebreak
## rtcTraversableOccluded4/8/16
``` {include=src/api/rtcTraversableOccluded4.md}
```
\pagebreak
## rtcForwardIntersect1
``` {include=src/api/rtcForwardIntersect1.md}
```
\pagebreak
## rtcTraversableForwardIntersect1
``` {include=src/api/rtcTraversableForwardIntersect1.md}
```
\pagebreak
## rtcForwardOccluded1
``` {include=src/api/rtcForwardOccluded1.md}
```
\pagebreak
## rtcTraversableForwardOccluded1
``` {include=src/api/rtcTraversableForwardOccluded1.md}
```
\pagebreak
## rtcForwardIntersect4/8/16
``` {include=src/api/rtcForwardIntersect4.md}
```
\pagebreak
## rtcTraversableForwardIntersect4/8/16
``` {include=src/api/rtcTraversableForwardIntersect4.md}
```
\pagebreak
## rtcForwardOccluded4/8/16
``` {include=src/api/rtcForwardOccluded4.md}
```
\pagebreak
## rtcTraversableForwardOccluded4/8/16
``` {include=src/api/rtcTraversableForwardOccluded4.md}
```
\pagebreak
## rtcInitPointQueryContext
``` {include=src/api/rtcInitPointQueryContext.md}
```
@@ -561,6 +685,21 @@
```
\pagebreak
## rtcTraversablePointQuery
``` {include=src/api/rtcTraversablePointQuery.md}
```
\pagebreak
## rtcPointQuery4/8/16
``` {include=src/api/rtcPointQuery4.md}
```
\pagebreak
## rtcTraversablePointQuery4/8/16
``` {include=src/api/rtcTraversablePointQuery4.md}
```
\pagebreak
## rtcCollide
``` {include=src/api/rtcCollide.md}
```
+63 -38
View File
@@ -46,6 +46,13 @@ 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.
Starting with Embree 4.4 scene objects (`RTCScene` types) are
not valid handles on SYCL devices anymore and therefore can not
be used for Embree API calls in a SYCL kernel. Instead, Embree API
calls on a SYCL kernel have a variation which use traversable objects
(`RTCTraversable` type). To get a traversable object for a scene object
the application can call `rtcGetSceneTraversable`.
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
@@ -53,18 +60,29 @@ 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
the host but not the device.
Before version 4.4, Embree made heavy use of unified shared memory (USM)
shared memory which simplifies memory management with SYCL devices
by letting the SYCL runtime transfer data from host to device implicitly.
However, some applications require more control over when and how data
is migrated from CPU to GPU. Embree 4.4 allows to use explicit host and device
memory allocations. See for example `rtcSetNewGeometryBufferHostDevice`,
`rtcSetSharedGeometryBufferHostDevice`, `rtcNewBufferHostDevice`, and
`rtcNewSharedBufferHostDevice`. It is still possible to share
data buffers with Embree using SYCL USM shared memory by using
the API calls without the `HostDevice` suffix.
The easiest way to share data buffers with Embree
(e.g. for vertex of index buffers) is to allocate the
data as USM shared 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.
may access contained data when tracing rays.
Device side rendering can get invoked by submitting a SYCL
`parallel_for` to the SYCL queue:
@@ -72,6 +90,8 @@ Device side rendering can get invoked by submitting a SYCL
const sycl::specialization_id<RTCFeatureFlags> feature_mask;
RTCFeatureFlags required_features = RTC_FEATURE_FLAG_TRIANGLE;
RTCTraversable traversable = rtcGetSceneTraversable(scene);
queue.submit([=](sycl::handler& cgh)
{
@@ -99,7 +119,7 @@ Device side rendering can get invoked by submitting a SYCL
rayhit.hit.geomID = RTC_INVALID_GEOMETRY_ID;
rayhit.hit.instID[0] = RTC_INVALID_GEOMETRY_ID;
rtcIntersect1(scene, &rayhit, &args);
rtcTraversableIntersect1(traversable, &rayhit, &args);
result->geomID = rayhit.hit.geomID;
result->primID = rayhit.hit.primID;
@@ -109,21 +129,23 @@ Device side rendering can get invoked by submitting a SYCL
queue.wait_and_throw();
This example passes a feature mask using a specialization contant to
the `rtcIntersect1` function, which is recommended for GPU
This example passes a feature mask using a specialization constant to
the `rtcTraversableIntersect1` 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` and `rtcForwardOccluded1` to continue object
traversal from inside a user geometry callback,
and `rtcGetGeometryUserDataFromScene` to get the user data pointer of some
such as the `rtcTraversableIntersect1` and `rtcTraversableOccluded1` functions
to trace rays, `rtcTraversableForwardIntersect1/Ex` and `rtcTraversableForwardOccluded1/Ex`
to continue object traversal from inside a user geometry callback,
and `rtcGetGeometryUserDataFromTraversable` to get the user data pointer of some
geometry.
Have a look at the [Minimal] tutorial for a minimal SYCL example.
Have a look at the [Minimal] tutorial for a minimal SYCL example and the
[Host Device Memory] tutorial shows four different ways in which
data buffers can be created by or shared with Embree using explicit
host/device data buffers.
SYCL JIT caching
-----------------
@@ -169,7 +191,7 @@ 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
such as disallowing: global variable access, malloc, invocation of
virtual functions, function pointers, runtime type information,
exceptions, recursion, etc. See Section `5.4. Language Restrictions
for device functions` of the [SYCL
@@ -183,10 +205,16 @@ 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
- Since Embree 4.4, all the ray query functions
that take an `RTCScene` object as argument cannot get used in
SYCL device side code. Instead, the API functions
taking a `RTCTraversable` object (e.g. `rtcTraversableIntersect1`)
have to be used.
- The packet tracing functions `rtcTraversableIntersect4/8/16` and
`rtcTraversableOccluded4/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
the programming model is implicitly executed in SIMT mode on the
GPU anyway.
- Filter and user geometry callbacks stored inside the geometry
@@ -203,10 +231,10 @@ get used on the GPU:
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.
- Tracing rays using `rtcTraversableIntersect1` and `rtcTraversableOccluded1`
functions from user geometry callbacks is not supported in SYCL.
Please use the tail recursive `rtcTraversableForwardIntersect1`
and `rtcTraversableForwardOccluded1` calls instead.
- Subdivision surfaces are not supported for Embree SYCL devices.
@@ -220,12 +248,8 @@ get used on the GPU:
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.
- Compilation with build configuration "debug" is currently not feasible because
compilation times are very long.
Upgrading from Embree 3 to Embree 4
@@ -303,20 +327,21 @@ required:
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.
`rtc(Traversable)ForwardIntersect1` and `rtc(Traversable)ForwardOccluded1` functions.
- The geometry object of Embree 4 is a host side only object, thus
- The geometry object and scene object of Embree 4 are a host side only objects, 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.
API functions that take an RTCGeometry object or RTCScene object as argument cannot get
used during rendering. In particular the `rtcGetGeometryUserData(RTCGeometry)`
call cannot get used, but there is an alternative function
`rtcGetGeometryUserDataFromTraversable(RTCTraversable traversable,uint geomID)` that
should get used instead. To perform ray queries on the GPU (e.g. `rtcTraversableIntersect1`)
the application has to get a `RTCTraversable` object first (using
`rtcGetSceneTraversable`) and pass it to the SYCL kernel.
- 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
the `rtcTraversableIntersect1` and `rtcTraversableOccluded1` functions directly to allow
inlining. The experimental geometry version of the callbacks is
disabled in SYCL and should not get used.
+6
View File
@@ -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.
+13 -8
View File
@@ -39,6 +39,8 @@
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]
@@ -0,0 +1,79 @@
% RTC_GEOMETRY_TYPE_INSTANCE_ARRAY(3) | Embree Ray Tracing Kernels 4
#### NAME
RTC_GEOMETRY_TYPE_INSTANCE_ARRAY - instance array geometry type
#### SYNOPSIS
#include <embree4/rtcore.h>
RTCGeometry geometry =
rtcNewGeometry(device, RTC_GEOMETRY_TYPE_INSTANCE_ARRAY);
#### DESCRIPTION
Embree supports instance arrays, which is a more memory efficient way to
represent large amounts of instances of the same or a small set of (sub)scenes.
The main difference to regular Embree instances is that Embree instance arrays
have a buffer of transformations (either affine transformations or quaternion
decompositions [RTCQuaternionDecomposition]) that can be allocated by
Embree or a shared buffer, similar to vertex buffers for triangle meshes.
Optionally, instead of instancing only one scene, an instance array can instance
multiple scenes by passing an array of scenes and a corresponding
index buffer that specifies which instance of the instance array instances
which of the scenes in the scenes array.
Instance arrays are created by passing `RTC_GEOMETRY_TYPE_INSTANCE_ARRAY` to
the `rtcNewGeometry` function call. The instanced scene can be either be set
using the `rtcSetGeometryInstancedScene` call, or if multiple scenes should be
instanced by passing an array of scenes using `rtcSetGeometryInstancedScenes`.
The latter also requires to specify an index buffer using
`rtcSetNewGeometryBuffer` or `rtcSetSharedGeometryBuffer` with
`RTC_BUFFER_TYPE_INDEX` as the buffer type.
Because the transformation information can become large for a large amount of
instances, the instance array allows to share the transformation buffer between
the user application and Embree. It can be either stored in a buffer created by
Embree with `rtcSetNewGeometryBuffer` or an already existing buffer can be
shared using `rtcSetSharedGeometryBuffer`. In either case, the buffer type has
to be `RTC_BUFFER_TYPE_TRANSFORM` and the allowed formats are
`RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`, `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`,
`RTC_FORMAT_FLOAT3X4_ROW_MAJOR`, and `RTC_FORMAT_QUATERNION_DECOMPOSITION`.
Embree will not modify the data in the transformation buffer.
Embree instance arrays support both single-level instancing and multi-level instancing.
The maximum instance nesting depth is `RTC_MAX_INSTANCE_LEVEL_COUNT`; it
can be configured at compile-time using the constant `EMBREE_MAX_INSTANCE_LEVEL_COUNT`.
Users should adapt this constant to their needs: instances nested any deeper are silently
ignored in release mode, and cause assertions in debug mode.
Please note that `rtcCommitScene` on the instanced scene(s) should be
called first, followed by `rtcCommitGeometry` on the instance array,
followed by `rtcCommitScene` for the top-level scene containing the
instance array.
If a ray hits the instance, the `geomID` and `primID` members of the hit are
set to the geometry ID and primitive ID of the hit primitive in the instanced
scene. The `instID` member of the hit is set to the geometry ID of the instance
array in the top-level scene and the `instPrimID` member is set to the index of
the hit instance of the instance array.
For multi-segment motion blur, the number of time steps must be first specified
using the `rtcSetGeometryTimeStepCount` function. Then a transformation for
each time step can be specified using the `rtcSetNewGeometryBuffer` or
`rtcSetSharedGeometryBuffer` function and passing the time step as the `slot`
parameter of these calls.
See the [Instance Array Geometry] tutorial for an example of how to use instance arrays.
#### EXIT STATUS
On failure `NULL` is returned and an error code is set that can be
queried using `rtcGetDeviceError`.
#### SEE ALSO
[rtcNewGeometry], [rtcSetGeometryInstancedScene],
[rtcSetGeometryInstancedScenes], [rtcSetNewGeometryBuffer],
[rtcSetSharedGeometryBuffer], [rtcGetGeometryTransformEx]
+32
View File
@@ -0,0 +1,32 @@
% rtcCommitBuffer(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcCommitBuffer - commits buffer content from host to device
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcCommitBuffer(RTCBuffer buffer);
#### DESCRIPTION
If the buffer was created using `rtcNewBufferHostDevice` the
`rtcCommitBuffer` function commits changes of the host buffer data
to the device. This call is not necessary if the buffer was created
with a non SYCL Embree device.
The call to `rtcCommitBuffer` will internally use a temporary SYCL
queue and wait for the memory copy to finish. The function
`rtcCommitBufferWithQueue` can be used to asyncronously copy the
data to the device.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcCommitBufferWithQueue] [rtcNewBufferHostDevice]
+39
View File
@@ -0,0 +1,39 @@
% rtcCommitBufferWithQueue(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcCommitBufferWithQueue - commits buffer content from host to device using a given SYCL queue
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcCommitBufferWithQueue(RTCBuffer buffer,
sycl::queue queue, sycl::event* event);
#### DESCRIPTION
If the buffer was created using `rtcNewBufferHostDevice` the
`rtcCommitBufferWithQueue` function commits changes of the host buffer data
to the device. If the buffer was created with a non SYCL Embree device
or the SYCL device has host unified memory, this call has no effect.
The call to `rtcCommitBufferWithQueue` will use the given SYCL queue
to copy the memory asynchronously. If the SYCL event argument `event`
is a valid pointer, Embree will use this pointer to return a copy of
the SYCL event associated to the memory copy. The parameter `event`
is optional and will be ignored if it is a null pointer.
The user is responsible for synchronization using the SYCL queue or
the optional SYCL event.
This function is only avaiable on Embree versions with enabled SYCL support.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcCommitBuffer] [rtcNewBufferHostDevice]
+13 -1
View File
@@ -46,6 +46,18 @@ e.g. primitives containing NaNs, INFs, or values greater
than 1.844E18f (as no reasonable calculations can be performed with
such values without causing overflows).
In case the RTCDevice associated with the `scene` is a SYCL device,
`rtcCommitScene` will internally create a temporary SYCL queue to
issue memory transfers from host to device memory. In this case,
the call to `rtcCommitScene` will be blocking and return only after
the memory transfers are completed and SYCL kernels can traverse
the scene savely on the device. The function `rtcCommitSceneWithQueue`
can be used to commit all changes for the specified scene asynchronously.
Handles to traversal objects (`RTCTraversable` type) that have been
aquired before a call to `rtcCommitScene` will be invalidated.
Use `rtcGetSceneTraversable` to get a valid handle from the scene after
every scene commit.
#### EXIT STATUS
On failure an error code is set that can be queried using
@@ -53,4 +65,4 @@ On failure an error code is set that can be queried using
#### SEE ALSO
[rtcJoinCommitScene]
[rtcCommitSceneWithQueue], [rtcJoinCommitScene]
+51
View File
@@ -0,0 +1,51 @@
% rtcCommitSceneWithQueue(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcCommitSceneWithQueue - commits scene changes using a given
SYCL queue for host-to-device memory transfers
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcCommitScene(RTCScene scene,
sycl::queue queue,
sycl::event* event);
#### DESCRIPTION
The `rtcCommitSceneWithQueue` function commits all changes for the specified
scene (`scene` argument). This internally triggers building of a
spatial acceleration structure for the scene using all available
worker threads. Ray queries can be performed only after committing
all scene changes.
The `rtcCommitSceneWithQueue` function differs from `rtcCommitScene` only
in that the former uses a SYCL queue passed by the application for asynchronous
host-to-device memory transfers and the latter uses an internal and temporary
SYCL queue and is blocking, i.e. the function returns after all memory
transfers are completed.
The application is responsible for synchronization when using `rtcCommitSceneWithQueue`
by either calling `wait()` on the `queue` or use the optional `event` argument
to receive a copy of the sycl::event associated with the last memcpy command
that was submitted to the queue. The argument `event` can also be a null pointer
in which case the argument will be ignored internally.
A SYCL kernel calling rtcTraversableIntersect or rtcTraversableOccluded
using a RTCTraversable associated with the RTCScene `scene` has a dependency on
the host-to-device memory transfers and therefore has to be synchronized properly.
This function is only available when SYCL support is enabled. In case the
RTCDevice associated with the `scene` is not a SYCL device, `rtcCommitSceneWithQueue`
will behave the same as `rtcCommitScene`.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcCommitScene]
+23 -11
View File
@@ -1,8 +1,8 @@
% rtcForwardIntersect1(3) | Embree Ray Tracing Kernels 4
% rtcForwardIntersect1/Ex(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcForwardIntersect1 - forwards a single ray to new scene
rtcForwardIntersect1/Ex - forwards a single ray to new scene
from user geometry callback
#### SYNOPSIS
@@ -16,16 +16,23 @@
unsigned int instID
);
void rtcForwardIntersect1Ex(
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay* ray,
unsigned int instID,
unsigned int instPrimID,
);
#### DESCRIPTION
The `rtcForwardIntersect1` function forwards the traversal of a
transformed ray (`ray` argument) into a scene (`scene` argument) from
a user geometry callback. The function can only get invoked from a
user geometry callback for a ray traversal initiated with the
`rtcIntersect1` function. The callback arguments structure of the
callback invokation has to get passed to the ray forwarding (`args`
argument). The user geometry callback should instantly terminate after
invoking the `rtcForwardIntersect1` function.
The `rtcForwardIntersect1` and `rtcForwardIntersect1Ex` functions forward the
traversal of a transformed ray (`ray` argument) into a scene (`scene` argument)
from a user geometry callback. The function can only get invoked from a user
geometry callback for a ray traversal initiated with the `rtcIntersect1`
function. The callback arguments structure of the callback invokation has to
get passed to the ray forwarding (`args` argument). The user geometry callback
should instantly terminate after invoking the `rtcForwardIntersect1/Ex` function.
Only the ray origin and ray direction members of the ray
argument are used for forwarding, all additional ray properties are
@@ -42,10 +49,15 @@ This function can get used to implement user defined instancing using
user geometries, e.g. by transforming the ray in a special way, and/or
selecting between different scenes to instantiate.
For user defined instance arrays, the `rtcForwardIntersect1Ex` variant has an
additional `instPrimID` argument which is pushed to the instance primitive ID
stack. Instance primitive IDs identify which instance of an instance array was
hit.
When using Embree on the CPU it is possible to recursively invoke
`rtcIntersect1` directly from a user geometry callback. However, when
SYCL is used, recursively tracing rays is not directly supported, and
the `rtcForwardIntersect1` function must be used.
the `rtcForwardIntersect1/Ex` functions must be used.
The ray structure must be aligned to 16 bytes.
+46 -13
View File
@@ -1,8 +1,8 @@
% rtcForwardIntersect4/8/16(3) | Embree Ray Tracing Kernels 4
% rtcForwardIntersect4/8/16/Ex(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcForwardIntersect4/8/16 - forwards a ray packet to new scene
rtcForwardIntersect4/8/16/Ex - forwards a ray packet to new scene
from user geometry callback
#### SYNOPSIS
@@ -17,11 +17,11 @@
unsigned int instID
);
void rtcForwardIntersect4(
void rtcForwardIntersect8(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay4* ray,
struct RTCRay8* ray,
unsigned int instID
);
@@ -30,19 +30,47 @@
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay16* ray,
unsigned int instID
unsigned int instID,
unsigned int instPrimID
);
void rtcForwardIntersect4Ex(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay4* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcForwardIntersect8Ex(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay8* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcForwardIntersect16Ex(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay16* ray,
unsigned int instID,
unsigned int instPrimID
);
#### DESCRIPTION
The `rtcForwardIntersect4/8/16` functions forward the traversal of a
transformed ray packet (`ray` argument) into a scene (`scene` argument) from
a user geometry callback. The function can only get invoked from a
user geometry callback for a ray traversal initiated with the
`rtcIntersect4/8/16` function. The callback arguments structure of the
callback invokation has to get passed to the ray forwarding (`args`
argument). The user geometry callback should instantly terminate after
invoking the `rtcForwardIntersect4/8/16` function.
The `rtcForwardIntersect4/8/16` and `rtcForwardIntersect4/8/16Ex` functions
forward the traversal of a transformed ray packet (`ray` argument) into a scene
(`scene` argument) from a user geometry callback. The function can only get
invoked from a user geometry callback for a ray traversal initiated with the
`rtcIntersect4/8/16` function. The callback arguments structure of the callback
invokation has to get passed to the ray forwarding (`args` argument). The user
geometry callback should instantly terminate after invoking the
`rtcForwardIntersect4/8/16/Ex` function.
Only the ray origin and ray direction members of the ray
argument are used for forwarding, all additional ray properties are
@@ -59,6 +87,11 @@ This function can get used to implement user defined instancing using
user geometries, e.g. by transforming the ray in a special way, and/or
selecting between different scenes to instantiate.
For user defined instance arrays, the `rtcForwardIntersect4/8/16Ex` variant has an
additional `instPrimID` argument which is pushed to the instance primitive ID
stack. Instance primitive IDs identify which instance of an instance array was
hit.
When using Embree on the CPU it is possible to recursively invoke
`rtcIntersect4/8/16` directly from a user geometry callback. However, when
SYCL is used, recursively tracing rays is not directly supported, and
+23 -11
View File
@@ -1,8 +1,8 @@
% rtcForwardOccluded1(3) | Embree Ray Tracing Kernels 4
% rtcForwardOccluded1/Ex(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcForwardOccluded1 - forwards a single ray to new scene
rtcForwardOccluded1/Ex - forwards a single ray to new scene
from user geometry callback
#### SYNOPSIS
@@ -16,16 +16,23 @@
unsigned int instID
);
void rtcForwardOccluded1Ex(
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay* ray,
unsigned int instID,
unsigned int instPrimID
);
#### DESCRIPTION
The `rtcForwardOccluded1` function forwards the traversal of a
transformed ray (`ray` argument) into a scene (`scene` argument) from
a user geometry callback. The function can only get invoked from a
user geometry callback for a ray traversal initiated with the
`rtcOccluded1` function. The callback arguments structure of the
callback invokation has to get passed to the ray forwarding (`args`
argument). The user geometry callback should instantly terminate after
invoking the `rtcForwardOccluded1` function.
The `rtcForwardOccluded1` and `rtcForwardOccluded1Ex` functions forward the
traversal of a transformed ray (`ray` argument) into a scene (`scene` argument)
from a user geometry callback. The function can only get invoked from a user
geometry callback for a ray traversal initiated with the `rtcOccluded1`
function. The callback arguments structure of the callback invokation has to
get passed to the ray forwarding (`args` argument). The user geometry callback
should instantly terminate after invoking the `rtcForwardOccluded1/Ex` function.
Only the ray origin and ray direction members of the ray
argument are used for forwarding, all additional ray properties are
@@ -42,10 +49,15 @@ This function can get used to implement user defined instancing using
user geometries, e.g. by transforming the ray in a special way, and/or
selecting between different scenes to instantiate.
For user defined instance arrays, the `rtcForwardIntersect1Ex` variant has an
additional `instPrimID` argument which is pushed to the instance primitive ID
stack. Instance primitive IDs identify which instance of an instance array was
hit.
When using Embree on the CPU it is possible to recursively invoke
`rtcOccluded1` directly from a user geometry callback. However, when
SYCL is used, recursively tracing rays is not directly supported, and
the `rtcForwardOccluded1` function must be used.
the `rtcForwardOccluded1/Ex` function must be used.
The ray structure must be aligned to 16 bytes.
+44 -12
View File
@@ -1,8 +1,8 @@
% rtcForwardOccluded4/8/16(3) | Embree Ray Tracing Kernels 4
% rtcForwardOccluded4/8/16/Ex(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcForwardOccluded4/8/16 - forwards a ray packet to new scene
rtcForwardOccluded4/8/16/Ex - forwards a ray packet to new scene
from user geometry callback
#### SYNOPSIS
@@ -17,11 +17,11 @@
unsigned int instID
);
void rtcForwardOccluded4(
void rtcForwardOccluded8(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay4* ray,
struct RTCRay8* ray,
unsigned int instID
);
@@ -33,16 +33,43 @@
unsigned int instID
);
void rtcForwardOccluded4Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay4* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcForwardOccluded8Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay8* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcForwardOccluded16Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay16* ray,
unsigned int instID,
unsigned int instPrimID
);
#### DESCRIPTION
The `rtcForwardOccluded4/8/16` functions forward the traversal of a
transformed ray packet (`ray` argument) into a scene (`scene` argument) from
a user geometry callback. The function can only get invoked from a
user geometry callback for a ray traversal initiated with the
`rtcOccluded4/8/16` function. The callback arguments structure of the
callback invokation has to get passed to the ray forwarding (`args`
argument). The user geometry callback should instantly terminate after
invoking the `rtcForwardOccluded4/8/16` function.
The `rtcForwardOccluded4/8/16` and `rtcForwardOccluded4/8/16Ex` functions
forward the traversal of a transformed ray packet (`ray` argument) into a scene
(`scene` argument) from a user geometry callback. The function can only get
invoked from a user geometry callback for a ray traversal initiated with the
`rtcOccluded4/8/16` function. The callback arguments structure of the callback
invokation has to get passed to the ray forwarding (`args` argument). The user
geometry callback should instantly terminate after invoking the
`rtcForwardOccluded4/8/16/Ex` function.
Only the ray origin and ray direction members of the ray
argument are used for forwarding, all additional ray properties are
@@ -59,6 +86,11 @@ This function can get used to implement user defined instancing using
user geometries, e.g. by transforming the ray in a special way, and/or
selecting between different scenes to instantiate.
For user defined instance arrays, the `rtcForwardIntersect4/8/16Ex` variant has
an additional `instPrimID` argument which is pushed to the instance primitive
ID stack. Instance primitive IDs identify which instance of an instance array
was hit.
When using Embree on the CPU it is possible to recursively invoke
`rtcOccluded4/8/16` directly from a user geometry callback. However, when
SYCL is used, recursively tracing rays is not directly supported, and
+5 -2
View File
@@ -13,7 +13,10 @@
#### DESCRIPTION
The `rtcGetBufferData` function returns a pointer to the buffer data
of the specified buffer object (`buffer` argument).
of the specified buffer object (`buffer` argument). If the buffer
was created using `rtcNewBufferHostDevice` and the SYCL device has no
host unified memory, this pointer is only valid on the host. To get
a device pointer in this case, use `rtcGetBufferDataDevice`.
#### EXIT STATUS
@@ -22,4 +25,4 @@ On failure an error code is set that can be queried using
#### SEE ALSO
[rtcNewBuffer]
[rtcGetBufferDataDevice], [rtcNewBuffer], [rtcNewBufferHostDevice]
+28
View File
@@ -0,0 +1,28 @@
% rtcGetBufferData(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetBufferDataDevice - gets a device pointer to the buffer data
#### SYNOPSIS
#include <embree4/rtcore.h>
void* rtcGetBufferDataDevice(RTCBuffer buffer);
#### DESCRIPTION
The `rtcGetBufferDataDevice` function returns a pointer to the buffer data
of the specified buffer object (`buffer` argument) which can be used for
accessing the data on the device. If Embree has no SYCL support or the SYCL
device has host unified memory, the pointer is equal to the pointer returned
by `rtcGetBufferData`.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcGetBufferData], [rtcNewBuffer]
+14 -1
View File
@@ -39,16 +39,29 @@ Possible error codes returned by `rtcGetDeviceError` are:
+ `RTC_ERROR_CANCELLED`: The operation got canceled by a memory
monitor callback or progress monitor callback function.
+ `RTC_ERROR_LEVEL_ZERO_RAYTRACING_SUPPORT_MISSING`: This error can occur when
creating an Embree device with SYCL support using `rtcNewSYCLDevice` fails.
This error probably means that the GPU driver is to old or not installed
properly. Install a new GPU driver and on Linux make sure that the package
`intel-level-zero-gpu-raytracing` is installed. For general driver installation
information for Linux refer to [https://dgpu-docs.intel.com](https://dgpu-docs.intel.com).
When the device construction fails, `rtcNewDevice` returns `NULL` as
device. To detect the error code of a such a failed device
construction, pass `NULL` as device to the `rtcGetDeviceError`
function. For all other invocations of `rtcGetDeviceError`, a proper
device pointer must be specified.
The API function `rtcGetDeviceLastErrorMessage` can be used to get more details
about the last `RTCError` a `RTCDevice` encountered.
For convenient reporting of a `RTCError`, the API function `rtcGetErrorString`
can be used, which returns a string representation of a given `RTCError`.
#### EXIT STATUS
Returns the error code for the device.
#### SEE ALSO
[rtcSetDeviceErrorFunction]
[rtcSetDeviceErrorFunction], [rtcGetDeviceLastErrorMessage], [rtcGetErrorString]
@@ -0,0 +1,33 @@
% rtcGetDeviceLastErrorMessage(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetDeviceLastErrorMessage - returns a message corresponding
to the last error code
#### SYNOPSIS
#include <embree4/rtcore.h>
const char* rtcGetDeviceLastErrorMessage(RTCDevice device);
#### DESCRIPTION
This function can be used to get a message corresponding to the last error code
(returned by `rtcGetDeviceError`) which often provides details about the error
that happened. The message is the same as the message that will written to
console when verbosity is > 0 or which is passed as the `str` argument of the
`RTCErrorFunction` (see [rtcSetDeviceErrorFunction]). However, when device
construction fails this is the only way to get additional information about
the error. In this case, `rtcNewDevice` returns `NULL` as device. To query the
error message for such a failed device construction, pass `NULL` as device to the
`rtcGetDeviceLastErrorMessage` function. For all other invocations of
`rtcGetDeviceLastErrorMessage`, a proper device pointer must be specified.
#### EXIT STATUS
Returns a message corresponding to the last error code.
#### SEE ALSO
[rtcGetDeviceError], [rtcSetDeviceErrorFunction]
+31
View File
@@ -0,0 +1,31 @@
% rtcGetErrorString(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetErrorString - returns a string representation
of a given RTCError
#### SYNOPSIS
#include <embree4/rtcore.h>
const char* rtcGetErrorString(RTCError code);
#### DESCRIPTION
Returns a string representation for a `RTCError` error code. For example, for the
`RTCError` RTC_ERROR_UNKNOWN this function will return the string "Unknown Error".
This is purely a convenience function for printing error information on the user
side.
The returned strings should not be used for comparing different `RTCError` error
codes or make other decisions based on the type of error that occurred. For such
things only the `RTCError` enum values should be used.
#### EXIT STATUS
Returns a string representation of a given `RTCError` error code.
#### SEE ALSO
[rtcGetDeviceError]
+6 -1
View File
@@ -22,6 +22,10 @@ element of the buffer view attached to the specified buffer type and
slot (`type` and `slot` argument) of the geometry (`geometry`
argument).
If the device associated with `geometry` is a SYCL device,
the returned pointer only accessible on the host. The function
`rtcGetGeometryBufferDataDevice` can be used to get a pointer
accessible on the SYCL device.
#### EXIT STATUS
On failure an error code is set that can be queried using
@@ -29,4 +33,5 @@ On failure an error code is set that can be queried using
#### SEE ALSO
[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer]
[rtcGetGeometryBufferDataDevice], [rtcSetGeometryBuffer],
[rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer]
@@ -0,0 +1,36 @@
% rtcGetGeometryBufferDataDevice(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetGeometryBufferDataDevice - gets pointer to
the first buffer view element on the device.
#### SYNOPSIS
#include <embree4/rtcore.h>
void* rtcGetGeometryBufferDataDevice(
RTCGeometry geometry,
enum RTCBufferType type,
unsigned int slot
);
#### DESCRIPTION
The `rtcGetGeometryBufferDataDevice` function returns a pointer to the first
element of the buffer view attached to the specified buffer type and
slot (`type` and `slot` argument) of the geometry (`geometry`
argument) on the device.
If the device associated with `geometry` is no SYCL device, or if Embree
is executed on a system with host unified memory (e.g., on an iGPU),
the returned pointer is the same as the one returned by `rtcGetGeometryBufferData`.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcGetGeometryBufferData], [rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer]
+49
View File
@@ -0,0 +1,49 @@
% rtcGetGeometryTransformEx(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetGeometryTransformEx - returns the interpolated instance
transformation for an instance of an instance array geometry for the
specified time.
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcGetGeometryTransformEx(
RTCGeometry geometry,
unsigned int instPrimID,
float time,
enum RTCFormat format,
void* xfm
);
#### DESCRIPTION
The `rtcGetGeometryTransformEx` function returns the interpolated local
to world transformation (`xfm` parameter) of the `instPrimID`-th instance of an
instance array geometry (`geometry` parameter) for a particular time (`time`
parameter in range $[0,1]$) in the specified format (`format` parameter).
The function can also be used when `geometry` refers to a regular instance, but
then the `instPrimID` has to be $0$.
Possible formats for the returned matrix are:
+ `RTC_FORMAT_FLOAT3X4_ROW_MAJOR`: The 3×4 float matrix is laid out
in row-major form.
+ `RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR`: The 3×4 float matrix is laid out
in column-major form.
+ `RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR`: The 3×4 float matrix is laid out
in column-major form as a 4×4 homogeneous matrix with last row equal
to (0, 0, 0, 1).
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[RTC_GEOMETRY_TYPE_INSTANCE_ARRAY]
@@ -0,0 +1,35 @@
% rtcGetGeometryTransformFromTraversable(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetGeometryTransformFromTraversable - returns the interpolated instance
transformation for the specified time
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcGetGeometryTransformFromTraversable(
RTCTraversable traversable,
unsigned int geomID,
float time,
enum RTCFormat format,
void* xfm
);
#### DESCRIPTION
The `rtcGetGeometryTransformFromTraversable` function is equivalent to
`rtcGetGeometryTransformFromScene` but takes traversable object (`traversable` argument)
instead of a scene object. Using this method is optional on CPU but it is required for SYCL.
For more details, refer to the documentation of `rtcGetGeometryTransformFromScene`.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcGetGeometryTransformFromScene], [rtcGetSceneTraversable]
@@ -0,0 +1,30 @@
% rtcGetGeometryUserDataFromTraversable(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetGeometryUserDataFromTraversable - returns the user data pointer
of the geometry through the scene object
#### SYNOPSIS
#include <embree4/rtcore.h>
void* rtcGetGeometryUserDataFromTraversable(
RTCTraversable traversable,
unsigned int geomID);
#### DESCRIPTION
The `rtcGetGeometryUserDataFromTraversable` function is equivalent to
`rtcGetGeometryUserDataFromScene` but takes traversable object
(`traversable` argument) instead of a scene object.
Using this method is optional on CPU but it is required for SYCL.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcGetGeometryUserDataFromScene], [rtcGetSceneTraversable]
+31
View File
@@ -0,0 +1,31 @@
% rtcGetSceneTraversable(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetSceneTraversable - gets a read-only hand to a RTCScene object
that is also valid on a SYCL device and can be used for ray queries.
#### SYNOPSIS
#include <embree4/rtcore.h>
RTCTraversable rtcGetSceneTraversable(RTCScene scene);
#### DESCRIPTION
The `rtcGetSceneTraversable` function returns a read-only handle
to a RTCScene object (`scene` argument). Traversable objects are
used for ray queries on a SYCL device.
Traversable objects can also be used in host/CPU code and Embree provides
other API calls such as the `rtcTraversablePointQuery` to help
write portable code compatible with CPU and SYCL device execution.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcTraversableIntersect1]
+8 -1
View File
@@ -26,6 +26,13 @@ and deallocated when the buffer is destroyed.
``` {include=src/api/inc/buffer_padding.md}
```
If the `device` is a Embree SYCL device, the buffer will be allocated
using SYCL USM shared memory, i.e. the buffer can be accessed on the host
and device (GPU) and the SYCL runtime will handle buffer transfers automatically.
For precise control over when memory is copied from host to device,
a buffer can also be created using `rtcNewBufferHostDevice`.
#### EXIT STATUS
On failure `NULL` is returned and an error code is set that can be
@@ -33,4 +40,4 @@ queried using `rtcGetDeviceError`.
#### SEE ALSO
[rtcRetainBuffer], [rtcReleaseBuffer]
[rtcNewBufferHostDevice], [rtcRetainBuffer], [rtcReleaseBuffer]
+43
View File
@@ -0,0 +1,43 @@
% rtcNewBuffer(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcNewBufferHostDevice - creates a new data buffer with
explicitly managed host and device memory allocations
#### SYNOPSIS
#include <embree4/rtcore.h>
RTCBuffer rtcNewBufferHostDevice(
RTCDevice device,
size_t byteSize
);
#### DESCRIPTION
The `rtcNewBufferHostDevice` function creates a new data buffer object of
specified size in bytes (`byteSize` argument) that is bound to the
specified device (`device` argument). The buffer object is reference
counted with an initial reference count of 1. The returned buffer
object can be released using the `rtcReleaseBuffer` API call. If Embree has SYCL
support enabled and the SYCL device has no host unifed memory (e.g, a discrete GPU),
the buffer allocates memory on the host and device explicitly.
After the buffer is modified on the host `rtcCommitBuffer` can be used to synchronize
host and device memory by copying the buffer content from the host to device. If the Embree
version has no SYCL support or the SYCL device has host unified memory, the buffer will behave
the same as a buffer created using `rtcNewBuffer`. The
specified number of bytes are allocated at buffer construction time
and deallocated when the buffer is destroyed.
``` {include=src/api/inc/buffer_padding.md}
```
#### EXIT STATUS
On failure `NULL` is returned and an error code is set that can be
queried using `rtcGetDeviceError`.
#### SEE ALSO
[rtcCommitBuffer], [rtcNewBuffer], [rtcRetainBuffer], [rtcReleaseBuffer]
+6 -4
View File
@@ -33,7 +33,8 @@
RTC_GEOMETRY_TYPE_DISC_POINT,
RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT,
RTC_GEOMETRY_TYPE_USER,
RTC_GEOMETRY_TYPE_INSTANCE
RTC_GEOMETRY_TYPE_INSTANCE,
RTC_GEOMETRY_TYPE_INSTANCE_ARRAY,
};
RTCGeometry rtcNewGeometry(
@@ -64,8 +65,9 @@ bases (`RTC_GEOMETRY_TYPE_FLAT_LINEAR_CURVE`, `RTC_GEOMETRY_TYPE_FLAT_BEZIER_CUR
grid meshes (`RTC_GEOMETRY_TYPE_GRID`), point geometries
(`RTC_GEOMETRY_TYPE_SPHERE_POINT`, `RTC_GEOMETRY_TYPE_DISC_POINT`,
`RTC_TYPE_ORIENTED_DISC_POINT`),
user-defined geometries (`RTC_GEOMETRY_TYPE_USER`), and instances
(`RTC_GEOMETRY_TYPE_INSTANCE`).
user-defined geometries (`RTC_GEOMETRY_TYPE_USER`), instances
(`RTC_GEOMETRY_TYPE_INSTANCE`), and instance arrays
(`RTC_GEOMETRY_TYPE_INSTANCE_ARRAY`).
The types `RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE`,
`RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE`, and
@@ -123,4 +125,4 @@ queried using `rtcGetDeviceError`.
[RTC_GEOMETRY_TYPE_TRIANGLE], [RTC_GEOMETRY_TYPE_QUAD],
[RTC_GEOMETRY_TYPE_SUBDIVISION], [RTC_GEOMETRY_TYPE_CURVE],
[RTC_GEOMETRY_TYPE_GRID], [RTC_GEOMETRY_TYPE_POINT],
[RTC_GEOMETRY_TYPE_USER], [RTC_GEOMETRY_TYPE_INSTANCE]
[RTC_GEOMETRY_TYPE_USER], [RTC_GEOMETRY_TYPE_INSTANCE], [RTC_GEOMETRY_TYPE_INSTANCE_ARRAY]
+1 -1
View File
@@ -42,4 +42,4 @@ queried using `rtcGetDeviceError`.
#### SEE ALSO
[rtcRetainBuffer], [rtcReleaseBuffer]
[rtcNewSharedBufferHostDevice], [rtcRetainBuffer], [rtcReleaseBuffer]
@@ -0,0 +1,50 @@
% rtcNewSharedBufferHostDevice(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcNewSharedBufferHostDevice - creates a new shared data buffer
with a managed copy of the buffer in device memory
#### SYNOPSIS
#include <embree4/rtcore.h>
RTCBuffer rtcNewSharedBufferHostDevice(
RTCDevice device,
void* ptr,
size_t byteSize
);
#### DESCRIPTION
The `rtcNewSharedBufferHostDevice` function creates a new shared data buffer
object bound to the specified device (`device` argument). The buffer
object is reference counted with an initial reference count of 1. The
buffer can be released using the `rtcReleaseBuffer` function.
At construction time, the pointer to the user-managed buffer data
(`ptr` argument) including its size in bytes (`byteSize` argument) is
provided to create the buffer. At buffer construction time no buffer
data is allocated on the host, but the buffer data provided by the application is
used. A equal sized memory allocation is created on the device.
The buffer data must remain valid for as long as the buffer may
be used, and the user is responsible to free the buffer data when no
longer required.
``` {include=src/api/inc/buffer_padding.md}
```
The data pointer (`ptr` argument) must be aligned to 4 bytes; otherwise
the `rtcNewSharedBufferHostDevice` function will fail.
The function `rtcCommitBuffer` can be used to synchronize the buffer
content with the device.
#### EXIT STATUS
On failure `NULL` is returned and an error code is set that can be
queried using `rtcGetDeviceError`.
#### SEE ALSO
[rtcNewSharedBuffer], [rtcCommitBuffer], [rtcRetainBuffer], [rtcReleaseBuffer]
@@ -0,0 +1,37 @@
% rtcSetGeometryInstancedScenes(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcSetGeometryInstancedScenes - sets an array of scenes that can be
instanced by an instance array geometry
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcSetGeometryInstancedScenes(
RTCGeometry geometry,
RTCScene* scene,
size_t numScenes
);
#### DESCRIPTION
The `rtcSetGeometryInstancedScenes` function sets an array of type `RTCScene`
with `numScenes` elements that the specified instance geometry (`geometry`
argument) can instance. This call also requires setting an index buffer using
either `rtcSetSharedGeometryBuffer` or `rtcSetNewGeometryBuffer` (similar to
index buffers for triangle meshes), that specifies which instance of the
instance array instances which scene in the scene array. If only one scene
should be instanced the call `rtcSetGeometryInstancedScene` should be
preferred.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[RTC_GEOMETRY_TYPE_INSTANCE_ARRAY], [rtcSetNewGeometryBuffer],
[rtcSetSharedGeometryBuffer], [rtcSetGeometryInstancedScene]
@@ -0,0 +1,62 @@
% rtcSetNewGeometryBufferHostDevice(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcSetNewGeometryBufferHostDevice - creates and assigns a new host/device
data buffer pair to the geometry
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcSetNewGeometryBufferHostDevice(
RTCGeometry geometry,
enum RTCBufferType type,
unsigned int slot,
enum RTCFormat format,
size_t byteStride,
size_t itemCount,
void** ptr,
void** dptr
);
#### DESCRIPTION
The `rtcSetNewGeometryBufferHostDevice` function creates a new host/device data buffer pair of
specified format (`format` argument), byte stride (`byteStride`
argument), and number of items (`itemCount` argument), and assigns it
to a geometry buffer slot (`type` and `slot` argument) of the
specified geometry (`geometry` argument). The buffer data is managed
internally and automatically freed when the geometry is destroyed.
The byte stride (`byteStride` argument) must be aligned to 4 bytes;
otherwise the `rtcSetNewGeometryBufferHostDevice` function will fail.
The allocated buffer will be automatically over-allocated slightly
when used as a vertex buffer, where a requirement is that each buffer
element should be readable using 16-byte SSE load instructions.
If `ptr` is not null, it will be used to return the address of the
host data buffer. If `dptr` is not null, it will be used to return
the address of the device data buffer. Either `ptr` or `dptr` or both
can be null. In this case `rtcGetGeometryBufferData` and
`rtcGetGeometryBufferDataDevice` can be used to get the addresses of the
host and device data buffers.
The application is responsible of keeping the host and device memory
in sync. The host memory has to be updated before calls of
`rtcCommitScene` involving the associated geometry.
If Embree has no SYCL support or the associated Embree device is no
SYCL device the `dptr` argument will return the same address as `ptr` if on null.
In this case the function `rtcSetNewGeometryBufferHostDevice` will behave like
`rtcSetSharedGeometryBuffer`.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcSetNewGeometryBuffer], [rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer],
[rtcGetGeometryBufferData], [rtcGetGeometryBufferDataDevice]
+6 -1
View File
@@ -43,6 +43,11 @@ The buffer data must remain valid for as long as the buffer may be
used, and the user is responsible for freeing the buffer data when no
longer required.
If using a SYCL Embree device, `ptr` must be allocated using SYCL USM shared
memory to be accessible on the device. Alternatively the function
`rtcSetSharedGeometryBufferHostDevice` can be used to pass an explicitly
managed host/device buffer pair.
Sharing buffers can significantly reduce the memory required by the
application, thus we recommend using this feature. When enabling the
`RTC_SCENE_FLAG_COMPACT` scene flag, the spatial index structures index
@@ -55,4 +60,4 @@ On failure an error code is set that can be queried using
#### SEE ALSO
[rtcSetGeometryBuffer], [rtcSetNewGeometryBuffer]
[rtcSetSharedGeometryBufferHostDevice], [rtcSetGeometryBuffer], [rtcSetNewGeometryBuffer]
@@ -0,0 +1,70 @@
% rtcSetSharedGeometryBufferHostDevice(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcSetSharedGeometryBufferHostDevice - assigns views of shared data buffers
to a geometry using explicit host and device memory
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcSetSharedGeometryBuffer(
RTCGeometry geometry,
enum RTCBufferType type,
unsigned int slot,
enum RTCFormat format,
const void* ptr,
const void* dptr,
size_t byteOffset,
size_t byteStride,
size_t itemCount
);
#### DESCRIPTION
The `rtcSetSharedGeometryBufferHostDevice` function binds views of a
shared user-managed data buffers to a geometry buffer
type and slot (`type` and `slot` argument) of the specified geometry
(`geometry` argument). The user-managed data buffers are passed using the
`ptr` argument for the host side allocated memory and the `dptr` parameter
for the memory allocated on the device.
One can specify the start of the first buffer element in bytes
(`byteOffset` argument), the byte stride between individual buffer
elements (`byteStride` argument), the format of the buffer elements
(`format` argument), and the number of elements to bind (`itemCount`).
The start address (`byteOffset` argument) and stride (`byteStride`
argument) must be both aligned to 4 bytes; otherwise the
`rtcSetSharedGeometryBufferHostDevice` function will fail.
``` {include=src/api/inc/buffer_padding.md}
```
The buffer data must remain valid for as long as the buffer may be
used, and the user is responsible for freeing the buffer data when no
longer required.
The application is responsible of keeping the host and device memory
in sync. The host memory has to be updated before calls of
`rtcCommitScene` involving the associated geometry.
If Embree has no SYCL support or the associated Embree device is no
SYCL device the `dptr` argument must be a null pointer. In this case
the function `rtcSetSharedGeometryBufferHostDevice` will behave like
`rtcSetSharedGeometryBuffer`.
Sharing buffers can significantly reduce the memory required by the
application, thus we recommend using this feature. When enabling the
`RTC_SCENE_FLAG_COMPACT` scene flag, the spatial index structures index
into the vertex buffer, resulting in even higher memory savings.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[rtcSetSharedGeometryBuffer], [rtcSetGeometryBuffer], [rtcSetNewGeometryBuffer]
@@ -0,0 +1,43 @@
% rtcTraversableForwardIntersect1/Ex(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcTraversableForwardIntersect1/Ex - forwards a single ray to new scene
from user geometry callback
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcTraversableForwardIntersect1(
const struct RTCIntersectFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay* ray,
unsigned int instID
);
void rtcTraversableForwardIntersect1Ex(
const struct RTCIntersectFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay* ray,
unsigned int instID,
unsigned int instPrimID,
);
#### DESCRIPTION
The `rtcTraversalbeForwardIntersect1` and `rtcTraversableForwardIntersect1Ex` functions are
equivalent to `rtcForwardIntersect1` and `rtcForwardIntersect1Ex` respectively
but take a traversable object (`traversable` argument) instead of a scene
object.
For more details, refer to the documentation of `rtcForwardIntersect1/Ex`.
#### EXIT STATUS
For performance reasons this function does not do any error checks,
thus will not set any error flags on failure.
#### SEE ALSO
[rtcForwardIntersect1], [rtcGetSceneTraversable]
@@ -0,0 +1,81 @@
% rtcTraversableForwardIntersect4/8/16/Ex(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcTraversableForwardIntersect4/8/16/Ex - forwards a ray packet to new scene
from user geometry callback
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcTraversableForwardIntersect4(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay4* ray,
unsigned int instID
);
void rtcTraversableForwardIntersect8(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay8* ray,
unsigned int instID
);
void rtcTraversableForwardIntersect16(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay16* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcTraversableForwardIntersect4Ex(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay4* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcTraversableForwardIntersect8Ex(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay8* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcTraversableForwardIntersect16Ex(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay16* ray,
unsigned int instID,
unsigned int instPrimID
);
#### DESCRIPTION
The `rtcTraversableForwardIntersect4/8/16/Ex` functions
are equivalent to `rtcForwardIntersect4/8/16/Ex`
but take a traversable object (`traversable` argument)
instead of a scene object.
For more details, refer to the documentation of `rtcForwardIntersect4/8/16/Ex`.
#### EXIT STATUS
For performance reasons this function does not do any error checks,
thus will not set any error flags on failure.
#### SEE ALSO
[rtcForwardIntersect4/8/16/Ex], [rtcGetSceneTraversable]
@@ -0,0 +1,43 @@
% rtcTraversableForwardOccluded1/Ex(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcTraversableForwardOccluded1/Ex - forwards a single ray to new scene
from user geometry callback
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcTraversableForwardOccluded1(
const struct RTCOccludedFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay* ray,
unsigned int instID
);
void rtcTraversableForwardOccluded1Ex(
const struct RTCOccludedFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay* ray,
unsigned int instID,
unsigned int instPrimID,
);
#### DESCRIPTION
The `rtcTraversalbeForwardOccluded1` and `rtcTraversableForwardOccluded1Ex` functions are
equivalent to `rtcForwardOccluded1` and `rtcForwardOccluded1Ex` respectively
but take a traversable object (`traversable` argument) instead of a scene
object.
For more details, refer to the documentation of `rtcForwardOccluded1/Ex`.
#### EXIT STATUS
For performance reasons this function does not do any error checks,
thus will not set any error flags on failure.
#### SEE ALSO
[rtcForwardOccluded1], [rtcGetSceneTraversable]
@@ -0,0 +1,79 @@
% rtcTraversableForwardOccluded4/8/16/Ex(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcTraversableForwardOccluded4/8/16/Ex - forwards a ray packet to new scene
from user geometry callback
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcTraversableForwardOccluded4(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay4* ray,
unsigned int instID
);
void rtcTraversableForwardOccluded8(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay8* ray,
unsigned int instID
);
void rtcTraversableForwardOccluded16(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay16* ray,
unsigned int instID
);
void rtcTraversableForwardOccluded4Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay4* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcTraversableForwardOccluded8Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay8* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcTraversableForwardOccluded16Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCTraversable traversable,
struct RTCRay16* ray,
unsigned int instID,
unsigned int instPrimID
);
#### DESCRIPTION
The `rtcTraversableForwardOccluded4/8/16/Ex` functions
are equivalent to `rtcForwardOccluded4/8/16/Ex`
but take a traversable object (`traversable` argument)
instead of a scene object.
For more details, refer to the documentation of `rtcForwardOccluded4/8/16/Ex`.
#### EXIT STATUS
For performance reasons this function does not do any error checks,
thus will not set any error flags on failure.
#### SEE ALSO
[rtcForwardOccluded4/8/16/Ex], [rtcGetSceneTraversable]
+32
View File
@@ -0,0 +1,32 @@
% rtcTraversableIntersect1(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcTraversableIntersect1 - finds the closest hit for a single ray
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcTraversableIntersect1(
RTCTraversable traversable,
struct RTCRayHit* rayhit
struct RTCIntersectArguments* args = NULL
);
#### DESCRIPTION
The `rtcTraversableIntersect` function is equivalent to `rtcIntersect1`
but takes traversable object (`traversable` argument) instead of a scene
object. Using this method is optional on CPU but it is required for SYCL.
For more details, refer to the documentation of `rtcIntersect1`.
#### EXIT STATUS
For performance reasons this function does not do any error checks,
thus will not set any error flags on failure.
#### SEE ALSO
[rtcIntersect1], [rtcGetSceneTraversable]
+48
View File
@@ -0,0 +1,48 @@
% rtcTraversableIntersect4/8/16(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcTravesableIntersect4/8/16 - finds the closest hits for a ray packet
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcTraversableIntersect4(
const int* valid,
RTCTraversable traversable,
struct RTCRayHit4* rayhit,
struct RTCIntersectArguments* args = NULL
);
void rtcTraversableIntersect8(
const int* valid,
RTCTraversable traversable,
struct RTCRayHit8* rayhit,
struct RTCIntersectArguments* args = NULL
);
void rtcTraversableIntersect16(
const int* valid,
RTCTraversable traversable,
struct RTCRayHit16* rayhit,
struct RTCIntersectArguments* args = NULL
);
#### DESCRIPTION
The `rtcTraversableIntersect4/8/16` functions are equivalent to `rtcIntersect4/8/16`
but take a traversable object (`traversable` argument) instead of a scene
object.
For more details, refer to the documentation of `rtcIntersect4/8/16`.
#### EXIT STATUS
For performance reasons this function does not do any error checks,
thus will not set any error flags on failure.
#### SEE ALSO
[rtcIntersect4/8/16], [rtcGetSceneTraversable]
+32
View File
@@ -0,0 +1,32 @@
% rtcTraversableOccluded1(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcTraversableOccluded1 - finds any hit for a single ray
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcTraversableOccluded1(
RTCTraversable traversable,
struct RTCRay* ray,
struct RTCOccludedArguments* args = NULL
);
#### DESCRIPTION
The `rtcTraversableOccluded1` function is equivalent to `rtcOccluded1`
but takes traversable object (`traversable` argument) instead of a scene
object. Using this method is optional on CPU but it is required for SYCL.
For more details, refer to the documentation of `rtcOccluded1`.
#### EXIT STATUS
For performance reasons this function does not do any error checks,
thus will not set any error flags on failure.
#### SEE ALSO
[rtcOccluded1], [rtcGetSceneTraversable]
+47
View File
@@ -0,0 +1,47 @@
% rtcTraversableOccluded4/8/16(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcTraversableOccluded4/8/16 - finds any hits for a ray packet
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcTraversableOccluded4(
const int* valid,
RTCTraversable traversable,
struct RTCRay4* ray,
struct RTCOccludedArguments* args = NULL
);
void rtcTraversableOccluded8(
const int* valid,
RTCTraversable traversable,
struct RTCRay8* ray,
struct RTCOccludedArguments* args = NULL
);
void rtcTraversableOccluded16(
const int* valid,
RTCTraversable traversable,
struct RTCRay16* ray,
struct RTCOccludedArguments* args = NULL
);
#### DESCRIPTION
The `rtcTraversableOccluded4/8/16` functions are equivalent to `rtcOccluded4/8/16`
but take a traversable object (`traversable` argument) instead of a scene
object.
For more details, refer to the documentation of `rtcOccluded4/8/16`.
#### EXIT STATUS
For performance reasons this function does not do any error checks,
thus will not set any error flags on failure.
#### SEE ALSO
[rtcOccluded4/8/16], [rtcGetSceneTraversable]

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