-
Notifications
You must be signed in to change notification settings - Fork 953
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
Support dual source blending #4022
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.
Thanks for the PR!
Thanks for the feedback, they make sense. I think i would like to finish the naga review first, when that is done i will look into these comments. |
I hope I have addressed the issues you pointed out. I tested briefly with my simple application. It works when everything is set up correctly. It stops when the feature is not defined, and it complains when blend is enabled and the shader does not have an output with it. I also ran the unittests and they seem to pass except one which also fails in trunk. Cargo.toml conflicts as i have updated the hash to contain the naga changes. |
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.
Thanks for making the changes!
Besides a few naming/phrasing suggestions, I think the validation can be improved a bit more.
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.
This should be the last round of review.
Note that the PR needs to be rebased.
I have addressed the issues in this round and performed a rebase. If the assumptions in the comment to resource.rs lines 2924 to 2931 l are correct i hope indeed it is the last chages, if not i guess we may need some more rounds. All unittests except wgpu-test::wgpu-tests shader::struct_layout::uniform_input pass on linux, but that test also fails on trunk. |
seems like i have forgot clippy. |
… fragment stage. Also check if the entry point for the fragment stage uses dual source blending (up for discussion in the review)
Co-authored-by: Teodor Tanasoaia <[email protected]>
I pushed a few more tweaks. Let me know if they look good and we can merge this. Thank you for implementing this new functionality in naga & wgpu! |
The changes looks good to me, thanks for you patience with the multiple review rounds. |
Co-authored-by: Teodor Tanasoaia <[email protected]>
Support writing shaders with alt blender mode.
See https://github.com/freqmod/helicoid/tree/master/helicoid-wgpu for usage example.
Checklist
cargo clippy
.cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
Resolves #1804.
Depends on gfx-rs/naga#2427.
Description
See issue 1804 (linked above)
Testing
Tested on linux with OpenGL, and Vulkan, and on Mac using metal. I have made some changes for Direct X but since I don't have a windows build environment I haven't tested that.
Tested in the helicoid-wgpu crate in external repo, I guess a test or example could be made if we deem it useful.