-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Mark depthCompare and depthWriteEnabled as optional, and add explanation #36886
Mark depthCompare and depthWriteEnabled as optional, and add explanation #36886
Conversation
Preview URLs |
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 with nit
@@ -52,7 +52,7 @@ The `depthStencil` object can contain the following properties: | |||
- : A number representing the maximum depth bias of a fragment. If omitted, `depthBiasClamp` defaults to 0. | |||
- `depthBiasSlopeScale` {{optional_inline}} | |||
- : A number representing a depth bias that scales with the fragment's slope. If omitted, `depthBiasSlopeScale` defaults to 0. | |||
- `depthCompare` | |||
- `depthCompare` {{optional_inline}} |
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.
Those changes apply to https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createRenderPipelineAsync as well I believe
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.
Yes, but we don't duplicate the descriptor descriptions on both pages. We just include them in full on the createRenderPipeline()
ref page, and then link there from the createRenderPipelineAsync()
ref page.
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.
We're good then!
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.
Description
In Chrome 120, the
depthCompare
anddepthWriteEnabled
properties of thecreateRenderPipeline
/createRenderPipelineAsync
descriptors have been made optional when not needed. See https://developer.chrome.com/blog/new-in-webgpu-120#changes_to_depth-stencil_state.This PR marks both properties as optional and adds an explanation of when they are not needed.
Motivation
Additional details
Related issues and pull requests
Project issue: #36370