Class MetalBuffer¶
Namespace: Apogee.Graphics.Metal
Assembly: Apogee.Graphics.dll
A Metal buffer. Device-local buffers are private (the GPU's), upload and readback buffers are shared and mapped for their whole life.
public sealed class MetalBuffer : GpuBuffer, IDisposable
Inheritance¶
object ← GpuBuffer ← MetalBuffer
Implements¶
Inherited Members¶
GpuBuffer.Size, GpuBuffer.Kind, GpuBuffer.Usage, GpuBuffer.Address, GpuBuffer.Mapped, GpuBuffer.AsSpan(), GpuBuffer.Write(ReadOnlySpan<byte>, ulong), GpuBuffer.Read(ulong, int), GpuBuffer.Dispose(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties¶
Address¶
The GPU address of the first byte: what a shader's pointer holds.
public override ulong Address { get; }
Property Value¶
Handle¶
public Buffer* Handle { get; }
Property Value¶
Buffer*
Methods¶
Dispose()¶
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
Flush(ulong, ulong)¶
Makes CPU writes to a range of the mapped memory visible to the GPU (a no-op for coherent memory).
protected override void Flush(ulong offset, ulong length)
Parameters¶
offset ulong
length ulong
Invalidate(ulong, ulong)¶
Makes GPU writes to a range of the mapped memory visible to the CPU (a no-op for coherent memory).
protected override void Invalidate(ulong offset, ulong length)
Parameters¶
offset ulong
length ulong