Skip to content

Commit f5b3711

Browse files
committed
Document a classic mistake with Tracy's C GPU Zones API and TRACY_ON_DEMAND
1 parent 0a5aa50 commit f5b3711

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎manual/tracy.tex‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,6 +2240,15 @@ \subsubsection{GPU zones}
22402240

22412241
To see how you should use this API, you should look at the reference implementation contained in API-specific C++ headers provided by Tracy. For example, to see how to write your instrumentation of OpenGL, you should closely follow the contents of the \texttt{TracyOpenGL.hpp} implementation.
22422242

2243+
2244+
\begin{bclogo}[
2245+
noborder=true,
2246+
couleur=black!5,
2247+
logo=\bcbombe
2248+
]{Important}
2249+
A common mistake is to skip the zone "\texttt{isActive}" check. When using \texttt{TRACY\_ON\_DEMAND}, you need to read the value of \texttt{TracyCIsConnected} once, and check the same value for both \newline \texttt{\_\_\_tracy\_emit\_gpu\_zone\_begin\_alloc} and \texttt{\_\_\_tracy\_emit\_gpu\_zone\_end}. Tracy may otherwise receive a zone end without a zone begin.
2250+
\end{bclogo}
2251+
22432252
\subsubsection{Fibers}
22442253

22452254
Fibers are available in the C API through the \texttt{TracyCFiberEnter} and \texttt{TracyCFiberLeave} macros. To use them, you should observe the requirements listed in section~\ref{fibers}.

0 commit comments

Comments
 (0)