Compare commits

..
279 Commits
Author SHA1 Message Date
Carsten Benthin faf50ee4f3 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-03-09 10:38:10 +01:00
Carsten Benthin c29bdc0fb4 merged with devel 2023-03-08 16:51:44 +01:00
Carsten Benthin 8ced524ed3 moving PLOC gpu builder to rtbuild directory 2023-03-06 10:39:13 +01:00
Carsten Benthin 918cbf255f merge with devel 2023-03-06 10:26:29 +01:00
Carsten Benthin 25c69683b4 CI updates 2023-02-28 14:41:14 +01:00
Carsten Benthin 4230ad9fa8 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-28 14:35:58 +01:00
Carsten Benthin d94baa3343 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-27 11:24:12 +01:00
Carsten Benthin baadebd80c 64bit address computations for getting triangle/quad index data 2023-02-21 18:04:08 +01:00
Carsten Benthin b6d9c8f3c3 LMS to prevent partial writes for cluster_index 2023-02-21 17:54:03 +01:00
Carsten Benthin e037e50d97 CI updates 2023-02-19 09:58:44 +01:00
Carsten Benthin b732b9e03d Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-17 14:49:42 +01:00
Carsten Benthin 62e615ca37 separate bvh2 rebalancing phase 2023-02-17 09:57:29 +01:00
Carsten Benthin d06fd532a2 merge 2023-02-17 09:08:37 +01:00
Carsten Benthin 40d4c6a910 disabling failing windows AOT test for now 2023-02-15 11:53:55 +01:00
Carsten Benthin 3275d65dd1 disabling gpu builder aot ci for now 2023-02-15 11:38:44 +01:00
Carsten Benthin 63daa1c8db updates for gpu builder CI 2023-02-15 11:17:21 +01:00
Carsten Benthin 6ee657b294 adding BVH2 rebalancing and exponent-based distance function merging 2023-02-15 11:01:08 +01:00
Carsten Benthin 36d2156dd1 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-15 10:33:09 +01:00
Carsten Benthin 4a73b7bbb1 merge with devel 2023-02-13 20:24:51 +01:00
Carsten Benthin b9c85b8fad Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-13 20:14:11 +01:00
Carsten Benthin 725cb64129 adding depth stats 2023-02-10 14:54:21 +01:00
Carsten Benthin a9f8431d41 merge with devel 2023-02-09 19:57:29 +01:00
Carsten Benthin d96c375312 supporting up to 1 billion tris/quads in the gpu bvh builder 2023-02-09 19:53:20 +01:00
Carsten Benthin ed4876ab57 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-09 13:22:08 +01:00
Carsten Benthin 6e934ebaa3 fixed 4GB overflow in sorting code 2023-02-09 12:15:39 +01:00
Carsten Benthin 62181cb890 fixed hang caused by 4GB overflow 2023-02-08 16:02:49 +01:00
Carsten Benthin 888213bfb5 fix in node_size computation, 4GB overflow 2023-02-08 14:59:07 +01:00
Carsten Benthin c2a2473fbe merge with devel 2023-02-08 12:21:12 +01:00
Carsten Benthin 0a6f0747ae Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-07 17:07:49 +01:00
Carsten Benthin 50010134a4 fixes 2023-02-07 17:07:19 +01:00
Florian Reibold ec9e1c3302 without -no-intel-lib, svml_dispmd.dll is also needed for CPU only
version.
2023-02-07 15:55:07 +01:00
Sven Woop 6abcec7afa Merge remote-tracking branch 'origin/devel' into carsten/embree4_gpubuild_merge_devel 2023-02-07 11:54:25 +01:00
Carsten Benthin 101d3bc582 merge from devel 2023-02-07 09:10:03 +01:00
Carsten Benthin 23ac58c096 updates to CI fo gpu bvh builder tests 2023-02-06 11:00:58 +01:00
Sven Woop 974032f91a Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-03 08:34:00 +01:00
Carsten Benthin 49692565ac added quadleafdata structure for tri/quad leaf data, which works with coalescing 2023-02-02 14:41:51 +01:00
Carsten Benthin f477238c71 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-02-02 13:44:33 +01:00
Carsten Benthin 5a2806ebcf Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-01-25 10:51:24 +01:00
Carsten Benthin 1ca8606321 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-01-23 10:07:59 +01:00
Carsten Benthin 211a46f995 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-01-20 15:20:08 +01:00
Carsten Benthin 63e7cf5dd0 replaced get_access with get_host_access as former is deprecated 2023-01-20 10:43:36 +01:00
Carsten Benthin da65dcbf43 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-01-20 10:28:47 +01:00
Carsten Benthin 87568ce302 fix for unwanted USM transfer when setting dispatchGlobalsPtr 2023-01-18 17:00:59 +01:00
Carsten Benthin dbcd8977b7 update 2023-01-18 13:40:36 +01:00
Carsten Benthin be60b0174c Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-01-11 10:15:38 +01:00
Carsten Benthin 5819326a52 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-01-09 12:17:29 +01:00
Carsten Benthin 2ce496ab75 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2023-01-06 09:13:43 +01:00
Carsten Benthin 13c2f00069 merge from devel 2023-01-05 13:07:09 +01:00
Carsten Benthin b06a657b17 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-16 15:46:35 +01:00
Carsten Benthin 786f69c786 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-15 09:21:44 +01:00
Carsten Benthin b6e27d8d75 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-14 11:48:31 +01:00
Carsten Benthin 6c81a3d3c2 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-14 08:52:20 +01:00
Carsten Benthin 9265d8db32 merge with devel 2022-12-13 09:03:40 +01:00
Carsten Benthin 114ff75186 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-12 09:52:01 +01:00
Carsten Benthin c8c52da8a9 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-08 20:41:49 +01:00
Carsten Benthin 6a704849e0 merge with devel 2022-12-08 12:39:11 +01:00
Carsten Benthin 845d771a7d Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-07 15:06:41 +01:00
Carsten Benthin cb1575cf6a Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-07 13:53:22 +01:00
Carsten Benthin 369e7d247a Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-06 21:01:48 +01:00
Carsten Benthin daaf0b6821 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-06 13:58:19 +01:00
Carsten Benthin 9d7bf6e340 Reduced SINGLE_WG_SWITCH_THRESHOLD to 4k 2022-12-06 13:57:57 +01:00
Carsten Benthin eb7a52c511 reducing TRIANGLE_QUAD_BLOCK_SIZE to 64 2022-12-05 14:49:27 +01:00
Carsten Benthin cadacfe4fc set TRIANGLE_QUAD_BLOCK_SIZE to 64, more verbose output 2022-12-05 14:41:59 +01:00
Carsten Benthin 8c841824ab Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-05 13:15:12 +01:00
Carsten Benthin 435f92a4f1 compile fix 2022-12-05 10:27:05 +01:00
Carsten Benthin 5b7372ffd4 merge with devel 2022-12-05 10:06:03 +01:00
Carsten Benthin 8043a2ba1a more cleanups 2022-12-04 14:40:28 +01:00
Carsten Benthin 35099355c6 new equi distant workaround plus large cleanups 2022-12-04 14:26:50 +01:00
Carsten Benthin 9b0536c99d enabling new workaround 2022-12-02 18:00:49 +01:00
Carsten Benthin 90c4e43226 new workaround for equal distances 2022-12-02 17:07:51 +01:00
Carsten Benthin 204e6e8ba4 updates 2022-12-02 16:19:02 +01:00
Carsten Benthin 88ef925142 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-02 15:23:01 +01:00
Carsten Benthin 4615352b0b extending distance fct workaround to equal distances across the workgroup 2022-12-02 15:22:22 +01:00
Carsten Benthin 28a2d2cd21 extending distance fct workaround to equal distances across the workgroup 2022-12-02 15:15:36 +01:00
Carsten Benthin 33a9674587 updates 2022-12-01 20:01:08 +01:00
Carsten Benthin 07cb6b45fd Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-12-01 12:02:27 +01:00
Carsten Benthin 5ae0623e3a merge with devel 2022-12-01 11:59:18 +01:00
Carsten Benthin a747ce1d7a Merge remote-tracking branch 'origin/devel' into carsten/embree4_gpubuild_merge_devel 2022-11-30 13:54:54 +01:00
Carsten Benthin 838d33d5f5 using embargo driver for gpu build due to problems with other 2022-11-30 12:02:58 +01:00
Carsten Benthin a23f9c91db only adding sycl::property::queue::enable_profiling() if verbose mode > 0 2022-11-30 11:59:17 +01:00
Carsten Benthin 3ec63dd996 Merge remote-tracking branch 'origin/devel' into carsten/embree4_gpubuild_merge_devel 2022-11-30 11:18:14 +01:00
Carsten Benthin 4203f9b176 merge from devel 2022-11-29 20:46:55 +01:00
Carsten Benthin 690bcb5977 better stats output in verbose=1 2022-11-29 18:49:26 +01:00
Carsten Benthin c462aa92ab cleanups 2022-11-29 17:25:12 +01:00
Carsten Benthin c81bca2b21 merge with devel 2022-11-29 16:49:23 +01:00
Carsten Benthin 6205540d3a merge with devel 2022-11-29 09:22:39 +01:00
Carsten Benthin 2268195d92 print render time for --frames option 2022-11-28 14:40:06 +01:00
Carsten Benthin 94f0d76cd2 merge with devel 2022-11-28 14:19:44 +01:00
Sven Woop eef604d232 measuring frame rate displayed in the application window on the device 2022-11-28 13:58:10 +01:00
Sven Woop 35f71e8167 added benchmark mode for dynamic_scene tutorial 2022-11-28 13:58:10 +01:00
Sven Woop 2e03bd8cce no longer passing arrays through TutorialArguments for quaternion_motion_blur tutorial 2022-11-28 13:58:10 +01:00
Sven Woop 0f83f52f8a no longer passing arrays through TutorialArguments for motion_blur_geometry tutorial 2022-11-28 13:58:10 +01:00
Sven Woop 1d6963b3a7 No longer passing arrays through TutorialArguments for user_geometry and instanced_geometry tutorials.
Using USM allocations for these arrays significantly improved performance.
2022-11-28 13:58:10 +01:00
Sven Woop bbd3fe1045 making accumulation buffer read/write 2022-11-28 13:58:10 +01:00
Carsten Benthin b0ee1fac5c merge devel 2022-11-28 10:49:05 +01:00
Carsten Benthin 9f191253df way faster rthwifGetAccelSizeGPU 2022-11-26 11:37:48 +01:00
Carsten Benthin 002c7c514c Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-25 14:21:45 +01:00
Carsten Benthin c1dd332fa8 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-25 09:00:03 +01:00
Carsten Benthin 252cbcc270 deactivating USM prefetching, using device_read_only USM allocations for geometries etc 2022-11-24 19:38:33 +01:00
Carsten Benthin b664c63c6a recomputing vertex data on the gpu for dynamic_scene_sycl 2022-11-24 18:56:46 +01:00
Carsten Benthin e602b12025 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-24 14:12:06 +01:00
Carsten Benthin 4c85bd3b15 disabled new opening heuristic, used queue::mempcy to update EmbreeHWAccel 2022-11-24 14:11:34 +01:00
Carsten Benthin 8bcb4998fd updates on opening heuristic 2022-11-23 21:15:56 +01:00
Carsten Benthin 619e3dd807 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-23 13:11:30 +01:00
Carsten Benthin 22688b27cb enabling new opening heuristic as default 2022-11-23 13:10:55 +01:00
Carsten Benthin e9529d224a merge with devel 2022-11-23 10:33:45 +01:00
Carsten Benthin df2ae4917a Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-23 10:29:03 +01:00
Carsten Benthin 04cb59f01b updates 2022-11-23 10:28:39 +01:00
Carsten Benthin b3f1dd9a4a cleanup phase 3 2022-11-23 10:18:27 +01:00
Carsten Benthin b2c4a8064f more cleanups 2022-11-22 20:46:49 +01:00
Carsten Benthin 7a35ca0c1a more cleanups 2022-11-22 17:02:24 +01:00
Carsten Benthin 76c38ea231 cleanups phase 2 2022-11-22 16:32:59 +01:00
Carsten Benthin 6588f06448 cleanups pass 1 2022-11-22 09:38:37 +01:00
Carsten Benthin 36f74ff1d8 updates 2022-11-21 17:43:30 +01:00
Carsten Benthin 2154f7cd2b cleanup phase 1 finished 2022-11-20 17:09:26 +01:00
Carsten Benthin 2944d1b4e4 before cleanup 2022-11-20 16:36:08 +01:00
Carsten Benthin 50bb9d8448 updates 2022-11-18 18:13:35 +01:00
Carsten Benthin 7ad2b25f99 another compile fix 2022-11-18 16:28:47 +01:00
Carsten Benthin 19e5d34c5e compile fix 2022-11-18 16:03:25 +01:00
Carsten Benthin 12f7105713 using 40bits/24bits mc codes for low quality build mode 2022-11-18 15:43:01 +01:00
Carsten Benthin ef23dccb27 selecting smaller search radius if build quality is low 2022-11-18 15:11:46 +01:00
Carsten Benthin 241033c3e8 selecting smaller search radius if build quality is low 2022-11-18 14:58:46 +01:00
Carsten Benthin 5e853c7fab merge with devel 2022-11-18 14:38:04 +01:00
Carsten Benthin 4567b509c8 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-18 14:15:19 +01:00
Carsten Benthin acb8aab7d7 adding comments 2022-11-18 14:14:37 +01:00
Carsten Benthin c3dd95cd41 more event optimizations 2022-11-17 19:18:41 +01:00
Carsten Benthin 87e9cf8ed8 merge with devel 2022-11-17 15:10:38 +01:00
Carsten Benthin 0dfbb99b45 gpu-bases accel size estimation 2022-11-16 18:49:02 +01:00
Carsten Benthin 483eb08e01 host device communication buffer is allocated internally, explicit passing sycl::queue to gpu builder fcts 2022-11-16 15:17:55 +01:00
Carsten Benthin 390596966e merging with devel 2022-11-16 14:17:37 +01:00
Carsten Benthin 6a05e68180 removing rtas support due to klockwork issues 2022-11-16 14:03:50 +01:00
Carsten Benthin bb215925c6 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-16 10:02:13 +01:00
Carsten Benthin df3d631685 simplification 2022-11-15 19:32:53 +01:00
Carsten Benthin 746bc08844 compute MAX_WGS at runtime 2022-11-15 18:34:55 +01:00
Carsten Benthin 6140b74687 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-15 17:06:59 +01:00
Carsten Benthin 50288fed54 updates 2022-11-15 17:06:12 +01:00
Carsten Benthin 57ff6ea39b added ci test with EMBREE_SYCL_GPU_BVH_BUILDER=ON 2022-11-15 14:40:23 +01:00
Carsten Benthin 8ba6005f72 cleanup radix sort 2022-11-14 20:12:43 +01:00
Carsten Benthin e17cd1a586 removing gpu_device as required parameter 2022-11-14 18:01:35 +01:00
Carsten Benthin c9094e81c7 removing in order queue requirement 2022-11-14 17:31:14 +01:00
Carsten Benthin c0c76d1d9f replacing queue wait by event wait 2022-11-14 17:29:18 +01:00
Carsten Benthin 762ef95163 new opening heuristic working again 2022-11-14 16:31:07 +01:00
Carsten Benthin 1be9f211b9 cleanups 2022-11-14 15:27:55 +01:00
Carsten Benthin 44f2c5ed2b removing onesweep sort implementation 2022-11-14 15:13:42 +01:00
Carsten Benthin 04cc521aa5 consistent naming of atomics 2022-11-14 12:11:30 +01:00
Carsten Benthin dca81eafba updates 2022-11-14 11:33:04 +01:00
Carsten Benthin 0de99fbc24 Merge branch 'devel' into carsten/embree4_gpubuild_merge_devel 2022-11-14 11:17:04 +01:00
Carsten Benthin e4862bfa15 more fixes 2022-11-11 20:30:04 +01:00
Carsten Benthin b9ee48feea updates and cleanups 2022-11-11 16:29:27 +01:00
Carsten Benthin 97eb708378 updates to allocation scheme 2022-11-11 13:49:45 +01:00
Carsten Benthin affb846ba7 using local_accessor from latest sycl spec 2022-11-10 16:36:49 +01:00
Carsten Benthin cb485e1040 merged latest devel in 2022-11-10 15:44:57 +01:00
Carsten Benthin 5db9a1c181 fixed some timers 2022-11-10 15:28:54 +01:00
Carsten Benthin 2593eabfe6 updates and tests 1 2022-11-10 15:01:30 +01:00
Carsten Benthin 9637b266b3 more cmake changes 2022-11-10 11:56:48 +01:00
Carsten Benthin 584d56a27f testing cmake 2022-11-10 11:32:05 +01:00
Carsten Benthin 4225b063d0 cleanup and fixes 2022-11-10 11:08:03 +01:00
Carsten Benthin b21df9ae0c updates 2022-11-09 22:32:01 +01:00
Carsten Benthin 10d8be967f updates and disabled rtas support in scenegraph 2022-11-09 22:23:46 +01:00
Carsten Benthin ecaf8237d5 updates 2022-11-09 11:58:16 +01:00
Carsten Benthin e5b3e7483d updates 2022-11-08 21:03:56 +01:00
Carsten Benthin bfcbdee017 renabled gpu version of createInstances_Primrefs 2022-11-08 17:59:47 +01:00
Carsten Benthin 447a01b646 test 2022-11-08 14:14:02 +01:00
Carsten Benthin 2bb1f452a5 all bvh build tests are passing 2022-11-08 13:19:09 +01:00
Carsten Benthin ac9ec54260 fixes for instance builder 2022-11-07 21:10:13 +01:00
Carsten Benthin 360e7126f6 debugging 2022-11-07 10:49:33 +01:00
Carsten Benthin 4471aade72 more fixes 2022-10-21 21:37:02 +02:00
Carsten Benthin b8ae381450 more updates 2022-10-21 18:11:43 +02:00
Carsten Benthin 0b5fefae8d updates to compile rthwif_test with gpu builder 2022-10-21 09:39:06 +02:00
Carsten Benthin f93404970d restored old rthwif_test, put sycl device+queue in build args 2022-10-20 15:21:10 +02:00
Carsten Benthin a479ae1c25 merging devel 2022-10-20 13:44:00 +02:00
Carsten Benthin cd08b9ec26 fixes, removed two-level code path 2022-10-19 17:45:52 +02:00
Carsten Benthin b96077914f fixes, cleanups, removed old non-api path 2022-10-19 12:08:45 +02:00
Carsten Benthin 76f4117c8b updates 2022-10-19 09:56:48 +02:00
Carsten Benthin 84bdfa1d6f instance fixes 2022-10-17 15:55:12 +02:00
Carsten Benthin d46538e131 updated version two-pass version 2022-10-17 14:00:12 +02:00
Carsten Benthin 9e41852dc0 compile fixes 2022-10-17 09:48:52 +02:00
Carsten Benthin f494816ea1 updates 2022-10-17 09:20:34 +02:00
Carsten Benthin 76fb58782f updates 2022-10-14 18:04:43 +02:00
Carsten Benthin b67b418d23 first version of gpu builder under build api 2022-10-14 16:16:03 +02:00
Carsten Benthin feab8bcf26 scratchbuffer and descriptor data uses USM now 2022-10-13 09:51:38 +02:00
Carsten Benthin c72cbb0e0e updates 2022-10-12 18:34:54 +02:00
Carsten Benthin f14f6d3bdf hacky plugged in version works 2022-10-12 17:28:43 +02:00
Carsten Benthin f1e609ccae updates 2022-10-12 14:15:28 +02:00
Carsten Benthin 3aa55b6775 updates 2022-10-12 12:31:05 +02:00
Carsten Benthin f9fdc351d4 compile fixes 2022-10-12 12:06:24 +02:00
Carsten Benthin 4d318f2a0d updates 2022-10-12 10:43:54 +02:00
Carsten Benthin 0637ee5ea4 compile fixes 2022-09-26 09:31:45 +02:00
Carsten Benthin 0cac037c5c baby steps to get to compile 2022-09-21 16:17:53 +02:00
Carsten Benthin a92ed2ac6e cleanups 2022-09-21 09:53:50 +02:00
Carsten Benthin 3a84a73b5c updates 2022-09-21 08:49:27 +02:00
Carsten Benthin 11b5fa0919 disabling new opening scheme 2022-09-20 21:02:03 +02:00
Carsten Benthin 3ba96a887e more cleanups 2022-09-20 20:58:30 +02:00
Carsten Benthin 2c4335a17f more cleanups 2022-09-20 15:09:58 +02:00
Carsten Benthin 4d099b04fa cleanups, removed alternative convertBVH2 variant 2022-09-20 14:28:50 +02:00
Carsten Benthin 522a5fa3a2 mixed nodes conversion with instances works 2022-09-19 21:36:44 +02:00
Carsten Benthin e6d203f304 updates 2022-09-19 15:00:21 +02:00
Carsten Benthin 69051b3df7 updates 2022-09-16 19:24:58 +02:00
Carsten Benthin 68c4fa0a43 alternative conversion working 2022-09-16 19:16:06 +02:00
Carsten Benthin e97d0dbcf7 latest changes from gitlab 2022-09-16 08:00:15 +02:00
Carsten Benthin 0004366129 updates 2022-09-15 18:56:01 +02:00
Carsten Benthin e47ce9de27 update 2022-09-15 18:29:28 +02:00
Carsten Benthin 909f5c5ab2 fixes 2022-09-14 20:35:55 +02:00
Carsten Benthin df2e3bd131 user geo / procedural updates 2022-09-14 14:12:49 +02:00
Carsten Benthin 0f27846dc2 bug fix for instancing, need to force fat leaf mode 2022-09-14 09:46:06 +02:00
Carsten Benthin b88cab1dc1 larger changes to support mixed tri/quad geometry + instances scenes 2022-09-12 20:31:20 +02:00
Carsten Benthin 9b09a23c6b added more compact inner node size estimation 2022-09-12 10:20:57 +02:00
Carsten Benthin 6c060b3f0b merge from fat leaves branch 2022-09-10 18:33:21 +02:00
Carsten Benthin c090c66785 iteratePLOC prefix sum cleanups 2022-09-10 18:28:19 +02:00
Carsten Benthin d08be7993b cleanups 2022-09-10 18:07:47 +02:00
Carsten Benthin 25934a663e updates 2022-09-10 11:49:51 +02:00
Carsten Benthin 89f0d1ea07 fixed decoupled look-back scheme 2022-09-10 11:29:58 +02:00
Carsten Benthin 02e663062c cleanups 2022-09-09 14:29:05 +02:00
Carsten Benthin ba218030bb remvoed larger fat leaves support, updates 2022-09-09 09:57:10 +02:00
Carsten Benthin 70caebf0db new opening 2022-09-07 14:13:28 +02:00
Carsten Benthin 65d0cd66b7 updates 2022-09-07 09:18:37 +02:00
Carsten Benthin 6e1ec803bb experimental version 2022-09-06 10:07:29 +02:00
Carsten Benthin e3e2582eba fix for empty scene 2022-09-02 16:37:49 +02:00
Carsten Benthin 19dc1bab11 cleanups 2022-09-02 10:06:50 +02:00
Carsten Benthin 571e4196c2 lots of fixes when building instances 2022-09-01 20:59:16 +02:00
Carsten Benthin 4870b75e62 bug fixes 2022-09-01 14:49:26 +02:00
Carsten Benthin 75ea0affcd cleanups 2022-09-01 13:45:12 +02:00
Carsten Benthin 5c8845a5d8 instances working 2022-09-01 13:23:39 +02:00
Carsten Benthin 5bd64e2232 updates 2022-08-30 08:54:45 +02:00
Carsten Benthin 7e852c16fa added support for triangle and quad meshes in the same scene 2022-08-29 16:40:09 +02:00
Carsten Benthin 385f700c17 minor updates to radix sort scatter phase 2022-08-25 18:08:37 +02:00
Carsten Benthin 8bd7da0b36 updates 2022-08-25 10:43:21 +02:00
Carsten Benthin 49d42187e1 updates 2022-08-25 10:04:18 +02:00
Carsten Benthin 46c34b130c faster prefix sum over geoms 2022-08-24 18:50:20 +02:00
Carsten Benthin 5ce23b5eb8 updates to conversion code 2022-08-24 14:40:53 +02:00
Carsten Benthin a5fb39c62a cleanups 2022-08-24 14:03:26 +02:00
Carsten Benthin 7397ea2feb updates 2022-08-23 17:36:13 +02:00
Carsten Benthin 9952d3cf46 updates to allocation stats 2022-08-23 15:59:25 +02:00
Carsten Benthin 65035f79f2 updates 2022-08-18 18:29:31 +02:00
Carsten Benthin aa2e0a6224 trying block writes 2022-08-18 18:26:37 +02:00
Carsten Benthin 01dcd5a5e3 updates 2022-08-17 14:02:05 +02:00
Carsten Benthin 6da15ca280 updates 2022-08-17 13:22:56 +02:00
Carsten Benthin 87e55b0482 updates 2022-08-17 12:03:59 +02:00
Carsten Benthin 065ed8f4e4 updates 2022-08-17 11:49:19 +02:00
Carsten Benthin f46431ea40 updates 2022-08-16 19:59:22 +02:00
Carsten Benthin 165e40d5be updates 2022-08-16 19:18:06 +02:00
Carsten Benthin 81827e1aba large timer cleanups 2022-08-16 18:46:15 +02:00
Carsten Benthin 35f2b7a2b0 adding .rtas file format support back in again 2022-08-16 15:53:16 +02:00
Carsten Benthin 5d6c66a401 cleanups 2022-08-16 14:43:51 +02:00
Carsten Benthin 52f1597117 scalar copy code is better for coalescing 2022-08-15 15:19:00 +02:00
Carsten Benthin cc2ee61750 updates for final flattening iteration 2022-08-14 21:31:47 +02:00
Carsten Benthin 9aeb42ab55 more cleanups 2022-08-12 14:54:35 +02:00
Carsten Benthin 5d77e59107 cleanups 2022-08-12 14:45:57 +02:00
Carsten Benthin bb05eb1984 more cleanups 2022-08-11 11:26:09 +02:00
Carsten Benthin a89f35bba5 cleanups 2022-08-11 10:51:20 +02:00
Carsten Benthin 225ea2150f updates 2022-08-10 10:59:01 +02:00
Carsten Benthin 0bbc7c376f updates 2022-08-09 21:37:17 +02:00
Carsten Benthin 4ec1e0ae54 updates 2022-08-09 09:40:42 +02:00
Carsten Benthin e5661ffa4c conversion updates 2022-08-08 21:21:14 +02:00
Carsten Benthin 21b2de76be merge with latest devel 2022-08-08 13:28:06 +02:00
Carsten Benthin 3964e0a7bc lsb radix sort updates 2022-08-05 16:06:38 +02:00
Carsten Benthin b59706e423 lsb sort updates 2022-08-05 14:22:13 +02:00
Carsten Benthin 293666a113 updates to onesweep 2022-08-04 19:15:11 +02:00
Carsten Benthin 356efcf405 fixes 2022-08-04 13:29:21 +02:00
Carsten Benthin 299ce199d5 updates 2022-08-03 20:35:19 +02:00
Carsten Benthin b2bed5db40 removing cpu accesses to globals, reducing host to device differences significantly 2022-08-03 20:25:34 +02:00
Carsten Benthin f7040d64e2 host mem communiation 2022-08-03 19:47:21 +02:00
Carsten Benthin eb0ad01da9 cleanups 2022-08-03 11:36:06 +02:00
Carsten Benthin 7085ae1dcc updates 2022-07-21 13:50:55 +02:00
Carsten Benthin 15513eaf3c fixes 2022-07-21 12:32:00 +02:00
Carsten Benthin e00483ce39 first version of PLOC with single kernel launch per iteration 2022-07-21 11:38:12 +02:00
Carsten Benthin 1c8ad0c084 updates 2022-07-20 10:54:02 +02:00
Carsten Benthin b906575f2b updates 2022-07-18 18:06:30 +02:00
Carsten Benthin 44b99e4802 updates 2022-07-17 12:38:50 +02:00
Carsten Benthin e9779ec07c printing out device-time based mprims/s 2022-07-15 19:13:10 +02:00
Carsten Benthin dfa71e9bf5 adding queue prefetching to force host to device upload 2022-07-14 18:55:48 +02:00
Carsten Benthin b1ff606db2 updates 2022-07-05 20:54:53 +02:00
Carsten Benthin 2ff1b61486 updates 2022-07-05 20:43:27 +02:00
Carsten Benthin a592953f3d updates 2022-07-05 18:06:33 +02:00
Carsten Benthin 03a92e42c8 updates 2022-07-05 14:41:08 +02:00
Carsten Benthin 6233f9b3bb updates 2022-07-05 14:38:02 +02:00
Carsten Benthin 85f24595e6 compile fixes 2022-07-05 14:25:35 +02:00
Carsten Benthin 7f51026c0c updates 2022-07-05 13:52:39 +02:00
Carsten Benthin b5cf434416 updates 2022-07-05 10:16:05 +02:00
1104 changed files with 14518 additions and 34890 deletions
+459 -325
View File
@@ -3,531 +3,665 @@
name: continuous
permissions: read-all
on: [push, workflow_dispatch]
jobs:
####################################################################
# Setup dpcpp and gfx if not already on NAS
####################################################################
setup_dpcpp:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
DPCPP_VERSION=$(cat .github/workflows/dpcpp-sycl-nightly.env | grep DPCPP_VERSION | sed 's/.*=//')
echo "Setup DPCPP ${DPCPP_VERSION}"
./scripts/download_dpcpp.sh ${DPCPP_VERSION} ${NAS_LINUX}/dpcpp-compiler-linux LINUX ${PUBLIC_GITHUB_TOKEN}
./scripts/download_dpcpp.sh ${DPCPP_VERSION} ${NAS_LINUX}/dpcpp-compiler-win WIN ${PUBLIC_GITHUB_TOKEN}
setup_gfx:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
GFX_DRIVER_VERSION=$(cat .github/workflows/gfx-ubuntu22-embargo.env | grep GFX_DRIVER_VERSION | sed 's/.*=//')
echo "Setup embargo GFX driver ${GFX_DRIVER_VERSION} for Linux"
./scripts/download_gfx.sh ${GFX_DRIVER_VERSION} ${NAS_LINUX}/gfx-driver-linux/ ${ARTIFACTORY_TOKEN}
GFX_DRIVER_VERSION=$(cat .github/workflows/gfx-ubuntu22-internal.env | grep GFX_DRIVER_VERSION | sed 's/.*=//')
echo "Setup internal GFX driver ${GFX_DRIVER_VERSION} for Linux"
./scripts/download_gfx.sh ${GFX_DRIVER_VERSION} ${NAS_LINUX}/gfx-driver-linux/ ${ARTIFACTORY_TOKEN}
GFX_DRIVER_VERSION=$(cat .github/workflows/gfx-ubuntu22-public.env | grep GFX_DRIVER_VERSION | sed 's/.*=//')
echo "Setup public GFX driver ${GFX_DRIVER_VERSION} for Linux"
./scripts/download_gfx.sh ${GFX_DRIVER_VERSION} ${NAS_LINUX}/gfx-driver-linux/ ${ARTIFACTORY_TOKEN}
GFX_DRIVER_VERSION=$(cat .github/workflows/gfx-ubuntu22-release.env | grep GFX_DRIVER_VERSION | sed 's/.*=//')
echo "Setup release GFX driver ${GFX_DRIVER_VERSION} for Linux"
./scripts/download_gfx.sh ${GFX_DRIVER_VERSION} ${NAS_LINUX}/gfx-driver-linux/ ${ARTIFACTORY_TOKEN}
GFX_DRIVER_VERSION=$(cat .github/workflows/gfx-windows-internal.env | grep GFX_DRIVER_VERSION | sed 's/.*=//')
echo "Setup internal GFX driver ${GFX_DRIVER_VERSION} for Windows"
./scripts/download_gfx.sh ${GFX_DRIVER_VERSION} ${NAS_LINUX}/gfx-driver-win/ ${ARTIFACTORY_TOKEN}
GFX_DRIVER_VERSION=$(cat .github/workflows/gfx-windows-public.env | grep GFX_DRIVER_VERSION | sed 's/.*=//')
echo "Setup public GFX driver ${GFX_DRIVER_VERSION} for Windows"
./scripts/download_gfx.sh ${GFX_DRIVER_VERSION} ${NAS_LINUX}/gfx-driver-win/ ${ARTIFACTORY_TOKEN}
GFX_DRIVER_VERSION=$(cat .github/workflows/gfx-windows-release.env | grep GFX_DRIVER_VERSION | sed 's/.*=//')
echo "Setup release GFX driver ${GFX_DRIVER_VERSION} for Windows"
./scripts/download_gfx.sh ${GFX_DRIVER_VERSION} ${NAS_LINUX}/gfx-driver-win/ ${ARTIFACTORY_TOKEN}
################################################################################
################################################################################
# GPU tests
################################################################################
###############################################################################
########################################
# Linux DG2
# ze_raytracing
########################################
linux-DG2-JIT-INTERNAL-build:
linux-ze_raytracing:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
artifact-out: linux-DG2-JIT-INTERNAL-build
artifact-path: ./build/*.tar.gz
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-out: linux-ze_raytracing
artifact-path: ./build
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-INTERNAL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
source $DPCPP_ROOT/startup.sh
mkdir build
cd build
cmake -G Ninja -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang ../kernels/rthwif
cmake --build . --target package
linux-DG2-JIT-INTERNAL-test:
linux-ze_raytracing-test-DG2:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-DG2-JIT-INTERNAL-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: ["linux-ze_raytracing"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/gfx-ubuntu22-internal.env
dpcpp-version: intel-llvm/sycl-rel_5_2_0-rk
artifact-in: linux-DG2-JIT-INTERNAL-build
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-in: linux-ze_raytracing
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-INTERNAL -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
linux-DG2-JIT-PUBLIC-build:
cd build
ctest
windows-ze_raytracing:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
artifact-path: ./build
artifact-out: windows-ze_raytracing
shell: cmd
cmd: |
call %DPCPP_ROOT%\\startup.bat
mkdir build
cd build
cmake -G Ninja -D CMAKE_BUILD_TYPE=Release -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang ../kernels/rthwif
cmake --build . --target package
ctest
########################################
# Linux DG2
########################################
linux-DG2-JIT-INTERNAL:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
artifact-out: linux-DG2-JIT-PUBLIC-build
artifact-path: ./build/*.tar.gz
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-out: linux-DG2-JIT-INTERNAL
artifact-path: ./build .ctest_conf
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.18.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB2021.7.0 intensity:4
scripts/test.py build --debug
scripts/test.py build
linux-DG2-JIT-INTERNAL-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: ["linux-DG2-JIT-INTERNAL"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-in: linux-DG2-JIT-INTERNAL
cmd: |
scripts/test.py test --debug
scripts/test.py test
linux-DG2-JIT-PUBLIC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-out: linux-DG2-JIT-PUBLIC
artifact-path: ./build .ctest_conf
cmd: |
scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.18.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB2021.7.0 intensity:4
scripts/test.py build --debug
scripts/test.py build
linux-DG2-JIT-PUBLIC-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-DG2-JIT-PUBLIC-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: ["linux-DG2-JIT-PUBLIC"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: linux-DG2-JIT-PUBLIC-build
artifact-in: linux-DG2-JIT-PUBLIC
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
scripts/test.py test --debug
scripts/test.py test
linux-DG2-JIT-PUBLIC-ICX-build:
linux-DG2-JIT-EMBARGO:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env
dpcpp-version: intel/2024.1.0
artifact-out: linux-DG2-JIT-PUBLIC-ICX-build
artifact-path: ./build/*.tar.gz
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-embargo.env
artifact-out: linux-DG2-JIT-EMBARGO
artifact-path: ./build .ctest_conf
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.18.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB2021.7.0 intensity:4
scripts/test.py build --debug
scripts/test.py build
linux-DG2-JIT-GPU-BVH-BUILDER:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-embargo.env
artifact-out: linux-DG2-JIT-GPU-BVH-BUILDER
artifact-path: ./build .ctest_conf
cmd: |
scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.18.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON EMBREE_SYCL_GPU_BVH_BUILDER:ON USERGEOM:CONTEXT FILTER_FUNCTION:CONTEXT gfx:EMBARGO sycl:none tasking:TBB2021.7.0 intensity:4
scripts/test.py build --debug
scripts/test.py build
linux-DG2-JIT-PUBLIC-GPU-BVH-BUILDER:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
install-gfx-driver: false
artifact-out: linux-DG2-JIT-PUBLIC-GPU-BVH-BUILDER
artifact-path: ./build .ctest_conf
cmd: |
scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.18.1 isa:AVX512 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON EMBREE_SYCL_GPU_BVH_BUILDER:ON USERGEOM:CONTEXT FILTER_FUNCTION:CONTEXT gfx:PUBLIC sycl:none tasking:TBB2021.7.0 intensity:4
scripts/test.py build --debug
scripts/test.py build
# linux-DG2-AOT-INTERNAL-test:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
# needs: ["linux-DG2-AOT-INTERNAL"]
# with:
# image: embree/ubuntu:22.04
# options: --device=/dev/dri:/dev/dri
# runs-on: '[ "Linux", "docker", "dg2" ]'
# project: embree
# env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
# artifact-in: linux-DG2-AOT-INTERNAL
# cmd: |
# scripts/test.py test --debug
# scripts/test.py test
linux-DG2-JIT-PUBLIC-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-out: linux-DG2-JIT-PUBLIC-ICX
artifact-path: ./build .ctest_conf
cmd: |
scripts/test.py configure platform:x64 compiler:ICX2023.0.0 ispc:ispc1.18.1 isa:AVX512 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB2021.7.0 intensity:4
scripts/test.py build --debug
scripts/test.py build
linux-DG2-JIT-PUBLIC-ICX-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-DG2-JIT-PUBLIC-ICX-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: ["linux-DG2-JIT-PUBLIC-ICX"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel/2024.1.0
artifact-in: linux-DG2-JIT-PUBLIC-ICX-build
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: linux-DG2-JIT-PUBLIC-ICX
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
scripts/test.py test --debug
scripts/test.py test
# ########################################
# # Linux ATS-M
# ########################################
########################################
# Linux ATS-M
########################################
linux-ATSM-JIT-PUBLIC-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-DG2-JIT-PUBLIC-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: ["linux-DG2-JIT-PUBLIC"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "atsm" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: linux-DG2-JIT-PUBLIC-build
artifact-in: linux-DG2-JIT-PUBLIC
cmd: |
module load cmake/3.25.3
cmake --preset linux-DG2-JIT-PUBLIC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
scripts/test.py test --debug
scripts/test.py test
########################################
# Linux PVC
########################################
linux-PVC-JIT-INTERNAL-build:
linux-PVC-JIT-INTERNAL:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
artifact-out: linux-PVC-JIT-INTERNAL-build
artifact-path: ./build/*.tar.gz
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-embargo.env
artifact-out: linux-PVC-JIT-INTERNAL
artifact-path: ./build .ctest_conf
cmd: |
module load cmake/3.25.3
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.16.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB intensity:4
scripts/test.py build --debug
scripts/test.py build
# TODO: move to nightly
linux-PVC-JIT-INTERNAL-test-1T:
linux-PVC-1T-JIT-INTERNAL-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-PVC-JIT-INTERNAL-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: ["linux-PVC-JIT-INTERNAL"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-in: linux-PVC-JIT-INTERNAL-build
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-embargo.env
artifact-in: linux-PVC-JIT-INTERNAL
cmd: |
export NEOReadDebugKeys=1
export UseKmdMigration=0
export EnableImplicitScaling=0
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
module load cmake/3.25.3
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
scripts/test.py test --debug
scripts/test.py test
linux-PVC-JIT-INTERNAL-test-2T:
linux-PVC-2T-JIT-INTERNAL-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-PVC-JIT-INTERNAL-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
needs: ["linux-PVC-JIT-INTERNAL"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-in: linux-PVC-JIT-INTERNAL-build
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-embargo.env
artifact-in: linux-PVC-JIT-INTERNAL
cmd: |
export NEOReadDebugKeys=1
export UseKmdMigration=0
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
module load cmake/3.25.3
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
export EnableImplicitScaling=1
scripts/test.py test --debug
scripts/test.py test
linux-PVC-JIT-INTERNAL-test-flat:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["linux-PVC-JIT-INTERNAL-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-ubuntu22-internal.env
artifact-in: linux-PVC-JIT-INTERNAL-build
cmd: |
module load cmake/3.25.3
cmake --preset linux-PVC-JIT-INTERNAL-SYCL-RC -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
# linux-PVC-JIT-PUBLIC:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
# with:
# image: embree/ubuntu:22.04
# runs-on: '[ "Linux", "docker", "build" ]'
# artifact-out: linux-PVC-JIT-PUBLIC
# artifact-path: ./build .ctest_conf
# cmd: |
# scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.16.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB intensity:4
# scripts/test.py build --debug
# scripts/test.py build
#
# linux-PVC-JIT-PUBLIC-test:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
# needs: ["linux-PVC-JIT-PUBLIC"]
# with:
# image: embree/ubuntu:22.04
# options: --device=/dev/dri:/dev/dri
# runs-on: '[ "Linux", "docker", "pvc" ]'
# artifact-in: linux-PVC-JIT-PUBLIC
# cmd: |
# scripts/test.py test --debug
# scripts/test.py test
# linux-PVC-JIT-PUBLIC:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
# needs: [setup_gfx, setup_dpcpp]
# with:
# image: embree/ubuntu:22.04
# runs-on: '[ "Linux", "docker", "build" ]'
# artifact-out: linux-PVC-JIT-PUBLIC
# artifact-path: ./build .ctest_conf
# cmd: |
# scripts/test.py configure platform:x64 compiler:dpcpp ispc:ispc1.16.1 isa:SSE2 build:RelWithAssert EMBREE_SYCL_SUPPORT:ON sycl:none tasking:TBB intensity:4
# scripts/test.py build --debug
# scripts/test.py build
#
# linux-PVC-JIT-PUBLIC-test:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
# needs: ["linux-PVC-JIT-PUBLIC"]
# with:
# image: embree/ubuntu:22.04
# options: --device=/dev/dri:/dev/dri
# runs-on: '[ "Linux", "docker", "pvc" ]'
# artifact-in: linux-PVC-JIT-PUBLIC
# cmd: |
# scripts/test.py test --debug
# scripts/test.py test
########################################
# Windows DG2
########################################
windows-DG2-JIT-build:
windows-DG2-JIT-INTERNAL:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
with:
force-delete: true
runs-on: '[ "Windows", "NAS", "build" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env
artifact-out: windows-DG2-JIT-build
artifact-path: ./build/*.zip
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
windows-DG2-JIT-INTERNAL-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
needs: ["windows-DG2-JIT-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
artifact-in: windows-DG2-JIT-build
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
python scripts/test.py configure platform:x64 compiler:dpcpp isa:SSE2 build:Release EMBREE_SYCL_SUPPORT:ON sycl:none intensity:3
python scripts/test.py build
python scripts/test.py test
windows-DG2-JIT-PUBLIC-test:
windows-DG2-JIT-PUBLIC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
needs: ["windows-DG2-JIT-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
artifact-in: windows-DG2-JIT-build
cmd: |
cmake --preset windows-DG2-JIT-INTERNAL-L0RTAS -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
python scripts/test.py configure platform:x64 compiler:dpcpp isa:SSE2 build:Release EMBREE_SYCL_SUPPORT:ON sycl:none intensity:3
python scripts/test.py build
python scripts/test.py test
windows-DG2-JIT-ICX-build:
windows-DG2-JIT-PUBLIC-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
dpcpp-version: oneAPI/compiler/2024.1
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-public.env
artifact-out: windows-DG2-JIT-ICX-build
artifact-path: ./build/*.zip
cmd: |
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target build
python scripts/test.py configure platform:x64 compiler:ICX2023.0.0 ispc:ispc1.18.1 isa:AVX512 tasking:TBB2021.7.0 build:Release EMBREE_SYCL_SUPPORT:ON sycl:none intensity:2
python scripts/test.py build
python scripts/test.py test
windows-DG2-JIT-ICX-INTERNAL-test:
windows-DG2-JIT-INTERNAL-TBB2020_3:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
needs: ["windows-DG2-JIT-ICX-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@devel
needs: [setup_gfx, setup_dpcpp]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
dpcpp-version: oneAPI/compiler/2024.1
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-internal.env
artifact-in: windows-DG2-JIT-ICX-build
cmd: |
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
python scripts/test.py configure platform:x64 compiler:dpcpp isa:SSE2 build:Release EMBREE_SYCL_SUPPORT:ON sycl:none intensity:3 tasking:TBB2020.3
python scripts/test.py build
python scripts/test.py test
windows-DG2-JIT-ICX-PUBLIC-test:
################################################################################
################################################################################
# CPU tests
################################################################################
################################################################################
########################################
# Linux
########################################
linux-fedora29_ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
needs: ["windows-DG2-JIT-ICX-build"]
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
dpcpp-version: oneAPI/compiler/2024.1
env-from-files: ./.github/workflows/dpcpp-sycl-nightly.env ./.github/workflows/gfx-windows-public.env
artifact-in: windows-DG2-JIT-ICX-build
cmd: |
cmake --preset nightly-windows-DG2-JIT-ICX -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTENSITY=3
cmake --build build --config Release --target test_package
# ################################################################################
# ################################################################################
# # CPU tests
# ################################################################################
# ################################################################################
# ########################################
# # Linux
# ########################################
linux-fedora29-CLANG4:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/fedora:29
runs-on: '[ "Linux", "docker", "avx512" ]'
cmd: |
module load cmake/3.25.3
cmake --preset linux-fedora29-CLANG4 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
python scripts/test.py configure platform:x64 build:Debug compiler:ICX2023.0.0 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.2.0 intensity:2 maxinstancelevelcount:4
python scripts/test.py build
python scripts/test.py test
# python scripts/test.py test sde:hsw
linux-fedora29-CLANG5-INT-ADDRSANITIZER:
linux-fedora32-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/fedora:29
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
module load cmake/3.25.3
cmake --preset linux-fedora29-CLANG5-INT-ADDRSANITIZER -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
linux-fedora29-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/fedora:29
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
cmd: |
module load cmake/3.25.3
cmake --preset linux-fedora29-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
linux-fedora32-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/fedora:32
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
cmd: |
module load cmake/3.25.3
cmake --preset linux-fedora32-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc isa:AVX512 tasking:TBB COMPACT_POLYS:ON MIN_WIDTH:ON intensity:2
python scripts/test.py build
python scripts/test.py test
linux-fedora32_ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/fedora:32
runs-on: '[ "Linux", "docker", "avx512" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:ICX2023.0.0 ispc:ispc1.12.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.7.0 intensity:2 maxinstancelevelcount:4
python scripts/test.py build
python scripts/test.py test
linux-fedora26_CLANG4:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/fedora:26
runs-on: '[ "Linux", "docker", "avx512" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:CLANG4.0.0 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd128 tasking:TBB2021.2.0 GLFW:OFF intensity:2
python scripts/test.py build
python scripts/test.py test
linux-fedora26_CLANG5-INT-ADDRSANITIZER:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/fedora:26
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:CLANG5.0.0 ispc:ispc1.17.0 isa:AVX tasking:INT intensity:1 addrsanitizer:ON
python scripts/test.py build
python scripts/test.py test
linux-ubuntu20_04-GCC-NAMESPACE:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/ubuntu:20.04
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
module load cmake/3.25.3
cmake --preset linux-ubuntu20_04-GCC-NAMESPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=1
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.12.0 isa:AVX2 frequency_level:simd256 tasking:TBB intensity:1 api_namespace:myembree
python scripts/test.py build
python scripts/test.py test
linux-ubuntu20_04-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/ubuntu:20.04
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
cmd: |
module load cmake/3.25.3
cmake --preset linux-ubuntu20_04-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
python scripts/test.py configure platform:x64 build:Release threads:4 compiler:ICX2023.0.0 ispc:ispc1.17.0 isa:AVX512 frequency_level:simd256 tasking:TBB2021.5.0 intensity:2
python scripts/test.py build
python scripts/test.py test
linux-centos7_4-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@devel
with:
image: embree/centos:7.4
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:AVX2 frequency_level:simd128 tasking:TBB intensity:1
python scripts/test.py build
python scripts/test.py test
########################################
# Windows
########################################
windows-V140:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@devel
with:
runs-on: '[ "Windows", "NAS", "build" ]'
cmd: |
python scripts/test.py configure platform:x64 threads:4 build:RelWithDebInfo compiler:V140 ispc:ispc1.16.1 isa:SSE2 tasking:TBB2020.2 intensity:2
python scripts/test.py build
python scripts/test.py test
windows-V141:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@devel
with:
runs-on: '[ "Windows", "NAS", "build" ]'
cmd: |
python scripts/test.py configure platform:x64 build:RelWithDebInfo compiler:V141 ispc:ispc1.17.0 isa:SSE2 tasking:TBB2020.2 intensity:2 maxinstancelevelcount:8
python scripts/test.py build
python scripts/test.py test
windows-V142:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@devel
with:
force-delete: true
runs-on: '[ "Windows", "NAS", "build" ]'
dpcpp-version: none
cmd: |
cmake --preset windows-V142 -D CMAKE_BUILD_TYPE=RelWithDebInfo -D EMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --target test_package
python scripts/test.py configure platform:x64 build:RelWithDebInfo compiler:V142 ispc:ispc1.18.1 isa:SSE2 tasking:TBB2021.7.0 intensity:2 maxinstancelevelcount:8
python scripts/test.py build
python scripts/test.py test
windows-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@devel
with:
force-delete: true
runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
dpcpp-version: oneAPI/compiler/2024.1
cmd: |
cmake --preset windows-ICX -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
python scripts/test.py configure platform:x64 build:RelWithDebInfo compiler:ICX2023.0.0 ispc:ispc1.17.0 isa:AVX512 tasking:TBB2021.5.0 threads:16 intensity:2
python scripts/test.py build
python scripts/test.py test
################################################################################
################################################################################
# CPU tests
################################################################################
################################################################################
########################################
# MacOS
########################################
macosx-ARM-CLANG-NEON-AVX2:
macosx-ARM-NEON-AVX2:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@devel
with:
runs-on: '[ "macOS", "build", "arm" ]'
runs-on: '[ "macOS", "arm", "build" ]'
cmd: |
cmake --preset macos-ARM-CLANG-NEON-AVX2 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
macosx-ARM-CLANG-NEON:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "build", "arm" ]'
cmd: |
cmake --preset macos-ARM-CLANG-NEON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
scripts/test.py configure platform:arm64 build:Debug compiler:CLANG ispc:ispc1.17.0 isa:NEON2X tasking:TBB_HOMEBREW intensity:2
scripts/test.py build
scripts/test.py test
macosx-x64-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@devel
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
runs-on: '[ "macOS", "embree", "build" ]'
cmd: |
cmake --preset macos-x64-CLANG -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
macosx-ARM-CLANG-NEON-AVX2-universal-binaries:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "build", "arm" ]'
cmd: |
cmake --preset macos-ARM-CLANG-NEON-AVX2-UB -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEMBREE_TESTING_INTENSITY=2 -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DEMBREE_BUILD_GLFW_FROM_SOURCE=ON -DEMBREE_ISPC_SUPPORT=OFF
cmake --build build --config RelWithDebInfo --target build
cmake --build build --config RelWithDebInfo --target test_package
scripts/test.py configure platform:x64 build:Debug compiler:CLANG ispc:ispc1.18.1 isa:SSE2 tasking:TBB2021.1.1 intensity:2
scripts/test.py build
scripts/test.py test
########################################
# Coverity
# Klockwork
########################################
static-analysis:
linux-GCC-KLOCWORK:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_static_analysis.yml@devel
with:
project: Embree
submodules: true
coverity: true
prebuild: >
module load cmake/3.25.3 &&
export NAS_LINUX=$STORAGE_PATH/packages/apps &&
cmake --preset linux-coverity
build: sh scripts/coverity.sh
image: embree/centos:7.4
runs-on: '[ "Linux", "docker", "build" ]'
cmd: |
export CI_PROJECT_DIR=$GITHUB_WORKSPACE
export CI_JOB_ID=$GITHUB_RUN_ID
python scripts/test.py configure platform:x64 build:Debug compiler:GCC ispc:ispc1.17.0 isa:SSE2 tasking:TBB klocwork:ON intensity:0
python scripts/test.py build
python scripts/test.py test
scripts/klocwork_gen_report.sh
scripts/store_files.sh $GITHUB_REPOSITORY $GITHUB_RUN_ID klocwork "klocwork/report.log"
success:
runs-on: ubuntu-latest
steps:
- name: Success
run: echo Success
needs:
- linux-ze_raytracing
- linux-ze_raytracing-test-DG2
- windows-ze_raytracing
- linux-DG2-JIT-INTERNAL-test
- linux-DG2-JIT-PUBLIC-test
- linux-ATSM-JIT-PUBLIC-test
- linux-DG2-JIT-EMBARGO
- linux-DG2-JIT-PUBLIC-ICX-test
- linux-PVC-JIT-INTERNAL-test-1T
- linux-PVC-JIT-INTERNAL-test-2T
- linux-PVC-JIT-INTERNAL-test-flat
- windows-DG2-JIT-INTERNAL-test
- windows-DG2-JIT-PUBLIC-test
- windows-DG2-JIT-ICX-INTERNAL-test
- windows-DG2-JIT-ICX-PUBLIC-test
- linux-fedora29-CLANG4
- linux-fedora29-CLANG5-INT-ADDRSANITIZER
- linux-fedora29-ICX
- linux-fedora32-ICX
- linux-PVC-1T-JIT-INTERNAL-test
- linux-PVC-2T-JIT-INTERNAL-test
- windows-DG2-JIT-INTERNAL
- windows-DG2-JIT-PUBLIC
- windows-DG2-JIT-PUBLIC-ICX
- windows-DG2-JIT-INTERNAL-TBB2020_3
- linux-fedora29_ICX
- linux-fedora32-GCC
- linux-fedora32_ICX
- linux-fedora26_CLANG4
- linux-fedora26_CLANG5-INT-ADDRSANITIZER
- linux-ubuntu20_04-GCC-NAMESPACE
- linux-ubuntu20_04-ICX
- linux-centos7_4-GCC
- windows-V140
- windows-V141
- windows-V142
- windows-ICX
- macosx-ARM-CLANG-NEON-AVX2
- macosx-ARM-CLANG-NEON
- macosx-ARM-NEON-AVX2
- macosx-x64-CLANG
- macosx-ARM-CLANG-NEON-AVX2-universal-binaries
- static-analysis
if: failure() || cancelled()
steps:
- name: Failure
run: |
echo "::notice title=Success::Workflow failed"
exit 1
- linux-GCC-KLOCWORK
+1 -1
View File
@@ -1 +1 @@
DPCPP_VERSION=intel-llvm/nightly-2024-03-17
DPCPP_VERSION=sycl-nightly/20230304
@@ -0,0 +1 @@
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-029525/artifacts/linux/ubuntu/22.04
GFX_DRIVER_VERSION=neo-builds/ci/master/ci-neo-master-025813/artifacts/linux/ubuntu/22.04
+1 -1
View File
@@ -1 +1 @@
GFX_DRIVER_VERSION=linux-latest
GFX_DRIVER_VERSION=neo-builds/releases/releases_23.05/neo-releases-23.05.25593.11/artifacts/linux/ubuntu/22.04
@@ -0,0 +1 @@
GFX_DRIVER_VERSION=neo-builds/releases/releases_23.05/neo-releases-23.05.25593.11/artifacts/linux/ubuntu/20.04
+1 -1
View File
@@ -1 +1 @@
GFX_DRIVER_VERSION=gfx-driver-builds/ci/master/gfx-driver-ci-master-16477/artifacts/Windows
GFX_DRIVER_VERSION=gfx-driver-builds/ci/master/gfx-driver-ci-master-13324/artifacts/Windows
+1 -1
View File
@@ -1 +1 @@
GFX_DRIVER_VERSION=windows-101.5445
GFX_DRIVER_VERSION=gfx-driver-builds/prod/releases_23ww08-ci-master-13370/prod-hini-releases_23ww08-ci-master-13370-revenue-pr-1014250/artifacts/Windows/
@@ -0,0 +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/
-688
View File
@@ -1,688 +0,0 @@
## Copyright 2022 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
name: integrate
permissions: read-all
# same as nightly...
on:
schedule:
- cron: '00 00 * * *'
workflow_dispatch:
jobs:
#####################################################################
# Integration Tests
####################################################################
# TODO: investigate windows integration tests not working
#####################################################################
## Windows
#####################################################################
# integrate-windows-ICX:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-out: integrate-windows-ICX
# artifact-path: ./build/embree-*.zip
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cmake --preset integrate-windows-icx
# cmake --build build --config Release --target package -j8
# cmake --build build --config Release --target post_package
#
# integrate-windows-ICX-test:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# needs: ["integrate-windows-ICX"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-windows-ICX
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-icx
# cmake --build build --config Release
# .\build\test.exe
#
#
#
#
#
# integrate-windows-v142:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-out: integrate-windows-v142
# artifact-path: ./build/embree-*.zip
# cmd: |
# cmake --preset integrate-windows-v142
# cmake --build build --config Release --target package -j8
# cmake --build build --config Release --target post_package
#
# integrate-windows-v142-test-v142:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
# needs: ["integrate-windows-v142"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-windows-v142
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-v142
# cmake --build build --config Release
# .\build\Release\test.exe
#
# integrate-windows-v142-test-ICX:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# needs: ["integrate-windows-v142"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-windows-v142
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-icx
# cmake --build build --config Release
# .\build\test.exe
#
#
#
#
#
#####################################################################
## Windows STATIC
#####################################################################
# integrate-static-windows-ICX:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-out: integrate-static-windows-ICX
# artifact-path: ./build/embree-*.zip
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cmake --preset integrate-static-windows-icx
# cmake --build build --config Release --target package -j8
# cmake --build build --config Release --target post_package
#
# integrate-static-windows-ICX-test:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# needs: ["integrate-static-windows-ICX"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-static-windows-ICX
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-icx
# cmake --build build --config Release
# .\build\test.exe
#
#
#
#
#
# integrate-static-windows-v142:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-out: integrate-static-windows-v142
# artifact-path: ./build/embree-*.zip
# cmd: |
# cmake --preset integrate-windows-v142
# cmake --build build --config Release --target package -j8
# cmake --build build --config Release --target post_package
#
# integrate-static-windows-v142-test-v142:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
# needs: ["integrate-static-windows-v142"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-static-windows-v142
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-v142
# cmake --build build --config Release
# .\build\Release\test.exe
#
# integrate-static-windows-v142-test-ICX:
# secrets: inherit
# uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
# needs: ["integrate-static-windows-v142"]
# with:
# runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
# artifact-in: integrate-static-windows-v142
# dpcpp-version: oneAPI/compiler/2024.1
# cmd: |
# cd build
# . ..\tests\integration\test_embree_release\unpack-windows.ps1
# cd ..\tests\integration\test_embree_release
# cmake --preset test-windows-icx
# cmake --build build --config Release
# .\build\test.exe
####################################################################
# Linux
####################################################################
integrate-linux-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: integrate-linux-GCC
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-linux-GCC-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-linux-GCC-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-linux-GCC-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-linux-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-out: integrate-linux-ICX
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-linux-ICX-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-linux-ICX-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-linux-ICX-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-static-linux-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: integrate-static-linux-CLANG
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-static-linux-CLANG-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-static-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-static-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-static-linux-CLANG-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-static-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-static-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-static-linux-CLANG-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
####################################################################
# Linux STATIC
####################################################################
integrate-static-linux-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: integrate-static-linux-GCC
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-static-linux-GCC-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-static-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-static-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-static-linux-GCC-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-static-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-static-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-static-linux-GCC-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-GCC" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-GCC
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-static-linux-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-out: integrate-static-linux-ICX
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-static-linux-ICX-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-static-linux-ICX-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-static-linux-ICX-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-static-linux-ICX" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-static-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-static-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-linux-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: integrate-linux-CLANG
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-linux-CLANG-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-gcc
cmake --build build --config Release --target test_integration
integrate-linux-CLANG-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
needs: [ "integrate-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-in: integrate-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-clang
cmake --build build --config Release --target test_integration
integrate-linux-CLANG-test-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-linux-CLANG" ]
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-in: integrate-linux-CLANG
cmd: |
module load cmake/3.25.3
cmake --preset integrate-linux-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
####################################################################
# Linux SYCL
####################################################################
integrate-sycl-linux-ICX:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:22.04
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: icx/compiler_ppkg-rel/20240110
artifact-out: integrate-sycl-linux-ICX
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-icx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
integrate-sycl-linux-ICX-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-sycl-linux-ICX" ]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: icx/compiler_ppkg-rel/20240110
artifact-in: integrate-sycl-linux-ICX
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-icx -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
integrate-sycl-linux-DPCPP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/ubuntu:22.04
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel-llvm/nightly-2023-09-22-rk
artifact-out: integrate-sycl-linux-DPCPP
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
istegrate-sycl-linux-DPCPP-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [ "integrate-sycl-linux-DPCPP" ]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: icx/compiler_ppkg-rel/20240110
artifact-in: integrate-sycl-linux-DPCPP
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --config Release --target test_integration
####################################################################
# MacOS
####################################################################
integrate-macos-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-out: integrate-macos-GCC
artifact-path: ./build/*.zip
cmd: |
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
# cmake --build build --config Release --target post_package_notarize TODO: reactivate this when notarization problems are solved
integrate-macos-GCC-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: [ "integrate-macos-GCC" ]
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: integrate-macos-GCC
cmd: |
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-gcc
cmake --build build --config Release --target test_integration
integrate-macos-GCC-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: [ "integrate-macos-GCC" ]
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: integrate-macos-GCC
cmd: |
cmake --preset integrate-macos-gcc -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-clang
cmake --build build --config Release --target test_integration
# TODO: cant find tbb/tbb.h ???
integrate-macos-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-out: integrate-macos-CLANG
artifact-path: ./build/*.zip
cmd: |
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
# cmake --build build --config Release --target post_package_notarize TODO: reactivate this when notarization problems are solved
integrate-macos-CLANG-test-GCC:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: [ "integrate-macos-CLANG" ]
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: integrate-macos-CLANG
cmd: |
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-gcc
cmake --build build --config Release --target test_integration
integrate-macos-CLANG-test-CLANG:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
needs: [ "integrate-macos-CLANG" ]
with:
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: integrate-macos-CLANG
cmd: |
cmake --preset integrate-macos-clang -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-macos-clang
cmake --build build --config Release --target test_integration
File diff suppressed because it is too large Load Diff
+79 -119
View File
@@ -3,177 +3,137 @@
name: performance
permissions: read-all
on:
schedule:
- cron: '00 01 * * *'
workflow_dispatch:
on: [workflow_dispatch]
jobs:
perf-linux-SYCL-DPCPP-build:
########################################
# Linux build
########################################
linux-build-DG2-DPCPP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
with:
image: embree/ubuntu:20.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
artifact-out: linux-DG2-DPCPP
artifact-path: ./build/*.tar.gz .ctest_conf
cmd: |
scripts/test.py configure platform:x64 build:Release compiler:ICX2023.0.0 EMBREE_SYCL_SUPPORT:ON sycl:none gfx:RELEASE ispc:ispc1.18.1 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.7.0 intensity:4 package:ZIP
scripts/test.py build
scripts/test.py test
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 .ctest_conf
cmd: |
scripts/test.py configure platform:x64 build:Release compiler:ICX2023.0.0 ispc:ispc1.18.1 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.7.0 intensity:4 package:ZIP
scripts/test.py build
scripts/test.py test
linux-test-DG2-A750-not_perf:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
needs: ["linux-build-DG2-DPCPP"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel/2023.0
artifact-out: perf-linux-SYCL-DPCPP
artifact-path: ./build/*.tar.gz
artifact-in: linux-DG2-DPCPP
cmd: |
module load cmake/3.25.3
cmake --preset perf-linux-icx-sycl -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
source <(scripts/test.py env --debug)
cd build
tar -xf embree-4.0.0.sycl.x86_64.linux.tar.gz
cd embree-4.0.0.sycl.x86_64.linux
chmod +x embree-vars.sh
./embree-vars.sh
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
perf-linux-DG2-A770-test:
linux-test-DG2-A770:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["perf-linux-SYCL-DPCPP-build"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
needs: ["linux-build-DG2-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-public.env
artifact-in: perf-linux-SYCL-DPCPP
setup-benny: true
runs-on: '[ "Linux", "docker", "A770", "perf" ]'
artifact-in: linux-DG2-DPCPP
cmd: |
source <(scripts/test.py env --debug)
cd build
ls *.tar.gz
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
tar -xf embree-4.0.0.sycl.x86_64.linux.tar.gz
cd embree-4.0.0.sycl.x86_64.linux
chmod +x embree-vars.sh
./embree-vars.sh
cd bin
source ../embree-vars.sh
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
perf-linux-PVC-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["perf-linux-SYCL-DPCPP-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc", "perf" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: perf-linux-SYCL-DPCPP
setup-benny: true
cmd: |
# Run it on single tile (disable implicit scaling)
export EnableImplicitScaling=0
export NEOReadDebugKeys=1
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
cd build
ls *.tar.gz
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
cd bin
source ../embree-vars.sh
$GITHUB_WORKSPACE/scripts/run-perf.sh gpu
perf-linux-x86-ICX-ISPC-build:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
dpcpp-version: intel/2024.1.0
artifact-out: perf-linux-x86-ICX-ISPC-build
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset perf-linux-icx -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
perf-linux-i9-12900k-test:
linux-test-i9-12900k:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["perf-linux-x86-ICX-ISPC-build"]
needs: ["linux-build-x86-ICX-ISPC"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-i9-12900k-1" ]'
artifact-in: perf-linux-x86-ICX-ISPC-build
setup-benny: true
artifact-in: linux-build-x86-ICX-ISPC
cmd: |
cd build
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
tar -xf embree-4.0.0.x86_64.linux.tar.gz
cd embree-4.0.0.x86_64.linux
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
perf-linux-x8380-1-test:
linux-test-x8380-1:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["perf-linux-x86-ICX-ISPC-build"]
needs: ["linux-build-x86-ICX-ISPC"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-x8380-1" ]'
artifact-in: perf-linux-x86-ICX-ISPC-build
setup-benny: true
artifact-in: linux-build-x86-ICX-ISPC
cmd: |
cd build
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
tar -xf embree-4.0.0.x86_64.linux.tar.gz
cd embree-4.0.0.x86_64.linux
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
perf-linux-x8280-1-test:
linux-test-x8280-1:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["perf-linux-x86-ICX-ISPC-build"]
needs: ["linux-build-x86-ICX-ISPC"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-x8280-1" ]'
artifact-in: perf-linux-x86-ICX-ISPC-build
setup-benny: true
artifact-in: linux-build-x86-ICX-ISPC
cmd: |
cd build
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
tar -xf embree-4.0.0.x86_64.linux.tar.gz
cd embree-4.0.0.x86_64.linux
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
perf-linux-a3970x-1-test:
linux-test-a3970x-1:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/perf.yml@main
needs: ["perf-linux-x86-ICX-ISPC-build"]
needs: ["linux-build-x86-ICX-ISPC"]
with:
runs-on: '[ "Linux", "perf", "vis-perf-a3970x-1" ]'
artifact-in: perf-linux-x86-ICX-ISPC-build
setup-benny: true
artifact-in: linux-build-x86-ICX-ISPC
cmd: |
cd build
tar -xzf embree-?.?.?.x86_64.linux.tar.gz
tar -xf embree-4.0.0.x86_64.linux.tar.gz
cd embree-4.0.0.x86_64.linux
cd bin
$GITHUB_WORKSPACE/scripts/run-perf.sh cpu
linux-DG2-A770-buildbench:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["perf-linux-SYCL-DPCPP-build"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "dg2", "perf", "A770" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: perf-linux-SYCL-DPCPP
setup-benny: true
cmd: |
cd build
ls *.tar.gz
tar -xzf embree-?.?.?.sycl.x86_64.linux.tar.gz
git clone https://github.com/intel-innersource/libraries.graphics.renderkit.embree.models.git embree-models
ls -al
source embree-vars.sh
echo "bin/embree_buildbench --legacy"
bin/embree_buildbench --legacy
echo "bin/embree_buildbench_sycl --legacy"
bin/embree_buildbench_sycl --legacy
echo "bin/embree_buildbench --legacy -c embree-models/crown/crown.ecs"
bin/embree_buildbench --legacy -c embree-models/crown/crown.ecs
echo "bin/embree_buildbench_sycl --legacy -c embree-models/crown/crown.ecs"
bin/embree_buildbench_sycl --legacy -c embree-models/crown/crown.ecs
+70 -195
View File
@@ -3,8 +3,6 @@
name: release
permissions: read-all
on:
schedule:
- cron: '00 00 * * *'
@@ -15,269 +13,146 @@ jobs:
#####################################################################
# Release Builds
####################################################################
release-windows:
release-windows-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_windows.yml@main
with:
runs-on: '[ "Windows", "NAS", "build", "avx512" ]'
artifact-out: release-windows
artifact-path: ./build/embree-*.zip
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
shell: cmd
cmd: |
cmake --preset release-windows -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
release-macosx:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
project: embree
runs-on: '[ "macOS", "build", "x86_64" ]'
cmd: |
source scripts/cmake-presets/macos-env.sh
cmake --preset release-macos -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
rm build/embree-*-testing.zip
notarize-package: build/embree-*.zip
artifact-out: release-macosx
artifact-out: release-windows-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-path: ./build/*.zip
verify-package-macosx:
needs: release-macosx
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
project: embree
runs-on: '[ "macOS", "build", "x86_64" ]'
artifact-in: release-macosx
cmd: |
mkdir package
tar -xzvf build/embree-* -C ./package
sign-path-verify: ./package
python scripts/test.py configure platform:x64 build:Release compiler:ICX2023.0.0 ispc:ispc1.18.1 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.7.0 intensity:4 package:ZIP
python scripts/test.py build
python scripts/test.py test
release-macosx-arm:
release-macosx-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_macos.yml@main
with:
project: embree
runs-on: '[ "macOS13", "test", "arm" ]'
cmd: |
source scripts/cmake-presets/macos-env.sh
cmake --preset release-macos-arm -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
rm build/embree-*-testing.zip
notarize-package: build/embree-*.zip
artifact-out: release-macosx-arm
runs-on: '[ "macOS", "embree", "sign", "avx2" ]'
artifact-out: release-macosx-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-path: ./build/*.zip
verify-package-macosx-arm:
needs: release-macosx-arm
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
project: embree
runs-on: '[ "macOS13", "test", "arm" ]'
artifact-in: release-macosx-arm
cmd: |
mkdir package
tar -xzvf build/embree-* -C ./package
sign-path-verify: ./package
scripts/test.py configure platform:x64 build:Release compiler:ICX2023.0.0 ispc:ispc1.18.1 isas:SSE2-SSE42-AVX-AVX2 tasking:TBB2021.7.0 intensity:4 package:ZIP
scripts/test.py build
scripts/test.py test
release-linux:
release-linux-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/embree_docker.yml@main
with:
image: rockylinux:8.7
image: embree/rockylinux:8.7
runs-on: '[ "Linux", "docker", "avx512" ]'
artifact-out: release-linux
artifact-out: release-linux-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-path: ./build/*.tar.gz
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
pre-cmd: |
yum -y install epel-release
dnf makecache --refresh
dnf config-manager --set-enabled powertools
dnf -y update
dnf -y install ninja-build
cmd: |
module load cmake/3.25.3
cmake --preset release-linux -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
scripts/test.py configure platform:x64 build:Release compiler:ICX2023.0.0 ispc:ispc1.18.1 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.7.0 intensity:4 package:ZIP
scripts/test.py build
scripts/test.py test
#####################################################################
# DPC++ Release Builds
####################################################################
release-windows-sycl:
release-windows-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@main
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows_gpu.yml@devel
with:
runs-on: '[ "Windows", "NAS", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/gfx-windows-internal.env
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-out: release-windows-sycl
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-windows-internal.env
artifact-out: release-windows-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-path: ./build/*.zip
shell: cmd
cmd: |
cmake --preset release-windows-sycl -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
cmake --build build --target test_package
python scripts/test.py configure platform:x64 build:Release compiler:ICX2023.0.0 EMBREE_SYCL_SUPPORT:ON sycl:none gfx:RELEASE ispc:ispc1.18.1 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.7.0 intensity:4 package:ZIP
python scripts/test.py build
python scripts/test.py test
release-linux-sycl:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
with:
image: rockylinux:8.7
runs-on: '[ "Linux", "docker", "build" ]'
project: embree
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-out: release-linux-sycl
artifact-path: ./build/*.tar.gz
pre-cmd: |
yum -y install epel-release
dnf makecache --refresh
dnf config-manager --set-enabled powertools
dnf -y update
dnf -y install ninja-build
cmd: |
module load cmake/3.25.3
cmake --preset release-linux-sycl -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target build
# 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-sycl-test:
release-linux-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["release-linux-sycl"]
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@devel
with:
image: embree/ubuntu:22.04
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-public.env
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-in: release-linux-sycl
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-release.env
artifact-out: release-linux-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-path: ./build/*.tar.gz
cmd: |
module load cmake/3.25.3
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --target test_package
scripts/test.py configure platform:x64 build:Release compiler:ICX2023.0.0 EMBREE_SYCL_SUPPORT:ON sycl:none gfx:RELEASE ispc:ispc1.18.1 isas:SSE2-SSE42-AVX-AVX2-AVX512 tasking:TBB2021.7.0 intensity:4 package:ZIP
scripts/test.py build
scripts/test.py test
release-linux-sycl-pvc-test:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: ["release-linux-sycl"]
with:
image: embree/ubuntu:22.04
options: --device=/dev/dri:/dev/dri
runs-on: '[ "Linux", "docker", "pvc" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
dpcpp-version: intel-llvm/nightly-2023-10-26-rk
artifact-in: release-linux-sycl
cmd: |
module load cmake/3.25.3
export ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE
cmake --preset integrate-sycl-linux-dpcpp -DCMAKE_BUILD_TYPE=Release -DEMBREE_TESTING_INTEGRATION_PRESET=test-linux-icx
cmake --build build --target test_package
#####################################################################
# Release binaries scans
#####################################################################
binary-analysis:
needs:
- release-windows
- release-macosx
- release-linux
- release-windows-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
- release-macosx-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
- release-linux-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
project: embree
artifact-in-windows: release-windows
artifact-in-macos: release-macosx
artifact-in-linux: release-linux
artifact-in-windows: release-windows-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-in-macos: release-macosx-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-in-linux: release-linux-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
path: "build/*.zip build/*.gz"
antivirus-scan:
needs:
- release-windows
- release-macosx
- release-linux
- release-windows-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
- release-macosx-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
- release-linux-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-windows: release-windows
artifact-in-macos: release-macosx
artifact-in-linux: release-linux
artifact-in-windows: release-windows-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-in-macos: release-macosx-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-in-linux: release-linux-x64-Release-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
path: "build/*.zip build/*.gz"
binary-analysis-dpcpp:
needs:
- release-windows-sycl
- release-linux-sycl-test
- release-windows-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
- release-linux-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
project: embree
artifact-in-windows: release-windows-sycl
artifact-in-linux: release-linux-sycl
artifact-in-windows: release-windows-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-in-linux: release-linux-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
path: "build/*.zip build/*.gz"
artifact-out-name: "binary-analysis-dpcpp"
antivirus-scan-dpcpp:
needs:
- release-windows-sycl
- release-linux-sycl-test
- release-windows-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
- release-linux-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-windows: release-windows-sycl
artifact-in-linux: release-linux-sycl
artifact-in-windows: release-windows-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
artifact-in-linux: release-linux-x64-Release-SYCL-ICX2023_0_0-ISPC1_18_1-TBB2021_7_0-PACKAGE-ZIP
path: "build/*.zip build/*.gz"
artifact-out-name: "antivirus-scan-dpcpp"
binary-analysis-arm:
needs:
- release-macosx-arm
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/binary_analysis.yml@main
with:
project: embree
artifact-in-macos: release-macosx-arm
path: "build/*.zip"
artifact-out-name: "binary-analysis-arm"
antivirus-scan-arm:
needs:
- release-macosx-arm
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/antivirus_scan.yml@main
with:
project: embree
artifact-in-macos: release-macosx-arm
path: "build/*.zip"
artifact-out-name: "antivirus-scan-arm"
#####################################################################
# Testing package
#####################################################################
test-package:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker_gpu.yml@main
needs: [release-linux]
with:
image: embree/ubuntu:22.04
runs-on: '[ "Linux", "docker", "dg2" ]'
project: embree
env-from-files: ./.github/workflows/dpcpp-none.env ./.github/workflows/gfx-ubuntu22-public.env
artifact-in: release-linux
artifact-out: release-testing-PACKAGE-ZIP
artifact-path: ./build/*.tar.gz
cmd: |
rm build/embree-4.3.2.x86_64.linux.tar.gz
mv build/embree-4.3.2.x86_64.linux-testing.tar.gz build/embree-4.3.2-testing.tar.gz
-1
View File
@@ -9,4 +9,3 @@ kernels/config.h
kernels/hash.h
include/embree4/rtcore_config.h
build
out
-43
View File
@@ -1,49 +1,6 @@
Version History
---------------
### Embree 4.3.2
- MacOS universal binary compilation now works.
- Some bugfixes for AVX512 on MacOS x86 machines.
- Embree now uses level zero raytracing extension to build BVH which enables forward-compatibility.
### Embree 4.3.1
- Add missing EMBREE_GEOMETRY types to embree-config.cmake
- User defined thread count now takes precedence for internal task scheduler
- Fixed static linking issue with ze_wrapper library
- Better error reporting for SYCL platform and driver problems in embree_info and tutorial apps.
- Patch to glfw source is not applied by default anymore.
- Known issue: Running Embree on Intel® Data Center GPU Max Series with 2 tiles (e.g. Intel® Data Center GPU Max 1550) requires setting the environment variable ZE_FLAT_DEVICE_HIERARCHY=COMPOSITE.
- Known issue: Embree build using Apple Clang 15 and ARM support (via the SEE2NEON library) may cause "EXEC_BAD_INSTRUCTION" runtime exceptions. Please use Apple Clang <= 14 on macOS.
### Embree 4.3.0
- Added instance array primitive for reducing memony requirements in scenes
with large amounts of similar instances.
- Properly checks driver if L0 RTAS extension can get loaded.
- Added varying version of rtcGetGeometryTransform for ISPC.
- Fixed signature of RTCMemoryMonitorFunction for ISPC.
- Add support for ARM64 Windows platform in CMake.
### Embree 4.2.0
- SYCL version of Embree with GPU support is no longer in beta phase.
- Improved BVH build performance on many core machines for applications that oversubscribe threads.
- Added rtcGetGeometryTransformFromScene API function that can get used inside SYCL kernels.
- No longer linking to ze_loader in SYCL mode to avoid Intel(R) oneAPI Level Zero dependency
for CPU rendering.
- Releasing test package to test Embree.
### Embree 4.1.0
- Added support for Intel® Data Center GPU Max Series.
- Added ARM64 Linux support.
- Added EMBREE_BACKFACE_CULLING_SPHERES cmake option. The new cmake option defaults to OFF.
### Embree 4.0.1
- Improved performance for Tiger Lake, Comet Lake, Cannon Lake, Kaby Lake,
and Skylake client CPUs by using 256 bit SIMD instructions by default.
- Fixed broken motion blur of RTC_GEOMETRY_TYPE_ROUND_LINEAR_CURVE geometry type.
- Fixed bvh build retry issue for TBB 2020.3
- Added support for Intel® Data Center GPU Flex Series
- Fixed issue on systems without a SYCL platform.
### Embree 4.0.0
- This Embree release adds support for Intel® Arc™ GPUs through SYCL.
- The SYCL support of Embree is in beta phase. Current functionality, quality,
+35 -32
View File
@@ -1,12 +1,16 @@
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
SET(EMBREE_VERSION_MAJOR 4)
SET(EMBREE_VERSION_MINOR 3)
SET(EMBREE_VERSION_PATCH 2)
SET(EMBREE_VERSION_NOTE "")
SET(EMBREE_VERSION_MINOR 0)
SET(EMBREE_VERSION_PATCH 1)
IF (EMBREE_SYCL_SUPPORT)
SET(EMBREE_VERSION_NOTE "-beta") # Embree SYCL version is in beta phase
ELSE()
SET(EMBREE_VERSION_NOTE "")
ENDIF()
SET(EMBREE_VERSION ${EMBREE_VERSION_MAJOR}.${EMBREE_VERSION_MINOR}.${EMBREE_VERSION_PATCH})
MATH(EXPR EMBREE_VERSION_NUMBER "10000*${EMBREE_VERSION_MAJOR} + 100*${EMBREE_VERSION_MINOR} + ${EMBREE_VERSION_PATCH}")
@@ -72,13 +76,7 @@ IF(COMMAND cmake_policy)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
ENDIF()
ENDIF(COMMAND cmake_policy)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH)
@@ -91,7 +89,9 @@ MARK_AS_ADVANCED(CLEAR CMAKE_CXX_COMPILER)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/common/cmake" ${CMAKE_MODULE_PATH})
INCLUDE(test)
IF (BUILD_TESTING)
INCLUDE(test)
ENDIF()
set(BUILD_DOC OFF CACHE INTERNAL "build documentation (internal only)")
IF (BUILD_DOC)
@@ -145,6 +145,14 @@ OPTION(EMBREE_STACK_PROTECTOR "When enabled Embree compiles with stack protectio
IF (NOT APPLE)
OPTION(EMBREE_SYCL_SUPPORT "Enables SYCL GPU support." OFF)
IF (EMBREE_SYCL_SUPPORT)
MESSAGE(WARNING
"==================================================================================\n"
" The SYCL support of Embree is in beta phase. Current functionality, quality, \n"
" and GPU performance may not reflect that of the final product. Please read the \n"
" documentation section \"Embree SYCL Known Issues\" for known limitations. \n"
"==================================================================================\n")
ENDIF()
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_LARGEGRF "Enables SYCL large GRF support." OFF "EMBREE_SYCL_SUPPORT" OFF)
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_DBG "Enables DPC++ debug info." OFF "EMBREE_SYCL_SUPPORT" OFF)
@@ -162,6 +170,12 @@ IF (EMBREE_SYCL_SUPPORT)
ADD_DEFINITIONS("-DEMBREE_SYCL_SUPPORT") # FIXME: only use define from rtcore_config.h
ENDIF()
OPTION(EMBREE_SYCL_GPU_BVH_BUILDER "Using fast GPU-based BVH builder" OFF)
IF (EMBREE_SYCL_GPU_BVH_BUILDER)
SET(EMBREE_STATIC_LIB ON)
ADD_DEFINITIONS("-DEMBREE_SYCL_GPU_BVH_BUILDER")
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_RT_SIMULATION "Using hardware simulation" OFF "EMBREE_SYCL_SUPPORT" OFF)
MARK_AS_ADVANCED(EMBREE_SYCL_RT_SIMULATION)
IF (EMBREE_SYCL_RT_SIMULATION AND NOT EMBREE_SYCL_RT_VALIDATION_API AND EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
@@ -172,12 +186,13 @@ IF (EMBREE_SYCL_RT_SIMULATION)
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_RT_VALIDATION_API "Use rt_validation API instead of IGC provided rt_production API" OFF "EMBREE_SYCL_SUPPORT" OFF)
IF (EMBREE_SYCL_RT_VALIDATION_API)
ADD_DEFINITIONS("-DEMBREE_SYCL_RT_VALIDATION_API")
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS "Using L0 allocated Dispatch Globals" ON "EMBREE_SYCL_RT_VALIDATION_API" OFF)
IF (EMBREE_SYCL_RT_VALIDATION_API AND NOT EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
IF (NOT EMBREE_SYCL_IMPLICIT_DISPATCH_GLOBALS)
ADD_DEFINITIONS("-DEMBREE_SYCL_ALLOC_DISPATCH_GLOBALS")
ENDIF()
@@ -194,15 +209,8 @@ IF (EMBREE_SYCL_SUPPORT)
ENDIF()
ENDIF()
CMAKE_DEPENDENT_OPTION(EMBREE_SYCL_L0_RTAS_BUILDER "Enable Level Zero RTAS builder" ON "EMBREE_SYCL_SUPPORT" OFF)
IF (EMBREE_SYCL_L0_RTAS_BUILDER)
ADD_DEFINITIONS("-DEMBREE_SYCL_L0_RTAS_BUILDER")
ENDIF()
OPTION(EMBREE_RAY_MASK "Enables ray mask support." ON)
OPTION(EMBREE_BACKFACE_CULLING "Enables backface culling.")
OPTION(EMBREE_BACKFACE_CULLING_CURVES "Enables backface culling for curve primitives." OFF)
OPTION(EMBREE_BACKFACE_CULLING_SPHERES "Enables backface culling for sphere primitives." OFF)
OPTION(EMBREE_FILTER_FUNCTION "Enables filter functions." ON)
OPTION(EMBREE_IGNORE_INVALID_RAYS "Ignores invalid rays." OFF) # FIXME: enable by default?
@@ -213,11 +221,10 @@ OPTION(EMBREE_GEOMETRY_CURVE "Enables support for curve geometries." ON)
OPTION(EMBREE_GEOMETRY_SUBDIVISION "Enables support for subdiv geometries." ON)
OPTION(EMBREE_GEOMETRY_USER "Enables support for user geometries." ON)
OPTION(EMBREE_GEOMETRY_INSTANCE "Enables support for instances." ON)
OPTION(EMBREE_GEOMETRY_INSTANCE_ARRAY "Enables support for instance arrays." ON)
SET(EMBREE_MAX_INSTANCE_LEVEL_COUNT 1 CACHE STRING "Maximum number of instance levels.")
IF (NOT EMBREE_GEOMETRY_INSTANCE AND NOT EMBREE_GEOMETRY_INSTANCE_ARRAY AND NOT EMBREE_MAX_INSTANCE_LEVEL_COUNT EQUAL 1)
message(FATAL_ERROR "EMBREE_MAX_INSTANCE_LEVEL_COUNT must be 1 when EMBREE_GEOMETRY_INSTANCE and EMBREE_GEOMETRY_INSTANCE_ARRAY are disabled")
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")
ENDIF()
OPTION(EMBREE_GEOMETRY_GRID "Enables support for grid geometries." ON)
@@ -235,10 +242,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" AND CMAKE_OSX_ARCHITECTURES STREQUAL "") OR ("arm64" IN_LIST CMAKE_OSX_ARCHITECTURES))
IF (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64"))
MESSAGE(STATUS "Building for Apple silicon")
SET(EMBREE_ARM ON)
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
MESSAGE(STATUS "Building for AArch64")
SET(EMBREE_ARM ON)
ENDIF()
@@ -294,9 +301,6 @@ 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)
@@ -305,7 +309,8 @@ IF (WIN32)
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
IF ((${CMAKE_CXX_COMPILER_ID} MATCHES "IntelLLVM") OR
(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND COMPILER_HAS_SYCL_SUPPORT))
(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND ${CMAKE_CXX_COMPILER} MATCHES "icx") OR
(${CMAKE_CXX_COMPILER} MATCHES "dpcpp"))
MESSAGE("-- DPCPP compiler detected")
INCLUDE(dpcpp)
ELSEIF(${CMAKE_GENERATOR_TOOLSET} MATCHES "^LLVM")
@@ -413,9 +418,6 @@ IF (EMBREE_MAX_ISA STREQUAL "NONE")
ELSE()
OPTION(EMBREE_ISA_AVX512 "Enables AVX512 ISA." ${COMPILER_SUPPORTS_AVX512})
ENDIF()
# Don't use OPTION, but still set them to OFF, so that embree-config.cmake is consisten with its definitions
SET(EMBREE_ISA_NEON OFF)
SET(EMBREE_ISA_NEON2X OFF)
ENDIF()
ELSEIF (EMBREE_MAX_ISA STREQUAL "DEFAULT")
@@ -713,3 +715,4 @@ ENDIF()
##############################################################
INCLUDE(CPack)
-103
View File
@@ -1,103 +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",
"scripts/cmake-presets/continuous.json",
"scripts/cmake-presets/nightly.json",
"scripts/cmake-presets/release.json",
"scripts/cmake-presets/integrate.json",
"scripts/cmake-presets/performance.json"
],
"configurePresets": [
{
"name": "package-linux-icx-ispc1_19_0-tbb2021_9_0-perf",
"inherits": ["package-linux", "env", "icx", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "AVX512",
"EMBREE_USE_GOOGLE_BENCHMARK": "ON",
"EMBREE_BUILD_GOOGLE_BENCHMARK_FROM_SOURCE": "ON"
}
},
{
"name": "package-linux-icx-sycl-ispc1_19_0-tbb2021_9_0-perf",
"inherits": ["package-linux", "env", "icx", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_SYCL_SUPPORT": "ON",
"EMBREE_SYCL_L0_RTAS_BUILDER" : "OFF",
"EMBREE_SYCL_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512",
"EMBREE_USE_GOOGLE_BENCHMARK": "ON",
"EMBREE_BUILD_GOOGLE_BENCHMARK_FROM_SOURCE": "ON"
}
},
{
"name": "package-windows-v141-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-windows", "env", "v141", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "SSE2"
}
},
{
"name": "package-windows-v140-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-windows", "env", "v140", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "SSE2"
}
},
{
"name": "package-windows-icx-sycl-ispc1_19_0-tbb2021_9_0",
"inherits": ["package-windows", "env", "icx-windows", "ispc1_19_0", "tbb2021_9_0"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_SYCL_SUPPORT": "ON",
"EMBREE_SYCL_L0_RTAS_BUILDER" : "OFF",
"EMBREE_SYCL_AOT_DEVICES": "none",
"EMBREE_MAX_ISA": "AVX512"
}
},
{
"name": "linux-coverity",
"inherits": ["package-linux", "env", "gcc", "tasking_internal"],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"EMBREE_MAX_ISA": "SSE2"
}
}
]
}
+278 -781
View File
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -12,8 +12,7 @@ namespace embree
template<typename Index, class UnaryPredicate>
__forceinline bool parallel_any_of (Index first, Index last, UnaryPredicate pred)
{
std::atomic_bool ret;
ret = false;
bool 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.5)
cmake_minimum_required(VERSION 3.1)
# These two are used to automatically find the root and include directories.
set(_TBB_INCLUDE_SUBDIR "include")
+5 -14
View File
@@ -8,19 +8,10 @@ MACRO(_SET_IF_EMPTY VAR VALUE)
ENDMACRO()
IF (EMBREE_ARM)
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 ()
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__")
ELSE ()
# for `thread` keyword
_SET_IF_EMPTY(FLAGS_SSE2 "-msse -msse2 -mno-sse4.2")
@@ -118,7 +109,7 @@ ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") # enable exceptions
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") # enable threads
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msimd128") # enable SIMD intrinsics
ENDIF()
ENDIF()
SET(CMAKE_CXX_FLAGS_DEBUG "")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") # generate debug information
View File
+2 -9
View File
@@ -20,6 +20,8 @@ IF (NOT WIN32)
ENDIF()
ENDIF()
OPTION(EMBREE_LEVEL_ZERO "Use level zero API" OFF)
GET_FILENAME_COMPONENT(SYCL_COMPILER_DIR ${CMAKE_CXX_COMPILER} PATH)
GET_FILENAME_COMPONENT(SYCL_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
IF (NOT SYCL_COMPILER_NAME STREQUAL "clang++")
@@ -72,7 +74,6 @@ 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")
@@ -144,16 +145,10 @@ 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()
@@ -173,8 +168,6 @@ 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")
+2 -11
View File
@@ -22,7 +22,6 @@ SET(EMBREE_ISA_AVX2 @EMBREE_ISA_AVX2@)
SET(EMBREE_ISA_AVX512 @EMBREE_ISA_AVX512@)
SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512@) # just for compatibility
SET(EMBREE_ISA_NEON @EMBREE_ISA_NEON@)
SET(EMBREE_ISA_NEON2X @EMBREE_ISA_NEON2X@)
SET(EMBREE_BUILD_TYPE @CMAKE_BUILD_TYPE@)
SET(EMBREE_ISPC_SUPPORT @EMBREE_ISPC_SUPPORT@)
@@ -45,9 +44,6 @@ 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@)
@@ -56,6 +52,8 @@ SET(EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR @EMBREE_CURVE_SELF_INTERSECT
SET(EMBREE_DISC_POINT_SELF_INTERSECTION_AVOIDANCE @EMBREE_DISC_POINT_SELF_INTERSECTION_AVOIDANCE@)
SET(EMBREE_MIN_WIDTH @EMBREE_MIN_WIDTH@)
SET(EMBREE_SYCL_GPU_BVH_BUILDER @EMBREE_SYCL_GPU_BVH_BUILDER@)
IF (EMBREE_STATIC_LIB AND (EMBREE_TASKING_SYSTEM STREQUAL "TBB"))
INCLUDE(CMakeFindDependencyMacro)
FIND_DEPENDENCY(TBB)
@@ -97,16 +95,9 @@ 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")
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@)
+2 -2
View File
@@ -39,6 +39,8 @@ 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()
@@ -49,8 +51,6 @@ EXECUTE_PROCESS(COMMAND ${EMBREE_ISPC_EXECUTABLE} --version
IF (NOT ${ISPC_RESULT} STREQUAL "0")
MESSAGE(FATAL_ERROR "Error executing ISPC executable '${EMBREE_ISPC_EXECUTABLE}': ${ISPC_RESULT}")
ELSE()
MESSAGE(STATUS "Found working Intel SPMD Compiler (ISPC): ${EMBREE_ISPC_EXECUTABLE}")
ENDIF()
STRING(REGEX MATCH "([0-9]+[.][0-9]+[.][0-9]+)" DUMMY "${ISPC_OUTPUT}")
-3
View File
@@ -22,9 +22,6 @@ 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
+27 -68
View File
@@ -39,8 +39,7 @@ IF (EMBREE_SYCL_SUPPORT AND EMBREE_INSTALL_DEPENDENCIES)
"${DPCPP_COMPILER_DIR}/../bin/sycl?.dll")
INSTALL(FILES ${LIB_SYCL_DLL_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
INSTALL(FILES "${DPCPP_COMPILER_DIR}/pi_level_zero.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
INSTALL(FILES "${DPCPP_COMPILER_DIR}/win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib OPTIONAL)
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../bin/pi_level_zero.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
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)
@@ -48,21 +47,14 @@ IF (EMBREE_SYCL_SUPPORT AND EMBREE_INSTALL_DEPENDENCIES)
IF (EXISTS "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../redist/intel64_win/compiler/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/libmmd.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/libmmd.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
IF (EXISTS "${DPCPP_COMPILER_DIR}/pi_win_proxy_loader.dll")
INSTALL(FILES "${DPCPP_COMPILER_DIR}/pi_win_proxy_loader.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib)
ENDIF()
ELSE()
FILE(GLOB LIB_SYCL_FILES LIST_DIRECTORIES FALSE
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?.?"
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?.?-?")
"${DPCPP_COMPILER_DIR}/../lib/libsycl.so.?.?.?")
INSTALL(FILES ${LIB_SYCL_FILES} DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
INSTALL(FILES "${DPCPP_COMPILER_DIR}/../lib/libpi_level_zero.so" DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
@@ -96,9 +88,6 @@ IF (WIN32)
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()
@@ -244,7 +233,6 @@ SET(CPACK_PACKAGE_NAME "Intel(R) Embree Ray Tracing Kernels")
SET(CPACK_PACKAGE_FILE_NAME "embree-${EMBREE_VERSION}${EMBREE_VERSION_NOTE}")
IF (EMBREE_SYCL_SUPPORT)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.sycl")
SET(EMBREE_VERSION_SUFFIX)
ENDIF()
#SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png")
#SET(CPACK_PACKAGE_RELOCATABLE TRUE)
@@ -257,25 +245,14 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Intel(R) Embree implements high performan
SET(CPACK_PACKAGE_VENDOR "Intel Corporation")
SET(CPACK_PACKAGE_CONTACT embree_support@intel.com)
SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
SET(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP)
SET(CPACK_COMPONENT_LIB_DISPLAY_NAME "Library")
SET(CPACK_COMPONENT_LIB_DESCRIPTION "The Embree library including documentation.")
SET(CPACK_COMPONENT_LIB_GROUP "embree")
SET(CPACK_COMPONENT_DEVEL_DISPLAY_NAME "Development")
SET(CPACK_COMPONENT_DEVEL_DESCRIPTION "Header Files for C and ISPC required to develop applications with Embree.")
SET(CPACK_COMPONENT_DEVEL_GROUP "embree")
SET(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Examples")
SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Tutorials demonstrating how to use Embree.")
SET(CPACK_COMPONENT_EXAMPLES_GROUP "embree")
SET(CPACK_COMPONENT_TESTING_DISPLAY_NAME "Testing")
SET(CPACK_COMPONENT_TESTING_DESCRIPTION "Models and reference images for tests")
SET(CPACK_COMPONENT_TESTING_GROUP "embree-testing")
# dependencies between components
#SET(CPACK_COMPONENT_DEVEL_DEPENDS lib)
@@ -288,6 +265,7 @@ 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")
@@ -298,8 +276,11 @@ 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(PACKAGE_EXT "zip")
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} "${CPACK_PACKAGE_FILE_NAME}.zip")
ENDIF()
# MacOSX specific settings
ELSEIF(APPLE)
@@ -308,52 +289,30 @@ ELSEIF(APPLE)
SET(CPACK_RESOURCE_FILE_README "${PROJECT_BINARY_DIR}/README.txt")
SET(CPACK_GENERATOR ZIP)
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")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
SET(CPACK_MONOLITHIC_INSTALL 1)
IF (EMBREE_TESTING_PACKAGE)
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/package_macosx.sh" ${CMAKE_BUILD_TYPE} "${CPACK_PACKAGE_FILE_NAME}.zip" "${EMBREE_SIGN_FILE}")
ENDIF()
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
SET(PACKAGE_EXT "zip")
add_custom_target(
post_package_notarize "${PROJECT_SOURCE_DIR}/scripts/package_post_build_notarize_macosx.sh" ${PACKAGE_BASE_NAME} ${EMBREE_SIGN_FILE}
)
# Linux specific settings
ELSE()
SET(CPACK_GENERATOR TGZ)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
SET(PACKAGE_BASE_NAME "${CPACK_PACKAGE_FILE_NAME}")
SET(PACKAGE_EXT "tar.gz")
IF (EMBREE_SYCL_SUPPORT)
SET(EMBREE_VERSION_SYCL_SUFFIX ".sycl")
SET(CPACK_MONOLITHIC_INSTALL 1)
IF (EMBREE_TESTING_PACKAGE)
IF (EMBREE_SYCL_SUPPORT)
SET(PACKAGE_SCRIPT "${PROJECT_SOURCE_DIR}/scripts/package_linux_dpcpp.sh")
ELSE()
SET(PACKAGE_SCRIPT "${PROJECT_SOURCE_DIR}/scripts/package_linux.sh")
ENDIF()
ADD_TEST(NAME "BuildPackage" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND ${PACKAGE_SCRIPT}
${EMBREE_ZIP_MODE} ${EMBREE_LIBRARY_NAME} ${EMBREE_VERSION} ${EMBREE_VERSION_MAJOR} "${EMBREE_SIGN_FILE}")
ENDIF()
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}
)
IF (EMBREE_TESTING_PACKAGE)
SET_TESTS_PROPERTIES(BuildPackage PROPERTIES TIMEOUT 1200)
ENDIF()
+246 -548
View File
@@ -1,569 +1,267 @@
## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
if (BUILD_TESTING OR EMBREE_TESTING_INSTALL_TESTS)
INCLUDE(CTest)
INCLUDE(CTest)
if (EMBREE_TESTING_INSTALL_TESTS)
SET(EMBREE_INSTALL_CTESTTESTFILE "${CMAKE_CURRENT_BINARY_DIR}/embree-addtests.cmake")
file(WRITE "${EMBREE_INSTALL_CTESTTESTFILE}" "")
endif()
if (NOT EMBREE_TESTING_PACKAGE_TEST_PROJECT)
IF (WIN32)
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
ELSE()
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
ENDIF()
IF (WIN32)
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
ELSE()
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
ENDIF()
else()
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${EMBREE_INSTALL_BINDIR}")
endif()
ELSE()
SET(MY_PROJECT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
ENDIF()
if (NOT EMBREE_TESTING_PACKAGE_TEST_PROJECT)
SET(EMBREE_TESTING_INTENSITY 1 CACHE STRING "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing, 4 = very intensive testing.")
SET_PROPERTY(CACHE EMBREE_TESTING_INTENSITY PROPERTY STRINGS 0 1 2 3 4)
SET(EMBREE_TESTING_ONLY_SYCL_TESTS OFF CACHE BOOL "Run only tests with the sycl support.")
SET(EMBREE_TESTING_MEMCHECK OFF CACHE BOOL "Turns on memory checking for some tests.")
SET(EMBREE_TESTING_BENCHMARK OFF CACHE BOOL "Turns benchmarking on.")
SET(EMBREE_TESTING_BENCHMARK_DATABASE "${PROJECT_BINARY_DIR}" CACHE PATH "Path to database for benchmarking.")
SET(EMBREE_TESTING_PACKAGE OFF CACHE BOOL "Packages release as test.")
SET(EMBREE_TESTING_KLOCWORK OFF CACHE BOOL "Runs Kocwork as test.")
SET(EMBREE_TESTING_SDE OFF CACHE STRING "Uses SDE to run tests for specified CPU.")
SET_PROPERTY(CACHE EMBREE_TESTING_SDE PROPERTY STRINGS OFF pnr nhm wsm snb ivb hsw bdw knl skl skx cnl)
endif()
FIND_PATH(EMBREE_TESTING_MODEL_DIR
NAMES test-models-intensity2.txt
PATHS "${PROJECT_SOURCE_DIR}/models"
DOC "Path to the folder containing the Embree models for regression testing."
NO_DEFAULT_PATHS)
FUNCTION (SET_EMBREE_TEST_PROPERTIES testname)
SET(variants "_cpp;_ispc;_sycl")
foreach(v ${variants})
if (v STREQUAL "_cpp")
SET(v "")
endif()
set(testnamedef "EMBREE_TEST_${testname}${v}_DEFINED")
if(${testnamedef})
SET_TESTS_PROPERTIES(${testname}${v} ${ARGN})
endif()
endforeach()
SET(EMBREE_TESTING_INTENSITY 1 CACHE STRING "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing, 4 = very intensive testing.")
SET_PROPERTY(CACHE EMBREE_TESTING_INTENSITY PROPERTY STRINGS 0 1 2 3 4)
SET(EMBREE_TESTING_ONLY_SYCL_TESTS OFF CACHE BOOL "Run only tests with the sycl support.")
SET(EMBREE_TESTING_MEMCHECK OFF CACHE BOOL "Turns on memory checking for some tests.")
SET(EMBREE_TESTING_BENCHMARK OFF CACHE BOOL "Turns benchmarking on.")
SET(EMBREE_TESTING_BENCHMARK_DATABASE "${PROJECT_BINARY_DIR}" CACHE PATH "Path to database for benchmarking.")
SET(EMBREE_TESTING_PACKAGE OFF CACHE BOOL "Packages release as test.")
SET(EMBREE_TESTING_KLOCWORK OFF CACHE BOOL "Runs Kocwork as test.")
SET(EMBREE_TESTING_SDE OFF CACHE STRING "Uses SDE to run tests for specified CPU.")
SET_PROPERTY(CACHE EMBREE_TESTING_SDE PROPERTY STRINGS OFF pnr nhm wsm snb ivb hsw bdw knl skl skx cnl)
if (EMBREE_TESTING_INSTALL_TESTS)
file(APPEND "${EMBREE_INSTALL_CTESTTESTFILE}" "SET_EMBREE_TEST_PROPERTIES(${testname} ${ARGN}) \n")
endif()
ENDFUNCTION()
# checks if the current cmake configuration is compatible with the requirements declared in the optionsfile
MACRO (EMBREE_TEST_CHECK_OPTIONS optionsfile out)
MACRO (ADD_EMBREE_GENERIC_TEST testname executable)
ADD_TEST(NAME ${testname}
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable} ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
SET(${testnamedef} "1" CACHE INTERNAL "")
ENDMACRO()
# if no optionsfile is found return true (no requirements defined)
SET(${out} 1)
MACRO (ADD_EMBREE_GENERIC_CPP_TEST testname executable)
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
ADD_TEST(NAME ${testname}
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable} ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
SET(${testnamedef} "1" CACHE INTERNAL "")
endif()
ENDMACRO()
IF(EXISTS "${optionsfile}")
FILE(READ "${optionsfile}" lines)
STRING(REGEX REPLACE "\n" ";" lines "${lines}")
MACRO (ADD_EMBREE_GENERIC_ISPC_TEST testname executable)
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
IF (EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
ADD_TEST(NAME ${testname}_ispc
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable}_ispc ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_ispc_DEFINED)
SET(${testnamedef} "1" CACHE INTERNAL "")
ENDIF()
endif()
ENDMACRO()
FOREACH (line ${lines})
MACRO (ADD_EMBREE_GENERIC_SYCL_TEST testname executable)
IF (EMBREE_SYCL_SUPPORT)
ADD_TEST(NAME ${testname}_sycl
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
COMMAND ${executable}_sycl ${ARGN})
SET(testnamedef EMBREE_TEST_${testname}_sycl_DEFINED)
SET(${testnamedef} 1 CACHE INTERNAL "")
SET_TESTS_PROPERTIES(${testname}_sycl PROPERTIES TIMEOUT 50)
ENDIF()
ENDMACRO()
# parse line into list
string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" tokens "${line}")
LIST(LENGTH tokens token_count)
IF (NOT ${token_count} EQUAL 3)
message(FATAL_ERROR "illegal .embree_opitons in ${optionsfile} at line ${line}")
ENDIF()
# we require every line to follow the scheme "option [==/!=] value"
LIST(GET tokens 0 option)
LIST(GET tokens 1 comp)
LIST(GET tokens 2 value)
STRING(STRIP ${option} option)
STRING(STRIP ${comp} comp)
STRING(STRIP ${value} value)
IF ("${comp}" STREQUAL "==")
IF (NOT "${${option}}" STREQUAL "${value}")
SET(${out} 0)
ENDIF()
ELSE()
IF ("${${option}}" STREQUAL "${value}")
SET(${out} 0)
ENDIF()
ENDIF()
# Checks if the current cmake configuration is compatible with <condition>
# condition may be a triple of CMAKE_VARIABLE_NAME op VALUE
# supported operators for op are: ==, !=, <, <=, >, >=
FUNCTION (EMBREE_TESTING_CHECK_OPTION out condition)
# parse condition into list
string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" tokens "${condition}")
LIST(LENGTH tokens token_count)
IF (NOT ${token_count} EQUAL 3)
message(FATAL_ERROR "illegal embree_opitons condition: ${condition}")
ENDIF()
# we require every condition to follow the scheme "variable_name op value"
LIST(GET tokens 0 option)
LIST(GET tokens 1 comp)
LIST(GET tokens 2 value)
STRING(STRIP ${option} option)
STRING(STRIP ${comp} comp)
STRING(STRIP ${value} value)
SET(${out} 0 PARENT_SCOPE)
if ("${comp}" STREQUAL "==")
if ("${${option}}" STREQUAL "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL "!=")
if (NOT ("${${option}}" STREQUAL "${value}"))
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL ">")
if ("${${option}}" GREATER "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL ">=")
if ("${${option}}" GREATER_EQUAL "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL "<")
if ("${${option}}" LESS "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
elseif ("${comp}" STREQUAL "<=")
if ("${${option}}" LESS_EQUAL "${value}")
SET(${out} 1 PARENT_SCOPE)
endif()
else()
message(FATAL_ERROR "Could not parse embree_option condition: ${condition}")
endif()
ENDFUNCTION()
# Checks multiple options from a list with EMBREE_TESTING_CHECK_OPTION
FUNCTION (EMBREE_TESTING_CHECK_OPTIONS_LIST out conditions)
SET(${out} 1 PARENT_SCOPE)
FOREACH (c ${conditions})
EMBREE_TESTING_CHECK_OPTION(myout ${c})
IF (myout EQUAL 0)
SET(${out} 0 PARENT_SCOPE)
IF (${out} EQUAL 0)
BREAK()
ENDIF()
ENDFOREACH()
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_GENERIC_CPP_TEST testname executable args)
IF (BUILD_TESTING)
ADD_TEST(NAME ${testname}
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable} ${args})
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_GENERIC_ISPC_TEST testname executable args)
IF (BUILD_TESTING AND EMBREE_ISPC_SUPPORT AND EMBREE_RAY_PACKETS)
ADD_TEST(NAME ${testname}_ispc
WORKING_DIRECTORY "${MY_PROJECT_BINARY_DIR}"
COMMAND ${executable}_ispc ${args})
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_GENERIC_SYCL_TEST testname executable args)
IF (BUILD_TESTING AND EMBREE_SYCL_SUPPORT)
ADD_TEST(NAME ${testname}_sycl
WORKING_DIRECTORY ${MY_PROJECT_BINARY_DIR}
COMMAND ${executable}_sycl ${args})
SET_TESTS_PROPERTIES(${testname}_sycl PROPERTIES TIMEOUT 50)
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_TEST testname executable args)
# Check if we should dump the output of this tests
LIST(FIND EMBREE_TESTING_DUMPTESTS ${testname} dumptest)
if (NOT(EMBREE_TESTING_DUMPFORMAT))
SET(EMBREE_TESTING_DUMPFORMAT "tga")
endif()
set(DUMP_ARG "")
IF(NOT(${dumptest} EQUAL -1))
file(MAKE_DIRECTORY "${PROJECT_SOURCE_DIR}/tests/dump")
set(argsx "${args} -o ${PROJECT_SOURCE_DIR}/tests/dump/${testname}.${EMBREE_TESTING_DUMPFORMAT}")
ELSE()
set(argsx ${args})
ENDIF()
# By default add tests for all executables
SET (extra_args ${ARGN})
LIST(APPEND extra_args cpp)
LIST(APPEND extra_args ispc)
LIST(APPEND extra_args sycl)
LIST(REMOVE_DUPLICATES extra_args)
# Exclude exe with '!'
LIST(FIND extra_args "!cpp" p)
if (NOT (${p} EQUAL -1))
LIST(REMOVE_ITEM extra_args "!cpp")
LIST(REMOVE_ITEM extra_args "cpp")
endif()
LIST(FIND extra_args "!ispc" p)
if (NOT (${p} EQUAL -1))
LIST(REMOVE_ITEM extra_args "!ispc")
LIST(REMOVE_ITEM extra_args "ispc")
endif()
LIST(FIND extra_args "!sycl" p)
if (NOT (${p} EQUAL -1))
LIST(REMOVE_ITEM extra_args "!sycl")
LIST(REMOVE_ITEM extra_args "sycl")
endif()
# Add the tests
FOREACH(loopvar ${extra_args})
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
if(${loopvar} STREQUAL "cpp")
ADD_EMBREE_GENERIC_CPP_TEST(${testname} ${executable} ${argsx})
ENDIF()
if(${loopvar} STREQUAL "ispc")
ADD_EMBREE_GENERIC_ISPC_TEST(${testname} ${executable} ${argsx})
ENDIF()
endif()
if(${loopvar} STREQUAL "sycl")
ADD_EMBREE_GENERIC_SYCL_TEST(${testname} ${executable} ${argsx})
ENDIF()
ENDFOREACH()
ENDMACRO()
MACRO (ADD_EMBREE_TUTORIAL_TEST name args)
ADD_EMBREE_TEST(${name} embree_${name} "--compare ${PROJECT_SOURCE_DIR}/tests/models/reference/${name}.exr ${args}" ${ARGN})
ENDMACRO()
MACRO (ADD_EMBREE_PRIMITIVE_TEST xml shader)
EMBREE_TEST_CHECK_OPTIONS("${xml}.embree_options" out)
IF (${out} EQUAL 1)
GET_FILENAME_COMPONENT(FN ${xml} NAME_WE)
SET(testname "prim_${FN}_${shader}")
SET(compare_threshold "55")
# TODO: APPLE with AVX2 enabled have a sphere cap intersection problem with linear curves
IF ((testname MATCHES "prim_curves_linear_flat.*") AND ((testname MATCHES ".*uv") OR testname MATCHES ".*Ng"))
IF (APPLE AND (EMBREE_ISA_AVX2 OR EMBREE_ISA_AVX512))
SET(compare_threshold "200")
ENDIF()
ENDIF()
SET(args "-i ${xml} --shader ${shader} --time 0.5 --compare ${PROJECT_SOURCE_DIR}/tests/primitives/reference/${testname}.exr --compare-threshold ${compare_threshold}")
ADD_EMBREE_TEST(${testname} embree_viewer ${args})
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_MODEL_TEST testname executable model reference args)
EMBREE_TEST_CHECK_OPTIONS("${PROJECT_SOURCE_DIR}/tests/models/${model}.embree_options" out)
IF (${out} EQUAL 1)
SET(extra_args ${ARGN})
IF ("${testname}" MATCHES ".*subdiv.*") # skip subdiv models for SYCL mode
LIST(APPEND extra_args !sycl)
ENDIF()
SET(argsx "-c ${PROJECT_SOURCE_DIR}/tests/models/${model} --compare ${PROJECT_SOURCE_DIR}/tests/models/reference/${reference}.exr ${args}")
ADD_EMBREE_TEST(${testname} ${executable} ${argsx} ${extra_args})
ENDIF()
ENDMACRO()
MACRO (ADD_EMBREE_MODELS_TEST model_list_file testname executable reference args)
IF (BUILD_TESTING)
SET(full_model_list_file "${PROJECT_SOURCE_DIR}/tests/models/${model_list_file}")
IF(NOT EXISTS "${full_model_list_file}")
MESSAGE(FATAL_ERROR "File ${PROJECT_SOURCE_DIR}/tests/models/${model_list_file} does not exist!")
ENDIF()
FILE(READ "${full_model_list_file}" models)
STRING(REGEX REPLACE "\n" ";" models "${models}")
FOREACH (model ${models})
IF (model MATCHES "^#")
CONTINUE()
ENDIF()
IF (model MATCHES ".*mblur.*" OR model MATCHES ".*motion_blur.*") # skip mblur models if motion blur is not enabled
IF (NOT EMBREE_SYCL_MBLUR)
CONTINUE()
ENDIF()
ENDIF()
STRING(REGEX REPLACE " .*" "" modelname "${model}")
STRING(REGEX REPLACE "/" "_" modelname "${modelname}")
STRING(REGEX REPLACE ".ecs" "" modelname "${modelname}")
ADD_EMBREE_MODEL_TEST(${testname}_${modelname} ${executable} ${model} ${reference}_${modelname} "${args}")
ENDFOREACH()
ENDIF()
ENDMACRO()
# add klocwork test
IF (EMBREE_TESTING_KLOCWORK)
ADD_TEST(NAME Klocwork-Build WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/klocwork_build.sh")
ADD_TEST(NAME Klocwork-Check WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND "${PROJECT_SOURCE_DIR}/scripts/klocwork_check.sh")
SET_TESTS_PROPERTIES(Klocwork-Build PROPERTIES TIMEOUT 2400)
SET_TESTS_PROPERTIES(Klocwork-Check PROPERTIES TIMEOUT 300)
ENDIF()
# add valgrind test
IF (EMBREE_TESTING_MEMCHECK)
find_program( EMBREE_MEMORYCHECK_COMMAND valgrind )
set( EMBREE_MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=1" )
IF (NOT EMBREE_MEMORYCHECK_COMMAND)
MESSAGE(FATAL_ERROR "valgrind not found")
ENDIF()
FUNCTION(ADD_MEMCHECK_TEST name binary)
set(memcheck_command "${EMBREE_MEMORYCHECK_COMMAND} ${EMBREE_MEMORYCHECK_COMMAND_OPTIONS}")
separate_arguments(memcheck_command)
add_test(NAME ${name} COMMAND ${memcheck_command} "${MY_PROJECT_BINARY_DIR}/${binary}" ${ARGN})
ENDFUNCTION()
# looks for ifile in multiple possible locations and outputs a file with absolute path in ofile
FUNCTION (EMBREE_FIND_TEST_FILE ifile ofile errmsgflavor)
if (EXISTS "${ifile}") # abs path, use get_filename_component because it could also be relative to cwd
get_filename_component(absifile "${ifile}" ABSOLUTE)
SET(${ofile} ${absifile} PARENT_SCOPE)
elseif(EXISTS "${PROJECT_SOURCE_DIR}/tests/${ifile}") # testing dir
set(${ofile} "${PROJECT_SOURCE_DIR}/tests/${ifile}" PARENT_SCOPE)
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ifile}") # relative to source folder
set(${ofile} "${CMAKE_CURRENT_SOURCE_DIR}/${ifile}" PARENT_SCOPE)
else()
set(${ofile} "" PARENT_SCOPE)
if (errmsgflavor)
message(FATAL_ERROR
"Could not find ${errmsgflavor} \"${ifile}\"\n"
"looked for:\n"
" ${inputfile}\n"
" ${PROJECT_SOURCE_DIR}/tests/${ifile}\n"
" ${CMAKE_CURRENT_SOURCE_DIR}/${ifile}\n"
)
endif()
endif()
ENDFUNCTION()
FUNCTION (EMBREE_ADD_TEST_PARSE_SUBLIST args keyword sublist)
SET(myargs ${args})
SET(mysublist "")
SET(keywords "ECS;XML;NO_REFERENCE;REFERENCE;REFERENCE_SUFFIX;INTENSITY;CONDITION_FILE;CONDITION;ARGS;NO_CPP;NO_ISPC;NO_SYCL;GEN_REFERENCE;")
list(FIND nargs ${keyword} istart)
if (NOT(istart EQUAL -1))
list(LENGTH myargs iend)
foreach(k ${keywords})
list(FIND myargs ${k} i)
if (NOT(i EQUAL -1) AND (i GREATER istart) AND (i LESS iend))
SET(iend ${i})
endif()
endforeach()
MATH(EXPR i "${istart}+1")
while (i LESS iend)
list(GET myargs ${i} elem)
list(APPEND mysublist ${elem})
MATH(EXPR i "${i}+1")
endwhile()
endif()
SET(${sublist} ${mysublist} PARENT_SCOPE)
ENDFUNCTION()
FUNCTION (EMBREE_ADD_TEST_PARSE_FLAG args keyword value)
SET(myargs ${args})
SET(${value} OFF PARENT_SCOPE)
list(FIND nargs ${keyword} i)
if (NOT(i EQUAL -1))
SET(${value} ON PARENT_SCOPE)
endif()
ENDFUNCTION()
# ADD_EMBREE_TEST_ECS(testname exename [ECS <file> | XML <file>] [NO_REFERENCE | REFERENCE <path> | REFERENCE_SUFFIX <suffix>] [INTENSITY <i>] [CONDITION <conds>] [ARGS <args>] [GEN_REFERENCE])
# [ECS <file> | XML <inputfile> | OPTIONS <inputfile>]
# - looks for file and calls the test command with either "-c <inputfile>.ecs" or "-i <inputfile>.xml"
#
# [NO_REFERENCE | REFERENCE <path> | REFERENCE_SUFFIX <suffix>]
# - if not found a reference is will be expected in the same folder as *.ecs with name *.ecs.exename.exr
# - NO_REFERENCE: don't look for a reference (no --compare in test command)
# - REFERENCE <path>: use the reference located in <path>. Same rules aplly as for finding ecs files: absolute or relative to CMAKE_CURRENT_SOURCE_DIR path, must not be located outside the embree root dir.
# - REFERENCE_SUFFIX <suffix>: use the default reference location and name with a suffix before the last file extension, e.g. *.ecs.exename<suffix>.exr
# - if this argument is not specified, looks for
# 1. <inputfile>.exename.exr, or
# 2. <testname>.exr, if no <inputfile> was given
#
# [INTENSITY <i>]
# - default i = 1
# - sets the intensity level for the test, test is only run if ${EMBREE_TESTING_INTENSITY} GREATER_EQUAL i
# - could be done with an *.embree_options file, but this is more flexible, e.g. you can easier share reference images without specifying an absolute path
# - DOES NOT overrite EMBREE_TESTING_INTENSITY, if specified in *.embree_options
#
# [CONDITION_FILE <file>]
# - file containing additional conditions
# - conditions are specified linewise in form of: EMBREE_OPTION op VALUE, where EMBREE_OPTION is a cmake variable used during embree configuration and op is one of ==, !=, <, <=, >, >=
# - if this argument is not specified, looks for
# 1. <inputfile>.embree_options, or
# 2. <testname>.embree_options, if no <inputfile> was given
#
# [CONDITION <conds>]
# - cmake list of additional conditions, specified the same way as in an embree_options file
#
# [ARGS <args>]
# - additional arguments for the test command
#
# [GEN_REFERENCE]
# - writes the reference to the expected location
# - could also be done with the ARGS parameter, but this way we don't have to deal with paths
#
# EXAMPLES
#
# all optional arguments default,
# - looks for points.ecs.embree_options to filter out test by configured options, if not found no restrictions
# - runs for EMBREE_TESTING_INTENSITY >= 1
# - reference will be expected in the same folder as points.ecs with name points.ecs.embree_viewer.exr
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs") # 1)
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "${PROJECT_SOURCE_DIR}/models/xxx/points.ecs") # 2) same as 1) but with absolute path to ecs
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "points.ecs") # 3) same as 1) but looks for points.ecs in the ${CMAKE_CURRENT_SOURCE_DIR} i.e. <embree_root>/tutorials/viewer/points.ecs
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" ARGS --coherent INTENSITY 2) # 4) same as 1) but runs only at EMBREE_TESTING_INTENSITY >= 2
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" REFERENCE_SUFFIX "_quads" ARGS
# --coherent
# --convert-triangles-to-quads INTENSITY 2) # 5) same as 4) but expects reference name points.ecr.embree_viewer_quads.ecs
#ADD_EMBREE_TEST_ECS(viewer_points embree_viewer "models/xxx/points.ecs" REFERENCE "special.exr" ARGS
# --coherent
# --convert-triangles-to-quads INTENSITY 2) # 5) same as 4) but expects reference <embree-root>/tutorials/viewer/special.exr
## 1) - 5) all share the same base input arguments defined in points.ecs as well as the points.ecs.embree_options
#ADD_EMBREE_TEST_ECS(point_geometry embree_point_geometry) # 6) no ecs file, uses point_geometry.embree_options if exists, expects reference ${CMAKE_CURRENT_SOURCE_DIR}/point_geometry.exr
#ADD_EMBREE_TEST_ECS(verify verify NO_REFERENCE) # 7) no ecs file, uses verify.embree_options if exists, no reference
#ADD_EMBREE_TEST_ECS(verify_memcheck verify NO_REFERENCE CONDITIONS "EMBREE_TESTING_MEMCHECK == ON") # 8) same as 7) but with extra condition
FUNCTION (ADD_EMBREE_TEST_ECS testname executable)
if (EMBREE_TESTING_FILTER_TESTNAMES)
list(FIND EMBREE_TESTING_FILTER_TESTNAMES "${testname}" i)
if (${i} EQUAL -1)
return()
endif()
endif()
SET(nargs ${ARGN})
# disable everything
SET(testnamedef EMBREE_TEST_${testname}_DEFINED)
SET(${testnamedef} "0" CACHE INTERNAL "")
SET(testnamedef EMBREE_TEST_${testname}_ispc_DEFINED)
SET(${testnamedef} "0" CACHE INTERNAL "")
SET(testnamedef EMBREE_TEST_${testname}_sycl_DEFINED)
SET(${testnamedef} "0" CACHE INTERNAL "")
# parsing input file
# ECS mode -> single parameter with filename after ECS keyword
list(FIND nargs "ECS" i)
if (NOT(i EQUAL -1))
SET(inputtype "-c")
MATH(EXPR i "${i}+1")
list(GET nargs ${i} out)
EMBREE_FIND_TEST_FILE("${out}" inputfile "test file")
endif()
# XML mode -> single parameter with filename after XML keyword
list(FIND nargs "XML" i)
if (NOT(i EQUAL -1))
SET(inputtype "-i")
MATH(EXPR i "${i}+1")
list(GET nargs ${i} out)
EMBREE_FIND_TEST_FILE("${out}" inputfile "test file")
endif()
# no filetype keyword -> look for <testname>.ecs/xml
# does not need to be specified
if (NOT inputtype)
EMBREE_FIND_TEST_FILE("${testname}.ecs" inputfile "")
if(inputfile)
SET(inputtype "-c")
endif()
EMBREE_FIND_TEST_FILE("${testname}.ecs" inputfile "")
if(inputfile)
SET(inputtype "-i")
endif()
endif()
# parsing refernce image
# no reference image mode -> no additional parameter to parse
list(FIND nargs "NO_REFERENCE" i)
if (NOT(i EQUAL -1))
SET(no_reference ON)
endif()
# reference suffix mode -> singe parameter with suffix to default reference file name
list(FIND nargs "REFERENCE_SUFFIX" i)
if (NOT(i EQUAL -1))
MATH(EXPR i "${i}+1")
list(GET nargs ${i} out)
EMBREE_FIND_TEST_FILE("${inputfile}.${executable}${out}.exr" referencefile "reference image")
endif()
# reference mode -> singe parameter with absolute path to reference image
list(FIND nargs "REFERENCE" i)
if (NOT(i EQUAL -1))
MATH(EXPR i "${i}+1")
list(GET nargs ${i} out)
EMBREE_FIND_TEST_FILE("${out}" referencefile "reference image")
endif()
# no reference keyword -> look for <testname>.exr and <inputfile>.<executable>.exr respectively
if ((NOT no_reference) AND (NOT referencefile))
if (NOT inputfile)
EMBREE_FIND_TEST_FILE("${testname}.exr" referencefile "reference image")
else()
EMBREE_FIND_TEST_FILE("${inputfile}.${executable}.exr" referencefile "reference image")
endif()
endif()
# parsing intensity
# single integer parameter
SET(intensity 1)
list(FIND nargs "INTENSITY" i)
if (NOT(i EQUAL -1))
MATH(EXPR i "${i}+1")
list(GET nargs ${i} intensity)
endif()
# parsing condition
SET(conditions "")
SET(conditionsfile)
list(FIND nargs "CONDITION_FILE" i)
# condition file -> single parameter to absolute path of conditions file
if (NOT(i EQUAL -1))
list(GET nargs ${i} conditionsfile)
EMBREE_FIND_TEST_FILE("${conditionsfile}" conditionsfile "")
# no <inputfile> specified -> look for <testname>.embree_options
elseif (NOT inputtype)
EMBREE_FIND_TEST_FILE("${testname}.embree_options" conditionsfile "")
# <inputfile> specified -> look for <inputfile>.embree_options
else()
EMBREE_FIND_TEST_FILE("${inputfile}.embree_options" conditionsfile "")
endif()
if (conditionsfile)
file(READ "${conditionsfile}" lines)
string(REGEX REPLACE "\n" ";" conditions "${lines}")
endif()
# parsing additional conditions
EMBREE_ADD_TEST_PARSE_SUBLIST("${nargs}" "CONDITION" extra_conditions)
list(APPEND conditions ${extra_conditions})
# parsing extra args
EMBREE_ADD_TEST_PARSE_SUBLIST("${nargs}" "ARGS" extraargs)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "MEMCHECK" memcheck)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_CPP" no_cpp)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_ISPC" no_ispc)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_SYCL" no_sycl)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "NO_POSTFIX" no_postfix)
EMBREE_ADD_TEST_PARSE_FLAG("${nargs}" "GEN_REFERENCE" gen_reference)
# add the test, if the conditions are met
SET(matchconditions ON)
if (conditions)
EMBREE_TESTING_CHECK_OPTIONS_LIST(out "${conditions}")
if (out EQUAL 0)
SET(matchconditions OFF)
endif()
endif()
# LESS_EQUAL not supported on all CI runners
if (matchconditions AND ((intensity LESS EMBREE_TESTING_INTENSITY) OR (intensity EQUAL EMBREE_TESTING_INTENSITY)))
SET(args "")
if (inputfile)
list(APPEND args "${inputtype} ${inputfile}")
endif()
if (NOT no_reference)
list(APPEND args "--compare ${referencefile}")
endif()
if (gen_reference)
list(APPEND args "-o ${referencefile}")
endif()
foreach(a ${extraargs})
list(APPEND args "${a}")
endforeach()
if (memcheck)
list(PREPEND args "${MY_PROJECT_BINARY_DIR}/${executable}")
list(PREPEND args "${EMBREE_MEMORYCHECK_COMMAND_OPTIONS}")
if (no_postfix)
ADD_EMBREE_GENERIC_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
else()
if((NOT ${EMBREE_SYCL_SUPPORT}) OR (NOT ${EMBREE_TESTING_ONLY_SYCL_TESTS}))
if (NOT(no_cpp))
ADD_EMBREE_GENERIC_CPP_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
endif()
if (NOT(no_ispc))
ADD_EMBREE_GENERIC_ISPC_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
endif()
endif()
if (NOT(no_sycl))
ADD_EMBREE_GENERIC_SYCL_TEST(${testname} ${EMBREE_MEMORYCHECK_COMMAND} ${args})
endif()
endif()
else()
if (no_postfix)
ADD_EMBREE_GENERIC_TEST(${testname} ${executable} ${args})
else()
if (NOT(no_cpp))
ADD_EMBREE_GENERIC_CPP_TEST(${testname} ${executable} ${args})
endif()
if (NOT(no_ispc))
ADD_EMBREE_GENERIC_ISPC_TEST(${testname} ${executable} ${args})
endif()
if (NOT(no_sycl))
ADD_EMBREE_GENERIC_SYCL_TEST(${testname} ${executable} ${args})
endif()
endif()
endif()
endif()
if (EMBREE_TESTING_INSTALL_TESTS)
if (inputfile)
get_filename_component(inputpath ${inputfile} DIRECTORY)
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" inputpath "${inputpath}")
INSTALL(FILES "${inputfile}"
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${inputpath}"
COMPONENT testing)
endif()
if (conditionsfile)
get_filename_component(conditionspath ${conditionsfile} DIRECTORY)
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" conditionspath "${conditionspath}")
INSTALL(FILES "${conditionsfile}"
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${conditionspath}"
COMPONENT testing)
endif()
if (referencefile)
get_filename_component(referencepath ${referencefile} DIRECTORY)
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" referencepath "${referencepath}")
INSTALL(FILES "${referencefile}"
DESTINATION "${CMAKE_INSTALL_TESTDIR}/${referencepath}"
COMPONENT testing)
endif()
SET(testcall "ADD_EMBREE_TEST_ECS(${testname} ${executable}")
if (inputfile)
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" inputfile "${inputfile}")
if (inputtype STREQUAL "-c")
SET(testcall "${testcall} \n ECS ${inputfile}")
elseif (inputtype STREQUAL "-i")
SET(testcall "${testcall} \n XML ${inputfile}")
endif()
endif()
if (no_reference)
SET(testcall "${testcall} \n NO_REFERENCE")
else()
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" referencefile "${referencefile}")
SET(testcall "${testcall} \n REFERENCE ${referencefile}")
endif()
SET(testcall "${testcall} \n INTENSITY ${intensity}")
if (${memcheck})
SET(testcall "${testcall} \n MEMCHECK")
endif()
if (${no_cpp})
SET(testcall "${testcall} \n NO_CPP")
endif()
if (${no_ispc})
SET(testcall "${testcall} \n NO_ISPC")
endif()
if (${no_sycl})
SET(testcall "${testcall} \n NO_SYCL")
endif()
if (${no_postfix})
SET(testcall "${testcall} \n NO_POSTFIX")
endif()
STRING(REPLACE "${PROJECT_SOURCE_DIR}/" "" conditionsfile "${conditionsfile}")
SET(testcall "${testcall} \n CONDITION_FILE ${conditionsfile}")
SET(testcall "${testcall} \n CONDITION ")
foreach(c ${conditions})
SET(testcall "${testcall} \"${c}\"")
endforeach()
SET(testcall "${testcall} \n ARGS ")
foreach(a ${extraargs})
SET(testcall "${testcall} ${a}")
endforeach()
SET(testcall "${testcall})\n\n")
file(APPEND "${EMBREE_INSTALL_CTESTTESTFILE}" "${testcall}")
endif()
ENDFUNCTION()
else()
FUNCTION(ADD_EMBREE_TEST_ECS testname executable)
ENDFUNCTION()
FUNCTION(ADD_EMBREE_GENERIC_TEST testname executable)
ENDFUNCTION()
FUNCTION(ADD_EMBREE_GENERIC_CPP_TEST testname executable)
ENDFUNCTION()
FUNCTION(ADD_EMBREE_GENERIC_SYCL_TEST testname executable)
ENDFUNCTION()
FUNCTION(ADD_EMBREE_GENERIC_ISPC_TEST testname executable)
ENDFUNCTION()
FUNCTION(SET_EMBREE_TEST_PROPERTIES testname)
ENDFUNCTION()
endif()
ENDIF()
+13 -9
View File
@@ -3,6 +3,10 @@
#pragma once
#if !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif
#include "../sys/platform.h"
#include "../sys/ref.h"
#include "../sys/filename.h"
@@ -122,16 +126,17 @@ namespace embree
class FileStream : public Stream<int>
{
public:
FileStream (FILE* file, const std::string& name = "file")
: file(file), lineNumber(1), colNumber(0), charNumber(0), name(std::shared_ptr<std::string>(new std::string(name))) {}
FileStream (const FileName& fileName)
: lineNumber(1), colNumber(0), charNumber(0), name(std::shared_ptr<std::string>(new std::string(fileName.str())))
{
if (ifs) ifs.close();
ifs.open(fileName.str());
if (!ifs.is_open()) THROW_RUNTIME_ERROR("cannot open file " + fileName.str());
}
~FileStream() {
if (ifs) ifs.close();
file = fopen(fileName.c_str(),"r");
if (file == nullptr) THROW_RUNTIME_ERROR("cannot open file " + fileName.str());
}
~FileStream() { if (file) fclose(file); }
public:
ParseLocation location() {
@@ -139,15 +144,14 @@ namespace embree
}
int next() {
int c = ifs.get();
int c = fgetc(file);
if (c == '\n') { lineNumber++; colNumber = 0; } else if (c != '\r') colNumber++;
charNumber++;
return c;
}
private:
std::ifstream ifs;
FILE* file;
ssize_t lineNumber; /// the line number the token is from
ssize_t colNumber; /// the character number in the current line
ssize_t charNumber; /// the character in the file
-3
View File
@@ -48,9 +48,6 @@ 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,6 +75,8 @@ 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::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 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 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); }
+2 -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::native::recip(a.x),sycl::native::recip(a.y),sycl::native::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 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::native::recip(a.x),sycl::native::recip(a.y),sycl::native::recip(a.z),sycl::native::recip(a.w)); }
__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 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); }
-2
View File
@@ -34,7 +34,6 @@ __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;
@@ -44,7 +43,6 @@ __forceinline void _mm_mfence()
{
__sync_synchronize();
}
*/
__forceinline __m128i _mm_load4epu8_epi32(__m128i *ptr)
{
+679 -2043
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((int32x4_t)v.v), _MN_SHUFFLE(i0, i1, i2, i3)));
return vreinterpretq_f32_u8(vqtbl1q_u8( vreinterpretq_u8_s32(v), _MN_SHUFFLE(i0, i1, i2, i3)));
}
template<int i0, int i1, int i2, int i3>
-11
View File
@@ -316,17 +316,6 @@ 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
////////////////////////////////////////////////////////////////////////////////
+3 -2
View File
@@ -48,8 +48,9 @@ namespace embree
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");
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;
}
+12
View File
@@ -35,6 +35,18 @@ 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,6 +20,9 @@ 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(v);
return SYCL_CTZ::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(v);
return SYCL_CTZ::ctz(v);
}
#else
+49 -20
View File
@@ -20,7 +20,6 @@
#include <cstring>
#include <stdint.h>
#include <functional>
#include <mutex>
#if defined(EMBREE_SYCL_SUPPORT)
@@ -34,6 +33,13 @@
#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__)
@@ -206,11 +212,15 @@
#define PRINT2(x,y) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << embree_endl
#define PRINT3(x,y,z) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << embree_endl
#define PRINT4(x,y,z,w) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << embree_endl
#define PRINT5(x,y,z,w,a) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << ", " << STRING(a) << " = " << (a) << embree_endl
#define PRINT6(x,y,z,w,a,b) embree_cout << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << ", " << STRING(a) << " = " << (a) << ", " << STRING(b) << " = " << (b) << embree_endl
#define UPRINT(x) embree_cout_uniform << STRING(x) << " = " << (x) << embree_endl
#define UPRINT2(x,y) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << embree_endl
#define UPRINT3(x,y,z) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << embree_endl
#define UPRINT4(x,y,z,w) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << embree_endl
#define UPRINT5(x,y,z,w,a) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << ", " << STRING(a) << " = " << (a) << embree_endl
#define UPRINT6(x,y,z,w,a,b) embree_cout_uniform << STRING(x) << " = " << (x) << ", " << STRING(y) << " = " << (y) << ", " << STRING(z) << " = " << (z) << ", " << STRING(w) << " = " << (w) << ", " << STRING(a) << " = " << (a) << ", " << STRING(b) << " = " << (b) << embree_endl
#if defined(DEBUG) // only report file and line in debug mode
#define THROW_RUNTIME_ERROR(str) \
@@ -355,43 +365,49 @@ __forceinline std::string toString(long long value) {
/// SYCL specific
////////////////////////////////////////////////////////////////////////////////
#if defined(__SYCL_DEVICE_ONLY__)
# define EMBREE_SYCL_SIMD(N) [[intel::reqd_sub_group_size(N)]]
#else
# define EMBREE_SYCL_SIMD(N)
#endif
#if defined(EMBREE_SYCL_SUPPORT) && defined(__SYCL_DEVICE_ONLY__)
#define sycl_printf0(format, ...) { \
static const CONSTANT char fmt[] = format; \
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true))) \
sycl::ext::oneapi::experimental::printf(fmt, __VA_ARGS__ ); \
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true))) \
SYCL_EXT_ONEAPI::experimental::printf(fmt, __VA_ARGS__ ); \
}
#define sycl_printf0_(format) { \
static const CONSTANT char fmt[] = format; \
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true))) \
sycl::ext::oneapi::experimental::printf(fmt); \
if (get_sub_group_local_id() == SYCL_CTZ::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__)
@@ -412,7 +428,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, int i)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%i",i);
}
else
@@ -424,18 +440,31 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, unsigned int i)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%u",i);
} else
sycl_printf("%u ",i);
return cout;
}
#if defined(__WIN32__) and defined(__INTEL_LLVM_COMPILER)
inline sycl_ostream_ operator <<(sycl_ostream_ cout, size_t i)
{
if (cout.uniform) {
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%i",i);
} else {
sycl_printf("%i ",i);
}
return cout;
}
#endif
inline sycl_ostream_ operator <<(sycl_ostream_ cout, float f)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%f",f);
} else
sycl_printf("%f ",f);
@@ -446,7 +475,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, double d)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%f",d);
} else
sycl_printf("%f ",d);
@@ -454,10 +483,10 @@ namespace embree
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, uint64_t l)
inline sycl_ostream_ operator <<(sycl_ostream_ cout, ulong l)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%lu",l);
} else
sycl_printf("%lu ",l);
@@ -468,7 +497,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, long l)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%l",l);
} else
sycl_printf("%l ",l);
@@ -480,7 +509,7 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, void* p)
{
if (cout.uniform) {
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%p",p);
} else
sycl_printf("%p ",p);
@@ -490,14 +519,14 @@ namespace embree
inline sycl_ostream_ operator <<(sycl_ostream_ cout, const char* c)
{
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf("%s",c);
return cout;
}
inline sycl_ostream_ operator <<(sycl_ostream_ cout, sycl_endl_)
{
if (get_sub_group_local_id() == sycl::ctz(intel_sub_group_ballot(true)))
if (get_sub_group_local_id() == SYCL_CTZ::ctz(intel_sub_group_ballot(true)))
sycl_printf_("\n");
return cout;
}
+65 -65
View File
@@ -20,16 +20,23 @@ using sycl::uint8;
using sycl::uint4;
using sycl::uint3;
using sycl::uint2;
using sycl::uint;
using sycl::ulong;
using sycl::uchar16;
using sycl::uchar8;
using sycl::uchar4;
using sycl::uchar3;
using sycl::uchar2;
using sycl::uchar;
using sycl::ushort16;
using sycl::ushort8;
using sycl::ushort4;
using sycl::ushort3;
using sycl::ushort2;
using sycl::ushort;
using sycl::fmax;
using sycl::fmin;
#ifdef __SYCL_DEVICE_ONLY__
#define GLOBAL __attribute__((opencl_global))
@@ -44,7 +51,7 @@ SYCL_EXTERNAL extern float atomic_min(volatile LOCAL float *p, float val);
SYCL_EXTERNAL extern float atomic_max(volatile GLOBAL float *p, float val);
SYCL_EXTERNAL extern float atomic_max(volatile LOCAL float *p, float val);
SYCL_EXTERNAL extern "C" unsigned int intel_sub_group_ballot(bool valid);
SYCL_EXTERNAL extern "C" uint intel_sub_group_ballot(bool valid);
SYCL_EXTERNAL extern "C" void __builtin_IB_assume_uniform(void *p);
@@ -84,32 +91,32 @@ SYCL_EXTERNAL extern "C" void __builtin_IB_assume_uniform(void *p);
///////////////////////////////////////////////////////////////////////
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_uchar_to_uint (const GLOBAL uint8_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D8U32
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_ushort_to_uint(const GLOBAL uint16_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D16U32
SYCL_EXTERNAL /* extern "C" */ uint32_t __builtin_IB_lsc_load_global_uint (const GLOBAL uint32_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V1
SYCL_EXTERNAL /* extern "C" */ sycl::uint2 __builtin_IB_lsc_load_global_uint2 (const GLOBAL sycl::uint2 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V2
SYCL_EXTERNAL /* extern "C" */ sycl::uint3 __builtin_IB_lsc_load_global_uint3 (const GLOBAL sycl::uint3 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V3
SYCL_EXTERNAL /* extern "C" */ sycl::uint4 __builtin_IB_lsc_load_global_uint4 (const GLOBAL sycl::uint4 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V4
SYCL_EXTERNAL /* extern "C" */ sycl::uint8 __builtin_IB_lsc_load_global_uint8 (const GLOBAL sycl::uint8 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V8
SYCL_EXTERNAL /* extern "C" */ uint64_t __builtin_IB_lsc_load_global_ulong (const GLOBAL uint64_t *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V1
SYCL_EXTERNAL /* extern "C" */ sycl::ulong2 __builtin_IB_lsc_load_global_ulong2 (const GLOBAL sycl::ulong2 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V2
SYCL_EXTERNAL /* extern "C" */ sycl::ulong3 __builtin_IB_lsc_load_global_ulong3 (const GLOBAL sycl::ulong3 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V3
SYCL_EXTERNAL /* extern "C" */ sycl::ulong4 __builtin_IB_lsc_load_global_ulong4 (const GLOBAL sycl::ulong4 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V4
SYCL_EXTERNAL /* extern "C" */ sycl::ulong8 __builtin_IB_lsc_load_global_ulong8 (const GLOBAL sycl::ulong8 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V8
SYCL_EXTERNAL /* extern "C" */ uint __builtin_IB_lsc_load_global_uchar_to_uint (const GLOBAL sycl::uchar *base, int elemOff, enum LSC_LDCC cacheOpt); //D8U32
SYCL_EXTERNAL /* extern "C" */ uint __builtin_IB_lsc_load_global_ushort_to_uint(const GLOBAL sycl::ushort *base, int elemOff, enum LSC_LDCC cacheOpt); //D16U32
SYCL_EXTERNAL /* extern "C" */ uint __builtin_IB_lsc_load_global_uint (const GLOBAL sycl::uint *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V1
SYCL_EXTERNAL /* extern "C" */ sycl::uint2 __builtin_IB_lsc_load_global_uint2 (const GLOBAL sycl::uint2 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V2
SYCL_EXTERNAL /* extern "C" */ sycl::uint3 __builtin_IB_lsc_load_global_uint3 (const GLOBAL sycl::uint3 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V3
SYCL_EXTERNAL /* extern "C" */ sycl::uint4 __builtin_IB_lsc_load_global_uint4 (const GLOBAL sycl::uint4 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V4
SYCL_EXTERNAL /* extern "C" */ sycl::uint8 __builtin_IB_lsc_load_global_uint8 (const GLOBAL sycl::uint8 *base, int elemOff, enum LSC_LDCC cacheOpt); //D32V8
SYCL_EXTERNAL /* extern "C" */ sycl::ulong __builtin_IB_lsc_load_global_ulong (const GLOBAL sycl::ulong *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V1
SYCL_EXTERNAL /* extern "C" */ sycl::ulong2 __builtin_IB_lsc_load_global_ulong2(const GLOBAL sycl::ulong2 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V2
SYCL_EXTERNAL /* extern "C" */ sycl::ulong3 __builtin_IB_lsc_load_global_ulong3(const GLOBAL sycl::ulong3 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V3
SYCL_EXTERNAL /* extern "C" */ sycl::ulong4 __builtin_IB_lsc_load_global_ulong4(const GLOBAL sycl::ulong4 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V4
SYCL_EXTERNAL /* extern "C" */ sycl::ulong8 __builtin_IB_lsc_load_global_ulong8(const GLOBAL sycl::ulong8 *base, int elemOff, enum LSC_LDCC cacheOpt); //D64V8
// global address space
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uchar_from_uint (GLOBAL uint8_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D8U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ushort_from_uint(GLOBAL uint16_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D16U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint (GLOBAL uint32_t *base, int immElemOff, uint32_t val, enum LSC_STCC cacheOpt); //D32V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint2 (GLOBAL sycl::uint2 *base, int immElemOff, sycl::uint2 val, enum LSC_STCC cacheOpt); //D32V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint3 (GLOBAL sycl::uint3 *base, int immElemOff, sycl::uint3 val, enum LSC_STCC cacheOpt); //D32V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint4 (GLOBAL sycl::uint4 *base, int immElemOff, sycl::uint4 val, enum LSC_STCC cacheOpt); //D32V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint8 (GLOBAL sycl::uint8 *base, int immElemOff, sycl::uint8 val, enum LSC_STCC cacheOpt); //D32V8
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong (GLOBAL uint64_t *base, int immElemOff, uint64_t val, enum LSC_STCC cacheOpt); //D64V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong2 (GLOBAL sycl::ulong2 *base, int immElemOff, sycl::ulong2 val, enum LSC_STCC cacheOpt); //D64V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong3 (GLOBAL sycl::ulong3 *base, int immElemOff, sycl::ulong3 val, enum LSC_STCC cacheOpt); //D64V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong4 (GLOBAL sycl::ulong4 *base, int immElemOff, sycl::ulong4 val, enum LSC_STCC cacheOpt); //D64V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong8 (GLOBAL sycl::ulong8 *base, int immElemOff, sycl::ulong8 val, enum LSC_STCC cacheOpt); //D64V8
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uchar_from_uint (GLOBAL sycl::uchar *base, int immElemOff, uint val, enum LSC_STCC cacheOpt); //D8U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ushort_from_uint(GLOBAL sycl::ushort *base, int immElemOff, uint val, enum LSC_STCC cacheOpt); //D16U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint (GLOBAL sycl::uint *base, int immElemOff, uint val, enum LSC_STCC cacheOpt); //D32V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint2 (GLOBAL sycl::uint2 *base, int immElemOff, sycl::uint2 val, enum LSC_STCC cacheOpt); //D32V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint3 (GLOBAL sycl::uint3 *base, int immElemOff, sycl::uint3 val, enum LSC_STCC cacheOpt); //D32V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint4 (GLOBAL sycl::uint4 *base, int immElemOff, sycl::uint4 val, enum LSC_STCC cacheOpt); //D32V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_uint8 (GLOBAL sycl::uint8 *base, int immElemOff, sycl::uint8 val, enum LSC_STCC cacheOpt); //D32V8
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong (GLOBAL sycl::ulong *base, int immElemOff, sycl::ulong val, enum LSC_STCC cacheOpt); //D64V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong2(GLOBAL sycl::ulong2 *base, int immElemOff, sycl::ulong2 val, enum LSC_STCC cacheOpt); //D64V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong3(GLOBAL sycl::ulong3 *base, int immElemOff, sycl::ulong3 val, enum LSC_STCC cacheOpt); //D64V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong4(GLOBAL sycl::ulong4 *base, int immElemOff, sycl::ulong4 val, enum LSC_STCC cacheOpt); //D64V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong8(GLOBAL sycl::ulong8 *base, int immElemOff, sycl::ulong8 val, enum LSC_STCC cacheOpt); //D64V8
///////////////////////////////////////////////////////////////////////
// prefetching
@@ -117,14 +124,14 @@ SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_store_global_ulong8 (G
//
// LSC Pre-Fetch Load functions with CacheControls
// global address space
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uchar (const GLOBAL uint8_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D8U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ushort(const GLOBAL uint16_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D16U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint (const GLOBAL uint32_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint2 (const GLOBAL sycl::uint2 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint3 (const GLOBAL sycl::uint3 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint4 (const GLOBAL sycl::uint4 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint8 (const GLOBAL sycl::uint8 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V8
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong (const GLOBAL uint64_t *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uchar (const GLOBAL sycl::uchar *base, int immElemOff, enum LSC_LDCC cacheOpt); //D8U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ushort(const GLOBAL sycl::ushort *base, int immElemOff, enum LSC_LDCC cacheOpt); //D16U32
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint (const GLOBAL sycl::uint *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint2 (const GLOBAL sycl::uint2 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint3 (const GLOBAL sycl::uint3 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint4 (const GLOBAL sycl::uint4 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V4
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_uint8 (const GLOBAL sycl::uint8 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D32V8
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong (const GLOBAL sycl::ulong *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V1
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong2(const GLOBAL sycl::ulong2 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V2
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong3(const GLOBAL sycl::ulong3 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V3
SYCL_EXTERNAL extern "C" void __builtin_IB_lsc_prefetch_global_ulong4(const GLOBAL sycl::ulong4 *base, int immElemOff, enum LSC_LDCC cacheOpt); //D64V4
@@ -143,14 +150,14 @@ inline float work_group_reduce_max(float x) { return x; }
inline float atomic_min(volatile float *p, float val) { return val; };
inline float atomic_max(volatile float *p, float val) { return val; };
inline uint32_t intel_sub_group_ballot(bool valid) { return 0; }
inline uint intel_sub_group_ballot(bool valid) { return 0; }
#endif
/* creates a temporary that is enforced to be uniform */
#define SYCL_UNIFORM_VAR(Ty,tmp,k) \
Ty tmp##_data; \
Ty* p##tmp##_data = (Ty*) sub_group_broadcast((uint64_t)&tmp##_data,k); \
Ty* p##tmp##_data = (Ty*) sub_group_broadcast((ulong)&tmp##_data,k); \
Ty& tmp = *p##tmp##_data;
#if !defined(__forceinline)
@@ -181,55 +188,48 @@ namespace embree
return sycl::select(b,a,mask);
}
#define XSTR(x) STR(x)
#define STR(x) #x
__forceinline const sycl::sub_group this_sub_group() {
#if __LIBSYCL_MAJOR_VERSION >= 8
return sycl::ext::oneapi::this_work_item::get_sub_group();
#else
return sycl::ext::oneapi::experimental::this_sub_group();
#endif
__forceinline const SYCL_EXT_ONEAPI::sub_group this_sub_group() {
return SYCL_EXPERIMENTAL::this_sub_group();
}
__forceinline const uint32_t get_sub_group_local_id() {
__forceinline const uint get_sub_group_local_id() {
return this_sub_group().get_local_id()[0];
}
__forceinline const uint32_t get_sub_group_size() {
__forceinline const uint get_sub_group_size() {
return this_sub_group().get_max_local_range().size();
}
__forceinline const uint32_t get_sub_group_id() {
__forceinline const uint get_sub_group_id() {
return this_sub_group().get_group_id()[0];
}
__forceinline const uint32_t get_num_sub_groups() {
__forceinline const uint get_num_sub_groups() {
return this_sub_group().get_group_range().size();
}
__forceinline uint32_t sub_group_ballot(bool pred) {
__forceinline uint sub_group_ballot(bool pred) {
return intel_sub_group_ballot(pred);
}
__forceinline bool sub_group_all_of(bool pred) {
return sycl::all_of_group(this_sub_group(),pred);
return SYCL_ONEAPI::all_of_group(this_sub_group(),pred);
}
__forceinline bool sub_group_any_of(bool pred) {
return sycl::any_of_group(this_sub_group(),pred);
return SYCL_ONEAPI::any_of_group(this_sub_group(),pred);
}
__forceinline bool sub_group_none_of(bool pred) {
return sycl::none_of_group(this_sub_group(),pred);
return SYCL_ONEAPI::none_of_group(this_sub_group(),pred);
}
template <typename T> __forceinline T sub_group_broadcast(T x, sycl::id<1> local_id) {
return sycl::group_broadcast<sycl::sub_group>(this_sub_group(),x,local_id);
return SYCL_SUBGROUP::group_broadcast<SYCL_EXT_ONEAPI::sub_group>(this_sub_group(),x,local_id);
}
template <typename T> __forceinline T sub_group_make_uniform(T x) {
return sub_group_broadcast(x,sycl::ctz(intel_sub_group_ballot(true)));
return sub_group_broadcast(x,SYCL_CTZ::ctz(intel_sub_group_ballot(true)));
}
__forceinline void assume_uniform_array(void* ptr) {
@@ -239,47 +239,47 @@ namespace embree
}
template <typename T, class BinaryOperation> __forceinline T sub_group_reduce(T x, BinaryOperation binary_op) {
return sycl::reduce_over_group<sycl::sub_group>(this_sub_group(),x,binary_op);
return SYCL_SUBGROUP::reduce_over_group<SYCL_EXT_ONEAPI::sub_group>(this_sub_group(),x,binary_op);
}
template <typename T, class BinaryOperation> __forceinline T sub_group_reduce(T x, T init, BinaryOperation binary_op) {
return sycl::reduce_over_group<sycl::sub_group>(this_sub_group(),x,init,binary_op);
return SYCL_SUBGROUP::reduce_over_group<SYCL_EXT_ONEAPI::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::exclusive_scan_over_group(this_sub_group(),x,binary_op);
return SYCL_SUBGROUP::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::exclusive_scan_over_group(this_sub_group(),x,init,binary_op);
return SYCL_SUBGROUP::exclusive_scan_over_group(this_sub_group(),x,init,binary_op);
}
template <typename T, class BinaryOperation> __forceinline T sub_group_inclusive_scan(T x, BinaryOperation binary_op) {
return sycl::inclusive_scan_over_group(this_sub_group(),x,binary_op);
return SYCL_SUBGROUP::inclusive_scan_over_group(this_sub_group(),x,binary_op);
}
template <typename T, class BinaryOperation> __forceinline T sub_group_inclusive_scan(T x, BinaryOperation binary_op, T init) {
return sycl::inclusive_scan_over_group(this_sub_group(),x,binary_op,init);
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) {
-13
View File
@@ -344,19 +344,6 @@ 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__)
+2 -4
View File
@@ -150,8 +150,7 @@ namespace embree
{
Lock<MutexSys> lock(g_mutex);
assert(newNumThreads);
if (newNumThreads == std::numeric_limits<size_t>::max())
newNumThreads = (size_t) getNumberOfLogicalThreads();
newNumThreads = min(newNumThreads, (size_t) getNumberOfLogicalThreads());
numThreads = newNumThreads;
if (!startThreads && !running) return;
@@ -231,8 +230,7 @@ namespace embree
TaskScheduler::TaskScheduler()
: threadCounter(0), anyTasksRunning(0), hasRootTask(false)
{
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.
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.
for (size_t i=0; i<threadLocal.size(); i++)
threadLocal[i].store(nullptr);
}
-1
View File
@@ -12,7 +12,6 @@ endif()
string(REGEX REPLACE "\n$" "" intelstyle_url "${intelstyle_url}")
string(REPLACE "embree" "intelstyle" intelstyle_url "${intelstyle_url}")
string(REPLACE "libraries" "documentation" intelstyle_url "${intelstyle_url}")
message(STATUS "Fetch intelstyle repository ${intelstyle_url}")
include(FetchContent)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

-19
View File
@@ -184,11 +184,6 @@
```
\pagebreak
## RTC_GEOMETRY_TYPE_INSTANCE_ARRAY
``` {include=src/api/RTC_GEOMETRY_TYPE_INSTANCE_ARRAY.md}
```
\pagebreak
## RTCCurveFlags
``` {include=src/api/RTCCurveFlags.md}
```
@@ -360,11 +355,6 @@
```
\pagebreak
## rtcSetGeometryInstancedScenes
``` {include=src/api/rtcSetGeometryInstancedScenes.md}
```
\pagebreak
## rtcSetGeometryTransform
``` {include=src/api/rtcSetGeometryTransform.md}
```
@@ -380,15 +370,6 @@
```
\pagebreak
## rtcGetGeometryTransformEx
``` {include=src/api/rtcGetGeometryTransformEx.md}
```
\pagebreak
## rtcGetGeometryTransformFromScene
``` {include=src/api/rtcGetGeometryTransformFromScene.md}
```
\pagebreak
## rtcSetGeometryTessellationRate
``` {include=src/api/rtcSetGeometryTessellationRate.md}
+16 -1
View File
@@ -117,7 +117,7 @@ e.g. just triangles in this example.
Inside the SYCL `parallel_for` loop you can use rendering related functions,
such as the `rtcIntersect1` and `rtcOccluded1` functions to trace rays,
`rtcForwardIntersect1/Ex` and `rtcForwardOccluded1/Ex` to continue object
`rtcForwardIntersect1` and `rtcForwardOccluded1` to continue object
traversal from inside a user geometry callback,
and `rtcGetGeometryUserDataFromScene` to get the user data pointer of some
geometry.
@@ -224,6 +224,21 @@ Embree SYCL Known Issues
quality, and GPU performance may not reflect that of the final
product.
- Currently only the following Intel® Arc™ GPUs are support:
- Intel® Arc™ A770 Graphics
- Intel® Arc™ A750 Graphics
- Intel® Arc™ A770M Graphics
- Intel® Arc™ A730M Graphics
- Intel® Arc™ A550M Graphics
- Intel® Data Center GPU Max Series is currently not supported.
- Ahead of time compilation is currently not working properly and you
will get this error during compilation:
llvm-foreach: Floating point exception (core dumped)
- Compilation with build configuration "debug" is currently not working on
Windows.
-6
View File
@@ -26,8 +26,6 @@
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
};
@@ -62,10 +60,6 @@ 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.
+8 -13
View File
@@ -39,8 +39,6 @@
RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR,
RTC_FORMAT_GRID,
RTC_FORMAT_QUATERNION_DECOMPOSITION
};
#### DESCRIPTION
@@ -60,16 +58,14 @@ 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. 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_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_GRID` is a special data format used to specify grid
primitives of layout RTCGrid when creating grid geometries
@@ -81,4 +77,3 @@ primitives of layout RTCGrid when creating grid geometries
[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer],
[rtcSetNewGeometryBuffer], [rtcSetGeometryTransform]
[RTCQuaternionDecomposition]
@@ -1,79 +0,0 @@
% 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]
+11 -23
View File
@@ -1,8 +1,8 @@
% rtcForwardIntersect1/Ex(3) | Embree Ray Tracing Kernels 4
% rtcForwardIntersect1(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcForwardIntersect1/Ex - forwards a single ray to new scene
rtcForwardIntersect1 - forwards a single ray to new scene
from user geometry callback
#### SYNOPSIS
@@ -16,23 +16,16 @@
unsigned int instID
);
void rtcForwardIntersect1Ex(
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay* ray,
unsigned int instID,
unsigned int instPrimID,
);
#### DESCRIPTION
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.
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.
Only the ray origin and ray direction members of the ray
argument are used for forwarding, all additional ray properties are
@@ -49,15 +42,10 @@ 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/Ex` functions must be used.
the `rtcForwardIntersect1` function must be used.
The ray structure must be aligned to 16 bytes.
+13 -46
View File
@@ -1,8 +1,8 @@
% rtcForwardIntersect4/8/16/Ex(3) | Embree Ray Tracing Kernels 4
% rtcForwardIntersect4/8/16(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcForwardIntersect4/8/16/Ex - forwards a ray packet to new scene
rtcForwardIntersect4/8/16 - forwards a ray packet to new scene
from user geometry callback
#### SYNOPSIS
@@ -17,11 +17,11 @@
unsigned int instID
);
void rtcForwardIntersect8(
void rtcForwardIntersect4(
void int* valid,
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay8* ray,
struct RTCRay4* ray,
unsigned int instID
);
@@ -30,47 +30,19 @@
const struct RTCIntersectFunctionNArguments* args,
RTCScene scene,
struct RTCRay16* ray,
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
unsigned int instID
);
#### DESCRIPTION
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.
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.
Only the ray origin and ray direction members of the ray
argument are used for forwarding, all additional ray properties are
@@ -87,11 +59,6 @@ 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
+11 -23
View File
@@ -1,8 +1,8 @@
% rtcForwardOccluded1/Ex(3) | Embree Ray Tracing Kernels 4
% rtcForwardOccluded1(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcForwardOccluded1/Ex - forwards a single ray to new scene
rtcForwardOccluded1 - forwards a single ray to new scene
from user geometry callback
#### SYNOPSIS
@@ -16,23 +16,16 @@
unsigned int instID
);
void rtcForwardOccluded1(
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay* ray,
unsigned int instID,
unsigned int instPrimID
);
#### DESCRIPTION
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.
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.
Only the ray origin and ray direction members of the ray
argument are used for forwarding, all additional ray properties are
@@ -49,15 +42,10 @@ 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/Ex` function must be used.
the `rtcForwardOccluded1` function must be used.
The ray structure must be aligned to 16 bytes.
+12 -44
View File
@@ -1,8 +1,8 @@
% rtcForwardOccluded4/8/16/Ex(3) | Embree Ray Tracing Kernels 4
% rtcForwardOccluded4/8/16(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcForwardOccluded4/8/16/Ex - forwards a ray packet to new scene
rtcForwardOccluded4/8/16 - forwards a ray packet to new scene
from user geometry callback
#### SYNOPSIS
@@ -17,11 +17,11 @@
unsigned int instID
);
void rtcForwardOccluded8(
void rtcForwardOccluded4(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay8* ray,
struct RTCRay4* ray,
unsigned int instID
);
@@ -33,43 +33,16 @@
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` 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.
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.
Only the ray origin and ray direction members of the ray
argument are used for forwarding, all additional ray properties are
@@ -86,11 +59,6 @@ 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
-8
View File
@@ -63,14 +63,6 @@ Possible properties to query are:
back face culling is enabled. This is only the case if Embree is
compiled with `EMBREE_BACKFACE_CULLING` enabled.
+ `RTC_DEVICE_PROPERTY_BACKFACE_CULLING_CURVES_ENABLED`: Queries whether
back face culling for curves is enabled. This is only the case if Embree is
compiled with `EMBREE_BACKFACE_CULLING_CURVES` enabled.
+ `RTC_DEVICE_PROPERTY_BACKFACE_CULLING_SPHERES_ENABLED`: Queries whether
back face culling for spheres is enabled. This is only the case if Embree is
compiled with `EMBREE_BACKFACE_CULLING_SPHERES` enabled.
+ `RTC_DEVICE_PROPERTY_COMPACT_POLYS_ENABLED`: Queries whether
compact polys is enabled. This is only the case if Embree is
compiled with `EMBREE_COMPACT_POLYS` enabled.
+1 -6
View File
@@ -35,11 +35,6 @@ Possible formats for the returned matrix are:
in column-major form as a 4×4 homogeneous matrix with last row equal
to (0, 0, 0, 1).
This function is supposed to be used during rendering, but only
supported on the CPU and not inside SYCL kernels on the GPU. Inside a
SYCL kernel the `rtcGetGeometryTransformFromScene` function has to get
used.
#### EXIT STATUS
On failure an error code is set that can be queried using
@@ -47,4 +42,4 @@ On failure an error code is set that can be queried using
#### SEE ALSO
[RTC_GEOMETRY_TYPE_INSTANCE], [rtcSetGeometryTransform], [rtcGetGeometryTransformFromScene]
[RTC_GEOMETRY_TYPE_INSTANCE], [rtcSetGeometryTransform]
-49
View File
@@ -1,49 +0,0 @@
% 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]
@@ -1,51 +0,0 @@
% rtcGetGeometryTransformFromScene(3) | Embree Ray Tracing Kernels 4
#### NAME
rtcGetGeometryTransformFromScene - returns the interpolated instance
transformation for the specified time
#### SYNOPSIS
#include <embree4/rtcore.h>
void rtcGetGeometryTransformFromScene(
RTCScene scene,
unsigned int geomID,
float time,
enum RTCFormat format,
void* xfm
);
#### DESCRIPTION
The `rtcGetGeometryTransformFromScene` function returns the
interpolated local to world transformation (`xfm` output parameter) of
an instance geometry specified by its geometry ID (`geomID` parameter)
of a scene (`scene` parameter) for a particular time (`time` parameter
in range $[0,1]$) in the specified format (`format` parameter).
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).
In contrast to the `rtcGetGeometryTransform` function, the
`rtcGetGeometryTransformFromScene` function can get used during
rendering inside a SYCL kernel.
#### EXIT STATUS
On failure an error code is set that can be queried using
`rtcGetDeviceError`.
#### SEE ALSO
[RTC_GEOMETRY_TYPE_INSTANCE], [rtcSetGeometryTransform], [rtcGetGeometryTransform]
+2 -4
View File
@@ -18,9 +18,7 @@ previously set with `rtcSetGeometryUserData`. When
`rtcSetGeometryUserData` was not called yet, `NULL` is returned.
This function is supposed to be used during rendering, but only
supported on the CPU and not inside SYCL kernels on the GPU. Inside a
SYCL kernel the `rtcGetGeometryUserDataFromScene` function has to get
used.
supported on the CPU and in SYCL on the GPU.
#### EXIT STATUS
@@ -29,4 +27,4 @@ On failure an error code is set that can be queried using
#### SEE ALSO
[rtcSetGeometryUserData], [rtcGetGeometryUserDataFromScene]
[rtcSetGeometryUserData]
@@ -18,9 +18,7 @@ pointer previously set with `rtcSetGeometryUserData` from the geometry
with index `geomID` from the specified scene `scene`. When
`rtcSetGeometryUserData` was not called yet, `NULL` is returned.
In contrast to the `rtcGetGeometryUserData` function, the
`rtcGetGeometryUserDataFromScene` function an get used during
rendering inside a SYCL kernel.
This function is supposed to be used during rendering.
#### EXIT STATUS
+4 -6
View File
@@ -33,8 +33,7 @@
RTC_GEOMETRY_TYPE_DISC_POINT,
RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT,
RTC_GEOMETRY_TYPE_USER,
RTC_GEOMETRY_TYPE_INSTANCE,
RTC_GEOMETRY_TYPE_INSTANCE_ARRAY,
RTC_GEOMETRY_TYPE_INSTANCE
};
RTCGeometry rtcNewGeometry(
@@ -65,9 +64,8 @@ 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`), instances
(`RTC_GEOMETRY_TYPE_INSTANCE`), and instance arrays
(`RTC_GEOMETRY_TYPE_INSTANCE_ARRAY`).
user-defined geometries (`RTC_GEOMETRY_TYPE_USER`), and instances
(`RTC_GEOMETRY_TYPE_INSTANCE`).
The types `RTC_GEOMETRY_TYPE_ROUND_BEZIER_CURVE`,
`RTC_GEOMETRY_TYPE_ROUND_BSPLINE_CURVE`, and
@@ -125,4 +123,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_INSTANCE_ARRAY]
[RTC_GEOMETRY_TYPE_USER], [RTC_GEOMETRY_TYPE_INSTANCE]
@@ -1,37 +0,0 @@
% 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]
@@ -70,11 +70,11 @@ ray and the potential hit are in object space.
The filter callback function has the task to check for each valid ray
whether it wants to accept or reject the corresponding hit. To reject
a hit, the filter callback function just has to write `0` to the
integer valid mask of the corresponding ray. To accept the hit, it
just has to leave the valid mask set to `-1`. When accepting a hit,
the filter function is further allowed to change the hit and decrease
the `tfar` value of the ray but it should not modify other ray data
nor any inactive components of the ray or hit.
integer valid mask of the corresponding ray. To accept the hit, it just
has to leave the valid mask set to `-1`. The filter function is further
allowed to change the hit and decrease the `tfar` value of the ray but
it should not modify other ray data nor any inactive components of the
ray or hit.
``` {include=src/api/inc/reorder_callback_intersect.md}
```
@@ -25,7 +25,7 @@ further invocations overwrite the previously set callback function.
Passing `NULL` as function pointer disables the registered callback
function.
The registered occlusion filter function is invoked for every hit
The registered intersection filter function is invoked for every hit
encountered during the `rtcOccluded`-type ray queries and can accept
or reject that hit. The feature can be used to define a silhouette for
a primitive and reject hits that are outside the silhouette. E.g. a
@@ -36,14 +36,6 @@ Please see the description of the
`rtcSetGeometryIntersectFilterFunction` for a description of the
filter callback function.
The `rtcOccluded`-type functions terminate traversal when a hit got
committed. As filter functions can only set the `tfar` distance of the
ray for a committed hit, the occlusion filter cannot influence the
`tfar` value of subsequent traversal, as that directly ends. For that
reason `rtcOccluded` and occlusion filters cannot get used to gather
the next n-hits, and `rtcIntersect` and intersection filters should
get used instead.
#### EXIT STATUS
On failure an error code is set that can be queried using
-37
View File
@@ -1,43 +1,6 @@
Version History
---------------
### 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 memony requirements in scenes
with large amounts of similar instances.
- Properly checks driver if L0 RTAS extension can get loaded.
- Added varying version of rtcGetGeometryTransform for ISPC.
- Fixed signature of RTCMemoryMonitorFunction for ISPC.
- Add support for ARM64 Windows platform in CMake.
### Embree 4.2.0
- SYCL version of Embree with GPU support is no longer in beta phase.
- Improved BVH build performance on many core machines for applications that oversubscribe threads.
- Added rtcGetGeometryTransformFromScene API function that can get used inside SYCL kernels.
- No longer linking to ze_loader in SYCL mode to avoid Intel(R) oneAPI Level Zero dependency
for CPU rendering.
- Releasing test package to test Embree.
### Embree 4.1.0
- Added support for Intel® Data Center GPU Max Series.
- Added ARM64 Linux support.
- Added EMBREE_BACKFACE_CULLING_SPHERES cmake option. The new cmake option defaults to OFF.
### Embree 4.0.1
- Improved performance for Tiger Lake, Comet Lake, Cannon Lake, Kaby Lake,
and Skylake client CPUs by using 256 bit SIMD instructions by default.
+57 -48
View File
@@ -17,21 +17,31 @@ C++11. Embree is tested with the following compilers:
Linux
- Intel® oneAPI DPC++/C++ Compiler 2024.0.2
- oneAPI DPC++/C++ Compiler 2023-10-26
- Intel® oneAPI DPC++/C++ Compiler 2023.0.0
- oneAPI DPC++/C++ Compiler 2022-12-14
- Clang 5.0.0
- Clang 4.0.0
- GCC 10.0.1 (Fedora 32) AVX512 support
- GCC 8.3.1 (Fedora 29) AVX512 support
- Intel® Implicit SPMD Program Compiler 1.22.0
- GCC 8.3.1 (Fedora 28) AVX512 support
- GCC 7.3.1 (Fedora 27) AVX2 support
- GCC 7.3.1 (Fedora 26) AVX2 support
- GCC 6.4.1 (Fedora 25) AVX2 support
- Intel® Implicit SPMD Program Compiler 1.18.1
- Intel® Implicit SPMD Program Compiler 1.17.0
- Intel® Implicit SPMD Program Compiler 1.16.1
- Intel® Implicit SPMD Program Compiler 1.15.0
- Intel® Implicit SPMD Program Compiler 1.14.1
- Intel® Implicit SPMD Program Compiler 1.13.0
- Intel® Implicit SPMD Program Compiler 1.12.0
macOS x86
macOS x86_64
- Intel® C++ Classic Compiler 2023.0.0
- Apple Clang 12.0.5 (macOS 11.7.1)
- Apple Clang 15
macOS M1
macOS Arm64
- Apple Clang 14
- Apple Clang 12.0.5 (macOS 11.7.1)
Embree supports using the Intel® Threading Building Blocks (TBB) as the
tasking system. For performance and flexibility reasons we recommend
@@ -54,7 +64,7 @@ version of [GLFW](https://www.glfw.org/) version 3.
Under macOS, all these dependencies can be installed
using [MacPorts](http://www.macports.org/):
sudo port install cmake tbb glfw-devel
sudo port install cmake tbb-devel glfw-devel
Depending on your Linux distribution you can install these dependencies
using `yum` or `apt-get`. Some of these packages might already be
@@ -131,21 +141,18 @@ The "oneAPI DPC++ Compiler" is more up-to-date than the "Intel(R) oneAPI
DPC++/C++ Compiler" but less stable. The current tested version of the "oneAPI
DPC++ compiler is
- [oneAPI DPC++ Compiler 2023-10-26](https://github.com/intel/llvm/releases/tag/nightly-2023-10-26)
- [oneAPI DPC++ Compiler 2022-12-14](https://github.com/intel/llvm/releases/download/sycl-nightly%2F20221214/dpcpp-compiler.tar.gz)
The compiler can be downloaded and simply extracted. The oneAPI DPC++ compiler
can be set up executing the following commands in a Linux (bash) shell:
2022-12-14 can be set up executing the following command in a Linux (bash)
shell:
export SYCL_BUNDLE_ROOT=path_to_dpcpp_compiler
export PATH=$SYCL_BUNDLE_ROOT/bin:$PATH
export CPATH=$SYCL_BUNDLE_ROOT/include:$CPATH
export LIBRARY_PATH=$SYCL_BUNDLE_ROOT/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$SYCL_BUNDLE_ROOT/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$SYCL_BUNDLE_ROOT/linux/lib/x64:$LD_LIBRARY_PATH
wget https://github.com/intel/llvm/releases/download/sycl-nightly%2F20221214/dpcpp-compiler.tar.gz
tar xzf dpcpp-compiler.tar.gz
source ./dpcpp_compiler/startup.sh
where the `path_to_dpcpp_compiler` should point to the unpacked oneAPI DPC++
compiler. This will put `clang++` and `clang` from the oneAPI DPC++ Compiler
into your path.
The `startup.sh` script will put `clang++` and `clang` from the
oneAPI DPC++ Compiler into your path.
Please also install all Linux packages described in the previous
section.
@@ -164,12 +171,12 @@ through `EMBREE_SYCL_SUPPORT=ON`.
Alternatively, you can download and run the installer of the
- [Intel(R) oneAPI DPC++/C++ Compiler](https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#dpcpp-cpp).
- [Intel(R) oneAPI DPC++/C++ Compiler 2023.0.0](https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#dpcpp-cpp).
After installation, you can set up the compiler by sourcing the
`vars.sh` script in the `env` directory of the compiler install directory, for example,
source /opt/intel/oneAPI/compiler/latest/env/vars.sh
source /opt/intel/oneAPI/compiler/2023.0.0/env/vars.sh
This script will put the `icpx` and `icx` compiler executables from the
Intel(R) oneAPI DPC++/C++ Compiler in your path.
@@ -203,23 +210,36 @@ your Intel Xe HPG/HPC GPUs from here
the driver installation instructions for your graphics card and
operating system.
After installing the drivers you have to install an additional package
manually using
We tested Embree with the latest GPGPU driver Devel Release from
20220809. The Intel(R) Graphics Compute Runtime for oneAPI Level Zero
and OpenCL(TM) Driver from that release is too old for Embree to work
properly. Thus if no newer version of the GPGPU driver is available,
you need to additionally install the latest compute runtime from here
[22.43.24595](https://github.com/intel/compute-runtime/releases/tag/22.43.24595.30).
sudo apt install intel-level-zero-gpu-raytracing
Unfortunately, these compute runtime packages are only available for
Ubuntu 22.04. You can also install a newer version of the compute
runtime if available.
Windows
-------
Embree is tested using the following compilers under Windows:
- Intel® oneAPI DPC++/C++ Compiler 2024.0.2
- oneAPI DPC++/C++ Compiler 2023-10-26
- Visual Studio 2022
- Intel® oneAPI DPC++/C++ Compiler 2023.0.0
- oneAPI DPC++/C++ Compiler 2022-12-14
- Visual Studio 2019
- Visual Studio 2017
- Intel® Implicit SPMD Program Compiler 1.22.0
- Visual Studio 2015 (Update\ 1)
- Intel® Implicit SPMD Program Compiler 1.18.1
- Intel® Implicit SPMD Program Compiler 1.17.0
- Intel® Implicit SPMD Program Compiler 1.16.1
- Intel® Implicit SPMD Program Compiler 1.15.0
- Intel® Implicit SPMD Program Compiler 1.14.1
- Intel® Implicit SPMD Program Compiler 1.13.0
- Intel® Implicit SPMD Program Compiler 1.12.0
To compile Embree for AVX-512 you have to use the Intel® Compiler.
@@ -336,7 +356,7 @@ The "oneAPI DPC++ Compiler" is more up-to-date than the "Intel(R) oneAPI
DPC++/C++ Compiler" but less stable. The current tested version of the oneAPI
DPC++ compiler is
- [oneAPI DPC++ Compiler 2023-10-26](https://github.com/intel/llvm/releases/tag/nightly-2023-10-26)
- [oneAPI DPC++ Compiler 2022-12-14](https://github.com/intel/llvm/releases/download/sycl-nightly%2F20221214/dpcpp-compiler-win.tar.gz)
Download and unpack the archive and open the "x64 Native Tools Command Prompt"
of Visual Studio and execute the following lines to properly configure the
@@ -375,13 +395,13 @@ option.
Alternatively, you can download and run the installer of the
- [Intel(R) oneAPI DPC++/C++ Compiler](https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#dpcpp-cpp).
- [Intel(R) oneAPI DPC++/C++ Compiler 2023.0.0](https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#dpcpp-cpp).
After installation, you can either open a regular `Command Prompt` and execute
the `vars.bat` script in the `env` directory of the compiler install directory,
for example
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat
C:\Program Files (x86)\Intel\oneAPI\compiler\2023.0.0\env\vars.bat
or simply open the installed "Intel oneAPI command prompt for Intel 64 for Visual Studio".
@@ -422,9 +442,9 @@ your application with such an Embree package.
### Windows Graphics Driver Installation
In order to run the SYCL tutorials on HPG hardware, you first need to
install the graphics drivers for your graphics card from
[https://www.intel.com](https://www.intel.com). Please make sure to
have installed version 31.0.101.4644 or newer.
install the proper graphics drivers for your graphics card from
[https://www.intel.com](https://www.intel.com). Embree will work with
graphics driver version 101.4027 or later.
CMake Configuration
@@ -493,14 +513,6 @@ parameters that can be configured in CMake:
surfaces facing a ray can be hit. This option is turned OFF by
default.
+ `EMBREE_BACKFACE_CULLING_CURVES`: Enables backface culling for curves,
i.e. only surfaces facing a ray can be hit. This option is turned OFF
by default.
+ `EMBREE_BACKFACE_CULLING_SPHERES`: Enables backface culling for spheres,
i.e. only surfaces facing a ray can be hit. This option is turned OFF
by default.
+ `EMBREE_COMPACT_POLYS`: Enables compact tris/quads, i.e. only
geomIDs and primIDs are stored inside the leaf nodes.
@@ -578,9 +590,6 @@ parameters that can be configured in CMake:
+ `EMBREE_GEOMETRY_INSTANCE`: Enables support for instances (ON by
default).
+ `EMBREE_GEOMETRY_INSTANCE_ARRAY`: Enables support for instance arrays (ON by
default).
+ `EMBREE_GEOMETRY_USER`: Enables support for user-defined geometries
(ON by default).
+2 -2
View File
@@ -1,9 +1,9 @@
Downloading Embree
------------------
For Windows we provide Embree as a ZIP file:
For Windows we provide Embree as ZIP files linked against the Visual Studio 2015/2017 (VC14) runtime:
[embree-<EMBREE_VERSION>.x64.windows.zip](https://github.com/embree/embree/releases/download/v<EMBREE_VERSION>/embree-<EMBREE_VERSION>.x64.windows.zip)
[embree-<EMBREE_VERSION>.x64.vc14.windows.zip](https://github.com/embree/embree/releases/download/v<EMBREE_VERSION>/embree-<EMBREE_VERSION>.x64.vc14.windows.zip)
For Linux we provide Embree as a `tar.gz` file:
-1
View File
@@ -6,7 +6,6 @@
[imgUserGeometry]: images/user_geometry.jpg
[imgViewer]: images/viewer.jpg
[imgInstancedGeometry]: images/instanced_geometry.jpg
[imgForest]: images/forest.jpg
[imgMultiLevelInstancing]: images/multi_level_instancing.jpg
[imgIntersectionFilter]: images/intersection_filter.jpg
[imgPathtracer]: images/pathtracer.jpg
-1
View File
@@ -6,7 +6,6 @@
[imgUserGeometry]: https://embree.github.io/images/user_geometry.jpg
[imgViewer]: https://embree.github.io/images/viewer.jpg
[imgInstancedGeometry]: https://embree.github.io/images/instanced_geometry.jpg
[imgForest]: https://embree.github.io/images/forest.jpg
[imgMultiLevelInstancing]: https://embree.github.io/images/multi_level_instancing.jpg
[imgIntersectionFilter]: https://embree.github.io/images/intersection_filter.jpg
[imgPathtracer]: https://embree.github.io/images/pathtracer.jpg
+3 -20
View File
@@ -5,8 +5,8 @@ Installation of Embree
Windows Installation
--------------------
A pre-built version of Embree for Windows is provided as a ZIP archive
[embree-<EMBREE_VERSION>.x64.windows.zip](https://github.com/embree/embree/releases/download/v<EMBREE_VERSION>/embree-<EMBREE_VERSION>.x64.windows.zip). After
Embree linked against Visual Studio 2015 are provided as a ZIP file
[embree-<EMBREE_VERSION>.x64.vc14.windows.zip](https://github.com/embree/embree/releases/download/v<EMBREE_VERSION>/embree-<EMBREE_VERSION>.x64.vc14.windows.zip). After
unpacking this ZIP file, you should set the path to the `lib` folder
manually to your `PATH` environment variable for applications to find
Embree.
@@ -15,7 +15,7 @@ Embree.
Linux Installation
------------------
A pre-built version of Embree for Linux is provided as a `tar.gz` archive:
The Linux version of Embree is also delivered as a `tar.gz` file:
[embree-<EMBREE_VERSION>.x86_64.linux.tar.gz](https://github.com/embree/embree/releases/download/v<EMBREE_VERSION>/embree-<EMBREE_VERSION>.x86_64.linux.tar.gz). Unpack
this file using `tar` and source the provided `embree-vars.sh` (if you
are using the bash shell) or `embree-vars.csh` (if you are using the C
@@ -155,20 +155,3 @@ help of the device option in ocloc tool:
ocloc compile --help
Building Embree Tests
---------------------
Embree is released with a bundle of tests in an optional testing package.
To run these tests extract the testing package in the same folder as your embree installation.
e.g.:
tar -xzf embree-<EMBREE_VERSION>-testing.zip -C /path/to/installed/embree
The tests are extracted into a new folder inside you embree installation and can be run with:
cd /path/to/installed/embree/testing
cmake -B build
cmake --build build target=tests
-1
View File
@@ -7,7 +7,6 @@
[Stream Viewer]: #stream-viewer
[User Geometry]: #user-geometry
[Instanced Geometry]: #instanced-geometry
[Instance Array Geometry]: #instance-array-geometry
[Multi Level Instancing]: #multi-level-instancing
[Intersection Filter]: #intersection-filter
[Hair]: #hair
-1
View File
@@ -7,7 +7,6 @@
[Stream Viewer]: tutorials.html#stream-viewer
[User Geometry]: tutorials.html#user-geometry
[Instanced Geometry]: tutorials.html#instanced-geometry
[Instance Array Geometry]: tutorials.html#instance-array-geometry
[Multi Level Instancing]: tutorials.html#multi-level-instancing
[Intersection Filter]: tutorials.html#intersection-filter
[Hair]: tutorials.html#hair
+2 -2
View File
@@ -4,8 +4,8 @@ Intel® Embree Overview
Intel® Embree is a high-performance ray tracing library developed at
Intel, which is released as open source under the [Apache 2.0
license](http://www.apache.org/licenses/LICENSE-2.0). Intel® Embree
supports x86 CPUs under Linux, macOS, and Windows; ARM CPUs on Linux
and macOS; as well as Intel® GPUs under Linux and Windows.
supports x86 CPUs under Linux, macOS, and Windows; ARM CPUs on macOS;
as well as Intel® GPUs under Linux and Windows.
Intel® Embree targets graphics application developers to improve the
performance of photo-realistic rendering applications. Embree is
+12 -2
View File
@@ -3,14 +3,24 @@ Supported Platforms
Embree supports Windows (32-bit and 64-bit), Linux (64-bit), and macOS
(64-bit). Under Windows, Linux and macOS x86 based CPUs are supported,
while ARM CPUs are currently only supported under Linux and macOS (e.g.
Apple M1). ARM support for Windows experimental.
while ARM CPUs are currently only supported under macOS (e.g. Apple
M1). ARM support for Windows and Linux is experimental.
Embree supports Intel GPUs based on the Xe HPG microarchitecture
(Intel® Arc™ GPU) under Linux and Windows and Xe HPC microarchitecture
(Intel® Data Center GPU Flex Series and Intel® Data Center GPU Max
Series) under Linux.
Currently the following products are supported and further products
will get enabled soon:
- Intel® Arc™ A770 Graphics
- Intel® Arc™ A750 Graphics
- Intel® Arc™ A770M Graphics
- Intel® Arc™ A730M Graphics
- Intel® Arc™ A550M Graphics
- Intel® Data Center GPU Flex 170
The code compiles with the Intel® Compiler, Intel® oneAPI DPC++
Compiler, GCC, Clang, and the Microsoft Compiler. To use Embree on the
GPU the Intel® oneAPI DPC++ Compiler must be used. Please see section
-19
View File
@@ -199,25 +199,6 @@ ways can be distinguished.
[Source Code](https://github.com/embree/embree/blob/master/tutorials/instanced_geometry/instanced_geometry_device.cpp)
Instance Array Geometry
----------------------
[![][imgForest]](https://github.com/embree/embree/blob/master/tutorials/forest/forest_device.cpp)
This tutorial demonstrates the usage of instance arrays in Embree. Instance arrays
are large collections of similar objects. Examples are sand dunes that consist
of millions of instances of a few grain models or, like here, a forest consisting of
many instances of a few tree models.
In this application can switch between representing the scene with regular
instances or (one!) instance array. It also prints several stats, that
demonstrate the memory savings and faster BVH build times when using instance
arrays for such scenes. Instance arrays come with a small overhead on CPU and
should be preferred if memory consumption is more important than raytracing
performance.
[Source Code](https://github.com/embree/embree/blob/master/tutorials/forest/forest_device.cpp)
Multi Level Instancing
----------------------
-2
View File
@@ -27,8 +27,6 @@ enum RTCBufferType
RTC_BUFFER_TYPE_VERTEX_CREASE_WEIGHT = 21,
RTC_BUFFER_TYPE_HOLE = 22,
RTC_BUFFER_TYPE_TRANSFORM = 23,
RTC_BUFFER_TYPE_FLAGS = 32
};
-2
View File
@@ -26,8 +26,6 @@ enum RTCBufferType
RTC_BUFFER_TYPE_VERTEX_CREASE_WEIGHT = 21,
RTC_BUFFER_TYPE_HOLE = 22,
RTC_BUFFER_TYPE_TRANSFORM = 23,
RTC_BUFFER_TYPE_FLAGS = 32
};
+4 -28
View File
@@ -147,9 +147,7 @@ enum RTCFormat
RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR = 0x9244,
/* special 12-byte format for grids */
RTC_FORMAT_GRID = 0xA001,
RTC_FORMAT_QUATERNION_DECOMPOSITION = 0xB001,
RTC_FORMAT_GRID = 0xA001
};
/* Build quality levels */
@@ -292,8 +290,6 @@ enum RTCFeatureFlags
RTC_FEATURE_FLAG_32_BIT_RAY_MASK = 1 << 28,
RTC_FEATURE_FLAG_INSTANCE_ARRAY = 1 << 29,
RTC_FEATURE_FLAG_ALL = 0xffffffff,
};
@@ -338,26 +334,19 @@ struct RTCRayQueryContext
unsigned int instStackSize; // Number of instances currently on the stack.
#endif
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // The current stack of instance ids.
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // The current stack of instance primitive ids.
#endif
};
/* Initializes an ray query context. */
RTC_FORCEINLINE void rtcInitRayQueryContext(struct RTCRayQueryContext* context)
{
unsigned l = 0;
#if RTC_MAX_INSTANCE_LEVEL_COUNT > 1
context->instStackSize = 0;
#endif
for (; l < RTC_MAX_INSTANCE_LEVEL_COUNT; ++l) {
for (; l < RTC_MAX_INSTANCE_LEVEL_COUNT; ++l)
context->instID[l] = RTC_INVALID_GEOMETRY_ID;
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
context->instPrimID[l] = RTC_INVALID_GEOMETRY_ID;
#endif
}
}
/* Point query structure for closest point query */
@@ -415,11 +404,6 @@ struct RTC_ALIGN(16) RTCPointQueryContext
// instance ids.
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT];
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
// instance prim ids.
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT];
#endif
// number of instances currently on the stack.
unsigned int instStackSize;
};
@@ -427,16 +411,8 @@ struct RTC_ALIGN(16) RTCPointQueryContext
/* Initializes an ray query context. */
RTC_FORCEINLINE void rtcInitPointQueryContext(struct RTCPointQueryContext* context)
{
unsigned l = 0;
context->instStackSize = 0;
for (; l < RTC_MAX_INSTANCE_LEVEL_COUNT; ++l) {
context->instID[l] = RTC_INVALID_GEOMETRY_ID;
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
context->instPrimID[l] = RTC_INVALID_GEOMETRY_ID;
#endif
}
context->instID[0] = RTC_INVALID_GEOMETRY_ID;
}
struct RTC_ALIGN(16) RTCPointQueryFunctionArguments
+5 -23
View File
@@ -265,8 +265,6 @@ enum RTCFeatureFlags
RTC_FEATURE_FLAG_32_BIT_RAY_MASK = 1 << 28,
RTC_FEATURE_FLAG_INSTANCE_ARRAY = 1 << 29,
RTC_FEATURE_FLAG_ALL = 0xffffffff,
};
@@ -289,10 +287,6 @@ struct RTCRayQueryContext
unsigned int instStackSize; // Number of instances currently on the stack.
#endif
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // The current stack of instance ids.
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // The current stack of instance primitive ids.
#endif
};
/* Initializes an ray query context. */
@@ -304,12 +298,8 @@ RTC_FORCEINLINE void rtcInitRayQueryContext(uniform RTCRayQueryContext* uniform
context->instStackSize = 0;
#endif
for (; l < RTC_MAX_INSTANCE_LEVEL_COUNT; ++l) {
for (; l < RTC_MAX_INSTANCE_LEVEL_COUNT; ++l)
context->instID[l] = RTC_INVALID_GEOMETRY_ID;
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
context->instPrimID[l] = RTC_INVALID_GEOMETRY_ID;
#endif
}
}
/* Arguments for RTCFilterFunctionN */
@@ -372,22 +362,17 @@ struct RTCPointQueryContext
{
// accumulated 4x4 column major matrices from world space to instance space.
// undefined if size == 0.
float world2inst[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
float world2inst[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
// accumulated 4x4 column major matrices from instance space to world space.
// undefined if size == 0.
float inst2world[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
float inst2world[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
// instance ids.
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT];
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
// instance prim ids.
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT];
#endif
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT];
// number of instances currently on the stack.
unsigned int instStackSize;
unsigned int instStackSize;
};
/* Initializes an ray query context. */
@@ -395,9 +380,6 @@ RTC_FORCEINLINE void rtcInitPointQueryContext(uniform RTCPointQueryContext* unif
{
context->instStackSize = 0;
context->instID[0] = RTC_INVALID_GEOMETRY_ID;
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
context->instPrimID[0] = RTC_INVALID_GEOMETRY_ID;
#endif
}
struct RTCPointQueryFunctionArguments
+1 -5
View File
@@ -49,7 +49,6 @@ enum RTCDeviceProperty
RTC_DEVICE_PROPERTY_NATIVE_RAY8_SUPPORTED = 33,
RTC_DEVICE_PROPERTY_NATIVE_RAY16_SUPPORTED = 34,
RTC_DEVICE_PROPERTY_BACKFACE_CULLING_SPHERES_ENABLED = 62,
RTC_DEVICE_PROPERTY_BACKFACE_CULLING_CURVES_ENABLED = 63,
RTC_DEVICE_PROPERTY_RAY_MASK_SUPPORTED = 64,
RTC_DEVICE_PROPERTY_BACKFACE_CULLING_ENABLED = 65,
@@ -66,10 +65,7 @@ enum RTCDeviceProperty
RTC_DEVICE_PROPERTY_TASKING_SYSTEM = 128,
RTC_DEVICE_PROPERTY_JOIN_COMMIT_SUPPORTED = 129,
RTC_DEVICE_PROPERTY_PARALLEL_COMMIT_SUPPORTED = 130,
RTC_DEVICE_PROPERTY_CPU_DEVICE = 140,
RTC_DEVICE_PROPERTY_SYCL_DEVICE = 141
RTC_DEVICE_PROPERTY_PARALLEL_COMMIT_SUPPORTED = 130
};
/* Gets a device property. */
+1 -1
View File
@@ -76,7 +76,7 @@ typedef unmasked void (*uniform RTCErrorFunction)(void* uniform userPtr, uniform
RTC_API void rtcSetDeviceErrorFunction(RTCDevice device, uniform RTCErrorFunction error, void* uniform userPtr);
/* Memory monitor callback function */
typedef unmasked uniform bool (*uniform RTCMemoryMonitorFunction)(void* uniform ptr, uniform intptr_t bytes, uniform bool post);
typedef uniform bool (*uniform RTCMemoryMonitorFunction)(uniform intptr_t bytes, uniform bool post);
/* Sets the memory monitor callback function. */
RTC_API void rtcSetDeviceMemoryMonitorFunction(RTCDevice device, RTCMemoryMonitorFunction memoryMonitor, void* uniform userPtr);
+1 -11
View File
@@ -48,8 +48,7 @@ enum RTCGeometryType
RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE = 60, // flat normal-oriented Catmull-Rom curves
RTC_GEOMETRY_TYPE_USER = 120, // user-defined geometry
RTC_GEOMETRY_TYPE_INSTANCE = 121, // scene instance
RTC_GEOMETRY_TYPE_INSTANCE_ARRAY = 122, // scene instance array
RTC_GEOMETRY_TYPE_INSTANCE = 121 // scene instance
};
/* Interpolation modes for subdivision surfaces */
@@ -220,9 +219,6 @@ RTC_SYCL_API void rtcInvokeOccludedFilterFromGeometry(const struct RTCOccludedFu
/* Sets the instanced scene of an instance geometry. */
RTC_API void rtcSetGeometryInstancedScene(RTCGeometry geometry, RTCScene scene);
/* Sets the instanced scenes of an instance array geometry. */
RTC_API void rtcSetGeometryInstancedScenes(RTCGeometry geometry, RTCScene* scenes, size_t numScenes);
/* Sets the transformation of an instance for the specified time step. */
RTC_API void rtcSetGeometryTransform(RTCGeometry geometry, unsigned int timeStep, enum RTCFormat format, const void* xfm);
@@ -232,12 +228,6 @@ RTC_API void rtcSetGeometryTransformQuaternion(RTCGeometry geometry, unsigned in
/* Returns the interpolated transformation of an instance for the specified time. */
RTC_API void rtcGetGeometryTransform(RTCGeometry geometry, float time, enum RTCFormat format, void* xfm);
/*
* Returns the interpolated transformation of the instPrimID'th instance of an
* instance array for the specified time. If geometry is an regular instance,
* instPrimID must be 0.
*/
RTC_API void rtcGetGeometryTransformEx(RTCGeometry geometry, unsigned int instPrimID, float time, enum RTCFormat format, void* xfm);
/* Sets the uniform tessellation rate of the geometry. */
RTC_API void rtcSetGeometryTessellationRate(RTCGeometry geometry, float tessellationRate);
+1 -52
View File
@@ -47,8 +47,7 @@ enum RTCGeometryType
RTC_GEOMETRY_TYPE_NORMAL_ORIENTED_CATMULL_ROM_CURVE = 60, // flat normal-oriented Catmull-Rom curves
RTC_GEOMETRY_TYPE_USER = 120, // user-defined geometry
RTC_GEOMETRY_TYPE_INSTANCE = 121, // scene instance
RTC_GEOMETRY_TYPE_INSTANCE_ARRAY = 122 // scene instance
RTC_GEOMETRY_TYPE_INSTANCE = 121 // scene instance
};
/* Interpolation modes for subdivision surfaces */
@@ -226,9 +225,6 @@ RTC_API void rtcInvokeOccludedFilterFromGeometry(const uniform struct RTCOcclude
/* Sets the instanced scene of an instance geometry. */
RTC_API void rtcSetGeometryInstancedScene(RTCGeometry geometry, RTCScene scene);
/* Sets the instanced scene of an instance array geometry. */
RTC_API void rtcSetGeometryInstancedScenes(RTCGeometry geometry, uniform RTCScene* uniform scenes, uniform size_t numScenes);
/* Sets the transformation of an instance for the specified time step. */
RTC_API void rtcSetGeometryTransform(RTCGeometry geometry, uniform unsigned int timeStep, uniform RTCFormat format, const void* uniform xfm);
@@ -238,53 +234,6 @@ RTC_API void rtcSetGeometryTransformQuaternion(RTCGeometry geometry, uniform uns
/* Returns the interpolated transformation of an instance for the specified time. */
RTC_API void rtcGetGeometryTransform(RTCGeometry geometry, uniform float time, uniform RTCFormat format, void* uniform xfm);
/* Returns the interpolated transformation of an instance for the specified time. Varying version. */
inline void rtcGetGeometryTransform(RTCGeometry geometry, varying float time, uniform RTCFormat format, void* uniform xfm)
{
varying float vmatrix[12];
foreach_unique(utime in time)
{
uniform float umatrix[12];
rtcGetGeometryTransform(geometry,utime,RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR,umatrix);
for (int uniform j=0; j<12; j++) vmatrix[j] = umatrix[j];
}
/* store to desired layout */
varying float* vxfm = (varying float*) xfm;
switch (format)
{
case RTC_FORMAT_FLOAT3X4_ROW_MAJOR:
vxfm[ 0] = vmatrix[0]; vxfm[ 1] = vmatrix[3]; vxfm[ 2] = vmatrix[6]; vxfm[ 3] = vmatrix[9];
vxfm[ 4] = vmatrix[1]; vxfm[ 5] = vmatrix[4]; vxfm[ 6] = vmatrix[7]; vxfm[ 7] = vmatrix[10];
vxfm[ 8] = vmatrix[2]; vxfm[ 9] = vmatrix[5]; vxfm[10] = vmatrix[8]; vxfm[11] = vmatrix[11];
break;
case RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR:
vxfm[ 0] = vmatrix[0]; vxfm[ 1] = vmatrix[1]; vxfm[ 2] = vmatrix[2];
vxfm[ 3] = vmatrix[3]; vxfm[ 4] = vmatrix[4]; vxfm[ 5] = vmatrix[5];
vxfm[ 6] = vmatrix[6]; vxfm[ 7] = vmatrix[7]; vxfm[ 8] = vmatrix[8];
vxfm[ 9] = vmatrix[9]; vxfm[10] = vmatrix[10]; vxfm[11] = vmatrix[11];
break;
case RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR:
vxfm[ 0] = vmatrix[0]; vxfm[ 1] = vmatrix[1]; vxfm[ 2] = vmatrix[2]; vxfm[ 3] = 0.f;
vxfm[ 4] = vmatrix[3]; vxfm[ 5] = vmatrix[4]; vxfm[ 6] = vmatrix[5]; vxfm[ 7] = 0.f;
vxfm[ 8] = vmatrix[6]; vxfm[ 9] = vmatrix[7]; vxfm[10] = vmatrix[8]; vxfm[11] = 0.f;
vxfm[12] = vmatrix[9]; vxfm[13] = vmatrix[10]; vxfm[14] = vmatrix[11]; vxfm[15] = 1.f;
break;
default:
break;
}
}
/*
* Returns the interpolated transformation of the instPrimID'th instance of an
* instance array for the specified time. If geometry is an regular instance,
* instPrimID must be 0.
*/
RTC_API void rtcGetGeometryTransformEx(RTCGeometry geometry, uniform unsigned int instPrimID, uniform float time, uniform RTCFormat format, void* uniform xfm);
/* Sets the uniform tessellation rate of the geometry. */
RTC_API void rtcSetGeometryTessellationRate(RTCGeometry geometry, uniform float tessellationRate);
+10 -40
View File
@@ -39,9 +39,6 @@ struct RTC_ALIGN(16) RTCHit
unsigned int primID; // primitive ID
unsigned int geomID; // geometry ID
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // instance ID
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // instance primitive ID
#endif
};
/* Combined ray/hit structure for a single ray */
@@ -83,9 +80,6 @@ struct RTC_ALIGN(16) RTCHit4
unsigned int primID[4];
unsigned int geomID[4];
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT][4];
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT][4];
#endif
};
/* Combined ray/hit structure for a packet of 4 rays */
@@ -127,9 +121,6 @@ struct RTC_ALIGN(32) RTCHit8
unsigned int primID[8];
unsigned int geomID[8];
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT][8];
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT][8];
#endif
};
/* Combined ray/hit structure for a packet of 8 rays */
@@ -171,9 +162,6 @@ struct RTC_ALIGN(64) RTCHit16
unsigned int primID[16];
unsigned int geomID[16];
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT][16];
#endif
};
/* Combined ray/hit structure for a packet of 16 rays */
@@ -213,20 +201,17 @@ RTC_FORCEINLINE float& RTCHitN_Ng_z(RTCHitN* hit, unsigned int N, unsigned int i
RTC_FORCEINLINE float& RTCHitN_u(RTCHitN* hit, unsigned int N, unsigned int i) { return ((float*)hit)[3*N+i]; }
RTC_FORCEINLINE float& RTCHitN_v(RTCHitN* hit, unsigned int N, unsigned int i) { return ((float*)hit)[4*N+i]; }
RTC_FORCEINLINE unsigned int& RTCHitN_primID (RTCHitN* hit, unsigned int N, unsigned int i) { return ((unsigned*)hit)[5*N+i]; }
RTC_FORCEINLINE unsigned int& RTCHitN_geomID (RTCHitN* hit, unsigned int N, unsigned int i) { return ((unsigned*)hit)[6*N+i]; }
RTC_FORCEINLINE unsigned int& RTCHitN_instID (RTCHitN* hit, unsigned int N, unsigned int i, unsigned int l) { return ((unsigned*)hit)[7*N + N*l + i]; }
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
RTC_FORCEINLINE unsigned int& RTCHitN_instPrimID(RTCHitN* hit, unsigned int N, unsigned int i, unsigned int l) { return ((unsigned*)hit)[7*N + N*RTC_MAX_INSTANCE_LEVEL_COUNT + N*l + i]; }
#endif
RTC_FORCEINLINE unsigned int& RTCHitN_primID(RTCHitN* hit, unsigned int N, unsigned int i) { return ((unsigned*)hit)[5*N+i]; }
RTC_FORCEINLINE unsigned int& RTCHitN_geomID(RTCHitN* hit, unsigned int N, unsigned int i) { return ((unsigned*)hit)[6*N+i]; }
RTC_FORCEINLINE unsigned int& RTCHitN_instID(RTCHitN* hit, unsigned int N, unsigned int i, unsigned int l) { return ((unsigned*)hit)[7*N+i+N*l]; }
/* Helper functions to extract RTCRayN and RTCHitN from RTCRayHitN */
RTC_FORCEINLINE RTCRayN* RTCRayHitN_RayN(RTCRayHitN* rayhit, unsigned int N) { return (RTCRayN*)&((float*)rayhit)[0*N]; }
RTC_FORCEINLINE RTCHitN* RTCRayHitN_HitN(RTCRayHitN* rayhit, unsigned int N) { return (RTCHitN*)&((float*)rayhit)[12*N]; }
/* Helper structure for a ray packet of compile-time size N */
template<unsigned int N>
struct RTC_ALIGN((N && !(N & (N - 1)) ? (N * 4 > 16 ? N * 4 : 16) : 16)) RTCRayNt
template<int N>
struct RTCRayNt
{
float org_x[N];
float org_y[N];
@@ -245,8 +230,8 @@ struct RTC_ALIGN((N && !(N & (N - 1)) ? (N * 4 > 16 ? N * 4 : 16) : 16)) RTCRayN
};
/* Helper structure for a hit packet of compile-time size N */
template<unsigned int N>
struct RTC_ALIGN((N && !(N & (N - 1)) ? (N * 4 > 16 ? N * 4 : 16) : 16)) RTCHitNt
template<int N>
struct RTCHitNt
{
float Ng_x[N];
float Ng_y[N];
@@ -258,9 +243,6 @@ struct RTC_ALIGN((N && !(N & (N - 1)) ? (N * 4 > 16 ? N * 4 : 16) : 16)) RTCHitN
unsigned int primID[N];
unsigned int geomID[N];
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT][N];
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT][N];
#endif
};
/* Helper structure for a combined ray/hit packet of compile-time size N */
@@ -299,12 +281,8 @@ RTC_FORCEINLINE RTCHit rtcGetHitFromHitN(RTCHitN* hitN, unsigned int N, unsigned
hit.v = RTCHitN_v(hitN,N,i);
hit.primID = RTCHitN_primID(hitN,N,i);
hit.geomID = RTCHitN_geomID(hitN,N,i);
for (unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++) {
for (unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++)
hit.instID[l] = RTCHitN_instID(hitN,N,i,l);
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
hit.instPrimID[l] = RTCHitN_instPrimID(hitN,N,i,l);
#endif
}
return hit;
}
@@ -317,12 +295,8 @@ RTC_FORCEINLINE void rtcCopyHitToHitN(RTCHitN* hitN, const RTCHit* hit, unsigned
RTCHitN_v(hitN,N,i) = hit->v;
RTCHitN_primID(hitN,N,i) = hit->primID;
RTCHitN_geomID(hitN,N,i) = hit->geomID;
for (unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++) {
for (unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++)
RTCHitN_instID(hitN,N,i,l) = hit->instID[l];
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
RTCHitN_instPrimID(hitN,N,i,l) = hit->instPrimID[l];
#endif
}
}
RTC_FORCEINLINE RTCRayHit rtcGetRayHitFromRayHitN(RTCRayHitN* rayhitN, unsigned int N, unsigned int i)
@@ -351,12 +325,8 @@ RTC_FORCEINLINE RTCRayHit rtcGetRayHitFromRayHitN(RTCRayHitN* rayhitN, unsigned
rh.hit.v = RTCHitN_v(hit,N,i);
rh.hit.primID = RTCHitN_primID(hit,N,i);
rh.hit.geomID = RTCHitN_geomID(hit,N,i);
for (unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++) {
for (unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++)
rh.hit.instID[l] = RTCHitN_instID(hit,N,i,l);
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
rh.hit.instPrimID[l] = RTCHitN_instPrimID(hit,N,i,l);
#endif
}
return rh;
}
+3 -21
View File
@@ -38,9 +38,6 @@ struct RTC_ALIGN(16) RTCHit
unsigned int primID; // primitive ID
unsigned int geomID; // geometry ID
unsigned int instID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // instance ID
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
unsigned int instPrimID[RTC_MAX_INSTANCE_LEVEL_COUNT]; // instance prim ID
#endif
};
/* Combined ray/hit structure */
@@ -79,9 +76,6 @@ RTC_FORCEINLINE varying float& RTCHitN_v (const RTCHitN* uniform hit, uniform
RTC_FORCEINLINE varying unsigned int& RTCHitN_primID(const RTCHitN* uniform hit, uniform unsigned int N, uniform unsigned int i) { return *((varying unsigned int* uniform) &((unsigned int* uniform )hit)[5*N+i]); }
RTC_FORCEINLINE varying unsigned int& RTCHitN_geomID(const RTCHitN* uniform hit, uniform unsigned int N, uniform unsigned int i) { return *((varying unsigned int* uniform) &((unsigned int* uniform )hit)[6*N+i]); }
RTC_FORCEINLINE varying unsigned int& RTCHitN_instID(const RTCHitN* uniform hit, uniform unsigned int N, uniform unsigned int i, uniform unsigned int l) { return *((varying unsigned int* uniform) &((unsigned int* uniform )hit)[7*N+i+l*N]); }
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
RTC_FORCEINLINE varying unsigned int& RTCHitN_instPrimID(const RTCHitN* uniform hit, uniform unsigned int N, uniform unsigned int i, uniform unsigned int l) { return *((varying unsigned int* uniform) &((unsigned int* uniform )hit)[7*N + N*RTC_MAX_INSTANCE_LEVEL_COUNT + N*l + i]); }
#endif
/* Helper functions to extract RTCRayN and RTCHitN from RTCRayHitN */
RTC_FORCEINLINE RTCRayN* uniform RTCRayHitN_RayN(RTCRayHitN* uniform rayhit, uniform unsigned int N) { return (RTCRayN* uniform)&((uniform float* uniform)rayhit)[0*N]; }
@@ -115,12 +109,8 @@ RTC_FORCEINLINE RTCHit rtcGetHitFromHitN(RTCHitN* uniform hitN, uniform unsigned
hit.v = RTCHitN_v(hitN,N,i);
hit.primID = RTCHitN_primID(hitN,N,i);
hit.geomID = RTCHitN_geomID(hitN,N,i);
for (uniform unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++) {
for (uniform unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++)
hit.instID[l] = RTCHitN_instID(hitN,N,i,l);
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
hit.instPrimID[l] = RTCHitN_instPrimID(hitN,N,i,l);
#endif
}
return hit;
}
@@ -133,12 +123,8 @@ RTC_FORCEINLINE void rtcCopyHitToHitN(RTCHitN* uniform hitN, const varying RTCHi
RTCHitN_v(hitN,N,i) = hit->v;
RTCHitN_primID(hitN,N,i) = hit->primID;
RTCHitN_geomID(hitN,N,i) = hit->geomID;
for (uniform unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++) {
for (uniform unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++)
RTCHitN_instID(hitN,N,i,l) = hit->instID[l];
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
RTCHitN_instPrimID(hitN,N,i,l) = hit->instPrimID[l];
#endif
}
}
RTC_FORCEINLINE RTCRayHit rtcGetRayHitFromRayHitN(RTCRayHitN* uniform rayhitN, uniform unsigned int N, uniform unsigned int i)
@@ -167,12 +153,8 @@ RTC_FORCEINLINE RTCRayHit rtcGetRayHitFromRayHitN(RTCRayHitN* uniform rayhitN, u
rh.hit.v = RTCHitN_v(hit,N,i);
rh.hit.primID = RTCHitN_primID(hit,N,i);
rh.hit.geomID = RTCHitN_geomID(hit,N,i);
for (uniform unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++) {
for (uniform unsigned int l = 0; l < RTC_MAX_INSTANCE_LEVEL_COUNT; l++)
rh.hit.instID[l] = RTCHitN_instID(hit,N,i,l);
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
rh.hit.instPrimID[l] = RTCHitN_instPrimID(hit,N,i,l);
#endif
}
return rh;
}
+5 -33
View File
@@ -16,12 +16,11 @@ struct RTCRayHit16;
/* Scene flags */
enum RTCSceneFlags
{
RTC_SCENE_FLAG_NONE = 0,
RTC_SCENE_FLAG_DYNAMIC = (1 << 0),
RTC_SCENE_FLAG_COMPACT = (1 << 1),
RTC_SCENE_FLAG_ROBUST = (1 << 2),
RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS = (1 << 3),
RTC_SCENE_FLAG_PREFETCH_USM_SHARED_ON_GPU = (1 << 4),
RTC_SCENE_FLAG_NONE = 0,
RTC_SCENE_FLAG_DYNAMIC = (1 << 0),
RTC_SCENE_FLAG_COMPACT = (1 << 1),
RTC_SCENE_FLAG_ROBUST = (1 << 2),
RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS = (1 << 3)
};
/* Additional arguments for rtcIntersect1/4/8/16 calls */
@@ -111,9 +110,6 @@ RTC_API RTCGeometry rtcGetGeometryThreadSafe(RTCScene scene, unsigned int geomID
/* Gets the user-defined data pointer of the geometry. This function is not thread safe and should get used during rendering. */
RTC_SYCL_API void* rtcGetGeometryUserDataFromScene(RTCScene scene, unsigned int geomID);
/* Returns the interpolated transformation of an instance for the specified time. */
RTC_SYCL_API void rtcGetGeometryTransformFromScene(RTCScene scene, unsigned int geomID, float time, enum RTCFormat format, void* xfm);
/* Commits the scene. */
RTC_API void rtcCommitScene(RTCScene scene);
@@ -173,27 +169,15 @@ RTC_API void rtcIntersect16(const int* valid, RTCScene scene, struct RTCRayHit16
/* Forwards ray inside user geometry callback. */
RTC_SYCL_API void rtcForwardIntersect1(const struct RTCIntersectFunctionNArguments* args, RTCScene scene, struct RTCRay* ray, unsigned int instID);
/* Forwards ray inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_SYCL_API void rtcForwardIntersect1Ex(const struct RTCIntersectFunctionNArguments* args, RTCScene scene, struct RTCRay* ray, unsigned int instID, unsigned int instPrimID);
/* Forwards ray packet of size 4 inside user geometry callback. */
RTC_API void rtcForwardIntersect4(const int* valid, const struct RTCIntersectFunctionNArguments* args, RTCScene scene, struct RTCRay4* ray, unsigned int instID);
/* Forwards ray packet of size 4 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardIntersect4Ex(const int* valid, const struct RTCIntersectFunctionNArguments* args, RTCScene scene, struct RTCRay4* ray, unsigned int instID, unsigned int primInstID);
/* Forwards ray packet of size 8 inside user geometry callback. */
RTC_API void rtcForwardIntersect8(const int* valid, const struct RTCIntersectFunctionNArguments* args, RTCScene scene, struct RTCRay8* ray, unsigned int instID);
/* Forwards ray packet of size 4 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardIntersect8Ex(const int* valid, const struct RTCIntersectFunctionNArguments* args, RTCScene scene, struct RTCRay8* ray, unsigned int instID, unsigned int primInstID);
/* Forwards ray packet of size 16 inside user geometry callback. */
RTC_API void rtcForwardIntersect16(const int* valid, const struct RTCIntersectFunctionNArguments* args, RTCScene scene, struct RTCRay16* ray, unsigned int instID);
/* Forwards ray packet of size 4 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardIntersect16Ex(const int* valid, const struct RTCIntersectFunctionNArguments* args, RTCScene scene, struct RTCRay16* ray, unsigned int instID, unsigned int primInstID);
/* Tests a single ray for occlusion with the scene. */
RTC_SYCL_API void rtcOccluded1(RTCScene scene, struct RTCRay* ray, struct RTCOccludedArguments* args RTC_OPTIONAL_ARGUMENT);
@@ -211,27 +195,15 @@ RTC_API void rtcOccluded16(const int* valid, RTCScene scene, struct RTCRay16* ra
/* Forwards single occlusion ray inside user geometry callback. */
RTC_SYCL_API void rtcForwardOccluded1(const struct RTCOccludedFunctionNArguments* args, RTCScene scene, struct RTCRay* ray, unsigned int instID);
/* Forwards single occlusion ray inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_SYCL_API void rtcForwardOccluded1Ex(const struct RTCOccludedFunctionNArguments* args, RTCScene scene, struct RTCRay* ray, unsigned int instID, unsigned int instPrimID);
/* Forwards occlusion ray packet of size 4 inside user geometry callback. */
RTC_API void rtcForwardOccluded4(const int* valid, const struct RTCOccludedFunctionNArguments* args, RTCScene scene, struct RTCRay4* ray, unsigned int instID);
/* Forwards occlusion ray packet of size 4 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardOccluded4Ex(const int* valid, const struct RTCOccludedFunctionNArguments* args, RTCScene scene, struct RTCRay4* ray, unsigned int instID, unsigned int instPrimID);
/* Forwards occlusion ray packet of size 8 inside user geometry callback. */
RTC_API void rtcForwardOccluded8(const int* valid, const struct RTCOccludedFunctionNArguments* args, RTCScene scene, struct RTCRay8* ray, unsigned int instID);
/* Forwards occlusion ray packet of size 8 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardOccluded8Ex(const int* valid, const struct RTCOccludedFunctionNArguments* args, RTCScene scene, struct RTCRay8* ray, unsigned int instID, unsigned int instPrimID);
/* Forwards occlusion ray packet of size 16 inside user geometry callback. */
RTC_API void rtcForwardOccluded16(const int* valid, const struct RTCOccludedFunctionNArguments* args, RTCScene scene, struct RTCRay16* ray, unsigned int instID);
/* Forwards occlusion ray packet of size 16 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardOccluded16Ex(const int* valid, const struct RTCOccludedFunctionNArguments* args, RTCScene scene, struct RTCRay16* ray, unsigned int instID, unsigned int instPrimID);
/*! collision callback */
struct RTCCollision { unsigned int geomID0; unsigned int primID0; unsigned int geomID1; unsigned int primID1; };
-99
View File
@@ -101,51 +101,6 @@ RTC_API RTCGeometry rtcGetGeometryThreadSafe(RTCScene scene, uniform unsigned in
/* Gets the user-defined data pointer of the geometry. This function is not thread safe and should get used during rendering. */
RTC_API void* rtcGetGeometryUserDataFromScene(RTCScene scene, uniform unsigned int geomID);
/* Returns the interpolated transformation of an instance for the specified time. */
RTC_API void rtcGetGeometryTransformFromScene(RTCScene scene, uniform unsigned int geomID, uniform float time, uniform RTCFormat format, void* uniform xfm);
/* Returns the interpolated transformation of an instance for the specified time. Varying version. */
inline void rtcGetGeometryTransformFromScene(RTCScene scene, varying unsigned int geomID, varying float time, uniform RTCFormat format, void* uniform xfm)
{
varying float vmatrix[12];
foreach_unique(ugeomID in geomID)
foreach_unique(utime in time)
{
uniform float umatrix[12];
rtcGetGeometryTransformFromScene(scene,ugeomID,utime,RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR,umatrix);
for (int uniform j=0; j<12; j++) vmatrix[j] = umatrix[j];
}
/* store to desired layout */
varying float* vxfm = (varying float*) xfm;
switch (format)
{
case RTC_FORMAT_FLOAT3X4_ROW_MAJOR:
vxfm[ 0] = vmatrix[0]; vxfm[ 1] = vmatrix[3]; vxfm[ 2] = vmatrix[6]; vxfm[ 3] = vmatrix[9];
vxfm[ 4] = vmatrix[1]; vxfm[ 5] = vmatrix[4]; vxfm[ 6] = vmatrix[7]; vxfm[ 7] = vmatrix[10];
vxfm[ 8] = vmatrix[2]; vxfm[ 9] = vmatrix[5]; vxfm[10] = vmatrix[8]; vxfm[11] = vmatrix[11];
break;
case RTC_FORMAT_FLOAT3X4_COLUMN_MAJOR:
vxfm[ 0] = vmatrix[0]; vxfm[ 1] = vmatrix[1]; vxfm[ 2] = vmatrix[2];
vxfm[ 3] = vmatrix[3]; vxfm[ 4] = vmatrix[4]; vxfm[ 5] = vmatrix[5];
vxfm[ 6] = vmatrix[6]; vxfm[ 7] = vmatrix[7]; vxfm[ 8] = vmatrix[8];
vxfm[ 9] = vmatrix[9]; vxfm[10] = vmatrix[10]; vxfm[11] = vmatrix[11];
break;
case RTC_FORMAT_FLOAT4X4_COLUMN_MAJOR:
vxfm[ 0] = vmatrix[0]; vxfm[ 1] = vmatrix[1]; vxfm[ 2] = vmatrix[2]; vxfm[ 3] = 0.f;
vxfm[ 4] = vmatrix[3]; vxfm[ 5] = vmatrix[4]; vxfm[ 6] = vmatrix[5]; vxfm[ 7] = 0.f;
vxfm[ 8] = vmatrix[6]; vxfm[ 9] = vmatrix[7]; vxfm[10] = vmatrix[8]; vxfm[11] = 0.f;
vxfm[12] = vmatrix[9]; vxfm[13] = vmatrix[10]; vxfm[14] = vmatrix[11]; vxfm[15] = 1.f;
break;
default:
break;
}
}
/* Commits the scene. */
RTC_API void rtcCommitScene(RTCScene scene);
@@ -236,26 +191,15 @@ RTC_FORCEINLINE void rtcIntersectV(RTCScene scene, varying RTCRayHit* uniform ra
/* Forwards ray inside user geometry callback. */
RTC_API void rtcForwardIntersect1(const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, uniform RTCRay* uniform ray, uniform unsigned int instID);
/* Forwards ray inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardIntersect1Ex(const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, uniform RTCRay* uniform ray, uniform unsigned int instID, uniform unsigned int instPrimID);
/* Forwards ray packet of size 4 inside user geometry callback. */
RTC_API void rtcForwardIntersect4(const uniform int* uniform valid, const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, void* uniform ray4, uniform unsigned int instID);
/* Forwards ray packet of size 4 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardIntersect4Ex(const uniform int* uniform valid, const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, void* uniform ray4, uniform unsigned int instID, uniform unsigned int instPrimID);
/* Forwards ray packet of size 8 inside user geometry callback. */
RTC_API void rtcForwardIntersect8(const uniform int* uniform valid, const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, void* uniform ray8, uniform unsigned int instID);
/* Forwards ray packet of size 8 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardIntersect8Ex(const uniform int* uniform valid, const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, void* uniform ray8, uniform unsigned int instID, uniform unsigned int instPrimID);
/* Forwards ray packet of size 16 inside user geometry callback. */
RTC_API void rtcForwardIntersect16(const uniform int* uniform valid, const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, void* uniform ray16, uniform unsigned int instID);
/* Forwards ray packet of size 16 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardIntersect16Ex(const uniform int* uniform valid, const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, void* uniform ray16, uniform unsigned int instID, uniform unsigned int instPrimID);
/* Forwards ray intersection query inside user geometry callback. */
RTC_FORCEINLINE void rtcForwardIntersectV(const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, varying RTCRay* uniform iray, uniform unsigned int instID)
@@ -272,21 +216,6 @@ RTC_FORCEINLINE void rtcForwardIntersectV(const uniform RTCIntersectFunctionNArg
rtcForwardIntersect16((uniform int* uniform)&imask, args, scene, iray, instID);
}
/* Forwards ray intersection query inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_FORCEINLINE void rtcForwardIntersectVEx(const uniform RTCIntersectFunctionNArguments* uniform args, RTCScene scene, varying RTCRay* uniform iray, uniform unsigned int instID, uniform unsigned int instPrimID)
{
varying bool mask = __mask;
unmasked {
varying int imask = mask ? -1 : 0;
}
if (sizeof(varying float) == 16)
rtcForwardIntersect4Ex((uniform int* uniform)&imask, args, scene, iray, instID, instPrimID);
else if (sizeof(varying float) == 32)
rtcForwardIntersect8Ex((uniform int* uniform)&imask, args, scene, iray, instID, instPrimID);
else if (sizeof(varying float) == 64)
rtcForwardIntersect16Ex((uniform int* uniform)&imask, args, scene, iray, instID, instPrimID);
}
/* Tests a single ray for occlusion with the scene. */
RTC_API void rtcOccluded1(RTCScene scene, uniform RTCRay* uniform ray, uniform RTCOccludedArguments* uniform args = NULL);
@@ -320,27 +249,15 @@ RTC_FORCEINLINE void rtcOccludedV(RTCScene scene, varying RTCRay* uniform ray, u
/* Forwards single occlusion ray inside user geometry callback. */
RTC_API void rtcForwardOccluded1(const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, uniform RTCRay* uniform ray, uniform unsigned int instID);
/* Forwards single occlusion ray inside user geometry callback. Extended to handle instance arrays using instPrimID parameter.*/
RTC_API void rtcForwardOccluded1Ex(const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, uniform RTCRay* uniform ray, uniform unsigned int instID, uniform unsigned int instPrimID);
/* Forwards occlusion ray packet of size 4 inside user geometry callback. */
RTC_API void rtcForwardOccluded4(const uniform int* uniform valid, const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, void* uniform ray4, uniform unsigned int instID);
/* Forwards occlusion ray packet of size 4 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardOccluded4Ex(const uniform int* uniform valid, const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, void* uniform ray4, uniform unsigned int instID, uniform unsigned int instPrimID);
/* Forwards occlusion ray packet of size 8 inside user geometry callback. */
RTC_API void rtcForwardOccluded8(const uniform int* uniform valid, const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, void* uniform ray8, uniform unsigned int instID);
/* Forwards occlusion ray packet of size 8 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardOccluded8Ex(const uniform int* uniform valid, const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, void* uniform ray8, uniform unsigned int instID, uniform unsigned int instPrimID);
/* Forwards occlusion ray packet of size 16 inside user geometry callback. */
RTC_API void rtcForwardOccluded16(const uniform int* uniform valid, const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, void* uniform ray16, uniform unsigned int instID);
/* Forwards occlusion ray packet of size 16 inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_API void rtcForwardOccluded16Ex(const uniform int* uniform valid, const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, void* uniform ray16, uniform unsigned int instID, uniform unsigned int instPrimID);
/* Forwards ray occlusion query inside user geometry callback. */
RTC_FORCEINLINE void rtcForwardOccludedV(const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, varying RTCRay* uniform iray, uniform unsigned int instID)
{
@@ -357,22 +274,6 @@ RTC_FORCEINLINE void rtcForwardOccludedV(const uniform RTCOccludedFunctionNArgum
rtcForwardOccluded16((uniform int* uniform)&imask, args, scene, iray, instID);
}
/* Forwards ray occlusion query inside user geometry callback. Extended to handle instance arrays using instPrimID parameter. */
RTC_FORCEINLINE void rtcForwardOccludedVEx(const uniform RTCOccludedFunctionNArguments* uniform args, RTCScene scene, varying RTCRay* uniform iray, uniform unsigned int instID, uniform unsigned int instPrimID)
{
varying bool mask = __mask;
unmasked {
varying int imask = mask ? -1 : 0;
}
if (sizeof(varying float) == 16)
rtcForwardOccluded4Ex((uniform int* uniform)&imask, args, scene, iray, instID, instPrimID);
else if (sizeof(varying float) == 32)
rtcForwardOccluded8Ex((uniform int* uniform)&imask, args, scene, iray, instID, instPrimID);
else if (sizeof(varying float) == 64)
rtcForwardOccluded16Ex((uniform int* uniform)&imask, args, scene, iray, instID, instPrimID);
}
/*! collision callback */
struct RTCCollision { unsigned int geomID0; unsigned int primID0; unsigned int geomID1; unsigned int primID1; };
+10 -15
View File
@@ -6,7 +6,6 @@ IF (EMBREE_SYCL_RT_SIMULATION)
ENDIF()
IF (EMBREE_SYCL_SUPPORT)
ADD_SUBDIRECTORY(level_zero)
ADD_SUBDIRECTORY(rthwif)
ENDIF()
@@ -48,7 +47,6 @@ SET(EMBREE_LIBRARY_FILES
common/geometry.cpp
common/scene_user_geometry.cpp
common/scene_instance.cpp
common/scene_instance_array.cpp
common/scene_triangle_mesh.cpp
common/scene_quad_mesh.cpp
common/scene_curves.cpp
@@ -63,7 +61,6 @@ SET(EMBREE_LIBRARY_FILES
geometry/primitive4.cpp
geometry/instance_intersector.cpp
geometry/instance_array_intersector.cpp
geometry/curve_intersector_virtual_4v.cpp
geometry/curve_intersector_virtual_4i.cpp
geometry/curve_intersector_virtual_4i_mb.cpp
@@ -91,13 +88,9 @@ SET(EMBREE_LIBRARY_FILES
bvh/bvh_intersector1_bvh4.cpp
)
IF (EMBREE_SYCL_SUPPORT)
SET(EMBREE_LIBRARY_FILES ${EMBREE_LIBRARY_FILES}
sycl/rthwif_embree_builder.cpp
sycl/scene_sycl.cpp)
set_source_files_properties(sycl/scene_sycl.cpp PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_SYCL})
sycl/rthwif_embree_builder.cpp)
ENDIF()
IF (EMBREE_GEOMETRY_SUBDIVISION)
@@ -120,7 +113,6 @@ MACRO(embree_files TARGET ISA)
SET(${TARGET}
geometry/instance_intersector.cpp
geometry/instance_array_intersector.cpp
geometry/curve_intersector_virtual_4v.cpp
geometry/curve_intersector_virtual_4i.cpp
geometry/curve_intersector_virtual_4i_mb.cpp
@@ -138,7 +130,6 @@ MACRO(embree_files TARGET ISA)
LIST(APPEND ${TARGET}
common/scene_user_geometry.cpp
common/scene_instance.cpp
common/scene_instance_array.cpp
common/scene_triangle_mesh.cpp
common/scene_quad_mesh.cpp
common/scene_curves.cpp
@@ -249,9 +240,10 @@ DISABLE_STACK_PROTECTOR_FOR_INTERSECTORS(${EMBREE_LIBRARY_FILES})
ADD_LIBRARY(embree ${EMBREE_LIB_TYPE} ${EMBREE_LIBRARY_FILES})
IF (EMBREE_SYCL_SUPPORT)
# add link flag '-fsycl' here to include the kernel for USM prefetch from
# scene_sycl.cpp in embree4.dll/embree4.so
TARGET_LINK_OPTIONS(embree PRIVATE "-fsycl")
IF (EMBREE_LEVEL_ZERO)
TARGET_COMPILE_DEFINITIONS(embree PUBLIC EMBREE_LEVEL_ZERO)
ENDIF()
ADD_LIBRARY(embree_sycl STATIC
sycl/rtcore_sycl.cpp
@@ -349,7 +341,10 @@ ENDIF()
TARGET_LINK_LIBRARIES(embree PRIVATE ${EMBREE_LIBRARIES} sys math simd lexers tasking)
IF (EMBREE_SYCL_SUPPORT)
TARGET_LINK_LIBRARIES(embree PRIVATE ${SYCL_LIB_NAME} ze_wrapper PUBLIC embree_sycl)
TARGET_LINK_LIBRARIES(embree PRIVATE embree_rthwif ${SYCL_LIB_NAME} PUBLIC embree_sycl)
IF (EMBREE_LEVL_ZERO)
TARGET_LINK_LIBRARIES(embree PRIVATE ze_loader)
ENDIF()
ENDIF()
#TARGET_LINK_LIBRARIES(embree PRIVATE ${EMBREE_LIBRARIES} sys math simd lexers tasking ${CMAKE_LINK_FLAGS_SYCL}) # FIXME: enable this line
@@ -362,7 +357,7 @@ target_include_directories(embree PUBLIC
# libtbb is located in same install folder as libembree
IF(WIN32)
ELSEIF(APPLE)
SET_TARGET_PROPERTIES(embree PROPERTIES INSTALL_RPATH "@loader_path") # On MacOSX we tell dyld to find libtbb in the folder libembree is placed
SET_TARGET_PROPERTIES(embree PROPERTIES INSTALL_RPATH "@rpath") # On MacOSX the app is supposed to already have an rpath set to that folder
ELSE()
SET_TARGET_PROPERTIES(embree PROPERTIES INSTALL_RPATH "$ORIGIN") # Linux we tell ld to find libtbb in the folder libembree is placed.
ENDIF()
+2 -1
View File
@@ -48,9 +48,10 @@ namespace embree
}
Settings (size_t sahBlockSize, size_t minLeafSize, size_t maxLeafSize, float travCost, float intCost, size_t singleThreadThreshold, size_t primrefarrayalloc = inf)
: branchingFactor(2), maxDepth(32), logBlockSize(bsr(sahBlockSize)), minLeafSize(min(minLeafSize,maxLeafSize)), maxLeafSize(maxLeafSize),
: branchingFactor(2), maxDepth(32), logBlockSize(bsr(sahBlockSize)), minLeafSize(minLeafSize), maxLeafSize(maxLeafSize),
travCost(travCost), intCost(intCost), singleThreadThreshold(singleThreadThreshold), primrefarrayalloc(primrefarrayalloc)
{
minLeafSize = min(minLeafSize,maxLeafSize);
}
public:
+5 -3
View File
@@ -283,9 +283,11 @@ namespace embree
if (likely(splits <= 1)) continue; /* todo: does this ever happen ? */
const int bin0 = split.mapping.bin(prims0[i].lower)[split.dim];
const int bin1 = split.mapping.bin(prims0[i].upper)[split.dim];
if (unlikely(bin0 < split.pos && bin1 >= split.pos))
//int bin0 = split.mapping.bin(prims0[i].lower)[split.dim];
//int bin1 = split.mapping.bin(prims0[i].upper)[split.dim];
//if (unlikely(bin0 < split.pos && bin1 >= split.pos))
if (unlikely(prims0[i].lower[split.dim] < fpos && prims0[i].upper[split.dim] > fpos))
{
assert(splits > 1);
-1
View File
@@ -354,6 +354,5 @@ namespace embree
IF_ENABLED_QUADS(template size_t createMortonCodeArray<QuadMesh>(QuadMesh* mesh COMMA mvector<BVHBuilderMorton::BuildPrim>& morton COMMA BuildProgressMonitor& progressMonitor));
IF_ENABLED_USER (template size_t createMortonCodeArray<UserGeometry>(UserGeometry* mesh COMMA mvector<BVHBuilderMorton::BuildPrim>& morton COMMA BuildProgressMonitor& progressMonitor));
IF_ENABLED_INSTANCE (template size_t createMortonCodeArray<Instance>(Instance* mesh COMMA mvector<BVHBuilderMorton::BuildPrim>& morton COMMA BuildProgressMonitor& progressMonitor));
IF_ENABLED_INSTANCE_ARRAY (template size_t createMortonCodeArray<InstanceArray>(InstanceArray* mesh COMMA mvector<BVHBuilderMorton::BuildPrim>& morton COMMA BuildProgressMonitor& progressMonitor));
}
}
+5 -2
View File
@@ -38,6 +38,7 @@ namespace embree
__forceinline bool split_pos(const PrimRef& prim, unsigned int& dim_o, float& fsplit_o) const
{
#if !defined(__SYCL_DEVICE_ONLY__)
/* compute morton code */
const Vec3fa lower = prim.lower;
const Vec3fa upper = prim.upper;
@@ -72,6 +73,7 @@ namespace embree
dim_o = dim;
fsplit_o = fsplit;
#endif
return true;
}
@@ -83,10 +85,11 @@ namespace embree
const Vec3fa gupper = (upper-base)*Vec3fa(scale)-Vec3fa(0.2f);
Vec3ia ilower(floor(glower));
Vec3ia iupper(floor(gupper));
#if !defined(__SYCL_DEVICE_ONLY__)
/* this ignores dimensions that are empty */
iupper = (Vec3ia)select(vint4(glower) >= vint4(gupper),vint4(ilower),vint4(iupper));
#endif
/* compute a morton code for the lower and upper grid coordinates. */
const unsigned int lower_code = bitInterleave(ilower.x,ilower.y,ilower.z);
const unsigned int upper_code = bitInterleave(iupper.x,iupper.y,iupper.z);
+4 -92
View File
@@ -17,7 +17,6 @@
#include "../geometry/subdivpatch1.h"
#include "../geometry/object.h"
#include "../geometry/instance.h"
#include "../geometry/instance_array.h"
#include "../geometry/subgrid.h"
#include "../common/accelinstance.h"
@@ -67,9 +66,6 @@ namespace embree
DECLARE_SYMBOL2(Accel::Intersector1,BVH4InstanceIntersector1);
DECLARE_SYMBOL2(Accel::Intersector1,BVH4InstanceMBIntersector1);
DECLARE_SYMBOL2(Accel::Intersector1,BVH4InstanceArrayIntersector1);
DECLARE_SYMBOL2(Accel::Intersector1,BVH4InstanceArrayMBIntersector1);
DECLARE_SYMBOL2(Accel::Intersector1,BVH4GridIntersector1Moeller);
DECLARE_SYMBOL2(Accel::Intersector1,BVH4GridMBIntersector1Moeller);
DECLARE_SYMBOL2(Accel::Intersector1,BVH4GridIntersector1Pluecker);
@@ -108,9 +104,6 @@ namespace embree
DECLARE_SYMBOL2(Accel::Intersector4,BVH4InstanceIntersector4Chunk);
DECLARE_SYMBOL2(Accel::Intersector4,BVH4InstanceMBIntersector4Chunk);
DECLARE_SYMBOL2(Accel::Intersector4,BVH4InstanceArrayIntersector4Chunk);
DECLARE_SYMBOL2(Accel::Intersector4,BVH4InstanceArrayMBIntersector4Chunk);
DECLARE_SYMBOL2(Accel::Intersector4,BVH4GridIntersector4HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector4,BVH4GridMBIntersector4HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector4,BVH4GridIntersector4HybridPluecker);
@@ -149,9 +142,6 @@ namespace embree
DECLARE_SYMBOL2(Accel::Intersector8,BVH4InstanceIntersector8Chunk);
DECLARE_SYMBOL2(Accel::Intersector8,BVH4InstanceMBIntersector8Chunk);
DECLARE_SYMBOL2(Accel::Intersector8,BVH4InstanceArrayIntersector8Chunk);
DECLARE_SYMBOL2(Accel::Intersector8,BVH4InstanceArrayMBIntersector8Chunk);
DECLARE_SYMBOL2(Accel::Intersector8,BVH4GridIntersector8HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector8,BVH4GridMBIntersector8HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector8,BVH4GridIntersector8HybridPluecker);
@@ -190,9 +180,6 @@ namespace embree
DECLARE_SYMBOL2(Accel::Intersector16,BVH4InstanceIntersector16Chunk);
DECLARE_SYMBOL2(Accel::Intersector16,BVH4InstanceMBIntersector16Chunk);
DECLARE_SYMBOL2(Accel::Intersector16,BVH4InstanceArrayIntersector16Chunk);
DECLARE_SYMBOL2(Accel::Intersector16,BVH4InstanceArrayMBIntersector16Chunk);
DECLARE_SYMBOL2(Accel::Intersector16,BVH4GridIntersector16HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector16,BVH4GridMBIntersector16HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector16,BVH4GridIntersector16HybridPluecker);
@@ -203,7 +190,6 @@ namespace embree
DECLARE_ISA_FUNCTION(Builder*,BVH4BuilderTwoLevelQuadMeshSAH,void* COMMA Scene* COMMA bool);
DECLARE_ISA_FUNCTION(Builder*,BVH4BuilderTwoLevelVirtualSAH,void* COMMA Scene* COMMA bool);
DECLARE_ISA_FUNCTION(Builder*,BVH4BuilderTwoLevelInstanceSAH,void* COMMA Scene* COMMA Geometry::GTypeMask COMMA bool);
DECLARE_ISA_FUNCTION(Builder*,BVH4BuilderTwoLevelInstanceArraySAH,void* COMMA Scene* COMMA Geometry::GTypeMask COMMA bool);
DECLARE_ISA_FUNCTION(Builder*,BVH4Curve4vBuilder_OBB_New,void* COMMA Scene* COMMA size_t);
DECLARE_ISA_FUNCTION(Builder*,BVH4Curve4iBuilder_OBB_New,void* COMMA Scene* COMMA size_t);
@@ -234,10 +220,7 @@ namespace embree
DECLARE_ISA_FUNCTION(Builder*,BVH4InstanceSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DECLARE_ISA_FUNCTION(Builder*,BVH4InstanceMBSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DECLARE_ISA_FUNCTION(Builder*,BVH4InstanceArraySceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DECLARE_ISA_FUNCTION(Builder*,BVH4InstanceArrayMBSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DECLARE_ISA_FUNCTION(Builder*,BVH4GridSceneBuilderSAH,void* COMMA Scene* COMMA size_t);
DECLARE_ISA_FUNCTION(Builder*,BVH4GridMBSceneBuilderSAH,void* COMMA Scene* COMMA size_t);
@@ -266,7 +249,6 @@ namespace embree
IF_ENABLED_QUADS (SELECT_SYMBOL_DEFAULT_AVX(features,BVH4BuilderTwoLevelQuadMeshSAH));
IF_ENABLED_USER (SELECT_SYMBOL_DEFAULT_AVX(features,BVH4BuilderTwoLevelVirtualSAH));
IF_ENABLED_INSTANCE (SELECT_SYMBOL_DEFAULT_AVX(features,BVH4BuilderTwoLevelInstanceSAH));
IF_ENABLED_INSTANCE_ARRAY (SELECT_SYMBOL_DEFAULT_AVX(features,BVH4BuilderTwoLevelInstanceArraySAH));
IF_ENABLED_CURVES_OR_POINTS(SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Curve4vBuilder_OBB_New));
IF_ENABLED_CURVES_OR_POINTS(SELECT_SYMBOL_DEFAULT_AVX(features,BVH4Curve4iBuilder_OBB_New));
@@ -297,10 +279,7 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_DEFAULT_AVX(features,BVH4InstanceSceneBuilderSAH));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_DEFAULT_AVX(features,BVH4InstanceMBSceneBuilderSAH));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_DEFAULT_AVX(features,BVH4InstanceArraySceneBuilderSAH));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_DEFAULT_AVX(features,BVH4InstanceArrayMBSceneBuilderSAH));
IF_ENABLED_GRIDS(SELECT_SYMBOL_DEFAULT_AVX(features,BVH4GridSceneBuilderSAH));
IF_ENABLED_GRIDS(SELECT_SYMBOL_DEFAULT_AVX(features,BVH4GridMBSceneBuilderSAH));
@@ -353,9 +332,6 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4InstanceIntersector1));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4InstanceMBIntersector1));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4InstanceArrayIntersector1));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4InstanceArrayMBIntersector1));
IF_ENABLED_GRIDS(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4GridIntersector1Moeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4GridMBIntersector1Moeller))
IF_ENABLED_GRIDS(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4GridIntersector1Pluecker));
@@ -396,10 +372,7 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4InstanceIntersector4Chunk));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4InstanceMBIntersector4Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4InstanceArrayIntersector4Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4InstanceArrayMBIntersector4Chunk));
IF_ENABLED_QUADS(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4Quad4vIntersector4HybridMoeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_DEFAULT_SSE42_AVX_AVX2_AVX512(features,BVH4GridIntersector4HybridMoeller));
@@ -434,16 +407,13 @@ namespace embree
IF_ENABLED_SUBDIV(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4SubdivPatch1Intersector8));
IF_ENABLED_SUBDIV(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4SubdivPatch1MBIntersector8));
IF_ENABLED_USER(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4VirtualIntersector8Chunk));
IF_ENABLED_USER(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4VirtualMBIntersector8Chunk));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4InstanceIntersector8Chunk));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4InstanceMBIntersector8Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4InstanceArrayIntersector8Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4InstanceArrayMBIntersector8Chunk));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4GridIntersector8HybridMoeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4GridMBIntersector8HybridMoeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH4GridIntersector8HybridPluecker));
@@ -483,9 +453,6 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX512(features,BVH4InstanceIntersector16Chunk));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX512(features,BVH4InstanceMBIntersector16Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX512(features,BVH4InstanceArrayIntersector16Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX512(features,BVH4InstanceArrayMBIntersector16Chunk));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX512(features,BVH4GridIntersector16HybridMoeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX512(features,BVH4GridMBIntersector16HybridMoeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX512(features,BVH4GridIntersector16HybridPluecker));
@@ -849,32 +816,6 @@ namespace embree
#endif
return intersectors;
}
Accel::Intersectors BVH4Factory::BVH4InstanceArrayIntersectors(BVH4* bvh)
{
Accel::Intersectors intersectors;
intersectors.ptr = bvh;
intersectors.intersector1 = BVH4InstanceArrayIntersector1();
#if defined (EMBREE_RAY_PACKETS)
intersectors.intersector4 = BVH4InstanceArrayIntersector4Chunk();
intersectors.intersector8 = BVH4InstanceArrayIntersector8Chunk();
intersectors.intersector16 = BVH4InstanceArrayIntersector16Chunk();
#endif
return intersectors;
}
Accel::Intersectors BVH4Factory::BVH4InstanceArrayMBIntersectors(BVH4* bvh)
{
Accel::Intersectors intersectors;
intersectors.ptr = bvh;
intersectors.intersector1 = BVH4InstanceArrayMBIntersector1();
#if defined (EMBREE_RAY_PACKETS)
intersectors.intersector4 = BVH4InstanceArrayMBIntersector4Chunk();
intersectors.intersector8 = BVH4InstanceArrayMBIntersector8Chunk();
intersectors.intersector16 = BVH4InstanceArrayMBIntersector16Chunk();
#endif
return intersectors;
}
Accel::Intersectors BVH4Factory::BVH4SubdivPatch1Intersectors(BVH4* bvh)
{
@@ -1252,35 +1193,6 @@ namespace embree
return new AccelInstance(accel,builder,intersectors);
}
Accel* BVH4Factory::BVH4InstanceArray(Scene* scene, BuildVariant bvariant)
{
BVH4* accel = new BVH4(InstanceArrayPrimitive::type,scene);
Accel::Intersectors intersectors = BVH4InstanceArrayIntersectors(accel);
auto gtype = Geometry::MTY_INSTANCE_ARRAY;
Builder* builder = nullptr;
if (scene->device->object_builder == "default") {
switch (bvariant) {
case BuildVariant::STATIC : builder = BVH4InstanceArraySceneBuilderSAH(accel,scene,gtype); break;
case BuildVariant::DYNAMIC : builder = BVH4BuilderTwoLevelInstanceArraySAH(accel,scene,gtype,false); break;
case BuildVariant::HIGH_QUALITY: assert(false); break;
}
}
else if (scene->device->object_builder == "sah") { builder = BVH4InstanceArraySceneBuilderSAH(accel,scene,gtype); }
else if (scene->device->object_builder == "dynamic") { builder = BVH4BuilderTwoLevelInstanceArraySAH(accel,scene,gtype,false); }
else throw_RTCError(RTC_ERROR_INVALID_ARGUMENT,"unknown builder "+scene->device->object_builder+" for BVH4<Object>");
return new AccelInstance(accel,builder,intersectors);
}
Accel* BVH4Factory::BVH4InstanceArrayMB(Scene* scene)
{
BVH4* accel = new BVH4(InstanceArrayPrimitive::type,scene);
Accel::Intersectors intersectors = BVH4InstanceArrayMBIntersectors(accel);
Builder* builder = BVH4InstanceArrayMBSceneBuilderSAH(accel,scene,Geometry::MTY_INSTANCE_ARRAY);
return new AccelInstance(accel,builder,intersectors);
}
Accel::Intersectors BVH4Factory::BVH4GridIntersectors(BVH4* bvh, IntersectVariant ivariant)
{
Accel::Intersectors intersectors;
+2 -24
View File
@@ -48,9 +48,6 @@ namespace embree
Accel* BVH4Instance(Scene* scene, bool isExpensive, BuildVariant bvariant = BuildVariant::STATIC);
Accel* BVH4InstanceMB(Scene* scene, bool isExpensive);
Accel* BVH4InstanceArray(Scene* scene, BuildVariant bvariant = BuildVariant::STATIC);
Accel* BVH4InstanceArrayMB(Scene* scene);
Accel* BVH4Grid(Scene* scene, BuildVariant bvariant = BuildVariant::STATIC, IntersectVariant ivariant = IntersectVariant::FAST);
Accel* BVH4GridMB(Scene* scene, BuildVariant bvariant = BuildVariant::STATIC, IntersectVariant ivariant = IntersectVariant::FAST);
@@ -80,10 +77,7 @@ namespace embree
Accel::Intersectors BVH4InstanceIntersectors(BVH4* bvh);
Accel::Intersectors BVH4InstanceMBIntersectors(BVH4* bvh);
Accel::Intersectors BVH4InstanceArrayIntersectors(BVH4* bvh);
Accel::Intersectors BVH4InstanceArrayMBIntersectors(BVH4* bvh);
Accel::Intersectors BVH4SubdivPatch1Intersectors(BVH4* bvh);
Accel::Intersectors BVH4SubdivPatch1MBIntersectors(BVH4* bvh);
@@ -128,10 +122,7 @@ namespace embree
DEFINE_SYMBOL2(Accel::Intersector1,BVH4InstanceIntersector1);
DEFINE_SYMBOL2(Accel::Intersector1,BVH4InstanceMBIntersector1);
DEFINE_SYMBOL2(Accel::Intersector1,BVH4InstanceArrayIntersector1);
DEFINE_SYMBOL2(Accel::Intersector1,BVH4InstanceArrayMBIntersector1);
DEFINE_SYMBOL2(Accel::Intersector1,BVH4GridIntersector1Moeller);
DEFINE_SYMBOL2(Accel::Intersector1,BVH4GridMBIntersector1Moeller);
DEFINE_SYMBOL2(Accel::Intersector1,BVH4GridIntersector1Pluecker);
@@ -170,9 +161,6 @@ namespace embree
DEFINE_SYMBOL2(Accel::Intersector4,BVH4InstanceIntersector4Chunk);
DEFINE_SYMBOL2(Accel::Intersector4,BVH4InstanceMBIntersector4Chunk);
DEFINE_SYMBOL2(Accel::Intersector4,BVH4InstanceArrayIntersector4Chunk);
DEFINE_SYMBOL2(Accel::Intersector4,BVH4InstanceArrayMBIntersector4Chunk);
DEFINE_SYMBOL2(Accel::Intersector4,BVH4GridIntersector4HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector4,BVH4GridMBIntersector4HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector4,BVH4GridIntersector4HybridPluecker);
@@ -213,9 +201,6 @@ namespace embree
DEFINE_SYMBOL2(Accel::Intersector8,BVH4InstanceIntersector8Chunk);
DEFINE_SYMBOL2(Accel::Intersector8,BVH4InstanceMBIntersector8Chunk);
DEFINE_SYMBOL2(Accel::Intersector8,BVH4InstanceArrayIntersector8Chunk);
DEFINE_SYMBOL2(Accel::Intersector8,BVH4InstanceArrayMBIntersector8Chunk);
DEFINE_SYMBOL2(Accel::Intersector8,BVH4GridIntersector8HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector8,BVH4GridMBIntersector8HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector8,BVH4GridIntersector8HybridPluecker);
@@ -256,9 +241,6 @@ namespace embree
DEFINE_SYMBOL2(Accel::Intersector16,BVH4InstanceIntersector16Chunk);
DEFINE_SYMBOL2(Accel::Intersector16,BVH4InstanceMBIntersector16Chunk);
DEFINE_SYMBOL2(Accel::Intersector16,BVH4InstanceArrayIntersector16Chunk);
DEFINE_SYMBOL2(Accel::Intersector16,BVH4InstanceArrayMBIntersector16Chunk);
DEFINE_SYMBOL2(Accel::Intersector16,BVH4GridIntersector16HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector16,BVH4GridMBIntersector16HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector16,BVH4GridIntersector16HybridPluecker);
@@ -292,9 +274,6 @@ namespace embree
DEFINE_ISA_FUNCTION(Builder*,BVH4InstanceSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DEFINE_ISA_FUNCTION(Builder*,BVH4InstanceMBSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DEFINE_ISA_FUNCTION(Builder*,BVH4InstanceArraySceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DEFINE_ISA_FUNCTION(Builder*,BVH4InstanceArrayMBSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DEFINE_ISA_FUNCTION(Builder*,BVH4GridSceneBuilderSAH,void* COMMA Scene* COMMA size_t);
DEFINE_ISA_FUNCTION(Builder*,BVH4GridMBSceneBuilderSAH,void* COMMA Scene* COMMA size_t);
@@ -313,6 +292,5 @@ namespace embree
DEFINE_ISA_FUNCTION(Builder*,BVH4BuilderTwoLevelQuadMeshSAH,void* COMMA Scene* COMMA bool);
DEFINE_ISA_FUNCTION(Builder*,BVH4BuilderTwoLevelVirtualSAH,void* COMMA Scene* COMMA bool);
DEFINE_ISA_FUNCTION(Builder*,BVH4BuilderTwoLevelInstanceSAH,void* COMMA Scene* COMMA Geometry::GTypeMask COMMA bool);
DEFINE_ISA_FUNCTION(Builder*,BVH4BuilderTwoLevelInstanceArraySAH,void* COMMA Scene* COMMA Geometry::GTypeMask COMMA bool);
};
}
-90
View File
@@ -21,7 +21,6 @@
#include "../geometry/subdivpatch1.h"
#include "../geometry/object.h"
#include "../geometry/instance.h"
#include "../geometry/instance_array.h"
#include "../geometry/subgrid.h"
#include "../common/accelinstance.h"
@@ -67,9 +66,6 @@ namespace embree
DECLARE_SYMBOL2(Accel::Intersector1,BVH8InstanceIntersector1);
DECLARE_SYMBOL2(Accel::Intersector1,BVH8InstanceMBIntersector1);
DECLARE_SYMBOL2(Accel::Intersector1,BVH8InstanceArrayIntersector1);
DECLARE_SYMBOL2(Accel::Intersector1,BVH8InstanceArrayMBIntersector1);
DECLARE_SYMBOL2(Accel::Intersector1,BVH8GridIntersector1Moeller);
DECLARE_SYMBOL2(Accel::Intersector1,BVH8GridMBIntersector1Moeller);
DECLARE_SYMBOL2(Accel::Intersector1,BVH8GridIntersector1Pluecker);
@@ -105,9 +101,6 @@ namespace embree
DECLARE_SYMBOL2(Accel::Intersector4,BVH8InstanceIntersector4Chunk);
DECLARE_SYMBOL2(Accel::Intersector4,BVH8InstanceMBIntersector4Chunk);
DECLARE_SYMBOL2(Accel::Intersector4,BVH8InstanceArrayIntersector4Chunk);
DECLARE_SYMBOL2(Accel::Intersector4,BVH8InstanceArrayMBIntersector4Chunk);
DECLARE_SYMBOL2(Accel::Intersector4,BVH8GridIntersector4HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector4,BVH8GridIntersector4HybridPluecker);
@@ -142,9 +135,6 @@ namespace embree
DECLARE_SYMBOL2(Accel::Intersector8,BVH8InstanceIntersector8Chunk);
DECLARE_SYMBOL2(Accel::Intersector8,BVH8InstanceMBIntersector8Chunk);
DECLARE_SYMBOL2(Accel::Intersector8,BVH8InstanceArrayIntersector8Chunk);
DECLARE_SYMBOL2(Accel::Intersector8,BVH8InstanceArrayMBIntersector8Chunk);
DECLARE_SYMBOL2(Accel::Intersector8,BVH8GridIntersector8HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector8,BVH8GridIntersector8HybridPluecker);
@@ -179,9 +169,6 @@ namespace embree
DECLARE_SYMBOL2(Accel::Intersector16,BVH8InstanceIntersector16Chunk);
DECLARE_SYMBOL2(Accel::Intersector16,BVH8InstanceMBIntersector16Chunk);
DECLARE_SYMBOL2(Accel::Intersector16,BVH8InstanceArrayIntersector16Chunk);
DECLARE_SYMBOL2(Accel::Intersector16,BVH8InstanceArrayMBIntersector16Chunk);
DECLARE_SYMBOL2(Accel::Intersector16,BVH8GridIntersector16HybridMoeller);
DECLARE_SYMBOL2(Accel::Intersector16,BVH8GridIntersector16HybridPluecker);
@@ -207,9 +194,6 @@ namespace embree
DECLARE_ISA_FUNCTION(Builder*,BVH8InstanceSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DECLARE_ISA_FUNCTION(Builder*,BVH8InstanceMBSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DECLARE_ISA_FUNCTION(Builder*,BVH8InstanceArraySceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DECLARE_ISA_FUNCTION(Builder*,BVH8InstanceArrayMBSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DECLARE_ISA_FUNCTION(Builder*,BVH8Triangle4SceneBuilderFastSpatialSAH,void* COMMA Scene* COMMA size_t);
DECLARE_ISA_FUNCTION(Builder*,BVH8Triangle4vSceneBuilderFastSpatialSAH,void* COMMA Scene* COMMA size_t);
DECLARE_ISA_FUNCTION(Builder*,BVH8Quad4vSceneBuilderFastSpatialSAH,void* COMMA Scene* COMMA size_t);
@@ -222,7 +206,6 @@ namespace embree
DECLARE_ISA_FUNCTION(Builder*,BVH8BuilderTwoLevelQuadMeshSAH,void* COMMA Scene* COMMA bool);
DECLARE_ISA_FUNCTION(Builder*,BVH8BuilderTwoLevelVirtualSAH,void* COMMA Scene* COMMA bool);
DECLARE_ISA_FUNCTION(Builder*,BVH8BuilderTwoLevelInstanceSAH,void* COMMA Scene* COMMA Geometry::GTypeMask COMMA bool);
DECLARE_ISA_FUNCTION(Builder*,BVH8BuilderTwoLevelInstanceArraySAH,void* COMMA Scene* COMMA Geometry::GTypeMask COMMA bool);
BVH8Factory::BVH8Factory(int bfeatures, int ifeatures)
{
@@ -255,9 +238,6 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX(features,BVH8InstanceSceneBuilderSAH));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX(features,BVH8InstanceMBSceneBuilderSAH));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX(features,BVH8InstanceArraySceneBuilderSAH));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX(features,BVH8InstanceArrayMBSceneBuilderSAH));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX(features,BVH8GridSceneBuilderSAH));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX(features,BVH8GridMBSceneBuilderSAH));
@@ -272,7 +252,6 @@ namespace embree
IF_ENABLED_QUADS (SELECT_SYMBOL_INIT_AVX(features,BVH8BuilderTwoLevelQuadMeshSAH));
IF_ENABLED_USER (SELECT_SYMBOL_INIT_AVX(features,BVH8BuilderTwoLevelVirtualSAH));
IF_ENABLED_INSTANCE (SELECT_SYMBOL_INIT_AVX(features,BVH8BuilderTwoLevelInstanceSAH));
IF_ENABLED_INSTANCE_ARRAY (SELECT_SYMBOL_INIT_AVX(features,BVH8BuilderTwoLevelInstanceArraySAH));
}
void BVH8Factory::selectIntersectors(int features)
@@ -316,9 +295,6 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceIntersector1));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceMBIntersector1));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceArrayIntersector1));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceArrayMBIntersector1));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8GridIntersector1Moeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8GridMBIntersector1Moeller))
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8GridIntersector1Pluecker));
@@ -357,9 +333,6 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceIntersector4Chunk));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceMBIntersector4Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceArrayIntersector4Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceArrayMBIntersector4Chunk));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8GridIntersector4HybridMoeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8GridIntersector4HybridPluecker));
@@ -395,9 +368,6 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceIntersector8Chunk));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceMBIntersector8Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceArrayIntersector8Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8InstanceArrayMBIntersector8Chunk));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8GridIntersector8HybridMoeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX_AVX2_AVX512(features,BVH8GridIntersector8HybridPluecker));
@@ -433,9 +403,6 @@ namespace embree
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX512(features,BVH8InstanceIntersector16Chunk));
IF_ENABLED_INSTANCE(SELECT_SYMBOL_INIT_AVX512(features,BVH8InstanceMBIntersector16Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX512(features,BVH8InstanceArrayIntersector16Chunk));
IF_ENABLED_INSTANCE_ARRAY(SELECT_SYMBOL_INIT_AVX512(features,BVH8InstanceArrayMBIntersector16Chunk));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX512(features,BVH8GridIntersector16HybridMoeller));
IF_ENABLED_GRIDS(SELECT_SYMBOL_INIT_AVX512(features,BVH8GridIntersector16HybridPluecker));
@@ -800,19 +767,6 @@ namespace embree
return intersectors;
}
Accel::Intersectors BVH8Factory::BVH8InstanceArrayIntersectors(BVH8* bvh)
{
Accel::Intersectors intersectors;
intersectors.ptr = bvh;
intersectors.intersector1 = BVH8InstanceArrayIntersector1();
#if defined (EMBREE_RAY_PACKETS)
intersectors.intersector4 = BVH8InstanceArrayIntersector4Chunk();
intersectors.intersector8 = BVH8InstanceArrayIntersector8Chunk();
intersectors.intersector16 = BVH8InstanceArrayIntersector16Chunk();
#endif
return intersectors;
}
Accel::Intersectors BVH8Factory::BVH8InstanceMBIntersectors(BVH8* bvh)
{
Accel::Intersectors intersectors;
@@ -826,19 +780,6 @@ namespace embree
return intersectors;
}
Accel::Intersectors BVH8Factory::BVH8InstanceArrayMBIntersectors(BVH8* bvh)
{
Accel::Intersectors intersectors;
intersectors.ptr = bvh;
intersectors.intersector1 = BVH8InstanceArrayMBIntersector1();
#if defined (EMBREE_RAY_PACKETS)
intersectors.intersector4 = BVH8InstanceArrayMBIntersector4Chunk();
intersectors.intersector8 = BVH8InstanceArrayMBIntersector8Chunk();
intersectors.intersector16 = BVH8InstanceArrayMBIntersector16Chunk();
#endif
return intersectors;
}
Accel* BVH8Factory::BVH8OBBVirtualCurve8v(Scene* scene, IntersectVariant ivariant)
{
BVH8* accel = new BVH8(Curve8v::type,scene);
@@ -1083,28 +1024,6 @@ namespace embree
return new AccelInstance(accel,builder,intersectors);
}
Accel* BVH8Factory::BVH8InstanceArray(Scene* scene, BuildVariant bvariant)
{
BVH8* accel = new BVH8(InstanceArrayPrimitive::type,scene);
Accel::Intersectors intersectors = BVH8InstanceArrayIntersectors(accel);
auto gtype = Geometry::MTY_INSTANCE_ARRAY;
// Builder* builder = BVH8InstanceSceneBuilderSAH(accel,scene,gtype);
Builder* builder = nullptr;
if (scene->device->object_builder == "default") {
switch (bvariant) {
case BuildVariant::STATIC : builder = BVH8InstanceArraySceneBuilderSAH(accel,scene,gtype); break;
case BuildVariant::DYNAMIC : builder = BVH8BuilderTwoLevelInstanceArraySAH(accel,scene,gtype,false); break;
case BuildVariant::HIGH_QUALITY: assert(false); break;
}
}
else if (scene->device->object_builder == "sah") builder = BVH8InstanceArraySceneBuilderSAH(accel,scene,gtype);
else if (scene->device->object_builder == "dynamic") builder = BVH8BuilderTwoLevelInstanceArraySAH(accel,scene,gtype,false);
else throw_RTCError(RTC_ERROR_INVALID_ARGUMENT,"unknown builder "+scene->device->object_builder+" for BVH8<Object>");
return new AccelInstance(accel,builder,intersectors);
}
Accel* BVH8Factory::BVH8InstanceMB(Scene* scene, bool isExpensive)
{
BVH8* accel = new BVH8(InstancePrimitive::type,scene);
@@ -1114,15 +1033,6 @@ namespace embree
return new AccelInstance(accel,builder,intersectors);
}
Accel* BVH8Factory::BVH8InstanceArrayMB(Scene* scene)
{
BVH8* accel = new BVH8(InstanceArrayPrimitive::type,scene);
Accel::Intersectors intersectors = BVH8InstanceArrayMBIntersectors(accel);
auto gtype = Geometry::MTY_INSTANCE_ARRAY;
Builder* builder = BVH8InstanceArrayMBSceneBuilderSAH(accel,scene,gtype);
return new AccelInstance(accel,builder,intersectors);
}
Accel::Intersectors BVH8Factory::BVH8GridIntersectors(BVH8* bvh, IntersectVariant ivariant)
{
Accel::Intersectors intersectors;
+3 -25
View File
@@ -39,9 +39,6 @@ namespace embree
Accel* BVH8Instance(Scene* scene, bool isExpensive, BuildVariant bvariant = BuildVariant::STATIC);
Accel* BVH8InstanceMB(Scene* scene, bool isExpensive);
Accel* BVH8InstanceArray(Scene* scene, BuildVariant bvariant = BuildVariant::STATIC);
Accel* BVH8InstanceArrayMB(Scene* scene);
Accel* BVH8Grid(Scene* scene, BuildVariant bvariant = BuildVariant::STATIC, IntersectVariant ivariant = IntersectVariant::FAST);
Accel* BVH8GridMB(Scene* scene, BuildVariant bvariant = BuildVariant::STATIC, IntersectVariant ivariant = IntersectVariant::FAST);
@@ -73,9 +70,6 @@ namespace embree
Accel::Intersectors BVH8InstanceIntersectors(BVH8* bvh);
Accel::Intersectors BVH8InstanceMBIntersectors(BVH8* bvh);
Accel::Intersectors BVH8InstanceArrayIntersectors(BVH8* bvh);
Accel::Intersectors BVH8InstanceArrayMBIntersectors(BVH8* bvh);
Accel::Intersectors BVH8GridIntersectors(BVH8* bvh, IntersectVariant ivariant);
Accel::Intersectors BVH8GridMBIntersectors(BVH8* bvh, IntersectVariant ivariant);
@@ -117,9 +111,6 @@ namespace embree
DEFINE_SYMBOL2(Accel::Intersector1,BVH8InstanceIntersector1);
DEFINE_SYMBOL2(Accel::Intersector1,BVH8InstanceMBIntersector1);
DEFINE_SYMBOL2(Accel::Intersector1,BVH8InstanceArrayIntersector1);
DEFINE_SYMBOL2(Accel::Intersector1,BVH8InstanceArrayMBIntersector1);
DEFINE_SYMBOL2(Accel::Intersector1,BVH8GridIntersector1Moeller);
DEFINE_SYMBOL2(Accel::Intersector1,BVH8GridMBIntersector1Moeller);
DEFINE_SYMBOL2(Accel::Intersector1,BVH8GridIntersector1Pluecker);
@@ -154,10 +145,7 @@ namespace embree
DEFINE_SYMBOL2(Accel::Intersector4,BVH8InstanceIntersector4Chunk);
DEFINE_SYMBOL2(Accel::Intersector4,BVH8InstanceMBIntersector4Chunk);
DEFINE_SYMBOL2(Accel::Intersector4,BVH8InstanceArrayIntersector4Chunk);
DEFINE_SYMBOL2(Accel::Intersector4,BVH8InstanceArrayMBIntersector4Chunk);
DEFINE_SYMBOL2(Accel::Intersector4,BVH8GridIntersector4HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector4,BVH8GridIntersector4HybridPluecker);
@@ -192,12 +180,9 @@ namespace embree
DEFINE_SYMBOL2(Accel::Intersector8,BVH8InstanceIntersector8Chunk);
DEFINE_SYMBOL2(Accel::Intersector8,BVH8InstanceMBIntersector8Chunk);
DEFINE_SYMBOL2(Accel::Intersector8,BVH8InstanceArrayIntersector8Chunk);
DEFINE_SYMBOL2(Accel::Intersector8,BVH8InstanceArrayMBIntersector8Chunk);
DEFINE_SYMBOL2(Accel::Intersector8,BVH8GridIntersector8HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector8,BVH8GridIntersector8HybridPluecker);
DEFINE_SYMBOL2(Accel::Intersector16,BVH8OBBVirtualCurveIntersector16Hybrid);
DEFINE_SYMBOL2(Accel::Intersector16,BVH8OBBVirtualCurveIntersector16HybridMB);
DEFINE_SYMBOL2(Accel::Intersector16,BVH8OBBVirtualCurveIntersectorRobust16Hybrid);
@@ -228,10 +213,7 @@ namespace embree
DEFINE_SYMBOL2(Accel::Intersector16,BVH8InstanceIntersector16Chunk);
DEFINE_SYMBOL2(Accel::Intersector16,BVH8InstanceMBIntersector16Chunk);
DEFINE_SYMBOL2(Accel::Intersector16,BVH8InstanceArrayIntersector16Chunk);
DEFINE_SYMBOL2(Accel::Intersector16,BVH8InstanceArrayMBIntersector16Chunk);
DEFINE_SYMBOL2(Accel::Intersector16,BVH8GridIntersector16HybridMoeller);
DEFINE_SYMBOL2(Accel::Intersector16,BVH8GridIntersector16HybridPluecker);
@@ -258,9 +240,6 @@ namespace embree
DEFINE_ISA_FUNCTION(Builder*,BVH8InstanceSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DEFINE_ISA_FUNCTION(Builder*,BVH8InstanceMBSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DEFINE_ISA_FUNCTION(Builder*,BVH8InstanceArraySceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DEFINE_ISA_FUNCTION(Builder*,BVH8InstanceArrayMBSceneBuilderSAH,void* COMMA Scene* COMMA Geometry::GTypeMask);
DEFINE_ISA_FUNCTION(Builder*,BVH8GridSceneBuilderSAH,void* COMMA Scene* COMMA size_t);
DEFINE_ISA_FUNCTION(Builder*,BVH8GridMBSceneBuilderSAH,void* COMMA Scene* COMMA size_t);
@@ -279,6 +258,5 @@ namespace embree
DEFINE_ISA_FUNCTION(Builder*,BVH8BuilderTwoLevelQuadMeshSAH,void* COMMA Scene* COMMA bool);
DEFINE_ISA_FUNCTION(Builder*,BVH8BuilderTwoLevelVirtualSAH,void* COMMA Scene* COMMA bool);
DEFINE_ISA_FUNCTION(Builder*,BVH8BuilderTwoLevelInstanceSAH,void* COMMA Scene* COMMA Geometry::GTypeMask COMMA bool);
DEFINE_ISA_FUNCTION(Builder*,BVH8BuilderTwoLevelInstanceArraySAH,void* COMMA Scene* COMMA Geometry::GTypeMask COMMA bool);
};
}
+1 -53
View File
@@ -17,7 +17,6 @@
#include "../geometry/quadi.h"
#include "../geometry/object.h"
#include "../geometry/instance.h"
#include "../geometry/instance_array.h"
#if defined(__64BIT__)
# define ROTATE_TREE 1 // specifies number of tree rotation rounds to perform
@@ -400,50 +399,6 @@ namespace embree
unsigned int geomID_ = std::numeric_limits<unsigned int>::max();
};
template<int N>
struct CreateMortonLeaf<N,InstanceArrayPrimitive>
{
typedef BVHN<N> BVH;
typedef typename BVH::NodeRef NodeRef;
typedef typename BVH::NodeRecord NodeRecord;
__forceinline CreateMortonLeaf (InstanceArray* mesh, unsigned int geomID, BVHBuilderMorton::BuildPrim* morton)
: mesh(mesh), morton(morton), geomID_(geomID) {}
__noinline NodeRecord operator() (const range<unsigned>& current, const FastAllocator::CachedAllocator& alloc)
{
vfloat4 lower(pos_inf);
vfloat4 upper(neg_inf);
size_t items = current.size();
size_t start = current.begin();
assert(items <= 1);
/* allocate leaf node */
InstanceArrayPrimitive* accel = (InstanceArrayPrimitive*) alloc.malloc1(items*sizeof(InstanceArrayPrimitive),BVH::byteAlignment);
NodeRef ref = BVH::encodeLeaf((char*)accel,items);
const InstanceArray* instance = this->mesh;
BBox3fa bounds = empty;
for (size_t i=0; i<items; i++)
{
const unsigned int primID = morton[start+i].index;
bounds.extend(instance->bounds(primID));
new (&accel[i]) InstanceArrayPrimitive(geomID_, primID);
}
BBox3fx box_o = (BBox3fx&)bounds;
#if ROTATE_TREE
if (N == 4)
box_o.lower.a = current.size();
#endif
return NodeRecord(ref,box_o);
}
private:
InstanceArray* mesh;
BVHBuilderMorton::BuildPrim* morton;
unsigned int geomID_ = std::numeric_limits<unsigned int>::max();
};
template<typename Mesh>
struct CalculateMeshBounds
{
@@ -568,14 +523,7 @@ namespace embree
#if defined(EMBREE_GEOMETRY_INSTANCE)
Builder* BVH4InstanceMeshBuilderMortonGeneral (void* bvh, Instance* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) { return new class BVHNMeshBuilderMorton<4,Instance,InstancePrimitive>((BVH4*)bvh,mesh,gtype,geomID,1,BVH4::maxLeafBlocks); }
#if defined(__AVX__)
Builder* BVH8InstanceMeshBuilderMortonGeneral (void* bvh, Instance* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) { return new class BVHNMeshBuilderMorton<8,Instance,InstancePrimitive>((BVH8*)bvh,mesh,gtype,geomID,1,BVH4::maxLeafBlocks); }
#endif
#endif
#if defined(EMBREE_GEOMETRY_INSTANCE_ARRAY)
Builder* BVH4InstanceArrayMeshBuilderMortonGeneral (void* bvh, InstanceArray* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) { return new class BVHNMeshBuilderMorton<4,InstanceArray,InstanceArrayPrimitive>((BVH4*)bvh,mesh,gtype,geomID,1,BVH4::maxLeafBlocks); }
#if defined(__AVX__)
Builder* BVH8InstanceArrayMeshBuilderMortonGeneral (void* bvh, InstanceArray* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) { return new class BVHNMeshBuilderMorton<8,InstanceArray,InstanceArrayPrimitive>((BVH8*)bvh,mesh,gtype,geomID,1,BVH4::maxLeafBlocks); }
Builder* BVH8InstanceMeshBuilderMortonGeneral (void* bvh, Instance* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) { return new class BVHNMeshBuilderMorton<8,Instance,InstancePrimitive>((BVH8*)bvh,mesh,gtype,geomID,1,BVH4::maxLeafBlocks); }
#endif
#endif
+4 -26
View File
@@ -15,7 +15,6 @@
#include "../geometry/quadi.h"
#include "../geometry/object.h"
#include "../geometry/instance.h"
#include "../geometry/instance_array.h"
#include "../geometry/subgrid.h"
#include "../common/state.h"
@@ -151,7 +150,7 @@ namespace embree
const size_t leaf_bytes = size_t(1.2*Primitive::blocks(numPrimitives)*sizeof(Primitive));
bvh->alloc.init_estimate(node_bytes+leaf_bytes);
settings.singleThreadThreshold = bvh->alloc.fixSingleThreadThreshold(N,DEFAULT_SINGLE_THREAD_THRESHOLD,numPrimitives,node_bytes+leaf_bytes);
prims.resize(numPrimitives);
prims.resize(numPrimitives);
PrimInfo pinfo = mesh ?
createPrimRefArray(mesh,geomID_,numPrimitives,prims,bvh->scene->progressInterface) :
@@ -519,35 +518,14 @@ namespace embree
#endif
#if defined(EMBREE_GEOMETRY_INSTANCE)
Builder* BVH4InstanceSceneBuilderSAH (void* bvh, Scene* scene, Geometry::GTypeMask gtype) {
return new BVHNBuilderSAH<4,InstancePrimitive>((BVH4*)bvh,scene,4,1.0f,1,1,gtype);
}
Builder* BVH4InstanceSceneBuilderSAH (void* bvh, Scene* scene, Geometry::GTypeMask gtype) { return new BVHNBuilderSAH<4,InstancePrimitive>((BVH4*)bvh,scene,4,1.0f,1,1,gtype); }
Builder* BVH4InstanceMeshBuilderSAH (void* bvh, Instance* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) {
return new BVHNBuilderSAH<4,InstancePrimitive>((BVH4*)bvh,mesh,geomID,4,1.0f,1,inf,gtype);
}
#if defined(__AVX__)
Builder* BVH8InstanceSceneBuilderSAH (void* bvh, Scene* scene, Geometry::GTypeMask gtype) {
return new BVHNBuilderSAH<8,InstancePrimitive>((BVH8*)bvh,scene,8,1.0f,1,1,gtype);
}
Builder* BVH8InstanceSceneBuilderSAH (void* bvh, Scene* scene, Geometry::GTypeMask gtype) { return new BVHNBuilderSAH<8,InstancePrimitive>((BVH8*)bvh,scene,8,1.0f,1,1,gtype); }
Builder* BVH8InstanceMeshBuilderSAH (void* bvh, Instance* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) {
return new BVHNBuilderSAH<8,InstancePrimitive>((BVH8*)bvh,mesh,geomID,8,1.0f,1,1,gtype);
}
#endif
#endif
#if defined(EMBREE_GEOMETRY_INSTANCE_ARRAY)
Builder* BVH4InstanceArraySceneBuilderSAH (void* bvh, Scene* scene, Geometry::GTypeMask gtype) {
return new BVHNBuilderSAH<4,InstanceArrayPrimitive>((BVH4*)bvh,scene,4,1.0f,1,1,gtype);
}
Builder* BVH4InstanceArrayMeshBuilderSAH (void* bvh, InstanceArray* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) {
return new BVHNBuilderSAH<4,InstanceArrayPrimitive>((BVH4*)bvh,mesh,geomID,4,1.0f,1,1,gtype);
}
#if defined(__AVX__)
Builder* BVH8InstanceArraySceneBuilderSAH (void* bvh, Scene* scene, Geometry::GTypeMask gtype) {
return new BVHNBuilderSAH<8,InstanceArrayPrimitive>((BVH8*)bvh,scene,8,1.0f,1,1,gtype);
}
Builder* BVH8InstanceArrayMeshBuilderSAH (void* bvh, InstanceArray* mesh, Geometry::GTypeMask gtype, unsigned int geomID, size_t mode) {
return new BVHNBuilderSAH<8,InstanceArrayPrimitive>((BVH8*)bvh,mesh,geomID,8,1.0f,1,1,gtype);
return new BVHNBuilderSAH<8,InstancePrimitive>((BVH8*)bvh,mesh,geomID,8,1.0f,1,inf,gtype);
}
#endif
#endif

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