Nothing Special   »   [go: up one dir, main page]

Closed Bug 1896843 Opened 5 months ago Closed 19 days ago

GPURenderPassEncoder: setBindGroup() argument 2 should be nullable

Categories

(Core :: Graphics: WebGPU, defect, P2)

Firefox 128
defect

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: huscar, Assigned: bradwerth)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0

Steps to reproduce:

passEncoder.setBindGroup(1, null);

where passEncoder is a GPURenderPassEncoder.

On nightly 128.0a1

Actual results:

Exception thrown:
Uncaught TypeError: GPURenderPassEncoder.setBindGroup: Argument 2 is not an object.

Expected results:

clear bindings at bind group 1, as per spec https://gpuweb.github.io/gpuweb/#programmable-passes-bind-groups, bindGroup may be nullable. This is useful for instance when using multiple pipelines in a single pass.

Note that the MDN docs also don't mention nullability of bindGroup https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setBindGroup

The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Component: JavaScript Engine → Graphics: WebGPU
Severity: -- → S3
Flags: needinfo?(bwerth)
Priority: -- → P2

This appears to be exercised by the web-platform test maxBindGroupsPlusVertexBuffers.worker.js, which we currently skip. I'll try to use this existing test as confirmation that we've fixed this issue.

Assignee: nobody → bwerth

(In reply to Brad Werth [:bradwerth] from comment #2)

This appears to be exercised by the web-platform test maxBindGroupsPlusVertexBuffers.worker.js, which we currently skip. I'll try to use this existing test as confirmation that we've fixed this issue.

That test is disabled along with all the other WebGPU worker tests in Bug 1818042. I'll have to build a one-off test for this feature.

:bradwerth: That test is a worker variant of webgpu:api,validation,capability_checks,limits,maxVertexBuffers:validate,maxBindGroupsPlusVertexBuffers:* (viz., testing/web-platform/mozilla/tests/webgpu/cts/webgpu/api/validation/capability_checks/limits/maxVertexBuffers/cts.https.html), which should otherwise be much the same and not disabled.

:bradwerth: Specifically, the webgpu:api,validation,capability_checks,limits,maxBindGroupsPlusVertexBuffers:draw,at_over:* cases I'd expect to Just Work™, minus this issue in question. The other drawIndexed, drawIndirect, and drawIndexedIndirect cases are likely to not work yet, though, since indirect is blocked on bug 1786566.

Urgh, this will require an extension to wgpu-core to add something like clear_bind_group to BindGroupStateChange. I'll get on that.

Flags: needinfo?(bwerth)

(In reply to Brad Werth [:bradwerth] from comment #6)

Urgh, this will require an extension to wgpu-core to add something like clear_bind_group to BindGroupStateChange. I'll get on that.

In progress at https://github.com/gfx-rs/wgpu/pull/5778.

This has landed upstream in wgpu and now this Bug is dependent upon the next vendoring, which I will add as a blocker when the vendoring Bug is filed.

Depends on: 1917102

This includes a test that checks that setBindGroup can be passed a null
bindGroup.

Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7b032453fb73 Make webgpu setBindGroup take an optional bind group, matching spec. r=webidl,webgpu-reviewers,nical,saschanaz,ErichDonGubler
Status: UNCONFIRMED → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: