Post

Replies

Boosts

Views

Activity

Reply to What's error with this Metal Compute Function in Apple Silicon?
The bug is fixed. Reason: Use untracked MTLHeaps, but not using MTLFence to protect the GPU could execute both filters in parallel, and thus read uninitialized dynamic texture data allocated from the heap. Solution1: set MTLFence, see https://developer.apple.com/documentation/metal/synchronization/implementing_a_multistage_image_filter_using_heaps_and_events Solution2: turn untracked MTLHeap to tracked MTLHeap, that it is, let heapDescriptor.hazarTrackingMode = MTLHazardTrackingModeTracked, see https://developer.apple.com/documentation/metal/mtlheapdescriptor/3131686-hazardtrackingmode
Jan ’22