r300g: Fix queries on big endian hosts.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
This commit is contained in:
Michel Dänzer 2011-11-02 16:39:17 +01:00 committed by Marek Olšák
parent f60e81ecb2
commit b95767a57a

View file

@ -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++;
}