mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +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>
This commit is contained in:
parent
6067426549
commit
129bebd519
1 changed files with 2 additions and 2 deletions
|
|
@ -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