lavapipe: clamp 32bit query results to low 32 bits rather than MIN

this should be more consistent with hardware driver behavior

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28671>
(cherry picked from commit ede4e4aae3)
This commit is contained in:
Mike Blumenkrantz 2024-04-10 11:44:03 -04:00 committed by Eric Engestrom
parent 62cba397d1
commit 431c00e39d
2 changed files with 2 additions and 2 deletions

View file

@ -3674,7 +3674,7 @@
"description": "lavapipe: clamp 32bit query results to low 32 bits rather than MIN",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -168,7 +168,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_GetQueryPoolResults(
*dest32++ = (uint32_t)
MIN2(result.so_statistics.primitives_storage_needed, UINT32_MAX);
} else {
*dest32++ = (uint32_t) MIN2(result.u64, UINT32_MAX);
*dest32++ = (uint32_t) (result.u64 & UINT32_MAX);
}
} else {
if (pool->type == VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT) {