import type { NobjcObject } from "objc-js";
import type { _MTLDevice } from "./MTLDevice.js";
import type { _MTLResource } from "./MTLResource.js";
import type { _MTLTensor } from "./MTLTensor.js";
import type { _MTLTensorDescriptor } from "./MTLTensorDescriptor.js";
import type { _MTLTexture } from "./MTLTexture.js";
import type { _MTLTextureDescriptor } from "./MTLTextureDescriptor.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { NSRange } from "../structs/NSRange.js";
import type { MTLBufferSparseTier } from "./MTLBufferSparseTier.js";
export interface _MTLBuffer extends _MTLResource {
    /**
     * @method contents @abstract Returns the data pointer of this buffer's shared copy.
     */
    contents?(): NobjcObject;
    /**
     * @method didModifyRange: @abstract Inform the device of the range of a buffer that the CPU has modified, allowing the implementation to invalidate its caches of the buffer's content. @discussion When the application writes to a buffer's sysmem copy via @a contents, that range of the buffer immediately becomes undefined for any accesses by the GPU (MTLDevice). To restore coherency, the buffer modification must be followed by -didModifyRange:, and then followed by a commit of the MTLCommandBuffer that will access the buffer. -didModifyRange does not make the contents coherent for any previously committed command buffers. Note: This method is only required if buffer is created with a storage mode of MTLResourceStorageModeManaged. It is not valid to invoke this method on buffers of other storage modes. @param range The range of bytes that have been modified.
     */
    didModifyRange$?(range: NSRange): void;
    /**
     * @method newTextureWithDescriptor:offset:bytesPerRow: @abstract Create a 2D texture or texture buffer that shares storage with this buffer.
     */
    newTextureWithDescriptor$offset$bytesPerRow$?(descriptor: _MTLTextureDescriptor, offset: number, bytesPerRow: number): _MTLTexture | null;
    /**
     * Creates a tensor that shares storage with this buffer. - Parameters: - descriptor: A description of the properties for the new tensor. - offset: Offset into the buffer at which the data of the tensor begins. - error: If an error occurs during creation, Metal populates this parameter to provide you information about it. If the descriptor specifies `MTLTensorUsageMachineLearning` usage, you need to observe the following restrictions: * pass in `0` for the `offset` parameter * set the element stride the descriptor to `1` * ensure that number of bytes per row is a multiple of `64` * for dimensions greater than `2`, make sure `strides[dim] = strides[dim -1] * dimensions[dim - 1]`
     */
    newTensorWithDescriptor$offset$error$?(descriptor: _MTLTensorDescriptor, offset: number, error: NobjcObject | null): _MTLTensor | null;
    /**
     * @method addDebugMarker:range: @abstract Adds a marker to a specific range in the buffer. When inspecting a buffer in the GPU debugging tools the marker will be shown. @param marker A label used for the marker. @param range The range of bytes the marker is using.
     */
    addDebugMarker$range$?(marker: _NSString, range: NSRange): void;
    /**
     * @method removeAllDebugMarkers @abstract Removes all debug markers from a buffer.
     */
    removeAllDebugMarkers?(): void;
    /**
     * @method newRemoteBufferViewForDevice: @abstract On Metal devices that support peer to peer transfers, this method is used to create a remote buffer view on another device within the peer group. The receiver must use MTLStorageModePrivate or be backed by an IOSurface.
     */
    newRemoteBufferViewForDevice$?(device: _MTLDevice): _MTLBuffer | null;
    /** @property length @abstract The length of the buffer in bytes. */
    length?(): number;
    /**
     * @property remoteStorageBuffer @abstract For Metal buffer objects that are remote views, this returns the buffer associated with the storage on the originating device.
     */
    remoteStorageBuffer?(): _MTLBuffer;
    /**
     * @property gpuAddress @abstract Represents the GPU virtual address of a buffer resource
     */
    gpuAddress?(): number;
    /** @property sparseBufferTier @abstract Query support tier for sparse buffers. */
    sparseBufferTier?(): MTLBufferSparseTier;
}
