Cycles: oneAPI: enable Hardware Raytracing for Raytrace/MNEE kernels

We do so if Embree 4.1+ is present.
This commit is contained in:
Xavier Hallade
2023-05-11 18:47:25 +02:00
parent 38416e7ad2
commit 5ec2495550
2 changed files with 22 additions and 14 deletions

View File

@@ -122,8 +122,12 @@ bool OneapiDevice::check_peer_access(Device * /*peer_device*/)
bool OneapiDevice::can_use_hardware_raytracing_for_features(uint requested_features) const
{
/* MNEE and Ray-trace kernels currently don't work correctly with HWRT. */
/* MNEE and Raytrace kernels work correctly with Hardware Raytracing starting with Embree 4.1. */
# if defined(RTC_VERSION) && RTC_VERSION < 40100
return !(requested_features & (KERNEL_FEATURE_MNEE | KERNEL_FEATURE_NODE_RAYTRACE));
# else
return true;
# endif
}
BVHLayoutMask OneapiDevice::get_bvh_layout_mask(uint requested_features) const