mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-08 08:40:55 +00:00
Remove assumptions that captures are always frames
* Previously we had "Frame X" and "Start of Frame" hardcoded in the event browser, and the end of frame was in many cases assumed to be a present call. However with the in-application API this is not necessarily true. * Presents are now serialised separately in all APIs and displayed wherever they happen in the frame, and if there is no present at the end of the frame an "End of Capture" marker is inserted. Similarly API-defined captures are not given a potentially misleading frame number.
This commit is contained in:
@@ -238,11 +238,15 @@ EventBrowser::~EventBrowser()
|
||||
|
||||
void EventBrowser::OnCaptureLoaded()
|
||||
{
|
||||
RDTreeWidgetItem *frame = new RDTreeWidgetItem(
|
||||
{QFormatStr("Frame #%1").arg(m_Ctx.FrameInfo().frameNumber), QString(), QString(), QString()});
|
||||
uint32_t frameNumber = m_Ctx.FrameInfo().frameNumber;
|
||||
|
||||
QString rootName =
|
||||
frameNumber == ~0U ? tr("User-defined Capture") : tr("Frame #%1").arg(frameNumber);
|
||||
|
||||
RDTreeWidgetItem *frame = new RDTreeWidgetItem({rootName, QString(), QString(), QString()});
|
||||
|
||||
RDTreeWidgetItem *framestart =
|
||||
new RDTreeWidgetItem({tr("Frame Start"), lit("0"), lit("0"), QString()});
|
||||
new RDTreeWidgetItem({tr("Capture Start"), lit("0"), lit("0"), QString()});
|
||||
framestart->setTag(QVariant::fromValue(EventItemTag(0, 0)));
|
||||
|
||||
frame->addChild(framestart);
|
||||
|
||||
Reference in New Issue
Block a user