mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 08:50:13 +01:00
gallium/u_queue: add util_queue_get_thread_time_nano
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
6c61a8bfc6
commit
626e4ef18f
2 changed files with 12 additions and 0 deletions
|
|
@ -242,3 +242,13 @@ util_queue_add_job(struct util_queue *queue,
|
|||
pipe_condvar_signal(queue->has_queued_cond);
|
||||
pipe_mutex_unlock(queue->lock);
|
||||
}
|
||||
|
||||
int64_t
|
||||
util_queue_get_thread_time_nano(struct util_queue *queue, unsigned thread_index)
|
||||
{
|
||||
/* Allow some flexibility by not raising an error. */
|
||||
if (thread_index >= queue->num_threads)
|
||||
return 0;
|
||||
|
||||
return pipe_thread_get_time_nano(queue->threads[thread_index]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,6 +84,8 @@ void util_queue_add_job(struct util_queue *queue,
|
|||
util_queue_execute_func cleanup);
|
||||
|
||||
void util_queue_job_wait(struct util_queue_fence *fence);
|
||||
int64_t util_queue_get_thread_time_nano(struct util_queue *queue,
|
||||
unsigned thread_index);
|
||||
|
||||
/* util_queue needs to be cleared to zeroes for this to work */
|
||||
static inline bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue