@@ -64,21 +64,21 @@ enum GPUPredefinedColorSpace {
6464
6565
6666interface mixin NavigatorGPU {
67- [SameObject] readonly attribute GPU gpu;
67+ [SameObject, SecureContext ] readonly attribute GPU gpu;
6868};
6969Navigator includes NavigatorGPU;
7070WorkerNavigator includes NavigatorGPU;
7171
7272
73- [Exposed=(Window, DedicatedWorker)]
73+ [Exposed=(Window, DedicatedWorker), SecureContext ]
7474interface GPU {
7575 Promise<GPUAdapter?> requestAdapter(optional GPURequestAdapterOptions options = {});
7676};
7777
7878
7979dictionary GPURequestAdapterOptions {
8080 GPUPowerPreference powerPreference;
81- boolean forceSoftware = false;
81+ boolean forceFallbackAdapter = false;
8282};
8383
8484
@@ -88,12 +88,12 @@ enum GPUPowerPreference {
8888};
8989
9090
91- [Exposed=(Window, DedicatedWorker)]
91+ [Exposed=(Window, DedicatedWorker), SecureContext ]
9292interface GPUAdapter {
9393 readonly attribute DOMString name;
9494 [SameObject] readonly attribute GPUSupportedFeatures features;
9595 [SameObject] readonly attribute GPUSupportedLimits limits;
96- readonly attribute boolean isSoftware ;
96+ readonly attribute boolean isFallbackAdapter ;
9797
9898 Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
9999};
@@ -115,7 +115,7 @@ enum GPUFeatureName {
115115};
116116
117117
118- [Exposed=(Window, DedicatedWorker)]
118+ [Exposed=(Window, DedicatedWorker), SecureContext ]
119119interface GPUDevice : EventTarget {
120120 [SameObject] readonly attribute GPUSupportedFeatures features;
121121 [SameObject] readonly attribute GPUSupportedLimits limits;
@@ -147,7 +147,7 @@ interface GPUDevice : EventTarget {
147147GPUDevice includes GPUObjectBase;
148148
149149
150- [Exposed=(Window, DedicatedWorker)]
150+ [Exposed=(Window, DedicatedWorker), SecureContext ]
151151interface GPUBuffer {
152152 Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size);
153153 ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size);
@@ -167,7 +167,7 @@ dictionary GPUBufferDescriptor : GPUObjectDescriptorBase {
167167
168168typedef [EnforceRange] unsigned long GPUBufferUsageFlags;
169169[Exposed=(Window, DedicatedWorker)]
170- interface GPUBufferUsage {
170+ namespace GPUBufferUsage {
171171 const GPUFlagsConstant MAP_READ = 0x0001;
172172 const GPUFlagsConstant MAP_WRITE = 0x0002;
173173 const GPUFlagsConstant COPY_SRC = 0x0004;
@@ -183,13 +183,13 @@ interface GPUBufferUsage {
183183
184184typedef [EnforceRange] unsigned long GPUMapModeFlags;
185185[Exposed=(Window, DedicatedWorker)]
186- interface GPUMapMode {
186+ namespace GPUMapMode {
187187 const GPUFlagsConstant READ = 0x0001;
188188 const GPUFlagsConstant WRITE = 0x0002;
189189};
190190
191191
192- [Exposed=(Window, DedicatedWorker)]
192+ [Exposed=(Window, DedicatedWorker), SecureContext ]
193193interface GPUTexture {
194194 GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {});
195195
@@ -217,7 +217,7 @@ enum GPUTextureDimension {
217217
218218typedef [EnforceRange] unsigned long GPUTextureUsageFlags;
219219[Exposed=(Window, DedicatedWorker)]
220- interface GPUTextureUsage {
220+ namespace GPUTextureUsage {
221221 const GPUFlagsConstant COPY_SRC = 0x01;
222222 const GPUFlagsConstant COPY_DST = 0x02;
223223 const GPUFlagsConstant TEXTURE_BINDING = 0x04;
@@ -226,7 +226,7 @@ interface GPUTextureUsage {
226226};
227227
228228
229- [Exposed=(Window, DedicatedWorker)]
229+ [Exposed=(Window, DedicatedWorker), SecureContext ]
230230interface GPUTextureView {
231231};
232232GPUTextureView includes GPUObjectBase;
@@ -340,7 +340,7 @@ enum GPUTextureFormat {
340340};
341341
342342
343- [Exposed=(Window, DedicatedWorker)]
343+ [Exposed=(Window, DedicatedWorker), SecureContext ]
344344interface GPUExternalTexture {
345345};
346346GPUExternalTexture includes GPUObjectBase;
@@ -352,7 +352,7 @@ dictionary GPUExternalTextureDescriptor : GPUObjectDescriptorBase {
352352};
353353
354354
355- [Exposed=(Window, DedicatedWorker)]
355+ [Exposed=(Window, DedicatedWorker), SecureContext ]
356356interface GPUSampler {
357357};
358358GPUSampler includes GPUObjectBase;
@@ -397,7 +397,7 @@ enum GPUCompareFunction {
397397};
398398
399399
400- [Exposed=(Window, DedicatedWorker)]
400+ [Exposed=(Window, DedicatedWorker), SecureContext ]
401401interface GPUBindGroupLayout {
402402};
403403GPUBindGroupLayout includes GPUObjectBase;
@@ -410,7 +410,7 @@ dictionary GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase {
410410
411411typedef [EnforceRange] unsigned long GPUShaderStageFlags;
412412[Exposed=(Window, DedicatedWorker)]
413- interface GPUShaderStage {
413+ namespace GPUShaderStage {
414414 const GPUFlagsConstant VERTEX = 0x1;
415415 const GPUFlagsConstant FRAGMENT = 0x2;
416416 const GPUFlagsConstant COMPUTE = 0x4;
@@ -482,7 +482,7 @@ dictionary GPUExternalTextureBindingLayout {
482482};
483483
484484
485- [Exposed=(Window, DedicatedWorker)]
485+ [Exposed=(Window, DedicatedWorker), SecureContext ]
486486interface GPUBindGroup {
487487};
488488GPUBindGroup includes GPUObjectBase;
@@ -509,7 +509,7 @@ dictionary GPUBufferBinding {
509509};
510510
511511
512- [Exposed=(Window, DedicatedWorker)]
512+ [Exposed=(Window, DedicatedWorker), SecureContext ]
513513interface GPUPipelineLayout {
514514};
515515GPUPipelineLayout includes GPUObjectBase;
@@ -520,7 +520,7 @@ dictionary GPUPipelineLayoutDescriptor : GPUObjectDescriptorBase {
520520};
521521
522522
523- [Exposed=(Window, DedicatedWorker)]
523+ [Exposed=(Window, DedicatedWorker), SecureContext ]
524524interface GPUShaderModule {
525525 Promise<GPUCompilationInfo> compilationInfo();
526526};
@@ -539,7 +539,7 @@ enum GPUCompilationMessageType {
539539 "info"
540540};
541541
542- [Exposed=(Window, DedicatedWorker), Serializable]
542+ [Exposed=(Window, DedicatedWorker), Serializable, SecureContext ]
543543interface GPUCompilationMessage {
544544 readonly attribute DOMString message;
545545 readonly attribute GPUCompilationMessageType type;
@@ -549,7 +549,7 @@ interface GPUCompilationMessage {
549549 readonly attribute unsigned long long length;
550550};
551551
552- [Exposed=(Window, DedicatedWorker), Serializable]
552+ [Exposed=(Window, DedicatedWorker), Serializable, SecureContext ]
553553interface GPUCompilationInfo {
554554 readonly attribute FrozenArray<GPUCompilationMessage> messages;
555555};
@@ -573,7 +573,7 @@ dictionary GPUProgrammableStage {
573573typedef double GPUPipelineConstantValue; // May represent WGSL's bool, f32, i32, u32.
574574
575575
576- [Exposed=(Window, DedicatedWorker)]
576+ [Exposed=(Window, DedicatedWorker), SecureContext ]
577577interface GPUComputePipeline {
578578};
579579GPUComputePipeline includes GPUObjectBase;
@@ -585,7 +585,7 @@ dictionary GPUComputePipelineDescriptor : GPUPipelineDescriptorBase {
585585};
586586
587587
588- [Exposed=(Window, DedicatedWorker)]
588+ [Exposed=(Window, DedicatedWorker), SecureContext ]
589589interface GPURenderPipeline {
590590};
591591GPURenderPipeline includes GPUObjectBase;
@@ -662,7 +662,7 @@ dictionary GPUBlendState {
662662
663663typedef [EnforceRange] unsigned long GPUColorWriteFlags;
664664[Exposed=(Window, DedicatedWorker)]
665- interface GPUColorWrite {
665+ namespace GPUColorWrite {
666666 const GPUFlagsConstant RED = 0x1;
667667 const GPUFlagsConstant GREEN = 0x2;
668668 const GPUFlagsConstant BLUE = 0x4;
@@ -672,9 +672,9 @@ interface GPUColorWrite {
672672
673673
674674dictionary GPUBlendComponent {
675+ GPUBlendOperation operation = "add";
675676 GPUBlendFactor srcFactor = "one";
676677 GPUBlendFactor dstFactor = "zero";
677- GPUBlendOperation operation = "add";
678678};
679679
680680
@@ -808,7 +808,7 @@ dictionary GPUVertexAttribute {
808808};
809809
810810
811- [Exposed=(Window, DedicatedWorker)]
811+ [Exposed=(Window, DedicatedWorker), SecureContext ]
812812interface GPUCommandBuffer {
813813 readonly attribute Promise<double> executionTime;
814814};
@@ -819,7 +819,7 @@ dictionary GPUCommandBufferDescriptor : GPUObjectDescriptorBase {
819819};
820820
821821
822- [Exposed=(Window, DedicatedWorker)]
822+ [Exposed=(Window, DedicatedWorker), SecureContext ]
823823interface GPUCommandEncoder {
824824 GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
825825 GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
@@ -917,7 +917,7 @@ interface mixin GPUProgrammablePassEncoder {
917917};
918918
919919
920- [Exposed=(Window, DedicatedWorker)]
920+ [Exposed=(Window, DedicatedWorker), SecureContext ]
921921interface GPUComputePassEncoder {
922922 undefined setPipeline(GPUComputePipeline pipeline);
923923 undefined dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1);
@@ -955,7 +955,7 @@ interface mixin GPURenderEncoderBase {
955955 undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
956956};
957957
958- [Exposed=(Window, DedicatedWorker)]
958+ [Exposed=(Window, DedicatedWorker), SecureContext ]
959959interface GPURenderPassEncoder {
960960 undefined setViewport(float x, float y,
961961 float width, float height,
@@ -1030,7 +1030,7 @@ dictionary GPURenderPassLayout: GPUObjectDescriptorBase {
10301030};
10311031
10321032
1033- [Exposed=(Window, DedicatedWorker)]
1033+ [Exposed=(Window, DedicatedWorker), SecureContext ]
10341034interface GPURenderBundle {
10351035};
10361036GPURenderBundle includes GPUObjectBase;
@@ -1040,7 +1040,7 @@ dictionary GPURenderBundleDescriptor : GPUObjectDescriptorBase {
10401040};
10411041
10421042
1043- [Exposed=(Window, DedicatedWorker)]
1043+ [Exposed=(Window, DedicatedWorker), SecureContext ]
10441044interface GPURenderBundleEncoder {
10451045 GPURenderBundle finish(optional GPURenderBundleDescriptor descriptor = {});
10461046};
@@ -1055,7 +1055,7 @@ dictionary GPURenderBundleEncoderDescriptor : GPURenderPassLayout {
10551055};
10561056
10571057
1058- [Exposed=(Window, DedicatedWorker)]
1058+ [Exposed=(Window, DedicatedWorker), SecureContext ]
10591059interface GPUQueue {
10601060 undefined submit(sequence<GPUCommandBuffer> commandBuffers);
10611061
@@ -1082,7 +1082,7 @@ interface GPUQueue {
10821082GPUQueue includes GPUObjectBase;
10831083
10841084
1085- [Exposed=(Window, DedicatedWorker)]
1085+ [Exposed=(Window, DedicatedWorker), SecureContext ]
10861086interface GPUQuerySet {
10871087 undefined destroy();
10881088};
@@ -1112,7 +1112,7 @@ enum GPUPipelineStatisticName {
11121112};
11131113
11141114
1115- [Exposed=(Window, DedicatedWorker)]
1115+ [Exposed=(Window, DedicatedWorker), SecureContext ]
11161116interface GPUCanvasContext {
11171117 readonly attribute (HTMLCanvasElement or OffscreenCanvas) canvas;
11181118
0 commit comments