Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unset bind group by passing null to setBindGroup() #24936

Merged
merged 7 commits into from
Nov 15, 2024

Conversation

chrisdavidmills
Copy link
Contributor

Summary

In Chrome 117 onwards, you can pass null as the second argument when calling https://developer.mozilla.org/en-US/docs/Web/API/GPUComputePassEncoder/setBindGroup#bindgroup, https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/setBindGroup#bindgroup, and https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/setBindGroup#bindgroup to unset a previously-set bind group in the specified slot.

This PR adds data points for this behavior. I copied the compat data from GPURenderBundleEncoder.setVertexBuffer.unset_vertex_buffer, as it was implemented at the same time in Chrome and is very similar behavior, so there is a good chance that other browsers will have implemented it at the same time too. I've not explicitly tested it though.

See https://developer.chrome.com/blog/new-in-webgpu-117#unset_bind_group for evidence of this change.

Note that the above link does not mention GPUComputePassEncoder/setBindGroup, but I tested it in Chrome and it works there as well.

Test results and supporting details

Related issues

Project issue: mdn/content#36375

@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Nov 4, 2024
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chromium changes LGTM, but Deno/Safari should probably be reset:

Related spec change: gpuweb/gpuweb#3938

api/GPUComputePassEncoder.json Outdated Show resolved Hide resolved
api/GPUComputePassEncoder.json Outdated Show resolved Hide resolved
api/GPUComputePassEncoder.json Show resolved Hide resolved
api/GPURenderBundleEncoder.json Show resolved Hide resolved
api/GPURenderPassEncoder.json Show resolved Hide resolved
api/GPUComputePassEncoder.json Show resolved Hide resolved
api/GPURenderBundleEncoder.json Show resolved Hide resolved
api/GPURenderPassEncoder.json Show resolved Hide resolved
@caugner caugner enabled auto-merge (squash) November 15, 2024 20:54
@caugner caugner disabled auto-merge November 15, 2024 20:54
@caugner caugner merged commit 18a60c0 into mdn:main Nov 15, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants