summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2011-11-02 16:39:17 +0100
committerMichel Dänzer <[email protected]>2011-11-02 18:59:30 +0100
commit0be1f797709528546f17f82e67b86181fa0c61e1 (patch)
tree00a44409887af2766055685b89cfe5328e6552cd /src/gallium
parent4a3be16fd2d126a84ff2f087f2a2900afa19d235 (diff)
r300g: Fix queries on big endian hosts.
Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Corbin Simpson <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_query.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c
index 9e784b5fecf..55ec66deb72 100644
--- a/src/gallium/drivers/r300/r300_query.c
+++ b/src/gallium/drivers/r300/r300_query.c
@@ -132,7 +132,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++;
}