Fix validation errors + panics on empty buffers#720
Merged
bors[bot] merged 1 commit intogfx-rs:masterfrom Jun 15, 2020
Merged
Conversation
kvark
requested changes
Jun 15, 2020
Member
kvark
left a comment
There was a problem hiding this comment.
Thank you for addressing this! I have a couple of concerns
wgpu-core/src/device/life.rs
Outdated
| Err(e) => { | ||
| log::error!("Mapping failed {:?}", e); | ||
| resource::BufferMapAsyncStatus::Error | ||
| let status = if mapping.sub_range.size.map(|x| x != 0).unwrap_or(true) { |
kvark
approved these changes
Jun 15, 2020
Member
kvark
left a comment
There was a problem hiding this comment.
Thanks!
the map_or thing is not a blocker, we can proceed
bors r+
bors bot
added a commit
that referenced
this pull request
Jun 15, 2020
720: Fix validation errors + panics on empty buffers r=kvark a=rukai **Description** My previous PR left a vulkan validation error when creating an empty buffer. This PR fixes that and also fixes a panic preventing the compute-example from running with no elements. **Testing** Unit test added in wgpu-rs PR. gfx-rs/wgpu-rs#373 <!-- 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: Rukai <rubickent@gmail.com>
Contributor
|
Canceled. |
Contributor
Author
|
ah, well i've pushed it now |
Member
|
Thanks, that's even better! |
Contributor
bors bot
added a commit
to gfx-rs/wgpu-rs
that referenced
this pull request
Jun 15, 2020
373: add test case for empty buffer r=kvark a=rukai Depends on gfx-rs/wgpu#720 Co-authored-by: Rukai <rubickent@gmail.com>
kvark
pushed a commit
to kvark/wgpu
that referenced
this pull request
Jun 3, 2021
373: add test case for empty buffer r=kvark a=rukai Depends on gfx-rs#720 Co-authored-by: Rukai <rubickent@gmail.com>
kvark
added a commit
to kvark/wgpu
that referenced
this pull request
Jun 3, 2021
720: Remove typed-arena dependency r=cwfitzgerald a=kvark Also bumps the wgpu dependency to include gfx-rs#1160 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.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.
Description
My previous PR left a vulkan validation error when creating an empty buffer.
This PR fixes that and also fixes a panic preventing the compute-example from running with no elements.
Testing
Unit test added in wgpu-rs PR. gfx-rs/wgpu-rs#373