-
Notifications
You must be signed in to change notification settings - Fork 345
Make GPUShaderModuleCompilationHint.layout optional #2876
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
Conversation
Issue gpuweb#2574 shows that we may want to add more information to hints in the future. To help make the hints future-proof, the layout is made optional so that authors can in the future pass information like the primitive type, even if they don't know what the pipeline layout will be.
kainino0x
left a comment
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. I think this change isn't strictly necessary because we can always make it optional later when we add other fields. But the clear benefit to making it optional now is that future applications won't have to do nasty feature detection or UA detection for older browsers that require this field.
|
LGTM as well, seems like a good future-proofing strategy. |
SHA: 69d4170 Reason: push, by @kainino0x Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: 69d4170 Reason: push, by @kainino0x Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: 69d4170 Reason: push, by @kainino0x Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Issue gpuweb#2574 shows that we may want to add more information to hints in the future. To help make the hints future-proof, the layout is made optional so that authors can in the future pass information like the primitive type, even if they don't know what the pipeline layout will be.
|
Does omitting |
|
No, it doesn't. And that's intentional. As it turns out, using the So now you always have to specify a layout, and can explicitly choose [EDIT] I'm an idiot, and didn't realize this was talking about the shader module hint and not the pipeline layout. Sorry. In this context omitting the layout simply means not providing a hint, which means that any backend that might have tried to pre-emptively optimize with that information can't. If you explicitly specify Given that they're just hints, omitting any aspect of that dictionary simply means "No hint provided." |
|
Thanks - the reason I am asking is that when marshalling over to wasm, handwritten JS code could specify any type of hint object of form:
|
|
I filed webgpu-native/webgpu-headers#166 . |
…d "'auto' layout hint" passed to compilation. gpuweb/gpuweb#2876
Issue #2574 shows that we may want to add more information to hints in
the future. To help make the hints future-proof, the layout is made
optional so that authors can in the future pass information like the
primitive type, even if they don't know what the pipeline layout will
be.
💥 Error: 500 Internal Server Error 💥
PR Preview failed to build. (Last tried on May 12, 2022, 3:22 PM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 CSS Spec Preprocessor - CSS Spec Preprocessor is the web service used to build Bikeshed specs.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.