lavapipe: set availability bit for accel struct host queries

Fixes: 897ccbd180 ("lavapipe: Implement VK_KHR_acceleration_structure")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33951>
(cherry picked from commit bc190cab2d)
This commit is contained in:
Yiwei Zhang 2025-03-07 13:44:32 -08:00 committed by Eric Engestrom
parent ff107b6123
commit 26b33e2e4d
2 changed files with 5 additions and 1 deletions

View file

@ -3184,7 +3184,7 @@
"description": "lavapipe: set availability bit for accel struct host queries",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "897ccbd180ae2e0e6a60173e0511bc25a4f5a118",
"notes": null

View file

@ -139,10 +139,14 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_GetQueryPoolResults(
uint64_t *dst = (uint64_t *)dest;
uint64_t *src = (uint64_t *)pool->data;
*dst = src[i];
if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT)
*(dst + 1) = 1;
} else {
uint32_t *dst = (uint32_t *)dest;
uint64_t *src = (uint64_t *)pool->data;
*dst = src[i];
if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT)
*(dst + 1) = 1;
}
continue;
}