@webref/idl 3.28.0 → 3.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/package.json +1 -1
  2. package/ANGLE_instanced_arrays.idl +0 -12
  3. package/CSP.idl +0 -56
  4. package/DOM-Parsing.idl +0 -26
  5. package/EXT_blend_minmax.idl +0 -10
  6. package/EXT_color_buffer_float.idl +0 -8
  7. package/EXT_color_buffer_half_float.idl +0 -12
  8. package/EXT_disjoint_timer_query.idl +0 -30
  9. package/EXT_disjoint_timer_query_webgl2.idl +0 -14
  10. package/EXT_float_blend.idl +0 -8
  11. package/EXT_frag_depth.idl +0 -8
  12. package/EXT_sRGB.idl +0 -12
  13. package/EXT_shader_texture_lod.idl +0 -8
  14. package/EXT_texture_compression_bptc.idl +0 -12
  15. package/EXT_texture_compression_rgtc.idl +0 -12
  16. package/EXT_texture_filter_anisotropic.idl +0 -10
  17. package/EXT_texture_norm16.idl +0 -16
  18. package/FedCM.idl +0 -67
  19. package/FileAPI.idl +0 -100
  20. package/IndexedDB.idl +0 -226
  21. package/KHR_parallel_shader_compile.idl +0 -9
  22. package/OES_draw_buffers_indexed.idl +0 -26
  23. package/OES_element_index_uint.idl +0 -8
  24. package/OES_fbo_render_mipmap.idl +0 -8
  25. package/OES_standard_derivatives.idl +0 -9
  26. package/OES_texture_float.idl +0 -7
  27. package/OES_texture_float_linear.idl +0 -7
  28. package/OES_texture_half_float.idl +0 -9
  29. package/OES_texture_half_float_linear.idl +0 -7
  30. package/OES_vertex_array_object.idl +0 -18
  31. package/OVR_multiview2.idl +0 -14
  32. package/SVG.idl +0 -693
  33. package/WEBGL_blend_equation_advanced_coherent.idl +0 -23
  34. package/WEBGL_clip_cull_distance.idl +0 -20
  35. package/WEBGL_color_buffer_float.idl +0 -11
  36. package/WEBGL_compressed_texture_astc.idl +0 -41
  37. package/WEBGL_compressed_texture_etc.idl +0 -19
  38. package/WEBGL_compressed_texture_etc1.idl +0 -10
  39. package/WEBGL_compressed_texture_pvrtc.idl +0 -13
  40. package/WEBGL_compressed_texture_s3tc.idl +0 -13
  41. package/WEBGL_compressed_texture_s3tc_srgb.idl +0 -13
  42. package/WEBGL_debug_renderer_info.idl +0 -12
  43. package/WEBGL_debug_shaders.idl +0 -11
  44. package/WEBGL_depth_texture.idl +0 -9
  45. package/WEBGL_draw_buffers.idl +0 -46
  46. package/WEBGL_draw_instanced_base_vertex_base_instance.idl +0 -14
  47. package/WEBGL_lose_context.idl +0 -10
  48. package/WEBGL_multi_draw.idl +0 -32
  49. package/WEBGL_multi_draw_instanced_base_vertex_base_instance.idl +0 -26
  50. package/WEBGL_provoking_vertex.idl +0 -13
  51. package/WebCryptoAPI.idl +0 -237
  52. package/accelerometer.idl +0 -40
  53. package/ambient-light.idl +0 -14
  54. package/anchors.idl +0 -35
  55. package/attribution-reporting-api.idl +0 -12
  56. package/audio-output.idl +0 -17
  57. package/autoplay-detection.idl +0 -19
  58. package/background-fetch.idl +0 -89
  59. package/background-sync.idl +0 -30
  60. package/badging.idl +0 -19
  61. package/battery-status.idl +0 -21
  62. package/beacon.idl +0 -8
  63. package/capture-handle-identity.idl +0 -27
  64. package/clipboard-apis.idl +0 -51
  65. package/close-watcher.idl +0 -19
  66. package/compat.idl +0 -13
  67. package/compression.idl +0 -16
  68. package/compute-pressure.idl +0 -40
  69. package/console.idl +0 -34
  70. package/contact-picker.idl +0 -44
  71. package/content-index.idl +0 -46
  72. package/cookie-store.idl +0 -110
  73. package/crash-reporting.idl +0 -10
  74. package/credential-management.idl +0 -105
  75. package/csp-embedded-enforcement.idl +0 -8
  76. package/csp-next.idl +0 -21
  77. package/css-animation-worklet.idl +0 -37
  78. package/css-animations-2.idl +0 -9
  79. package/css-animations.idl +0 -47
  80. package/css-cascade-6.idl +0 -10
  81. package/css-cascade.idl +0 -18
  82. package/css-color-5.idl +0 -12
  83. package/css-conditional.idl +0 -27
  84. package/css-contain-3.idl +0 -10
  85. package/css-contain.idl +0 -13
  86. package/css-counter-styles.idl +0 -23
  87. package/css-font-loading.idl +0 -134
  88. package/css-fonts.idl +0 -36
  89. package/css-highlight-api.idl +0 -27
  90. package/css-images-4.idl +0 -8
  91. package/css-layout-api.idl +0 -144
  92. package/css-masking.idl +0 -20
  93. package/css-nav.idl +0 -48
  94. package/css-nesting.idl +0 -10
  95. package/css-paint-api.idl +0 -39
  96. package/css-parser-api.idl +0 -76
  97. package/css-properties-values-api.idl +0 -23
  98. package/css-pseudo.idl +0 -16
  99. package/css-regions.idl +0 -29
  100. package/css-shadow-parts.idl +0 -8
  101. package/css-transitions-2.idl +0 -9
  102. package/css-transitions.idl +0 -25
  103. package/css-typed-om.idl +0 -423
  104. package/css-view-transitions.idl +0 -18
  105. package/cssom-view.idl +0 -200
  106. package/cssom.idl +0 -159
  107. package/custom-state-pseudo-class.idl +0 -14
  108. package/datacue.idl +0 -12
  109. package/deprecation-reporting.idl +0 -15
  110. package/device-memory.idl +0 -14
  111. package/device-posture.idl +0 -21
  112. package/digital-goods.idl +0 -44
  113. package/dom.idl +0 -645
  114. package/edit-context.idl +0 -113
  115. package/element-timing.idl +0 -22
  116. package/encoding.idl +0 -59
  117. package/encrypted-media.idl +0 -125
  118. package/entries-api.idl +0 -71
  119. package/event-timing.idl +0 -29
  120. package/eyedropper-api.idl +0 -18
  121. package/fenced-frame.idl +0 -49
  122. package/fetch.idl +0 -117
  123. package/fido.idl +0 -47
  124. package/file-system-access.idl +0 -72
  125. package/filter-effects.idl +0 -341
  126. package/font-metrics-api.idl +0 -42
  127. package/fs.idl +0 -97
  128. package/fullscreen.idl +0 -35
  129. package/gamepad-extensions.idl +0 -71
  130. package/gamepad.idl +0 -49
  131. package/generic-sensor.idl +0 -60
  132. package/geolocation-sensor.idl +0 -47
  133. package/geolocation.idl +0 -65
  134. package/geometry.idl +0 -290
  135. package/get-installed-related-apps.idl +0 -16
  136. package/gpc-spec.idl +0 -10
  137. package/gyroscope.idl +0 -24
  138. package/hr-time.idl +0 -19
  139. package/html-media-capture.idl +0 -8
  140. package/html.idl +0 -2716
  141. package/idle-detection.idl +0 -31
  142. package/image-capture.idl +0 -160
  143. package/image-resource.idl +0 -11
  144. package/ink-enhancement.idl +0 -32
  145. package/input-device-capabilities.idl +0 -24
  146. package/input-events.idl +0 -14
  147. package/intersection-observer.idl +0 -46
  148. package/intervention-reporting.idl +0 -14
  149. package/is-input-pending.idl +0 -16
  150. package/js-self-profiling.idl +0 -44
  151. package/keyboard-lock.idl +0 -14
  152. package/keyboard-map.idl +0 -15
  153. package/largest-contentful-paint.idl +0 -15
  154. package/layout-instability.idl +0 -20
  155. package/local-font-access.idl +0 -24
  156. package/longtasks.idl +0 -19
  157. package/magnetometer.idl +0 -46
  158. package/manifest-incubations.idl +0 -24
  159. package/mathml-core.idl +0 -9
  160. package/media-capabilities.idl +0 -115
  161. package/media-playback-quality.idl +0 -18
  162. package/media-source.idl +0 -91
  163. package/mediacapture-automation.idl +0 -36
  164. package/mediacapture-fromelement.idl +0 -17
  165. package/mediacapture-handle-actions.idl +0 -31
  166. package/mediacapture-region.idl +0 -15
  167. package/mediacapture-streams.idl +0 -248
  168. package/mediacapture-transform.idl +0 -23
  169. package/mediacapture-viewport.idl +0 -14
  170. package/mediasession.idl +0 -84
  171. package/mediastream-recording.idl +0 -60
  172. package/model-element.idl +0 -9
  173. package/mst-content-hint.idl +0 -18
  174. package/navigation-timing.idl +0 -71
  175. package/netinfo.idl +0 -43
  176. package/notifications.idl +0 -101
  177. package/orientation-event.idl +0 -82
  178. package/orientation-sensor.idl +0 -35
  179. package/page-lifecycle.idl +0 -19
  180. package/paint-timing.idl +0 -7
  181. package/payment-handler.idl +0 -131
  182. package/payment-request.idl +0 -112
  183. package/performance-measure-memory.idl +0 -30
  184. package/performance-timeline.idl +0 -49
  185. package/periodic-background-sync.idl +0 -34
  186. package/permissions-policy.idl +0 -29
  187. package/permissions-request.idl +0 -8
  188. package/permissions-revoke.idl +0 -8
  189. package/permissions.idl +0 -41
  190. package/picture-in-picture.idl +0 -41
  191. package/pointerevents.idl +0 -64
  192. package/pointerlock.idl +0 -28
  193. package/portals.idl +0 -50
  194. package/prefer-current-tab.idl +0 -8
  195. package/prerendering-revamped.idl +0 -15
  196. package/presentation-api.idl +0 -95
  197. package/private-click-measurement.idl +0 -8
  198. package/proximity.idl +0 -18
  199. package/push-api.idl +0 -93
  200. package/raw-camera-access.idl +0 -18
  201. package/referrer-policy.idl +0 -16
  202. package/remote-playback.idl +0 -32
  203. package/reporting.idl +0 -39
  204. package/requestStorageAccessForOrigin.idl +0 -12
  205. package/requestidlecallback.idl +0 -20
  206. package/resize-observer.idl +0 -37
  207. package/resource-timing.idl +0 -39
  208. package/sanitizer-api.idl +0 -38
  209. package/savedata.idl +0 -10
  210. package/scheduling-apis.idl +0 -57
  211. package/screen-capture.idl +0 -85
  212. package/screen-orientation.idl +0 -35
  213. package/screen-wake-lock.idl +0 -24
  214. package/scroll-animations.idl +0 -41
  215. package/scroll-to-text-fragment.idl +0 -12
  216. package/secure-payment-confirmation.idl +0 -52
  217. package/selection-api.idl +0 -46
  218. package/serial.idl +0 -85
  219. package/server-timing.idl +0 -17
  220. package/service-workers.idl +0 -240
  221. package/shape-detection-api.idl +0 -69
  222. package/speech-api.idl +0 -202
  223. package/storage-access.idl +0 -9
  224. package/storage.idl +0 -25
  225. package/streams.idl +0 -222
  226. package/svg-animations.idl +0 -68
  227. package/testutils.idl +0 -9
  228. package/text-detection-api.idl +0 -18
  229. package/touch-events.idl +0 -79
  230. package/trust-token-api.idl +0 -25
  231. package/trusted-types.idl +0 -71
  232. package/turtledove.idl +0 -63
  233. package/ua-client-hints.idl +0 -44
  234. package/uievents.idl +0 -248
  235. package/url.idl +0 -44
  236. package/urlpattern.idl +0 -59
  237. package/user-timing.idl +0 -34
  238. package/vibration.idl +0 -10
  239. package/video-rvfc.idl +0 -27
  240. package/virtual-keyboard.idl +0 -21
  241. package/wai-aria.idl +0 -59
  242. package/wasm-js-api.idl +0 -110
  243. package/wasm-web-api.idl +0 -11
  244. package/web-animations-2.idl +0 -102
  245. package/web-animations.idl +0 -149
  246. package/web-app-launch.idl +0 -19
  247. package/web-bluetooth.idl +0 -251
  248. package/web-locks.idl +0 -50
  249. package/web-nfc.idl +0 -81
  250. package/web-otp.idl +0 -21
  251. package/web-share.idl +0 -16
  252. package/webaudio.idl +0 -674
  253. package/webauthn.idl +0 -349
  254. package/webcodecs-aac-codec-registration.idl +0 -17
  255. package/webcodecs-avc-codec-registration.idl +0 -17
  256. package/webcodecs-flac-codec-registration.idl +0 -13
  257. package/webcodecs-hevc-codec-registration.idl +0 -17
  258. package/webcodecs-opus-codec-registration.idl +0 -22
  259. package/webcodecs.idl +0 -494
  260. package/webcrypto-secure-curves.idl +0 -8
  261. package/webdriver.idl +0 -9
  262. package/webgl1.idl +0 -745
  263. package/webgl2.idl +0 -582
  264. package/webgpu.idl +0 -1267
  265. package/webhid.idl +0 -127
  266. package/webidl.idl +0 -48
  267. package/webmidi.idl +0 -91
  268. package/webnn.idl +0 -549
  269. package/webrtc-encoded-transform.idl +0 -127
  270. package/webrtc-ice.idl +0 -24
  271. package/webrtc-identity.idl +0 -97
  272. package/webrtc-priority.idl +0 -24
  273. package/webrtc-stats.idl +0 -288
  274. package/webrtc-svc.idl +0 -8
  275. package/webrtc.idl +0 -628
  276. package/websockets.idl +0 -48
  277. package/webtransport.idl +0 -142
  278. package/webusb.idl +0 -249
  279. package/webvtt.idl +0 -40
  280. package/webxr-ar-module.idl +0 -29
  281. package/webxr-depth-sensing.idl +0 -57
  282. package/webxr-dom-overlays.idl +0 -31
  283. package/webxr-gamepads-module.idl +0 -8
  284. package/webxr-hand-input.idl +0 -66
  285. package/webxr-hit-test.idl +0 -69
  286. package/webxr-lighting-estimation.idl +0 -39
  287. package/webxr.idl +0 -295
  288. package/webxrlayers.idl +0 -212
  289. package/window-controls-overlay.idl +0 -28
  290. package/window-placement.idl +0 -42
  291. package/xhr.idl +0 -99
