Prevent an invalid texture from being registered in device_create_texture#936
Merged
bors[bot] merged 1 commit intogfx-rs:masterfrom Sep 22, 2020
Merged
Prevent an invalid texture from being registered in device_create_texture#936bors[bot] merged 1 commit intogfx-rs:masterfrom
bors[bot] merged 1 commit intogfx-rs:masterfrom
Conversation
Contributor
Author
|
r?@kvark |
Contributor
bors bot
added a commit
that referenced
this pull request
Oct 6, 2020
958: [0.6] fix device feature requests r=cwfitzgerald a=kvark **Connections** Looks like we were requesting a little bit too much? Also includes #936 and #957 **Description** Fix the features requested. **Testing** Confirmed by the virtue of `println!` :) Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com> Co-authored-by: Kunal Mohan <kunalmohan99@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.
Connections
Link to the issues addressed by this PR, or dependent PRs in other repositories
Description
Describe what problem this is solving, and how it's solved.
Since we checked the usage of a
Featureindevice_create_texture()after registering the newId, there could be a case where it returns an error after registering the texture as a valid one, which further panics when the client tries to register it as anerror_id.To solve this, the check for the usage of a
Featureis now done before registering the newId.Testing
Explain how this change is tested.
Tested with wgpu-rs examples and CTS in Servo.