From e7312b1ad50f585760573fa417c15613d0230ead Mon Sep 17 00:00:00 2001 From: Stefan Werner Date: Tue, 29 Jul 2025 10:40:28 +0200 Subject: [PATCH] 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 --- intern/cycles/device/oneapi/device_impl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intern/cycles/device/oneapi/device_impl.cpp b/intern/cycles/device/oneapi/device_impl.cpp index 70fbfa9d02b..1de764fb83e 100644 --- a/intern/cycles/device/oneapi/device_impl.cpp +++ b/intern/cycles/device/oneapi/device_impl.cpp @@ -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