Cycles: Explicitly setting SYCL device for Embree

This fixes issues when using Embree on mutliple GPUs.
A previous workaround used separate contexts, this one now
lets us keep a single context for all GPUs.

Pull Request: https://projects.blender.org/blender/blender/pulls/143089
This commit is contained in:
Stefan Werner
2025-07-29 10:40:28 +02:00
parent 77945b7cd2
commit e7312b1ad5

View File

@@ -31,6 +31,7 @@
* support SYCL. */
extern "C" RTCDevice rtcNewSYCLDevice(sycl::context context, const char *config);
extern "C" bool rtcIsSYCLDeviceSupported(const sycl::device sycl_device);
extern "C" void rtcSetDeviceSYCLDevice(RTCDevice device, const sycl::device sycl_device);
# endif
CCL_NAMESPACE_BEGIN
@@ -1018,6 +1019,7 @@ bool OneapiDevice::create_queue(SyclQueue *&external_queue,
oneapi_error_string_ =
"Hardware Raytracing is not available; please install "
"\"intel-level-zero-gpu-raytracing\" to enable it or disable Embree on GPU.";
rtcSetDeviceSYCLDevice(*device_object_ptr, devices[device_index]);
}
}
# else