diff options
Diffstat (limited to 'ext/webgpu/01_webgpu.js')
-rw-r--r-- | ext/webgpu/01_webgpu.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js index 3e8e3161e..a310eac2f 100644 --- a/ext/webgpu/01_webgpu.js +++ b/ext/webgpu/01_webgpu.js @@ -618,11 +618,12 @@ function createGPUSupportedFeatures(features) { /** @type {GPUSupportedFeatures} */ const supportedFeatures = webidl.createBranded(GPUSupportedFeatures); supportedFeatures[webidl.setlikeInner] = new Set(features); - return webidl.setlike( + webidl.setlike( supportedFeatures, GPUSupportedFeaturesPrototype, true, ); + return supportedFeatures; } class GPUSupportedFeatures { @@ -4903,14 +4904,14 @@ class GPURenderBundleEncoder { * @param {number} offset * @param {number} size */ - setVertexBuffer(slot, buffer, offset = 0, size = 0) { + setVertexBuffer(slot, buffer, offset = 0, size) { webidl.assertBranded(this, GPURenderBundleEncoderPrototype); const prefix = "Failed to execute 'setVertexBuffer' on 'GPURenderBundleEncoder'"; webidl.requiredArguments(arguments.length, 2, { prefix }); slot = webidl.converters.GPUSize32(slot, { prefix, - context: "Argument 2", + context: "Argument 1", }); buffer = webidl.converters.GPUBuffer(buffer, { prefix, @@ -4920,10 +4921,12 @@ class GPURenderBundleEncoder { prefix, context: "Argument 3", }); - size = webidl.converters.GPUSize64(size, { - prefix, - context: "Argument 4", - }); + if (size !== undefined) { + size = webidl.converters.GPUSize64(size, { + prefix, + context: "Argument 4", + }); + } const device = assertDevice(this, { prefix, context: "this" }); const renderBundleEncoderRid = assertResource(this, { prefix, |