[Mesa-dev] [PATCH 6/9] gallium/radeon: cleanup getting PIPE_QUERY_TIMESTAMP result
Edward O'Callaghan
funfunctor at folklore1984.net
Sat Sep 17 05:13:37 UTC 2016
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>
On 09/16/2016 11:57 PM, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> ---
> src/gallium/drivers/radeon/r600_query.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
> index b9041eb..c1c3599 100644
> --- a/src/gallium/drivers/radeon/r600_query.c
> +++ b/src/gallium/drivers/radeon/r600_query.c
> @@ -946,26 +946,22 @@ static void r600_query_hw_add_result(struct r600_common_context *ctx,
> unsigned results_base = i * 16;
> result->b = result->b ||
> r600_query_read_result(buffer + results_base, 0, 2, true) != 0;
> }
> break;
> }
> case PIPE_QUERY_TIME_ELAPSED:
> result->u64 += r600_query_read_result(buffer, 0, 2, false);
> break;
> case PIPE_QUERY_TIMESTAMP:
> - {
> - uint32_t *current_result = (uint32_t*)buffer;
> - result->u64 = (uint64_t)current_result[0] |
> - (uint64_t)current_result[1] << 32;
> + result->u64 = *(uint64_t*)buffer;
> break;
> - }
> case PIPE_QUERY_PRIMITIVES_EMITTED:
> /* SAMPLE_STREAMOUTSTATS stores this structure:
> * {
> * u64 NumPrimitivesWritten;
> * u64 PrimitiveStorageNeeded;
> * }
> * We only need NumPrimitivesWritten here. */
> result->u64 += r600_query_read_result(buffer, 2, 6, true);
> break;
> case PIPE_QUERY_PRIMITIVES_GENERATED:
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160917/88b7e7e9/attachment.sig>
More information about the mesa-dev
mailing list