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

Update description of GPUColorWrite constants in WebGPU #34520

Merged
merged 3 commits into from
Jun 30, 2024

Conversation

matthew-wong1
Copy link
Contributor

Description

The WebGPU createRenderPipeline call takes bitwise flags as parameters but I think they were mislabeled on the docs. I've updated them to the correct name.

Motivation

Following the way in which the flags were originally described on the docs, you would get a JavaScript ReferenceError saying 'GPUFlagsConstant is not defined'.

Additional details

WebGPU documentation for GPUColorWrite: https://www.w3.org/TR/webgpu/#namespacedef-gpucolorwrite

@matthew-wong1 matthew-wong1 requested a review from a team as a code owner June 30, 2024 21:07
@matthew-wong1 matthew-wong1 requested review from wbamberg and removed request for a team June 30, 2024 21:07
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jun 30, 2024
matthew-wong1 and others added 2 commits June 30, 2024 22:09
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Note that multiple flags can be specified by separating values with pipe symbols, for example:

```js
writeMask: GPUFlagsConstant.RED | GPUFlagsConstant.ALPHA;
writeMask: GPUColorWrite.RED | GPUColorWrite.ALPHA
Copy link
Contributor

Choose a reason for hiding this comment

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

[mdn-linter] reported by reviewdog 🐶

Suggested change
writeMask: GPUColorWrite.RED | GPUColorWrite.ALPHA
writeMask: GPUColorWrite.RED | GPUColorWrite.ALPHA;
Copy link
Contributor

github-actions bot commented Jun 30, 2024

Preview URLs

(comment last updated: 2024-06-30 21:11:35)

Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

👍 thank you @matthew-wong1

@wbamberg wbamberg merged commit 959975c into mdn:main Jun 30, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed
2 participants