Replace backends! Macro with CFG Aliases#910
Merged
bors[bot] merged 1 commit intogfx-rs:masterfrom Aug 31, 2020
Merged
Conversation
zicklag
commented
Aug 30, 2020
Contributor
Author
zicklag
left a comment
There was a problem hiding this comment.
One oddity with one of the macros that needs review.
Contributor
Author
|
It seems that windows nightly is failing, but I don't know that that is because of my changes. It's failing to compile another crate. Edit: Yep, it's failing the same on the other PRs, too. |
Uses the `cfg_aliases` crate to replace the `backends!` macro and provide a more natural way to gate backend specific code.
This was referenced Aug 30, 2020
Contributor
|
Build succeeded: |
bors bot
added a commit
that referenced
this pull request
Nov 5, 2020
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>
bors bot
added a commit
that referenced
this pull request
Nov 5, 2020
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 asvulkan,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.