diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index 782f041e926..6782a09b669 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -138,7 +138,8 @@ static boolean r300_get_query_result(struct pipe_context* pipe, /* Sum up the results. */ temp = 0; for (i = 0; i < q->num_results; i++) { - temp += *map; + /* Convert little endian values written by GPU to CPU byte order */ + temp += util_le32_to_cpu(*map); map++; }