Fix #118514: Cycles MetalRT crash with empty scene

Pull Request: https://projects.blender.org/blender/blender/pulls/118907
This commit is contained in:
Brecht Van Lommel
2024-02-29 17:28:13 +01:00
committed by Brecht Van Lommel
parent a060e96103
commit 36c11ee482
+1 -1
View File
@@ -523,7 +523,7 @@ bool MetalDeviceQueue::enqueue(DeviceKernel kernel,
break;
}
if (bvhMetalRT) {
if (bvhMetalRT && bvhMetalRT->accel_struct) {
/* Mark all Accelerations resources as used */
[mtlComputeCommandEncoder useResource:bvhMetalRT->accel_struct
usage:MTLResourceUsageRead];