diff options
author | Michel Dänzer <[email protected]> | 2011-11-02 16:39:17 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2011-11-02 18:59:30 +0100 |
commit | 0be1f797709528546f17f82e67b86181fa0c61e1 (patch) | |
tree | 00a44409887af2766055685b89cfe5328e6552cd /src/gallium/drivers/r300/r300_query.c | |
parent | 4a3be16fd2d126a84ff2f087f2a2900afa19d235 (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/drivers/r300/r300_query.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_query.c | 3 |
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++; } |