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
This commit is contained in:
Michael Jones 2023-11-09 22:23:37 +01:00 committed by Michael Jones (Apple)
parent 360684d5a4
commit c30c6b2d4e
1 changed files with 1 additions and 1 deletions

View File

@ -976,7 +976,7 @@ bool BVHMetal::build_TLAS(Progress &progress,
storage_mode = MTLResourceStorageModeShared;
}
id<MTLBuffer> nullBuf = [device newBufferWithLength:0 options:storage_mode];
id<MTLBuffer> nullBuf = [device newBufferWithLength:sizeof(float3) options:storage_mode];
/* Create an acceleration structure. */
MTLAccelerationStructureTriangleGeometryDescriptor *geomDesc =