FidelityFX-SDK icon indicating copy to clipboard operation
FidelityFX-SDK copied to clipboard

Possible bug with the breadcrumbs system?

Open aofer opened this issue 2 months ago • 0 comments

I think there's a bug with ffx_breadcrumbs.cpp ffxBreadcrumbsBeginMarker:

    if (block->nextMarker >= contextPrivate->contextDescription.maxMarkersPerMemoryBlock)
    {
        // Advance to next block.
        if (++queueBlocks->currentBlock >= queueBlocks->memoryBlocksCount)
        {
            FfxErrorCode error = breadcrumbsAllocBlock(&contextPrivate->contextDescription.backendInterface, allocs,
                queueBlocks, contextPrivate->contextDescription.maxMarkersPerMemoryBlock);
            if (error != FFX_OK)
            {
                FFX_MUTEX_UNLOCK(frame->blockMutex);
                return error;
            }
            block = breadcrumbsGetLastBlock(queueBlocks);
        }
        else
            block->nextMarker = 0;
    }

when allocating a new block when we add a new marker, it looks like nothing here sets the block->nextMarker to 0. The sample has the number of markers per block set to 3 so it's easy to test this by adding another marker or two. shouldn't this call block->nextMarker = 0; after block = breadcrumbsGetLastBlock(queueBlocks);

Also why isn't this system part of SDK 2.0?

Thanks

aofer avatar Sep 23 '25 16:09 aofer