radv: respect VK_QUERY_RESULT_WAIT_BIT in GetQueryPoolResults

The flag was ignored for VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT and
VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT.

Cc: mesa-stable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22781>
(cherry picked from commit 34cc37910f)
This commit is contained in:
Yiwei Zhang 2023-05-01 16:58:11 +00:00 committed by Eric Engestrom
parent 8bddabbf53
commit 2be3b5f78d
2 changed files with 15 additions and 11 deletions

View file

@ -481,7 +481,7 @@
"description": "radv: respect VK_QUERY_RESULT_WAIT_BIT in GetQueryPoolResults",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -1384,11 +1384,13 @@ radv_GetQueryPoolResults(VkDevice _device, VkQueryPool queryPool, uint32_t first
* u64 PrimitiveStorageNeeded;
* }
*/
available = 1;
for (int j = 0; j < 4; j++) {
if (!(p_atomic_read(src64 + j) & 0x8000000000000000UL))
available = 0;
}
do {
available = 1;
for (int j = 0; j < 4; j++) {
if (!(p_atomic_read(src64 + j) & 0x8000000000000000UL))
available = 0;
}
} while (!available && (flags & VK_QUERY_RESULT_WAIT_BIT));
if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT))
result = VK_NOT_READY;
@ -1423,11 +1425,13 @@ radv_GetQueryPoolResults(VkDevice _device, VkQueryPool queryPool, uint32_t first
* u64 PrimitiveStorageNeeded;
* }
*/
available = 1;
if (!(p_atomic_read(src64 + 0) & 0x8000000000000000UL) ||
!(p_atomic_read(src64 + 2) & 0x8000000000000000UL)) {
available = 0;
}
do {
available = 1;
if (!(p_atomic_read(src64 + 0) & 0x8000000000000000UL) ||
!(p_atomic_read(src64 + 2) & 0x8000000000000000UL)) {
available = 0;
}
} while (!available && (flags & VK_QUERY_RESULT_WAIT_BIT));
if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT))
result = VK_NOT_READY;