tracy icon indicating copy to clipboard operation
tracy copied to clipboard

Debug assert on `D3D12ZoneScope` with new `TRACY_CALLSTACK` style

Open slomp opened this issue 4 months ago • 2 comments

D3D12ZoneScope is calling tracy::Callstack() with depth = 0, and leads to an assert (in Debug builds): https://github.com/wolfpld/tracy/blob/0721561c547a6deb84d49e16dba0ad620bddbe74/public/tracy/TracyD3D12.hpp#L393 https://github.com/wolfpld/tracy/blob/0721561c547a6deb84d49e16dba0ad620bddbe74/public/tracy/TracyD3D12.hpp#L415

We need a check similar to the one in VkCtxScope: https://github.com/wolfpld/tracy/blob/0721561c547a6deb84d49e16dba0ad620bddbe74/public/tracy/TracyVulkan.hpp#L554

This is appears to be something that slipped through the cracks when TRACY_CALLSTACK logic changed not long ago: https://github.com/wolfpld/tracy/blame/0721561c547a6deb84d49e16dba0ad620bddbe74/public/tracy/Tracy.hpp#L137-L139

slomp avatar Aug 08 '25 21:08 slomp

(I'll get around to fixing it, just registering it here until I can switch context and work on a D3D12 app to repro/fix)

slomp avatar Aug 08 '25 21:08 slomp

Seems to happen also in debug builds in "LuaZoneBeginNS": TRACY_CALLSTACK is 0, resulting in a depth of 0, which is later asserted to be non-zero inside "tracy::Callstack"

FilippoLeon avatar Aug 31 '25 20:08 FilippoLeon