fill(buffer:range:value:)
Encodes a command that fills a buffer with a constant value for each byte.
Declaration
func fill(buffer: any MTLBuffer, range: Range<Int>, value: UInt8)Parameters
- buffer:
A buffer instance the command assigns each byte in
rangetovalue. - range:
A range of bytes within the
bufferthe command assignsvalueto. The range’s Count property needs to be greater than0. The range’s Count, Lowerbound, and Upperbound properties need to be a multiple of4in macOS, but can be any value in iOS and tvOS. - value:
The value to write to each byte.