gallium/radeon: cleanup getting PIPE_QUERY_TIMESTAMP result
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 15 Sep 2016 10:18:24 +0000 (12:18 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 29 Sep 2016 09:14:45 +0000 (11:14 +0200)
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_query.c

index b9041eb2c9551a251cc4a2cbd0ed2f106e7adcb2..c1c359990bd00acd973f87dee8968e499ef1da3d 100644 (file)
@@ -953,12 +953,8 @@ static void r600_query_hw_add_result(struct r600_common_context *ctx,
                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:
                 * {