|
16 | 16 | #define TracyVkZoneC(c,x,y,z) |
17 | 17 | #define TracyVkZoneTransient(c,x,y,z,w) |
18 | 18 | #define TracyVkCollect(c,x) |
| 19 | +#define TracyVkCollectHost(c) |
19 | 20 |
|
20 | 21 | #define TracyVkNamedZoneS(c,x,y,z,w,a) |
21 | 22 | #define TracyVkNamedZoneCS(c,x,y,z,w,v,a) |
@@ -256,7 +257,9 @@ class VkCtx |
256 | 257 | #ifdef TRACY_ON_DEMAND |
257 | 258 | if( !GetProfiler().IsConnected() ) |
258 | 259 | { |
259 | | - VK_FUNCTION_WRAPPER( vkCmdResetQueryPool( cmdbuf, m_query, 0, m_queryCount ) ); |
| 260 | + cmdbuf ? |
| 261 | + VK_FUNCTION_WRAPPER( vkCmdResetQueryPool( cmdbuf, m_query, 0, m_queryCount ) ) : |
| 262 | + VK_FUNCTION_WRAPPER( vkResetQueryPool( m_device, m_query, 0, m_queryCount ) ); |
260 | 263 | m_tail = head; |
261 | 264 | m_oldCnt = 0; |
262 | 265 | int64_t tgpu; |
@@ -325,7 +328,9 @@ class VkCtx |
325 | 328 | } |
326 | 329 | } |
327 | 330 |
|
328 | | - VK_FUNCTION_WRAPPER( vkCmdResetQueryPool( cmdbuf, m_query, wrappedTail, cnt ) ); |
| 331 | + cmdbuf ? |
| 332 | + VK_FUNCTION_WRAPPER( vkCmdResetQueryPool( cmdbuf, m_query, wrappedTail, cnt ) ) : |
| 333 | + VK_FUNCTION_WRAPPER( vkResetQueryPool( m_device, m_query, wrappedTail, cnt ) ); |
329 | 334 |
|
330 | 335 | m_tail += cnt; |
331 | 336 | } |
@@ -721,6 +726,7 @@ using TracyVkCtx = tracy::VkCtx*; |
721 | 726 | # define TracyVkZoneTransient( ctx, varname, cmdbuf, name, active ) tracy::VkCtxScope varname( ctx, TracyLine, TracyFile, strlen( TracyFile ), TracyFunction, strlen( TracyFunction ), name, strlen( name ), cmdbuf, active ); |
722 | 727 | #endif |
723 | 728 | #define TracyVkCollect( ctx, cmdbuf ) ctx->Collect( cmdbuf ); |
| 729 | +#define TracyVkCollectHost( ctx ) ctx->Collect( VK_NULL_HANDLE ); |
724 | 730 |
|
725 | 731 | #ifdef TRACY_HAS_CALLSTACK |
726 | 732 | # define TracyVkNamedZoneS( ctx, varname, cmdbuf, name, depth, active ) static constexpr tracy::SourceLocationData TracyConcat(__tracy_gpu_source_location,TracyLine) { name, TracyFunction, TracyFile, (uint32_t)TracyLine, 0 }; tracy::VkCtxScope varname( ctx, &TracyConcat(__tracy_gpu_source_location,TracyLine), cmdbuf, depth, active ); |
|
0 commit comments