Commit Graph

15 Commits

Author SHA1 Message Date
Cloud Han
21b748ac84 add back non-blocking collect 2022-01-25 12:59:28 +08:00
Cloud Han
f8d231bbc9 stop using macro in TRACY_CL_CHECK_ERROR 2022-01-25 12:17:11 +08:00
Cloud Han
d5d0a8676e Update OpenCL support for better error discoverability
Solely rely on `assert` make the error undiscoverable because it only
works if NDEBUG is not defined. Always log with TracyMessage for Release
build.
2022-01-25 12:17:03 +08:00
Bartosz Taudul
b0fc0d5dcc
Check if rpmalloc has to be initialized before each operation.
The C++11 spec states in [basic.stc.thread] thread storage duration:

2. A variable with thread storage duration shall be initialized before its
   first odr-use (3.2) and, if constructed, shall be destroyed on thread exit.

Previously Tracy relied on the TLS data being initialized:
- During thread creation (MSVC).
- Or during first use in a thread, but the initialization was performed for
  the whole TLS block.

It seems that new compilers are more granular with how they perform the
initialization, hence rpmalloc init has to be checked before each allocation,
as it cannot be "folded" into, for example, initialization of the profiler
itself.
2021-05-31 02:31:42 +02:00
Bartosz Taudul
cd4114f264 Add GPU name transfer macros. 2021-01-31 19:15:23 +01:00
John Lynch
f1a52cffa5 Remove host and device timestamp
members and accessors since they
are no longer needed.
2021-01-28 11:46:36 -06:00
John Lynch
9f55a5083c Improve OpenCL time calibration
by moving the host time retrieval
immediately after clWaitForEvents,
similar to the Vulkan approach.
2021-01-25 19:09:23 -06:00
John Lynch
e7b3752cab Fixes for OpenCLCtxScope when !m_active.
Both setEvent and the destructor should
return immediately when !m_active, as the
scope is not properly initialized (m_beginQueryId
in particular.)
2021-01-22 01:16:11 -06:00
John Lynch
9df369ecc4 Move call to clRetainEvent outside of assert within
OpenCLCtx::collect, ensuring it is still called when
NDEBUG is defined.
2021-01-21 12:27:26 -06:00
John Lynch
6c6c6caef0 In OpenCLCtxScope::SetEvent, the necessary clRetainEvent
call was inside an assert, thus never called if NDEBUG
was defined.  This change asserts only on the return value
of the function, as in other parts of the code.
2021-01-20 19:14:31 -06:00
Bartosz Taudul
bd31e3d2d6 Send callstacks before sending events they belong to. 2020-09-29 16:40:19 +02:00
Bartosz Taudul
8243604943 Mark SourceLocationData constexpr, not const. 2020-08-16 02:32:17 +02:00
Jakub Žádník
1ab1050c46 Fix args in OpenCL macros when !TRACY_ENABLE 2020-07-26 15:42:37 +03:00
Bartosz Taudul
1b6bc1b69a Send Vulkan GPU calibration messages. 2020-07-07 21:25:35 +02:00
Thales Sabino
a46f83364e Add OpenCL trace support
- Adds the file TracyOpenCL.hpp which contains the API to annotate OpenCL applications
- It works in a similar fashion to the Vulkan annotations
- Adds an example OpenCL application in examples/OpenCLVectorAdd
- Adds "OpenCL Context" to the UI
- Manual entry for annotating OpenCL zones
2020-06-05 10:15:47 +01:00