-
Notifications
You must be signed in to change notification settings - Fork 246
WGPU example #92
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
WGPU example #92
Conversation
oh my gosh, I can actually, read the entire example-runner program without my eyes glazing over, that's incredible |
Not only that it also runs in the browser! |
The |
Wait we don't need a different shader right? Can just use the same one. And then maybe call it |
I've mostly made it work with the old shader in https://github.com/DJMcNab/rust-gpu/tree/wgpu-example, although the output I get is upside down. I'm not sure why that is 🤔. Thanks to the people on the discord for helping me get it this far. |
We don't but I made this more for myself since I want a tiny as possible shader for my own testing. This I can just patch into my branches and test/debug easily. |
* Fixed nested if statements * feedback * Removed a line
* Add bug report template * Update .github/ISSUE_TEMPLATE/bug_report.md Co-authored-by: Ari V <[email protected]> * Update .github/ISSUE_TEMPLATE/bug_report.md Co-authored-by: Ari V <[email protected]> * Update bug_report.md * Update bug_report.md Co-authored-by: Ari V <[email protected]>
This should mean that if one of the required components is broken on a given nightly, rustup will try going backwards until it finds one which works.
* Initial commit for binding proposal, nees some cleanup * Continue at home * Explain global binding model * Explain function binging model * Final suggestion * Add more ups & downs * Add another downside to static * Add another downside to static
This reverts commit 985ae7d.
On my Windows machine the
Not really sure at all why it would be failing to find even the entrypoint of the shader |
@repi this seems to be a bug, we'll fix it in gfx-rs/gfx#3435 |
@repi we just published a patch release, so this should work fine after updating with |
@grovesNL awesome thx, will try out! Update: worked! |
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.
Works with Mac now, yay! And merged it with the latest changes.
Think we should get this in! And once it is merged we could do some renaming & moving things around a bit.
Co-authored-by: bjorn3 <[email protected]>
"examples/example-shader", | ||
"examples/wgpu-example-shader", |
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.
Adding a comment here, one thing that I would change but I think could be done after merging, is to rename this shader to something like hello-world-shader
or simplest-shader
or something to that effect, since it shouldn't really be specific to wgpu.
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.
fully agree!
I was thinking that the current example-shader
would become more, well simply, shaders
with a set of non-trivial shaders like the current sky one and more in the same crate.
but also very good then to have a super simple separate crate that is easier to iterate on with fewer dependencies and features. esp. soon when glam gets in #149
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.
With the caveat of my one comment, think this seems fine to merge for now... I can take stewardship of making this a little more integrated with the other example(s) afterwards. I would like to get #109 merged as well which then paves the way for the wgpu runner to run the sky example.
@@ -46,6 +46,7 @@ jobs: | |||
steps: | |||
- uses: actions/checkout@v2 | |||
- run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev | |||
- run: brew install spirv-tools |
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.
wait what? this should have excluded wgpu-example-runner in the clippy run, not installing spirv-tools, right? either that or including example-runner in the clippy run
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.
not sure what you mean?
Did get clippy build failures on this branch on that spirv-tools was missing
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.
Why would you use brew on a linux job?
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.
@bjorn3 It's the only package manager with spirv-tools
on linux that is available in GitHub Actions.
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.
Why would you use brew on a linux job?
See also #107
Up to y'all if you want this in.
Just copy pasted the
wgpu
example and made it rusty.Mainly just wrote it so I can patch it into main locally for testing.
Fix #65