diff options
Diffstat (limited to 'ext/webgpu/01_webgpu.js')
-rw-r--r-- | ext/webgpu/01_webgpu.js | 314 |
1 files changed, 138 insertions, 176 deletions
diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js index cd1a6e5ad..45d910c1a 100644 --- a/ext/webgpu/01_webgpu.js +++ b/ext/webgpu/01_webgpu.js @@ -25,7 +25,6 @@ MathMax, ObjectDefineProperty, ObjectFreeze, - ObjectPrototypeIsPrototypeOf, Promise, PromiseAll, PromisePrototypeCatch, @@ -43,7 +42,6 @@ SymbolIterator, TypeError, Uint32Array, - Uint32ArrayPrototype, Uint8Array, } = window.__bootstrap.primordials; @@ -159,7 +157,6 @@ super("device out of memory"); } } - const GPUOutOfMemoryErrorPrototype = GPUOutOfMemoryError.prototype; class GPUValidationError extends Error { name = "GPUValidationError"; @@ -186,7 +183,7 @@ * @param {GPURequestAdapterOptions} options */ async requestAdapter(options = {}) { - webidl.assertBranded(this, GPUPrototype); + webidl.assertBranded(this, GPU); options = webidl.converters.GPURequestAdapterOptions(options, { prefix: "Failed to execute 'requestAdapter' on 'GPU'", context: "Argument 1", @@ -208,7 +205,6 @@ return `${this.constructor.name} ${inspect({})}`; } } - const GPUPrototype = GPU.prototype; const _name = Symbol("[[name]]"); const _adapter = Symbol("[[adapter]]"); @@ -247,17 +243,17 @@ /** @returns {string} */ get name() { - webidl.assertBranded(this, GPUAdapterPrototype); + webidl.assertBranded(this, GPUAdapter); return this[_name]; } /** @returns {GPUSupportedFeatures} */ get features() { - webidl.assertBranded(this, GPUAdapterPrototype); + webidl.assertBranded(this, GPUAdapter); return this[_adapter].features; } /** @returns {GPUSupportedLimits} */ get limits() { - webidl.assertBranded(this, GPUAdapterPrototype); + webidl.assertBranded(this, GPUAdapter); return this[_adapter].limits; } /** @returns {boolean} */ @@ -274,7 +270,7 @@ * @returns {Promise<GPUDevice>} */ async requestDevice(descriptor = {}) { - webidl.assertBranded(this, GPUAdapterPrototype); + webidl.assertBranded(this, GPUAdapter); const prefix = "Failed to execute 'requestDevice' on 'GPUAdapter'"; descriptor = webidl.converters.GPUDeviceDescriptor(descriptor, { prefix, @@ -324,7 +320,6 @@ }`; } } - const GPUAdapterPrototype = GPUAdapter.prototype; const _limits = Symbol("[[limits]]"); @@ -373,107 +368,107 @@ } get maxTextureDimension1D() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxTextureDimension1D; } get maxTextureDimension2D() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxTextureDimension2D; } get maxTextureDimension3D() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxTextureDimension3D; } get maxTextureArrayLayers() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxTextureArrayLayers; } get maxBindGroups() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxBindGroups; } get maxDynamicUniformBuffersPerPipelineLayout() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxDynamicUniformBuffersPerPipelineLayout; } get maxDynamicStorageBuffersPerPipelineLayout() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxDynamicStorageBuffersPerPipelineLayout; } get maxSampledTexturesPerShaderStage() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxSampledTexturesPerShaderStage; } get maxSamplersPerShaderStage() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxSamplersPerShaderStage; } get maxStorageBuffersPerShaderStage() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxStorageBuffersPerShaderStage; } get maxStorageTexturesPerShaderStage() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxStorageTexturesPerShaderStage; } get maxUniformBuffersPerShaderStage() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxUniformBuffersPerShaderStage; } get maxUniformBufferBindingSize() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxUniformBufferBindingSize; } get maxStorageBufferBindingSize() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxStorageBufferBindingSize; } get minUniformBufferOffsetAlignment() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].minUniformBufferOffsetAlignment; } get minStorageBufferOffsetAlignment() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].minStorageBufferOffsetAlignment; } get maxVertexBuffers() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxVertexBuffers; } get maxVertexAttributes() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxVertexAttributes; } get maxVertexBufferArrayStride() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxVertexBufferArrayStride; } get maxInterStageShaderComponents() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxInterStageShaderComponents; } get maxComputeWorkgroupStorageSize() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxComputeWorkgroupStorageSize; } get maxComputeInvocationsPerWorkgroup() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxComputeInvocationsPerWorkgroup; } get maxComputeWorkgroupSizeX() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxComputeWorkgroupSizeX; } get maxComputeWorkgroupSizeY() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxComputeWorkgroupSizeY; } get maxComputeWorkgroupSizeZ() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxComputeWorkgroupSizeZ; } get maxComputeWorkgroupsPerDimension() { - webidl.assertBranded(this, GPUSupportedLimitsPrototype); + webidl.assertBranded(this, GPUSupportedLimits); return this[_limits].maxComputeWorkgroupsPerDimension; } @@ -481,7 +476,6 @@ return `${this.constructor.name} ${inspect(this[_limits])}`; } } - const GPUSupportedLimitsPrototype = GPUSupportedLimits.prototype; const _features = Symbol("[[features]]"); @@ -502,42 +496,42 @@ /** @return {IterableIterator<[string, string]>} */ entries() { - webidl.assertBranded(this, GPUSupportedFeaturesPrototype); + webidl.assertBranded(this, GPUSupportedFeatures); return SetPrototypeEntries(this[_features]); } /** @return {void} */ forEach(callbackfn, thisArg) { - webidl.assertBranded(this, GPUSupportedFeaturesPrototype); + webidl.assertBranded(this, GPUSupportedFeatures); SetPrototypeForEach(this[_features], callbackfn, thisArg); } /** @return {boolean} */ has(value) { - webidl.assertBranded(this, GPUSupportedFeaturesPrototype); + webidl.assertBranded(this, GPUSupportedFeatures); return SetPrototypeHas(this[_features], value); } /** @return {IterableIterator<string>} */ keys() { - webidl.assertBranded(this, GPUSupportedFeaturesPrototype); + webidl.assertBranded(this, GPUSupportedFeatures); return SetPrototypeKeys(this[_features]); } /** @return {IterableIterator<string>} */ values() { - webidl.assertBranded(this, GPUSupportedFeaturesPrototype); + webidl.assertBranded(this, GPUSupportedFeatures); return SetPrototypeValues(this[_features]); } /** @return {number} */ get size() { - webidl.assertBranded(this, GPUSupportedFeaturesPrototype); + webidl.assertBranded(this, GPUSupportedFeatures); return this[_features].size; } [SymbolIterator]() { - webidl.assertBranded(this, GPUSupportedFeaturesPrototype); + webidl.assertBranded(this, GPUSupportedFeatures); return this[_features][SymbolIterator](); } @@ -546,8 +540,6 @@ } } - const GPUSupportedFeaturesPrototype = GPUSupportedFeatures.prototype; - const _reason = Symbol("[[reason]]"); const _message = Symbol("[[message]]"); @@ -575,11 +567,11 @@ } get reason() { - webidl.assertBranded(this, GPUDeviceLostInfoPrototype); + webidl.assertBranded(this, GPUDeviceLostInfo); return this[_reason]; } get message() { - webidl.assertBranded(this, GPUDeviceLostInfoPrototype); + webidl.assertBranded(this, GPUDeviceLostInfo); return this[_message]; } @@ -590,8 +582,6 @@ } } - const GPUDeviceLostInfoPrototype = GPUDeviceLostInfo.prototype; - const _label = Symbol("[[label]]"); /** @@ -605,14 +595,14 @@ * @return {string | null} */ get() { - webidl.assertBranded(this, type.prototype); + webidl.assertBranded(this, type); return this[_label]; }, /** * @param {string | null} label */ set(label) { - webidl.assertBranded(this, type.prototype); + webidl.assertBranded(this, type); label = webidl.converters["UVString?"](label, { prefix: `Failed to set 'label' on '${name}'`, context: "Argument 1", @@ -715,9 +705,7 @@ const validationFilteredPromise = PromisePrototypeCatch( operation, (err) => { - if (ObjectPrototypeIsPrototypeOf.prototype(GPUValidationError, err)) { - return PromiseReject(err); - } + if (err instanceof GPUValidationError) return PromiseReject(err); return PromiseResolve(); }, ); @@ -740,9 +728,7 @@ ); const oomScope = oomStack[oomStack.length - 1]; const oomFilteredPromise = PromisePrototypeCatch(operation, (err) => { - if (ObjectPrototypeIsPrototypeOf(GPUOutOfMemoryErrorPrototype, err)) { - return PromiseReject(err); - } + if (err instanceof GPUOutOfMemoryError) return PromiseReject(err); return PromiseResolve(); }); if (oomScope) { @@ -798,15 +784,15 @@ } get features() { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); return this[_device].features; } get limits() { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); return this[_device].limits; } get queue() { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); return this[_queue]; } @@ -816,7 +802,7 @@ } destroy() { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); this[_cleanup](); } @@ -825,7 +811,7 @@ * @returns {GPUBuffer} */ createBuffer(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createBuffer' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPUBufferDescriptor(descriptor, { @@ -872,7 +858,7 @@ * @returns {GPUTexture} */ createTexture(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createTexture' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPUTextureDescriptor(descriptor, { @@ -901,7 +887,7 @@ * @returns {GPUSampler} */ createSampler(descriptor = {}) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createSampler' on 'GPUDevice'"; descriptor = webidl.converters.GPUSamplerDescriptor(descriptor, { prefix, @@ -928,7 +914,7 @@ * @returns {GPUBindGroupLayout} */ createBindGroupLayout(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createBindGroupLayout' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPUBindGroupLayoutDescriptor(descriptor, { @@ -971,7 +957,7 @@ * @returns {GPUPipelineLayout} */ createPipelineLayout(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createPipelineLayout' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPUPipelineLayoutDescriptor(descriptor, { @@ -1013,7 +999,7 @@ * @returns {GPUBindGroup} */ createBindGroup(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createBindGroup' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPUBindGroupDescriptor(descriptor, { @@ -1033,7 +1019,7 @@ const entries = ArrayPrototypeMap(descriptor.entries, (entry, i) => { const context = `entry ${i + 1}`; const resource = entry.resource; - if (ObjectPrototypeIsPrototypeOf(GPUSamplerPrototype, resource)) { + if (resource instanceof GPUSampler) { const rid = assertResource(resource, { prefix, context, @@ -1048,9 +1034,7 @@ kind: "GPUSampler", resource: rid, }; - } else if ( - ObjectPrototypeIsPrototypeOf(GPUTextureViewPrototype, resource) - ) { + } else if (resource instanceof GPUTextureView) { const rid = assertResource(resource, { prefix, context, @@ -1107,7 +1091,7 @@ * @param {GPUShaderModuleDescriptor} descriptor */ createShaderModule(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createShaderModule' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPUShaderModuleDescriptor(descriptor, { @@ -1140,7 +1124,7 @@ * @returns {GPUComputePipeline} */ createComputePipeline(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createComputePipeline' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPUComputePipelineDescriptor(descriptor, { @@ -1197,7 +1181,7 @@ * @returns {GPURenderPipeline} */ createRenderPipeline(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createRenderPipeline' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPURenderPipelineDescriptor(descriptor, { @@ -1282,7 +1266,7 @@ * @returns {GPUCommandEncoder} */ createCommandEncoder(descriptor = {}) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createCommandEncoder' on 'GPUDevice'"; descriptor = webidl.converters.GPUCommandEncoderDescriptor(descriptor, { prefix, @@ -1309,7 +1293,7 @@ * @returns {GPURenderBundleEncoder} */ createRenderBundleEncoder(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createRenderBundleEncoder' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -1344,7 +1328,7 @@ * @returns {GPUQuerySet} */ createQuerySet(descriptor) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'createQuerySet' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); descriptor = webidl.converters.GPUQuerySetDescriptor( @@ -1372,7 +1356,7 @@ } get lost() { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const device = this[_device]; if (!device) { return PromiseResolve(true); @@ -1387,7 +1371,7 @@ * @param {GPUErrorFilter} filter */ pushErrorScope(filter) { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'pushErrorScope' on 'GPUDevice'"; webidl.requiredArguments(arguments.length, 1, { prefix }); filter = webidl.converters.GPUErrorFilter(filter, { @@ -1403,7 +1387,7 @@ */ // deno-lint-ignore require-await async popErrorScope() { - webidl.assertBranded(this, GPUDevicePrototype); + webidl.assertBranded(this, GPUDevice); const prefix = "Failed to execute 'popErrorScope' on 'GPUDevice'"; const device = assertDevice(this, { prefix, context: "this" }); if (device.isLost) { @@ -1436,7 +1420,6 @@ } } GPUObjectBaseMixin("GPUDevice", GPUDevice); - const GPUDevicePrototype = GPUDevice.prototype; /** * @param {string | null} label @@ -1463,7 +1446,7 @@ * @param {GPUCommandBuffer[]} commandBuffers */ submit(commandBuffers) { - webidl.assertBranded(this, GPUQueue.prototype); + webidl.assertBranded(this, GPUQueue); const prefix = "Failed to execute 'submit' on 'GPUQueue'"; webidl.requiredArguments(arguments.length, 1, { prefix, @@ -1494,7 +1477,7 @@ } onSubmittedWorkDone() { - webidl.assertBranded(this, GPUQueue.prototype); + webidl.assertBranded(this, GPUQueue); return PromiseResolve(); } @@ -1506,7 +1489,7 @@ * @param {number} [size] */ writeBuffer(buffer, bufferOffset, data, dataOffset = 0, size) { - webidl.assertBranded(this, GPUQueue.prototype); + webidl.assertBranded(this, GPUQueue); const prefix = "Failed to execute 'writeBuffer' on 'GPUQueue'"; webidl.requiredArguments(arguments.length, 3, { prefix }); buffer = webidl.converters["GPUBuffer"](buffer, { @@ -1562,7 +1545,7 @@ * @param {GPUExtent3D} size */ writeTexture(destination, data, dataLayout, size) { - webidl.assertBranded(this, GPUQueue.prototype); + webidl.assertBranded(this, GPUQueue); const prefix = "Failed to execute 'writeTexture' on 'GPUQueue'"; webidl.requiredArguments(arguments.length, 4, { prefix }); destination = webidl.converters.GPUImageCopyTexture(destination, { @@ -1719,7 +1702,7 @@ * @param {number} [size] */ async mapAsync(mode, offset = 0, size) { - webidl.assertBranded(this, GPUBuffer.prototype); + webidl.assertBranded(this, GPUBuffer); const prefix = "Failed to execute 'mapAsync' on 'GPUBuffer'"; webidl.requiredArguments(arguments.length, 1, { prefix }); mode = webidl.converters.GPUMapModeFlags(mode, { @@ -1821,7 +1804,7 @@ * @param {number} size */ getMappedRange(offset = 0, size) { - webidl.assertBranded(this, GPUBuffer.prototype); + webidl.assertBranded(this, GPUBuffer); const prefix = "Failed to execute 'getMappedRange' on 'GPUBuffer'"; offset = webidl.converters.GPUSize64(offset, { prefix, @@ -1878,7 +1861,7 @@ } unmap() { - webidl.assertBranded(this, GPUBuffer.prototype); + webidl.assertBranded(this, GPUBuffer); const prefix = "Failed to execute 'unmap' on 'GPUBuffer'"; const device = assertDevice(this, { prefix, context: "this" }); const bufferRid = assertResource(this, { prefix, context: "this" }); @@ -1934,7 +1917,7 @@ } destroy() { - webidl.assertBranded(this, GPUBuffer.prototype); + webidl.assertBranded(this, GPUBuffer); this[_cleanup](); } @@ -2048,7 +2031,7 @@ * @param {GPUTextureViewDescriptor} descriptor */ createView(descriptor = {}) { - webidl.assertBranded(this, GPUTexture.prototype); + webidl.assertBranded(this, GPUTexture); const prefix = "Failed to execute 'createView' on 'GPUTexture'"; webidl.requiredArguments(arguments.length, 0, { prefix }); descriptor = webidl.converters.GPUTextureViewDescriptor(descriptor, { @@ -2073,7 +2056,7 @@ } destroy() { - webidl.assertBranded(this, GPUTexture.prototype); + webidl.assertBranded(this, GPUTexture); this[_cleanup](); } @@ -2153,7 +2136,7 @@ } } GPUObjectBaseMixin("GPUTextureView", GPUTextureView); - const GPUTextureViewPrototype = GPUTextureView.prototype; + /** * @param {string | null} label * @param {InnerGPUDevice} device @@ -2196,7 +2179,7 @@ } } GPUObjectBaseMixin("GPUSampler", GPUSampler); - const GPUSamplerPrototype = GPUSampler.prototype; + /** * @param {string | null} label * @param {InnerGPUDevice} device @@ -2429,7 +2412,7 @@ * @returns {GPUBindGroupLayout} */ getBindGroupLayout(index) { - webidl.assertBranded(this, GPUComputePipelinePrototype); + webidl.assertBranded(this, GPUComputePipeline); const prefix = "Failed to execute 'getBindGroupLayout' on 'GPUComputePipeline'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -2466,7 +2449,6 @@ } } GPUObjectBaseMixin("GPUComputePipeline", GPUComputePipeline); - const GPUComputePipelinePrototype = GPUComputePipeline.prototype; /** * @param {string | null} label @@ -2505,7 +2487,7 @@ * @param {number} index */ getBindGroupLayout(index) { - webidl.assertBranded(this, GPURenderPipelinePrototype); + webidl.assertBranded(this, GPURenderPipeline); const prefix = "Failed to execute 'getBindGroupLayout' on 'GPURenderPipeline'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -2542,7 +2524,6 @@ } } GPUObjectBaseMixin("GPURenderPipeline", GPURenderPipeline); - const GPURenderPipelinePrototype = GPURenderPipeline.prototype; class GPUColorWrite { constructor() { @@ -2616,7 +2597,7 @@ * @return {GPURenderPassEncoder} */ beginRenderPass(descriptor) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'beginRenderPass' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -2766,7 +2747,7 @@ * @param {GPUComputePassDescriptor} descriptor */ beginComputePass(descriptor = {}) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'beginComputePass' on 'GPUCommandEncoder'"; descriptor = webidl.converters.GPUComputePassDescriptor(descriptor, { @@ -2811,7 +2792,7 @@ destinationOffset, size, ) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'copyBufferToBuffer' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 5, { prefix }); @@ -2879,7 +2860,7 @@ * @param {GPUExtent3D} copySize */ copyBufferToTexture(source, destination, copySize) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'copyBufferToTexture' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 3, { prefix }); @@ -2947,7 +2928,7 @@ * @param {GPUExtent3D} copySize */ copyTextureToBuffer(source, destination, copySize) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'copyTextureToBuffer' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 3, { prefix }); @@ -3014,7 +2995,7 @@ * @param {GPUExtent3D} copySize */ copyTextureToTexture(source, destination, copySize) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'copyTextureToTexture' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 3, { prefix }); @@ -3085,7 +3066,7 @@ * @param {GPUSize64} size */ clearBuffer(destination, destinationOffset, size) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'clearBuffer' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 3, { prefix }); destination = webidl.converters.GPUBuffer(destination, { @@ -3125,7 +3106,7 @@ * @param {string} groupLabel */ pushDebugGroup(groupLabel) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'pushDebugGroup' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -3149,7 +3130,7 @@ } popDebugGroup() { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'popDebugGroup' on 'GPUCommandEncoder'"; const device = assertDevice(this, { prefix, context: "this" }); const commandEncoderRid = assertResource(this, { @@ -3169,7 +3150,7 @@ * @param {string} markerLabel */ insertDebugMarker(markerLabel) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'insertDebugMarker' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -3197,7 +3178,7 @@ * @param {number} queryIndex */ writeTimestamp(querySet, queryIndex) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'writeTimestamp' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -3248,7 +3229,7 @@ destination, destinationOffset, ) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'resolveQuerySet' on 'GPUCommandEncoder'"; webidl.requiredArguments(arguments.length, 5, { prefix }); @@ -3314,7 +3295,7 @@ * @returns {GPUCommandBuffer} */ finish(descriptor = {}) { - webidl.assertBranded(this, GPUCommandEncoderPrototype); + webidl.assertBranded(this, GPUCommandEncoder); const prefix = "Failed to execute 'finish' on 'GPUCommandEncoder'"; descriptor = webidl.converters.GPUCommandBufferDescriptor(descriptor, { prefix, @@ -3351,7 +3332,6 @@ } } GPUObjectBaseMixin("GPUCommandEncoder", GPUCommandEncoder); - const GPUCommandEncoderPrototype = GPUCommandEncoder.prototype; const _encoder = Symbol("[[encoder]]"); @@ -3398,7 +3378,7 @@ * @param {number} maxDepth */ setViewport(x, y, width, height, minDepth, maxDepth) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'setViewport' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 6, { prefix }); @@ -3444,7 +3424,7 @@ * @param {number} height */ setScissorRect(x, y, width, height) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'setScissorRect' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 4, { prefix }); @@ -3486,7 +3466,7 @@ * @param {GPUColor} color */ setBlendConstant(color) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'setBlendConstant' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -3513,7 +3493,7 @@ * @param {number} reference */ setStencilReference(reference) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'setStencilReference' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -3549,7 +3529,7 @@ * @param {number} queryIndex */ beginPipelineStatisticsQuery(querySet, queryIndex) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'beginPipelineStatisticsQuery' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -3587,7 +3567,7 @@ } endPipelineStatisticsQuery() { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'endPipelineStatisticsQuery' on 'GPURenderPassEncoder'"; assertDevice(this[_encoder], { @@ -3609,7 +3589,7 @@ * @param {number} queryIndex */ writeTimestamp(querySet, queryIndex) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'writeTimestamp' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -3650,7 +3630,7 @@ * @param {GPURenderBundle[]} bundles */ executeBundles(bundles) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'executeBundles' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -3684,7 +3664,7 @@ } endPass() { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'endPass' on 'GPURenderPassEncoder'"; const device = assertDevice(this[_encoder], { prefix, @@ -3711,7 +3691,7 @@ dynamicOffsetsDataStart, dynamicOffsetsDataLength, ) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'setBindGroup' on 'GPURenderPassEncoder'"; const device = assertDevice(this[_encoder], { @@ -3732,12 +3712,7 @@ resourceContext: "Argument 2", selfContext: "this", }); - if ( - !(ObjectPrototypeIsPrototypeOf( - Uint32ArrayPrototype, - dynamicOffsetsData, - )) - ) { + if (!(dynamicOffsetsData instanceof Uint32Array)) { dynamicOffsetsData = new Uint32Array(dynamicOffsetsData ?? []); dynamicOffsetsDataStart = 0; dynamicOffsetsDataLength = dynamicOffsetsData.length; @@ -3756,7 +3731,7 @@ * @param {string} groupLabel */ pushDebugGroup(groupLabel) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'pushDebugGroup' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -3780,7 +3755,7 @@ } popDebugGroup() { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'popDebugGroup' on 'GPURenderPassEncoder'"; assertDevice(this[_encoder], { @@ -3801,7 +3776,7 @@ * @param {string} markerLabel */ insertDebugMarker(markerLabel) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'insertDebugMarker' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -3828,7 +3803,7 @@ * @param {GPURenderPipeline} pipeline */ setPipeline(pipeline) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'setPipeline' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -3867,7 +3842,7 @@ * @param {number} size */ setIndexBuffer(buffer, indexFormat, offset = 0, size) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'setIndexBuffer' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -3923,7 +3898,7 @@ * @param {number} size */ setVertexBuffer(slot, buffer, offset = 0, size) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'setVertexBuffer' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -3979,7 +3954,7 @@ * @param {number} firstInstance */ draw(vertexCount, instanceCount = 1, firstVertex = 0, firstInstance = 0) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'draw' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); vertexCount = webidl.converters.GPUSize32(vertexCount, { @@ -4030,7 +4005,7 @@ baseVertex = 0, firstInstance = 0, ) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'drawIndexed' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -4078,7 +4053,7 @@ * @param {number} indirectOffset */ drawIndirect(indirectBuffer, indirectOffset) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'drawIndirect' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -4120,7 +4095,7 @@ * @param {number} indirectOffset */ drawIndexedIndirect(indirectBuffer, indirectOffset) { - webidl.assertBranded(this, GPURenderPassEncoderPrototype); + webidl.assertBranded(this, GPURenderPassEncoder); const prefix = "Failed to execute 'drawIndirect' on 'GPURenderPassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -4166,7 +4141,6 @@ } } GPUObjectBaseMixin("GPURenderPassEncoder", GPURenderPassEncoder); - const GPURenderPassEncoderPrototype = GPURenderPassEncoder.prototype; /** * @param {string | null} label @@ -4207,7 +4181,7 @@ * @param {GPUComputePipeline} pipeline */ setPipeline(pipeline) { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'setPipeline' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -4245,7 +4219,7 @@ * @param {number} z */ dispatch(x, y = 1, z = 1) { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'dispatch' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); x = webidl.converters.GPUSize32(x, { prefix, context: "Argument 1" }); @@ -4273,7 +4247,7 @@ * @param {number} indirectOffset */ dispatchIndirect(indirectBuffer, indirectOffset) { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'dispatchIndirect' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -4315,7 +4289,7 @@ * @param {number} queryIndex */ beginPipelineStatisticsQuery(querySet, queryIndex) { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'beginPipelineStatisticsQuery' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -4356,7 +4330,7 @@ } endPipelineStatisticsQuery() { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'endPipelineStatisticsQuery' on 'GPUComputePassEncoder'"; assertDevice(this[_encoder], { @@ -4378,7 +4352,7 @@ * @param {number} queryIndex */ writeTimestamp(querySet, queryIndex) { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'writeTimestamp' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -4416,7 +4390,7 @@ } endPass() { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'endPass' on 'GPUComputePassEncoder'"; const device = assertDevice(this[_encoder], { prefix, @@ -4443,7 +4417,7 @@ dynamicOffsetsDataStart, dynamicOffsetsDataLength, ) { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'setBindGroup' on 'GPUComputePassEncoder'"; const device = assertDevice(this[_encoder], { @@ -4464,12 +4438,7 @@ resourceContext: "Argument 2", selfContext: "this", }); - if ( - !(ObjectPrototypeIsPrototypeOf( - Uint32ArrayPrototype, - dynamicOffsetsData, - )) - ) { + if (!(dynamicOffsetsData instanceof Uint32Array)) { dynamicOffsetsData = new Uint32Array(dynamicOffsetsData ?? []); dynamicOffsetsDataStart = 0; dynamicOffsetsDataLength = dynamicOffsetsData.length; @@ -4488,7 +4457,7 @@ * @param {string} groupLabel */ pushDebugGroup(groupLabel) { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'pushDebugGroup' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -4512,7 +4481,7 @@ } popDebugGroup() { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'popDebugGroup' on 'GPUComputePassEncoder'"; assertDevice(this[_encoder], { @@ -4533,7 +4502,7 @@ * @param {string} markerLabel */ insertDebugMarker(markerLabel) { - webidl.assertBranded(this, GPUComputePassEncoderPrototype); + webidl.assertBranded(this, GPUComputePassEncoder); const prefix = "Failed to execute 'insertDebugMarker' on 'GPUComputePassEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -4565,7 +4534,6 @@ } } GPUObjectBaseMixin("GPUComputePassEncoder", GPUComputePassEncoder); - const GPUComputePassEncoderPrototype = GPUComputePassEncoder.prototype; /** * @param {string | null} label @@ -4649,7 +4617,7 @@ * @param {GPURenderBundleDescriptor} descriptor */ finish(descriptor = {}) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'finish' on 'GPURenderBundleEncoder'"; descriptor = webidl.converters.GPURenderBundleDescriptor(descriptor, { prefix, @@ -4687,7 +4655,7 @@ dynamicOffsetsDataStart, dynamicOffsetsDataLength, ) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'setBindGroup' on 'GPURenderBundleEncoder'"; const device = assertDevice(this, { prefix, context: "this" }); @@ -4704,12 +4672,7 @@ resourceContext: "Argument 2", selfContext: "this", }); - if ( - !(ObjectPrototypeIsPrototypeOf( - Uint32ArrayPrototype, - dynamicOffsetsData, - )) - ) { + if (!(dynamicOffsetsData instanceof Uint32Array)) { dynamicOffsetsData = new Uint32Array(dynamicOffsetsData ?? []); dynamicOffsetsDataStart = 0; dynamicOffsetsDataLength = dynamicOffsetsData.length; @@ -4728,7 +4691,7 @@ * @param {string} groupLabel */ pushDebugGroup(groupLabel) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'pushDebugGroup' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -4748,7 +4711,7 @@ } popDebugGroup() { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'popDebugGroup' on 'GPURenderBundleEncoder'"; assertDevice(this, { prefix, context: "this" }); @@ -4765,7 +4728,7 @@ * @param {string} markerLabel */ insertDebugMarker(markerLabel) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'insertDebugMarker' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -4788,7 +4751,7 @@ * @param {GPURenderPipeline} pipeline */ setPipeline(pipeline) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'setPipeline' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -4823,7 +4786,7 @@ * @param {number} size */ setIndexBuffer(buffer, indexFormat, offset = 0, size = 0) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'setIndexBuffer' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -4873,7 +4836,7 @@ * @param {number} size */ setVertexBuffer(slot, buffer, offset = 0, size = 0) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'setVertexBuffer' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -4923,7 +4886,7 @@ * @param {number} firstInstance */ draw(vertexCount, instanceCount = 1, firstVertex = 0, firstInstance = 0) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'draw' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); vertexCount = webidl.converters.GPUSize32(vertexCount, { @@ -4970,7 +4933,7 @@ baseVertex = 0, firstInstance = 0, ) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'drawIndexed' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 1, { prefix }); @@ -5014,7 +4977,7 @@ * @param {number} indirectOffset */ drawIndirect(indirectBuffer, indirectOffset) { - webidl.assertBranded(this, GPURenderBundleEncoder.prototype); + webidl.assertBranded(this, GPURenderBundleEncoder); const prefix = "Failed to execute 'drawIndirect' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); @@ -5145,7 +5108,7 @@ } destroy() { - webidl.assertBranded(this, GPUQuerySetPrototype); + webidl.assertBranded(this, GPUQuerySet); this[_cleanup](); } @@ -5158,7 +5121,6 @@ } } GPUObjectBaseMixin("GPUQuerySet", GPUQuerySet); - const GPUQuerySetPrototype = GPUQuerySet.prototype; window.__bootstrap.webgpu = { gpu: webidl.createBranded(GPU), |