-
Notifications
You must be signed in to change notification settings - Fork 86
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
Adjust fragment state blend factor and write mask validation #3217
Adjust fragment state blend factor and write mask validation #3217
Conversation
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
src/webgpu/api/validation/render_pipeline/fragment_state.spec.ts
Outdated
Show resolved
Hide resolved
@@ -422,6 +432,6 @@ g.test('pipeline_output_targets,blend') | |||
const _success = | |||
info.color.type === sampleType && | |||
componentCount >= kTexelRepresentationInfo[format].componentOrder.length && | |||
meetsExtraBlendingRequirement; | |||
(meetsExtraBlendingRequirement || writeMask === 0); |
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.
Sorry, I just reread the spec and I think I misinterpreted this the other day.
IIUC actually the only case where writeMask=0 makes it valid is when the fragment shader has no output to that location. If it has output to that location, then the writeMask isn't checked by the validation in the spec.
https://gpuweb.github.io/gpuweb/#abstract-opdef-validating-gpufragmentstate
I do believe we could loosen the validation in the way that you've done here, but it would require a spec change.
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.
I think you are right. The "Otherwise..." is at the same level as
"If get the entry point(FRAGMENT, descriptor) has a shader stage output value output with location attribute equal to index:"
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.
I do believe we could loosen the validation in the way that you've done here, but it would require a spec change.
For reference the spec issue was gpuweb/gpuweb#2013
Issue: https://crbug.com/dawn/2272
Validation in chrome impl needs adjustment: https://dawn-review.googlesource.com/c/dawn/+/164922
Requirements for PR author:
.unimplemented()
./** documented */
and new helper files are found inhelper_index.txt
.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.