-
Notifications
You must be signed in to change notification settings - Fork 896
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
Implement OpenGL Backend For Unix Platforms #907
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.
This is an autogenerated code review.New suggestions: 8
fa65a99
to
aef60ca
Compare
OK, I haven't nailed down the dependency versions yet, but the rest of the code should be ready for review. The most controversial organizational change that I've included in this ( sorry, maybe should have been a separate PR ) was I used the |
Note that |
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 agree the configuration change should land independently prior to GL stuff
OK, I'll extract it out to a separate PR that should be merged before this one. |
Yeah, I figured. I'll put the GFX git commit hashes in there to fix the deps just so we can verify that CI will pass. |
0c0899e
to
351babf
Compare
OK, the two commits have been separated. Once #910 is merged this PR will only have the second commit in it. After separating the commits you can see that this was actually really simple from the WGPU side thanks to the abstraction provided by GFX, which is really awesome. |
719d79e
to
73d0b0b
Compare
Just found that the port to the newer version of GFX broke the Vulkan backend on Linux at least. I'm working on fixing that. It's some panic on the unwrap for Edit: Figured it out: I had left out the x11 feature on the Vulkan backend. |
1ade7a9
to
b4ea52c
Compare
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.
Couple of implementation questions.
910: Replace backends! Macro with CFG Aliases r=kvark a=zicklag **Connections** Needs to be merged before: #907 **Description** This change makes it easier to conditionally compile code based on graphics backends by adding `#[cfg]` aliases for the backends such as `vulkan`, `metal`, etc. This makes the code easier to read and maintain. **Testing** Tested the WGPU-rs cube and boids examples and they work as normal on a Linux machine with Vulkan. Co-authored-by: Zicklag <zicklag@katharostech.com>
gfx-rs GL backend is now published. Time to revive this! |
Yay! I'll see about getting this back up to date tomorrow probably. 😃 |
73df438
to
6ba2720
Compare
There you go! It looks like surfman is failing to compile on iOS, unfortunately. Not sure why we hadn't hit that until now. Also the cube example doesn't run:
Is this potentially related to your recent image changes @kvark ? The triangle example works, though. Otherwise the changes should pretty much be in order I think. |
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.
Thank you for the amazing work!
A few small things here
Oh, for iOS - we shouldn't be building OpenGL for iOS at all. So if it falls under |
Oh, yeah, of course. Easy fix. |
6ba2720
to
4574834
Compare
OK, now I'm a little confused why surfman is being pulled in at all. The only thing that has a dependency on [target.'cfg(all(unix, not(target_os = "ios")))'.dependencies]
surfman = { version = "0.3", features = ["sm-raw-window-handle"], optional = true } Could clippy be being weird about this and including the dependency when it isn't supposed to? |
@zicklag you are looking at the
Really, we shouldn't even try to build the GL backend on iOS, so this line needs to be changed:
|
4574834
to
f7f1ff6
Compare
Oh, yes, that's right. Thank you. I don't know how I missed that. 😆 Fixed it ( assuming CI passes, now ). |
bors r+ |
907: Implement OpenGL Backend For Unix Platforms r=kvark a=zicklag **Connections** Requires: gfx-rs/gfx#3340 ( merged ) Should be merged first: #910 Works towards: #450 **Description** Integrates the GFX GL backend for Unix platforms **Testing** Runs the basic cube and triangle examples for wgpu-rs, but not without rendering artifacts on the cube. <!-- Non-trivial functional changes would need to be tested through: - [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples. - [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity. Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications. See #666 for an example. If you can add a unit/integration test here in `wgpu`, that would be best. --> Co-authored-by: Zicklag <zicklag@katharostech.com>
Thank you for all the amazing work! |
Build failed: |
Glad I could help! Unfortunately it looks like we've got to wait for Canonical to fix their servers or something. The apt repos are failing on CI everywhere at the moment. |
bors retry |
606: Enable GL backend r=kvark a=kvark Replaces #182 Depends on gfx-rs/wgpu#907 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
606: Enable GL backend r=kvark a=kvark Replaces gfx-rs#182 Depends on gfx-rs#907 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
907: Add feature request for wgpu-rs r=kvark a=cwfitzgerald Thanks @JMS55 for bringing this to my attention in gfx-rs#906 Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Connections
Requires: gfx-rs/gfx#3340 ( merged )
Should be merged first: #910
Works towards: #450
Description
Integrates the GFX GL backend for Unix platforms
Testing
Runs the basic cube and triangle examples for wgpu-rs, but not without rendering artifacts on the cube.