mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
llvmpipe: 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 129bebd519)
This commit is contained in:
parent
052f4952f2
commit
62cba397d1
2 changed files with 3 additions and 3 deletions
|
|
@ -3684,7 +3684,7 @@
|
|||
"description": "llvmpipe: 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
|
||||
|
|
|
|||
|
|
@ -372,12 +372,12 @@ llvmpipe_get_query_result_resource(struct pipe_context *pipe,
|
|||
switch (result_type) {
|
||||
case PIPE_QUERY_TYPE_I32: {
|
||||
int32_t *iptr = (int32_t *)dst;
|
||||
*iptr = (int32_t) MIN2(value, INT32_MAX);
|
||||
*iptr = (int32_t) (value & INT32_MAX);
|
||||
break;
|
||||
}
|
||||
case PIPE_QUERY_TYPE_U32: {
|
||||
uint32_t *uptr = (uint32_t *)dst;
|
||||
*uptr = (uint32_t) MIN2(value, UINT32_MAX);
|
||||
*uptr = (uint32_t) (value & UINT32_MAX);
|
||||
break;
|
||||
}
|
||||
case PIPE_QUERY_TYPE_I64: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue