Skip to content

Commit 2d1c765

Browse files
committed
Add an analytic flag for use of custom annotations API
1 parent 565fe17 commit 2d1c765

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

qrenderdoc/Code/CaptureContext.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,9 @@ void CaptureContext::LoadCaptureThreaded(const QString &captureFile, const Repla
10951095
m_PostloadProgress = 1.0f;
10961096
});
10971097

1098+
if(m_FrameInfo.containsAnnotations)
1099+
ANALYTIC_SET(CaptureFeatures.CustomAnnotations, true);
1100+
10981101
QThread::msleep(20);
10991102

11001103
QDateTime today = QDateTime::currentDateTimeUtc();

qrenderdoc/Code/Interface/Analytics.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ static struct AnalyticsDocumentation
314314
DOCUMENT_ANALYTIC(MultiGPU, "Did any capture make use of multiple GPUs?");
315315
DOCUMENT_ANALYTIC(D3D12Bundle, "Did any D3D12 capture use bundles?");
316316
DOCUMENT_ANALYTIC(DXILShaders, "Did any D3D12 capture use DXIL shaders?");
317+
DOCUMENT_ANALYTIC(CustomAnnotations, "Did any capture use RenderDoc's custom annotations?");
317318
} DOCUMENT_ANALYTIC_SECTION(CaptureFeatures, "Capture API Usage");
318319
} docs;
319320

@@ -323,7 +324,7 @@ void AnalyticsSerialise(Analytics &serdb, QVariantMap &values, AnalyticsSerialis
323324

324325
// only check this on 64-bit as it is different on 32-bit
325326
#if QT_POINTER_SIZE == 8 && defined(Q_OS_WIN32)
326-
static_assert(sizeof(Analytics) == 148, "Sizeof Analytics has changed - update serialisation.");
327+
static_assert(sizeof(Analytics) == 149, "Sizeof Analytics has changed - update serialisation.");
327328
#endif
328329

329330
QString doc;
@@ -432,6 +433,7 @@ void AnalyticsSerialise(Analytics &serdb, QVariantMap &values, AnalyticsSerialis
432433
ANALYTIC_SERIALISE(CaptureFeatures.MultiGPU);
433434
ANALYTIC_SERIALISE(CaptureFeatures.D3D12Bundle);
434435
ANALYTIC_SERIALISE(CaptureFeatures.DXILShaders);
436+
ANALYTIC_SERIALISE(CaptureFeatures.CustomAnnotations);
435437
}
436438

437439
if(type == AnalyticsSerialiseType::Documenting)

qrenderdoc/Code/Interface/Analytics.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ struct Analytics
242242
bool MultiGPU = false;
243243
bool D3D12Bundle = false;
244244
bool DXILShaders = false;
245+
bool CustomAnnotations = false;
245246
} CaptureFeatures;
246247
};
247248

0 commit comments

Comments
 (0)