-
Notifications
You must be signed in to change notification settings - Fork 196
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
Conversation
Can you include a concise description of this issue - and why this solution is correct - in the commit message? |
Don't forget to add it to the changelog either. |
Note that we're still passing |
@Ralith I wondered if it makes sense to perhaps change the function signature to deal specifically with |
|
I think we should either add a I lean towards dropping |
Meaning that this PR together with the example proposed in #639 doesn't work as intended, since the use of Of course the caller can/should use a The request to come up with a more specific API is probably moot given that its use may be expanded over time - see
IIRC we discussed and approved/agreed on removing |
OK. So what seems to be the solution is to just simply use a slice of |
@matszczygiel this PR is correct after you reword the title/commit message as suggested above, and at the same time you must use a tuple for Don't forget to add a changelog entry either. EDIT: Meanwhile @Ralith may want to submit a separate PR to remove |
… when called with `WITH_AVAILABILITY` flag
Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com>
@MarijnS95 I have changed the commit message. Also added the changelog entry. |
get_query_pool_results()
bug with vk::QueryResultFlags::WITH_AVAILABILITY
get_query_pool_results()
when called with WITH_AVAILABILITY
flag
get_query_pool_results()
when called with WITH_AVAILABILITY
flagget_query_pool_results()
when called with WITH_AVAILABILITY
flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ralith Recapping what we wrote above... What do we get when we do not merge this change?
I think not merging this change forces the user to use the proper (u32, vk::Bool32)
type for T
, and automatically get the right stride in what is currently mem::size_of::<T>() as _
? As such there's not really anything to fix?
Then separately we can remove query_count
and utilize slice length.
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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.
Fine by me. |
Will close this then. I get the expected results on the current release using |
Fixes #639