package/webgpu.idl DELETED
@@ -1,1267 +0,0 @@
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, DedicatedWorker), 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 maxBindingsPerBindGroup;
22
- readonly attribute unsigned long maxDynamicUniformBuffersPerPipelineLayout;
23
- readonly attribute unsigned long maxDynamicStorageBuffersPerPipelineLayout;
24
- readonly attribute unsigned long maxSampledTexturesPerShaderStage;
25
- readonly attribute unsigned long maxSamplersPerShaderStage;
26
- readonly attribute unsigned long maxStorageBuffersPerShaderStage;
27
- readonly attribute unsigned long maxStorageTexturesPerShaderStage;
28
- readonly attribute unsigned long maxUniformBuffersPerShaderStage;
29
- readonly attribute unsigned long maxFragmentCombinedOutputResources;
30
- readonly attribute unsigned long long maxUniformBufferBindingSize;
31
- readonly attribute unsigned long long maxStorageBufferBindingSize;
32
- readonly attribute unsigned long minUniformBufferOffsetAlignment;
33
- readonly attribute unsigned long minStorageBufferOffsetAlignment;
34
- readonly attribute unsigned long maxVertexBuffers;
35
- readonly attribute unsigned long long maxBufferSize;
36
- readonly attribute unsigned long maxVertexAttributes;
37
- readonly attribute unsigned long maxVertexBufferArrayStride;
38
- readonly attribute unsigned long maxInterStageShaderComponents;
39
- readonly attribute unsigned long maxInterStageShaderVariables;
40
- readonly attribute unsigned long maxColorAttachments;
41
- readonly attribute unsigned long maxColorAttachmentBytesPerSample;
42
- readonly attribute unsigned long maxComputeWorkgroupStorageSize;
43
- readonly attribute unsigned long maxComputeInvocationsPerWorkgroup;
44
- readonly attribute unsigned long maxComputeWorkgroupSizeX;
45
- readonly attribute unsigned long maxComputeWorkgroupSizeY;
46
- readonly attribute unsigned long maxComputeWorkgroupSizeZ;
47
- readonly attribute unsigned long maxComputeWorkgroupsPerDimension;
48
- };
49
-
50
- [Exposed=(Window, DedicatedWorker), SecureContext]
51
- interface GPUSupportedFeatures {
52
- readonly setlike<DOMString>;
53
- };
54
-
55
- [Exposed=(Window, DedicatedWorker), SecureContext]
56
- interface GPUAdapterInfo {
57
- readonly attribute DOMString vendor;
58
- readonly attribute DOMString architecture;
59
- readonly attribute DOMString device;
60
- readonly attribute DOMString description;
61
- };
62
-
63
- interface mixin NavigatorGPU {
64
- [SameObject, SecureContext] readonly attribute GPU gpu;
65
- };
66
- Navigator includes NavigatorGPU;
67
- WorkerNavigator includes NavigatorGPU;
68
-
69
- [Exposed=(Window, DedicatedWorker), SecureContext]
70
- interface GPU {
71
- Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options = {});
72
- GPUTextureFormat getPreferredCanvasFormat();
73
- };
74
-
75
- dictionary GPURequestAdapterOptions {
76
- GPUPowerPreference powerPreference;
77
- boolean forceFallbackAdapter = false;
78
- };
79
-
80
- enum GPUPowerPreference {
81
- "low-power",
82
- "high-performance"
83
- };
84
-
85
- [Exposed=(Window, DedicatedWorker), SecureContext]
86
- interface GPUAdapter {
87
- [SameObject] readonly attribute GPUSupportedFeatures features;
88
- [SameObject] readonly attribute GPUSupportedLimits limits;
89
- readonly attribute boolean isFallbackAdapter;
90
-
91
- Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
92
- Promise<GPUAdapterInfo> requestAdapterInfo(optional sequence<DOMString> unmaskHints = []);
93
- };
94
-
95
- dictionary GPUDeviceDescriptor : GPUObjectDescriptorBase {
96
- sequence<GPUFeatureName> requiredFeatures = [];
97
- record<DOMString, GPUSize64> requiredLimits = {};
98
- GPUQueueDescriptor defaultQueue = {};
99
- };
100
-
101
- enum GPUFeatureName {
102
- "depth-clip-control",
103
- "depth32float-stencil8",
104
- "texture-compression-bc",
105
- "texture-compression-etc2",
106
- "texture-compression-astc",
107
- "timestamp-query",
108
- "indirect-first-instance",
109
- "shader-f16",
110
- "rg11b10ufloat-renderable",
111
- "bgra8unorm-storage",
112
- "float32-filterable"
113
- };
114
-
115
- [Exposed=(Window, DedicatedWorker), SecureContext]
116
- interface GPUDevice : EventTarget {
117
- [SameObject] readonly attribute GPUSupportedFeatures features;
118
- [SameObject] readonly attribute GPUSupportedLimits limits;
119
-
120
- [SameObject] readonly attribute GPUQueue queue;
121
-
122
- undefined destroy();
123
-
124
- GPUBuffer createBuffer(GPUBufferDescriptor descriptor);
125
- GPUTexture createTexture(GPUTextureDescriptor descriptor);
126
- GPUSampler createSampler(optional GPUSamplerDescriptor descriptor = {});
127
- GPUExternalTexture importExternalTexture(GPUExternalTextureDescriptor descriptor);
128
-
129
- GPUBindGroupLayout createBindGroupLayout(GPUBindGroupLayoutDescriptor descriptor);
130
- GPUPipelineLayout createPipelineLayout(GPUPipelineLayoutDescriptor descriptor);
131
- GPUBindGroup createBindGroup(GPUBindGroupDescriptor descriptor);
132
-
133
- GPUShaderModule createShaderModule(GPUShaderModuleDescriptor descriptor);
134
- GPUComputePipeline createComputePipeline(GPUComputePipelineDescriptor descriptor);
135
- GPURenderPipeline createRenderPipeline(GPURenderPipelineDescriptor descriptor);
136
- Promise<GPUComputePipeline> createComputePipelineAsync(GPUComputePipelineDescriptor descriptor);
137
- Promise<GPURenderPipeline> createRenderPipelineAsync(GPURenderPipelineDescriptor descriptor);
138
-
139
- GPUCommandEncoder createCommandEncoder(optional GPUCommandEncoderDescriptor descriptor = {});
140
- GPURenderBundleEncoder createRenderBundleEncoder(GPURenderBundleEncoderDescriptor descriptor);
141
-
142
- GPUQuerySet createQuerySet(GPUQuerySetDescriptor descriptor);
143
- };
144
- GPUDevice includes GPUObjectBase;
145
-
146
- [Exposed=(Window, DedicatedWorker), SecureContext]
147
- interface GPUBuffer {
148
- readonly attribute GPUSize64 size;
149
- readonly attribute GPUBufferUsageFlags usage;
150
-
151
- readonly attribute GPUBufferMapState mapState;
152
-
153
- Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size);
154
- ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size);
155
- undefined unmap();
156
-
157
- undefined destroy();
158
- };
159
- GPUBuffer includes GPUObjectBase;
160
-
161
- enum GPUBufferMapState {
162
- "unmapped",
163
- "pending",
164
- "mapped"
165
- };
166
-
167
- dictionary GPUBufferDescriptor : GPUObjectDescriptorBase {
168
- required GPUSize64 size;
169
- required GPUBufferUsageFlags usage;
170
- boolean mappedAtCreation = false;
171
- };
172
-
173
- typedef [EnforceRange] unsigned long GPUBufferUsageFlags;
174
- [Exposed=(Window, DedicatedWorker)]
175
- namespace GPUBufferUsage {
176
- const GPUFlagsConstant MAP_READ = 0x0001;
177
- const GPUFlagsConstant MAP_WRITE = 0x0002;
178
- const GPUFlagsConstant COPY_SRC = 0x0004;
179
- const GPUFlagsConstant COPY_DST = 0x0008;
180
- const GPUFlagsConstant INDEX = 0x0010;
181
- const GPUFlagsConstant VERTEX = 0x0020;
182
- const GPUFlagsConstant UNIFORM = 0x0040;
183
- const GPUFlagsConstant STORAGE = 0x0080;
184
- const GPUFlagsConstant INDIRECT = 0x0100;
185
- const GPUFlagsConstant QUERY_RESOLVE = 0x0200;
186
- };
187
-
188
- typedef [EnforceRange] unsigned long GPUMapModeFlags;
189
- [Exposed=(Window, DedicatedWorker)]
190
- namespace GPUMapMode {
191
- const GPUFlagsConstant READ = 0x0001;
192
- const GPUFlagsConstant WRITE = 0x0002;
193
- };
194
-
195
- [Exposed=(Window, DedicatedWorker), SecureContext]
196
- interface GPUTexture {
197
- GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {});
198
-
199
- undefined destroy();
200
-
201
- readonly attribute GPUIntegerCoordinate width;
202
- readonly attribute GPUIntegerCoordinate height;
203
- readonly attribute GPUIntegerCoordinate depthOrArrayLayers;
204
- readonly attribute GPUIntegerCoordinate mipLevelCount;
205
- readonly attribute GPUSize32 sampleCount;
206
- readonly attribute GPUTextureDimension dimension;
207
- readonly attribute GPUTextureFormat format;
208
- readonly attribute GPUTextureUsageFlags usage;
209
- };
210
- GPUTexture includes GPUObjectBase;
211
-
212
- dictionary GPUTextureDescriptor : GPUObjectDescriptorBase {
213
- required GPUExtent3D size;
214
- GPUIntegerCoordinate mipLevelCount = 1;
215
- GPUSize32 sampleCount = 1;
216
- GPUTextureDimension dimension = "2d";
217
- required GPUTextureFormat format;
218
- required GPUTextureUsageFlags usage;
219
- sequence<GPUTextureFormat> viewFormats = [];
220
- };
221
-
222
- enum GPUTextureDimension {
223
- "1d",
224
- "2d",
225
- "3d"
226
- };
227
-
228
- typedef [EnforceRange] unsigned long GPUTextureUsageFlags;
229
- [Exposed=(Window, DedicatedWorker)]
230
- namespace GPUTextureUsage {
231
- const GPUFlagsConstant COPY_SRC = 0x01;
232
- const GPUFlagsConstant COPY_DST = 0x02;
233
- const GPUFlagsConstant TEXTURE_BINDING = 0x04;
234
- const GPUFlagsConstant STORAGE_BINDING = 0x08;
235
- const GPUFlagsConstant RENDER_ATTACHMENT = 0x10;
236
- };
237
-
238
- [Exposed=(Window, DedicatedWorker), SecureContext]
239
- interface GPUTextureView {
240
- };
241
- GPUTextureView includes GPUObjectBase;
242
-
243
- dictionary GPUTextureViewDescriptor : GPUObjectDescriptorBase {
244
- GPUTextureFormat format;
245
- GPUTextureViewDimension dimension;
246
- GPUTextureAspect aspect = "all";
247
- GPUIntegerCoordinate baseMipLevel = 0;
248
- GPUIntegerCoordinate mipLevelCount;
249
- GPUIntegerCoordinate baseArrayLayer = 0;
250
- GPUIntegerCoordinate arrayLayerCount;
251
- };
252
-
253
- enum GPUTextureViewDimension {
254
- "1d",
255
- "2d",
256
- "2d-array",
257
- "cube",
258
- "cube-array",
259
- "3d"
260
- };
261
-
262
- enum GPUTextureAspect {
263
- "all",
264
- "stencil-only",
265
- "depth-only"
266
- };
267
-
268
- enum GPUTextureFormat {
269
- // 8-bit formats
270
- "r8unorm",
271
- "r8snorm",
272
- "r8uint",
273
- "r8sint",
274
-
275
- // 16-bit formats
276
- "r16uint",
277
- "r16sint",
278
- "r16float",
279
- "rg8unorm",
280
- "rg8snorm",
281
- "rg8uint",
282
- "rg8sint",
283
-
284
- // 32-bit formats
285
- "r32uint",
286
- "r32sint",
287
- "r32float",
288
- "rg16uint",
289
- "rg16sint",
290
- "rg16float",
291
- "rgba8unorm",
292
- "rgba8unorm-srgb",
293
- "rgba8snorm",
294
- "rgba8uint",
295
- "rgba8sint",
296
- "bgra8unorm",
297
- "bgra8unorm-srgb",
298
- // Packed 32-bit formats
299
- "rgb9e5ufloat",
300
- "rgb10a2unorm",
301
- "rg11b10ufloat",
302
-
303
- // 64-bit formats
304
- "rg32uint",
305
- "rg32sint",
306
- "rg32float",
307
- "rgba16uint",
308
- "rgba16sint",
309
- "rgba16float",
310
-
311
- // 128-bit formats
312
- "rgba32uint",
313
- "rgba32sint",
314
- "rgba32float",
315
-
316
- // Depth/stencil formats
317
- "stencil8",
318
- "depth16unorm",
319
- "depth24plus",
320
- "depth24plus-stencil8",
321
- "depth32float",
322
-
323
- // "depth32float-stencil8" feature
324
- "depth32float-stencil8",
325
-
326
- // BC compressed formats usable if "texture-compression-bc" is both
327
- // supported by the device/user agent and enabled in requestDevice.
328
- "bc1-rgba-unorm",
329
- "bc1-rgba-unorm-srgb",
330
- "bc2-rgba-unorm",
331
- "bc2-rgba-unorm-srgb",
332
- "bc3-rgba-unorm",
333
- "bc3-rgba-unorm-srgb",
334
- "bc4-r-unorm",
335
- "bc4-r-snorm",
336
- "bc5-rg-unorm",
337
- "bc5-rg-snorm",
338
- "bc6h-rgb-ufloat",
339
- "bc6h-rgb-float",
340
- "bc7-rgba-unorm",
341
- "bc7-rgba-unorm-srgb",
342
-
343
- // ETC2 compressed formats usable if "texture-compression-etc2" is both
344
- // supported by the device/user agent and enabled in requestDevice.
345
- "etc2-rgb8unorm",
346
- "etc2-rgb8unorm-srgb",
347
- "etc2-rgb8a1unorm",
348
- "etc2-rgb8a1unorm-srgb",
349
- "etc2-rgba8unorm",
350
- "etc2-rgba8unorm-srgb",
351
- "eac-r11unorm",
352
- "eac-r11snorm",
353
- "eac-rg11unorm",
354
- "eac-rg11snorm",
355
-
356
- // ASTC compressed formats usable if "texture-compression-astc" is both
357
- // supported by the device/user agent and enabled in requestDevice.
358
- "astc-4x4-unorm",
359
- "astc-4x4-unorm-srgb",
360
- "astc-5x4-unorm",
361
- "astc-5x4-unorm-srgb",
362
- "astc-5x5-unorm",
363
- "astc-5x5-unorm-srgb",
364
- "astc-6x5-unorm",
365
- "astc-6x5-unorm-srgb",
366
- "astc-6x6-unorm",
367
- "astc-6x6-unorm-srgb",
368
- "astc-8x5-unorm",
369
- "astc-8x5-unorm-srgb",
370
- "astc-8x6-unorm",
371
- "astc-8x6-unorm-srgb",
372
- "astc-8x8-unorm",
373
- "astc-8x8-unorm-srgb",
374
- "astc-10x5-unorm",
375
- "astc-10x5-unorm-srgb",
376
- "astc-10x6-unorm",
377
- "astc-10x6-unorm-srgb",
378
- "astc-10x8-unorm",
379
- "astc-10x8-unorm-srgb",
380
- "astc-10x10-unorm",
381
- "astc-10x10-unorm-srgb",
382
- "astc-12x10-unorm",
383
- "astc-12x10-unorm-srgb",
384
- "astc-12x12-unorm",
385
- "astc-12x12-unorm-srgb"
386
- };
387
-
388
- [Exposed=(Window, DedicatedWorker), SecureContext]
389
- interface GPUExternalTexture {
390
- };
391
- GPUExternalTexture includes GPUObjectBase;
392
-
393
- dictionary GPUExternalTextureDescriptor : GPUObjectDescriptorBase {
394
- required HTMLVideoElement source;
395
- PredefinedColorSpace colorSpace = "srgb";
396
- };
397
-
398
- [Exposed=(Window, DedicatedWorker), SecureContext]
399
- interface GPUSampler {
400
- };
401
- GPUSampler includes GPUObjectBase;
402
-
403
- dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase {
404
- GPUAddressMode addressModeU = "clamp-to-edge";
405
- GPUAddressMode addressModeV = "clamp-to-edge";
406
- GPUAddressMode addressModeW = "clamp-to-edge";
407
- GPUFilterMode magFilter = "nearest";
408
- GPUFilterMode minFilter = "nearest";
409
- GPUMipmapFilterMode mipmapFilter = "nearest";
410
- float lodMinClamp = 0;
411
- float lodMaxClamp = 32;
412
- GPUCompareFunction compare;
413
- [Clamp] unsigned short maxAnisotropy = 1;
414
- };
415
-
416
- enum GPUAddressMode {
417
- "clamp-to-edge",
418
- "repeat",
419
- "mirror-repeat"
420
- };
421
-
422
- enum GPUFilterMode {
423
- "nearest",
424
- "linear"
425
- };
426
-
427
- enum GPUMipmapFilterMode {
428
- "nearest",
429
- "linear"
430
- };
431
-
432
- enum GPUCompareFunction {
433
- "never",
434
- "less",
435
- "equal",
436
- "less-equal",
437
- "greater",
438
- "not-equal",
439
- "greater-equal",
440
- "always"
441
- };
442
-
443
- [Exposed=(Window, DedicatedWorker), SecureContext]
444
- interface GPUBindGroupLayout {
445
- };
446
- GPUBindGroupLayout includes GPUObjectBase;
447
-
448
- dictionary GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase {
449
- required sequence<GPUBindGroupLayoutEntry> entries;
450
- };
451
-
452
- dictionary GPUBindGroupLayoutEntry {
453
- required GPUIndex32 binding;
454
- required GPUShaderStageFlags visibility;
455
-
456
- GPUBufferBindingLayout buffer;
457
- GPUSamplerBindingLayout sampler;
458
- GPUTextureBindingLayout texture;
459
- GPUStorageTextureBindingLayout storageTexture;
460
- GPUExternalTextureBindingLayout externalTexture;
461
- };
462
-
463
- typedef [EnforceRange] unsigned long GPUShaderStageFlags;
464
- [Exposed=(Window, DedicatedWorker)]
465
- namespace GPUShaderStage {
466
- const GPUFlagsConstant VERTEX = 0x1;
467
- const GPUFlagsConstant FRAGMENT = 0x2;
468
- const GPUFlagsConstant COMPUTE = 0x4;
469
- };
470
-
471
- enum GPUBufferBindingType {
472
- "uniform",
473
- "storage",
474
- "read-only-storage"
475
- };
476
-
477
- dictionary GPUBufferBindingLayout {
478
- GPUBufferBindingType type = "uniform";
479
- boolean hasDynamicOffset = false;
480
- GPUSize64 minBindingSize = 0;
481
- };
482
-
483
- enum GPUSamplerBindingType {
484
- "filtering",
485
- "non-filtering",
486
- "comparison"
487
- };
488
-
489
- dictionary GPUSamplerBindingLayout {
490
- GPUSamplerBindingType type = "filtering";
491
- };
492
-
493
- enum GPUTextureSampleType {
494
- "float",
495
- "unfilterable-float",
496
- "depth",
497
- "sint",
498
- "uint"
499
- };
500
-
501
- dictionary GPUTextureBindingLayout {
502
- GPUTextureSampleType sampleType = "float";
503
- GPUTextureViewDimension viewDimension = "2d";
504
- boolean multisampled = false;
505
- };
506
-
507
- enum GPUStorageTextureAccess {
508
- "write-only"
509
- };
510
-
511
- dictionary GPUStorageTextureBindingLayout {
512
- GPUStorageTextureAccess access = "write-only";
513
- required GPUTextureFormat format;
514
- GPUTextureViewDimension viewDimension = "2d";
515
- };
516
-
517
- dictionary GPUExternalTextureBindingLayout {
518
- };
519
-
520
- [Exposed=(Window, DedicatedWorker), SecureContext]
521
- interface GPUBindGroup {
522
- };
523
- GPUBindGroup includes GPUObjectBase;
524
-
525
- dictionary GPUBindGroupDescriptor : GPUObjectDescriptorBase {
526
- required GPUBindGroupLayout layout;
527
- required sequence<GPUBindGroupEntry> entries;
528
- };
529
-
530
- typedef (GPUSampler or GPUTextureView or GPUBufferBinding or GPUExternalTexture) GPUBindingResource;
531
-
532
- dictionary GPUBindGroupEntry {
533
- required GPUIndex32 binding;
534
- required GPUBindingResource resource;
535
- };
536
-
537
- dictionary GPUBufferBinding {
538
- required GPUBuffer buffer;
539
- GPUSize64 offset = 0;
540
- GPUSize64 size;
541
- };
542
-
543
- [Exposed=(Window, DedicatedWorker), SecureContext]
544
- interface GPUPipelineLayout {
545
- };
546
- GPUPipelineLayout includes GPUObjectBase;
547
-
548
- dictionary GPUPipelineLayoutDescriptor : GPUObjectDescriptorBase {
549
- required sequence<GPUBindGroupLayout> bindGroupLayouts;
550
- };
551
-
552
- [Exposed=(Window, DedicatedWorker), SecureContext]
553
- interface GPUShaderModule {
554
- Promise<GPUCompilationInfo> getCompilationInfo();
555
- };
556
- GPUShaderModule includes GPUObjectBase;
557
-
558
- dictionary GPUShaderModuleDescriptor : GPUObjectDescriptorBase {
559
- required USVString code;
560
- object sourceMap;
561
- record<USVString, GPUShaderModuleCompilationHint> hints;
562
- };
563
-
564
- dictionary GPUShaderModuleCompilationHint {
565
- (GPUPipelineLayout or GPUAutoLayoutMode) layout;
566
- };
567
-
568
- enum GPUCompilationMessageType {
569
- "error",
570
- "warning",
571
- "info"
572
- };
573
-
574
- [Exposed=(Window, DedicatedWorker), Serializable, SecureContext]
575
- interface GPUCompilationMessage {
576
- readonly attribute DOMString message;
577
- readonly attribute GPUCompilationMessageType type;
578
- readonly attribute unsigned long long lineNum;
579
- readonly attribute unsigned long long linePos;
580
- readonly attribute unsigned long long offset;
581
- readonly attribute unsigned long long length;
582
- };
583
-
584
- [Exposed=(Window, DedicatedWorker), Serializable, SecureContext]
585
- interface GPUCompilationInfo {
586
- readonly attribute FrozenArray<GPUCompilationMessage> messages;
587
- };
588
-
589
- [Exposed=(Window, DedicatedWorker), SecureContext, Serializable]
590
- interface GPUPipelineError : DOMException {
591
- constructor(DOMString message, GPUPipelineErrorInit options);
592
- readonly attribute GPUPipelineErrorReason reason;
593
- };
594
-
595
- dictionary GPUPipelineErrorInit {
596
- required GPUPipelineErrorReason reason;
597
- };
598
-
599
- enum GPUPipelineErrorReason {
600
- "validation",
601
- "internal"
602
- };
603
-
604
- enum GPUAutoLayoutMode {
605
- "auto"
606
- };
607
-
608
- dictionary GPUPipelineDescriptorBase : GPUObjectDescriptorBase {
609
- required (GPUPipelineLayout or GPUAutoLayoutMode) layout;
610
- };
611
-
612
- interface mixin GPUPipelineBase {
613
- [NewObject] GPUBindGroupLayout getBindGroupLayout(unsigned long index);
614
- };
615
-
616
- dictionary GPUProgrammableStage {
617
- required GPUShaderModule module;
618
- required USVString entryPoint;
619
- record<USVString, GPUPipelineConstantValue> constants;
620
- };
621
-
622
- typedef double GPUPipelineConstantValue; // May represent WGSL’s bool, f32, i32, u32, and f16 if enabled.
623
-
624
- [Exposed=(Window, DedicatedWorker), SecureContext]
625
- interface GPUComputePipeline {
626
- };
627
- GPUComputePipeline includes GPUObjectBase;
628
- GPUComputePipeline includes GPUPipelineBase;
629
-
630
- dictionary GPUComputePipelineDescriptor : GPUPipelineDescriptorBase {
631
- required GPUProgrammableStage compute;
632
- };
633
-
634
- [Exposed=(Window, DedicatedWorker), SecureContext]
635
- interface GPURenderPipeline {
636
- };
637
- GPURenderPipeline includes GPUObjectBase;
638
- GPURenderPipeline includes GPUPipelineBase;
639
-
640
- dictionary GPURenderPipelineDescriptor : GPUPipelineDescriptorBase {
641
- required GPUVertexState vertex;
642
- GPUPrimitiveState primitive = {};
643
- GPUDepthStencilState depthStencil;
644
- GPUMultisampleState multisample = {};
645
- GPUFragmentState fragment;
646
- };
647
-
648
- dictionary GPUPrimitiveState {
649
- GPUPrimitiveTopology topology = "triangle-list";
650
- GPUIndexFormat stripIndexFormat;
651
- GPUFrontFace frontFace = "ccw";
652
- GPUCullMode cullMode = "none";
653
-
654
- // Requires "depth-clip-control" feature.
655
- boolean unclippedDepth = false;
656
- };
657
-
658
- enum GPUPrimitiveTopology {
659
- "point-list",
660
- "line-list",
661
- "line-strip",
662
- "triangle-list",
663
- "triangle-strip"
664
- };
665
-
666
- enum GPUFrontFace {
667
- "ccw",
668
- "cw"
669
- };
670
-
671
- enum GPUCullMode {
672
- "none",
673
- "front",
674
- "back"
675
- };
676
-
677
- dictionary GPUMultisampleState {
678
- GPUSize32 count = 1;
679
- GPUSampleMask mask = 0xFFFFFFFF;
680
- boolean alphaToCoverageEnabled = false;
681
- };
682
-
683
- dictionary GPUFragmentState : GPUProgrammableStage {
684
- required sequence<GPUColorTargetState?> targets;
685
- };
686
-
687
- dictionary GPUColorTargetState {
688
- required GPUTextureFormat format;
689
-
690
- GPUBlendState blend;
691
- GPUColorWriteFlags writeMask = 0xF; // GPUColorWrite.ALL
692
- };
693
-
694
- dictionary GPUBlendState {
695
- required GPUBlendComponent color;
696
- required GPUBlendComponent alpha;
697
- };
698
-
699
- typedef [EnforceRange] unsigned long GPUColorWriteFlags;
700
- [Exposed=(Window, DedicatedWorker)]
701
- namespace GPUColorWrite {
702
- const GPUFlagsConstant RED = 0x1;
703
- const GPUFlagsConstant GREEN = 0x2;
704
- const GPUFlagsConstant BLUE = 0x4;
705
- const GPUFlagsConstant ALPHA = 0x8;
706
- const GPUFlagsConstant ALL = 0xF;
707
- };
708
-
709
- dictionary GPUBlendComponent {
710
- GPUBlendOperation operation = "add";
711
- GPUBlendFactor srcFactor = "one";
712
- GPUBlendFactor dstFactor = "zero";
713
- };
714
-
715
- enum GPUBlendFactor {
716
- "zero",
717
- "one",
718
- "src",
719
- "one-minus-src",
720
- "src-alpha",
721
- "one-minus-src-alpha",
722
- "dst",
723
- "one-minus-dst",
724
- "dst-alpha",
725
- "one-minus-dst-alpha",
726
- "src-alpha-saturated",
727
- "constant",
728
- "one-minus-constant"
729
- };
730
-
731
- enum GPUBlendOperation {
732
- "add",
733
- "subtract",
734
- "reverse-subtract",
735
- "min",
736
- "max"
737
- };
738
-
739
- dictionary GPUDepthStencilState {
740
- required GPUTextureFormat format;
741
-
742
- required boolean depthWriteEnabled;
743
- required GPUCompareFunction depthCompare;
744
-
745
- GPUStencilFaceState stencilFront = {};
746
- GPUStencilFaceState stencilBack = {};
747
-
748
- GPUStencilValue stencilReadMask = 0xFFFFFFFF;
749
- GPUStencilValue stencilWriteMask = 0xFFFFFFFF;
750
-
751
- GPUDepthBias depthBias = 0;
752
- float depthBiasSlopeScale = 0;
753
- float depthBiasClamp = 0;
754
- };
755
-
756
- dictionary GPUStencilFaceState {
757
- GPUCompareFunction compare = "always";
758
- GPUStencilOperation failOp = "keep";
759
- GPUStencilOperation depthFailOp = "keep";
760
- GPUStencilOperation passOp = "keep";
761
- };
762
-
763
- enum GPUStencilOperation {
764
- "keep",
765
- "zero",
766
- "replace",
767
- "invert",
768
- "increment-clamp",
769
- "decrement-clamp",
770
- "increment-wrap",
771
- "decrement-wrap"
772
- };
773
-
774
- enum GPUIndexFormat {
775
- "uint16",
776
- "uint32"
777
- };
778
-
779
- enum GPUVertexFormat {
780
- "uint8x2",
781
- "uint8x4",
782
- "sint8x2",
783
- "sint8x4",
784
- "unorm8x2",
785
- "unorm8x4",
786
- "snorm8x2",
787
- "snorm8x4",
788
- "uint16x2",
789
- "uint16x4",
790
- "sint16x2",
791
- "sint16x4",
792
- "unorm16x2",
793
- "unorm16x4",
794
- "snorm16x2",
795
- "snorm16x4",
796
- "float16x2",
797
- "float16x4",
798
- "float32",
799
- "float32x2",
800
- "float32x3",
801
- "float32x4",
802
- "uint32",
803
- "uint32x2",
804
- "uint32x3",
805
- "uint32x4",
806
- "sint32",
807
- "sint32x2",
808
- "sint32x3",
809
- "sint32x4"
810
- };
811
-
812
- enum GPUVertexStepMode {
813
- "vertex",
814
- "instance"
815
- };
816
-
817
- dictionary GPUVertexState : GPUProgrammableStage {
818
- sequence<GPUVertexBufferLayout?> buffers = [];
819
- };
820
-
821
- dictionary GPUVertexBufferLayout {
822
- required GPUSize64 arrayStride;
823
- GPUVertexStepMode stepMode = "vertex";
824
- required sequence<GPUVertexAttribute> attributes;
825
- };
826
-
827
- dictionary GPUVertexAttribute {
828
- required GPUVertexFormat format;
829
- required GPUSize64 offset;
830
-
831
- required GPUIndex32 shaderLocation;
832
- };
833
-
834
- dictionary GPUImageDataLayout {
835
- GPUSize64 offset = 0;
836
- GPUSize32 bytesPerRow;
837
- GPUSize32 rowsPerImage;
838
- };
839
-
840
- dictionary GPUImageCopyBuffer : GPUImageDataLayout {
841
- required GPUBuffer buffer;
842
- };
843
-
844
- dictionary GPUImageCopyTexture {
845
- required GPUTexture texture;
846
- GPUIntegerCoordinate mipLevel = 0;
847
- GPUOrigin3D origin = {};
848
- GPUTextureAspect aspect = "all";
849
- };
850
-
851
- dictionary GPUImageCopyTextureTagged : GPUImageCopyTexture {
852
- PredefinedColorSpace colorSpace = "srgb";
853
- boolean premultipliedAlpha = false;
854
- };
855
-
856
- dictionary GPUImageCopyExternalImage {
857
- required (ImageBitmap or HTMLVideoElement or HTMLCanvasElement or OffscreenCanvas) source;
858
- GPUOrigin2D origin = {};
859
- boolean flipY = false;
860
- };
861
-
862
- [Exposed=(Window, DedicatedWorker), SecureContext]
863
- interface GPUCommandBuffer {
864
- };
865
- GPUCommandBuffer includes GPUObjectBase;
866
-
867
- dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {
868
- };
869
-
870
- interface mixin GPUCommandsMixin {
871
- };
872
-
873
- [Exposed=(Window, DedicatedWorker), SecureContext]
874
- interface GPUCommandEncoder {
875
- GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
876
- GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
877
-
878
- undefined copyBufferToBuffer(
879
- GPUBuffer source,
880
- GPUSize64 sourceOffset,
881
- GPUBuffer destination,
882
- GPUSize64 destinationOffset,
883
- GPUSize64 size);
884
-
885
- undefined copyBufferToTexture(
886
- GPUImageCopyBuffer source,
887
- GPUImageCopyTexture destination,
888
- GPUExtent3D copySize);
889
-
890
- undefined copyTextureToBuffer(
891
- GPUImageCopyTexture source,
892
- GPUImageCopyBuffer destination,
893
- GPUExtent3D copySize);
894
-
895
- undefined copyTextureToTexture(
896
- GPUImageCopyTexture source,
897
- GPUImageCopyTexture destination,
898
- GPUExtent3D copySize);
899
-
900
- undefined clearBuffer(
901
- GPUBuffer buffer,
902
- optional GPUSize64 offset = 0,
903
- optional GPUSize64 size);
904
-
905
- undefined writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex);
906
-
907
- undefined resolveQuerySet(
908
- GPUQuerySet querySet,
909
- GPUSize32 firstQuery,
910
- GPUSize32 queryCount,
911
- GPUBuffer destination,
912
- GPUSize64 destinationOffset);
913
-
914
- GPUCommandBuffer finish(optional GPUCommandBufferDescriptor descriptor = {});
915
- };
916
- GPUCommandEncoder includes GPUObjectBase;
917
- GPUCommandEncoder includes GPUCommandsMixin;
918
- GPUCommandEncoder includes GPUDebugCommandsMixin;
919
-
920
- dictionary GPUCommandEncoderDescriptor : GPUObjectDescriptorBase {
921
- };
922
-
923
- interface mixin GPUBindingCommandsMixin {
924
- undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup,
925
- optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []);
926
-
927
- undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup,
928
- Uint32Array dynamicOffsetsData,
929
- GPUSize64 dynamicOffsetsDataStart,
930
- GPUSize32 dynamicOffsetsDataLength);
931
- };
932
-
933
- interface mixin GPUDebugCommandsMixin {
934
- undefined pushDebugGroup(USVString groupLabel);
935
- undefined popDebugGroup();
936
- undefined insertDebugMarker(USVString markerLabel);
937
- };
938
-
939
- [Exposed=(Window, DedicatedWorker), SecureContext]
940
- interface GPUComputePassEncoder {
941
- undefined setPipeline(GPUComputePipeline pipeline);
942
- undefined dispatchWorkgroups(GPUSize32 workgroupCountX, optional GPUSize32 workgroupCountY = 1, optional GPUSize32 workgroupCountZ = 1);
943
- undefined dispatchWorkgroupsIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
944
-
945
- undefined end();
946
- };
947
- GPUComputePassEncoder includes GPUObjectBase;
948
- GPUComputePassEncoder includes GPUCommandsMixin;
949
- GPUComputePassEncoder includes GPUDebugCommandsMixin;
950
- GPUComputePassEncoder includes GPUBindingCommandsMixin;
951
-
952
- enum GPUComputePassTimestampLocation {
953
- "beginning",
954
- "end"
955
- };
956
-
957
- dictionary GPUComputePassTimestampWrite {
958
- required GPUQuerySet querySet;
959
- required GPUSize32 queryIndex;
960
- required GPUComputePassTimestampLocation location;
961
- };
962
-
963
- typedef sequence<GPUComputePassTimestampWrite> GPUComputePassTimestampWrites;
964
-
965
- dictionary GPUComputePassDescriptor : GPUObjectDescriptorBase {
966
- GPUComputePassTimestampWrites timestampWrites = [];
967
- };
968
-
969
- [Exposed=(Window, DedicatedWorker), SecureContext]
970
- interface GPURenderPassEncoder {
971
- undefined setViewport(float x, float y,
972
- float width, float height,
973
- float minDepth, float maxDepth);
974
-
975
- undefined setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y,
976
- GPUIntegerCoordinate width, GPUIntegerCoordinate height);
977
-
978
- undefined setBlendConstant(GPUColor color);
979
- undefined setStencilReference(GPUStencilValue reference);
980
-
981
- undefined beginOcclusionQuery(GPUSize32 queryIndex);
982
- undefined endOcclusionQuery();
983
-
984
- undefined executeBundles(sequence<GPURenderBundle> bundles);
985
- undefined end();
986
- };
987
- GPURenderPassEncoder includes GPUObjectBase;
988
- GPURenderPassEncoder includes GPUCommandsMixin;
989
- GPURenderPassEncoder includes GPUDebugCommandsMixin;
990
- GPURenderPassEncoder includes GPUBindingCommandsMixin;
991
- GPURenderPassEncoder includes GPURenderCommandsMixin;
992
-
993
- enum GPURenderPassTimestampLocation {
994
- "beginning",
995
- "end"
996
- };
997
-
998
- dictionary GPURenderPassTimestampWrite {
999
- required GPUQuerySet querySet;
1000
- required GPUSize32 queryIndex;
1001
- required GPURenderPassTimestampLocation location;
1002
- };
1003
-
1004
- typedef sequence<GPURenderPassTimestampWrite> GPURenderPassTimestampWrites;
1005
-
1006
- dictionary GPURenderPassDescriptor : GPUObjectDescriptorBase {
1007
- required sequence<GPURenderPassColorAttachment?> colorAttachments;
1008
- GPURenderPassDepthStencilAttachment depthStencilAttachment;
1009
- GPUQuerySet occlusionQuerySet;
1010
- GPURenderPassTimestampWrites timestampWrites = [];
1011
- GPUSize64 maxDrawCount = 50000000;
1012
- };
1013
-
1014
- dictionary GPURenderPassColorAttachment {
1015
- required GPUTextureView view;
1016
- GPUTextureView resolveTarget;
1017
-
1018
- GPUColor clearValue;
1019
- required GPULoadOp loadOp;
1020
- required GPUStoreOp storeOp;
1021
- };
1022
-
1023
- dictionary GPURenderPassDepthStencilAttachment {
1024
- required GPUTextureView view;
1025
-
1026
- float depthClearValue;
1027
- GPULoadOp depthLoadOp;
1028
- GPUStoreOp depthStoreOp;
1029
- boolean depthReadOnly = false;
1030
-
1031
- GPUStencilValue stencilClearValue = 0;
1032
- GPULoadOp stencilLoadOp;
1033
- GPUStoreOp stencilStoreOp;
1034
- boolean stencilReadOnly = false;
1035
- };
1036
-
1037
- enum GPULoadOp {
1038
- "load",
1039
- "clear"
1040
- };
1041
-
1042
- enum GPUStoreOp {
1043
- "store",
1044
- "discard"
1045
- };
1046
-
1047
- dictionary GPURenderPassLayout : GPUObjectDescriptorBase {
1048
- required sequence<GPUTextureFormat?> colorFormats;
1049
- GPUTextureFormat depthStencilFormat;
1050
- GPUSize32 sampleCount = 1;
1051
- };
1052
-
1053
- interface mixin GPURenderCommandsMixin {
1054
- undefined setPipeline(GPURenderPipeline pipeline);
1055
-
1056
- undefined setIndexBuffer(GPUBuffer buffer, GPUIndexFormat indexFormat, optional GPUSize64 offset = 0, optional GPUSize64 size);
1057
- undefined setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size);
1058
-
1059
- undefined draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1,
1060
- optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0);
1061
- undefined drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1,
1062
- optional GPUSize32 firstIndex = 0,
1063
- optional GPUSignedOffset32 baseVertex = 0,
1064
- optional GPUSize32 firstInstance = 0);
1065
-
1066
- undefined drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
1067
- undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
1068
- };
1069
-
1070
- [Exposed=(Window, DedicatedWorker), SecureContext]
1071
- interface GPURenderBundle {
1072
- };
1073
- GPURenderBundle includes GPUObjectBase;
1074
-
1075
- dictionary GPURenderBundleDescriptor : GPUObjectDescriptorBase {
1076
- };
1077
-
1078
- [Exposed=(Window, DedicatedWorker), SecureContext]
1079
- interface GPURenderBundleEncoder {
1080
- GPURenderBundle finish(optional GPURenderBundleDescriptor descriptor = {});
1081
- };
1082
- GPURenderBundleEncoder includes GPUObjectBase;
1083
- GPURenderBundleEncoder includes GPUCommandsMixin;
1084
- GPURenderBundleEncoder includes GPUDebugCommandsMixin;
1085
- GPURenderBundleEncoder includes GPUBindingCommandsMixin;
1086
- GPURenderBundleEncoder includes GPURenderCommandsMixin;
1087
-
1088
- dictionary GPURenderBundleEncoderDescriptor : GPURenderPassLayout {
1089
- boolean depthReadOnly = false;
1090
- boolean stencilReadOnly = false;
1091
- };
1092
-
1093
- dictionary GPUQueueDescriptor : GPUObjectDescriptorBase {
1094
- };
1095
-
1096
- [Exposed=(Window, DedicatedWorker), SecureContext]
1097
- interface GPUQueue {
1098
- undefined submit(sequence<GPUCommandBuffer> commandBuffers);
1099
-
1100
- Promise<undefined> onSubmittedWorkDone();
1101
-
1102
- undefined writeBuffer(
1103
- GPUBuffer buffer,
1104
- GPUSize64 bufferOffset,
1105
- [AllowShared] BufferSource data,
1106
- optional GPUSize64 dataOffset = 0,
1107
- optional GPUSize64 size);
1108
-
1109
- undefined writeTexture(
1110
- GPUImageCopyTexture destination,
1111
- [AllowShared] BufferSource data,
1112
- GPUImageDataLayout dataLayout,
1113
- GPUExtent3D size);
1114
-
1115
- undefined copyExternalImageToTexture(
1116
- GPUImageCopyExternalImage source,
1117
- GPUImageCopyTextureTagged destination,
1118
- GPUExtent3D copySize);
1119
- };
1120
- GPUQueue includes GPUObjectBase;
1121
-
1122
- [Exposed=(Window, DedicatedWorker), SecureContext]
1123
- interface GPUQuerySet {
1124
- undefined destroy();
1125
-
1126
- readonly attribute GPUQueryType type;
1127
- readonly attribute GPUSize32 count;
1128
- };
1129
- GPUQuerySet includes GPUObjectBase;
1130
-
1131
- dictionary GPUQuerySetDescriptor : GPUObjectDescriptorBase {
1132
- required GPUQueryType type;
1133
- required GPUSize32 count;
1134
- };
1135
-
1136
- enum GPUQueryType {
1137
- "occlusion",
1138
- "timestamp"
1139
- };
1140
-
1141
- [Exposed=(Window, DedicatedWorker), SecureContext]
1142
- interface GPUCanvasContext {
1143
- readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
1144
-
1145
- undefined configure(GPUCanvasConfiguration configuration);
1146
- undefined unconfigure();
1147
-
1148
- GPUTexture getCurrentTexture();
1149
- };
1150
-
1151
- enum GPUCanvasAlphaMode {
1152
- "opaque",
1153
- "premultiplied"
1154
- };
1155
-
1156
- dictionary GPUCanvasConfiguration {
1157
- required GPUDevice device;
1158
- required GPUTextureFormat format;
1159
- GPUTextureUsageFlags usage = 0x10; // GPUTextureUsage.RENDER_ATTACHMENT
1160
- sequence<GPUTextureFormat> viewFormats = [];
1161
- PredefinedColorSpace colorSpace = "srgb";
1162
- GPUCanvasAlphaMode alphaMode = "opaque";
1163
- };
1164
-
1165
- enum GPUDeviceLostReason {
1166
- "destroyed"
1167
- };
1168
-
1169
- [Exposed=(Window, DedicatedWorker), SecureContext]
1170
- interface GPUDeviceLostInfo {
1171
- readonly attribute (GPUDeviceLostReason or undefined) reason;
1172
- readonly attribute DOMString message;
1173
- };
1174
-
1175
- partial interface GPUDevice {
1176
- readonly attribute Promise<GPUDeviceLostInfo> lost;
1177
- };
1178
-
1179
- [Exposed=(Window, DedicatedWorker), SecureContext]
1180
- interface GPUError {
1181
- readonly attribute DOMString message;
1182
- };
1183
-
1184
- [Exposed=(Window, DedicatedWorker), SecureContext]
1185
- interface GPUValidationError : GPUError {
1186
- constructor(DOMString message);
1187
- };
1188
-
1189
- [Exposed=(Window, DedicatedWorker), SecureContext]
1190
- interface GPUOutOfMemoryError : GPUError {
1191
- constructor(DOMString message);
1192
- };
1193
-
1194
- [Exposed=(Window, DedicatedWorker), SecureContext]
1195
- interface GPUInternalError : GPUError {
1196
- constructor(DOMString message);
1197
- };
1198
-
1199
- enum GPUErrorFilter {
1200
- "validation",
1201
- "out-of-memory",
1202
- "internal"
1203
- };
1204
-
1205
- partial interface GPUDevice {
1206
- undefined pushErrorScope(GPUErrorFilter filter);
1207
- Promise<GPUError?> popErrorScope();
1208
- };
1209
-
1210
- [Exposed=(Window, DedicatedWorker), SecureContext]
1211
- interface GPUUncapturedErrorEvent : Event {
1212
- constructor(
1213
- DOMString type,
1214
- GPUUncapturedErrorEventInit gpuUncapturedErrorEventInitDict
1215
- );
1216
- [SameObject] readonly attribute GPUError error;
1217
- };
1218
-
1219
- dictionary GPUUncapturedErrorEventInit : EventInit {
1220
- required GPUError error;
1221
- };
1222
-
1223
- partial interface GPUDevice {
1224
- [Exposed=(Window, DedicatedWorker)]
1225
- attribute EventHandler onuncapturederror;
1226
- };
1227
-
1228
- typedef [EnforceRange] unsigned long GPUBufferDynamicOffset;
1229
- typedef [EnforceRange] unsigned long GPUStencilValue;
1230
- typedef [EnforceRange] unsigned long GPUSampleMask;
1231
- typedef [EnforceRange] long GPUDepthBias;
1232
-
1233
- typedef [EnforceRange] unsigned long long GPUSize64;
1234
- typedef [EnforceRange] unsigned long GPUIntegerCoordinate;
1235
- typedef [EnforceRange] unsigned long GPUIndex32;
1236
- typedef [EnforceRange] unsigned long GPUSize32;
1237
- typedef [EnforceRange] long GPUSignedOffset32;
1238
-
1239
- typedef unsigned long GPUFlagsConstant;
1240
-
1241
- dictionary GPUColorDict {
1242
- required double r;
1243
- required double g;
1244
- required double b;
1245
- required double a;
1246
- };
1247
- typedef (sequence<double> or GPUColorDict) GPUColor;
1248
-
1249
- dictionary GPUOrigin2DDict {
1250
- GPUIntegerCoordinate x = 0;
1251
- GPUIntegerCoordinate y = 0;
1252
- };
1253
- typedef (sequence<GPUIntegerCoordinate> or GPUOrigin2DDict) GPUOrigin2D;
1254
-
1255
- dictionary GPUOrigin3DDict {
1256
- GPUIntegerCoordinate x = 0;
1257
- GPUIntegerCoordinate y = 0;
1258
- GPUIntegerCoordinate z = 0;
1259
- };
1260
- typedef (sequence<GPUIntegerCoordinate> or GPUOrigin3DDict) GPUOrigin3D;
1261
-
1262
- dictionary GPUExtent3DDict {
1263
- required GPUIntegerCoordinate width;
1264
- GPUIntegerCoordinate height = 1;
1265
- GPUIntegerCoordinate depthOrArrayLayers = 1;
1266
- };
1267
- typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;