mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 06:40:22 +01:00
rusticl/event: check the queue timed to detect enabled profiling in call
Gets rid of an unwrap and the dependency on the queue. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
This commit is contained in:
parent
815373fe62
commit
8291331c43
1 changed files with 2 additions and 3 deletions
|
|
@ -222,12 +222,11 @@ impl Event {
|
|||
pub fn call(&self, ctx: &QueueContext) -> cl_int {
|
||||
let mut lock = self.state();
|
||||
let mut status = lock.status;
|
||||
let queue = self.queue.as_ref().unwrap();
|
||||
let profiling_enabled = queue.is_profiling_enabled();
|
||||
let profiling_enabled = lock.time_queued != 0;
|
||||
if status == CL_QUEUED as cl_int {
|
||||
if profiling_enabled {
|
||||
// We already have the lock so can't call set_time on the event
|
||||
lock.time_submit = queue.device.screen().get_timestamp();
|
||||
lock.time_submit = ctx.dev.screen().get_timestamp();
|
||||
}
|
||||
let mut query_start = None;
|
||||
let mut query_end = None;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue