mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
zink: don't use PARTIAL bit for query results with time queries
this is illegal Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811>
This commit is contained in:
parent
70b1251587
commit
3b5f345e9b
1 changed files with 3 additions and 2 deletions
|
|
@ -925,15 +925,16 @@ zink_get_query_result_resource(struct pipe_context *pctx,
|
|||
* buffer
|
||||
*/
|
||||
|
||||
VkQueryResultFlags flag = is_time_query(query) ? 0 : VK_QUERY_RESULT_PARTIAL_BIT;
|
||||
if (fences) {
|
||||
struct pipe_resource *staging = pipe_buffer_create(pctx->screen, 0, PIPE_USAGE_STAGING, result_size * 2);
|
||||
copy_results_to_buffer(ctx, query, zink_resource(staging), 0, 1, size_flags | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | VK_QUERY_RESULT_PARTIAL_BIT);
|
||||
copy_results_to_buffer(ctx, query, zink_resource(staging), 0, 1, size_flags | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | flag);
|
||||
zink_copy_buffer(ctx, &ctx->batch, res, zink_resource(staging), offset, result_size, result_size);
|
||||
pipe_resource_reference(&staging, NULL);
|
||||
} else {
|
||||
uint64_t u64[2] = {0};
|
||||
if (vkGetQueryPoolResults(screen->dev, query->query_pool, query_id, 1, 2 * result_size, u64,
|
||||
0, size_flags | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | VK_QUERY_RESULT_PARTIAL_BIT) != VK_SUCCESS) {
|
||||
0, size_flags | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | flag) != VK_SUCCESS) {
|
||||
debug_printf("zink: getting query result failed\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue