Fix #118514: Cycles MetalRT crash with empty scene
Pull Request: https://projects.blender.org/blender/blender/pulls/118907
This commit is contained in:
committed by
Brecht Van Lommel
parent
a060e96103
commit
36c11ee482
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user