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

Fix invalid data length calculated in get_query_pool_results() when called with WITH_AVAILABILITY flag #640

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Removed experimental AMD extensions (#607)

### Fixed

- Fix invalid data length calculated inside of `get_query_pool_results` when called with `WITH_AVAILABILITY` flag (#640)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Fix invalid data length calculated inside of `get_query_pool_results` when called with `WITH_AVAILABILITY` flag (#640)
- Data size in `get_query_pool_results()` is now based on total slice size rather than type size times query count to support `WITH_AVAILABILITY` when `T` is "wrong" (#640)

But as I wrote, I don't think this is very sensible in the end.


## [0.37.0] - 2022-03-23

### Changed
Expand Down
2 changes: 1 addition & 1 deletion ash/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,7 @@ impl Device {
data_length <= data.len(),
"query_count was higher than the length of the slice"
);
let data_size = mem::size_of::<T>() * data_length;
let data_size = mem::size_of_val(data);
(self.device_fn_1_0.get_query_pool_results)(
self.handle(),
query_pool,
Expand Down