From 084754a5e524ee916d67d82ab9d1343608d70a52 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Wed, 4 Dec 2024 06:50:52 -0500 Subject: [PATCH] v3d: Add support for PIPE_QUERY_TIMESTAMP_DISJOINT When supporting PIPE_QUERY_TIMESTAMP, we use os_time_get_nano so the disjoint timer frequency should be nanoseconds. Reviewed-by: Iago Toral Quiroga Part-of: --- src/gallium/drivers/v3d/v3d_query_pipe.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/v3d/v3d_query_pipe.c b/src/gallium/drivers/v3d/v3d_query_pipe.c index 9a0ce74b3cc..1f8f287661c 100644 --- a/src/gallium/drivers/v3d/v3d_query_pipe.c +++ b/src/gallium/drivers/v3d/v3d_query_pipe.c @@ -116,6 +116,8 @@ v3d_begin_query_pipe(struct v3d_context *v3d, struct v3d_query *query) v3d_submit_timestamp_query(&v3d->base, pquery->bo, pquery->sync[0], 0); break; + case PIPE_QUERY_TIMESTAMP_DISJOINT: + break; default: unreachable("unsupported query type"); } @@ -174,6 +176,8 @@ v3d_end_query_pipe(struct v3d_context *v3d, struct v3d_query *query) v3d_submit_timestamp_query(&v3d->base, pquery->bo, pquery->sync[sync], offset); break; + case PIPE_QUERY_TIMESTAMP_DISJOINT: + break; default: unreachable("unsupported query type"); } @@ -246,6 +250,11 @@ v3d_get_query_result_pipe(struct v3d_context *v3d, struct v3d_query *query, case PIPE_QUERY_TIME_ELAPSED: vresult->u64 = pquery->time_result; break; + case PIPE_QUERY_TIMESTAMP_DISJOINT: + /* os_time_get_nano returns time in nanoseconds */ + vresult->timestamp_disjoint.frequency = UINT64_C(1000000000); + vresult->timestamp_disjoint.disjoint = false; + break; default: unreachable("unsupported query type"); }