Improve buffer and texture overrun error messages#885
Merged
bors[bot] merged 1 commit intogfx-rs:masterfrom Aug 19, 2020
Merged
Improve buffer and texture overrun error messages#885bors[bot] merged 1 commit intogfx-rs:masterfrom
bors[bot] merged 1 commit intogfx-rs:masterfrom
Conversation
cwfitzgerald
commented
Aug 19, 2020
| } | ||
|
|
||
| #[derive(Clone, Debug)] | ||
| pub enum TextureErrorDimension { |
kvark
reviewed
Aug 19, 2020
Member
kvark
left a comment
There was a problem hiding this comment.
Very nice, thank you!
Just a few notes here
wgpu-core/src/command/transfer.rs
Outdated
| Destination, | ||
| } | ||
|
|
||
| impl fmt::Display for ResourceSide { |
Member
Author
There was a problem hiding this comment.
Because then it would be the wrong capitalization for the error message
Member
There was a problem hiding this comment.
sure, but it's an error message, so it's fine. I.e. you can put it into quotes to separate from the rest of the message
but it would save code, and that's a good thing to have
wgpu-core/src/command/transfer.rs
Outdated
| Z, | ||
| } | ||
|
|
||
| impl fmt::Display for TextureErrorDimension { |
bors bot
added a commit
that referenced
this pull request
Aug 19, 2020
886: [0.6] Backport buffer and texture overrun error messages r=kvark a=cwfitzgerald **Connections** #885 but neutered to be a non-breaking change. **Description** The original error message talked only about the destination buffer, which is very confusing as the cause of the overrun could be the source buffer. Not worth a release on its own, but next time there's a release, we can get this fixed. **Testing** Strings only. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
f22b62c to
608eff1
Compare
608eff1 to
f9265bc
Compare
Contributor
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
Closes #884.
Description
The previous errors about buffer and texture overruns didn't tell the user any information about which buffer, how long wgpu thought the copy was, or how long it thought the buffer was. This makes the error message much better.
Unfortunately a braking change, so can't backport :(
Testing
Tested on #884's issue.