Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make buffer_map and buffer_unmap check for device validity, add tests. #4212

Merged
merged 4 commits into from
Oct 7, 2023

Conversation

bradwerth
Copy link
Contributor

@bradwerth bradwerth commented Oct 6, 2023

Checklist

  • Run cargo clippy.
  • Run cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections

Description
This patch makes buffer_unmap check for a valid device, and corrects buffer_map to return the appropriate error for an invalid device. It also adds device validity checks to device_maintain_ids and to the functions that get and set buffer sub data.

Testing
Tests are added in device.rs checking buffer map and unmap for device validity errors.

This patch makes buffer_unmap check for a valid device, and corrects
buffer_map to return the appropriate error for an invalid device.
Tests are added for both operations.

It also adds device validity checks to device_maintain_ids and to the
functions that get and set buffer sub data.
@bradwerth bradwerth requested a review from a team as a code owner October 6, 2023 18:13
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for keeping chipping away on this one :)

@Wumpf Wumpf merged commit e6097ce into gfx-rs:trunk Oct 7, 2023
23 checks passed
@bradwerth bradwerth deleted the bufferMapDeviceValid branch October 10, 2023 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants