summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorDavid Heidelberger <[email protected]>2014-06-01 05:02:44 +0200
committerMarek Olšák <[email protected]>2014-06-10 13:20:13 +0200
commitb0fd54900c89e2a994209d5a0007230e35dec3c6 (patch)
tree31d6fe6811bb1b42dd6eb462278c5e162de0b2db /src/gallium/drivers/radeon
parentbd526ec9e1becae467fabbbe45076bb20cd12601 (diff)
r600g,radeonsi: implement PIPE_QUERY_TIMESTAMP_DISJOINT
v2 Marek: set the query result correctly Signed-off-by: David Heidelberger <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_query.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
index a356aad5b32..c4394416003 100644
--- a/src/gallium/drivers/radeon/r600_query.c
+++ b/src/gallium/drivers/radeon/r600_query.c
@@ -116,6 +116,7 @@ static struct r600_resource *r600_new_query_buffer(struct r600_common_context *c
case PIPE_QUERY_GPU_FINISHED:
case PIPE_QUERY_TIME_ELAPSED:
case PIPE_QUERY_TIMESTAMP:
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
break;
case PIPE_QUERY_PRIMITIVES_EMITTED:
case PIPE_QUERY_PRIMITIVES_GENERATED:
@@ -209,6 +210,8 @@ static void r600_emit_query_begin(struct r600_common_context *ctx, struct r600_q
radeon_emit(cs, va);
radeon_emit(cs, (va >> 32UL) & 0xFF);
break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ break;
default:
assert(0);
}
@@ -276,6 +279,7 @@ static void r600_emit_query_end(struct r600_common_context *ctx, struct r600_que
radeon_emit(cs, (va >> 32UL) & 0xFF);
break;
case PIPE_QUERY_GPU_FINISHED:
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
break;
default:
assert(0);
@@ -371,6 +375,8 @@ static struct pipe_query *r600_create_query(struct pipe_context *ctx, unsigned q
query->result_size = 8;
query->num_cs_dw = 8;
break;
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ break;
case PIPE_QUERY_PRIMITIVES_EMITTED:
case PIPE_QUERY_PRIMITIVES_GENERATED:
case PIPE_QUERY_SO_STATISTICS:
@@ -606,6 +612,12 @@ static boolean r600_get_query_buffer_result(struct r600_common_context *ctx,
(uint64_t)current_result[1] << 32;
break;
}
+ case PIPE_QUERY_TIMESTAMP_DISJOINT:
+ /* Convert from cycles per millisecond to cycles per second (Hz). */
+ result->timestamp_disjoint.frequency =
+ (uint64_t)ctx->screen->info.r600_clock_crystal_freq * 1000;
+ result->timestamp_disjoint.disjoint = FALSE;
+ break;
case PIPE_QUERY_PRIMITIVES_EMITTED:
/* SAMPLE_STREAMOUTSTATS stores this structure:
* {