Cannot convert value of type 'Int' to expected argument type 'UnsafeRawPointer'

What I’m trying to do Initialise a buffer for metal that contains an Int value The Problem import MetalKit … func doStuff(gra: [Int], dist: Int) { let graphBuff = device?.makeBuffer(bytes: gra, length: MemoryLayout<Int>.size * count, options: .storageModeShared) let distanceBuff = device?.makeBuffer(bytes: dist, // Cannot convert value of type ‘Int’ to expected argument type ‘UnsafeRawPointer’ length:… Read More Cannot convert value of type 'Int' to expected argument type 'UnsafeRawPointer'