Skip to content

Possible bug with the breadcrumbs system? #170

@aofer

Description

@aofer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions