Module: Mesa Branch: 7.11 Commit: b95767a57ad499a2ed7431e8b0b52966c6dc0a45 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b95767a57ad499a2ed7431e8b0b52966c6dc0a45
Author: Michel Dänzer <[email protected]> Date: Wed Nov 2 16:39:17 2011 +0100 r300g: Fix queries on big endian hosts. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Corbin Simpson <[email protected]> --- 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 782f041..6782a09 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++; } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
