From c30c6b2d4e5b0a2490af0ce865032e03605ab44f Mon Sep 17 00:00:00 2001 From: Michael Jones Date: Thu, 9 Nov 2023 22:23:37 +0100 Subject: [PATCH] Cycles: Fix Metal API validation error when Metal motion blur workaround is applied Following #114544: When running with Metal API validation enabled, allocating a zero-sized buffer results in validation errors. This silences that. Pull Request: https://projects.blender.org/blender/blender/pulls/114680 --- intern/cycles/device/metal/bvh.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/device/metal/bvh.mm b/intern/cycles/device/metal/bvh.mm index 45780b4f166..6e753688c1b 100644 --- a/intern/cycles/device/metal/bvh.mm +++ b/intern/cycles/device/metal/bvh.mm @@ -976,7 +976,7 @@ bool BVHMetal::build_TLAS(Progress &progress, storage_mode = MTLResourceStorageModeShared; } - id nullBuf = [device newBufferWithLength:0 options:storage_mode]; + id nullBuf = [device newBufferWithLength:sizeof(float3) options:storage_mode]; /* Create an acceleration structure. */ MTLAccelerationStructureTriangleGeometryDescriptor *geomDesc =