[Mesa-dev] [PATCH 2/2] r300g: Fix queries on big endian hosts.
Corbin Simpson
mostawesomedude at gmail.com
Wed Nov 2 10:36:15 PDT 2011
2011/11/2 Michel Dänzer <michel at daenzer.net>:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
> src/gallium/drivers/r300/r300_query.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c
> index 9e784b5..b92410f 100644
> --- a/src/gallium/drivers/r300/r300_query.c
> +++ b/src/gallium/drivers/r300/r300_query.c
> @@ -132,7 +132,7 @@ 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;
> + temp += util_le32_to_cpu(*map);
> map++;
> }
>
> --
> 1.7.7.1
Nice catch! Only one thing: comment might help future maintainers
understand this. Feel free to push as-is.
I can't test this, as I have no big-endian hardware, but it looks very correct.
Reviewed-by: Corbin Simpson <MostAwesomeDude at gmail.com>
--
When the facts change, I change my mind. What do you do, sir? ~ Keynes
Corbin Simpson
<MostAwesomeDude at gmail.com>
More information about the mesa-dev
mailing list