-
Notifications
You must be signed in to change notification settings - Fork 345
Description
Posting this here instead of filing a bug. Maybe it's the specified behavior but ....
If I call device.createPipelineLayout with empty elements it ignores them.
In other words
device.createPipelineLayout({ bindGroupLayouts: [ validBGL ] }); // should pass. passes
device.createPipelineLayout({ bindGroupLayouts: [ undefined, validBGL ] }); // should fail. fails
device.createPipelineLayout({ bindGroupLayouts: [ ,,validBGL ] }); // should fail? does not fail
device.createPipelineLayout({ bindGroupLayouts: [ validBGL,, ] }); // should fail? does not fail
device.createPipelineLayout({ bindGroupLayouts: [ validBGL,,valiaBGL ] }); // should fail? does not failempty entries are not ignored other places. For example new Float32Array([,,7]) makes [NaN, NaN, 7]
For createPipelineLayout the spec says
Let allEntries be the result of concatenating bgl.[[descriptor]].entries for all bgl in descriptor.bindGroupLayouts.
Which does kind of suggest these empty elements are ok? But checking other places, an empty element isn't okay. For example createBindGroup({ entries: [, validEntry ] }) fails. createRenderPipeline({ ... vertex: { buffers: [ { attrib: [,,, someValidAttribute ] } ] } } ) fails. Those specs make it sound they could succeed based on similar wording. For example:
For each attribute attrib in the list descriptor.attributes:
Well, an array of atttributes: [,,,validAttribute,,,validAttrubte] has 2 attributes but fails
Should this be clarified? And are CTS tests needed?