deno.land / x / deno@v1.28.2 / ext / webgpu / webgpu.idl
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143interface mixin GPUObjectBase { attribute USVString label;};
dictionary GPUObjectDescriptorBase { USVString label;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUSupportedLimits { readonly attribute unsigned long maxTextureDimension1D; readonly attribute unsigned long maxTextureDimension2D; readonly attribute unsigned long maxTextureDimension3D; readonly attribute unsigned long maxTextureArrayLayers; readonly attribute unsigned long maxBindGroups; readonly attribute unsigned long maxDynamicUniformBuffersPerPipelineLayout; readonly attribute unsigned long maxDynamicStorageBuffersPerPipelineLayout; readonly attribute unsigned long maxSampledTexturesPerShaderStage; readonly attribute unsigned long maxSamplersPerShaderStage; readonly attribute unsigned long maxStorageBuffersPerShaderStage; readonly attribute unsigned long maxStorageTexturesPerShaderStage; readonly attribute unsigned long maxUniformBuffersPerShaderStage; readonly attribute unsigned long long maxUniformBufferBindingSize; readonly attribute unsigned long long maxStorageBufferBindingSize; readonly attribute unsigned long minUniformBufferOffsetAlignment; readonly attribute unsigned long minStorageBufferOffsetAlignment; readonly attribute unsigned long maxVertexBuffers; readonly attribute unsigned long maxVertexAttributes; readonly attribute unsigned long maxVertexBufferArrayStride; readonly attribute unsigned long maxInterStageShaderComponents; readonly attribute unsigned long maxComputeWorkgroupStorageSize; readonly attribute unsigned long maxComputeInvocationsPerWorkgroup; readonly attribute unsigned long maxComputeWorkgroupSizeX; readonly attribute unsigned long maxComputeWorkgroupSizeY; readonly attribute unsigned long maxComputeWorkgroupSizeZ; readonly attribute unsigned long maxComputeWorkgroupsPerDimension;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUSupportedFeatures { readonly setlike<DOMString>;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUAdapterInfo { readonly attribute DOMString vendor; readonly attribute DOMString architecture; readonly attribute DOMString device; readonly attribute DOMString description;};
enum GPUPredefinedColorSpace { "srgb",};
interface mixin NavigatorGPU { [SameObject, SecureContext] readonly attribute GPU gpu;};Navigator includes NavigatorGPU;WorkerNavigator includes NavigatorGPU;
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPU { Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options = {});};
dictionary GPURequestAdapterOptions { GPUPowerPreference powerPreference; boolean forceFallbackAdapter = false;};
enum GPUPowerPreference { "low-power", "high-performance",};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUAdapter { [SameObject] readonly attribute GPUSupportedFeatures features; [SameObject] readonly attribute GPUSupportedLimits limits; readonly attribute boolean isFallbackAdapter; Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {}); Promise<GPUAdapterInfo> requestAdapterInfo(optional sequence<DOMString> unmaskHints = []);};
dictionary GPUDeviceDescriptor : GPUObjectDescriptorBase { sequence<GPUFeatureName> requiredFeatures = []; record<DOMString, GPUSize64> requiredLimits = {};};
enum GPUFeatureName { "depth-clip-control", "depth24unorm-stencil8", "depth32float-stencil8", "texture-compression-bc", "texture-compression-etc2", "texture-compression-astc", "timestamp-query", "indirect-first-instance", "shader-f16",};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUDevice : EventTarget { [SameObject] readonly attribute GPUSupportedFeatures features; [SameObject] readonly attribute GPUSupportedLimits limits; [SameObject] readonly attribute GPUQueue queue; undefined destroy(); GPUBuffer createBuffer(GPUBufferDescriptor descriptor); GPUTexture createTexture(GPUTextureDescriptor descriptor); GPUSampler createSampler(optional GPUSamplerDescriptor descriptor = {}); GPUBindGroupLayout createBindGroupLayout(GPUBindGroupLayoutDescriptor descriptor); GPUPipelineLayout createPipelineLayout(GPUPipelineLayoutDescriptor descriptor); GPUBindGroup createBindGroup(GPUBindGroupDescriptor descriptor); GPUShaderModule createShaderModule(GPUShaderModuleDescriptor descriptor); GPUComputePipeline createComputePipeline(GPUComputePipelineDescriptor descriptor); GPURenderPipeline createRenderPipeline(GPURenderPipelineDescriptor descriptor); Promise<GPUComputePipeline> createComputePipelineAsync(GPUComputePipelineDescriptor descriptor); Promise<GPURenderPipeline> createRenderPipelineAsync(GPURenderPipelineDescriptor descriptor); GPUCommandEncoder createCommandEncoder(optional GPUCommandEncoderDescriptor descriptor = {}); GPURenderBundleEncoder createRenderBundleEncoder(GPURenderBundleEncoderDescriptor descriptor); GPUQuerySet createQuerySet(GPUQuerySetDescriptor descriptor);};GPUDevice includes GPUObjectBase;
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUBuffer { Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size); ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size); undefined unmap(); undefined destroy();};GPUBuffer includes GPUObjectBase;
dictionary GPUBufferDescriptor : GPUObjectDescriptorBase { required GPUSize64 size; required GPUBufferUsageFlags usage; boolean mappedAtCreation = false;};
typedef [EnforceRange] unsigned long GPUBufferUsageFlags;[Exposed=(Window, DedicatedWorker)]namespace GPUBufferUsage { const GPUFlagsConstant MAP_READ = 0x0001; const GPUFlagsConstant MAP_WRITE = 0x0002; const GPUFlagsConstant COPY_SRC = 0x0004; const GPUFlagsConstant COPY_DST = 0x0008; const GPUFlagsConstant INDEX = 0x0010; const GPUFlagsConstant VERTEX = 0x0020; const GPUFlagsConstant UNIFORM = 0x0040; const GPUFlagsConstant STORAGE = 0x0080; const GPUFlagsConstant INDIRECT = 0x0100; const GPUFlagsConstant QUERY_RESOLVE = 0x0200;};
typedef [EnforceRange] unsigned long GPUMapModeFlags;[Exposed=(Window, DedicatedWorker)]namespace GPUMapMode { const GPUFlagsConstant READ = 0x0001; const GPUFlagsConstant WRITE = 0x0002;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUTexture { GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {}); undefined destroy();};GPUTexture includes GPUObjectBase;
dictionary GPUTextureDescriptor : GPUObjectDescriptorBase { required GPUExtent3D size; GPUIntegerCoordinate mipLevelCount = 1; GPUSize32 sampleCount = 1; GPUTextureDimension dimension = "2d"; required GPUTextureFormat format; required GPUTextureUsageFlags usage;};
enum GPUTextureDimension { "1d", "2d", "3d",};
typedef [EnforceRange] unsigned long GPUTextureUsageFlags;[Exposed=(Window, DedicatedWorker)]namespace GPUTextureUsage { const GPUFlagsConstant COPY_SRC = 0x01; const GPUFlagsConstant COPY_DST = 0x02; const GPUFlagsConstant TEXTURE_BINDING = 0x04; const GPUFlagsConstant STORAGE_BINDING = 0x08; const GPUFlagsConstant RENDER_ATTACHMENT = 0x10;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUTextureView {};GPUTextureView includes GPUObjectBase;
dictionary GPUTextureViewDescriptor : GPUObjectDescriptorBase { GPUTextureFormat format; GPUTextureViewDimension dimension; GPUTextureAspect aspect = "all"; GPUIntegerCoordinate baseMipLevel = 0; GPUIntegerCoordinate mipLevelCount; GPUIntegerCoordinate baseArrayLayer = 0; GPUIntegerCoordinate arrayLayerCount;};
enum GPUTextureViewDimension { "1d", "2d", "2d-array", "cube", "cube-array", "3d",};
enum GPUTextureAspect { "all", "stencil-only", "depth-only",};
enum GPUTextureFormat { // 8-bit formats "r8unorm", "r8snorm", "r8uint", "r8sint", // 16-bit formats "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", // 32-bit formats "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", // Packed 32-bit formats "rgb9e5ufloat", "rgb10a2unorm", "rg11b10ufloat", // 64-bit formats "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", // 128-bit formats "rgba32uint", "rgba32sint", "rgba32float", // Depth/stencil formats "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", // "depth24unorm-stencil8" feature "depth24unorm-stencil8", // "depth32float-stencil8" feature "depth32float-stencil8", // BC compressed formats usable if "texture-compression-bc" is both // supported by the device/user agent and enabled in requestDevice. "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", // ETC2 compressed formats usable if "texture-compression-etc2" is both // supported by the device/user agent and enabled in requestDevice. "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", // ASTC compressed formats usable if "texture-compression-astc" is both // supported by the device/user agent and enabled in requestDevice. "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb",};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUSampler {};GPUSampler includes GPUObjectBase;
dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { GPUAddressMode addressModeU = "clamp-to-edge"; GPUAddressMode addressModeV = "clamp-to-edge"; GPUAddressMode addressModeW = "clamp-to-edge"; GPUFilterMode magFilter = "nearest"; GPUFilterMode minFilter = "nearest"; GPUMipmapFilterMode mipmapFilter = "nearest"; float lodMinClamp = 0; float lodMaxClamp = 32; GPUCompareFunction compare; [Clamp] unsigned short maxAnisotropy = 1;};
enum GPUAddressMode { "clamp-to-edge", "repeat", "mirror-repeat",};
enum GPUFilterMode { "nearest", "linear",};
enum GPUMipmapFilterMode { "nearest", "linear",};
enum GPUCompareFunction { "never", "less", "equal", "less-equal", "greater", "not-equal", "greater-equal", "always",};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUBindGroupLayout {};GPUBindGroupLayout includes GPUObjectBase;
dictionary GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase { required sequence<GPUBindGroupLayoutEntry> entries;};
dictionary GPUBindGroupLayoutEntry { required GPUIndex32 binding; required GPUShaderStageFlags visibility; GPUBufferBindingLayout buffer; GPUSamplerBindingLayout sampler; GPUTextureBindingLayout texture; GPUStorageTextureBindingLayout storageTexture;};
typedef [EnforceRange] unsigned long GPUShaderStageFlags;[Exposed=(Window, DedicatedWorker)]namespace GPUShaderStage { const GPUFlagsConstant VERTEX = 0x1; const GPUFlagsConstant FRAGMENT = 0x2; const GPUFlagsConstant COMPUTE = 0x4;};
enum GPUBufferBindingType { "uniform", "storage", "read-only-storage",};
dictionary GPUBufferBindingLayout { GPUBufferBindingType type = "uniform"; boolean hasDynamicOffset = false; GPUSize64 minBindingSize = 0;};
enum GPUSamplerBindingType { "filtering", "non-filtering", "comparison",};
dictionary GPUSamplerBindingLayout { GPUSamplerBindingType type = "filtering";};
enum GPUTextureSampleType { "float", "unfilterable-float", "depth", "sint", "uint",};
dictionary GPUTextureBindingLayout { GPUTextureSampleType sampleType = "float"; GPUTextureViewDimension viewDimension = "2d"; boolean multisampled = false;};
enum GPUStorageTextureAccess { "write-only",};
dictionary GPUStorageTextureBindingLayout { GPUStorageTextureAccess access = "write-only"; required GPUTextureFormat format; GPUTextureViewDimension viewDimension = "2d";};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUBindGroup {};GPUBindGroup includes GPUObjectBase;
dictionary GPUBindGroupDescriptor : GPUObjectDescriptorBase { required GPUBindGroupLayout layout; required sequence<GPUBindGroupEntry> entries;};
typedef (GPUSampler or GPUTextureView or GPUBufferBinding) GPUBindingResource;
dictionary GPUBindGroupEntry { required GPUIndex32 binding; required GPUBindingResource resource;};
dictionary GPUBufferBinding { required GPUBuffer buffer; GPUSize64 offset = 0; GPUSize64 size;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUPipelineLayout {};GPUPipelineLayout includes GPUObjectBase;
dictionary GPUPipelineLayoutDescriptor : GPUObjectDescriptorBase { required sequence<GPUBindGroupLayout> bindGroupLayouts;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUShaderModule { Promise<GPUCompilationInfo> compilationInfo();};GPUShaderModule includes GPUObjectBase;
dictionary GPUShaderModuleDescriptor : GPUObjectDescriptorBase { required USVString code; object sourceMap;};
enum GPUCompilationMessageType { "error", "warning", "info",};
[Exposed=(Window, DedicatedWorker), Serializable, SecureContext]interface GPUCompilationMessage { readonly attribute DOMString message; readonly attribute GPUCompilationMessageType type; readonly attribute unsigned long long lineNum; readonly attribute unsigned long long linePos; readonly attribute unsigned long long offset; readonly attribute unsigned long long length;};
[Exposed=(Window, DedicatedWorker), Serializable, SecureContext]interface GPUCompilationInfo { readonly attribute FrozenArray<GPUCompilationMessage> messages;};
enum GPUAutoLayoutMode { "auto"};
dictionary GPUPipelineDescriptorBase : GPUObjectDescriptorBase { required (GPUPipelineLayout or GPUAutoLayoutMode) layout;};
interface mixin GPUPipelineBase { [NewObject] GPUBindGroupLayout getBindGroupLayout(unsigned long index);};
dictionary GPUProgrammableStage { required GPUShaderModule module; required USVString entryPoint; record<USVString, GPUPipelineConstantValue> constants;};
typedef double GPUPipelineConstantValue; // May represent WGSL’s bool, f32, i32, u32.
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUComputePipeline {};GPUComputePipeline includes GPUObjectBase;GPUComputePipeline includes GPUPipelineBase;
dictionary GPUComputePipelineDescriptor : GPUPipelineDescriptorBase { required GPUProgrammableStage compute;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPURenderPipeline {};GPURenderPipeline includes GPUObjectBase;GPURenderPipeline includes GPUPipelineBase;
dictionary GPURenderPipelineDescriptor : GPUPipelineDescriptorBase { required GPUVertexState vertex; GPUPrimitiveState primitive = {}; GPUDepthStencilState depthStencil; GPUMultisampleState multisample = {}; GPUFragmentState fragment;};
dictionary GPUPrimitiveState { GPUPrimitiveTopology topology = "triangle-list"; GPUIndexFormat stripIndexFormat; GPUFrontFace frontFace = "ccw"; GPUCullMode cullMode = "none"; // Requires "depth-clip-control" feature. boolean unclippedDepth = false;};
enum GPUPrimitiveTopology { "point-list", "line-list", "line-strip", "triangle-list", "triangle-strip",};
enum GPUFrontFace { "ccw", "cw",};
enum GPUCullMode { "none", "front", "back",};
dictionary GPUMultisampleState { GPUSize32 count = 1; GPUSampleMask mask = 0xFFFFFFFF; boolean alphaToCoverageEnabled = false;};
dictionary GPUFragmentState : GPUProgrammableStage { required sequence<GPUColorTargetState?> targets;};
dictionary GPUColorTargetState { required GPUTextureFormat format; GPUBlendState blend; GPUColorWriteFlags writeMask = 0xF; // GPUColorWrite.ALL};
dictionary GPUBlendState { required GPUBlendComponent color; required GPUBlendComponent alpha;};
typedef [EnforceRange] unsigned long GPUColorWriteFlags;[Exposed=(Window, DedicatedWorker)]namespace GPUColorWrite { const GPUFlagsConstant RED = 0x1; const GPUFlagsConstant GREEN = 0x2; const GPUFlagsConstant BLUE = 0x4; const GPUFlagsConstant ALPHA = 0x8; const GPUFlagsConstant ALL = 0xF;};
dictionary GPUBlendComponent { GPUBlendOperation operation = "add"; GPUBlendFactor srcFactor = "one"; GPUBlendFactor dstFactor = "zero";};
enum GPUBlendFactor { "zero", "one", "src", "one-minus-src", "src-alpha", "one-minus-src-alpha", "dst", "one-minus-dst", "dst-alpha", "one-minus-dst-alpha", "src-alpha-saturated", "constant", "one-minus-constant",};
enum GPUBlendOperation { "add", "subtract", "reverse-subtract", "min", "max",};
dictionary GPUDepthStencilState { required GPUTextureFormat format; boolean depthWriteEnabled = false; GPUCompareFunction depthCompare = "always"; GPUStencilFaceState stencilFront = {}; GPUStencilFaceState stencilBack = {}; GPUStencilValue stencilReadMask = 0xFFFFFFFF; GPUStencilValue stencilWriteMask = 0xFFFFFFFF; GPUDepthBias depthBias = 0; float depthBiasSlopeScale = 0; float depthBiasClamp = 0;};
dictionary GPUStencilFaceState { GPUCompareFunction compare = "always"; GPUStencilOperation failOp = "keep"; GPUStencilOperation depthFailOp = "keep"; GPUStencilOperation passOp = "keep";};
enum GPUStencilOperation { "keep", "zero", "replace", "invert", "increment-clamp", "decrement-clamp", "increment-wrap", "decrement-wrap",};
enum GPUIndexFormat { "uint16", "uint32",};
enum GPUVertexFormat { "uint8x2", "uint8x4", "sint8x2", "sint8x4", "unorm8x2", "unorm8x4", "snorm8x2", "snorm8x4", "uint16x2", "uint16x4", "sint16x2", "sint16x4", "unorm16x2", "unorm16x4", "snorm16x2", "snorm16x4", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4",};
enum GPUVertexStepMode { "vertex", "instance",};
dictionary GPUVertexState : GPUProgrammableStage { sequence<GPUVertexBufferLayout?> buffers = [];};
dictionary GPUVertexBufferLayout { required GPUSize64 arrayStride; GPUVertexStepMode stepMode = "vertex"; required sequence<GPUVertexAttribute> attributes;};
dictionary GPUVertexAttribute { required GPUVertexFormat format; required GPUSize64 offset; required GPUIndex32 shaderLocation;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUCommandBuffer {};GPUCommandBuffer includes GPUObjectBase;
dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {};
interface mixin GPUCommandsMixin {};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUCommandEncoder { GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor); GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {}); undefined copyBufferToBuffer( GPUBuffer source, GPUSize64 sourceOffset, GPUBuffer destination, GPUSize64 destinationOffset, GPUSize64 size); undefined copyBufferToTexture( GPUImageCopyBuffer source, GPUImageCopyTexture destination, GPUExtent3D copySize); undefined copyTextureToBuffer( GPUImageCopyTexture source, GPUImageCopyBuffer destination, GPUExtent3D copySize); undefined copyTextureToTexture( GPUImageCopyTexture source, GPUImageCopyTexture destination, GPUExtent3D copySize); undefined clearBuffer( GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size); undefined writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex); undefined resolveQuerySet( GPUQuerySet querySet, GPUSize32 firstQuery, GPUSize32 queryCount, GPUBuffer destination, GPUSize64 destinationOffset); GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {});};GPUCommandEncoder includes GPUObjectBase;GPUCommandEncoder includes GPUCommandsMixin;GPUCommandEncoder includes GPUDebugCommandsMixin;
dictionary GPUCommandEncoderDescriptor : GPUObjectDescriptorBase {};
dictionary GPUImageDataLayout { GPUSize64 offset = 0; GPUSize32 bytesPerRow; GPUSize32 rowsPerImage;};
dictionary GPUImageCopyBuffer : GPUImageDataLayout { required GPUBuffer buffer;};
dictionary GPUImageCopyTexture { required GPUTexture texture; GPUIntegerCoordinate mipLevel = 0; GPUOrigin3D origin = {}; GPUTextureAspect aspect = "all";};
interface mixin GPUBindingCommandsMixin { undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []); undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, Uint32Array dynamicOffsetsData, GPUSize64 dynamicOffsetsDataStart, GPUSize32 dynamicOffsetsDataLength);};
interface mixin GPUDebugCommandsMixin { undefined pushDebugGroup(USVString groupLabel); undefined popDebugGroup(); undefined insertDebugMarker(USVString markerLabel);};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUComputePassEncoder { undefined setPipeline(GPUComputePipeline pipeline); undefined dispatchWorkgroups(GPUSize32 workgroupCountX, optional GPUSize32 workgroupCountY = 1, optional GPUSize32 workgroupCountZ = 1); undefined dispatchWorkgroupsIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); undefined beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex); undefined endPipelineStatisticsQuery(); undefined writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex); undefined end();};GPUComputePassEncoder includes GPUObjectBase;GPUComputePassEncoder includes GPUCommandsMixin;GPUComputePassEncoder includes GPUDebugCommandsMixin;GPUComputePassEncoder includes GPUBindingCommandsMixin;
dictionary GPUComputePassDescriptor : GPUObjectDescriptorBase {};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPURenderPassEncoder { undefined setViewport(float x, float y, float width, float height, float minDepth, float maxDepth); undefined setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y, GPUIntegerCoordinate width, GPUIntegerCoordinate height); undefined setBlendConstant(GPUColor color); undefined setStencilReference(GPUStencilValue reference); undefined beginOcclusionQuery(GPUSize32 queryIndex); undefined endOcclusionQuery(); undefined beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex); undefined endPipelineStatisticsQuery(); undefined writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex); undefined executeBundles(sequence<GPURenderBundle> bundles); undefined end();};GPURenderPassEncoder includes GPUObjectBase;GPURenderPassEncoder includes GPUCommandsMixin;GPURenderPassEncoder includes GPUDebugCommandsMixin;GPURenderPassEncoder includes GPUBindingCommandsMixin;GPURenderPassEncoder includes GPURenderCommandsMixin;
dictionary GPURenderPassDescriptor : GPUObjectDescriptorBase { required sequence<GPURenderPassColorAttachment?> colorAttachments; GPURenderPassDepthStencilAttachment depthStencilAttachment; GPUQuerySet occlusionQuerySet;};
dictionary GPURenderPassColorAttachment { required GPUTextureView view; GPUTextureView resolveTarget; GPUColor clearValue; required GPULoadOp loadOp; required GPUStoreOp storeOp;};
dictionary GPURenderPassDepthStencilAttachment { required GPUTextureView view; float depthClearValue = 0; GPULoadOp depthLoadOp; GPUStoreOp depthStoreOp; boolean depthReadOnly = false; GPUStencilValue stencilClearValue = 0; GPULoadOp stencilLoadOp; GPUStoreOp stencilStoreOp; boolean stencilReadOnly = false;};
enum GPULoadOp { "load", "clear",};
enum GPUStoreOp { "store", "discard",};
dictionary GPURenderPassLayout: GPUObjectDescriptorBase { required sequence<GPUTextureFormat?> colorFormats; GPUTextureFormat depthStencilFormat; GPUSize32 sampleCount = 1;};
interface mixin GPURenderCommandsMixin { undefined setPipeline(GPURenderPipeline pipeline); undefined setIndexBuffer(GPUBuffer buffer, GPUIndexFormat indexFormat, optional GPUSize64 offset = 0, optional GPUSize64 size); undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size); undefined draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1, optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0); undefined drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1, optional GPUSize32 firstIndex = 0, optional GPUSignedOffset32 baseVertex = 0, optional GPUSize32 firstInstance = 0); undefined drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPURenderBundle {};GPURenderBundle includes GPUObjectBase;
dictionary GPURenderBundleDescriptor : GPUObjectDescriptorBase {};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPURenderBundleEncoder { GPURenderBundle finish(optional GPURenderBundleDescriptor descriptor = {});};GPURenderBundleEncoder includes GPUObjectBase;GPURenderBundleEncoder includes GPUCommandsMixin;GPURenderBundleEncoder includes GPUDebugCommandsMixin;GPURenderBundleEncoder includes GPUBindingCommandsMixin;GPURenderBundleEncoder includes GPURenderCommandsMixin;
dictionary GPURenderBundleEncoderDescriptor : GPURenderPassLayout { boolean depthReadOnly = false; boolean stencilReadOnly = false;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUQueue { undefined submit(sequence<GPUCommandBuffer> commandBuffers); Promise<undefined> onSubmittedWorkDone(); undefined writeBuffer( GPUBuffer buffer, GPUSize64 bufferOffset, [AllowShared] BufferSource data, optional GPUSize64 dataOffset = 0, optional GPUSize64 size); undefined writeTexture( GPUImageCopyTexture destination, [AllowShared] BufferSource data, GPUImageDataLayout dataLayout, GPUExtent3D size);};GPUQueue includes GPUObjectBase;
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUQuerySet { undefined destroy();};GPUQuerySet includes GPUObjectBase;
dictionary GPUQuerySetDescriptor : GPUObjectDescriptorBase { required GPUQueryType type; required GPUSize32 count; sequence<GPUPipelineStatisticName> pipelineStatistics = [];};
enum GPUQueryType { "occlusion", "pipeline-statistics", "timestamp",};
enum GPUPipelineStatisticName { "vertex-shader-invocations", "clipper-invocations", "clipper-primitives-out", "fragment-shader-invocations", "compute-shader-invocations",};
enum GPUDeviceLostReason { "destroyed",};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUDeviceLostInfo { readonly attribute (GPUDeviceLostReason or undefined) reason; readonly attribute DOMString message;};
partial interface GPUDevice { readonly attribute Promise<GPUDeviceLostInfo> lost;};
enum GPUErrorFilter { "out-of-memory", "validation",};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUError { readonly attribute DOMString message;};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUOutOfMemoryError : GPUError { constructor(DOMString message);};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUValidationError : GPUError { constructor(DOMString message);};
partial interface GPUDevice { undefined pushErrorScope(GPUErrorFilter filter); Promise<GPUError?> popErrorScope();};
[Exposed=(Window, DedicatedWorker), SecureContext]interface GPUUncapturedErrorEvent : Event { constructor( DOMString type, GPUUncapturedErrorEventInit gpuUncapturedErrorEventInitDict ); readonly attribute GPUError error;};
dictionary GPUUncapturedErrorEventInit : EventInit { required GPUError error;};
partial interface GPUDevice { [Exposed=(Window, DedicatedWorker)] attribute EventHandler onuncapturederror;};
typedef [EnforceRange] unsigned long GPUBufferDynamicOffset;typedef [EnforceRange] unsigned long GPUStencilValue;typedef [EnforceRange] unsigned long GPUSampleMask;typedef [EnforceRange] long GPUDepthBias;
typedef [EnforceRange] unsigned long long GPUSize64;typedef [EnforceRange] unsigned long GPUIntegerCoordinate;typedef [EnforceRange] unsigned long GPUIndex32;typedef [EnforceRange] unsigned long GPUSize32;typedef [EnforceRange] long GPUSignedOffset32;
typedef unsigned long GPUFlagsConstant;
dictionary GPUColorDict { required double r; required double g; required double b; required double a;};typedef (sequence<double> or GPUColorDict) GPUColor;
dictionary GPUOrigin2DDict { GPUIntegerCoordinate x = 0; GPUIntegerCoordinate y = 0;};typedef (sequence<GPUIntegerCoordinate> or GPUOrigin2DDict) GPUOrigin2D;
dictionary GPUOrigin3DDict { GPUIntegerCoordinate x = 0; GPUIntegerCoordinate y = 0; GPUIntegerCoordinate z = 0;};typedef (sequence<GPUIntegerCoordinate> or GPUOrigin3DDict) GPUOrigin3D;
dictionary GPUExtent3DDict { required GPUIntegerCoordinate width; GPUIntegerCoordinate height = 1; GPUIntegerCoordinate depthOrArrayLayers = 1;};typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;
Version Info