import '../../../assert/js/assert.js';
import '../../../globals.js';
/**
 * WebGPU commands should be run through here, so we can record them for later playback (and possibly other reasons).
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import { WebGPURecorder } from '../imports.js';
import { WebGPUCommandList } from './WebGPURecorder.js';
export type PreferredCanvasFormat = 'bgra8unorm' | 'rgba8unorm';
export default class WebGPUAPI {
    recorder: WebGPURecorder | null;
    enableRecording(): void;
    startRecording(): WebGPUCommandList;
    stopRecording(commandList: WebGPUCommandList): void;
    getAdapter(options?: GPURequestAdapterOptions): Promise<GPUAdapter | null>;
    getPreferredCanvasFormat(): PreferredCanvasFormat;
    adapterHasFeature(adapter: GPUAdapter, featureName: string): boolean;
    adapterRequestDevice(adapter: GPUAdapter, descriptor?: GPUDeviceDescriptor): Promise<GPUDevice | null>;
    deviceCreateBuffer(device: GPUDevice, descriptor: GPUBufferDescriptor): GPUBuffer;
    deviceCreateQuerySet(device: GPUDevice, descriptor: GPUQuerySetDescriptor): GPUQuerySet;
    deviceCreateBindGroupLayout(device: GPUDevice, descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout;
    deviceCreatePipelineLayout(device: GPUDevice, descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
    deviceCreateShaderModule(device: GPUDevice, descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
    deviceCreateComputePipeline(device: GPUDevice, descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
    deviceCreateComputePipelineAsync(device: GPUDevice, descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
    deviceCreateBindGroup(device: GPUDevice, descriptor: GPUBindGroupDescriptor): GPUBindGroup;
    deviceCreateCommandEncoder(device: GPUDevice, descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
    deviceWriteBuffer(device: GPUDevice, buffer: GPUBuffer, bufferOffset: number, data: BufferSource | SharedArrayBuffer, dataOffset?: number, size?: number): void;
    deviceQueueSubmit(device: GPUDevice, commandBuffers: Iterable<GPUCommandBuffer>): void;
    deviceHasFeature(device: GPUDevice, featureName: string): boolean;
    deviceDestroy(device: GPUDevice): void;
    bufferMapAsync(buffer: GPUBuffer, mode: GPUMapModeFlags, offset?: number, size?: number): Promise<void>;
    bufferUnmap(buffer: GPUBuffer): void;
    bufferGetMappedRange(buffer: GPUBuffer, offset?: number, size?: number): ArrayBuffer;
    bufferDestroy(buffer: GPUBuffer): void;
    encoderBeginRenderPass(encoder: GPUCommandEncoder, descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
    encoderBeginComputePass(encoder: GPUCommandEncoder, descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
    encoderCopyBufferToBuffer(encoder: GPUCommandEncoder, source: GPUBuffer, sourceOffset: number, destination: GPUBuffer, destinationOffset: number, size: number): void;
    encoderCopyBufferToTexture(encoder: GPUCommandEncoder, source: GPUImageCopyBuffer, destination: GPUImageCopyTexture, copySize: GPUExtent3DStrict): void;
    encoderCopyTextureToBuffer(encoder: GPUCommandEncoder, source: GPUImageCopyTexture, destination: GPUImageCopyBuffer, copySize: GPUExtent3DStrict): void;
    encoderCopyTextureToTexture(encoder: GPUCommandEncoder, source: GPUImageCopyTexture, destination: GPUImageCopyTexture, copySize: GPUExtent3DStrict): void;
    encoderClearBuffer(encoder: GPUCommandEncoder, buffer: GPUBuffer, offset?: number, size?: number): void;
    encoderResolveQuerySet(encoder: GPUCommandEncoder, querySet: GPUQuerySet, firstQuery: number, queryCount: number, destination: GPUBuffer, destinationOffset: number): void;
    encoderFinish(encoder: GPUCommandEncoder, descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
    computePassEncoderSetPipeline(computePassEncoder: GPUComputePassEncoder, pipeline: GPUComputePipeline): void;
    computePassEncoderDispatchWorkgroups(computePassEncoder: GPUComputePassEncoder, x: number, y?: number, z?: number): void;
    computePassEncoderDispatchWorkgroupsIndirect(computePassEncoder: GPUComputePassEncoder, indirectBuffer: GPUBuffer, indirectOffset: number): void;
    passEncoderSetBindGroup(passEncoder: GPURenderPassEncoder | GPUComputePassEncoder, index: number, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<number>): void;
    computePassEncoderEnd(computePassEncoder: GPUComputePassEncoder): void;
    querySetDestroy(querySet: GPUQuerySet): void;
}
export declare const webgpu: WebGPUAPI;
//# sourceMappingURL=WebGPUAPI.d.ts.map