Grand cleanup and refactor of the descriptors in the API#873
Merged
bors[bot] merged 4 commits intogfx-rs:masterfrom Aug 13, 2020
Merged
Grand cleanup and refactor of the descriptors in the API#873bors[bot] merged 4 commits intogfx-rs:masterfrom
bors[bot] merged 4 commits intogfx-rs:masterfrom
Conversation
Kimundi
reviewed
Aug 12, 2020
| context: &'a super::RenderPassContext, | ||
| ) -> crate::command::RenderBundleEncoderDescriptor<'a> { | ||
| crate::command::RenderBundleEncoderDescriptor { | ||
| label: label.map(Cow::Borrowed), |
Contributor
There was a problem hiding this comment.
It might be more consistent to import Borrowed directly everywhere.
Member
Author
There was a problem hiding this comment.
I don't think wgpu crate imports Borrowed directly anywhere
Contributor
There was a problem hiding this comment.
Ah sorry, could have sworn I did the same as in wgpu-rs there.
cwfitzgerald
approved these changes
Aug 12, 2020
Member
cwfitzgerald
left a comment
There was a problem hiding this comment.
Looks great!
One minor concern I have is that we currently have the documentation duplicated between wgpu-core and wgpu-rs for non-shared descriptors, which means we need to make sure they are always kept in sync. This could pose some issues if we let wgpu-core's stagnate due to us not actively seeing it.
Member
Author
|
bors r=cwfitzgerald,grovesNL |
Contributor
bors bot
added a commit
to gfx-rs/wgpu-rs
that referenced
this pull request
Aug 13, 2020
503: Update for the wgpu grand refactor r=kvark a=kvark Depends on gfx-rs/wgpu#873 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
bors bot
added a commit
to gfx-rs/wgpu-rs
that referenced
this pull request
Aug 13, 2020
503: Update for the wgpu grand refactor r=kvark a=kvark Depends on gfx-rs/wgpu#873 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
bors bot
added a commit
to gfx-rs/wgpu-rs
that referenced
this pull request
Aug 13, 2020
503: Update for the wgpu grand refactor r=kvark a=kvark Depends on gfx-rs/wgpu#873 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
bors bot
added a commit
that referenced
this pull request
Aug 31, 2020
912: Fix write-only stencil state descriptors from not working - fixes #911 r=kvark a=Dinnerbone **Connections** This fixes [#911 - Stencil testing broken between v0.5 and v0.6](#911). **Description** Write-only stencil states (read 0, write >0) are being treated as if they are disabled, which causes pipelines to act as though they don't have any stencil state set at all. This worked prior to commit 2473c25 (introduced in PR #873). As far as I can tell, this works fine in Vulkan, Metal, DX12 and DX11 as we've been using this approach over at Ruffle for a while now. **Testing** You can view the reproduction case in #911 for manual testing. I have confirmed that this fix makes that case work as expected. I couldn't find any automated tests for wgpu-types to copy and add for this case. If that's wanted then please let me know what the best approach is. Co-authored-by: Nathan Adams <dinnerbone@dinnerbone.com>
kvark
added a commit
to kvark/wgpu
that referenced
this pull request
Jun 3, 2021
503: Update for the wgpu grand refactor r=kvark a=kvark Depends on gfx-rs#873 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
kvark
pushed a commit
to kvark/wgpu
that referenced
this pull request
Jun 3, 2021
873: Boids example: cleaner rand code r=kvark a=dhardy ... for a certain definition of cleaner. Is this clearer or just more confusing? Co-authored-by: Diggory Hardy <git@dhardy.name>
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
Cleanup follows gfx-rs/wgpu-rs#501
Fixes #871
Fixes #848
Description
There is a lot of small and big things crumbled in here.
The major one is where descriptors live, and how they are parametrized. Logic is the following:
wgpu-typeswgpu-native(i.e. hasrepr(C)), we possibly parametrize it (currently, only label is).wgpu-coreand stripped of genericsSome medium-sized things:
RenderCommandinto thedrawmodule (which is meant to contain shared things)TextureViewDescriptorfields optional, but receives it directly now (Refactor TextureViewDescriptor to match upstream spec better #848)StencilStateDescriptor, so that we can deriveDefaultfor itDeviceAPI: neither the clients, or gfx-rs need that shape, and it can't be safeSome smaller things:
Testing
Tested on gfx-rs/wgpu-rs#503