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

QueryPool::get_query_pool_results calculates query size incorrectly #148

Open
Silverlan opened this issue Apr 16, 2019 · 0 comments
Open

Comments

@Silverlan
Copy link
Contributor

Silverlan commented Apr 16, 2019

The query size is calculated in QueryPool::get_query_pool_results_internal like so:

if (in_should_return_uint64)
{
    flags             |= VK_QUERY_RESULT_64_BIT;
    result_query_size  = sizeof(uint64_t);
}
else
{
    result_query_size = sizeof(uint32_t);
}

While this is fine for occlusion and timestamp queries, this is incorrect for pipeline statistics queries if more than one statistics-flag was set for the query pool. According to the specification, the size of the data for a statistics query is calculated like this:

Pipeline statistics queries write one integer value for each bit that is enabled in the pipelineStatistics when the pool is created, and the statistics values are written in bit order starting from the least significant bit.

(+ one integer for the availability if the flag was set.)

I've created a pull request for a fix here: #149

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

No branches or pull requests

1 participant