-
Notifications
You must be signed in to change notification settings - Fork 22.9k
Technical review: Add details and example for null bindGroupLayouts entries #41558
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
Technical review: Add details and example for null bindGroupLayouts entries #41558
Conversation
|
Preview URLs External URLs (1)URL:
(comment last updated: 2025-10-17 13:24:31) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| In this snippet, we create three bind group layouts, with bind group layout 1 representing fragment data and bind group layout 2 representing vertex data. If we want to create a pipeline that uses only bind group layouts 0 and 2, we can pass `null` for bind group layout 1 and then render without a fragment shader. | ||
|
|
||
| ```js | ||
| const bgl0 = myDevice.createBindGroupLayout({ entries: myGlobalEntries }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe use device to match the example above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you :)
Description
As of Chrome 135,
GPUDevice.createPipelineLayoutsupportsnullentries in thebindGroupLayoutsarray. See https://developer.chrome.com/blog/new-in-webgpu-135#allow_creating_pipeline_layout_with_null_bind_group_layout for details.This PR adds details for this feature, plus a quick example snippet.
Motivation
Additional details
Related issues and pull requests