6#include <Common/logging.h>
11template<
typename Target,
typename Performer>
13 : m_performer(
std::move(performer))
17 PH_ASSERT(m_performer);
20template<
typename Target,
typename Performer>
21template<CDerived<Performer> DerivedPerformer>
23 : m_performer(derivedQuery.m_performer)
24 , m_numRetries(derivedQuery.m_numRetries)
25 , m_mode(derivedQuery.m_mode)
28template<
typename Target,
typename Performer>
29template<CDerived<Performer> DerivedPerformer>
31 : m_performer(
std::move(derivedQuery.m_performer))
32 , m_numRetries(derivedQuery.m_numRetries)
33 , m_mode(derivedQuery.m_mode)
36template<
typename Target,
typename Performer>
39template<
typename Target,
typename Performer>
42 PH_ASSERT(m_performer);
43 PH_ASSERT(!m_performer->isReady());
46 constexpr uint32 maxRetries = 60 * 60;
48 bool isDone = m_performer->performQuery(target);
58 if(m_numRetries >= maxRetries)
61 "Detected hanging graphics query ({} retries), canceling",
71 m_performer->queryDone();
78template<
typename Target,
typename Performer>
83 m_performer->cancel();
87template<
typename Target,
typename Performer>
90 PH_ASSERT(m_performer);
91 return m_performer->isCanceled();
bool isCanceled() const
Whether the query is canceled.
Definition TQuery.ipp:88
friend class TQuery
Definition TQuery.h:95
void cancel()
Cancel the query. Does nothing if isEmpty() is true.
Definition TQuery.ipp:79
bool run(Target &target)
Definition TQuery.ipp:40
Definition ph_editor.h:10
@ AutoRetry
Definition fwd.h:9
Definition TWeakHandle.h:113