Skip to content
Snippets Groups Projects
Commit 129bebd5 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz :lifter: Committed by Marge Bot
Browse files

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: default avatarRoland Scheidegger <sroland@vmware.com>
Part-of: <!28671>
parent 60674265
No related branches found
No related tags found
No related merge requests found
......@@ -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: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment