import type { _MTLBuffer } from "./MTLBuffer.js";
import type { _MTLCommandEncoder } from "./MTLCommandEncoder.js";
import type { _MTLCounterSampleBuffer } from "./MTLCounterSampleBuffer.js";
import type { _MTLFence } from "./MTLFence.js";
import type { _MTLIndirectCommandBuffer } from "./MTLIndirectCommandBuffer.js";
import type { _MTLResource } from "./MTLResource.js";
import type { _MTLTensor } from "./MTLTensor.js";
import type { _MTLTensorExtents } from "./MTLTensorExtents.js";
import type { _MTLTexture } from "./MTLTexture.js";
import type { MTLOrigin } from "../structs/MTLOrigin.js";
import type { MTLRegion } from "../structs/MTLRegion.js";
import type { MTLSize } from "../structs/MTLSize.js";
import type { NSRange } from "../structs/NSRange.js";
import type { MTLBlitOption } from "./MTLBlitOption.js";
export interface _MTLBlitCommandEncoder extends _MTLCommandEncoder {
    /**
     * @method synchronizeResource: @abstract Flush any copy of this resource from the device's caches, and invalidate any CPU caches if needed. @param resource The resource to page off. @discussion When the device writes to a resource with a storage mode of MTLResourceStorageModeManaged, those writes may be cached (for example, in VRAM or on chip renderer cache), making any CPU access (either MTLBuffer.contents or -[MTLTexture getBytes:...] and -[MTLTexture replaceRegion:]) produce undefined results. To allow the CPU to see what the device has written, a CommandBuffer containing this synchronization must be executed. After completion of the CommandBuffer, the CPU can access the contents of the resource safely.
     */
    synchronizeResource$?(resource: _MTLResource): void;
    /**
     * @method synchronizeTexture:slice:mipmapLevel: @abstract Flush any copy of this image from the device's caches, and invalidate CPU caches if needed. @param texture The texture to page off. @param slice The slice of the texture to page off. @param level The mipmap level of the texture to flush. @discussion See the discussion of -synchronizeResource. -synchronizeTexture:slice:mipmapLevel performs the same role, except it may flush only a subset of the texture storage, rather than the entire texture.
     */
    synchronizeTexture$slice$level$?(texture: _MTLTexture, slice: number, level: number): void;
    /**
     * @method copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin: @abstract Copy a rectangle of pixels between textures.
     */
    copyFromTexture$sourceSlice$sourceLevel$sourceOrigin$sourceSize$toTexture$destinationSlice$destinationLevel$destinationOrigin$?(sourceTexture: _MTLTexture, sourceSlice: number, sourceLevel: number, sourceOrigin: MTLOrigin, sourceSize: MTLSize, destinationTexture: _MTLTexture, destinationSlice: number, destinationLevel: number, destinationOrigin: MTLOrigin): void;
    /**
     * @method copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin: @abstract Copy an image from a buffer into a texture.
     */
    copyFromBuffer$sourceOffset$sourceBytesPerRow$sourceBytesPerImage$sourceSize$toTexture$destinationSlice$destinationLevel$destinationOrigin$?(sourceBuffer: _MTLBuffer, sourceOffset: number, sourceBytesPerRow: number, sourceBytesPerImage: number, sourceSize: MTLSize, destinationTexture: _MTLTexture, destinationSlice: number, destinationLevel: number, destinationOrigin: MTLOrigin): void;
    /**
     * @method copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options: @abstract Copy an image from a buffer into a texture.
     */
    copyFromBuffer$sourceOffset$sourceBytesPerRow$sourceBytesPerImage$sourceSize$toTexture$destinationSlice$destinationLevel$destinationOrigin$options$?(sourceBuffer: _MTLBuffer, sourceOffset: number, sourceBytesPerRow: number, sourceBytesPerImage: number, sourceSize: MTLSize, destinationTexture: _MTLTexture, destinationSlice: number, destinationLevel: number, destinationOrigin: MTLOrigin, options: MTLBlitOption): void;
    /**
     * @method copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage: @abstract Copy an image from a texture into a buffer.
     */
    copyFromTexture$sourceSlice$sourceLevel$sourceOrigin$sourceSize$toBuffer$destinationOffset$destinationBytesPerRow$destinationBytesPerImage$?(sourceTexture: _MTLTexture, sourceSlice: number, sourceLevel: number, sourceOrigin: MTLOrigin, sourceSize: MTLSize, destinationBuffer: _MTLBuffer, destinationOffset: number, destinationBytesPerRow: number, destinationBytesPerImage: number): void;
    /**
     * @method copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:sourceOptions:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:options: @abstract Copy an image from a texture into a buffer.
     */
    copyFromTexture$sourceSlice$sourceLevel$sourceOrigin$sourceSize$toBuffer$destinationOffset$destinationBytesPerRow$destinationBytesPerImage$options$?(sourceTexture: _MTLTexture, sourceSlice: number, sourceLevel: number, sourceOrigin: MTLOrigin, sourceSize: MTLSize, destinationBuffer: _MTLBuffer, destinationOffset: number, destinationBytesPerRow: number, destinationBytesPerImage: number, options: MTLBlitOption): void;
    /**
     * @method generateMipmapsForTexture: @abstract Generate mipmaps for a texture from the base level up to the max level.
     */
    generateMipmapsForTexture$?(texture: _MTLTexture): void;
    /**
     * @method fillBuffer:range:value: @abstract Fill a buffer with a fixed value in each byte.
     */
    fillBuffer$range$value$?(buffer: _MTLBuffer, range: NSRange, value: number): void;
    /**
     * @method copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount: @abstract Copy whole surfaces between textures. @discussion Convenience function to copy sliceCount * levelCount whole surfaces between textures The source and destination pixel format must be identical. The source and destination sample count must be identical. The sourceLevel mip in sourceTexture must have the same dimension as the destinationLevel mip in destinationTexture. The sourceTexture must have at least sourceLevel + levelCount mips The destinationTexture must have at least destinationLevel + levelCount mips The sourceTexture must have at least sourceSlice + sliceCount array slices The destinationTexture must have at least destinationSlice + sliceCount array slices
     */
    copyFromTexture$sourceSlice$sourceLevel$toTexture$destinationSlice$destinationLevel$sliceCount$levelCount$?(sourceTexture: _MTLTexture, sourceSlice: number, sourceLevel: number, destinationTexture: _MTLTexture, destinationSlice: number, destinationLevel: number, sliceCount: number, levelCount: number): void;
    /**
     * @method copyFromTexture:toTexture: @abstract Copy as many whole surfaces as possible between textures. @discussion Convenience function that calls copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount: The source and destination pixel format must be identical. The source and destination sample count must be identical. Either: - sourceTexture must have a mip M with identical dimensions as the first mip of destinationTexture: sourceLevel = M, destinationLevel = 0 - destinationTexture must have a mip M with identical dimensions as the first mip of sourceTexture: sourceLevel = 0, destinationLevel = M Computes: levelCount = min(sourceTexture.mipmapLevelCount - sourceLevel, destinationTexture.mipmapLevelCount - destinationLevel) sliceCount = min(sourceTexture.arrayLength, destinationTexture.arrayLength) Then invokes the method above using the computed parameters.
     */
    copyFromTexture$toTexture$?(sourceTexture: _MTLTexture, destinationTexture: _MTLTexture): void;
    /**
     * @method copyFromBuffer:sourceOffset:toBuffer:destinationOffset:size: @abstract Basic memory copy between buffers.
     */
    copyFromBuffer$sourceOffset$toBuffer$destinationOffset$size$?(sourceBuffer: _MTLBuffer, sourceOffset: number, destinationBuffer: _MTLBuffer, destinationOffset: number, size: number): void;
    /**
     * @method updateFence: @abstract Update the fence to capture all GPU work so far enqueued by this encoder. @discussion The fence is updated at kernel submission to maintain global order and prevent deadlock. Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
     */
    updateFence$?(fence: _MTLFence): void;
    /**
     * @method waitForFence: @abstract Prevent further GPU work until the fence is reached. @discussion The fence is evaluated at kernel submission to maintain global order and prevent deadlock. Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
     */
    waitForFence$?(fence: _MTLFence): void;
    /**
     * @method getTextureAccessCounters:region:mipLevel:slice:type:resetCounters:countersBuffer:countersBufferOffset @abstract Copies tile access counters within specified region into provided buffer
     */
    getTextureAccessCounters$region$mipLevel$slice$resetCounters$countersBuffer$countersBufferOffset$?(texture: _MTLTexture, region: MTLRegion, mipLevel: number, slice: number, resetCounters: boolean, countersBuffer: _MTLBuffer, countersBufferOffset: number): void;
    /**
     * @method resetTextureAccessCounters:region:mipLevel:slice:type: @abstract Resets tile access counters within specified region
     */
    resetTextureAccessCounters$region$mipLevel$slice$?(texture: _MTLTexture, region: MTLRegion, mipLevel: number, slice: number): void;
    /**
     * @method optimizeContentsForGPUAccess: @abstract Optimizes the texture data to ensure the best possible performance when accessing content on the GPU at the expense of CPU-access performance.
     */
    optimizeContentsForGPUAccess$?(texture: _MTLTexture): void;
    /**
     * @method optimizeContentsForGPUAccess:slice:level: @abstract Optimizes a subset of the texture data to ensure the best possible performance when accessing content on the GPU at the expense of CPU-access performance.
     */
    optimizeContentsForGPUAccess$slice$level$?(texture: _MTLTexture, slice: number, level: number): void;
    /**
     * @method optimizeContentsForCPUAccess: @abstract Optimizes the texture data to ensure the best possible performance when accessing content on the CPU at the expense of GPU-access performance.
     */
    optimizeContentsForCPUAccess$?(texture: _MTLTexture): void;
    /**
     * @method optimizeContentsForCPUAccess:slice:level: @abstract Optimizes a subset of the texture data to ensure the best possible performance when accessing content on the CPU at the expense of GPU-access performance.
     */
    optimizeContentsForCPUAccess$slice$level$?(texture: _MTLTexture, slice: number, level: number): void;
    /**
     * @method resetCommandsInBuffer:withRange: @abstract reset commands in a indirect command buffer using the GPU
     */
    resetCommandsInBuffer$withRange$?(buffer: _MTLIndirectCommandBuffer, range: NSRange): void;
    /**
     * @method copyIndirectCommandBuffer:source:sourceRange:destination:destinationIndex @abstract copy a region of a buffer into a destination buffer starting at destinationIndex using the GPU
     */
    copyIndirectCommandBuffer$sourceRange$destination$destinationIndex$?(source: _MTLIndirectCommandBuffer, sourceRange: NSRange, destination: _MTLIndirectCommandBuffer, destinationIndex: number): void;
    /**
     * @method optimizeIndirectCommandBuffer:withRange: @abstract Encodes a command that can improve the performance of a range of commands within an indirect command buffer.
     */
    optimizeIndirectCommandBuffer$withRange$?(indirectCommandBuffer: _MTLIndirectCommandBuffer, range: NSRange): void;
    /**
     * @method sampleCountersInBuffer:atSampleIndex:withBarrier: @abstract Sample hardware counters at this point in the blit encoder and store the counter sample into the sample buffer at the specified index. @param sampleBuffer The sample buffer to sample into @param sampleIndex The index into the counter buffer to write the sample. @param barrier Insert a barrier before taking the sample. Passing YES will ensure that all work encoded before this operation in the encoder is complete but does not isolate the work with respect to other encoders. Passing NO will allow the sample to be taken concurrently with other operations in this encoder. In general, passing YES will lead to more repeatable counter results but may negatively impact performance. Passing NO will generally be higher performance but counter results may not be repeatable. @discussion On devices where MTLCounterSamplingPointAtBlitBoundary is unsupported, this method is not available and will generate an error if called.
     */
    sampleCountersInBuffer$atSampleIndex$withBarrier$?(sampleBuffer: _MTLCounterSampleBuffer, sampleIndex: number, barrier: boolean): void;
    /**
     * @method resolveCounters:inRange:destinationBuffer:destinationOffset: @param sampleBuffer The sample buffer to resolve. @param range The range of indices to resolve. @param destinationBuffer The buffer to resolve values into. @param destinationOffset The offset to begin writing values out to. This must be a multiple of the minimum constant buffer alignment. @abstract Resolve the counters from the raw buffer to a processed buffer. @discussion Samples that encountered an error during resolve will be set to MTLCounterErrorValue.
     */
    resolveCounters$inRange$destinationBuffer$destinationOffset$?(sampleBuffer: _MTLCounterSampleBuffer, range: NSRange, destinationBuffer: _MTLBuffer, destinationOffset: number): void;
    /**
     * Encodes a command to copy data from a slice of one tensor into a slice of another tensor. This command applies reshapes if `sourceTensor` and `destinationTensor` are not aliasable. - Parameters: - sourceTensor: A tensor instance that this command copies data from. - sourceOrigin: An array of offsets, in elements, to the first element of the slice of `sourceTensor` that this command copies data from. - sourceDimensions: An array of sizes, in elements, of the slice `sourceTensor` that this command copies data from. - destinationTensor: A tensor instance that this command copies data to. - destinationOrigin: An array of offsets, in elements, to the first element of the slice of `destinationTensor` that this command copies data to. - destinationDimensions: An array of sizes, in elements, of the slice of `destinationTensor` that this command copies data to.
     */
    copyFromTensor$sourceOrigin$sourceDimensions$toTensor$destinationOrigin$destinationDimensions$?(sourceTensor: _MTLTensor, sourceOrigin: _MTLTensorExtents, sourceDimensions: _MTLTensorExtents, destinationTensor: _MTLTensor, destinationOrigin: _MTLTensorExtents, destinationDimensions: _MTLTensorExtents): void;
}
