webgpu.idl (37876B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: WebGPU (https://gpuweb.github.io/gpuweb/) 5 6 interface mixin GPUObjectBase { 7 attribute USVString label; 8 }; 9 10 dictionary GPUObjectDescriptorBase { 11 USVString label = ""; 12 }; 13 14 [Exposed=(Window, Worker), SecureContext] 15 interface GPUSupportedLimits { 16 readonly attribute unsigned long maxTextureDimension1D; 17 readonly attribute unsigned long maxTextureDimension2D; 18 readonly attribute unsigned long maxTextureDimension3D; 19 readonly attribute unsigned long maxTextureArrayLayers; 20 readonly attribute unsigned long maxBindGroups; 21 readonly attribute unsigned long maxBindGroupsPlusVertexBuffers; 22 readonly attribute unsigned long maxBindingsPerBindGroup; 23 readonly attribute unsigned long maxDynamicUniformBuffersPerPipelineLayout; 24 readonly attribute unsigned long maxDynamicStorageBuffersPerPipelineLayout; 25 readonly attribute unsigned long maxSampledTexturesPerShaderStage; 26 readonly attribute unsigned long maxSamplersPerShaderStage; 27 readonly attribute unsigned long maxStorageBuffersPerShaderStage; 28 readonly attribute unsigned long maxStorageBuffersInVertexStage; 29 readonly attribute unsigned long maxStorageBuffersInFragmentStage; 30 readonly attribute unsigned long maxStorageTexturesPerShaderStage; 31 readonly attribute unsigned long maxStorageTexturesInVertexStage; 32 readonly attribute unsigned long maxStorageTexturesInFragmentStage; 33 readonly attribute unsigned long maxUniformBuffersPerShaderStage; 34 readonly attribute unsigned long long maxUniformBufferBindingSize; 35 readonly attribute unsigned long long maxStorageBufferBindingSize; 36 readonly attribute unsigned long minUniformBufferOffsetAlignment; 37 readonly attribute unsigned long minStorageBufferOffsetAlignment; 38 readonly attribute unsigned long maxVertexBuffers; 39 readonly attribute unsigned long long maxBufferSize; 40 readonly attribute unsigned long maxVertexAttributes; 41 readonly attribute unsigned long maxVertexBufferArrayStride; 42 readonly attribute unsigned long maxInterStageShaderVariables; 43 readonly attribute unsigned long maxColorAttachments; 44 readonly attribute unsigned long maxColorAttachmentBytesPerSample; 45 readonly attribute unsigned long maxComputeWorkgroupStorageSize; 46 readonly attribute unsigned long maxComputeInvocationsPerWorkgroup; 47 readonly attribute unsigned long maxComputeWorkgroupSizeX; 48 readonly attribute unsigned long maxComputeWorkgroupSizeY; 49 readonly attribute unsigned long maxComputeWorkgroupSizeZ; 50 readonly attribute unsigned long maxComputeWorkgroupsPerDimension; 51 }; 52 53 [Exposed=(Window, Worker), SecureContext] 54 interface GPUSupportedFeatures { 55 readonly setlike<DOMString>; 56 }; 57 58 [Exposed=(Window, Worker), SecureContext] 59 interface WGSLLanguageFeatures { 60 readonly setlike<DOMString>; 61 }; 62 63 [Exposed=(Window, Worker), SecureContext] 64 interface GPUAdapterInfo { 65 readonly attribute DOMString vendor; 66 readonly attribute DOMString architecture; 67 readonly attribute DOMString device; 68 readonly attribute DOMString description; 69 readonly attribute unsigned long subgroupMinSize; 70 readonly attribute unsigned long subgroupMaxSize; 71 readonly attribute boolean isFallbackAdapter; 72 }; 73 74 interface mixin NavigatorGPU { 75 [SameObject, SecureContext] readonly attribute GPU gpu; 76 }; 77 Navigator includes NavigatorGPU; 78 WorkerNavigator includes NavigatorGPU; 79 80 [Exposed=(Window, Worker), SecureContext] 81 interface GPU { 82 Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options = {}); 83 GPUTextureFormat getPreferredCanvasFormat(); 84 [SameObject] readonly attribute WGSLLanguageFeatures wgslLanguageFeatures; 85 }; 86 87 dictionary GPURequestAdapterOptions { 88 DOMString featureLevel = "core"; 89 GPUPowerPreference powerPreference; 90 boolean forceFallbackAdapter = false; 91 boolean xrCompatible = false; 92 }; 93 94 enum GPUPowerPreference { 95 "low-power", 96 "high-performance", 97 }; 98 99 [Exposed=(Window, Worker), SecureContext] 100 interface GPUAdapter { 101 [SameObject] readonly attribute GPUSupportedFeatures features; 102 [SameObject] readonly attribute GPUSupportedLimits limits; 103 [SameObject] readonly attribute GPUAdapterInfo info; 104 105 Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {}); 106 }; 107 108 dictionary GPUDeviceDescriptor 109 : GPUObjectDescriptorBase { 110 sequence<GPUFeatureName> requiredFeatures = []; 111 record<DOMString, (GPUSize64 or undefined)> requiredLimits = {}; 112 GPUQueueDescriptor defaultQueue = {}; 113 }; 114 115 enum GPUFeatureName { 116 "core-features-and-limits", 117 "depth-clip-control", 118 "depth32float-stencil8", 119 "texture-compression-bc", 120 "texture-compression-bc-sliced-3d", 121 "texture-compression-etc2", 122 "texture-compression-astc", 123 "texture-compression-astc-sliced-3d", 124 "timestamp-query", 125 "indirect-first-instance", 126 "shader-f16", 127 "rg11b10ufloat-renderable", 128 "bgra8unorm-storage", 129 "float32-filterable", 130 "float32-blendable", 131 "clip-distances", 132 "dual-source-blending", 133 "subgroups", 134 "texture-formats-tier1", 135 "texture-formats-tier2", 136 "primitive-index", 137 "texture-component-swizzle", 138 }; 139 140 [Exposed=(Window, Worker), SecureContext] 141 interface GPUDevice : EventTarget { 142 [SameObject] readonly attribute GPUSupportedFeatures features; 143 [SameObject] readonly attribute GPUSupportedLimits limits; 144 [SameObject] readonly attribute GPUAdapterInfo adapterInfo; 145 146 [SameObject] readonly attribute GPUQueue queue; 147 148 undefined destroy(); 149 150 GPUBuffer createBuffer(GPUBufferDescriptor descriptor); 151 GPUTexture createTexture(GPUTextureDescriptor descriptor); 152 GPUSampler createSampler(optional GPUSamplerDescriptor descriptor = {}); 153 GPUExternalTexture importExternalTexture(GPUExternalTextureDescriptor descriptor); 154 155 GPUBindGroupLayout createBindGroupLayout(GPUBindGroupLayoutDescriptor descriptor); 156 GPUPipelineLayout createPipelineLayout(GPUPipelineLayoutDescriptor descriptor); 157 GPUBindGroup createBindGroup(GPUBindGroupDescriptor descriptor); 158 159 GPUShaderModule createShaderModule(GPUShaderModuleDescriptor descriptor); 160 GPUComputePipeline createComputePipeline(GPUComputePipelineDescriptor descriptor); 161 GPURenderPipeline createRenderPipeline(GPURenderPipelineDescriptor descriptor); 162 Promise<GPUComputePipeline> createComputePipelineAsync(GPUComputePipelineDescriptor descriptor); 163 Promise<GPURenderPipeline> createRenderPipelineAsync(GPURenderPipelineDescriptor descriptor); 164 165 GPUCommandEncoder createCommandEncoder(optional GPUCommandEncoderDescriptor descriptor = {}); 166 GPURenderBundleEncoder createRenderBundleEncoder(GPURenderBundleEncoderDescriptor descriptor); 167 168 GPUQuerySet createQuerySet(GPUQuerySetDescriptor descriptor); 169 }; 170 GPUDevice includes GPUObjectBase; 171 172 [Exposed=(Window, Worker), SecureContext] 173 interface GPUBuffer { 174 readonly attribute GPUSize64Out size; 175 readonly attribute GPUFlagsConstant usage; 176 177 readonly attribute GPUBufferMapState mapState; 178 179 Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size); 180 ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size); 181 undefined unmap(); 182 183 undefined destroy(); 184 }; 185 GPUBuffer includes GPUObjectBase; 186 187 enum GPUBufferMapState { 188 "unmapped", 189 "pending", 190 "mapped", 191 }; 192 193 dictionary GPUBufferDescriptor 194 : GPUObjectDescriptorBase { 195 required GPUSize64 size; 196 required GPUBufferUsageFlags usage; 197 boolean mappedAtCreation = false; 198 }; 199 200 typedef [EnforceRange] unsigned long GPUBufferUsageFlags; 201 [Exposed=(Window, Worker), SecureContext] 202 namespace GPUBufferUsage { 203 const GPUFlagsConstant MAP_READ = 0x0001; 204 const GPUFlagsConstant MAP_WRITE = 0x0002; 205 const GPUFlagsConstant COPY_SRC = 0x0004; 206 const GPUFlagsConstant COPY_DST = 0x0008; 207 const GPUFlagsConstant INDEX = 0x0010; 208 const GPUFlagsConstant VERTEX = 0x0020; 209 const GPUFlagsConstant UNIFORM = 0x0040; 210 const GPUFlagsConstant STORAGE = 0x0080; 211 const GPUFlagsConstant INDIRECT = 0x0100; 212 const GPUFlagsConstant QUERY_RESOLVE = 0x0200; 213 }; 214 215 typedef [EnforceRange] unsigned long GPUMapModeFlags; 216 [Exposed=(Window, Worker), SecureContext] 217 namespace GPUMapMode { 218 const GPUFlagsConstant READ = 0x0001; 219 const GPUFlagsConstant WRITE = 0x0002; 220 }; 221 222 [Exposed=(Window, Worker), SecureContext] 223 interface GPUTexture { 224 GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {}); 225 226 undefined destroy(); 227 228 readonly attribute GPUIntegerCoordinateOut width; 229 readonly attribute GPUIntegerCoordinateOut height; 230 readonly attribute GPUIntegerCoordinateOut depthOrArrayLayers; 231 readonly attribute GPUIntegerCoordinateOut mipLevelCount; 232 readonly attribute GPUSize32Out sampleCount; 233 readonly attribute GPUTextureDimension dimension; 234 readonly attribute GPUTextureFormat format; 235 readonly attribute GPUFlagsConstant usage; 236 readonly attribute (GPUTextureViewDimension or undefined) textureBindingViewDimension; 237 }; 238 GPUTexture includes GPUObjectBase; 239 240 dictionary GPUTextureDescriptor 241 : GPUObjectDescriptorBase { 242 required GPUExtent3D size; 243 GPUIntegerCoordinate mipLevelCount = 1; 244 GPUSize32 sampleCount = 1; 245 GPUTextureDimension dimension = "2d"; 246 required GPUTextureFormat format; 247 required GPUTextureUsageFlags usage; 248 sequence<GPUTextureFormat> viewFormats = []; 249 GPUTextureViewDimension textureBindingViewDimension; 250 }; 251 252 enum GPUTextureDimension { 253 "1d", 254 "2d", 255 "3d", 256 }; 257 258 typedef [EnforceRange] unsigned long GPUTextureUsageFlags; 259 [Exposed=(Window, Worker), SecureContext] 260 namespace GPUTextureUsage { 261 const GPUFlagsConstant COPY_SRC = 0x01; 262 const GPUFlagsConstant COPY_DST = 0x02; 263 const GPUFlagsConstant TEXTURE_BINDING = 0x04; 264 const GPUFlagsConstant STORAGE_BINDING = 0x08; 265 const GPUFlagsConstant RENDER_ATTACHMENT = 0x10; 266 }; 267 268 [Exposed=(Window, Worker), SecureContext] 269 interface GPUTextureView { 270 }; 271 GPUTextureView includes GPUObjectBase; 272 273 dictionary GPUTextureViewDescriptor 274 : GPUObjectDescriptorBase { 275 GPUTextureFormat format; 276 GPUTextureViewDimension dimension; 277 GPUTextureUsageFlags usage = 0; 278 GPUTextureAspect aspect = "all"; 279 GPUIntegerCoordinate baseMipLevel = 0; 280 GPUIntegerCoordinate mipLevelCount; 281 GPUIntegerCoordinate baseArrayLayer = 0; 282 GPUIntegerCoordinate arrayLayerCount; 283 284 // Requires "texture-component-swizzle" feature. 285 DOMString swizzle = "rgba"; 286 }; 287 288 enum GPUTextureViewDimension { 289 "1d", 290 "2d", 291 "2d-array", 292 "cube", 293 "cube-array", 294 "3d", 295 }; 296 297 enum GPUTextureAspect { 298 "all", 299 "stencil-only", 300 "depth-only", 301 }; 302 303 enum GPUTextureFormat { 304 // 8-bit formats 305 "r8unorm", 306 "r8snorm", 307 "r8uint", 308 "r8sint", 309 310 // 16-bit formats 311 "r16unorm", 312 "r16snorm", 313 "r16uint", 314 "r16sint", 315 "r16float", 316 "rg8unorm", 317 "rg8snorm", 318 "rg8uint", 319 "rg8sint", 320 321 // 32-bit formats 322 "r32uint", 323 "r32sint", 324 "r32float", 325 "rg16unorm", 326 "rg16snorm", 327 "rg16uint", 328 "rg16sint", 329 "rg16float", 330 "rgba8unorm", 331 "rgba8unorm-srgb", 332 "rgba8snorm", 333 "rgba8uint", 334 "rgba8sint", 335 "bgra8unorm", 336 "bgra8unorm-srgb", 337 // Packed 32-bit formats 338 "rgb9e5ufloat", 339 "rgb10a2uint", 340 "rgb10a2unorm", 341 "rg11b10ufloat", 342 343 // 64-bit formats 344 "rg32uint", 345 "rg32sint", 346 "rg32float", 347 "rgba16unorm", 348 "rgba16snorm", 349 "rgba16uint", 350 "rgba16sint", 351 "rgba16float", 352 353 // 128-bit formats 354 "rgba32uint", 355 "rgba32sint", 356 "rgba32float", 357 358 // Depth/stencil formats 359 "stencil8", 360 "depth16unorm", 361 "depth24plus", 362 "depth24plus-stencil8", 363 "depth32float", 364 365 // "depth32float-stencil8" feature 366 "depth32float-stencil8", 367 368 // BC compressed formats usable if "texture-compression-bc" is both 369 // supported by the device/user agent and enabled in requestDevice. 370 "bc1-rgba-unorm", 371 "bc1-rgba-unorm-srgb", 372 "bc2-rgba-unorm", 373 "bc2-rgba-unorm-srgb", 374 "bc3-rgba-unorm", 375 "bc3-rgba-unorm-srgb", 376 "bc4-r-unorm", 377 "bc4-r-snorm", 378 "bc5-rg-unorm", 379 "bc5-rg-snorm", 380 "bc6h-rgb-ufloat", 381 "bc6h-rgb-float", 382 "bc7-rgba-unorm", 383 "bc7-rgba-unorm-srgb", 384 385 // ETC2 compressed formats usable if "texture-compression-etc2" is both 386 // supported by the device/user agent and enabled in requestDevice. 387 "etc2-rgb8unorm", 388 "etc2-rgb8unorm-srgb", 389 "etc2-rgb8a1unorm", 390 "etc2-rgb8a1unorm-srgb", 391 "etc2-rgba8unorm", 392 "etc2-rgba8unorm-srgb", 393 "eac-r11unorm", 394 "eac-r11snorm", 395 "eac-rg11unorm", 396 "eac-rg11snorm", 397 398 // ASTC compressed formats usable if "texture-compression-astc" is both 399 // supported by the device/user agent and enabled in requestDevice. 400 "astc-4x4-unorm", 401 "astc-4x4-unorm-srgb", 402 "astc-5x4-unorm", 403 "astc-5x4-unorm-srgb", 404 "astc-5x5-unorm", 405 "astc-5x5-unorm-srgb", 406 "astc-6x5-unorm", 407 "astc-6x5-unorm-srgb", 408 "astc-6x6-unorm", 409 "astc-6x6-unorm-srgb", 410 "astc-8x5-unorm", 411 "astc-8x5-unorm-srgb", 412 "astc-8x6-unorm", 413 "astc-8x6-unorm-srgb", 414 "astc-8x8-unorm", 415 "astc-8x8-unorm-srgb", 416 "astc-10x5-unorm", 417 "astc-10x5-unorm-srgb", 418 "astc-10x6-unorm", 419 "astc-10x6-unorm-srgb", 420 "astc-10x8-unorm", 421 "astc-10x8-unorm-srgb", 422 "astc-10x10-unorm", 423 "astc-10x10-unorm-srgb", 424 "astc-12x10-unorm", 425 "astc-12x10-unorm-srgb", 426 "astc-12x12-unorm", 427 "astc-12x12-unorm-srgb", 428 }; 429 430 [Exposed=(Window, Worker), SecureContext] 431 interface GPUExternalTexture { 432 }; 433 GPUExternalTexture includes GPUObjectBase; 434 435 dictionary GPUExternalTextureDescriptor 436 : GPUObjectDescriptorBase { 437 required (HTMLVideoElement or VideoFrame) source; 438 PredefinedColorSpace colorSpace = "srgb"; 439 }; 440 441 [Exposed=(Window, Worker), SecureContext] 442 interface GPUSampler { 443 }; 444 GPUSampler includes GPUObjectBase; 445 446 dictionary GPUSamplerDescriptor 447 : GPUObjectDescriptorBase { 448 GPUAddressMode addressModeU = "clamp-to-edge"; 449 GPUAddressMode addressModeV = "clamp-to-edge"; 450 GPUAddressMode addressModeW = "clamp-to-edge"; 451 GPUFilterMode magFilter = "nearest"; 452 GPUFilterMode minFilter = "nearest"; 453 GPUMipmapFilterMode mipmapFilter = "nearest"; 454 float lodMinClamp = 0; 455 float lodMaxClamp = 32; 456 GPUCompareFunction compare; 457 [Clamp] unsigned short maxAnisotropy = 1; 458 }; 459 460 enum GPUAddressMode { 461 "clamp-to-edge", 462 "repeat", 463 "mirror-repeat", 464 }; 465 466 enum GPUFilterMode { 467 "nearest", 468 "linear", 469 }; 470 471 enum GPUMipmapFilterMode { 472 "nearest", 473 "linear", 474 }; 475 476 enum GPUCompareFunction { 477 "never", 478 "less", 479 "equal", 480 "less-equal", 481 "greater", 482 "not-equal", 483 "greater-equal", 484 "always", 485 }; 486 487 [Exposed=(Window, Worker), SecureContext] 488 interface GPUBindGroupLayout { 489 }; 490 GPUBindGroupLayout includes GPUObjectBase; 491 492 dictionary GPUBindGroupLayoutDescriptor 493 : GPUObjectDescriptorBase { 494 required sequence<GPUBindGroupLayoutEntry> entries; 495 }; 496 497 dictionary GPUBindGroupLayoutEntry { 498 required GPUIndex32 binding; 499 required GPUShaderStageFlags visibility; 500 501 GPUBufferBindingLayout buffer; 502 GPUSamplerBindingLayout sampler; 503 GPUTextureBindingLayout texture; 504 GPUStorageTextureBindingLayout storageTexture; 505 GPUExternalTextureBindingLayout externalTexture; 506 }; 507 508 typedef [EnforceRange] unsigned long GPUShaderStageFlags; 509 [Exposed=(Window, Worker), SecureContext] 510 namespace GPUShaderStage { 511 const GPUFlagsConstant VERTEX = 0x1; 512 const GPUFlagsConstant FRAGMENT = 0x2; 513 const GPUFlagsConstant COMPUTE = 0x4; 514 }; 515 516 enum GPUBufferBindingType { 517 "uniform", 518 "storage", 519 "read-only-storage", 520 }; 521 522 dictionary GPUBufferBindingLayout { 523 GPUBufferBindingType type = "uniform"; 524 boolean hasDynamicOffset = false; 525 GPUSize64 minBindingSize = 0; 526 }; 527 528 enum GPUSamplerBindingType { 529 "filtering", 530 "non-filtering", 531 "comparison", 532 }; 533 534 dictionary GPUSamplerBindingLayout { 535 GPUSamplerBindingType type = "filtering"; 536 }; 537 538 enum GPUTextureSampleType { 539 "float", 540 "unfilterable-float", 541 "depth", 542 "sint", 543 "uint", 544 }; 545 546 dictionary GPUTextureBindingLayout { 547 GPUTextureSampleType sampleType = "float"; 548 GPUTextureViewDimension viewDimension = "2d"; 549 boolean multisampled = false; 550 }; 551 552 enum GPUStorageTextureAccess { 553 "write-only", 554 "read-only", 555 "read-write", 556 }; 557 558 dictionary GPUStorageTextureBindingLayout { 559 GPUStorageTextureAccess access = "write-only"; 560 required GPUTextureFormat format; 561 GPUTextureViewDimension viewDimension = "2d"; 562 }; 563 564 dictionary GPUExternalTextureBindingLayout { 565 }; 566 567 [Exposed=(Window, Worker), SecureContext] 568 interface GPUBindGroup { 569 }; 570 GPUBindGroup includes GPUObjectBase; 571 572 dictionary GPUBindGroupDescriptor 573 : GPUObjectDescriptorBase { 574 required GPUBindGroupLayout layout; 575 required sequence<GPUBindGroupEntry> entries; 576 }; 577 578 typedef (GPUSampler or 579 GPUTexture or 580 GPUTextureView or 581 GPUBuffer or 582 GPUBufferBinding or 583 GPUExternalTexture) GPUBindingResource; 584 585 dictionary GPUBindGroupEntry { 586 required GPUIndex32 binding; 587 required GPUBindingResource resource; 588 }; 589 590 dictionary GPUBufferBinding { 591 required GPUBuffer buffer; 592 GPUSize64 offset = 0; 593 GPUSize64 size; 594 }; 595 596 [Exposed=(Window, Worker), SecureContext] 597 interface GPUPipelineLayout { 598 }; 599 GPUPipelineLayout includes GPUObjectBase; 600 601 dictionary GPUPipelineLayoutDescriptor 602 : GPUObjectDescriptorBase { 603 required sequence<GPUBindGroupLayout?> bindGroupLayouts; 604 }; 605 606 [Exposed=(Window, Worker), SecureContext] 607 interface GPUShaderModule { 608 Promise<GPUCompilationInfo> getCompilationInfo(); 609 }; 610 GPUShaderModule includes GPUObjectBase; 611 612 dictionary GPUShaderModuleDescriptor 613 : GPUObjectDescriptorBase { 614 required USVString code; 615 sequence<GPUShaderModuleCompilationHint> compilationHints = []; 616 }; 617 618 dictionary GPUShaderModuleCompilationHint { 619 required USVString entryPoint; 620 (GPUPipelineLayout or GPUAutoLayoutMode) layout; 621 }; 622 623 enum GPUCompilationMessageType { 624 "error", 625 "warning", 626 "info", 627 }; 628 629 [Exposed=(Window, Worker), Serializable, SecureContext] 630 interface GPUCompilationMessage { 631 readonly attribute DOMString message; 632 readonly attribute GPUCompilationMessageType type; 633 readonly attribute unsigned long long lineNum; 634 readonly attribute unsigned long long linePos; 635 readonly attribute unsigned long long offset; 636 readonly attribute unsigned long long length; 637 }; 638 639 [Exposed=(Window, Worker), Serializable, SecureContext] 640 interface GPUCompilationInfo { 641 readonly attribute FrozenArray<GPUCompilationMessage> messages; 642 }; 643 644 [Exposed=(Window, Worker), SecureContext, Serializable] 645 interface GPUPipelineError : DOMException { 646 constructor(optional DOMString message = "", GPUPipelineErrorInit options); 647 readonly attribute GPUPipelineErrorReason reason; 648 }; 649 650 dictionary GPUPipelineErrorInit { 651 required GPUPipelineErrorReason reason; 652 }; 653 654 enum GPUPipelineErrorReason { 655 "validation", 656 "internal", 657 }; 658 659 enum GPUAutoLayoutMode { 660 "auto", 661 }; 662 663 dictionary GPUPipelineDescriptorBase 664 : GPUObjectDescriptorBase { 665 required (GPUPipelineLayout or GPUAutoLayoutMode) layout; 666 }; 667 668 interface mixin GPUPipelineBase { 669 [NewObject] GPUBindGroupLayout getBindGroupLayout(unsigned long index); 670 }; 671 672 dictionary GPUProgrammableStage { 673 required GPUShaderModule module; 674 USVString entryPoint; 675 record<USVString, GPUPipelineConstantValue> constants = {}; 676 }; 677 678 typedef double GPUPipelineConstantValue; // May represent WGSL's bool, f32, i32, u32, and f16 if enabled. 679 680 [Exposed=(Window, Worker), SecureContext] 681 interface GPUComputePipeline { 682 }; 683 GPUComputePipeline includes GPUObjectBase; 684 GPUComputePipeline includes GPUPipelineBase; 685 686 dictionary GPUComputePipelineDescriptor 687 : GPUPipelineDescriptorBase { 688 required GPUProgrammableStage compute; 689 }; 690 691 [Exposed=(Window, Worker), SecureContext] 692 interface GPURenderPipeline { 693 }; 694 GPURenderPipeline includes GPUObjectBase; 695 GPURenderPipeline includes GPUPipelineBase; 696 697 dictionary GPURenderPipelineDescriptor 698 : GPUPipelineDescriptorBase { 699 required GPUVertexState vertex; 700 GPUPrimitiveState primitive = {}; 701 GPUDepthStencilState depthStencil; 702 GPUMultisampleState multisample = {}; 703 GPUFragmentState fragment; 704 }; 705 706 dictionary GPUPrimitiveState { 707 GPUPrimitiveTopology topology = "triangle-list"; 708 GPUIndexFormat stripIndexFormat; 709 GPUFrontFace frontFace = "ccw"; 710 GPUCullMode cullMode = "none"; 711 712 // Requires "depth-clip-control" feature. 713 boolean unclippedDepth = false; 714 }; 715 716 enum GPUPrimitiveTopology { 717 "point-list", 718 "line-list", 719 "line-strip", 720 "triangle-list", 721 "triangle-strip", 722 }; 723 724 enum GPUFrontFace { 725 "ccw", 726 "cw", 727 }; 728 729 enum GPUCullMode { 730 "none", 731 "front", 732 "back", 733 }; 734 735 dictionary GPUMultisampleState { 736 GPUSize32 count = 1; 737 GPUSampleMask mask = 0xFFFFFFFF; 738 boolean alphaToCoverageEnabled = false; 739 }; 740 741 dictionary GPUFragmentState 742 : GPUProgrammableStage { 743 required sequence<GPUColorTargetState?> targets; 744 }; 745 746 dictionary GPUColorTargetState { 747 required GPUTextureFormat format; 748 749 GPUBlendState blend; 750 GPUColorWriteFlags writeMask = 0xF; // GPUColorWrite.ALL 751 }; 752 753 dictionary GPUBlendState { 754 required GPUBlendComponent color; 755 required GPUBlendComponent alpha; 756 }; 757 758 typedef [EnforceRange] unsigned long GPUColorWriteFlags; 759 [Exposed=(Window, Worker), SecureContext] 760 namespace GPUColorWrite { 761 const GPUFlagsConstant RED = 0x1; 762 const GPUFlagsConstant GREEN = 0x2; 763 const GPUFlagsConstant BLUE = 0x4; 764 const GPUFlagsConstant ALPHA = 0x8; 765 const GPUFlagsConstant ALL = 0xF; 766 }; 767 768 dictionary GPUBlendComponent { 769 GPUBlendOperation operation = "add"; 770 GPUBlendFactor srcFactor = "one"; 771 GPUBlendFactor dstFactor = "zero"; 772 }; 773 774 enum GPUBlendFactor { 775 "zero", 776 "one", 777 "src", 778 "one-minus-src", 779 "src-alpha", 780 "one-minus-src-alpha", 781 "dst", 782 "one-minus-dst", 783 "dst-alpha", 784 "one-minus-dst-alpha", 785 "src-alpha-saturated", 786 "constant", 787 "one-minus-constant", 788 "src1", 789 "one-minus-src1", 790 "src1-alpha", 791 "one-minus-src1-alpha", 792 }; 793 794 enum GPUBlendOperation { 795 "add", 796 "subtract", 797 "reverse-subtract", 798 "min", 799 "max", 800 }; 801 802 dictionary GPUDepthStencilState { 803 required GPUTextureFormat format; 804 805 boolean depthWriteEnabled; 806 GPUCompareFunction depthCompare; 807 808 GPUStencilFaceState stencilFront = {}; 809 GPUStencilFaceState stencilBack = {}; 810 811 GPUStencilValue stencilReadMask = 0xFFFFFFFF; 812 GPUStencilValue stencilWriteMask = 0xFFFFFFFF; 813 814 GPUDepthBias depthBias = 0; 815 float depthBiasSlopeScale = 0; 816 float depthBiasClamp = 0; 817 }; 818 819 dictionary GPUStencilFaceState { 820 GPUCompareFunction compare = "always"; 821 GPUStencilOperation failOp = "keep"; 822 GPUStencilOperation depthFailOp = "keep"; 823 GPUStencilOperation passOp = "keep"; 824 }; 825 826 enum GPUStencilOperation { 827 "keep", 828 "zero", 829 "replace", 830 "invert", 831 "increment-clamp", 832 "decrement-clamp", 833 "increment-wrap", 834 "decrement-wrap", 835 }; 836 837 enum GPUIndexFormat { 838 "uint16", 839 "uint32", 840 }; 841 842 enum GPUVertexFormat { 843 "uint8", 844 "uint8x2", 845 "uint8x4", 846 "sint8", 847 "sint8x2", 848 "sint8x4", 849 "unorm8", 850 "unorm8x2", 851 "unorm8x4", 852 "snorm8", 853 "snorm8x2", 854 "snorm8x4", 855 "uint16", 856 "uint16x2", 857 "uint16x4", 858 "sint16", 859 "sint16x2", 860 "sint16x4", 861 "unorm16", 862 "unorm16x2", 863 "unorm16x4", 864 "snorm16", 865 "snorm16x2", 866 "snorm16x4", 867 "float16", 868 "float16x2", 869 "float16x4", 870 "float32", 871 "float32x2", 872 "float32x3", 873 "float32x4", 874 "uint32", 875 "uint32x2", 876 "uint32x3", 877 "uint32x4", 878 "sint32", 879 "sint32x2", 880 "sint32x3", 881 "sint32x4", 882 "unorm10-10-10-2", 883 "unorm8x4-bgra", 884 }; 885 886 enum GPUVertexStepMode { 887 "vertex", 888 "instance", 889 }; 890 891 dictionary GPUVertexState 892 : GPUProgrammableStage { 893 sequence<GPUVertexBufferLayout?> buffers = []; 894 }; 895 896 dictionary GPUVertexBufferLayout { 897 required GPUSize64 arrayStride; 898 GPUVertexStepMode stepMode = "vertex"; 899 required sequence<GPUVertexAttribute> attributes; 900 }; 901 902 dictionary GPUVertexAttribute { 903 required GPUVertexFormat format; 904 required GPUSize64 offset; 905 906 required GPUIndex32 shaderLocation; 907 }; 908 909 dictionary GPUTexelCopyBufferLayout { 910 GPUSize64 offset = 0; 911 GPUSize32 bytesPerRow; 912 GPUSize32 rowsPerImage; 913 }; 914 915 dictionary GPUTexelCopyBufferInfo 916 : GPUTexelCopyBufferLayout { 917 required GPUBuffer buffer; 918 }; 919 920 dictionary GPUTexelCopyTextureInfo { 921 required GPUTexture texture; 922 GPUIntegerCoordinate mipLevel = 0; 923 GPUOrigin3D origin = {}; 924 GPUTextureAspect aspect = "all"; 925 }; 926 927 dictionary GPUCopyExternalImageDestInfo 928 : GPUTexelCopyTextureInfo { 929 PredefinedColorSpace colorSpace = "srgb"; 930 boolean premultipliedAlpha = false; 931 }; 932 933 typedef (ImageBitmap or 934 ImageData or 935 HTMLImageElement or 936 HTMLVideoElement or 937 VideoFrame or 938 HTMLCanvasElement or 939 OffscreenCanvas) GPUCopyExternalImageSource; 940 941 dictionary GPUCopyExternalImageSourceInfo { 942 required GPUCopyExternalImageSource source; 943 GPUOrigin2D origin = {}; 944 boolean flipY = false; 945 }; 946 947 [Exposed=(Window, Worker), SecureContext] 948 interface GPUCommandBuffer { 949 }; 950 GPUCommandBuffer includes GPUObjectBase; 951 952 dictionary GPUCommandBufferDescriptor 953 : GPUObjectDescriptorBase { 954 }; 955 956 interface mixin GPUCommandsMixin { 957 }; 958 959 [Exposed=(Window, Worker), SecureContext] 960 interface GPUCommandEncoder { 961 GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor); 962 GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {}); 963 964 undefined copyBufferToBuffer( 965 GPUBuffer source, 966 GPUBuffer destination, 967 optional GPUSize64 size); 968 undefined copyBufferToBuffer( 969 GPUBuffer source, 970 GPUSize64 sourceOffset, 971 GPUBuffer destination, 972 GPUSize64 destinationOffset, 973 optional GPUSize64 size); 974 975 undefined copyBufferToTexture( 976 GPUTexelCopyBufferInfo source, 977 GPUTexelCopyTextureInfo destination, 978 GPUExtent3D copySize); 979 980 undefined copyTextureToBuffer( 981 GPUTexelCopyTextureInfo source, 982 GPUTexelCopyBufferInfo destination, 983 GPUExtent3D copySize); 984 985 undefined copyTextureToTexture( 986 GPUTexelCopyTextureInfo source, 987 GPUTexelCopyTextureInfo destination, 988 GPUExtent3D copySize); 989 990 undefined clearBuffer( 991 GPUBuffer buffer, 992 optional GPUSize64 offset = 0, 993 optional GPUSize64 size); 994 995 undefined resolveQuerySet( 996 GPUQuerySet querySet, 997 GPUSize32 firstQuery, 998 GPUSize32 queryCount, 999 GPUBuffer destination, 1000 GPUSize64 destinationOffset); 1001 1002 GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {}); 1003 }; 1004 GPUCommandEncoder includes GPUObjectBase; 1005 GPUCommandEncoder includes GPUCommandsMixin; 1006 GPUCommandEncoder includes GPUDebugCommandsMixin; 1007 1008 dictionary GPUCommandEncoderDescriptor 1009 : GPUObjectDescriptorBase { 1010 }; 1011 1012 interface mixin GPUBindingCommandsMixin { 1013 undefined setBindGroup(GPUIndex32 index, GPUBindGroup? bindGroup, 1014 optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []); 1015 1016 undefined setBindGroup(GPUIndex32 index, GPUBindGroup? bindGroup, 1017 [AllowShared] Uint32Array dynamicOffsetsData, 1018 GPUSize64 dynamicOffsetsDataStart, 1019 GPUSize32 dynamicOffsetsDataLength); 1020 }; 1021 1022 interface mixin GPUDebugCommandsMixin { 1023 undefined pushDebugGroup(USVString groupLabel); 1024 undefined popDebugGroup(); 1025 undefined insertDebugMarker(USVString markerLabel); 1026 }; 1027 1028 [Exposed=(Window, Worker), SecureContext] 1029 interface GPUComputePassEncoder { 1030 undefined setPipeline(GPUComputePipeline pipeline); 1031 undefined dispatchWorkgroups(GPUSize32 workgroupCountX, optional GPUSize32 workgroupCountY = 1, optional GPUSize32 workgroupCountZ = 1); 1032 undefined dispatchWorkgroupsIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); 1033 1034 undefined end(); 1035 }; 1036 GPUComputePassEncoder includes GPUObjectBase; 1037 GPUComputePassEncoder includes GPUCommandsMixin; 1038 GPUComputePassEncoder includes GPUDebugCommandsMixin; 1039 GPUComputePassEncoder includes GPUBindingCommandsMixin; 1040 1041 dictionary GPUComputePassTimestampWrites { 1042 required GPUQuerySet querySet; 1043 GPUSize32 beginningOfPassWriteIndex; 1044 GPUSize32 endOfPassWriteIndex; 1045 }; 1046 1047 dictionary GPUComputePassDescriptor 1048 : GPUObjectDescriptorBase { 1049 GPUComputePassTimestampWrites timestampWrites; 1050 }; 1051 1052 [Exposed=(Window, Worker), SecureContext] 1053 interface GPURenderPassEncoder { 1054 undefined setViewport(float x, float y, 1055 float width, float height, 1056 float minDepth, float maxDepth); 1057 1058 undefined setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y, 1059 GPUIntegerCoordinate width, GPUIntegerCoordinate height); 1060 1061 undefined setBlendConstant(GPUColor color); 1062 undefined setStencilReference(GPUStencilValue reference); 1063 1064 undefined beginOcclusionQuery(GPUSize32 queryIndex); 1065 undefined endOcclusionQuery(); 1066 1067 undefined executeBundles(sequence<GPURenderBundle> bundles); 1068 undefined end(); 1069 }; 1070 GPURenderPassEncoder includes GPUObjectBase; 1071 GPURenderPassEncoder includes GPUCommandsMixin; 1072 GPURenderPassEncoder includes GPUDebugCommandsMixin; 1073 GPURenderPassEncoder includes GPUBindingCommandsMixin; 1074 GPURenderPassEncoder includes GPURenderCommandsMixin; 1075 1076 dictionary GPURenderPassTimestampWrites { 1077 required GPUQuerySet querySet; 1078 GPUSize32 beginningOfPassWriteIndex; 1079 GPUSize32 endOfPassWriteIndex; 1080 }; 1081 1082 dictionary GPURenderPassDescriptor 1083 : GPUObjectDescriptorBase { 1084 required sequence<GPURenderPassColorAttachment?> colorAttachments; 1085 GPURenderPassDepthStencilAttachment depthStencilAttachment; 1086 GPUQuerySet occlusionQuerySet; 1087 GPURenderPassTimestampWrites timestampWrites; 1088 GPUSize64 maxDrawCount = 50000000; 1089 }; 1090 1091 dictionary GPURenderPassColorAttachment { 1092 required (GPUTexture or GPUTextureView) view; 1093 GPUIntegerCoordinate depthSlice; 1094 (GPUTexture or GPUTextureView) resolveTarget; 1095 1096 GPUColor clearValue; 1097 required GPULoadOp loadOp; 1098 required GPUStoreOp storeOp; 1099 }; 1100 1101 dictionary GPURenderPassDepthStencilAttachment { 1102 required (GPUTexture or GPUTextureView) view; 1103 1104 float depthClearValue; 1105 GPULoadOp depthLoadOp; 1106 GPUStoreOp depthStoreOp; 1107 boolean depthReadOnly = false; 1108 1109 GPUStencilValue stencilClearValue = 0; 1110 GPULoadOp stencilLoadOp; 1111 GPUStoreOp stencilStoreOp; 1112 boolean stencilReadOnly = false; 1113 }; 1114 1115 enum GPULoadOp { 1116 "load", 1117 "clear", 1118 }; 1119 1120 enum GPUStoreOp { 1121 "store", 1122 "discard", 1123 }; 1124 1125 dictionary GPURenderPassLayout 1126 : GPUObjectDescriptorBase { 1127 required sequence<GPUTextureFormat?> colorFormats; 1128 GPUTextureFormat depthStencilFormat; 1129 GPUSize32 sampleCount = 1; 1130 }; 1131 1132 interface mixin GPURenderCommandsMixin { 1133 undefined setPipeline(GPURenderPipeline pipeline); 1134 1135 undefined setIndexBuffer(GPUBuffer buffer, GPUIndexFormat indexFormat, optional GPUSize64 offset = 0, optional GPUSize64 size); 1136 undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer? buffer, optional GPUSize64 offset = 0, optional GPUSize64 size); 1137 1138 undefined draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1, 1139 optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0); 1140 undefined drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1, 1141 optional GPUSize32 firstIndex = 0, 1142 optional GPUSignedOffset32 baseVertex = 0, 1143 optional GPUSize32 firstInstance = 0); 1144 1145 undefined drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); 1146 undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); 1147 }; 1148 1149 [Exposed=(Window, Worker), SecureContext] 1150 interface GPURenderBundle { 1151 }; 1152 GPURenderBundle includes GPUObjectBase; 1153 1154 dictionary GPURenderBundleDescriptor 1155 : GPUObjectDescriptorBase { 1156 }; 1157 1158 [Exposed=(Window, Worker), SecureContext] 1159 interface GPURenderBundleEncoder { 1160 GPURenderBundle finish(optional GPURenderBundleDescriptor descriptor = {}); 1161 }; 1162 GPURenderBundleEncoder includes GPUObjectBase; 1163 GPURenderBundleEncoder includes GPUCommandsMixin; 1164 GPURenderBundleEncoder includes GPUDebugCommandsMixin; 1165 GPURenderBundleEncoder includes GPUBindingCommandsMixin; 1166 GPURenderBundleEncoder includes GPURenderCommandsMixin; 1167 1168 dictionary GPURenderBundleEncoderDescriptor 1169 : GPURenderPassLayout { 1170 boolean depthReadOnly = false; 1171 boolean stencilReadOnly = false; 1172 }; 1173 1174 dictionary GPUQueueDescriptor 1175 : GPUObjectDescriptorBase { 1176 }; 1177 1178 [Exposed=(Window, Worker), SecureContext] 1179 interface GPUQueue { 1180 undefined submit(sequence<GPUCommandBuffer> commandBuffers); 1181 1182 Promise<undefined> onSubmittedWorkDone(); 1183 1184 undefined writeBuffer( 1185 GPUBuffer buffer, 1186 GPUSize64 bufferOffset, 1187 AllowSharedBufferSource data, 1188 optional GPUSize64 dataOffset = 0, 1189 optional GPUSize64 size); 1190 1191 undefined writeTexture( 1192 GPUTexelCopyTextureInfo destination, 1193 AllowSharedBufferSource data, 1194 GPUTexelCopyBufferLayout dataLayout, 1195 GPUExtent3D size); 1196 1197 undefined copyExternalImageToTexture( 1198 GPUCopyExternalImageSourceInfo source, 1199 GPUCopyExternalImageDestInfo destination, 1200 GPUExtent3D copySize); 1201 }; 1202 GPUQueue includes GPUObjectBase; 1203 1204 [Exposed=(Window, Worker), SecureContext] 1205 interface GPUQuerySet { 1206 undefined destroy(); 1207 1208 readonly attribute GPUQueryType type; 1209 readonly attribute GPUSize32Out count; 1210 }; 1211 GPUQuerySet includes GPUObjectBase; 1212 1213 dictionary GPUQuerySetDescriptor 1214 : GPUObjectDescriptorBase { 1215 required GPUQueryType type; 1216 required GPUSize32 count; 1217 }; 1218 1219 enum GPUQueryType { 1220 "occlusion", 1221 "timestamp", 1222 }; 1223 1224 [Exposed=(Window, Worker), SecureContext] 1225 interface GPUCanvasContext { 1226 readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas; 1227 1228 undefined configure(GPUCanvasConfiguration configuration); 1229 undefined unconfigure(); 1230 1231 GPUCanvasConfiguration? getConfiguration(); 1232 GPUTexture getCurrentTexture(); 1233 }; 1234 1235 enum GPUCanvasAlphaMode { 1236 "opaque", 1237 "premultiplied", 1238 }; 1239 1240 enum GPUCanvasToneMappingMode { 1241 "standard", 1242 "extended", 1243 }; 1244 1245 dictionary GPUCanvasToneMapping { 1246 GPUCanvasToneMappingMode mode = "standard"; 1247 }; 1248 1249 dictionary GPUCanvasConfiguration { 1250 required GPUDevice device; 1251 required GPUTextureFormat format; 1252 GPUTextureUsageFlags usage = 0x10; // GPUTextureUsage.RENDER_ATTACHMENT 1253 sequence<GPUTextureFormat> viewFormats = []; 1254 PredefinedColorSpace colorSpace = "srgb"; 1255 GPUCanvasToneMapping toneMapping = {}; 1256 GPUCanvasAlphaMode alphaMode = "opaque"; 1257 }; 1258 1259 enum GPUDeviceLostReason { 1260 "unknown", 1261 "destroyed", 1262 }; 1263 1264 [Exposed=(Window, Worker), SecureContext] 1265 interface GPUDeviceLostInfo { 1266 readonly attribute GPUDeviceLostReason reason; 1267 readonly attribute DOMString message; 1268 }; 1269 1270 partial interface GPUDevice { 1271 readonly attribute Promise<GPUDeviceLostInfo> lost; 1272 }; 1273 1274 [Exposed=(Window, Worker), SecureContext] 1275 interface GPUError { 1276 readonly attribute DOMString message; 1277 }; 1278 1279 [Exposed=(Window, Worker), SecureContext] 1280 interface GPUValidationError 1281 : GPUError { 1282 constructor(DOMString message); 1283 }; 1284 1285 [Exposed=(Window, Worker), SecureContext] 1286 interface GPUOutOfMemoryError 1287 : GPUError { 1288 constructor(DOMString message); 1289 }; 1290 1291 [Exposed=(Window, Worker), SecureContext] 1292 interface GPUInternalError 1293 : GPUError { 1294 constructor(DOMString message); 1295 }; 1296 1297 enum GPUErrorFilter { 1298 "validation", 1299 "out-of-memory", 1300 "internal", 1301 }; 1302 1303 partial interface GPUDevice { 1304 undefined pushErrorScope(GPUErrorFilter filter); 1305 Promise<GPUError?> popErrorScope(); 1306 }; 1307 1308 [Exposed=(Window, Worker), SecureContext] 1309 interface GPUUncapturedErrorEvent : Event { 1310 constructor( 1311 DOMString type, 1312 GPUUncapturedErrorEventInit gpuUncapturedErrorEventInitDict 1313 ); 1314 [SameObject] readonly attribute GPUError error; 1315 }; 1316 1317 dictionary GPUUncapturedErrorEventInit : EventInit { 1318 required GPUError error; 1319 }; 1320 1321 partial interface GPUDevice { 1322 attribute EventHandler onuncapturederror; 1323 }; 1324 1325 typedef [EnforceRange] unsigned long GPUBufferDynamicOffset; 1326 typedef [EnforceRange] unsigned long GPUStencilValue; 1327 typedef [EnforceRange] unsigned long GPUSampleMask; 1328 typedef [EnforceRange] long GPUDepthBias; 1329 1330 typedef [EnforceRange] unsigned long long GPUSize64; 1331 typedef [EnforceRange] unsigned long GPUIntegerCoordinate; 1332 typedef [EnforceRange] unsigned long GPUIndex32; 1333 typedef [EnforceRange] unsigned long GPUSize32; 1334 typedef [EnforceRange] long GPUSignedOffset32; 1335 1336 typedef unsigned long long GPUSize64Out; 1337 typedef unsigned long GPUIntegerCoordinateOut; 1338 typedef unsigned long GPUSize32Out; 1339 1340 typedef unsigned long GPUFlagsConstant; 1341 1342 dictionary GPUColorDict { 1343 required double r; 1344 required double g; 1345 required double b; 1346 required double a; 1347 }; 1348 typedef (sequence<double> or GPUColorDict) GPUColor; 1349 1350 dictionary GPUOrigin2DDict { 1351 GPUIntegerCoordinate x = 0; 1352 GPUIntegerCoordinate y = 0; 1353 }; 1354 typedef (sequence<GPUIntegerCoordinate> or GPUOrigin2DDict) GPUOrigin2D; 1355 1356 dictionary GPUOrigin3DDict { 1357 GPUIntegerCoordinate x = 0; 1358 GPUIntegerCoordinate y = 0; 1359 GPUIntegerCoordinate z = 0; 1360 }; 1361 typedef (sequence<GPUIntegerCoordinate> or GPUOrigin3DDict) GPUOrigin3D; 1362 1363 dictionary GPUExtent3DDict { 1364 required GPUIntegerCoordinate width; 1365 GPUIntegerCoordinate height = 1; 1366 GPUIntegerCoordinate depthOrArrayLayers = 1; 1367 }; 1368 typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;