Commit Graph

56 Commits

Author SHA1 Message Date
Bartosz Taudul
fd84b2e026
Vulkan headers must be now manually included. 2021-08-19 00:00:20 +02: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
xavier
1c097140cd Support VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT
to enable profiling vulkan on linux.
2021-05-02 18:03:25 +02:00
Bartosz Taudul
cd4114f264 Add GPU name transfer macros. 2021-01-31 19:15:23 +01:00
Bartosz Taudul
e5d54011d7 Add transient Vulkan zones. 2021-01-15 22:11:34 +01:00
Bartosz Taudul
483a621a0a Vulkan will now properly send serial callstacks. 2021-01-15 22:11:34 +01: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
Bartosz Taudul
1b6bc1b69a Send Vulkan GPU calibration messages. 2020-07-07 21:25:35 +02:00
Bartosz Taudul
c91c6be763 Vulkan calibration function. 2020-07-07 21:25:35 +02:00
Bartosz Taudul
f6d320ebdc Detect time domains available for calibration. 2020-07-07 21:25:35 +02:00
Bartosz Taudul
dc91affdc5 Allow creating calibrated VK context. 2020-07-07 21:25:35 +02:00
Ben Vanik
5029c12de1
Capture Vulkan timestamps at BOTTOM_OF_PIPE instead of TOP_OF_PIPE
This is so that the GPU will wait for all previous commands to finish (hit bottom of pipe) before taking the enter timestamp and then whatever was recorded within the scope to finish (hit bottom of pipe) before taking the leave timestamp. TOP_OF_PIPE (particularly at the scope exit) was just recording the time of when the recorded work within the VkCtxScope was starting (hit top of the pipe) and not waiting for it to complete.
2020-06-05 15:02:04 -07:00
Bartosz Taudul
54a029356d Explicitly store GPU context type. 2020-05-27 18:16:53 +02:00
Bartosz Taudul
fad7e72fd4 Harden against uninitialized rpmalloc.
Initialize rpmalloc either by explicitly calling InitRPMallocThread(),
or by forcing initialization of thread local variables block.
2020-05-19 13:51:11 +02:00
Bartosz Taudul
35a2baf5ef GPU zones may also be inactive. 2020-01-25 17:44:46 +01:00
Bartosz Taudul
ba61a9ed84 Transfer time deltas, not absolute times.
This change significantly reduces network bandwidth requirements.

Implemented for:
- CPU zones,
- GPU zones,
- locks,
- plots,
- memory events.
2019-10-24 00:06:41 +02:00
Bartosz Taudul
0f68e1e981 Send thread id in GPU zone end message.
We don't care about OpenGL zone thread ids, so the identifier is zeroed.
2019-09-23 16:06:14 +02:00
Bartosz Taudul
daf64c703a Serialize Vulkan GPU profiling messages.
Since Vulkan can be multi-threaded, the guarantee of GPU time data
arriving after CPU time data can't be held with asynchronous messages.
Use serial queue instead.
2019-09-23 15:38:16 +02:00
Bartosz Taudul
a6a3f45810 Fill in thread id during dequeue, not during enqueue. 2019-07-30 01:15:14 +02:00
Bartosz Taudul
89928fde7b Queue must be always able to alloc. 2019-07-29 22:13:16 +02:00
Bartosz Taudul
55c9f41060 Vulkan queue doesn't need to be stored. 2019-07-25 18:54:32 +02:00
Bartosz Taudul
0aa0b4ac8a Try lower query counts in out-of-memory situations. 2019-06-26 16:43:56 +02:00
Bartosz Taudul
659631fc06 Make vulkan query count variable. 2019-06-26 16:42:51 +02:00
Bartosz Taudul
06a41708a7 Move TLS accesses close together. 2019-06-24 19:38:44 +02:00
Bartosz Taudul
3f914834b7 Hide rest of statics. 2019-02-19 19:33:37 +01:00
Bartosz Taudul
2421e05c27 Prevent direct access to s_profiler. 2019-02-19 18:38:08 +01:00
Bartosz Taudul
d865d1cc87 Disallow direct access to s_token. 2019-02-19 18:27:00 +01:00
Bartosz Taudul
c9c4d2845a Provide empty {Gpu,Vk}CtxScope classes if tracy is disabled.
This may be needed if some wrapping is done, abstracting the OpenGL and
Vulkan tracing.
2019-02-18 14:45:09 +01:00
Bartosz Taudul
a95e8a5424 Hide internals behind TracyVkCtx typedef. 2019-01-14 12:40:54 +01:00
Bartosz Taudul
070888f80d Make it possible to have multiple vulkan contexts.
API change!
2019-01-10 17:11:17 +01:00
Bartosz Taudul
ae288c6a6a Move vulkan macros at the end of TracyVulkan.hpp. 2019-01-10 16:41:04 +01:00
Bartosz Taudul
537cee911c Allow forcing call stack capture. 2018-12-13 14:43:37 +01:00
Bartosz Taudul
128577d7bf Remove parenthesis from TracyVkDestroy macro. 2018-08-28 16:45:05 +02:00
Bartosz Taudul
31c2ddb8ac Rename client's SourceLocation to SourceLocationData. 2018-07-28 00:34:04 +02:00
Bartosz Taudul
dbdc530f1c Named GPU zones. 2018-07-26 20:15:39 +02:00
Bartosz Taudul
3737e122cf Of course, this can't work without stupid fuckery. 2018-07-26 19:59:55 +02:00
Bartosz Taudul
1111980f1f Make source location names unique. 2018-07-26 19:22:19 +02:00
Arvid Gerstmann
6b87aecdce Wrap concurrentqueue in tracy namespace 2018-07-13 20:01:27 +02:00
Bartosz Taudul
0cbeea97a2 Support on-demand Vulkan tracing. 2018-07-11 17:03:00 +02:00
Bartosz Taudul
1f7246f6b9 Defer OpenGL/Vulkan context announce. 2018-07-11 15:00:30 +02:00
Bartosz Taudul
e5b133073c Disable all tracing if TRACY_ON_DEMAND is defined. 2018-07-10 20:49:51 +02:00
Bartosz Taudul
62267399bc Send query ids of GPU times. 2018-06-22 16:19:53 +02:00
Bartosz Taudul
69c461cda3 Results MUST be available here. 2018-06-22 16:09:35 +02:00
Bartosz Taudul
51c5f47ae2 Transfer query ids of GPU events. 2018-06-22 15:57:54 +02:00
Bartosz Taudul
55ddb64352 GPU context counter is now 8 bit. 2018-06-22 15:10:23 +02:00
Bartosz Taudul
b213e5f415 Vulkan zone callstack collection. 2018-06-22 01:47:08 +02:00
Bartosz Taudul
a1424c4112 Vulkan tracing is not thread safe. 2018-06-22 01:41:28 +02:00
Bartosz Taudul
7a23f677dd Vulkan and OpenGL must share idx pool. 2018-06-18 01:10:43 +02:00
Bartosz Taudul
53e3eee9ee Delay query until results are available.
This will query for the new values with a bit of lag, but it ignores
issues with broken drivers...
2018-06-17 20:56:46 +02:00