-
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
get_query_pool_results
buggy when called with vk::QueryResultFlags::WITH_AVAILABILITY
#639
Comments
This ended up not requiring a fix but merely a simplified API since the type This is a breaking change that has not been released yet (will be part of Ash 0.38) but to achieve what you want now, make sure let first_query = 0;
let flags = vk::QueryResultFlags::WITH_AVAILABILITY;
let mut data = [(0u32, vk::Bool32); 2];
device.get_query_pool_results(
query_pool,
first_query,
data.len(),
data.as_mut_slice(),
flags,
)?; This pattern remains in Ash 0.38, where only |
…y_pool_results()` Commit c66db26 ("device: Replace `query_count` parameter in `get_query_pool_results` with `data.len()` (#644)") removed this parameter in favour of using `data.len()` to make it more obvious to use an appropriate element type that matches the kind of request (see also #639) so that the stride is filled in correctly, but it was not mentioned in the changelog yet.
…y_pool_results()` (#710) Commit c66db26 ("device: Replace `query_count` parameter in `get_query_pool_results` with `data.len()` (#644)") removed this parameter in favour of using `data.len()` to make it more obvious to use an appropriate element type that matches the kind of request (see also #639) so that the stride is filled in correctly, but it was not mentioned in the changelog yet.
Hello,
I have a piece of code which according to my knowledge does not violate the Vulkan spec.
This code gives a validation error:
I managed to locate a bug in the implementation of this function. It passes
query_count
as a data length parameter forward. This is fine in most cases but here the flagvk::QueryResultFlags::WITH_AVAILABILITY
requires the data to be twice as large asquery_count
.I will open PR with a fix.
The text was updated successfully, but these errors were encountered: