diff --git a/qrenderdoc/Code/CaptureContext.cpp b/qrenderdoc/Code/CaptureContext.cpp index c6ec5caf9..231aea354 100644 --- a/qrenderdoc/Code/CaptureContext.cpp +++ b/qrenderdoc/Code/CaptureContext.cpp @@ -142,7 +142,7 @@ void CaptureContext::LoadLogfile(const QString &logFile, const QString &origFile QVector logviewers(m_LogViewers); // make sure we're on a consistent event before invoking log viewer forms - const FetchDrawcall *draw = &m_Drawcalls.back(); + const DrawcallDescription *draw = &m_Drawcalls.back(); while(!draw->children.empty()) draw = &draw->children.back(); @@ -246,13 +246,13 @@ void CaptureContext::LoadLogfileThreaded(const QString &logFile, const QString & #endif r->GetBuffers(&m_BufferList); - for(FetchBuffer &b : m_BufferList) + for(BufferDescription &b : m_BufferList) m_Buffers[b.ID] = &b; m_PostloadProgress = 0.8f; r->GetTextures(&m_TextureList); - for(FetchTexture &t : m_TextureList) + for(TextureDescription &t : m_TextureList) m_Textures[t.ID] = &t; m_PostloadProgress = 0.9f; @@ -293,7 +293,7 @@ void CaptureContext::LoadLogfileThreaded(const QString &logFile, const QString & m_LogLoaded = true; } -bool CaptureContext::PassEquivalent(const FetchDrawcall &a, const FetchDrawcall &b) +bool CaptureContext::PassEquivalent(const DrawcallDescription &a, const DrawcallDescription &b) { // executing command lists can have children if(!a.children.empty() || !b.children.empty()) @@ -367,11 +367,11 @@ bool CaptureContext::PassEquivalent(const FetchDrawcall &a, const FetchDrawcall return false; } -bool CaptureContext::ContainsMarker(const rdctype::array &draws) +bool CaptureContext::ContainsMarker(const rdctype::array &draws) { bool ret = false; - for(const FetchDrawcall &d : draws) + for(const DrawcallDescription &d : draws) { ret |= (d.flags & DrawFlags::PushMarker) && !(d.flags & DrawFlags::CmdList) && !d.children.empty(); @@ -386,12 +386,12 @@ bool CaptureContext::ContainsMarker(const rdctype::array &draws) void CaptureContext::AddFakeProfileMarkers() { - rdctype::array &draws = m_Drawcalls; + rdctype::array &draws = m_Drawcalls; if(ContainsMarker(draws)) return; - QList ret; + QList ret; int depthpassID = 1; int copypassID = 1; @@ -448,7 +448,7 @@ void CaptureContext::AddFakeProfileMarkers() maxOutCount = qMax(maxOutCount, outCount); } - FetchDrawcall mark; + DrawcallDescription mark; mark.eventID = draws[start].eventID; mark.drawcallID = draws[start].drawcallID; diff --git a/qrenderdoc/Code/CaptureContext.h b/qrenderdoc/Code/CaptureContext.h index c29dbff6f..b96e157e4 100644 --- a/qrenderdoc/Code/CaptureContext.h +++ b/qrenderdoc/Code/CaptureContext.h @@ -108,18 +108,21 @@ public: bool IsLogLocal() { return m_LogLocal; } bool LogLoading() { return m_LoadInProgress; } QString LogFilename() { return m_LogFile; } - const FetchFrameInfo &FrameInfo() { return m_FrameInfo; } + const FrameDescription &FrameInfo() { return m_FrameInfo; } const APIProperties &APIProps() { return m_APIProps; } uint32_t CurSelectedEvent() { return m_SelectedEventID; } uint32_t CurEvent() { return m_EventID; } - const FetchDrawcall *CurSelectedDrawcall() { return GetDrawcall(CurSelectedEvent()); } - const FetchDrawcall *CurDrawcall() { return GetDrawcall(CurEvent()); } - const rdctype::array &CurDrawcalls() { return m_Drawcalls; } - FetchTexture *GetTexture(ResourceId id) { return m_Textures[id]; } - const rdctype::array &GetTextures() { return m_TextureList; } - FetchBuffer *GetBuffer(ResourceId id) { return m_Buffers[id]; } - const rdctype::array &GetBuffers() { return m_BufferList; } - QVector DebugMessages; + const DrawcallDescription *CurSelectedDrawcall() + { + return GetDrawcall(CurSelectedEvent()); + } + const DrawcallDescription *CurDrawcall() { return GetDrawcall(CurEvent()); } + const rdctype::array &CurDrawcalls() { return m_Drawcalls; } + TextureDescription *GetTexture(ResourceId id) { return m_Textures[id]; } + const rdctype::array &GetTextures() { return m_TextureList; } + BufferDescription *GetBuffer(ResourceId id) { return m_Buffers[id]; } + const rdctype::array &GetBuffers() { return m_BufferList; } + const DrawcallDescription *GetDrawcall(uint32_t eventID) int UnreadMessageCount; void AddMessages(const rdctype::array &msgs) { @@ -180,8 +183,8 @@ private: bool m_LogLoaded, m_LoadInProgress, m_LogLocal; QString m_LogFile; - bool PassEquivalent(const FetchDrawcall &a, const FetchDrawcall &b); - bool ContainsMarker(const rdctype::array &m_Drawcalls); + bool PassEquivalent(const DrawcallDescription &a, const DrawcallDescription &b); + bool ContainsMarker(const rdctype::array &m_Drawcalls); void AddFakeProfileMarkers(); float m_LoadProgress = 0.0f; @@ -194,13 +197,14 @@ private: uint32_t m_SelectedEventID; uint32_t m_EventID; - const FetchDrawcall *GetDrawcall(const rdctype::array &draws, uint32_t eventID) + const DrawcallDescription *GetDrawcall(const rdctype::array &draws, + uint32_t eventID) { - for(const FetchDrawcall &d : draws) + for(const DrawcallDescription &d : draws) { if(!d.children.empty()) { - const FetchDrawcall *draw = GetDrawcall(d.children, eventID); + const DrawcallDescription *draw = GetDrawcall(d.children, eventID); if(draw != NULL) return draw; } @@ -212,15 +216,15 @@ private: return NULL; } - rdctype::array m_Drawcalls; + rdctype::array m_Drawcalls; APIProperties m_APIProps; - FetchFrameInfo m_FrameInfo; + FrameDescription m_FrameInfo; - QMap m_Textures; - rdctype::array m_TextureList; - QMap m_Buffers; - rdctype::array m_BufferList; + QMap m_Textures; + rdctype::array m_TextureList; + QMap m_Buffers; + rdctype::array m_BufferList; rdctype::array m_WinSystems; diff --git a/qrenderdoc/Windows/APIInspector.cpp b/qrenderdoc/Windows/APIInspector.cpp index 0f50c9648..dced7e189 100644 --- a/qrenderdoc/Windows/APIInspector.cpp +++ b/qrenderdoc/Windows/APIInspector.cpp @@ -26,7 +26,7 @@ #include #include "ui_APIInspector.h" -Q_DECLARE_METATYPE(FetchAPIEvent); +Q_DECLARE_METATYPE(APIEvent); APIInspector::APIInspector(CaptureContext &ctx, QWidget *parent) : QFrame(parent), ui(new Ui::APIInspector), m_Ctx(ctx) @@ -93,7 +93,7 @@ void APIInspector::on_apiEvents_itemSelectionChanged() if(ui->apiEvents->selectedItems().count() == 0) return; - FetchAPIEvent ev = ui->apiEvents->selectedItems()[0]->data(0, Qt::UserRole).value(); + APIEvent ev = ui->apiEvents->selectedItems()[0]->data(0, Qt::UserRole).value(); if(ev.callstack.count > 0) { @@ -121,12 +121,12 @@ void APIInspector::fillAPIView() QRegularExpression rgxopen("^\\s*{"); QRegularExpression rgxclose("^\\s*}"); - const FetchDrawcall *draw = m_Ctx.CurSelectedDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurSelectedDrawcall(); if(draw != NULL && draw->events.count > 0) { int e = 0; - for(const FetchAPIEvent &ev : draw->events) + for(const APIEvent &ev : draw->events) { QStringList lines = ToQStr(ev.eventDesc).split("\n", QString::SkipEmptyParts); diff --git a/qrenderdoc/Windows/BufferViewer.cpp b/qrenderdoc/Windows/BufferViewer.cpp index 924ec1cdd..4a163bd8b 100644 --- a/qrenderdoc/Windows/BufferViewer.cpp +++ b/qrenderdoc/Windows/BufferViewer.cpp @@ -1195,7 +1195,7 @@ void BufferViewer::OnEventChanged(uint32_t eventID) m_ModelVSOut->beginReset(); m_ModelGSOut->beginReset(); - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); m_ModelVSIn->baseVertex = draw ? draw->baseVertex : 0; @@ -1294,7 +1294,7 @@ void BufferViewer::OnEventChanged(uint32_t eventID) void BufferViewer::RT_FetchMeshData(IReplayRenderer *r) { - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); ResourceId ib; uint64_t ioffset = 0; @@ -1811,7 +1811,7 @@ void BufferViewer::guessSecondaryColumn(BufferItemModel *model) void BufferViewer::updatePreviewColumns() { QVector vbs = m_Ctx.CurPipelineState.GetVBuffers(); - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); if(draw) { @@ -1936,7 +1936,7 @@ void BufferViewer::updatePreviewColumns() void BufferViewer::configureMeshColumns() { - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); QVector vinputs = m_Ctx.CurPipelineState.GetVertexInputs(); @@ -2242,7 +2242,7 @@ void BufferViewer::ViewBuffer(uint64_t byteOffset, uint64_t byteSize, ResourceId m_ByteSize = byteSize; m_BufferID = id; - FetchBuffer *buf = m_Ctx.GetBuffer(id); + BufferDescription *buf = m_Ctx.GetBuffer(id); if(buf) setWindowTitle(ToQStr(buf->name) + " - Contents"); @@ -2259,7 +2259,7 @@ void BufferViewer::ViewTexture(uint32_t arrayIdx, uint32_t mip, ResourceId id, c m_TexMip = mip; m_BufferID = id; - FetchTexture *tex = m_Ctx.GetTexture(id); + TextureDescription *tex = m_Ctx.GetTexture(id); if(tex) setWindowTitle(ToQStr(tex->name) + " - Contents"); diff --git a/qrenderdoc/Windows/ConstantBufferPreviewer.cpp b/qrenderdoc/Windows/ConstantBufferPreviewer.cpp index 1a73cbb59..e62e01f40 100644 --- a/qrenderdoc/Windows/ConstantBufferPreviewer.cpp +++ b/qrenderdoc/Windows/ConstantBufferPreviewer.cpp @@ -210,7 +210,7 @@ void ConstantBufferPreviewer::updateLabels() bool needName = true; - FetchBuffer *buf = m_Ctx.GetBuffer(m_cbuffer); + BufferDescription *buf = m_Ctx.GetBuffer(m_cbuffer); if(buf) { bufName = buf->name; diff --git a/qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp b/qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp index 08157a494..884ad264c 100644 --- a/qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/TextureSaveDialog.cpp @@ -29,7 +29,8 @@ #include "Code/QRDUtils.h" #include "ui_TextureSaveDialog.h" -TextureSaveDialog::TextureSaveDialog(const FetchTexture &t, const TextureSave &s, QWidget *parent) +TextureSaveDialog::TextureSaveDialog(const TextureDescription &t, const TextureSave &s, + QWidget *parent) : QDialog(parent), ui(new Ui::TextureSaveDialog) { setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); diff --git a/qrenderdoc/Windows/Dialogs/TextureSaveDialog.h b/qrenderdoc/Windows/Dialogs/TextureSaveDialog.h index edb94f27b..ba3a5e7e6 100644 --- a/qrenderdoc/Windows/Dialogs/TextureSaveDialog.h +++ b/qrenderdoc/Windows/Dialogs/TextureSaveDialog.h @@ -38,7 +38,7 @@ class TextureSaveDialog : public QDialog Q_OBJECT public: - explicit TextureSaveDialog(const FetchTexture &t, const TextureSave &s, QWidget *parent = 0); + explicit TextureSaveDialog(const TextureDescription &t, const TextureSave &s, QWidget *parent = 0); ~TextureSaveDialog(); QString filename(); @@ -79,7 +79,7 @@ private: QTimer typingTimer; - FetchTexture tex; + TextureDescription tex; TextureSave saveData; bool m_Recurse = false; diff --git a/qrenderdoc/Windows/EventBrowser.cpp b/qrenderdoc/Windows/EventBrowser.cpp index 2c009c249..63f44cf6f 100644 --- a/qrenderdoc/Windows/EventBrowser.cpp +++ b/qrenderdoc/Windows/EventBrowser.cpp @@ -162,7 +162,8 @@ void EventBrowser::OnEventChanged(uint32_t eventID) highlightBookmarks(); } -uint EventBrowser::AddDrawcalls(QTreeWidgetItem *parent, const rdctype::array &draws) +uint EventBrowser::AddDrawcalls(QTreeWidgetItem *parent, + const rdctype::array &draws) { uint lastEID = 0; @@ -385,7 +386,7 @@ void EventBrowser::on_stepNext_clicked() if(!m_Ctx.LogLoaded()) return; - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); if(draw && draw->next > 0) SelectEvent(draw->next); @@ -396,7 +397,7 @@ void EventBrowser::on_stepPrev_clicked() if(!m_Ctx.LogLoaded()) return; - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); if(draw && draw->previous > 0) SelectEvent(draw->previous); diff --git a/qrenderdoc/Windows/EventBrowser.h b/qrenderdoc/Windows/EventBrowser.h index 31e8d5d90..0e2b1d472 100644 --- a/qrenderdoc/Windows/EventBrowser.h +++ b/qrenderdoc/Windows/EventBrowser.h @@ -82,7 +82,7 @@ public slots: void jumpToBookmark(int idx); private: - uint AddDrawcalls(QTreeWidgetItem *parent, const rdctype::array &draws); + uint AddDrawcalls(QTreeWidgetItem *parent, const rdctype::array &draws); void SetDrawcallTimes(QTreeWidgetItem *node, const rdctype::array &results); void ExpandNode(QTreeWidgetItem *node); diff --git a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp index 701f936f2..513d6483a 100644 --- a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.cpp @@ -381,7 +381,8 @@ void D3D11PipelineStateViewer::setEmptyRow(QTreeWidgetItem *node) node->setBackgroundColor(i, QColor(255, 70, 70)); } -bool D3D11PipelineStateViewer::HasImportantViewParams(const D3D11Pipe::View &view, FetchTexture *tex) +bool D3D11PipelineStateViewer::HasImportantViewParams(const D3D11Pipe::View &view, + TextureDescription *tex) { // we don't count 'upgrade typeless to typed' as important, we just display the typed format // in the row since there's no real hidden important information there. The formats can't be @@ -401,7 +402,8 @@ bool D3D11PipelineStateViewer::HasImportantViewParams(const D3D11Pipe::View &vie return false; } -bool D3D11PipelineStateViewer::HasImportantViewParams(const D3D11Pipe::View &view, FetchBuffer *buf) +bool D3D11PipelineStateViewer::HasImportantViewParams(const D3D11Pipe::View &view, + BufferDescription *buf) { if(view.FirstElement > 0 || view.NumElements * view.ElementSize < buf->length) return true; @@ -410,7 +412,7 @@ bool D3D11PipelineStateViewer::HasImportantViewParams(const D3D11Pipe::View &vie } void D3D11PipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const ViewTag &view, - FetchTexture *tex) + TextureDescription *tex) { if(tex == NULL) return; @@ -482,7 +484,7 @@ void D3D11PipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const ViewT } void D3D11PipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const ViewTag &view, - FetchBuffer *buf) + BufferDescription *buf) { if(buf == NULL) return; @@ -556,7 +558,7 @@ void D3D11PipelineStateViewer::addResourceRow(const ViewTag &view, const ShaderR w = h = d = a = 0; } - FetchTexture *tex = m_Ctx.GetTexture(r.Resource); + TextureDescription *tex = m_Ctx.GetTexture(r.Resource); if(tex) { @@ -580,7 +582,7 @@ void D3D11PipelineStateViewer::addResourceRow(const ViewTag &view, const ShaderR viewDetails = true; } - FetchBuffer *buf = m_Ctx.GetBuffer(r.Resource); + BufferDescription *buf = m_Ctx.GetBuffer(r.Resource); if(buf) { @@ -964,7 +966,7 @@ void D3D11PipelineStateViewer::setShaderState(const D3D11Pipe::Shader &stage, QL length = 0; } - FetchBuffer *buf = m_Ctx.GetBuffer(b.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(b.Buffer); if(buf) { @@ -1034,7 +1036,7 @@ void D3D11PipelineStateViewer::setState() } const D3D11Pipe::State &state = m_Ctx.CurD3D11PipelineState; - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); const QPixmap &tick = Pixmaps::tick(); const QPixmap &cross = Pixmaps::cross(); @@ -1254,7 +1256,7 @@ void D3D11PipelineStateViewer::setState() if(!ibufferUsed) length = 0; - FetchBuffer *buf = m_Ctx.GetBuffer(state.m_IA.ibuffer.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(state.m_IA.ibuffer.Buffer); if(buf) { @@ -1319,7 +1321,7 @@ void D3D11PipelineStateViewer::setState() length = 0; } - FetchBuffer *buf = m_Ctx.GetBuffer(v.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(v.Buffer); if(buf) { name = buf->name; @@ -1411,7 +1413,7 @@ void D3D11PipelineStateViewer::setState() name = "Empty"; } - FetchBuffer *buf = m_Ctx.GetBuffer(s.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(s.Buffer); if(buf) { @@ -1706,8 +1708,8 @@ void D3D11PipelineStateViewer::resource_itemActivated(QTreeWidgetItem *item, int QVariant tag = item->data(0, Qt::UserRole); - FetchTexture *tex = NULL; - FetchBuffer *buf = NULL; + TextureDescription *tex = NULL; + BufferDescription *buf = NULL; if(tag.canConvert()) { diff --git a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.h b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.h index d6a2562db..f20f6d164 100644 --- a/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.h +++ b/qrenderdoc/Windows/PipelineState/D3D11PipelineStateViewer.h @@ -96,11 +96,11 @@ private: const rdctype::array &vars); const D3D11Pipe::Shader *stageForSender(QWidget *widget); - bool HasImportantViewParams(const D3D11Pipe::View &view, FetchTexture *tex); - bool HasImportantViewParams(const D3D11Pipe::View &view, FetchBuffer *buf); + bool HasImportantViewParams(const D3D11Pipe::View &view, TextureDescription *tex); + bool HasImportantViewParams(const D3D11Pipe::View &view, BufferDescription *buf); - void setViewDetails(QTreeWidgetItem *node, const ViewTag &view, FetchTexture *tex); - void setViewDetails(QTreeWidgetItem *node, const ViewTag &view, FetchBuffer *buf); + void setViewDetails(QTreeWidgetItem *node, const ViewTag &view, TextureDescription *tex); + void setViewDetails(QTreeWidgetItem *node, const ViewTag &view, BufferDescription *buf); bool showNode(bool usedSlot, bool filledSlot); diff --git a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp index 491abbdd9..8a70da97c 100644 --- a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.cpp @@ -420,7 +420,8 @@ void D3D12PipelineStateViewer::setEmptyRow(QTreeWidgetItem *node) node->setBackgroundColor(i, QColor(255, 70, 70)); } -bool D3D12PipelineStateViewer::HasImportantViewParams(const D3D12Pipe::View &view, FetchTexture *tex) +bool D3D12PipelineStateViewer::HasImportantViewParams(const D3D12Pipe::View &view, + TextureDescription *tex) { // we don't count 'upgrade typeless to typed' as important, we just display the typed format // in the row since there's no real hidden important information there. The formats can't be @@ -440,7 +441,8 @@ bool D3D12PipelineStateViewer::HasImportantViewParams(const D3D12Pipe::View &vie return false; } -bool D3D12PipelineStateViewer::HasImportantViewParams(const D3D12Pipe::View &view, FetchBuffer *buf) +bool D3D12PipelineStateViewer::HasImportantViewParams(const D3D12Pipe::View &view, + BufferDescription *buf) { if(view.FirstElement > 0 || view.NumElements * view.ElementSize < buf->length) return true; @@ -449,7 +451,7 @@ bool D3D12PipelineStateViewer::HasImportantViewParams(const D3D12Pipe::View &vie } void D3D12PipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const ViewTag &view, - FetchTexture *tex) + TextureDescription *tex) { if(tex == NULL) return; @@ -530,7 +532,7 @@ void D3D12PipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const ViewT } void D3D12PipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const ViewTag &view, - FetchBuffer *buf) + BufferDescription *buf) { if(buf == NULL) return; @@ -659,7 +661,7 @@ void D3D12PipelineStateViewer::addResourceRow(const ViewTag &view, const D3D12Pi w = h = d = a = 0; } - FetchTexture *tex = m_Ctx.GetTexture(r.Resource); + TextureDescription *tex = m_Ctx.GetTexture(r.Resource); if(tex) { @@ -683,7 +685,7 @@ void D3D12PipelineStateViewer::addResourceRow(const ViewTag &view, const D3D12Pi viewDetails = true; } - FetchBuffer *buf = m_Ctx.GetBuffer(r.Resource); + BufferDescription *buf = m_Ctx.GetBuffer(r.Resource); if(buf) { @@ -1123,7 +1125,7 @@ void D3D12PipelineStateViewer::setShaderState(const D3D12Pipe::Shader &stage, QL if(!filledSlot) name = "Empty"; - FetchBuffer *buf = m_Ctx.GetBuffer(b.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(b.Buffer); if(buf) name = buf->name; @@ -1172,7 +1174,7 @@ void D3D12PipelineStateViewer::setState() } const D3D12Pipe::State &state = m_Ctx.CurD3D12PipelineState; - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); const QPixmap &tick = Pixmaps::tick(); const QPixmap &cross = Pixmaps::cross(); @@ -1297,7 +1299,7 @@ void D3D12PipelineStateViewer::setState() if(!ibufferUsed) length = 0; - FetchBuffer *buf = m_Ctx.GetBuffer(state.m_IA.ibuffer.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(state.m_IA.ibuffer.Buffer); if(buf) { @@ -1363,7 +1365,7 @@ void D3D12PipelineStateViewer::setState() length = 0; } - FetchBuffer *buf = m_Ctx.GetBuffer(v.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(v.Buffer); if(buf) { name = buf->name; @@ -1430,7 +1432,7 @@ void D3D12PipelineStateViewer::setState() name = "Empty"; } - FetchBuffer *buf = m_Ctx.GetBuffer(s.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(s.Buffer); if(buf) { @@ -1682,8 +1684,8 @@ void D3D12PipelineStateViewer::resource_itemActivated(QTreeWidgetItem *item, int QVariant tag = item->data(0, Qt::UserRole); - FetchTexture *tex = NULL; - FetchBuffer *buf = NULL; + TextureDescription *tex = NULL; + BufferDescription *buf = NULL; if(tag.canConvert()) { diff --git a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.h b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.h index 1fb23129d..e093b1cc0 100644 --- a/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.h +++ b/qrenderdoc/Windows/PipelineState/D3D12PipelineStateViewer.h @@ -94,11 +94,11 @@ private: const rdctype::array &vars); const D3D12Pipe::Shader *stageForSender(QWidget *widget); - bool HasImportantViewParams(const D3D12Pipe::View &view, FetchTexture *tex); - bool HasImportantViewParams(const D3D12Pipe::View &view, FetchBuffer *buf); + bool HasImportantViewParams(const D3D12Pipe::View &view, TextureDescription *tex); + bool HasImportantViewParams(const D3D12Pipe::View &view, BufferDescription *buf); - void setViewDetails(QTreeWidgetItem *node, const ViewTag &view, FetchTexture *tex); - void setViewDetails(QTreeWidgetItem *node, const ViewTag &view, FetchBuffer *buf); + void setViewDetails(QTreeWidgetItem *node, const ViewTag &view, TextureDescription *tex); + void setViewDetails(QTreeWidgetItem *node, const ViewTag &view, BufferDescription *buf); bool showNode(bool usedSlot, bool filledSlot); diff --git a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp index 130319b8a..7c15ca92d 100644 --- a/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/GLPipelineStateViewer.cpp @@ -628,7 +628,7 @@ void GLPipelineStateViewer::setShaderState(const GLPipe::Shader &stage, QLabel * w = h = d = a = 0; } - FetchTexture *tex = m_Ctx.GetTexture(r.Resource); + TextureDescription *tex = m_Ctx.GetTexture(r.Resource); if(tex) { @@ -793,7 +793,7 @@ void GLPipelineStateViewer::setShaderState(const GLPipe::Shader &stage, QLabel * offset = b->Offset; length = b->Size; - FetchBuffer *buf = m_Ctx.GetBuffer(b->Resource); + BufferDescription *buf = m_Ctx.GetBuffer(b->Resource); if(buf) { name = buf->name; @@ -902,7 +902,7 @@ void GLPipelineStateViewer::setShaderState(const GLPipe::Shader &stage, QLabel * QVariant tag; - FetchTexture *tex = m_Ctx.GetTexture(id); + TextureDescription *tex = m_Ctx.GetTexture(id); if(tex) { @@ -930,7 +930,7 @@ void GLPipelineStateViewer::setShaderState(const GLPipe::Shader &stage, QLabel * tag = QVariant::fromValue(id); } - FetchBuffer *buf = m_Ctx.GetBuffer(id); + BufferDescription *buf = m_Ctx.GetBuffer(id); if(buf) { @@ -1049,7 +1049,7 @@ void GLPipelineStateViewer::setState() } const GLPipe::State &state = m_Ctx.CurGLPipelineState; - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); bool showDisabled = ui->showDisabled->isChecked(); bool showEmpty = ui->showEmpty->isChecked(); @@ -1187,7 +1187,7 @@ void GLPipelineStateViewer::setState() if(!ibufferUsed) length = 0; - FetchBuffer *buf = m_Ctx.GetBuffer(state.m_VtxIn.ibuffer); + BufferDescription *buf = m_Ctx.GetBuffer(state.m_VtxIn.ibuffer); if(buf) { @@ -1253,7 +1253,7 @@ void GLPipelineStateViewer::setState() length = 0; } - FetchBuffer *buf = m_Ctx.GetBuffer(v.Buffer); + BufferDescription *buf = m_Ctx.GetBuffer(v.Buffer); if(buf) { name = buf->name; @@ -1316,7 +1316,7 @@ void GLPipelineStateViewer::setState() name = "Empty"; } - FetchBuffer *buf = m_Ctx.GetBuffer(state.m_Feedback.BufferBinding[i]); + BufferDescription *buf = m_Ctx.GetBuffer(state.m_Feedback.BufferBinding[i]); if(buf) { @@ -1631,7 +1631,7 @@ void GLPipelineStateViewer::setState() w = h = d = a = 0; } - FetchTexture *tex = m_Ctx.GetTexture(p); + TextureDescription *tex = m_Ctx.GetTexture(p); if(tex) { w = tex->width; @@ -1717,7 +1717,7 @@ void GLPipelineStateViewer::setState() w = h = d = a = 0; } - FetchTexture *tex = m_Ctx.GetTexture(ds); + TextureDescription *tex = m_Ctx.GetTexture(ds); if(tex) { w = tex->width; @@ -1948,7 +1948,7 @@ void GLPipelineStateViewer::resource_itemActivated(QTreeWidgetItem *item, int co if(tag.canConvert()) { - FetchTexture *tex = m_Ctx.GetTexture(tag.value()); + TextureDescription *tex = m_Ctx.GetTexture(tag.value()); if(tex) { diff --git a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp index 677f7ad49..3e86fbab0 100644 --- a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp +++ b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp @@ -358,7 +358,7 @@ void VulkanPipelineStateViewer::setEmptyRow(QTreeWidgetItem *node) template void VulkanPipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const bindType &view, - FetchTexture *tex) + TextureDescription *tex) { if(tex == NULL) return; @@ -432,7 +432,7 @@ void VulkanPipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const bind template void VulkanPipelineStateViewer::setViewDetails(QTreeWidgetItem *node, const bindType &view, - FetchBuffer *buf) + BufferDescription *buf) { if(buf == NULL) return; @@ -812,8 +812,8 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails, TextureDim restype = TextureDim::Unknown; QVariant tag; - FetchTexture *tex = NULL; - FetchBuffer *buf = NULL; + TextureDescription *tex = NULL; + BufferDescription *buf = NULL; if(filledSlot && descriptorBind != NULL) { @@ -1158,7 +1158,7 @@ void VulkanPipelineStateViewer::addConstantBlockRow(ShaderReflection *shaderDeta name = ""; length = descriptorBind->size; - FetchBuffer *buf = m_Ctx.GetBuffer(descriptorBind->res); + BufferDescription *buf = m_Ctx.GetBuffer(descriptorBind->res); if(buf) { name = buf->name; @@ -1425,7 +1425,7 @@ void VulkanPipelineStateViewer::setState() m_CombinedImageSamplers.clear(); const VKPipe::State &state = m_Ctx.CurVulkanPipelineState; - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); bool showDisabled = ui->showDisabled->isChecked(); bool showEmpty = ui->showEmpty->isChecked(); @@ -1544,7 +1544,7 @@ void VulkanPipelineStateViewer::setState() if(!ibufferUsed) length = 0; - FetchBuffer *buf = m_Ctx.GetBuffer(state.IA.ibuffer.buf); + BufferDescription *buf = m_Ctx.GetBuffer(state.IA.ibuffer.buf); if(buf) { @@ -1624,7 +1624,7 @@ void VulkanPipelineStateViewer::setState() name = "Buffer " + ToQStr(vbuff->buffer); offset = vbuff->offset; - FetchBuffer *buf = m_Ctx.GetBuffer(vbuff->buffer); + BufferDescription *buf = m_Ctx.GetBuffer(vbuff->buffer); if(buf) { name = buf->name; @@ -1803,7 +1803,7 @@ void VulkanPipelineStateViewer::setState() w = h = d = a = 0; } - FetchTexture *tex = m_Ctx.GetTexture(p.img); + TextureDescription *tex = m_Ctx.GetTexture(p.img); if(tex) { w = tex->width; @@ -2024,7 +2024,7 @@ void VulkanPipelineStateViewer::resource_itemActivated(QTreeWidgetItem *item, in if(tag.canConvert()) { - FetchTexture *tex = m_Ctx.GetTexture(tag.value()); + TextureDescription *tex = m_Ctx.GetTexture(tag.value()); if(tex) { diff --git a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.h b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.h index cccc2c95e..a23036b11 100644 --- a/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.h +++ b/qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.h @@ -108,10 +108,10 @@ private: QString disassembleSPIRV(const ShaderReflection *shaderDetails); template - void setViewDetails(QTreeWidgetItem *node, const viewType &view, FetchTexture *tex); + void setViewDetails(QTreeWidgetItem *node, const viewType &view, TextureDescription *tex); template - void setViewDetails(QTreeWidgetItem *node, const viewType &view, FetchBuffer *buf); + void setViewDetails(QTreeWidgetItem *node, const viewType &view, BufferDescription *buf); bool showNode(bool usedSlot, bool filledSlot); diff --git a/qrenderdoc/Windows/PixelHistoryView.cpp b/qrenderdoc/Windows/PixelHistoryView.cpp index 548cd6fda..17d5acef4 100644 --- a/qrenderdoc/Windows/PixelHistoryView.cpp +++ b/qrenderdoc/Windows/PixelHistoryView.cpp @@ -138,7 +138,7 @@ public: if(isEvent(parent)) { const QList &mods = getMods(parent); - const FetchDrawcall *draw = m_Ctx.GetDrawcall(mods.front().eventID); + const DrawcallDescription *draw = m_Ctx.GetDrawcall(mods.front().eventID); if(draw->flags & DrawFlags::Clear) return 0; @@ -198,13 +198,13 @@ public: if(isEvent(index)) { const QList &mods = getMods(index); - const FetchDrawcall *drawcall = m_Ctx.GetDrawcall(mods.front().eventID); + const DrawcallDescription *drawcall = m_Ctx.GetDrawcall(mods.front().eventID); if(!drawcall) return QVariant(); QString ret = ""; - QList drawstack; - const FetchDrawcall *parent = m_Ctx.GetDrawcall(drawcall->parent); + QList drawstack; + const DrawcallDescription *parent = m_Ctx.GetDrawcall(drawcall->parent); while(parent) { drawstack.push_back(parent); @@ -392,7 +392,7 @@ public: private: CaptureContext &m_Ctx; - const FetchTexture *m_Tex; + const TextureDescription *m_Tex; TextureDisplay m_Display; bool m_IsDepth = false, m_IsUint = false, m_IsSint = false, m_IsFloat = true; @@ -564,7 +564,7 @@ PixelHistoryView::PixelHistoryView(CaptureContext &ctx, ResourceId id, QPoint po m_Pixel = point; m_Display = display; - FetchTexture *tex = m_Ctx.GetTexture(id); + TextureDescription *tex = m_Ctx.GetTexture(id); QString title = tr("Pixel History on %1 for (%2, %3)").arg(ToQStr(tex->name)).arg(point.x()).arg(point.y()); @@ -681,7 +681,7 @@ void PixelHistoryView::jumpToPrimitive(EventTag tag) BufferViewer *viewer = m_Ctx.meshPreview(); - const FetchDrawcall *draw = m_Ctx.CurDrawcall(); + const DrawcallDescription *draw = m_Ctx.CurDrawcall(); if(draw) { diff --git a/qrenderdoc/Windows/ShaderViewer.cpp b/qrenderdoc/Windows/ShaderViewer.cpp index 72e65aa1a..79e900538 100644 --- a/qrenderdoc/Windows/ShaderViewer.cpp +++ b/qrenderdoc/Windows/ShaderViewer.cpp @@ -732,8 +732,8 @@ QTreeWidgetItem *ShaderViewer::makeResourceRegister(const BindpointMap &bind, ui { QString name = QString(" (%1)").arg(ToQStr(res.name)); - const FetchTexture *tex = m_Ctx.GetTexture(bound.Id); - const FetchBuffer *buf = m_Ctx.GetBuffer(bound.Id); + const TextureDescription *tex = m_Ctx.GetTexture(bound.Id); + const BufferDescription *buf = m_Ctx.GetBuffer(bound.Id); if(res.IsSampler) return NULL; diff --git a/qrenderdoc/Windows/StatisticsViewer.cpp b/qrenderdoc/Windows/StatisticsViewer.cpp index c5c7e7e2b..c8e95e6f7 100644 --- a/qrenderdoc/Windows/StatisticsViewer.cpp +++ b/qrenderdoc/Windows/StatisticsViewer.cpp @@ -92,10 +92,10 @@ QString CreateSimpleIntegerHistogram(const QString &legend, const rdctype::array return text; } -void AppendDrawStatistics(QString &statisticsLog, const FetchFrameInfo &frameInfo) +void AppendDrawStatistics(QString &statisticsLog, const FrameDescription &frameInfo) { // #mivance see AppendConstantBindStatistics - const FetchFrameDrawStats &draws = frameInfo.stats.draws; + const DrawcallStats &draws = frameInfo.stats.draws; statisticsLog.append("\n*** Draw Statistics ***\n\n"); @@ -131,7 +131,7 @@ void AppendDrawStatistics(QString &statisticsLog, const FetchFrameInfo &frameInf } } -void AppendDispatchStatistics(QString &statisticsLog, const FetchFrameInfo &frameInfo) +void AppendDispatchStatistics(QString &statisticsLog, const FrameDescription &frameInfo) { statisticsLog.append("\n*** Dispatch Statistics ***\n\n"); statisticsLog.append(QString("Total calls: %1, indirect: %2\n") @@ -139,12 +139,12 @@ void AppendDispatchStatistics(QString &statisticsLog, const FetchFrameInfo &fram .arg(frameInfo.stats.dispatches.indirect)); } -void AppendInputAssemblerStatistics(QString &statisticsLog, const FetchFrameInfo &frameInfo) +void AppendInputAssemblerStatistics(QString &statisticsLog, const FrameDescription &frameInfo) { - const FetchFrameIndexBindStats &indices = frameInfo.stats.indices; - const FetchFrameLayoutBindStats &layouts = frameInfo.stats.layouts; + const IndexBindStats &indices = frameInfo.stats.indices; + const LayoutBindStats &layouts = frameInfo.stats.layouts; - const FetchFrameVertexBindStats &vertices = frameInfo.stats.vertices; + const VertexBindStats &vertices = frameInfo.stats.vertices; statisticsLog.append("\n*** Input Assembler Statistics ***\n\n"); @@ -169,10 +169,10 @@ void AppendInputAssemblerStatistics(QString &statisticsLog, const FetchFrameInfo } void AppendShaderStatistics(CaptureContext &ctx, QString &statisticsLog, - const FetchFrameInfo &frameInfo) + const FrameDescription &frameInfo) { - const FetchFrameShaderStats *shaders = frameInfo.stats.shaders; - FetchFrameShaderStats totalShadersPerStage; + const ShaderChangeStats *shaders = frameInfo.stats.shaders; + ShaderChangeStats totalShadersPerStage; memset(&totalShadersPerStage, 0, sizeof(totalShadersPerStage)); for(auto s : indices()) { @@ -204,18 +204,18 @@ void AppendShaderStatistics(CaptureContext &ctx, QString &statisticsLog, } void AppendConstantBindStatistics(CaptureContext &ctx, QString &statisticsLog, - const FetchFrameInfo &frameInfo) + const FrameDescription &frameInfo) { // #mivance C++-side we guarantee all stages will have the same slots // and sizes count, so pattern off of the first frame's first stage - const FetchFrameConstantBindStats &reference = frameInfo.stats.constants[0]; + const ConstantBindStats &reference = frameInfo.stats.constants[0]; // #mivance there is probably a way to iterate the fields via // GetType()/GetField() and build a sort of dynamic min/max/average // structure for a given type with known integral types (or arrays // thereof), but given we're heading for a Qt/C++ rewrite of the UI // perhaps best not to dwell too long on that - FetchFrameConstantBindStats totalConstantsPerStage[ENUM_ARRAY_SIZE(ShaderStage)]; + ConstantBindStats totalConstantsPerStage[ENUM_ARRAY_SIZE(ShaderStage)]; memset(&totalConstantsPerStage, 0, sizeof(totalConstantsPerStage)); for(auto s : indices()) { @@ -224,7 +224,7 @@ void AppendConstantBindStatistics(CaptureContext &ctx, QString &statisticsLog, } { - const FetchFrameConstantBindStats *constants = frameInfo.stats.constants; + const ConstantBindStats *constants = frameInfo.stats.constants; for(auto s : indices()) { totalConstantsPerStage[s].calls += constants[s].calls; @@ -239,14 +239,14 @@ void AppendConstantBindStatistics(CaptureContext &ctx, QString &statisticsLog, } } - FetchFrameConstantBindStats totalConstantsForAllStages; + ConstantBindStats totalConstantsForAllStages; memset(&totalConstantsForAllStages, 0, sizeof(totalConstantsForAllStages)); totalConstantsForAllStages.bindslots.create(totalConstantsPerStage[0].bindslots.count); totalConstantsForAllStages.sizes.create(totalConstantsPerStage[0].sizes.count); for(auto s : indices()) { - const FetchFrameConstantBindStats &perStage = totalConstantsPerStage[s]; + const ConstantBindStats &perStage = totalConstantsPerStage[s]; totalConstantsForAllStages.calls += perStage.calls; totalConstantsForAllStages.sets += perStage.sets; totalConstantsForAllStages.nulls += perStage.nulls; @@ -300,12 +300,12 @@ void AppendConstantBindStatistics(CaptureContext &ctx, QString &statisticsLog, } void AppendSamplerBindStatistics(CaptureContext &ctx, QString &statisticsLog, - const FetchFrameInfo &frameInfo) + const FrameDescription &frameInfo) { // #mivance see AppendConstantBindStatistics - const FetchFrameSamplerBindStats &reference = frameInfo.stats.samplers[0]; + const SamplerBindStats &reference = frameInfo.stats.samplers[0]; - FetchFrameSamplerBindStats totalSamplersPerStage[ENUM_ARRAY_SIZE(ShaderStage)]; + SamplerBindStats totalSamplersPerStage[ENUM_ARRAY_SIZE(ShaderStage)]; memset(&totalSamplersPerStage, 0, sizeof(totalSamplersPerStage)); for(auto s : indices()) { @@ -313,7 +313,7 @@ void AppendSamplerBindStatistics(CaptureContext &ctx, QString &statisticsLog, } { - const FetchFrameSamplerBindStats *samplers = frameInfo.stats.samplers; + const SamplerBindStats *samplers = frameInfo.stats.samplers; for(auto s : indices()) { totalSamplersPerStage[s].calls += samplers[s].calls; @@ -327,13 +327,13 @@ void AppendSamplerBindStatistics(CaptureContext &ctx, QString &statisticsLog, } } - FetchFrameSamplerBindStats totalSamplersForAllStages; + SamplerBindStats totalSamplersForAllStages; memset(&totalSamplersForAllStages, 0, sizeof(totalSamplersForAllStages)); totalSamplersForAllStages.bindslots.create(totalSamplersPerStage[0].bindslots.count); for(auto s : indices()) { - FetchFrameSamplerBindStats perStage = totalSamplersPerStage[s]; + SamplerBindStats perStage = totalSamplersPerStage[s]; totalSamplersForAllStages.calls += perStage.calls; totalSamplersForAllStages.sets += perStage.sets; totalSamplersForAllStages.nulls += perStage.nulls; @@ -365,12 +365,12 @@ void AppendSamplerBindStatistics(CaptureContext &ctx, QString &statisticsLog, } void AppendResourceBindStatistics(CaptureContext &ctx, QString &statisticsLog, - const FetchFrameInfo &frameInfo) + const FrameDescription &frameInfo) { // #mivance see AppendConstantBindStatistics - const FetchFrameResourceBindStats &reference = frameInfo.stats.resources[0]; + const ResourceBindStats &reference = frameInfo.stats.resources[0]; - FetchFrameResourceBindStats totalResourcesPerStage[ENUM_ARRAY_SIZE(ShaderStage)]; + ResourceBindStats totalResourcesPerStage[ENUM_ARRAY_SIZE(ShaderStage)]; memset(&totalResourcesPerStage, 0, sizeof(totalResourcesPerStage)); for(auto s : indices()) { @@ -379,7 +379,7 @@ void AppendResourceBindStatistics(CaptureContext &ctx, QString &statisticsLog, } { - const FetchFrameResourceBindStats *resources = frameInfo.stats.resources; + const ResourceBindStats *resources = frameInfo.stats.resources; for(auto s : indices()) { totalResourcesPerStage[s].calls += resources[s].calls; @@ -398,14 +398,14 @@ void AppendResourceBindStatistics(CaptureContext &ctx, QString &statisticsLog, } } - FetchFrameResourceBindStats totalResourcesForAllStages; + ResourceBindStats totalResourcesForAllStages; memset(&totalResourcesForAllStages, 0, sizeof(totalResourcesForAllStages)); totalResourcesForAllStages.types.create(totalResourcesPerStage[0].types.count); totalResourcesForAllStages.bindslots.create(totalResourcesPerStage[0].bindslots.count); for(auto s : indices()) { - FetchFrameResourceBindStats perStage = totalResourcesPerStage[s]; + ResourceBindStats perStage = totalResourcesPerStage[s]; totalResourcesForAllStages.calls += perStage.calls; totalResourcesForAllStages.sets += perStage.sets; totalResourcesForAllStages.nulls += perStage.nulls; @@ -461,18 +461,18 @@ void AppendResourceBindStatistics(CaptureContext &ctx, QString &statisticsLog, "Aggregate slot counts per invocation across all stages", totalResourcesForAllStages.bindslots)); } -void AppendUpdateStatistics(QString &statisticsLog, const FetchFrameInfo &frameInfo) +void AppendUpdateStatistics(QString &statisticsLog, const FrameDescription &frameInfo) { // #mivance see AppendConstantBindStatistics - const FetchFrameUpdateStats &reference = frameInfo.stats.updates; + const ResourceUpdateStats &reference = frameInfo.stats.updates; - FetchFrameUpdateStats totalUpdates; + ResourceUpdateStats totalUpdates; memset(&totalUpdates, 0, sizeof(totalUpdates)); totalUpdates.types.create(reference.types.count); totalUpdates.sizes.create(reference.sizes.count); { - FetchFrameUpdateStats updates = frameInfo.stats.updates; + ResourceUpdateStats updates = frameInfo.stats.updates; totalUpdates.calls += updates.calls; totalUpdates.clients += updates.clients; @@ -535,9 +535,9 @@ void AppendUpdateStatistics(QString &statisticsLog, const FetchFrameInfo &frameI } } -void AppendBlendStatistics(QString &statisticsLog, const FetchFrameInfo &frameInfo) +void AppendBlendStatistics(QString &statisticsLog, const FrameDescription &frameInfo) { - FetchFrameBlendStats blends = frameInfo.stats.blends; + BlendStats blends = frameInfo.stats.blends; statisticsLog.append("\n*** Blend Statistics ***\n"); statisticsLog.append( QString("Blend calls: %1 non-null sets: %2, null (default) sets: %3, redundant sets: %4\n") @@ -547,9 +547,9 @@ void AppendBlendStatistics(QString &statisticsLog, const FetchFrameInfo &frameIn .arg(blends.redundants)); } -void AppendDepthStencilStatistics(QString &statisticsLog, const FetchFrameInfo &frameInfo) +void AppendDepthStencilStatistics(QString &statisticsLog, const FrameDescription &frameInfo) { - FetchFrameDepthStencilStats depths = frameInfo.stats.depths; + DepthStencilStats depths = frameInfo.stats.depths; statisticsLog.append("\n*** Depth Stencil Statistics ***\n"); statisticsLog.append(QString("Depth/stencil calls: %1 non-null sets: %2, null (default) sets: " "%3, redundant sets: %4\n") @@ -559,9 +559,9 @@ void AppendDepthStencilStatistics(QString &statisticsLog, const FetchFrameInfo & .arg(depths.redundants)); } -void AppendRasterizationStatistics(QString &statisticsLog, const FetchFrameInfo &frameInfo) +void AppendRasterizationStatistics(QString &statisticsLog, const FrameDescription &frameInfo) { - FetchFrameRasterizationStats rasters = frameInfo.stats.rasters; + RasterizationStats rasters = frameInfo.stats.rasters; statisticsLog.append("\n*** Rasterization Statistics ***\n"); statisticsLog.append(QString("Rasterization calls: %1 non-null sets: %2, null (default) sets: " "%3, redundant sets: %4\n") @@ -573,9 +573,9 @@ void AppendRasterizationStatistics(QString &statisticsLog, const FetchFrameInfo statisticsLog.append(CreateSimpleIntegerHistogram("Scissors set", rasters.rects)); } -void AppendOutputStatistics(QString &statisticsLog, const FetchFrameInfo &frameInfo) +void AppendOutputStatistics(QString &statisticsLog, const FrameDescription &frameInfo) { - FetchFrameOutputStats outputs = frameInfo.stats.outputs; + OutputTargetStats outputs = frameInfo.stats.outputs; statisticsLog.append("\n*** Output Statistics ***\n"); statisticsLog.append(QString("Output calls: %1 non-null sets: %2, null sets: %3\n") .arg(outputs.calls) @@ -585,7 +585,7 @@ void AppendOutputStatistics(QString &statisticsLog, const FetchFrameInfo &frameI } void AppendDetailedInformation(CaptureContext &ctx, QString &statisticsLog, - const FetchFrameInfo &frameInfo) + const FrameDescription &frameInfo) { if(!frameInfo.stats.recorded) return; @@ -604,7 +604,7 @@ void AppendDetailedInformation(CaptureContext &ctx, QString &statisticsLog, AppendOutputStatistics(statisticsLog, frameInfo); } -void CountContributingEvents(const FetchDrawcall &draw, uint32_t &drawCount, +void CountContributingEvents(const DrawcallDescription &draw, uint32_t &drawCount, uint32_t &dispatchCount, uint32_t &diagnosticCount) { const DrawFlags diagnosticMask = @@ -620,11 +620,11 @@ void CountContributingEvents(const FetchDrawcall &draw, uint32_t &drawCount, if(draw.flags & DrawFlags::Dispatch) dispatchCount += 1; - for(const FetchDrawcall &c : draw.children) + for(const DrawcallDescription &c : draw.children) CountContributingEvents(c, drawCount, dispatchCount, diagnosticCount); } -QString AppendAPICallSummary(const FetchFrameInfo &frameInfo, uint numAPICalls) +QString AppendAPICallSummary(const FrameDescription &frameInfo, uint numAPICalls) { if(!frameInfo.stats.recorded) return ""; @@ -669,16 +669,16 @@ QString GenerateReport(CaptureContext &ctx) { QString statisticsLog; - const rdctype::array &curDraws = ctx.CurDrawcalls(); + const rdctype::array &curDraws = ctx.CurDrawcalls(); - const FetchDrawcall *lastDraw = &curDraws.back(); + const DrawcallDescription *lastDraw = &curDraws.back(); while(!lastDraw->children.empty()) lastDraw = &lastDraw->children.back(); uint32_t drawCount = 0; uint32_t dispatchCount = 0; uint32_t diagnosticCount = 0; - for(const FetchDrawcall &d : curDraws) + for(const DrawcallDescription &d : curDraws) CountContributingEvents(d, drawCount, dispatchCount, diagnosticCount); uint32_t numAPIcalls = lastDraw->eventID - (drawCount + dispatchCount + diagnosticCount); @@ -689,7 +689,7 @@ QString GenerateReport(CaptureContext &ctx) uint64_t IBBytes = 0; uint64_t VBBytes = 0; uint64_t BufBytes = 0; - for(const FetchBuffer &b : ctx.GetBuffers()) + for(const BufferDescription &b : ctx.GetBuffers()) { BufBytes += b.length; @@ -707,7 +707,7 @@ QString GenerateReport(CaptureContext &ctx) float texW = 0, texH = 0; float largeTexW = 0, largeTexH = 0; int texCount = 0, largeTexCount = 0; - for(const FetchTexture &t : ctx.GetTextures()) + for(const TextureDescription &t : ctx.GetTextures()) { if(t.creationFlags & (TextureCategory::ColorTarget | TextureCategory::DepthTarget)) { @@ -740,7 +740,7 @@ QString GenerateReport(CaptureContext &ctx) largeTexW /= largeTexCount; largeTexH /= largeTexCount; - const FetchFrameInfo &frameInfo = ctx.FrameInfo(); + const FrameDescription &frameInfo = ctx.FrameInfo(); float compressedMB = (float)frameInfo.compressedFileSize / (1024.0f * 1024.0f); float uncompressedMB = (float)frameInfo.uncompressedFileSize / (1024.0f * 1024.0f); diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index 8738dd27f..6e4b97e51 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -90,7 +90,7 @@ bool Following::operator==(const Following &o) void Following::GetDrawContext(CaptureContext &ctx, bool ©, bool &compute) { - const FetchDrawcall *curDraw = ctx.CurDrawcall(); + const DrawcallDescription *curDraw = ctx.CurDrawcall(); copy = curDraw != NULL && (curDraw->flags & (DrawFlags::Copy | DrawFlags::Resolve)); compute = curDraw != NULL && (curDraw->flags & DrawFlags::Dispatch) && ctx.CurPipelineState.GetShader(ShaderStage::Compute) != ResourceId(); @@ -165,7 +165,7 @@ BoundResource Following::GetBoundResource(CaptureContext &ctx, int arrayIdx) QVector Following::GetOutputTargets(CaptureContext &ctx) { - const FetchDrawcall *curDraw = ctx.CurDrawcall(); + const DrawcallDescription *curDraw = ctx.CurDrawcall(); bool copy = false, compute = false; GetDrawContext(ctx, copy, compute); @@ -186,7 +186,7 @@ QVector Following::GetOutputTargets(CaptureContext &ctx) if(curDraw->copyDestination != ResourceId()) return {BoundResource(curDraw->copyDestination)}; - for(const FetchTexture &tex : ctx.GetTextures()) + for(const TextureDescription &tex : ctx.GetTextures()) { if(tex.creationFlags & TextureCategory::SwapBuffer) return {BoundResource(tex.ID)}; @@ -240,7 +240,7 @@ QMap> Following::GetReadWriteResources(Capt QMap> Following::GetReadOnlyResources(CaptureContext &ctx, ShaderStage stage) { - const FetchDrawcall *curDraw = ctx.CurDrawcall(); + const DrawcallDescription *curDraw = ctx.CurDrawcall(); bool copy = false, compute = false; GetDrawContext(ctx, copy, compute); @@ -336,7 +336,7 @@ public: TextureListItemModel(QObject *parent) : QAbstractItemModel(parent) {} void reset(FilterType type, const QString &filter, CaptureContext &ctx) { - const rdctype::array src = ctx.GetTextures(); + const rdctype::array src = ctx.GetTextures(); texs.clear(); texs.reserve(src.count); @@ -345,7 +345,7 @@ public: TextureCategory rtFlags = TextureCategory::ColorTarget | TextureCategory::DepthTarget; - for(const FetchTexture &t : src) + for(const TextureDescription &t : src) { if(type == Textures) { @@ -416,7 +416,7 @@ public: } private: - QVector texs; + QVector texs; }; class TextureListItemDelegate : public QItemDelegate @@ -455,7 +455,7 @@ public: } }; -FetchTexture *TextureViewer::GetCurrentTexture() +TextureDescription *TextureViewer::GetCurrentTexture() { return m_CachedTexture; } @@ -648,7 +648,7 @@ TextureViewer::~TextureViewer() void TextureViewer::RT_FetchCurrentPixel(uint32_t x, uint32_t y, PixelValue &pickValue, PixelValue &realValue) { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr == NULL) return; @@ -707,7 +707,7 @@ void TextureViewer::RT_UpdateAndDisplay(IReplayRenderer *) void TextureViewer::RT_UpdateVisualRange(IReplayRenderer *) { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(!m_Visualise || texptr == NULL || m_Output == NULL) return; @@ -744,11 +744,11 @@ void TextureViewer::RT_UpdateVisualRange(IReplayRenderer *) void TextureViewer::UI_UpdateStatusText() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr == NULL) return; - FetchTexture &tex = *texptr; + TextureDescription &tex = *texptr; bool dsv = (tex.creationFlags & TextureCategory::DepthTarget) || (tex.format.compType == CompType::Depth); @@ -925,7 +925,7 @@ void TextureViewer::UI_UpdateTextureDetails() { QString status; - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr == NULL) { ui->texStatusDim->setText(status); @@ -934,13 +934,13 @@ void TextureViewer::UI_UpdateTextureDetails() return; } - FetchTexture ¤t = *texptr; + TextureDescription ¤t = *texptr; ResourceId followID = m_Following.GetResourceId(m_Ctx); { - FetchTexture *followtex = m_Ctx.GetTexture(followID); - FetchBuffer *followbuf = m_Ctx.GetBuffer(followID); + TextureDescription *followtex = m_Ctx.GetTexture(followID); + BufferDescription *followbuf = m_Ctx.GetBuffer(followID); QString title; @@ -1020,7 +1020,7 @@ void TextureViewer::UI_UpdateTextureDetails() void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw) { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); // reset high-water mark m_HighWaterStatusLength = 0; @@ -1028,7 +1028,7 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw) if(texptr == NULL) return; - FetchTexture &tex = *texptr; + TextureDescription &tex = *texptr; bool newtex = (m_TexDisplay.texid != tex.ID); @@ -1304,7 +1304,7 @@ void TextureViewer::UI_OnTextureSelectionChanged(bool newdraw) }); } -void TextureViewer::UI_SetHistogramRange(const FetchTexture *tex, CompType typeHint) +void TextureViewer::UI_SetHistogramRange(const TextureDescription *tex, CompType typeHint) { if(tex != NULL && (tex->format.compType == CompType::SNorm || typeHint == CompType::SNorm)) ui->rangeHistogram->setRange(-1.0f, 1.0f); @@ -1314,7 +1314,7 @@ void TextureViewer::UI_SetHistogramRange(const FetchTexture *tex, CompType typeH void TextureViewer::UI_UpdateChannels() { - FetchTexture *tex = GetCurrentTexture(); + TextureDescription *tex = GetCurrentTexture(); #define SHOW(widget) widget->setVisible(true) #define HIDE(widget) widget->setVisible(false) @@ -1629,7 +1629,7 @@ void TextureViewer::GotoLocation(int x, int y) if(!m_Ctx.LogLoaded()) return; - FetchTexture *tex = GetCurrentTexture(); + TextureDescription *tex = GetCurrentTexture(); if(tex == NULL) return; @@ -1674,7 +1674,7 @@ void TextureViewer::ViewTexture(ResourceId ID, bool focus) return; } - FetchTexture *tex = m_Ctx.GetTexture(ID); + TextureDescription *tex = m_Ctx.GetTexture(ID); if(tex) { QWidget *lockedContainer = new QWidget(this); @@ -1711,7 +1711,7 @@ void TextureViewer::ViewTexture(ResourceId ID, bool focus) return; } - FetchBuffer *buf = m_Ctx.GetBuffer(ID); + BufferDescription *buf = m_Ctx.GetBuffer(ID); if(buf) { BufferViewer *viewer = new BufferViewer(m_Ctx, false, m_Ctx.mainWindow()); @@ -1836,7 +1836,7 @@ void TextureViewer::OpenResourceContextMenu(ResourceId id, const rdctype::array< continue; } - const FetchDrawcall *curDraw = m_Ctx.GetDrawcall(u.eventID); + const DrawcallDescription *curDraw = m_Ctx.GetDrawcall(u.eventID); bool distinct = false; @@ -1852,7 +1852,7 @@ void TextureViewer::OpenResourceContextMenu(ResourceId id, const rdctype::array< // last event was where we were - otherwise it's a new // distinct set of drawcalls and should have a separate // entry in the context menu - const FetchDrawcall *prev = m_Ctx.GetDrawcall(curDraw->previous); + const DrawcallDescription *prev = m_Ctx.GetDrawcall(curDraw->previous); while(prev != NULL && prev->eventID > end) { @@ -1898,8 +1898,8 @@ void TextureViewer::InitResourcePreview(ResourcePreview *prev, ResourceId id, Co { if(id != ResourceId() || force) { - FetchTexture *texptr = m_Ctx.GetTexture(id); - FetchBuffer *bufptr = m_Ctx.GetBuffer(id); + TextureDescription *texptr = m_Ctx.GetTexture(id); + BufferDescription *bufptr = m_Ctx.GetBuffer(id); if(texptr != NULL) { @@ -2171,7 +2171,7 @@ void TextureViewer::render_mouseMove(QMouseEvent *e) if(m_TexDisplay.texid != ResourceId()) { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr != NULL) { @@ -2243,7 +2243,7 @@ void TextureViewer::render_resize(QResizeEvent *e) void TextureViewer::render_keyPress(QKeyEvent *e) { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr == NULL) return; @@ -2304,7 +2304,7 @@ void TextureViewer::render_keyPress(QKeyEvent *e) float TextureViewer::CurMaxScrollX() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); QSizeF size(1.0f, 1.0f); @@ -2316,7 +2316,7 @@ float TextureViewer::CurMaxScrollX() float TextureViewer::CurMaxScrollY() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); QSizeF size(1.0f, 1.0f); @@ -2357,7 +2357,7 @@ void TextureViewer::setScrollPosition(const QPoint &pos) void TextureViewer::UI_CalcScrollbars() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); QSizeF size(1.0f, 1.0f); @@ -2584,7 +2584,7 @@ void TextureViewer::OnEventChanged(uint32_t eventID) { UI_UpdateCachedTexture(); - FetchTexture *CurrentTexture = GetCurrentTexture(); + TextureDescription *CurrentTexture = GetCurrentTexture(); if(!currentTextureIsLocked() || (CurrentTexture != NULL && m_TexDisplay.texid != CurrentTexture->ID)) @@ -2745,7 +2745,7 @@ void TextureViewer::setPersistData(const QVariant &persistData) float TextureViewer::GetFitScale() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr == NULL) return 1.0f; @@ -3111,11 +3111,11 @@ void TextureViewer::on_checkerBack_clicked() void TextureViewer::on_mipLevel_currentIndexChanged(int index) { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr == NULL) return; - FetchTexture &tex = *texptr; + TextureDescription &tex = *texptr; uint32_t prevSlice = m_TexDisplay.sliceFace; @@ -3162,11 +3162,11 @@ void TextureViewer::on_mipLevel_currentIndexChanged(int index) void TextureViewer::on_sliceFace_currentIndexChanged(int index) { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr == NULL) return; - FetchTexture &tex = *texptr; + TextureDescription &tex = *texptr; m_TexDisplay.sliceFace = (uint32_t)index; if(tex.depth > 1) @@ -3189,7 +3189,7 @@ void TextureViewer::on_locationGoto_clicked() void TextureViewer::ShowGotoPopup() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr) { @@ -3208,7 +3208,7 @@ void TextureViewer::ShowGotoPopup() void TextureViewer::on_viewTexBuffer_clicked() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(texptr) { @@ -3227,7 +3227,7 @@ void TextureViewer::on_viewTexBuffer_clicked() void TextureViewer::on_saveTex_clicked() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(!texptr || !m_Output) return; @@ -3339,7 +3339,7 @@ void TextureViewer::on_debugPixelContext_clicked() void TextureViewer::on_pixelHistory_clicked() { - FetchTexture *texptr = GetCurrentTexture(); + TextureDescription *texptr = GetCurrentTexture(); if(!texptr || !m_Output) return; diff --git a/qrenderdoc/Windows/TextureViewer.h b/qrenderdoc/Windows/TextureViewer.h index 405e316b5..277d29ae3 100644 --- a/qrenderdoc/Windows/TextureViewer.h +++ b/qrenderdoc/Windows/TextureViewer.h @@ -213,7 +213,7 @@ private: void UI_UpdateTextureDetails(); void UI_OnTextureSelectionChanged(bool newdraw); - void UI_SetHistogramRange(const FetchTexture *tex, CompType typeHint); + void UI_SetHistogramRange(const TextureDescription *tex, CompType typeHint); void UI_UpdateChannels(); @@ -254,7 +254,7 @@ private: QPoint getScrollPosition(); void setScrollPosition(const QPoint &pos); - FetchTexture *GetCurrentTexture(); + TextureDescription *GetCurrentTexture(); void UI_UpdateCachedTexture(); void ShowGotoPopup(); @@ -299,7 +299,7 @@ private: CaptureContext &m_Ctx; IReplayOutput *m_Output = NULL; - FetchTexture *m_CachedTexture; + TextureDescription *m_CachedTexture; Following m_Following = Following::Default; QMap m_TextureSettings; diff --git a/renderdoc/api/replay/data_types.h b/renderdoc/api/replay/data_types.h index 8efba88f8..ea43f9614 100644 --- a/renderdoc/api/replay/data_types.h +++ b/renderdoc/api/replay/data_types.h @@ -87,7 +87,7 @@ struct ResourceFormat DECLARE_REFLECTION_STRUCT(ResourceFormat); -struct FetchBuffer +struct BufferDescription { ResourceId ID; rdctype::str name; @@ -96,9 +96,9 @@ struct FetchBuffer uint64_t length; }; -DECLARE_REFLECTION_STRUCT(FetchBuffer); +DECLARE_REFLECTION_STRUCT(BufferDescription); -struct FetchTexture +struct TextureDescription { rdctype::str name; bool32 customName; @@ -115,9 +115,9 @@ struct FetchTexture uint64_t byteSize; }; -DECLARE_REFLECTION_STRUCT(FetchTexture); +DECLARE_REFLECTION_STRUCT(TextureDescription); -struct FetchAPIEvent +struct APIEvent { uint32_t eventID; @@ -128,7 +128,7 @@ struct FetchAPIEvent uint64_t fileOffset; }; -DECLARE_REFLECTION_STRUCT(FetchAPIEvent); +DECLARE_REFLECTION_STRUCT(APIEvent); struct DebugMessage { @@ -150,7 +150,7 @@ enum BucketRecordType BUCKET_RECORD_TYPE_COUNT, }; -struct FetchFrameConstantBindStats +struct ConstantBindStats { enum Constants { @@ -164,9 +164,9 @@ struct FetchFrameConstantBindStats rdctype::array sizes; }; -DECLARE_REFLECTION_STRUCT(FetchFrameConstantBindStats); +DECLARE_REFLECTION_STRUCT(ConstantBindStats); -struct FetchFrameSamplerBindStats +struct SamplerBindStats { uint32_t calls; uint32_t sets; @@ -174,9 +174,9 @@ struct FetchFrameSamplerBindStats rdctype::array bindslots; }; -DECLARE_REFLECTION_STRUCT(FetchFrameSamplerBindStats); +DECLARE_REFLECTION_STRUCT(SamplerBindStats); -struct FetchFrameResourceBindStats +struct ResourceBindStats { uint32_t calls; uint32_t sets; @@ -185,9 +185,9 @@ struct FetchFrameResourceBindStats rdctype::array bindslots; }; -DECLARE_REFLECTION_STRUCT(FetchFrameResourceBindStats); +DECLARE_REFLECTION_STRUCT(ResourceBindStats); -struct FetchFrameUpdateStats +struct ResourceUpdateStats { enum Constants { @@ -201,9 +201,9 @@ struct FetchFrameUpdateStats rdctype::array sizes; }; -DECLARE_REFLECTION_STRUCT(FetchFrameUpdateStats); +DECLARE_REFLECTION_STRUCT(ResourceUpdateStats); -struct FetchFrameDrawStats +struct DrawcallStats { enum Constants { @@ -217,26 +217,26 @@ struct FetchFrameDrawStats rdctype::array counts; }; -DECLARE_REFLECTION_STRUCT(FetchFrameDrawStats); +DECLARE_REFLECTION_STRUCT(DrawcallStats); -struct FetchFrameDispatchStats +struct DispatchStats { uint32_t calls; uint32_t indirect; }; -DECLARE_REFLECTION_STRUCT(FetchFrameDispatchStats); +DECLARE_REFLECTION_STRUCT(DispatchStats); -struct FetchFrameIndexBindStats +struct IndexBindStats { uint32_t calls; uint32_t sets; uint32_t nulls; }; -DECLARE_REFLECTION_STRUCT(FetchFrameIndexBindStats); +DECLARE_REFLECTION_STRUCT(IndexBindStats); -struct FetchFrameVertexBindStats +struct VertexBindStats { uint32_t calls; uint32_t sets; @@ -244,18 +244,18 @@ struct FetchFrameVertexBindStats rdctype::array bindslots; }; -DECLARE_REFLECTION_STRUCT(FetchFrameVertexBindStats); +DECLARE_REFLECTION_STRUCT(VertexBindStats); -struct FetchFrameLayoutBindStats +struct LayoutBindStats { uint32_t calls; uint32_t sets; uint32_t nulls; }; -DECLARE_REFLECTION_STRUCT(FetchFrameLayoutBindStats); +DECLARE_REFLECTION_STRUCT(LayoutBindStats); -struct FetchFrameShaderStats +struct ShaderChangeStats { uint32_t calls; uint32_t sets; @@ -263,9 +263,9 @@ struct FetchFrameShaderStats uint32_t redundants; }; -DECLARE_REFLECTION_STRUCT(FetchFrameShaderStats); +DECLARE_REFLECTION_STRUCT(ShaderChangeStats); -struct FetchFrameBlendStats +struct BlendStats { uint32_t calls; uint32_t sets; @@ -273,9 +273,9 @@ struct FetchFrameBlendStats uint32_t redundants; }; -DECLARE_REFLECTION_STRUCT(FetchFrameBlendStats); +DECLARE_REFLECTION_STRUCT(BlendStats); -struct FetchFrameDepthStencilStats +struct DepthStencilStats { uint32_t calls; uint32_t sets; @@ -283,9 +283,9 @@ struct FetchFrameDepthStencilStats uint32_t redundants; }; -DECLARE_REFLECTION_STRUCT(FetchFrameDepthStencilStats); +DECLARE_REFLECTION_STRUCT(DepthStencilStats); -struct FetchFrameRasterizationStats +struct RasterizationStats { uint32_t calls; uint32_t sets; @@ -295,9 +295,9 @@ struct FetchFrameRasterizationStats rdctype::array rects; }; -DECLARE_REFLECTION_STRUCT(FetchFrameRasterizationStats); +DECLARE_REFLECTION_STRUCT(RasterizationStats); -struct FetchFrameOutputStats +struct OutputTargetStats { uint32_t calls; uint32_t sets; @@ -305,32 +305,32 @@ struct FetchFrameOutputStats rdctype::array bindslots; }; -DECLARE_REFLECTION_STRUCT(FetchFrameOutputStats); +DECLARE_REFLECTION_STRUCT(OutputTargetStats); -struct FetchFrameStatistics +struct FrameStatistics { bool32 recorded; - FetchFrameConstantBindStats constants[ENUM_ARRAY_SIZE(ShaderStage)]; - FetchFrameSamplerBindStats samplers[ENUM_ARRAY_SIZE(ShaderStage)]; - FetchFrameResourceBindStats resources[ENUM_ARRAY_SIZE(ShaderStage)]; - FetchFrameUpdateStats updates; - FetchFrameDrawStats draws; - FetchFrameDispatchStats dispatches; - FetchFrameIndexBindStats indices; - FetchFrameVertexBindStats vertices; - FetchFrameLayoutBindStats layouts; - FetchFrameShaderStats shaders[ENUM_ARRAY_SIZE(ShaderStage)]; - FetchFrameBlendStats blends; - FetchFrameDepthStencilStats depths; - FetchFrameRasterizationStats rasters; - FetchFrameOutputStats outputs; + ConstantBindStats constants[ENUM_ARRAY_SIZE(ShaderStage)]; + SamplerBindStats samplers[ENUM_ARRAY_SIZE(ShaderStage)]; + ResourceBindStats resources[ENUM_ARRAY_SIZE(ShaderStage)]; + ResourceUpdateStats updates; + DrawcallStats draws; + DispatchStats dispatches; + IndexBindStats indices; + VertexBindStats vertices; + LayoutBindStats layouts; + ShaderChangeStats shaders[ENUM_ARRAY_SIZE(ShaderStage)]; + BlendStats blends; + DepthStencilStats depths; + RasterizationStats rasters; + OutputTargetStats outputs; }; -DECLARE_REFLECTION_STRUCT(FetchFrameStatistics); +DECLARE_REFLECTION_STRUCT(FrameStatistics); -struct FetchFrameInfo +struct FrameDescription { - FetchFrameInfo() + FrameDescription() : frameNumber(0), fileOffset(0), uncompressedFileSize(0), @@ -348,11 +348,11 @@ struct FetchFrameInfo uint64_t persistentSize; uint64_t initDataSize; uint64_t captureTime; - FetchFrameStatistics stats; + FrameStatistics stats; rdctype::array debugMessages; }; -DECLARE_REFLECTION_STRUCT(FetchFrameInfo); +DECLARE_REFLECTION_STRUCT(FrameDescription); struct EventUsage { @@ -374,9 +374,9 @@ struct EventUsage DECLARE_REFLECTION_STRUCT(EventUsage); -struct FetchDrawcall +struct DrawcallDescription { - FetchDrawcall() { Reset(); } + DrawcallDescription() { Reset(); } void Reset() { eventID = 0; @@ -440,11 +440,11 @@ struct FetchDrawcall ResourceId outputs[8]; ResourceId depthOut; - rdctype::array events; - rdctype::array children; + rdctype::array events; + rdctype::array children; }; -DECLARE_REFLECTION_STRUCT(FetchDrawcall); +DECLARE_REFLECTION_STRUCT(DrawcallDescription); struct APIProperties { diff --git a/renderdoc/api/replay/renderdoc_replay.h b/renderdoc/api/replay/renderdoc_replay.h index f596c1cec..b997d09ff 100644 --- a/renderdoc/api/replay/renderdoc_replay.h +++ b/renderdoc/api/replay/renderdoc_replay.h @@ -226,14 +226,14 @@ struct IReplayRenderer virtual bool RemoveReplacement(ResourceId id) = 0; virtual bool FreeTargetResource(ResourceId id) = 0; - virtual bool GetFrameInfo(FetchFrameInfo *frame) = 0; - virtual bool GetDrawcalls(rdctype::array *draws) = 0; + virtual bool GetFrameInfo(FrameDescription *frame) = 0; + virtual bool GetDrawcalls(rdctype::array *draws) = 0; virtual bool FetchCounters(GPUCounter *counters, uint32_t numCounters, rdctype::array *results) = 0; virtual bool EnumerateCounters(rdctype::array *counters) = 0; virtual bool DescribeCounter(GPUCounter counterID, CounterDescription *desc) = 0; - virtual bool GetTextures(rdctype::array *texs) = 0; - virtual bool GetBuffers(rdctype::array *bufs) = 0; + virtual bool GetTextures(rdctype::array *texs) = 0; + virtual bool GetBuffers(rdctype::array *bufs) = 0; virtual bool GetResolve(uint64_t *callstack, uint32_t callstackLen, rdctype::array *trace) = 0; virtual bool GetDebugMessages(rdctype::array *msgs) = 0; diff --git a/renderdoc/core/image_viewer.cpp b/renderdoc/core/image_viewer.cpp index 97bc41736..b4d487ab8 100644 --- a/renderdoc/core/image_viewer.cpp +++ b/renderdoc/core/image_viewer.cpp @@ -48,7 +48,7 @@ public: RDCEraseEl(m_FrameRecord.frameInfo.stats); create_array_uninit(m_FrameRecord.drawcallList, 1); - FetchDrawcall &d = m_FrameRecord.drawcallList[0]; + DrawcallDescription &d = m_FrameRecord.drawcallList[0]; d.drawcallID = 1; d.eventID = 1; d.name = filename; @@ -136,7 +136,7 @@ public: return m_Proxy->ApplyCustomShader(shader, m_TextureID, mip, arrayIdx, sampleIdx, typeHint); } vector GetTextures() { return m_Proxy->GetTextures(); } - FetchTexture GetTexture(ResourceId id) { return m_Proxy->GetTexture(m_TextureID); } + TextureDescription GetTexture(ResourceId id) { return m_Proxy->GetTexture(m_TextureID); } byte *GetTextureData(ResourceId tex, uint32_t arrayIdx, uint32_t mip, const GetTextureDataParams ¶ms, size_t &dataSize) { @@ -145,7 +145,7 @@ public: // handle a couple of operations ourselves to return a simple fake log APIProperties GetAPIProperties() { return m_Props; } - FetchFrameRecord GetFrameRecord() { return m_FrameRecord; } + FrameRecord GetFrameRecord() { return m_FrameRecord; } D3D11Pipe::State GetD3D11PipelineState() { return m_PipelineState; } // other operations are dropped/ignored, to avoid confusion void ReadLogInitialisation() {} @@ -154,9 +154,9 @@ public: } vector GetBuffers() { return vector(); } vector GetDebugMessages() { return vector(); } - FetchBuffer GetBuffer(ResourceId id) + BufferDescription GetBuffer(ResourceId id) { - FetchBuffer ret; + BufferDescription ret; RDCEraseEl(ret); return ret; } @@ -235,7 +235,7 @@ public: void ReplaceResource(ResourceId from, ResourceId to) {} void RemoveReplacement(ResourceId id) {} // these are proxy functions, and will never be used - ResourceId CreateProxyTexture(const FetchTexture &templateTex) + ResourceId CreateProxyTexture(const TextureDescription &templateTex) { RDCERR("Calling proxy-render functions on an image viewer"); return ResourceId(); @@ -247,7 +247,7 @@ public: RDCERR("Calling proxy-render functions on an image viewer"); } bool IsTextureSupported(const ResourceFormat &format) { return true; } - ResourceId CreateProxyBuffer(const FetchBuffer &templateBuf) + ResourceId CreateProxyBuffer(const BufferDescription &templateBuf) { RDCERR("Calling proxy-render functions on an image viewer"); return ResourceId(); @@ -263,12 +263,12 @@ private: void RefreshFile(); APIProperties m_Props; - FetchFrameRecord m_FrameRecord; + FrameRecord m_FrameRecord; D3D11Pipe::State m_PipelineState; IReplayDriver *m_Proxy; string m_Filename; ResourceId m_TextureID; - FetchTexture m_TexDetails; + TextureDescription m_TexDetails; }; ReplayStatus IMG_CreateReplayDevice(const char *logfile, IReplayDriver **driver) @@ -405,7 +405,7 @@ void ImageViewer::RefreshFile() return; } - FetchTexture texDetails; + TextureDescription texDetails; ResourceFormat rgba8_unorm; rgba8_unorm.compByteWidth = 1; diff --git a/renderdoc/core/replay_proxy.cpp b/renderdoc/core/replay_proxy.cpp index de88a24f7..8b3fe4b33 100644 --- a/renderdoc/core/replay_proxy.cpp +++ b/renderdoc/core/replay_proxy.cpp @@ -1258,7 +1258,7 @@ void Serialiser::Serialise(const char *name, VKPipe::State &el) #pragma region Data descriptors template <> -void Serialiser::Serialise(const char *name, FetchTexture &el) +void Serialiser::Serialise(const char *name, TextureDescription &el) { Serialise("", el.name); Serialise("", el.customName); @@ -1281,7 +1281,7 @@ void Serialiser::Serialise(const char *name, FetchTexture &el) } template <> -void Serialiser::Serialise(const char *name, FetchBuffer &el) +void Serialiser::Serialise(const char *name, BufferDescription &el) { Serialise("", el.ID); Serialise("", el.name); @@ -1316,7 +1316,7 @@ void Serialiser::Serialise(const char *name, DebugMessage &el) } template <> -void Serialiser::Serialise(const char *name, FetchAPIEvent &el) +void Serialiser::Serialise(const char *name, APIEvent &el) { Serialise("", el.eventID); Serialise("", el.callstack); @@ -1327,7 +1327,7 @@ void Serialiser::Serialise(const char *name, FetchAPIEvent &el) } template <> -void Serialiser::Serialise(const char *name, FetchDrawcall &el) +void Serialiser::Serialise(const char *name, DrawcallDescription &el) { Serialise("", el.eventID); Serialise("", el.drawcallID); @@ -1368,7 +1368,7 @@ void Serialiser::Serialise(const char *name, FetchDrawcall &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameConstantBindStats &el) +void Serialiser::Serialise(const char *name, ConstantBindStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1380,7 +1380,7 @@ void Serialiser::Serialise(const char *name, FetchFrameConstantBindStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameSamplerBindStats &el) +void Serialiser::Serialise(const char *name, SamplerBindStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1391,7 +1391,7 @@ void Serialiser::Serialise(const char *name, FetchFrameSamplerBindStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameResourceBindStats &el) +void Serialiser::Serialise(const char *name, ResourceBindStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1403,7 +1403,7 @@ void Serialiser::Serialise(const char *name, FetchFrameResourceBindStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameUpdateStats &el) +void Serialiser::Serialise(const char *name, ResourceUpdateStats &el) { Serialise("", el.calls); Serialise("", el.clients); @@ -1415,7 +1415,7 @@ void Serialiser::Serialise(const char *name, FetchFrameUpdateStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameDrawStats &el) +void Serialiser::Serialise(const char *name, DrawcallStats &el) { Serialise("", el.calls); Serialise("", el.instanced); @@ -1426,7 +1426,7 @@ void Serialiser::Serialise(const char *name, FetchFrameDrawStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameDispatchStats &el) +void Serialiser::Serialise(const char *name, DispatchStats &el) { Serialise("", el.calls); Serialise("", el.indirect); @@ -1435,7 +1435,7 @@ void Serialiser::Serialise(const char *name, FetchFrameDispatchStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameIndexBindStats &el) +void Serialiser::Serialise(const char *name, IndexBindStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1445,7 +1445,7 @@ void Serialiser::Serialise(const char *name, FetchFrameIndexBindStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameVertexBindStats &el) +void Serialiser::Serialise(const char *name, VertexBindStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1456,7 +1456,7 @@ void Serialiser::Serialise(const char *name, FetchFrameVertexBindStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameLayoutBindStats &el) +void Serialiser::Serialise(const char *name, LayoutBindStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1466,7 +1466,7 @@ void Serialiser::Serialise(const char *name, FetchFrameLayoutBindStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameShaderStats &el) +void Serialiser::Serialise(const char *name, ShaderChangeStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1477,7 +1477,7 @@ void Serialiser::Serialise(const char *name, FetchFrameShaderStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameBlendStats &el) +void Serialiser::Serialise(const char *name, BlendStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1488,7 +1488,7 @@ void Serialiser::Serialise(const char *name, FetchFrameBlendStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameDepthStencilStats &el) +void Serialiser::Serialise(const char *name, DepthStencilStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1499,7 +1499,7 @@ void Serialiser::Serialise(const char *name, FetchFrameDepthStencilStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameRasterizationStats &el) +void Serialiser::Serialise(const char *name, RasterizationStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1512,7 +1512,7 @@ void Serialiser::Serialise(const char *name, FetchFrameRasterizationStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameOutputStats &el) +void Serialiser::Serialise(const char *name, OutputTargetStats &el) { Serialise("", el.calls); Serialise("", el.sets); @@ -1523,18 +1523,18 @@ void Serialiser::Serialise(const char *name, FetchFrameOutputStats &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameStatistics &el) +void Serialiser::Serialise(const char *name, FrameStatistics &el) { Serialise("", el.recorded); // #mivance note this is technically error-prone from the perspective // that we're passing references to pointers, but as we're really // dealing with arrays,t hey'll never be NULL and need to be assigned // to, so this is fine - FetchFrameConstantBindStats *constants = el.constants; + ConstantBindStats *constants = el.constants; SerialiseComplexArray<(uint32_t)ShaderStage::Count>("", constants); - FetchFrameSamplerBindStats *samplers = el.samplers; + SamplerBindStats *samplers = el.samplers; SerialiseComplexArray<(uint32_t)ShaderStage::Count>("", samplers); - FetchFrameResourceBindStats *resources = el.resources; + ResourceBindStats *resources = el.resources; SerialiseComplexArray<(uint32_t)ShaderStage::Count>("", resources); Serialise("", el.updates); Serialise("", el.draws); @@ -1542,7 +1542,7 @@ void Serialiser::Serialise(const char *name, FetchFrameStatistics &el) Serialise("", el.indices); Serialise("", el.vertices); Serialise("", el.layouts); - FetchFrameShaderStats *shaders = el.shaders; + ShaderChangeStats *shaders = el.shaders; SerialiseComplexArray<(uint32_t)ShaderStage::Count>("", shaders); Serialise("", el.blends); Serialise("", el.depths); @@ -1553,7 +1553,7 @@ void Serialiser::Serialise(const char *name, FetchFrameStatistics &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameInfo &el) +void Serialiser::Serialise(const char *name, FrameDescription &el) { Serialise("", el.frameNumber); Serialise("", el.fileOffset); @@ -1569,7 +1569,7 @@ void Serialiser::Serialise(const char *name, FetchFrameInfo &el) } template <> -void Serialiser::Serialise(const char *name, FetchFrameRecord &el) +void Serialiser::Serialise(const char *name, FrameRecord &el) { Serialise("", el.frameInfo); Serialise("", el.drawcallList); @@ -2057,7 +2057,7 @@ void ReplayProxy::EnsureTexCached(ResourceId texid, uint32_t arrayIdx, uint32_t { if(m_ProxyTextures.find(texid) == m_ProxyTextures.end()) { - FetchTexture tex = GetTexture(texid); + TextureDescription tex = GetTexture(texid); ProxyTextureProperties proxy; RemapProxyTextureIfNeeded(tex.format, proxy.params); @@ -2089,7 +2089,7 @@ void ReplayProxy::EnsureBufCached(ResourceId bufid) { if(m_ProxyBufferIds.find(bufid) == m_ProxyBufferIds.end()) { - FetchBuffer buf = GetBuffer(bufid); + BufferDescription buf = GetBuffer(bufid); m_ProxyBufferIds[bufid] = m_Proxy->CreateProxyBuffer(buf); } @@ -2291,9 +2291,9 @@ vector ReplayProxy::GetDebugMessages() return ret; } -FetchTexture ReplayProxy::GetTexture(ResourceId id) +TextureDescription ReplayProxy::GetTexture(ResourceId id) { - FetchTexture ret = {}; + TextureDescription ret = {}; m_ToReplaySerialiser->Serialise("", id); @@ -2331,9 +2331,9 @@ vector ReplayProxy::GetBuffers() return ret; } -FetchBuffer ReplayProxy::GetBuffer(ResourceId id) +BufferDescription ReplayProxy::GetBuffer(ResourceId id) { - FetchBuffer ret = {}; + BufferDescription ret = {}; m_ToReplaySerialiser->Serialise("", id); @@ -2440,9 +2440,9 @@ vector ReplayProxy::GetUsage(ResourceId id) return ret; } -FetchFrameRecord ReplayProxy::GetFrameRecord() +FrameRecord ReplayProxy::GetFrameRecord() { - FetchFrameRecord ret; + FrameRecord ret; if(m_RemoteServer) { diff --git a/renderdoc/core/replay_proxy.h b/renderdoc/core/replay_proxy.h index 2b3ca520f..40396b0e3 100644 --- a/renderdoc/core/replay_proxy.h +++ b/renderdoc/core/replay_proxy.h @@ -260,7 +260,7 @@ public: if((m_APIProps.pipelineType == GraphicsAPI::OpenGL) != (m_APIProps.localRenderer == GraphicsAPI::OpenGL)) { - FetchTexture tex = m_Proxy->GetTexture(texture); + TextureDescription tex = m_Proxy->GetTexture(texture); uint32_t mipHeight = RDCMAX(1U, tex.height >> mip); y = (mipHeight - 1) - y; } @@ -387,10 +387,10 @@ public: bool Tick(int type, Serialiser *incomingPacket); vector GetBuffers(); - FetchBuffer GetBuffer(ResourceId id); + BufferDescription GetBuffer(ResourceId id); vector GetTextures(); - FetchTexture GetTexture(ResourceId id); + TextureDescription GetTexture(ResourceId id); APIProperties GetAPIProperties(); @@ -406,7 +406,7 @@ public: vector GetPassEvents(uint32_t eventID); vector GetUsage(ResourceId id); - FetchFrameRecord GetFrameRecord(); + FrameRecord GetFrameRecord(); bool IsRenderOutput(ResourceId id); @@ -456,7 +456,7 @@ public: void FileChanged() {} // will never be used - ResourceId CreateProxyTexture(const FetchTexture &templateTex) + ResourceId CreateProxyTexture(const TextureDescription &templateTex) { RDCERR("Calling proxy-render functions on a proxy serialiser"); return ResourceId(); @@ -469,7 +469,7 @@ public: } bool IsTextureSupported(const ResourceFormat &format) { return true; } - ResourceId CreateProxyBuffer(const FetchBuffer &templateBuf) + ResourceId CreateProxyBuffer(const BufferDescription &templateBuf) { RDCERR("Calling proxy-render functions on a proxy serialiser"); return ResourceId(); diff --git a/renderdoc/driver/d3d11/d3d11_analyse.cpp b/renderdoc/driver/d3d11/d3d11_analyse.cpp index 44592fcc1..1b92724f0 100644 --- a/renderdoc/driver/d3d11/d3d11_analyse.cpp +++ b/renderdoc/driver/d3d11/d3d11_analyse.cpp @@ -926,7 +926,7 @@ ShaderDebugTrace D3D11DebugManager::DebugVertex(uint32_t eventID, uint32_t verti ShaderDebugTrace empty; - const FetchDrawcall *draw = m_WrappedDevice->GetDrawcall(eventID); + const DrawcallDescription *draw = m_WrappedDevice->GetDrawcall(eventID); D3D11RenderStateTracker tracker(m_WrappedContext); @@ -4048,7 +4048,7 @@ ResourceId D3D11DebugManager::RenderOverlay(ResourceId texid, CompType typeHint, SAFE_RELEASE(ds); - const FetchDrawcall *draw = m_WrappedDevice->GetDrawcall(events[i]); + const DrawcallDescription *draw = m_WrappedDevice->GetDrawcall(events[i]); for(uint32_t inst = 0; draw && inst < RDCMAX(1U, draw->numInstances); inst++) { @@ -5802,7 +5802,7 @@ vector D3D11DebugManager::PixelHistory(vector eve D3D11RenderState::ResourceRange resourceRange(targetres, mip, slice); - const FetchDrawcall *draw = m_WrappedDevice->GetDrawcall(events[i].eventID); + const DrawcallDescription *draw = m_WrappedDevice->GetDrawcall(events[i].eventID); bool clear = bool(draw->flags & DrawFlags::Clear); @@ -6501,7 +6501,7 @@ vector D3D11DebugManager::PixelHistory(vector eve for(size_t h = 0; h < history.size(); h++) { - const FetchDrawcall *draw = m_WrappedDevice->GetDrawcall(history[h].eventID); + const DrawcallDescription *draw = m_WrappedDevice->GetDrawcall(history[h].eventID); if(draw->flags & DrawFlags::Clear) continue; @@ -6754,7 +6754,7 @@ vector D3D11DebugManager::PixelHistory(vector eve for(size_t h = 0; h < history.size(); h++) { - const FetchDrawcall *draw = m_WrappedDevice->GetDrawcall(history[h].eventID); + const DrawcallDescription *draw = m_WrappedDevice->GetDrawcall(history[h].eventID); if(draw->flags & DrawFlags::Clear) continue; diff --git a/renderdoc/driver/d3d11/d3d11_context.cpp b/renderdoc/driver/d3d11/d3d11_context.cpp index fbea22f31..d6b72c364 100644 --- a/renderdoc/driver/d3d11/d3d11_context.cpp +++ b/renderdoc/driver/d3d11/d3d11_context.cpp @@ -805,7 +805,7 @@ void WrappedID3D11DeviceContext::ProcessChunk(uint64_t offset, D3D11ChunkType ch if(!m_PresentChunk) AddEvent("IDXGISwapChain::Present()"); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "Present()"; draw.flags |= DrawFlags::Present; @@ -847,7 +847,7 @@ void WrappedID3D11DeviceContext::ProcessChunk(uint64_t offset, D3D11ChunkType ch context->m_State = state; } -void WrappedID3D11DeviceContext::AddUsage(const FetchDrawcall &d) +void WrappedID3D11DeviceContext::AddUsage(const DrawcallDescription &d) { const D3D11RenderState *pipe = m_CurrentPipelineState; uint32_t e = d.eventID; @@ -947,9 +947,9 @@ void WrappedID3D11DeviceContext::AddUsage(const FetchDrawcall &d) } } -void WrappedID3D11DeviceContext::AddDrawcall(const FetchDrawcall &d, bool hasEvents) +void WrappedID3D11DeviceContext::AddDrawcall(const DrawcallDescription &d, bool hasEvents) { - FetchDrawcall draw = d; + DrawcallDescription draw = d; m_AddedDrawcall = true; @@ -1008,7 +1008,7 @@ void WrappedID3D11DeviceContext::AddDrawcall(const FetchDrawcall &d, bool hasEve void WrappedID3D11DeviceContext::AddEvent(string description) { - FetchAPIEvent apievent; + APIEvent apievent; apievent.fileOffset = m_CurChunkOffset; apievent.eventID = m_CurEventID; @@ -1028,7 +1028,7 @@ void WrappedID3D11DeviceContext::AddEvent(string description) m_Events.push_back(apievent); } -FetchAPIEvent WrappedID3D11DeviceContext::GetEvent(uint32_t eventID) +APIEvent WrappedID3D11DeviceContext::GetEvent(uint32_t eventID) { for(size_t i = m_Events.size() - 1; i > 0; i--) { @@ -1429,7 +1429,7 @@ void WrappedID3D11DeviceContext::ReplayLog(LogState readType, uint32_t startEven if(m_State == EXECUTING) { - FetchAPIEvent ev = GetEvent(startEventID); + APIEvent ev = GetEvent(startEventID); m_CurEventID = ev.eventID; m_pSerialiser->SetOffset(ev.fileOffset); } @@ -1677,8 +1677,8 @@ HRESULT STDMETHODCALLTYPE WrappedID3D11DeviceContext::QueryInterface(REFIID riid void WrappedID3D11DeviceContext::RecordIndexBindStats(ID3D11Buffer *Buffer) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameIndexBindStats &indices = stats.indices; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + IndexBindStats &indices = stats.indices; indices.calls += 1; indices.sets += (Buffer != NULL); indices.nulls += (Buffer == NULL); @@ -1686,8 +1686,8 @@ void WrappedID3D11DeviceContext::RecordIndexBindStats(ID3D11Buffer *Buffer) void WrappedID3D11DeviceContext::RecordVertexBindStats(UINT NumBuffers, ID3D11Buffer *Buffers[]) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameVertexBindStats &vertices = stats.vertices; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + VertexBindStats &vertices = stats.vertices; vertices.calls += 1; RDCASSERT(NumBuffers < vertices.bindslots.size()); vertices.bindslots[NumBuffers] += 1; @@ -1703,8 +1703,8 @@ void WrappedID3D11DeviceContext::RecordVertexBindStats(UINT NumBuffers, ID3D11Bu void WrappedID3D11DeviceContext::RecordLayoutBindStats(ID3D11InputLayout *Layout) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameLayoutBindStats &layouts = stats.layouts; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + LayoutBindStats &layouts = stats.layouts; layouts.calls += 1; layouts.sets += (Layout != NULL); layouts.nulls += (Layout == NULL); @@ -1713,9 +1713,9 @@ void WrappedID3D11DeviceContext::RecordLayoutBindStats(ID3D11InputLayout *Layout void WrappedID3D11DeviceContext::RecordConstantStats(ShaderStage stage, UINT NumBuffers, ID3D11Buffer *Buffers[]) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); + FrameStatistics &stats = m_pDevice->GetFrameStats(); RDCASSERT(size_t(stage) < ARRAY_COUNT(stats.constants)); - FetchFrameConstantBindStats &constants = stats.constants[uint32_t(stage)]; + ConstantBindStats &constants = stats.constants[uint32_t(stage)]; constants.calls += 1; RDCASSERT(NumBuffers < constants.bindslots.size()); constants.bindslots[NumBuffers] += 1; @@ -1729,7 +1729,7 @@ void WrappedID3D11DeviceContext::RecordConstantStats(ShaderStage stage, UINT Num D3D11_BUFFER_DESC desc; Buffers[i]->GetDesc(&desc); uint32_t bufferSize = desc.ByteWidth; - size_t bucket = BucketForRecordPow2(bufferSize); + size_t bucket = BucketForRecordPow2(bufferSize); RDCASSERT(bucket < constants.sizes.size()); constants.sizes[bucket] += 1; } @@ -1743,9 +1743,9 @@ void WrappedID3D11DeviceContext::RecordConstantStats(ShaderStage stage, UINT Num void WrappedID3D11DeviceContext::RecordResourceStats(ShaderStage stage, UINT NumResources, ID3D11ShaderResourceView *Resources[]) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); + FrameStatistics &stats = m_pDevice->GetFrameStats(); RDCASSERT(size_t(stage) < ARRAY_COUNT(stats.resources)); - FetchFrameResourceBindStats &resources = stats.resources[(uint32_t)stage]; + ResourceBindStats &resources = stats.resources[(uint32_t)stage]; resources.calls += 1; RDCASSERT(NumResources < resources.bindslots.size()); resources.bindslots[NumResources] += 1; @@ -1784,9 +1784,9 @@ void WrappedID3D11DeviceContext::RecordResourceStats(ShaderStage stage, UINT Num void WrappedID3D11DeviceContext::RecordSamplerStats(ShaderStage stage, UINT NumSamplers, ID3D11SamplerState *Samplers[]) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); + FrameStatistics &stats = m_pDevice->GetFrameStats(); RDCASSERT(size_t(stage) < ARRAY_COUNT(stats.samplers)); - FetchFrameSamplerBindStats &samplers = stats.samplers[uint32_t(stage)]; + SamplerBindStats &samplers = stats.samplers[uint32_t(stage)]; samplers.calls += 1; RDCASSERT(NumSamplers < samplers.bindslots.size()); samplers.bindslots[NumSamplers] += 1; @@ -1802,8 +1802,8 @@ void WrappedID3D11DeviceContext::RecordSamplerStats(ShaderStage stage, UINT NumS void WrappedID3D11DeviceContext::RecordUpdateStats(ID3D11Resource *res, uint32_t Size, bool Server) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameUpdateStats &updates = stats.updates; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + ResourceUpdateStats &updates = stats.updates; if(res == NULL) return; @@ -1830,14 +1830,14 @@ void WrappedID3D11DeviceContext::RecordUpdateStats(ID3D11Resource *res, uint32_t // #mivance it might be nice to query the buffer to differentiate // between bindings for constant buffers - size_t bucket = BucketForRecordPow2(Size); + size_t bucket = BucketForRecordPow2(Size); updates.sizes[bucket] += 1; } void WrappedID3D11DeviceContext::RecordDrawStats(bool instanced, bool indirect, UINT InstanceCount) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameDrawStats &draws = stats.draws; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + DrawcallStats &draws = stats.draws; draws.calls += 1; draws.instanced += (uint32_t)instanced; @@ -1845,7 +1845,7 @@ void WrappedID3D11DeviceContext::RecordDrawStats(bool instanced, bool indirect, if(instanced) { - size_t bucket = BucketForRecordLinear(InstanceCount); + size_t bucket = BucketForRecordLinear(InstanceCount); RDCASSERT(bucket < draws.counts.size()); draws.counts[bucket] += 1; } @@ -1853,8 +1853,8 @@ void WrappedID3D11DeviceContext::RecordDrawStats(bool instanced, bool indirect, void WrappedID3D11DeviceContext::RecordDispatchStats(bool indirect) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameDispatchStats &dispatches = stats.dispatches; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + DispatchStats &dispatches = stats.dispatches; dispatches.calls += 1; dispatches.indirect += (uint32_t)indirect; @@ -1863,9 +1863,9 @@ void WrappedID3D11DeviceContext::RecordDispatchStats(bool indirect) void WrappedID3D11DeviceContext::RecordShaderStats(ShaderStage stage, ID3D11DeviceChild *Current, ID3D11DeviceChild *Shader) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); + FrameStatistics &stats = m_pDevice->GetFrameStats(); RDCASSERT(size_t(stage) <= ARRAY_COUNT(stats.shaders)); - FetchFrameShaderStats &shaders = stats.shaders[uint32_t(stage)]; + ShaderChangeStats &shaders = stats.shaders[uint32_t(stage)]; shaders.calls += 1; shaders.sets += (Shader != NULL); @@ -1876,8 +1876,8 @@ void WrappedID3D11DeviceContext::RecordShaderStats(ShaderStage stage, ID3D11Devi void WrappedID3D11DeviceContext::RecordBlendStats(ID3D11BlendState *Blend, FLOAT BlendFactor[4], UINT SampleMask) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameBlendStats &blends = stats.blends; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + BlendStats &blends = stats.blends; blends.calls += 1; blends.sets += (Blend != NULL); @@ -1892,8 +1892,8 @@ void WrappedID3D11DeviceContext::RecordBlendStats(ID3D11BlendState *Blend, FLOAT void WrappedID3D11DeviceContext::RecordDepthStencilStats(ID3D11DepthStencilState *DepthStencil, UINT StencilRef) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameDepthStencilStats &depths = stats.depths; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + DepthStencilStats &depths = stats.depths; depths.calls += 1; depths.sets += (DepthStencil != NULL); @@ -1905,8 +1905,8 @@ void WrappedID3D11DeviceContext::RecordDepthStencilStats(ID3D11DepthStencilState void WrappedID3D11DeviceContext::RecordRasterizationStats(ID3D11RasterizerState *Rasterizer) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameRasterizationStats &rasters = stats.rasters; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + RasterizationStats &rasters = stats.rasters; rasters.calls += 1; rasters.sets += (Rasterizer != NULL); @@ -1919,8 +1919,8 @@ void WrappedID3D11DeviceContext::RecordRasterizationStats(ID3D11RasterizerState void WrappedID3D11DeviceContext::RecordViewportStats(UINT NumViewports, const D3D11_VIEWPORT *viewports) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameRasterizationStats &rasters = stats.rasters; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + RasterizationStats &rasters = stats.rasters; rasters.calls += 1; rasters.sets += 1; @@ -1938,8 +1938,8 @@ void WrappedID3D11DeviceContext::RecordViewportStats(UINT NumViewports, void WrappedID3D11DeviceContext::RecordScissorStats(UINT NumRects, const D3D11_RECT *rects) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameRasterizationStats &rasters = stats.rasters; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + RasterizationStats &rasters = stats.rasters; rasters.calls += 1; rasters.sets += 1; @@ -1960,8 +1960,8 @@ void WrappedID3D11DeviceContext::RecordOutputMergerStats(UINT NumRTVs, ID3D11Ren UINT UAVStartSlot, UINT NumUAVs, ID3D11UnorderedAccessView *UAVs[]) { - FetchFrameStatistics &stats = m_pDevice->GetFrameStats(); - FetchFrameOutputStats &outputs = stats.outputs; + FrameStatistics &stats = m_pDevice->GetFrameStats(); + OutputTargetStats &outputs = stats.outputs; outputs.calls += 1; // #mivance is an elaborate redundancy here even useful? diff --git a/renderdoc/driver/d3d11/d3d11_context.h b/renderdoc/driver/d3d11/d3d11_context.h index 4b703894b..02119ad23 100644 --- a/renderdoc/driver/d3d11/d3d11_context.h +++ b/renderdoc/driver/d3d11/d3d11_context.h @@ -101,13 +101,13 @@ enum CaptureFailReason struct DrawcallTreeNode { DrawcallTreeNode() {} - explicit DrawcallTreeNode(const FetchDrawcall &d) : draw(d) {} - FetchDrawcall draw; + explicit DrawcallTreeNode(const DrawcallDescription &d) : draw(d) {} + DrawcallDescription draw; vector children; - vector Bake() + vector Bake() { - vector ret; + vector ret; if(children.empty()) return ret; @@ -220,7 +220,7 @@ private: D3D11RenderState *m_DeferredSavedState; - vector m_CurEvents, m_Events; + vector m_CurEvents, m_Events; bool m_AddedDrawcall; WrappedID3DUserDefinedAnnotation m_UserAnnotation; @@ -256,10 +256,10 @@ private: void DrainAnnotationQueue(); - void AddUsage(const FetchDrawcall &d); + void AddUsage(const DrawcallDescription &d); void AddEvent(string description); - void AddDrawcall(const FetchDrawcall &d, bool hasEvents); + void AddDrawcall(const DrawcallDescription &d, bool hasEvents); void RecordIndexBindStats(ID3D11Buffer *Buffer); void RecordVertexBindStats(UINT NumBuffers, ID3D11Buffer *Buffers[]); @@ -340,7 +340,7 @@ public: void ClearMaps(); uint32_t GetEventID() { return m_CurEventID; } - FetchAPIEvent GetEvent(uint32_t eventID); + APIEvent GetEvent(uint32_t eventID); const DrawcallTreeNode &GetRootDraw() { return m_ParentDrawcall; } void ThreadSafe_SetMarker(uint32_t col, const wchar_t *name); diff --git a/renderdoc/driver/d3d11/d3d11_context1_wrap.cpp b/renderdoc/driver/d3d11/d3d11_context1_wrap.cpp index 7ca73cbe4..c4b2a64d6 100644 --- a/renderdoc/driver/d3d11/d3d11_context1_wrap.cpp +++ b/renderdoc/driver/d3d11/d3d11_context1_wrap.cpp @@ -474,7 +474,7 @@ bool WrappedID3D11DeviceContext::Serialise_ClearView(ID3D11View *pView, const FL " rects" ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; @@ -1707,7 +1707,7 @@ bool WrappedID3D11DeviceContext::Serialise_DiscardResource(ID3D11Resource *pReso { AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "DiscardResource()"; @@ -1790,7 +1790,7 @@ bool WrappedID3D11DeviceContext::Serialise_DiscardView(ID3D11View *pResourceView { AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "DiscardView()"; @@ -1915,7 +1915,7 @@ bool WrappedID3D11DeviceContext::Serialise_DiscardView1(ID3D11View *pResourceVie AddEvent(desc); string name = "DiscardView1(" + ToStr::Get(numRects) + " rects)"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; diff --git a/renderdoc/driver/d3d11/d3d11_context_wrap.cpp b/renderdoc/driver/d3d11/d3d11_context_wrap.cpp index 6632896a5..2fb6a2ad6 100644 --- a/renderdoc/driver/d3d11/d3d11_context_wrap.cpp +++ b/renderdoc/driver/d3d11/d3d11_context_wrap.cpp @@ -55,7 +55,7 @@ bool WrappedID3D11DeviceContext::Serialise_SetMarker(uint32_t col, const wchar_t if(m_State == READING) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::SetMarker; @@ -91,7 +91,7 @@ bool WrappedID3D11DeviceContext::Serialise_PushEvent(uint32_t col, const wchar_t if(m_State == READING) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::PushMarker; @@ -115,7 +115,7 @@ bool WrappedID3D11DeviceContext::Serialise_PopEvent() { if(m_State == READING && !m_CurEvents.empty()) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "API Calls"; draw.flags |= DrawFlags::SetMarker | DrawFlags::APICalls; @@ -3776,7 +3776,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawIndexedInstanced(UINT IndexCountP string name = "DrawIndexedInstanced(" + ToStr::Get(IndexCountPerInstance) + ", " + ToStr::Get(InstanceCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = IndexCountPerInstance; draw.numInstances = InstanceCount; @@ -3849,7 +3849,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawInstanced(UINT VertexCountPerInst string name = "DrawInstanced(" + ToStr::Get(VertexCountPerInstance) + ", " + ToStr::Get(InstanceCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = VertexCountPerInstance; draw.numInstances = InstanceCount; @@ -3915,7 +3915,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawIndexed(UINT IndexCount_, UINT St AddEvent(desc); string name = "DrawIndexed(" + ToStr::Get(IndexCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = IndexCount; draw.baseVertex = BaseVertexLocation; @@ -3976,7 +3976,7 @@ bool WrappedID3D11DeviceContext::Serialise_Draw(UINT VertexCount_, UINT StartVer AddEvent(desc); string name = "Draw(" + ToStr::Get(VertexCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = VertexCount; draw.vertexOffset = StartVertexLocation; @@ -4082,7 +4082,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawAuto() AddEvent(desc); string name = "DrawAuto(<" + ToStr::Get(numVerts) + ">)"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Drawcall | DrawFlags::Auto; draw.numIndices = (uint32_t)numVerts; @@ -4142,7 +4142,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawIndexedInstancedIndirect(ID3D11Bu { AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; string name = "DrawIndexedInstancedIndirect(-, -)"; @@ -4242,7 +4242,7 @@ bool WrappedID3D11DeviceContext::Serialise_DrawInstancedIndirect(ID3D11Buffer *p { AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; string name = "DrawInstancedIndirect(-, -)"; if(m_pDevice->GetResourceManager()->HasLiveResource(BufferForArgs)) @@ -4835,7 +4835,7 @@ bool WrappedID3D11DeviceContext::Serialise_ExecuteCommandList(ID3D11CommandList { string name = "ExecuteCommandList(" + ToStr::Get(cmdList) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::CmdList; @@ -4943,7 +4943,7 @@ bool WrappedID3D11DeviceContext::Serialise_Dispatch(UINT ThreadGroupCountX_, string name = "Dispatch(" + ToStr::Get(ThreadGroupCountX) + ", " + ToStr::Get(ThreadGroupCountY) + ", " + ToStr::Get(ThreadGroupCountZ) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Dispatch; @@ -5022,7 +5022,7 @@ bool WrappedID3D11DeviceContext::Serialise_DispatchIndirect(ID3D11Buffer *pBuffe { AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; string name = "DispatchIndirect(-, -, -)"; if(m_pDevice->GetResourceManager()->HasLiveResource(BufferForArgs)) @@ -5099,7 +5099,7 @@ bool WrappedID3D11DeviceContext::Serialise_FinishCommandList(BOOL RestoreDeferre AddEvent(desc); string name = "FinishCommandList() -> " + ToStr::Get(cmdList); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::CmdList; @@ -5313,7 +5313,7 @@ bool WrappedID3D11DeviceContext::Serialise_CopySubresourceRegion( AddEvent(desc); string name = "CopySubresourceRegion(" + dstName + ", " + srcName + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -5462,7 +5462,7 @@ bool WrappedID3D11DeviceContext::Serialise_CopyResource(ID3D11Resource *pDstReso AddEvent(desc); string name = "CopyResource(" + dstName + ", " + srcName + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -6002,7 +6002,7 @@ bool WrappedID3D11DeviceContext::Serialise_ResolveSubresource(ID3D11Resource *pD AddEvent(desc); string name = "ResolveSubresource(" + dstName + ", " + srcName + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Resolve; @@ -6159,7 +6159,7 @@ bool WrappedID3D11DeviceContext::Serialise_GenerateMips(ID3D11ShaderResourceView AddEvent(desc); string name = "GenerateMips(" + resName + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::GenMips; @@ -6319,7 +6319,7 @@ bool WrappedID3D11DeviceContext::Serialise_ClearRenderTargetView( string name = "ClearRenderTargetView(" + ToStr::Get(Color[0]) + ", " + ToStr::Get(Color[1]) + ", " + ToStr::Get(Color[2]) + ", " + ToStr::Get(Color[3]) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear | DrawFlags::ClearColour; @@ -6500,7 +6500,7 @@ bool WrappedID3D11DeviceContext::Serialise_ClearUnorderedAccessViewUint( ToStr::Get(Values[1]) + ", " + ToStr::Get(Values[2]) + ", " + ToStr::Get(Values[3]) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear; @@ -6673,7 +6673,7 @@ bool WrappedID3D11DeviceContext::Serialise_ClearUnorderedAccessViewFloat( ToStr::Get(Values[1]) + ", " + ToStr::Get(Values[2]) + ", " + ToStr::Get(Values[3]) + ", " + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = (name); draw.flags |= DrawFlags::Clear; @@ -6831,7 +6831,7 @@ bool WrappedID3D11DeviceContext::Serialise_ClearDepthStencilView( AddEvent(desc); string name = "ClearDepthStencilView(" + ToStr::Get(Depth) + ", " + ToStr::Get(Stencil) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear | DrawFlags::ClearDepthStencil; diff --git a/renderdoc/driver/d3d11/d3d11_counters.cpp b/renderdoc/driver/d3d11/d3d11_counters.cpp index f5a8f0436..76ca056c2 100644 --- a/renderdoc/driver/d3d11/d3d11_counters.cpp +++ b/renderdoc/driver/d3d11/d3d11_counters.cpp @@ -201,7 +201,7 @@ void D3D11DebugManager::FillTimers(D3D11CounterContext &ctx, const DrawcallTreeN for(size_t i = 0; i < drawnode.children.size(); i++) { - const FetchDrawcall &d = drawnode.children[i].draw; + const DrawcallDescription &d = drawnode.children[i].draw; FillTimers(ctx, drawnode.children[i]); if(d.events.count == 0) diff --git a/renderdoc/driver/d3d11/d3d11_debug.cpp b/renderdoc/driver/d3d11/d3d11_debug.cpp index 07bd8d6e4..a7798ec09 100644 --- a/renderdoc/driver/d3d11/d3d11_debug.cpp +++ b/renderdoc/driver/d3d11/d3d11_debug.cpp @@ -3725,7 +3725,7 @@ void D3D11DebugManager::InitPostVSBuffers(uint32_t eventID) return; } - const FetchDrawcall *drawcall = m_WrappedDevice->GetDrawcall(eventID); + const DrawcallDescription *drawcall = m_WrappedDevice->GetDrawcall(eventID); if(drawcall->numIndices == 0) return; diff --git a/renderdoc/driver/d3d11/d3d11_device.cpp b/renderdoc/driver/d3d11/d3d11_device.cpp index 0e7a27291..55b73743f 100644 --- a/renderdoc/driver/d3d11/d3d11_device.cpp +++ b/renderdoc/driver/d3d11/d3d11_device.cpp @@ -1102,7 +1102,7 @@ void WrappedID3D11Device::Serialise_CaptureScope(uint64_t offset) m_FrameRecord.frameInfo.fileOffset = offset; m_FrameRecord.frameInfo.frameNumber = FrameNumber; - FetchFrameStatistics &stats = m_FrameRecord.frameInfo.stats; + FrameStatistics &stats = m_FrameRecord.frameInfo.stats; RDCEraseEl(stats); // #mivance GL/Vulkan don't set this so don't get stats in window @@ -1112,7 +1112,7 @@ void WrappedID3D11Device::Serialise_CaptureScope(uint64_t offset) { create_array(stats.constants[stage].bindslots, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT + 1); - create_array(stats.constants[stage].sizes, FetchFrameConstantBindStats::BUCKET_COUNT); + create_array(stats.constants[stage].sizes, ConstantBindStats::BUCKET_COUNT); create_array(stats.samplers[stage].bindslots, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT + 1); @@ -1122,9 +1122,9 @@ void WrappedID3D11Device::Serialise_CaptureScope(uint64_t offset) } create_array(stats.updates.types, uint32_t(TextureDim::Count)); - create_array(stats.updates.sizes, FetchFrameUpdateStats::BUCKET_COUNT); + create_array(stats.updates.sizes, ResourceUpdateStats::BUCKET_COUNT); - create_array(stats.draws.counts, FetchFrameDrawStats::BUCKET_COUNT); + create_array(stats.draws.counts, DrawcallStats::BUCKET_COUNT); create_array(stats.vertices.bindslots, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT + 1); @@ -2720,7 +2720,7 @@ void WrappedID3D11Device::StartFrameCapture(void *dev, void *wnd) m_FrameCounter = RDCMAX(1 + (uint32_t)m_CapturedFrames.size(), m_FrameCounter); - FetchFrameInfo frame; + FrameDescription frame; frame.frameNumber = m_FrameCounter + 1; frame.captureTime = Timing::GetUnixTimestamp(); m_CapturedFrames.push_back(frame); @@ -3698,7 +3698,7 @@ WrappedID3D11DeviceContext *WrappedID3D11Device::GetDeferredContext(size_t idx) return *it; } -const FetchDrawcall *WrappedID3D11Device::GetDrawcall(uint32_t eventID) +const DrawcallDescription *WrappedID3D11Device::GetDrawcall(uint32_t eventID) { if(eventID >= m_Drawcalls.size()) return NULL; diff --git a/renderdoc/driver/d3d11/d3d11_device.h b/renderdoc/driver/d3d11/d3d11_device.h index ab4e7c205..bf623c568 100644 --- a/renderdoc/driver/d3d11/d3d11_device.h +++ b/renderdoc/driver/d3d11/d3d11_device.h @@ -395,9 +395,9 @@ private: vector m_DebugMessages; - vector m_CapturedFrames; - FetchFrameRecord m_FrameRecord; - vector m_Drawcalls; + vector m_CapturedFrames; + FrameRecord m_FrameRecord; + vector m_Drawcalls; public: static const int AllocPoolCount = 4; @@ -430,9 +430,9 @@ public: Serialiser *GetSerialiser() { return m_pSerialiser; } ResourceId GetResourceID() { return m_ResourceID; } - FetchFrameRecord &GetFrameRecord() { return m_FrameRecord; } - FetchFrameStatistics &GetFrameStats() { return m_FrameRecord.frameInfo.stats; } - const FetchDrawcall *GetDrawcall(uint32_t eventID); + FrameRecord &GetFrameRecord() { return m_FrameRecord; } + FrameStatistics &GetFrameStats() { return m_FrameRecord.frameInfo.stats; } + const DrawcallDescription *GetDrawcall(uint32_t eventID); void LockForChunkFlushing(); void UnlockForChunkFlushing(); diff --git a/renderdoc/driver/d3d11/d3d11_replay.cpp b/renderdoc/driver/d3d11/d3d11_replay.cpp index 0038a286f..12523eb7a 100644 --- a/renderdoc/driver/d3d11/d3d11_replay.cpp +++ b/renderdoc/driver/d3d11/d3d11_replay.cpp @@ -51,9 +51,9 @@ void D3D11Replay::Shutdown() D3D11DebugManager::PostDeviceShutdownCounters(); } -FetchTexture D3D11Replay::GetTexture(ResourceId id) +TextureDescription D3D11Replay::GetTexture(ResourceId id) { - FetchTexture tex; + TextureDescription tex; tex.ID = ResourceId(); auto it1D = WrappedID3D11Texture1D::m_TextureList.find(id); @@ -335,7 +335,7 @@ void D3D11Replay::FreeCustomShader(ResourceId id) } } -FetchFrameRecord D3D11Replay::GetFrameRecord() +FrameRecord D3D11Replay::GetFrameRecord() { return m_pDevice->GetFrameRecord(); } @@ -374,9 +374,9 @@ vector D3D11Replay::GetBuffers() return ret; } -FetchBuffer D3D11Replay::GetBuffer(ResourceId id) +BufferDescription D3D11Replay::GetBuffer(ResourceId id) { - FetchBuffer ret; + BufferDescription ret; ret.ID = ResourceId(); auto it = WrappedID3D11Buffer::m_BufferList.find(id); @@ -1315,13 +1315,13 @@ vector D3D11Replay::GetPassEvents(uint32_t eventID) { vector passEvents; - const FetchDrawcall *draw = m_pDevice->GetDrawcall(eventID); + const DrawcallDescription *draw = m_pDevice->GetDrawcall(eventID); - const FetchDrawcall *start = draw; + const DrawcallDescription *start = draw; while(start && start->previous != 0 && !(m_pDevice->GetDrawcall((uint32_t)start->previous)->flags & DrawFlags::Clear)) { - const FetchDrawcall *prev = m_pDevice->GetDrawcall((uint32_t)start->previous); + const DrawcallDescription *prev = m_pDevice->GetDrawcall((uint32_t)start->previous); if(memcmp(start->outputs, prev->outputs, sizeof(start->outputs)) || start->depthOut != prev->depthOut) @@ -1409,7 +1409,7 @@ void D3D11Replay::InitPostVSBuffers(const vector &passEvents) prev = passEvents[i]; } - const FetchDrawcall *d = m_pDevice->GetDrawcall(passEvents[i]); + const DrawcallDescription *d = m_pDevice->GetDrawcall(passEvents[i]); if(d) m_pDevice->GetDebugManager()->InitPostVSBuffers(passEvents[i]); @@ -1611,7 +1611,7 @@ Callstack::StackResolver *D3D11Replay::GetCallstackResolver() return m_pDevice->GetSerialiser()->GetCallstackResolver(); } -ResourceId D3D11Replay::CreateProxyTexture(const FetchTexture &templateTex) +ResourceId D3D11Replay::CreateProxyTexture(const TextureDescription &templateTex) { ResourceId ret; @@ -1842,7 +1842,7 @@ bool D3D11Replay::IsTextureSupported(const ResourceFormat &format) return MakeDXGIFormat(format) != DXGI_FORMAT_UNKNOWN; } -ResourceId D3D11Replay::CreateProxyBuffer(const FetchBuffer &templateBuf) +ResourceId D3D11Replay::CreateProxyBuffer(const BufferDescription &templateBuf) { ResourceId ret; diff --git a/renderdoc/driver/d3d11/d3d11_replay.h b/renderdoc/driver/d3d11/d3d11_replay.h index a3cc5a01c..72afcde4d 100644 --- a/renderdoc/driver/d3d11/d3d11_replay.h +++ b/renderdoc/driver/d3d11/d3d11_replay.h @@ -49,10 +49,10 @@ public: APIProperties GetAPIProperties(); vector GetBuffers(); - FetchBuffer GetBuffer(ResourceId id); + BufferDescription GetBuffer(ResourceId id); vector GetTextures(); - FetchTexture GetTexture(ResourceId id); + TextureDescription GetTexture(ResourceId id); vector GetDebugMessages(); @@ -60,7 +60,7 @@ public: vector GetUsage(ResourceId id); - FetchFrameRecord GetFrameRecord(); + FrameRecord GetFrameRecord(); void SavePipelineState() { m_CurPipelineState = MakePipelineState(); } D3D11Pipe::State GetD3D11PipelineState() { return m_CurPipelineState; } @@ -118,12 +118,12 @@ public: void DescribeCounter(GPUCounter counterID, CounterDescription &desc); vector FetchCounters(const vector &counters); - ResourceId CreateProxyTexture(const FetchTexture &templateTex); + ResourceId CreateProxyTexture(const TextureDescription &templateTex); void SetProxyTextureData(ResourceId texid, uint32_t arrayIdx, uint32_t mip, byte *data, size_t dataSize); bool IsTextureSupported(const ResourceFormat &format); - ResourceId CreateProxyBuffer(const FetchBuffer &templateBuf); + ResourceId CreateProxyBuffer(const BufferDescription &templateBuf); void SetProxyBufferData(ResourceId bufid, byte *data, size_t dataSize); void RenderMesh(uint32_t eventID, const vector &secondaryDraws, const MeshDisplay &cfg); diff --git a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp index 1ff4706a9..3e0824116 100644 --- a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp @@ -90,7 +90,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Close() if(!m_Cmd->m_BakedCmdListInfo[CommandList].curEvents.empty()) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "API Calls"; draw.flags |= DrawFlags::SetMarker | DrawFlags::APICalls; @@ -2649,7 +2649,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_SetMarker(UINT Metadata, const if(m_State == READING) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = markerText; draw.flags |= DrawFlags::SetMarker; @@ -2707,7 +2707,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_BeginEvent(UINT Metadata, const if(m_State == READING) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = markerText; draw.flags |= DrawFlags::PushMarker; @@ -2739,7 +2739,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_EndEvent() if(m_State == READING && !m_Cmd->m_BakedCmdListInfo[CommandList].curEvents.empty()) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "API Calls"; draw.flags = DrawFlags::SetMarker | DrawFlags::APICalls; @@ -2750,7 +2750,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_EndEvent() { // dummy draw that is consumed when this command buffer // is being in-lined into the call stream - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "Pop()"; draw.flags = DrawFlags::PopMarker; @@ -2818,7 +2818,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DrawInstanced(UINT VertexCountP m_Cmd->AddEvent(desc); string name = "DrawInstanced(" + ToStr::Get(vtxCount) + ", " + ToStr::Get(instCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = vtxCount; draw.numInstances = instCount; @@ -2895,7 +2895,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_DrawIndexedInstanced(UINT Index string name = "DrawIndexedInstanced(" + ToStr::Get(idxCount) + ", " + ToStr::Get(instCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = idxCount; draw.numInstances = instCount; @@ -2969,7 +2969,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_Dispatch(UINT ThreadGroupCountX m_Cmd->AddEvent(desc); string name = "Dispatch(" + ToStr::Get(x) + ", " + ToStr::Get(y) + ", " + ToStr::Get(z) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.dispatchDimension[0] = x; draw.dispatchDimension[1] = y; @@ -3049,7 +3049,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteBundle(ID3D12GraphicsCom m_Cmd->AddEvent(desc); string name = "ExecuteBundle(" + ToStr::Get(Bundle) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::CmdList; @@ -3124,7 +3124,7 @@ void WrappedID3D12GraphicsCommandList::ReserveExecuteIndirect(ID3D12GraphicsComm case D3D12_INDIRECT_ARGUMENT_TYPE_DRAW: // add dummy event and drawcall m_Cmd->AddEvent(""); - m_Cmd->AddDrawcall(FetchDrawcall(), true); + m_Cmd->AddDrawcall(DrawcallDescription(), true); cmdInfo.curEventID++; break; case D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW: @@ -3144,7 +3144,7 @@ void WrappedID3D12GraphicsCommandList::ReserveExecuteIndirect(ID3D12GraphicsComm if(multidraw) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "ExecuteIndirect()"; draw.flags = DrawFlags::PopMarker; m_Cmd->AddDrawcall(draw, false); @@ -3227,7 +3227,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in D3D12_DRAW_ARGUMENTS *args = (D3D12_DRAW_ARGUMENTS *)data; data += sizeof(D3D12_DRAW_ARGUMENTS); - FetchDrawcall &draw = draws[idx].draw; + DrawcallDescription &draw = draws[idx].draw; draw.numIndices = args->VertexCountPerInstance; draw.numInstances = args->InstanceCount; draw.vertexOffset = args->StartVertexLocation; @@ -3252,7 +3252,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in eventStr += StringFormat::Fmt("\tStartInstanceLocation: %u\n", args->StartInstanceLocation); eventStr += "}\n"; - FetchAPIEvent &ev = draw.events[draw.events.count - 1]; + APIEvent &ev = draw.events[draw.events.count - 1]; ev.eventDesc = eventStr; RDCASSERT(ev.eventID == eid); @@ -3270,7 +3270,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in D3D12_DRAW_INDEXED_ARGUMENTS *args = (D3D12_DRAW_INDEXED_ARGUMENTS *)data; data += sizeof(D3D12_DRAW_INDEXED_ARGUMENTS); - FetchDrawcall &draw = draws[idx].draw; + DrawcallDescription &draw = draws[idx].draw; draw.numIndices = args->IndexCountPerInstance; draw.numInstances = args->InstanceCount; draw.baseVertex = args->BaseVertexLocation; @@ -3297,7 +3297,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in eventStr += StringFormat::Fmt("\tStartInstanceLocation: %u\n", args->StartInstanceLocation); eventStr += "}\n"; - FetchAPIEvent &ev = draw.events[draw.events.count - 1]; + APIEvent &ev = draw.events[draw.events.count - 1]; ev.eventDesc = eventStr; RDCASSERT(ev.eventID == eid); @@ -3315,7 +3315,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in D3D12_DISPATCH_ARGUMENTS *args = (D3D12_DISPATCH_ARGUMENTS *)data; data += sizeof(D3D12_DISPATCH_ARGUMENTS); - FetchDrawcall &draw = draws[idx].draw; + DrawcallDescription &draw = draws[idx].draw; draw.dispatchDimension[0] = args->ThreadGroupCountX; draw.dispatchDimension[1] = args->ThreadGroupCountY; draw.dispatchDimension[2] = args->ThreadGroupCountZ; @@ -3338,7 +3338,7 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in eventStr += StringFormat::Fmt("\tThreadGroupCountZ: %u\n", args->ThreadGroupCountZ); eventStr += "}\n"; - FetchAPIEvent &ev = draw.events[draw.events.count - 1]; + APIEvent &ev = draw.events[draw.events.count - 1]; ev.eventDesc = eventStr; RDCASSERT(ev.eventID == eid); @@ -3372,8 +3372,8 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in name += StringFormat::Fmt("\tvalues[%u]: %u\n", val, values[val]); name += "}\n"; - FetchDrawcall &draw = draws[idx].draw; - FetchAPIEvent *ev = NULL; + DrawcallDescription &draw = draws[idx].draw; + APIEvent *ev = NULL; for(int32_t e = 0; e < draw.events.count; e++) { @@ -3417,8 +3417,8 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in name += StringFormat::Fmt("\tView.StrideInBytes: %u\n", vb->StrideInBytes); name += "}\n"; - FetchDrawcall &draw = draws[idx].draw; - FetchAPIEvent *ev = NULL; + DrawcallDescription &draw = draws[idx].draw; + APIEvent *ev = NULL; for(int32_t e = 0; e < draw.events.count; e++) { @@ -3461,8 +3461,8 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in name += StringFormat::Fmt("\tView.Format: %s\n", ToStr::Get(ib->Format).c_str()); name += "}\n"; - FetchDrawcall &draw = draws[idx].draw; - FetchAPIEvent *ev = NULL; + DrawcallDescription &draw = draws[idx].draw; + APIEvent *ev = NULL; for(int32_t e = 0; e < draw.events.count; e++) { @@ -3519,8 +3519,8 @@ void WrappedID3D12GraphicsCommandList::PatchExecuteIndirect(BakedCmdListInfo &in name += StringFormat::Fmt("\tBufferLocation_Offset: %llu\n", offs); name += "}\n"; - FetchDrawcall &draw = draws[idx].draw; - FetchAPIEvent *ev = NULL; + DrawcallDescription &draw = draws[idx].draw; + APIEvent *ev = NULL; for(int32_t e = 0; e < draw.events.count; e++) { @@ -3964,7 +3964,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteIndirect( m_Cmd->AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "ExecuteIndirect"; draw.flags |= DrawFlags::MultiDraw; @@ -4130,7 +4130,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearDepthStencilView( m_Cmd->AddEvent(desc); string name = "ClearDepthStencilView(" + ToStr::Get(d) + "," + ToStr::Get(s) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear | DrawFlags::ClearDepthStencil; @@ -4217,7 +4217,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearRenderTargetView( string name = "ClearRenderTargetView(" + ToStr::Get(Color[0]) + "," + ToStr::Get(Color[1]) + "," + ToStr::Get(Color[2]) + "," + ToStr::Get(Color[3]) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear | DrawFlags::ClearColour; @@ -4315,7 +4315,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearUnorderedAccessViewUint( ToStr::Get(vals[1]) + "," + ToStr::Get(vals[2]) + "," + ToStr::Get(vals[3]) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear; @@ -4418,7 +4418,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ClearUnorderedAccessViewFloat( ToStr::Get(vals[1]) + "," + ToStr::Get(vals[2]) + "," + ToStr::Get(vals[3]) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear; @@ -4557,7 +4557,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyBufferRegion(ID3D12Resource m_Cmd->AddEvent(desc); string name = "CopyBufferRegion(" + ToStr::Get(src) + "," + ToStr::Get(dst) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -4645,7 +4645,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyTextureRegion( string name = "CopyTextureRegion(" + ToStr::Get(origSrc) + "," + ToStr::Get(origDst) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -4734,7 +4734,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_CopyResource(ID3D12Resource *pD string name = "CopyResource(" + ToStr::Get(src) + "," + ToStr::Get(dst) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -4824,7 +4824,7 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ResolveSubresource(ID3D12Resour string name = "ResolveSubresource(" + ToStr::Get(src) + "," + ToStr::Get(dst) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Resolve; diff --git a/renderdoc/driver/d3d12/d3d12_command_queue.h b/renderdoc/driver/d3d12/d3d12_command_queue.h index 2c751aac4..1aaab31d2 100644 --- a/renderdoc/driver/d3d12/d3d12_command_queue.h +++ b/renderdoc/driver/d3d12/d3d12_command_queue.h @@ -117,7 +117,7 @@ public: WrappedID3D12Device *GetWrappedDevice() { return m_pDevice; } const vector &GetCmdLists() { return m_CmdListRecords; } D3D12DrawcallTreeNode &GetParentDrawcall() { return m_Cmd.m_ParentDrawcall; } - FetchAPIEvent GetEvent(uint32_t eventID); + APIEvent GetEvent(uint32_t eventID); uint32_t GetMaxEID() { return m_Cmd.m_Events.back().eventID; } ResourceId GetBackbufferResourceID() { return m_BackbufferID; } void ClearAfterCapture(); diff --git a/renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp index 05e556da9..1fcb533fc 100644 --- a/renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp @@ -183,7 +183,7 @@ bool WrappedID3D12CommandQueue::Serialise_ExecuteCommandLists(UINT NumCommandLis ToStr::Get(cmdIds[c]).c_str()); // add a fake marker - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags = DrawFlags::PassBoundary | DrawFlags::BeginPass; m_Cmd.AddEvent(name); diff --git a/renderdoc/driver/d3d12/d3d12_commands.cpp b/renderdoc/driver/d3d12/d3d12_commands.cpp index 2ded2c519..d0cec62ef 100644 --- a/renderdoc/driver/d3d12/d3d12_commands.cpp +++ b/renderdoc/driver/d3d12/d3d12_commands.cpp @@ -253,7 +253,7 @@ void WrappedID3D12CommandQueue::ClearAfterCapture() m_QueueRecord->DeleteChunks(); } -FetchAPIEvent WrappedID3D12CommandQueue::GetEvent(uint32_t eventID) +APIEvent WrappedID3D12CommandQueue::GetEvent(uint32_t eventID) { for(size_t i = m_Cmd.m_Events.size() - 1; i > 0; i--) { @@ -414,7 +414,7 @@ void WrappedID3D12CommandQueue::ProcessChunk(uint64_t offset, D3D12ChunkType chu { m_Cmd.AddEvent("Present()"); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "Present()"; draw.flags |= DrawFlags::Present; @@ -478,7 +478,7 @@ void WrappedID3D12CommandQueue::ReplayLog(LogState readType, uint32_t startEvent if(m_State == EXECUTING) { - FetchAPIEvent ev = GetEvent(startEventID); + APIEvent ev = GetEvent(startEventID); m_Cmd.m_RootEventID = ev.eventID; // if not partial, we need to be sure to replay @@ -560,10 +560,7 @@ void WrappedID3D12CommandQueue::ReplayLog(LogState readType, uint32_t startEvent { struct SortEID { - bool operator()(const FetchAPIEvent &a, const FetchAPIEvent &b) - { - return a.eventID < b.eventID; - } + bool operator()(const APIEvent &a, const APIEvent &b) { return a.eventID < b.eventID; } }; std::sort(m_Cmd.m_Events.begin(), m_Cmd.m_Events.end(), SortEID()); @@ -866,7 +863,7 @@ uint32_t D3D12CommandData::HandlePreCallback(ID3D12GraphicsCommandList *list, bo RDCASSERT(eventID != 0); // handle all aliases of this drawcall as long as it's not a multidraw - const FetchDrawcall *draw = m_pDevice->GetDrawcall(eventID); + const DrawcallDescription *draw = m_pDevice->GetDrawcall(eventID); if(draw == NULL || !(draw->flags & DrawFlags::MultiDraw)) { @@ -948,7 +945,7 @@ ID3D12GraphicsCommandList *D3D12CommandData::RerecordCmdList(ResourceId cmdid, void D3D12CommandData::AddEvent(string description) { - FetchAPIEvent apievent; + APIEvent apievent; apievent.fileOffset = m_CurChunkOffset; apievent.eventID = m_LastCmdListID != ResourceId() ? m_BakedCmdListInfo[m_LastCmdListID].curEventID @@ -997,7 +994,7 @@ void D3D12CommandData::AddUsage(D3D12DrawcallTreeNode &drawNode, ResourceId id, void D3D12CommandData::AddUsage(D3D12DrawcallTreeNode &drawNode) { - FetchDrawcall &d = drawNode.draw; + DrawcallDescription &d = drawNode.draw; const D3D12RenderState &state = m_BakedCmdListInfo[m_LastCmdListID].state; uint32_t e = d.eventID; @@ -1154,11 +1151,11 @@ void D3D12CommandData::AddUsage(D3D12DrawcallTreeNode &drawNode) } } -void D3D12CommandData::AddDrawcall(const FetchDrawcall &d, bool hasEvents, bool addUsage) +void D3D12CommandData::AddDrawcall(const DrawcallDescription &d, bool hasEvents, bool addUsage) { m_AddedDrawcall = true; - FetchDrawcall draw = d; + DrawcallDescription draw = d; draw.eventID = m_LastCmdListID != ResourceId() ? m_BakedCmdListInfo[m_LastCmdListID].curEventID : m_RootEventID; draw.drawcallID = m_LastCmdListID != ResourceId() ? m_BakedCmdListInfo[m_LastCmdListID].drawCount @@ -1197,9 +1194,9 @@ void D3D12CommandData::AddDrawcall(const FetchDrawcall &d, bool hasEvents, bool if(hasEvents) { - vector &srcEvents = m_LastCmdListID != ResourceId() - ? m_BakedCmdListInfo[m_LastCmdListID].curEvents - : m_RootEvents; + vector &srcEvents = m_LastCmdListID != ResourceId() + ? m_BakedCmdListInfo[m_LastCmdListID].curEvents + : m_RootEvents; draw.events = srcEvents; srcEvents.clear(); diff --git a/renderdoc/driver/d3d12/d3d12_commands.h b/renderdoc/driver/d3d12/d3d12_commands.h index 74ded0ad9..8b436edfe 100644 --- a/renderdoc/driver/d3d12/d3d12_commands.h +++ b/renderdoc/driver/d3d12/d3d12_commands.h @@ -32,15 +32,15 @@ struct D3D12DrawcallTreeNode { D3D12DrawcallTreeNode() {} - explicit D3D12DrawcallTreeNode(const FetchDrawcall &d) : draw(d) {} - FetchDrawcall draw; + explicit D3D12DrawcallTreeNode(const DrawcallDescription &d) : draw(d) {} + DrawcallDescription draw; vector children; vector > resourceUsage; vector executedCmds; - D3D12DrawcallTreeNode &operator=(const FetchDrawcall &d) + D3D12DrawcallTreeNode &operator=(const DrawcallDescription &d) { *this = D3D12DrawcallTreeNode(d); return *this; @@ -66,9 +66,9 @@ struct D3D12DrawcallTreeNode } } - vector Bake() + vector Bake() { - vector ret; + vector ret; if(children.empty()) return ret; @@ -177,7 +177,7 @@ struct BakedCmdListInfo vector crackedLists; vector executeEvents; - vector curEvents; + vector curEvents; vector debugMessages; std::list drawStack; @@ -315,7 +315,7 @@ struct D3D12CommandData bool m_AddedDrawcall; - vector m_RootEvents, m_Events; + vector m_RootEvents, m_Events; uint64_t m_CurChunkOffset; @@ -348,7 +348,7 @@ struct D3D12CommandData ID3D12GraphicsCommandList *RerecordCmdList(ResourceId cmdid, PartialReplayIndex partialType = ePartialNum); - void AddDrawcall(const FetchDrawcall &d, bool hasEvents, bool addUsage = true); + void AddDrawcall(const DrawcallDescription &d, bool hasEvents, bool addUsage = true); void AddEvent(string description); void AddUsage(D3D12DrawcallTreeNode &drawNode); void AddUsage(D3D12DrawcallTreeNode &drawNode, ResourceId id, uint32_t EID, ResourceUsage usage); diff --git a/renderdoc/driver/d3d12/d3d12_debug.cpp b/renderdoc/driver/d3d12/d3d12_debug.cpp index 7fff6e6a6..8b23c48a4 100644 --- a/renderdoc/driver/d3d12/d3d12_debug.cpp +++ b/renderdoc/driver/d3d12/d3d12_debug.cpp @@ -3762,7 +3762,7 @@ void D3D12DebugManager::InitPostVSBuffers(uint32_t eventID) D3D_PRIMITIVE_TOPOLOGY topo = rs.topo; - const FetchDrawcall *drawcall = m_WrappedDevice->GetDrawcall(eventID); + const DrawcallDescription *drawcall = m_WrappedDevice->GetDrawcall(eventID); if(drawcall->numIndices == 0) return; @@ -7649,7 +7649,7 @@ ResourceId D3D12DebugManager::RenderOverlay(ResourceId texid, CompType typeHint, while(!events.empty()) { - const FetchDrawcall *draw = m_WrappedDevice->GetDrawcall(events[0]); + const DrawcallDescription *draw = m_WrappedDevice->GetDrawcall(events[0]); // remove any non-drawcalls, like the pass boundary. if(!(draw->flags & DrawFlags::Drawcall)) @@ -7741,7 +7741,7 @@ ResourceId D3D12DebugManager::RenderOverlay(ResourceId texid, CompType typeHint, for(size_t i = 0; i < events.size(); i++) { - const FetchDrawcall *draw = m_WrappedDevice->GetDrawcall(events[i]); + const DrawcallDescription *draw = m_WrappedDevice->GetDrawcall(events[i]); for(uint32_t inst = 0; draw && inst < RDCMAX(1U, draw->numInstances); inst++) { diff --git a/renderdoc/driver/d3d12/d3d12_device.cpp b/renderdoc/driver/d3d12/d3d12_device.cpp index b89cd9c68..3efa7004d 100644 --- a/renderdoc/driver/d3d12/d3d12_device.cpp +++ b/renderdoc/driver/d3d12/d3d12_device.cpp @@ -1283,7 +1283,7 @@ void WrappedID3D12Device::StartFrameCapture(void *dev, void *wnd) m_FrameCounter = RDCMAX(1 + (uint32_t)m_CapturedFrames.size(), m_FrameCounter); - FetchFrameInfo frame; + FrameDescription frame; frame.frameNumber = m_FrameCounter + 1; frame.captureTime = Timing::GetUnixTimestamp(); RDCEraseEl(frame.stats); @@ -2221,7 +2221,7 @@ void WrappedID3D12Device::SetLogFile(const char *logfile) m_pSerialiser->SetUserData(m_ResourceManager); } -const FetchDrawcall *WrappedID3D12Device::GetDrawcall(uint32_t eventID) +const DrawcallDescription *WrappedID3D12Device::GetDrawcall(uint32_t eventID) { if(eventID >= m_Drawcalls.size()) return NULL; diff --git a/renderdoc/driver/d3d12/d3d12_device.h b/renderdoc/driver/d3d12/d3d12_device.h index 1138e54a4..35804ca9b 100644 --- a/renderdoc/driver/d3d12/d3d12_device.h +++ b/renderdoc/driver/d3d12/d3d12_device.h @@ -282,9 +282,9 @@ private: vector m_DebugMessages; uint32_t m_FrameCounter; - vector m_CapturedFrames; - FetchFrameRecord m_FrameRecord; - vector m_Drawcalls; + vector m_CapturedFrames; + FrameRecord m_FrameRecord; + vector m_Drawcalls; Serialiser *m_pSerialiser; bool m_AppControlledCapture; @@ -363,8 +363,8 @@ public: Threading::CriticalSection &GetCapTransitionLock() { return m_CapTransitionLock; } void ReleaseSwapchainResources(IDXGISwapChain *swap, IUnknown **backbuffers, int numBackbuffers); void FirstFrame(WrappedIDXGISwapChain4 *swap); - FetchFrameRecord &GetFrameRecord() { return m_FrameRecord; } - const FetchDrawcall *GetDrawcall(uint32_t eventID); + FrameRecord &GetFrameRecord() { return m_FrameRecord; } + const DrawcallDescription *GetDrawcall(uint32_t eventID); void AddDebugMessage(MessageCategory c, MessageSeverity sv, MessageSource src, std::string d); void AddDebugMessage(const DebugMessage &msg) { m_DebugMessages.push_back(msg); } diff --git a/renderdoc/driver/d3d12/d3d12_replay.cpp b/renderdoc/driver/d3d12/d3d12_replay.cpp index eadb8c256..8f93b8d2c 100644 --- a/renderdoc/driver/d3d12/d3d12_replay.cpp +++ b/renderdoc/driver/d3d12/d3d12_replay.cpp @@ -105,9 +105,9 @@ vector D3D12Replay::GetTextures() return ret; } -FetchBuffer D3D12Replay::GetBuffer(ResourceId id) +BufferDescription D3D12Replay::GetBuffer(ResourceId id) { - FetchBuffer ret; + BufferDescription ret; ret.ID = m_pDevice->GetResourceManager()->GetOriginalID(id); auto it = WrappedID3D12Resource::GetList().find(id); @@ -157,9 +157,9 @@ FetchBuffer D3D12Replay::GetBuffer(ResourceId id) return ret; } -FetchTexture D3D12Replay::GetTexture(ResourceId id) +TextureDescription D3D12Replay::GetTexture(ResourceId id) { - FetchTexture ret; + TextureDescription ret; ret.ID = m_pDevice->GetResourceManager()->GetOriginalID(id); auto it = WrappedID3D12Resource::GetList().find(id); @@ -275,7 +275,7 @@ void D3D12Replay::FreeCustomShader(ResourceId id) } } -FetchFrameRecord D3D12Replay::GetFrameRecord() +FrameRecord D3D12Replay::GetFrameRecord() { return m_pDevice->GetFrameRecord(); } @@ -1246,13 +1246,13 @@ vector D3D12Replay::GetPassEvents(uint32_t eventID) { vector passEvents; - const FetchDrawcall *draw = m_pDevice->GetDrawcall(eventID); + const DrawcallDescription *draw = m_pDevice->GetDrawcall(eventID); if(!draw) return passEvents; // for D3D12 a pass == everything writing to the same RTs in a command list. - const FetchDrawcall *start = draw; + const DrawcallDescription *start = draw; while(start) { // if we've come to the beginning of a list, break out of the loop, we've @@ -1271,7 +1271,7 @@ vector D3D12Replay::GetPassEvents(uint32_t eventID) return passEvents; // step back - const FetchDrawcall *prev = m_pDevice->GetDrawcall((uint32_t)start->previous); + const DrawcallDescription *prev = m_pDevice->GetDrawcall((uint32_t)start->previous); // something went wrong, start->previous was non-zero but we didn't // get a draw. Abort @@ -1686,7 +1686,7 @@ ShaderDebugTrace D3D12Replay::DebugThread(uint32_t eventID, uint32_t groupid[3], return ShaderDebugTrace(); } -ResourceId D3D12Replay::CreateProxyTexture(const FetchTexture &templateTex) +ResourceId D3D12Replay::CreateProxyTexture(const TextureDescription &templateTex) { return ResourceId(); } @@ -1696,7 +1696,7 @@ void D3D12Replay::SetProxyTextureData(ResourceId texid, uint32_t arrayIdx, uint3 { } -ResourceId D3D12Replay::CreateProxyBuffer(const FetchBuffer &templateBuf) +ResourceId D3D12Replay::CreateProxyBuffer(const BufferDescription &templateBuf) { return ResourceId(); } diff --git a/renderdoc/driver/d3d12/d3d12_replay.h b/renderdoc/driver/d3d12/d3d12_replay.h index 42bbed39f..5276deced 100644 --- a/renderdoc/driver/d3d12/d3d12_replay.h +++ b/renderdoc/driver/d3d12/d3d12_replay.h @@ -47,10 +47,10 @@ public: APIProperties GetAPIProperties(); vector GetBuffers(); - FetchBuffer GetBuffer(ResourceId id); + BufferDescription GetBuffer(ResourceId id); vector GetTextures(); - FetchTexture GetTexture(ResourceId id); + TextureDescription GetTexture(ResourceId id); vector GetDebugMessages(); @@ -58,7 +58,7 @@ public: vector GetUsage(ResourceId id); - FetchFrameRecord GetFrameRecord(); + FrameRecord GetFrameRecord(); void SavePipelineState() { MakePipelineState(); } D3D11Pipe::State GetD3D11PipelineState() { return D3D11Pipe::State(); } @@ -116,12 +116,12 @@ public: void DescribeCounter(GPUCounter counterID, CounterDescription &desc); vector FetchCounters(const vector &counters); - ResourceId CreateProxyTexture(const FetchTexture &templateTex); + ResourceId CreateProxyTexture(const TextureDescription &templateTex); void SetProxyTextureData(ResourceId texid, uint32_t arrayIdx, uint32_t mip, byte *data, size_t dataSize); bool IsTextureSupported(const ResourceFormat &format); - ResourceId CreateProxyBuffer(const FetchBuffer &templateBuf); + ResourceId CreateProxyBuffer(const BufferDescription &templateBuf); void SetProxyBufferData(ResourceId bufid, byte *data, size_t dataSize); void RenderMesh(uint32_t eventID, const vector &secondaryDraws, const MeshDisplay &cfg); diff --git a/renderdoc/driver/gl/gl_counters.cpp b/renderdoc/driver/gl/gl_counters.cpp index 785bf3c3d..8483e98f4 100644 --- a/renderdoc/driver/gl/gl_counters.cpp +++ b/renderdoc/driver/gl/gl_counters.cpp @@ -209,7 +209,7 @@ void GLReplay::FillTimers(GLCounterContext &ctx, const DrawcallTreeNode &drawnod for(size_t i = 0; i < drawnode.children.size(); i++) { - const FetchDrawcall &d = drawnode.children[i].draw; + const DrawcallDescription &d = drawnode.children[i].draw; FillTimers(ctx, drawnode.children[i], counters); if(d.events.count == 0) diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp index 9fdb023e2..8bc71c798 100644 --- a/renderdoc/driver/gl/gl_debug.cpp +++ b/renderdoc/driver/gl/gl_debug.cpp @@ -807,7 +807,7 @@ bool GLReplay::GetMinMax(ResourceId texid, uint32_t sliceFace, uint32_t mip, uin auto &texDetails = m_pDriver->m_Textures[texid]; - FetchTexture details = GetTexture(texid); + TextureDescription details = GetTexture(texid); const GLHookSet &gl = m_pDriver->GetHookset(); @@ -981,7 +981,7 @@ bool GLReplay::GetHistogram(ResourceId texid, uint32_t sliceFace, uint32_t mip, auto &texDetails = m_pDriver->m_Textures[texid]; - FetchTexture details = GetTexture(texid); + TextureDescription details = GetTexture(texid); const GLHookSet &gl = m_pDriver->GetHookset(); @@ -2852,7 +2852,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, CompType typeHint, DebugOve gl.glUseProgram(DebugData.trisizeProg); gl.glBindProgramPipeline(0); - const FetchDrawcall *draw = m_pDriver->GetDrawcall(events[i]); + const DrawcallDescription *draw = m_pDriver->GetDrawcall(events[i]); for(uint32_t inst = 0; draw && inst < RDCMAX(1U, draw->numInstances); inst++) { @@ -3376,7 +3376,7 @@ void GLReplay::InitPostVSBuffers(uint32_t eventID) return; } - const FetchDrawcall *drawcall = m_pDriver->GetDrawcall(eventID); + const DrawcallDescription *drawcall = m_pDriver->GetDrawcall(eventID); if(drawcall->numIndices == 0) { @@ -4447,7 +4447,7 @@ void GLReplay::InitPostVSBuffers(const vector &passEvents) prev = passEvents[i]; } - const FetchDrawcall *d = m_pDriver->GetDrawcall(passEvents[i]); + const DrawcallDescription *d = m_pDriver->GetDrawcall(passEvents[i]); if(d) InitPostVSBuffers(passEvents[i]); diff --git a/renderdoc/driver/gl/gl_driver.cpp b/renderdoc/driver/gl/gl_driver.cpp index 6d7379841..27c0c191e 100644 --- a/renderdoc/driver/gl/gl_driver.cpp +++ b/renderdoc/driver/gl/gl_driver.cpp @@ -2485,7 +2485,7 @@ void WrappedOpenGL::StartFrameCapture(void *dev, void *wnd) m_FrameCounter = RDCMAX(1 + (uint32_t)m_CapturedFrames.size(), m_FrameCounter); - FetchFrameInfo frame; + FrameDescription frame; frame.frameNumber = m_FrameCounter + 1; frame.captureTime = Timing::GetUnixTimestamp(); RDCEraseEl(frame.stats); @@ -3694,7 +3694,7 @@ void WrappedOpenGL::ProcessChunk(uint64_t offset, GLChunkType context) { AddEvent("SwapBuffers()"); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "SwapBuffers()"; draw.flags |= DrawFlags::Present; @@ -3772,7 +3772,7 @@ void WrappedOpenGL::ContextReplayLog(LogState readType, uint32_t startEventID, u if(m_State == EXECUTING) { - FetchAPIEvent ev = GetEvent(startEventID); + APIEvent ev = GetEvent(startEventID); m_CurEventID = ev.eventID; m_pSerialiser->SetOffset(ev.fileOffset); m_FirstEventID = startEventID; @@ -3872,7 +3872,7 @@ void WrappedOpenGL::ContextProcessChunk(uint64_t offset, GLChunkType chunk) m_AddedDrawcall = false; } -void WrappedOpenGL::AddUsage(const FetchDrawcall &d) +void WrappedOpenGL::AddUsage(const DrawcallDescription &d) { DrawFlags DrawDispatchMask = DrawFlags::Drawcall | DrawFlags::Dispatch; if(!(d.flags & DrawDispatchMask)) @@ -4153,13 +4153,13 @@ void WrappedOpenGL::AddUsage(const FetchDrawcall &d) } } -void WrappedOpenGL::AddDrawcall(const FetchDrawcall &d, bool hasEvents) +void WrappedOpenGL::AddDrawcall(const DrawcallDescription &d, bool hasEvents) { m_AddedDrawcall = true; WrappedOpenGL *context = this; - FetchDrawcall draw = d; + DrawcallDescription draw = d; draw.eventID = m_CurEventID; draw.drawcallID = m_CurDrawcallID; @@ -4214,7 +4214,7 @@ void WrappedOpenGL::AddDrawcall(const FetchDrawcall &d, bool hasEvents) void WrappedOpenGL::AddEvent(string description) { - FetchAPIEvent apievent; + APIEvent apievent; apievent.fileOffset = m_CurChunkOffset; apievent.eventID = m_CurEventID; @@ -4234,7 +4234,7 @@ void WrappedOpenGL::AddEvent(string description) m_Events.push_back(apievent); } -FetchAPIEvent WrappedOpenGL::GetEvent(uint32_t eventID) +APIEvent WrappedOpenGL::GetEvent(uint32_t eventID) { for(size_t i = m_Events.size() - 1; i > 0; i--) { @@ -4245,7 +4245,7 @@ FetchAPIEvent WrappedOpenGL::GetEvent(uint32_t eventID) return m_Events[0]; } -const FetchDrawcall *WrappedOpenGL::GetDrawcall(uint32_t eventID) +const DrawcallDescription *WrappedOpenGL::GetDrawcall(uint32_t eventID) { if(eventID >= m_Drawcalls.size()) return NULL; diff --git a/renderdoc/driver/gl/gl_driver.h b/renderdoc/driver/gl/gl_driver.h index 07290ba2d..5dd89cc1e 100644 --- a/renderdoc/driver/gl/gl_driver.h +++ b/renderdoc/driver/gl/gl_driver.h @@ -72,19 +72,19 @@ enum CaptureFailReason struct DrawcallTreeNode { DrawcallTreeNode() {} - explicit DrawcallTreeNode(const FetchDrawcall &d) : draw(d) {} - FetchDrawcall draw; + explicit DrawcallTreeNode(const DrawcallDescription &d) : draw(d) {} + DrawcallDescription draw; vector children; - DrawcallTreeNode &operator=(const FetchDrawcall &d) + DrawcallTreeNode &operator=(const DrawcallDescription &d) { *this = DrawcallTreeNode(d); return *this; } - vector Bake() + vector Bake() { - vector ret; + vector ret; if(children.empty()) return ret; @@ -219,13 +219,13 @@ private: PersistentMapMemoryBarrier(m_CoherentMaps); } - vector m_CapturedFrames; - FetchFrameRecord m_FrameRecord; - vector m_Drawcalls; + vector m_CapturedFrames; + FrameRecord m_FrameRecord; + vector m_Drawcalls; // replay - vector m_CurEvents, m_Events; + vector m_CurEvents, m_Events; bool m_AddedDrawcall; uint64_t m_CurChunkOffset; @@ -351,8 +351,8 @@ private: void ProcessChunk(uint64_t offset, GLChunkType context); void ContextReplayLog(LogState readType, uint32_t startEventID, uint32_t endEventID, bool partial); void ContextProcessChunk(uint64_t offset, GLChunkType chunk); - void AddUsage(const FetchDrawcall &d); - void AddDrawcall(const FetchDrawcall &d, bool hasEvents); + void AddUsage(const DrawcallDescription &d); + void AddDrawcall(const DrawcallDescription &d, bool hasEvents); void AddEvent(string description); void Serialise_CaptureScope(uint64_t offset); @@ -552,11 +552,11 @@ public: Serialiser *GetSerialiser() { return m_pSerialiser; } GLuint GetFakeBBFBO() { return m_FakeBB_FBO; } GLuint GetFakeVAO() { return m_FakeVAO; } - FetchFrameRecord &GetFrameRecord() { return m_FrameRecord; } - FetchAPIEvent GetEvent(uint32_t eventID); + FrameRecord &GetFrameRecord() { return m_FrameRecord; } + APIEvent GetEvent(uint32_t eventID); const DrawcallTreeNode &GetRootDraw() { return m_ParentDrawcall; } - const FetchDrawcall *GetDrawcall(uint32_t eventID); + const DrawcallDescription *GetDrawcall(uint32_t eventID); void SuppressDebugMessages(bool suppress) { m_SuppressDebugMessages = suppress; } vector GetUsage(ResourceId id) { return m_ResourceUses[id]; } diff --git a/renderdoc/driver/gl/gl_replay.cpp b/renderdoc/driver/gl/gl_replay.cpp index 197f94bd0..f9a3c5e7f 100644 --- a/renderdoc/driver/gl/gl_replay.cpp +++ b/renderdoc/driver/gl/gl_replay.cpp @@ -80,13 +80,13 @@ vector GLReplay::GetPassEvents(uint32_t eventID) { vector passEvents; - const FetchDrawcall *draw = m_pDriver->GetDrawcall(eventID); + const DrawcallDescription *draw = m_pDriver->GetDrawcall(eventID); - const FetchDrawcall *start = draw; + const DrawcallDescription *start = draw; while(start && start->previous != 0 && !(m_pDriver->GetDrawcall((uint32_t)start->previous)->flags & DrawFlags::Clear)) { - const FetchDrawcall *prev = m_pDriver->GetDrawcall((uint32_t)start->previous); + const DrawcallDescription *prev = m_pDriver->GetDrawcall((uint32_t)start->previous); if(memcmp(start->outputs, prev->outputs, sizeof(start->outputs)) || start->depthOut != prev->depthOut) @@ -109,7 +109,7 @@ vector GLReplay::GetPassEvents(uint32_t eventID) return passEvents; } -FetchFrameRecord GLReplay::GetFrameRecord() +FrameRecord GLReplay::GetFrameRecord() { return m_pDriver->GetFrameRecord(); } @@ -427,7 +427,7 @@ bool GLReplay::IsRenderOutput(ResourceId id) return false; } -FetchTexture GLReplay::GetTexture(ResourceId id) +TextureDescription GLReplay::GetTexture(ResourceId id) { auto it = m_CachedTextures.find(id); if(it == m_CachedTextures.end()) @@ -441,7 +441,7 @@ FetchTexture GLReplay::GetTexture(ResourceId id) void GLReplay::CacheTexture(ResourceId id) { - FetchTexture tex; + TextureDescription tex; MakeCurrentReplayContext(&m_ReplayCtx); @@ -733,9 +733,9 @@ void GLReplay::CacheTexture(ResourceId id) m_CachedTextures[id] = tex; } -FetchBuffer GLReplay::GetBuffer(ResourceId id) +BufferDescription GLReplay::GetBuffer(ResourceId id) { - FetchBuffer ret; + BufferDescription ret; MakeCurrentReplayContext(&m_ReplayCtx); @@ -2812,7 +2812,7 @@ void GLReplay::FreeTargetResource(ResourceId id) m_pDriver->FreeTargetResource(id); } -ResourceId GLReplay::CreateProxyTexture(const FetchTexture &templateTex) +ResourceId GLReplay::CreateProxyTexture(const TextureDescription &templateTex) { WrappedOpenGL &gl = *m_pDriver; @@ -3139,7 +3139,7 @@ bool GLReplay::IsTextureSupported(const ResourceFormat &format) return true; } -ResourceId GLReplay::CreateProxyBuffer(const FetchBuffer &templateBuf) +ResourceId GLReplay::CreateProxyBuffer(const BufferDescription &templateBuf) { WrappedOpenGL &gl = *m_pDriver; diff --git a/renderdoc/driver/gl/gl_replay.h b/renderdoc/driver/gl/gl_replay.h index 9cb55e3d2..a23095a22 100644 --- a/renderdoc/driver/gl/gl_replay.h +++ b/renderdoc/driver/gl/gl_replay.h @@ -95,17 +95,17 @@ public: APIProperties GetAPIProperties(); vector GetBuffers(); - FetchBuffer GetBuffer(ResourceId id); + BufferDescription GetBuffer(ResourceId id); vector GetTextures(); - FetchTexture GetTexture(ResourceId id); + TextureDescription GetTexture(ResourceId id); ShaderReflection *GetShader(ResourceId shader, string entryPoint); vector GetDebugMessages(); vector GetUsage(ResourceId id); - FetchFrameRecord GetFrameRecord(); + FrameRecord GetFrameRecord(); void SavePipelineState(); D3D11Pipe::State GetD3D11PipelineState() { return D3D11Pipe::State(); } @@ -206,12 +206,12 @@ public: ResourceId ApplyCustomShader(ResourceId shader, ResourceId texid, uint32_t mip, uint32_t arrayIdx, uint32_t sampleIdx, CompType typeHint); - ResourceId CreateProxyTexture(const FetchTexture &templateTex); + ResourceId CreateProxyTexture(const TextureDescription &templateTex); void SetProxyTextureData(ResourceId texid, uint32_t arrayIdx, uint32_t mip, byte *data, size_t dataSize); bool IsTextureSupported(const ResourceFormat &format); - ResourceId CreateProxyBuffer(const FetchBuffer &templateBuf); + ResourceId CreateProxyBuffer(const BufferDescription &templateBuf); void SetProxyBufferData(ResourceId bufid, byte *data, size_t dataSize); bool IsRenderOutput(ResourceId id); @@ -417,7 +417,7 @@ private: void CacheTexture(ResourceId id); - map m_CachedTextures; + map m_CachedTextures; WrappedOpenGL *m_pDriver; diff --git a/renderdoc/driver/gl/wrappers/gl_debug_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_debug_funcs.cpp index 52d7952e4..1ab13db81 100644 --- a/renderdoc/driver/gl/wrappers/gl_debug_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_debug_funcs.cpp @@ -154,7 +154,7 @@ bool WrappedOpenGL::Serialise_glDebugMessageInsert(GLenum source, GLenum type, G if(m_State == READING) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::SetMarker; @@ -236,7 +236,7 @@ bool WrappedOpenGL::Serialise_glPushDebugGroup(GLenum source, GLuint id, GLsizei if(m_State == READING) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::PushMarker; @@ -263,7 +263,7 @@ bool WrappedOpenGL::Serialise_glPopDebugGroup() { if(m_State == READING && !m_CurEvents.empty()) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "API Calls"; draw.flags |= DrawFlags::SetMarker | DrawFlags::APICalls; diff --git a/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp index be8a13197..a442f2e11 100644 --- a/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp @@ -49,7 +49,7 @@ bool WrappedOpenGL::Serialise_glDispatchCompute(GLuint num_groups_x, GLuint num_ string name = "glDispatchCompute(" + ToStr::Get(X) + ", " + ToStr::Get(Y) + ", " + ToStr::Get(Z) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Dispatch; @@ -130,7 +130,7 @@ bool WrappedOpenGL::Serialise_glDispatchComputeGroupSizeARB(GLuint num_groups_x, ToStr::Get(Z) + ", " + ToStr::Get(sX) + ", " + ToStr::Get(sY) + ", " + ToStr::Get(sZ) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Dispatch; @@ -230,7 +230,7 @@ bool WrappedOpenGL::Serialise_glDispatchComputeIndirect(GLintptr indirect) string name = "glDispatchComputeIndirect(<" + ToStr::Get(groupSizes[0]) + ", " + ToStr::Get(groupSizes[1]) + ", " + ToStr::Get(groupSizes[2]) + ">)"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Dispatch | DrawFlags::Indirect; @@ -436,7 +436,7 @@ bool WrappedOpenGL::Serialise_glDrawTransformFeedback(GLenum mode, GLuint id) GLNOTIMP("Not fetching feedback object count for glDrawTransformFeedback() display"); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = 1; draw.numInstances = 1; @@ -502,7 +502,7 @@ bool WrappedOpenGL::Serialise_glDrawTransformFeedbackInstanced(GLenum mode, GLui GLNOTIMP("Not fetching feedback object count for glDrawTransformFeedbackInstanced() display"); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = 1; draw.numInstances = 1; @@ -567,7 +567,7 @@ bool WrappedOpenGL::Serialise_glDrawTransformFeedbackStream(GLenum mode, GLuint GLNOTIMP("Not fetching feedback object count for glDrawTransformFeedbackStream() display"); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = 1; draw.numInstances = 1; @@ -637,7 +637,7 @@ bool WrappedOpenGL::Serialise_glDrawTransformFeedbackStreamInstanced(GLenum mode GLNOTIMP( "Not fetching feedback object count for glDrawTransformFeedbackStreamInstanced() display"); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = 1; draw.numInstances = 1; @@ -700,7 +700,7 @@ bool WrappedOpenGL::Serialise_glDrawArrays(GLenum mode, GLint first, GLsizei cou AddEvent(desc); string name = "glDrawArrays(" + ToStr::Get(Count) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = 1; @@ -832,7 +832,7 @@ bool WrappedOpenGL::Serialise_glDrawArraysIndirect(GLenum mode, const void *indi string name = "glDrawArraysIndirect(" + ToStr::Get(params.count) + ", " + ToStr::Get(params.instanceCount) + ">)"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = params.count; draw.numInstances = params.instanceCount; @@ -902,7 +902,7 @@ bool WrappedOpenGL::Serialise_glDrawArraysInstanced(GLenum mode, GLint first, GL string name = "glDrawArraysInstanced(" + ToStr::Get(Count) + ", " + ToStr::Get(InstanceCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = InstanceCount; @@ -974,7 +974,7 @@ bool WrappedOpenGL::Serialise_glDrawArraysInstancedBaseInstance(GLenum mode, GLi string name = "glDrawArraysInstancedBaseInstance(" + ToStr::Get(Count) + ", " + ToStr::Get(InstanceCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = InstanceCount; @@ -1134,7 +1134,7 @@ bool WrappedOpenGL::Serialise_glDrawElements(GLenum mode, GLsizei count, GLenum ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = 1; @@ -1205,7 +1205,7 @@ bool WrappedOpenGL::Serialise_glDrawElementsIndirect(GLenum mode, GLenum type, c ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = params.count; draw.numInstances = params.instanceCount; @@ -1288,7 +1288,7 @@ bool WrappedOpenGL::Serialise_glDrawRangeElements(GLenum mode, GLuint start, GLu ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = 1; @@ -1368,7 +1368,7 @@ bool WrappedOpenGL::Serialise_glDrawRangeElementsBaseVertex(GLenum mode, GLuint ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = 1; @@ -1445,7 +1445,7 @@ bool WrappedOpenGL::Serialise_glDrawElementsBaseVertex(GLenum mode, GLsizei coun ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = 1; @@ -1521,7 +1521,7 @@ bool WrappedOpenGL::Serialise_glDrawElementsInstanced(GLenum mode, GLsizei count ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = InstCount; @@ -1601,7 +1601,7 @@ bool WrappedOpenGL::Serialise_glDrawElementsInstancedBaseInstance(GLenum mode, G ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = InstCount; @@ -1684,7 +1684,7 @@ bool WrappedOpenGL::Serialise_glDrawElementsInstancedBaseVertex(GLenum mode, GLs ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = InstCount; @@ -1767,7 +1767,7 @@ bool WrappedOpenGL::Serialise_glDrawElementsInstancedBaseVertexBaseInstance( ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = Count; draw.numInstances = InstCount; @@ -1879,7 +1879,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArrays(GLenum mode, const GLint *first, { string name = "glMultiDrawArrays(" + ToStr::Get(Count) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::MultiDraw; @@ -1893,7 +1893,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArrays(GLenum mode, const GLint *first, { m_CurEventID++; - FetchDrawcall multidraw; + DrawcallDescription multidraw; multidraw.numIndices = countArray[i]; multidraw.vertexOffset = firstArray[i]; @@ -2034,7 +2034,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElements(GLenum mode, const GLsizei *co ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::MultiDraw; @@ -2051,7 +2051,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElements(GLenum mode, const GLsizei *co { m_CurEventID++; - FetchDrawcall multidraw; + DrawcallDescription multidraw; multidraw.numIndices = countArray[i]; multidraw.indexOffset = (uint32_t)uint64_t(idxOffsArray[i]) & 0xFFFFFFFF; multidraw.indexByteWidth = IdxSize; @@ -2199,7 +2199,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsBaseVertex(GLenum mode, const G ? 2 : /*Type == eGL_UNSIGNED_INT*/ 4; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::MultiDraw; @@ -2215,7 +2215,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsBaseVertex(GLenum mode, const G { m_CurEventID++; - FetchDrawcall multidraw; + DrawcallDescription multidraw; multidraw.numIndices = countArray[i]; multidraw.indexOffset = (uint32_t)uint64_t(idxOffsArray[i]) & 0xFFFFFFFF; multidraw.baseVertex = baseArray[i]; @@ -2347,7 +2347,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirect(GLenum mode, const void { string name = "glMultiDrawArraysIndirect(" + ToStr::Get(Count) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::MultiDraw; @@ -2381,7 +2381,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirect(GLenum mode, const void else offs += sizeof(params); - FetchDrawcall multidraw; + DrawcallDescription multidraw; multidraw.numIndices = params.count; multidraw.numInstances = params.instanceCount; multidraw.vertexOffset = params.first; @@ -2514,7 +2514,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirect(GLenum mode, GLenum ty { string name = "glMultiDrawElementsIndirect(" + ToStr::Get(Count) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::MultiDraw; @@ -2549,7 +2549,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirect(GLenum mode, GLenum ty else offs += sizeof(params); - FetchDrawcall multidraw; + DrawcallDescription multidraw; multidraw.numIndices = params.count; multidraw.numInstances = params.instanceCount; multidraw.indexOffset = params.firstIndex; @@ -2691,7 +2691,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirectCountARB(GLenum mode, GLi { string name = "glMultiDrawArraysIndirectCountARB(<" + ToStr::Get(realdrawcount) + ">)"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::MultiDraw; @@ -2725,7 +2725,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirectCountARB(GLenum mode, GLi else offs += sizeof(params); - FetchDrawcall multidraw; + DrawcallDescription multidraw; multidraw.numIndices = params.count; multidraw.numInstances = params.instanceCount; multidraw.vertexOffset = params.first; @@ -2874,7 +2874,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirectCountARB(GLenum mode, G { string name = "glMultiDrawElementsIndirectCountARB(<" + ToStr::Get(realdrawcount) + ">)"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::MultiDraw; @@ -2909,7 +2909,7 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirectCountARB(GLenum mode, G else offs += sizeof(params); - FetchDrawcall multidraw; + DrawcallDescription multidraw; multidraw.numIndices = params.count; multidraw.numInstances = params.instanceCount; multidraw.indexOffset = params.firstIndex; @@ -3028,7 +3028,7 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferfv(GLuint framebuffer, GLen { AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear; if(buf == eGL_COLOR) @@ -3166,7 +3166,7 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferiv(GLuint framebuffer, GLen { AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear; if(buf == eGL_COLOR) @@ -3283,7 +3283,7 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferuiv(GLuint framebuffer, GLe { AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear | DrawFlags::ClearColour; @@ -3381,7 +3381,7 @@ bool WrappedOpenGL::Serialise_glClearNamedFramebufferfi(GLuint framebuffer, GLen AddEvent(desc); string name = "glClearBufferfi(" + ToStr::Get(d) + ToStr::Get(s) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear | DrawFlags::ClearDepthStencil; @@ -3772,7 +3772,7 @@ bool WrappedOpenGL::Serialise_glClear(GLbitfield mask) name += ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear; if(Mask & GL_COLOR_BUFFER_BIT) diff --git a/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp index 59d5397d3..3a0f3406a 100644 --- a/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp @@ -1481,7 +1481,7 @@ bool WrappedOpenGL::Serialise_glBlitNamedFramebuffer(GLuint readFramebuffer, GLu AddEvent(desc); string name = "glBlitFramebuffer(" + ToStr::Get(readId) + ", " + ToStr::Get(drawId) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Resolve; diff --git a/renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp index a192c8aae..11fee5a8b 100644 --- a/renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp @@ -723,7 +723,7 @@ bool WrappedOpenGL::Serialise_glGenerateTextureMipmapEXT(GLuint texture, GLenum AddEvent(desc); string name = "glGenerateMipmap(" + ToStr::Get(id) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::GenMips; @@ -859,7 +859,7 @@ bool WrappedOpenGL::Serialise_glCopyImageSubData(GLuint srcName, GLenum srcTarge AddEvent(desc); string name = "glCopyImageSubData(" + ToStr::Get(srcid) + ", " + ToStr::Get(dstid) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp index 967643ddc..7b0075474 100644 --- a/renderdoc/driver/vulkan/vk_core.cpp +++ b/renderdoc/driver/vulkan/vk_core.cpp @@ -543,7 +543,7 @@ uint32_t WrappedVulkan::HandlePreCallback(VkCommandBuffer commandBuffer, DrawFla RDCASSERT(eventID != 0); // handle all aliases of this drawcall as long as it's not a multidraw - const FetchDrawcall *draw = GetDrawcall(eventID); + const DrawcallDescription *draw = GetDrawcall(eventID); if(draw == NULL || !(draw->flags & DrawFlags::MultiDraw)) { @@ -1119,7 +1119,7 @@ void WrappedVulkan::StartFrameCapture(void *dev, void *wnd) m_FrameCounter = RDCMAX(1 + (uint32_t)m_CapturedFrames.size(), m_FrameCounter); - FetchFrameInfo frame; + FrameDescription frame; frame.frameNumber = m_FrameCounter + 1; frame.captureTime = Timing::GetUnixTimestamp(); RDCEraseEl(frame.stats); @@ -1763,7 +1763,7 @@ void WrappedVulkan::ContextReplayLog(LogState readType, uint32_t startEventID, u if(m_State == EXECUTING) { - FetchAPIEvent ev = GetEvent(startEventID); + APIEvent ev = GetEvent(startEventID); m_RootEventID = ev.eventID; // if not partial, we need to be sure to replay @@ -1845,10 +1845,7 @@ void WrappedVulkan::ContextReplayLog(LogState readType, uint32_t startEventID, u struct SortEID { - bool operator()(const FetchAPIEvent &a, const FetchAPIEvent &b) - { - return a.eventID < b.eventID; - } + bool operator()(const APIEvent &a, const APIEvent &b) { return a.eventID < b.eventID; } }; std::sort(m_Events.begin(), m_Events.end(), SortEID()); @@ -2301,7 +2298,7 @@ void WrappedVulkan::ProcessChunk(uint64_t offset, VulkanChunkType context) { AddEvent("vkQueuePresentKHR()"); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "vkQueuePresentKHR()"; draw.flags |= DrawFlags::Present; @@ -2736,11 +2733,11 @@ VkCommandBuffer WrappedVulkan::RerecordCmdBuf(ResourceId cmdid, PartialReplayInd return VK_NULL_HANDLE; } -void WrappedVulkan::AddDrawcall(const FetchDrawcall &d, bool hasEvents) +void WrappedVulkan::AddDrawcall(const DrawcallDescription &d, bool hasEvents) { m_AddedDrawcall = true; - FetchDrawcall draw = d; + DrawcallDescription draw = d; draw.eventID = m_LastCmdBufferID != ResourceId() ? m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID : m_RootEventID; @@ -2805,9 +2802,9 @@ void WrappedVulkan::AddDrawcall(const FetchDrawcall &d, bool hasEvents) if(hasEvents) { - vector &srcEvents = m_LastCmdBufferID != ResourceId() - ? m_BakedCmdBufferInfo[m_LastCmdBufferID].curEvents - : m_RootEvents; + vector &srcEvents = m_LastCmdBufferID != ResourceId() + ? m_BakedCmdBufferInfo[m_LastCmdBufferID].curEvents + : m_RootEvents; draw.events = srcEvents; srcEvents.clear(); @@ -2834,7 +2831,7 @@ void WrappedVulkan::AddDrawcall(const FetchDrawcall &d, bool hasEvents) void WrappedVulkan::AddUsage(VulkanDrawcallTreeNode &drawNode, vector &debugMessages) { - FetchDrawcall &d = drawNode.draw; + DrawcallDescription &d = drawNode.draw; const BakedCmdBufferInfo::CmdBufferState &state = m_BakedCmdBufferInfo[m_LastCmdBufferID].state; VulkanCreationInfo &c = m_CreationInfo; @@ -3038,7 +3035,7 @@ void WrappedVulkan::AddUsage(VulkanDrawcallTreeNode &drawNode, vector 0; i--) { @@ -3087,7 +3084,7 @@ FetchAPIEvent WrappedVulkan::GetEvent(uint32_t eventID) return m_Events[0]; } -const FetchDrawcall *WrappedVulkan::GetDrawcall(uint32_t eventID) +const DrawcallDescription *WrappedVulkan::GetDrawcall(uint32_t eventID) { if(eventID >= m_Drawcalls.size()) return NULL; diff --git a/renderdoc/driver/vulkan/vk_core.h b/renderdoc/driver/vulkan/vk_core.h index b2e151516..e0d2c39fd 100644 --- a/renderdoc/driver/vulkan/vk_core.h +++ b/renderdoc/driver/vulkan/vk_core.h @@ -64,15 +64,15 @@ struct VkInitParams : public RDCInitParams struct VulkanDrawcallTreeNode { VulkanDrawcallTreeNode() {} - explicit VulkanDrawcallTreeNode(const FetchDrawcall &d) : draw(d) {} - FetchDrawcall draw; + explicit VulkanDrawcallTreeNode(const DrawcallDescription &d) : draw(d) {} + DrawcallDescription draw; vector children; vector > resourceUsage; vector executedCmds; - VulkanDrawcallTreeNode &operator=(const FetchDrawcall &d) + VulkanDrawcallTreeNode &operator=(const DrawcallDescription &d) { *this = VulkanDrawcallTreeNode(d); return *this; @@ -111,9 +111,9 @@ struct VulkanDrawcallTreeNode children[i].UpdateIDs(baseEventID, baseDrawID); } - vector Bake() + vector Bake() { - vector ret; + vector ret; if(children.empty()) return ret; @@ -270,9 +270,9 @@ private: uint32_t m_FrameCounter; - vector m_CapturedFrames; - FetchFrameRecord m_FrameRecord; - vector m_Drawcalls; + vector m_CapturedFrames; + FrameRecord m_FrameRecord; + vector m_Drawcalls; struct PhysicalDeviceData { @@ -401,7 +401,7 @@ private: { } ~BakedCmdBufferInfo() { SAFE_DELETE(draw); } - vector curEvents; + vector curEvents; vector debugMessages; list drawStack; @@ -632,7 +632,7 @@ private: void ApplyInitialContents(); - vector m_RootEvents, m_Events; + vector m_RootEvents, m_Events; bool m_AddedDrawcall; uint64_t m_CurChunkOffset; @@ -662,7 +662,7 @@ private: void ProcessChunk(uint64_t offset, VulkanChunkType context); void ContextReplayLog(LogState readType, uint32_t startEventID, uint32_t endEventID, bool partial); void ContextProcessChunk(uint64_t offset, VulkanChunkType chunk); - void AddDrawcall(const FetchDrawcall &d, bool hasEvents); + void AddDrawcall(const DrawcallDescription &d, bool hasEvents); void AddEvent(string description); void AddUsage(VulkanDrawcallTreeNode &drawNode, vector &debugMessages); @@ -709,10 +709,10 @@ public: void ReplayLog(uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType); void ReadLogInitialisation(); - FetchFrameRecord &GetFrameRecord() { return m_FrameRecord; } - FetchAPIEvent GetEvent(uint32_t eventID); + FrameRecord &GetFrameRecord() { return m_FrameRecord; } + APIEvent GetEvent(uint32_t eventID); uint32_t GetMaxEID() { return m_Events.back().eventID; } - const FetchDrawcall *GetDrawcall(uint32_t eventID); + const DrawcallDescription *GetDrawcall(uint32_t eventID); vector GetUsage(ResourceId id) { return m_ResourceUses[id]; } // return the pre-selected device and queue diff --git a/renderdoc/driver/vulkan/vk_debug.cpp b/renderdoc/driver/vulkan/vk_debug.cpp index 6f6e71769..fc049b7a3 100644 --- a/renderdoc/driver/vulkan/vk_debug.cpp +++ b/renderdoc/driver/vulkan/vk_debug.cpp @@ -5252,7 +5252,7 @@ ResourceId VulkanDebugManager::RenderOverlay(ResourceId texid, DebugOverlay over VkImageSubresourceRange subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; - const FetchDrawcall *mainDraw = m_pDriver->GetDrawcall(eventID); + const DrawcallDescription *mainDraw = m_pDriver->GetDrawcall(eventID); // Secondary commands can't have render passes if((mainDraw && !(mainDraw->flags & DrawFlags::Drawcall)) || @@ -6108,7 +6108,7 @@ ResourceId VulkanDebugManager::RenderOverlay(ResourceId texid, DebugOverlay over // in the loop below if(overlay == DebugOverlay::ClearBeforePass) { - const FetchDrawcall *draw = m_pDriver->GetDrawcall(events[0]); + const DrawcallDescription *draw = m_pDriver->GetDrawcall(events[0]); if(draw && draw->flags & DrawFlags::BeginPass) { if(events.size() == 1) @@ -6449,7 +6449,7 @@ ResourceId VulkanDebugManager::RenderOverlay(ResourceId texid, DebugOverlay over while(!events.empty()) { - const FetchDrawcall *draw = m_pDriver->GetDrawcall(events[0]); + const DrawcallDescription *draw = m_pDriver->GetDrawcall(events[0]); // remove any non-drawcalls, like the pass boundary. if(!(draw->flags & DrawFlags::Drawcall)) @@ -6689,7 +6689,7 @@ ResourceId VulkanDebugManager::RenderOverlay(ResourceId texid, DebugOverlay over for(size_t i = 0; i < events.size(); i++) { - const FetchDrawcall *draw = m_pDriver->GetDrawcall(events[i]); + const DrawcallDescription *draw = m_pDriver->GetDrawcall(events[i]); for(uint32_t inst = 0; draw && inst < RDCMAX(1U, draw->numInstances); inst++) { @@ -7954,7 +7954,7 @@ void VulkanDebugManager::InitPostVSBuffers(uint32_t eventID) return; } - const FetchDrawcall *drawcall = m_pDriver->GetDrawcall(eventID); + const DrawcallDescription *drawcall = m_pDriver->GetDrawcall(eventID); if(drawcall == NULL || drawcall->numIndices == 0 || drawcall->numInstances == 0) return; diff --git a/renderdoc/driver/vulkan/vk_replay.cpp b/renderdoc/driver/vulkan/vk_replay.cpp index 593b82aad..e448c6f52 100644 --- a/renderdoc/driver/vulkan/vk_replay.cpp +++ b/renderdoc/driver/vulkan/vk_replay.cpp @@ -668,14 +668,14 @@ vector VulkanReplay::GetPassEvents(uint32_t eventID) { vector passEvents; - const FetchDrawcall *draw = m_pDriver->GetDrawcall(eventID); + const DrawcallDescription *draw = m_pDriver->GetDrawcall(eventID); if(!draw) return passEvents; // for vulkan a pass == a renderpass, if we're not inside a // renderpass then there are no pass events. - const FetchDrawcall *start = draw; + const DrawcallDescription *start = draw; while(start) { // if we've come to the beginning of a pass, break out of the loop, we've @@ -745,7 +745,7 @@ Callstack::StackResolver *VulkanReplay::GetCallstackResolver() return m_pDriver->GetMainSerialiser()->GetCallstackResolver(); } -FetchFrameRecord VulkanReplay::GetFrameRecord() +FrameRecord VulkanReplay::GetFrameRecord() { return m_pDriver->GetFrameRecord(); } @@ -788,11 +788,11 @@ vector VulkanReplay::GetBuffers() return bufs; } -FetchTexture VulkanReplay::GetTexture(ResourceId id) +TextureDescription VulkanReplay::GetTexture(ResourceId id) { VulkanCreationInfo::Image &iminfo = m_pDriver->m_CreationInfo.m_Image[id]; - FetchTexture ret; + TextureDescription ret; ret.ID = m_pDriver->GetResourceManager()->GetOriginalID(id); ret.arraysize = iminfo.arrayLayers; ret.creationFlags = iminfo.creationFlags; @@ -870,11 +870,11 @@ FetchTexture VulkanReplay::GetTexture(ResourceId id) return ret; } -FetchBuffer VulkanReplay::GetBuffer(ResourceId id) +BufferDescription VulkanReplay::GetBuffer(ResourceId id) { VulkanCreationInfo::Buffer &bufinfo = m_pDriver->m_CreationInfo.m_Buffer[id]; - FetchBuffer ret; + BufferDescription ret; ret.ID = m_pDriver->GetResourceManager()->GetOriginalID(id); ret.length = bufinfo.size; @@ -5553,7 +5553,7 @@ ShaderDebugTrace VulkanReplay::DebugThread(uint32_t eventID, uint32_t groupid[3] return ShaderDebugTrace(); } -ResourceId VulkanReplay::CreateProxyTexture(const FetchTexture &templateTex) +ResourceId VulkanReplay::CreateProxyTexture(const TextureDescription &templateTex) { VULKANNOTIMP("CreateProxyTexture"); return ResourceId(); @@ -5570,7 +5570,7 @@ bool VulkanReplay::IsTextureSupported(const ResourceFormat &format) return true; } -ResourceId VulkanReplay::CreateProxyBuffer(const FetchBuffer &templateBuf) +ResourceId VulkanReplay::CreateProxyBuffer(const BufferDescription &templateBuf) { VULKANNOTIMP("CreateProxyBuffer"); return ResourceId(); diff --git a/renderdoc/driver/vulkan/vk_replay.h b/renderdoc/driver/vulkan/vk_replay.h index 9e47d93eb..dd5bf52f9 100644 --- a/renderdoc/driver/vulkan/vk_replay.h +++ b/renderdoc/driver/vulkan/vk_replay.h @@ -137,16 +137,16 @@ public: APIProperties GetAPIProperties(); vector GetBuffers(); - FetchBuffer GetBuffer(ResourceId id); + BufferDescription GetBuffer(ResourceId id); vector GetTextures(); - FetchTexture GetTexture(ResourceId id); + TextureDescription GetTexture(ResourceId id); ShaderReflection *GetShader(ResourceId shader, string entryPoint); vector GetUsage(ResourceId id); - FetchFrameRecord GetFrameRecord(); + FrameRecord GetFrameRecord(); vector GetDebugMessages(); void SavePipelineState(); @@ -231,12 +231,12 @@ public: ResourceId ApplyCustomShader(ResourceId shader, ResourceId texid, uint32_t mip, uint32_t arrayIdx, uint32_t sampleIdx, CompType typeHint); - ResourceId CreateProxyTexture(const FetchTexture &templateTex); + ResourceId CreateProxyTexture(const TextureDescription &templateTex); void SetProxyTextureData(ResourceId texid, uint32_t arrayIdx, uint32_t mip, byte *data, size_t dataSize); bool IsTextureSupported(const ResourceFormat &format); - ResourceId CreateProxyBuffer(const FetchBuffer &templateBuf); + ResourceId CreateProxyBuffer(const BufferDescription &templateBuf); void SetProxyBufferData(ResourceId bufid, byte *data, size_t dataSize); bool IsRenderOutput(ResourceId id); diff --git a/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp index 3f80316be..4ac3dac4a 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_cmd_funcs.cpp @@ -742,7 +742,7 @@ bool WrappedVulkan::Serialise_vkEndCommandBuffer(Serialiser *localSerialiser, if(m_State == READING && !m_BakedCmdBufferInfo[m_LastCmdBufferID].curEvents.empty()) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "API Calls"; draw.flags |= DrawFlags::SetMarker | DrawFlags::APICalls; @@ -890,7 +890,7 @@ bool WrappedVulkan::Serialise_vkCmdBeginRenderPass(Serialiser *localSerialiser, string opDesc = MakeRenderPassOpString(false); AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = StringFormat::Fmt("vkCmdBeginRenderPass(%s)", opDesc.c_str()); draw.flags |= DrawFlags::PassBoundary | DrawFlags::BeginPass; @@ -991,7 +991,7 @@ bool WrappedVulkan::Serialise_vkCmdNextSubpass(Serialiser *localSerialiser, const string desc = localSerialiser->GetDebugStr(); AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = StringFormat::Fmt("vkCmdNextSubpass() => %u", m_BakedCmdBufferInfo[m_LastCmdBufferID].state.subpass); draw.flags |= DrawFlags::PassBoundary | DrawFlags::BeginPass | DrawFlags::EndPass; @@ -1064,7 +1064,7 @@ bool WrappedVulkan::Serialise_vkCmdEndRenderPass(Serialiser *localSerialiser, string opDesc = MakeRenderPassOpString(true); AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = StringFormat::Fmt("vkCmdEndRenderPass(%s)", opDesc.c_str()); draw.flags |= DrawFlags::PassBoundary | DrawFlags::EndPass; @@ -2351,7 +2351,7 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(Serialiser *localSerialiser, AddEvent(desc); - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "vkCmdExecuteCommands(" + ToStr::Get(count) + ")"; draw.flags = DrawFlags::CmdList | DrawFlags::PushMarker; @@ -2367,7 +2367,7 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(Serialiser *localSerialiser, ToStr::Get(cmdids[c]).c_str()); // add a fake marker - FetchDrawcall marker; + DrawcallDescription marker; marker.name = name; marker.flags = DrawFlags::PassBoundary | DrawFlags::BeginPass; AddEvent(name); @@ -2413,7 +2413,7 @@ bool WrappedVulkan::Serialise_vkCmdExecuteCommands(Serialiser *localSerialiser, } // add an extra pop marker - draw = FetchDrawcall(); + draw = DrawcallDescription(); draw.flags = DrawFlags::PopMarker; AddDrawcall(draw, true); @@ -2637,7 +2637,7 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerBeginEXT(Serialiser *localSerialis if(m_State == READING) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::PushMarker; @@ -2681,7 +2681,7 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerEndEXT(Serialiser *localSerialiser if(m_State == READING && !m_BakedCmdBufferInfo[m_LastCmdBufferID].curEvents.empty()) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "API Calls"; draw.flags = DrawFlags::SetMarker | DrawFlags::APICalls; @@ -2692,7 +2692,7 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerEndEXT(Serialiser *localSerialiser { // dummy draw that is consumed when this command buffer // is being in-lined into the call stream - FetchDrawcall draw; + DrawcallDescription draw; draw.name = "Pop()"; draw.flags = DrawFlags::PopMarker; @@ -2739,7 +2739,7 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerInsertEXT(Serialiser *localSeriali if(m_State == READING) { - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::SetMarker; diff --git a/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp index 69eefbb66..7b6d21b4a 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_draw_funcs.cpp @@ -117,7 +117,7 @@ bool WrappedVulkan::Serialise_vkCmdDraw(Serialiser *localSerialiser, VkCommandBu AddEvent(desc); string name = "vkCmdDraw(" + ToStr::Get(vtxCount) + "," + ToStr::Get(instCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = vtxCount; draw.numInstances = instCount; @@ -214,7 +214,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexed(Serialiser *localSerialiser, AddEvent(desc); string name = "vkCmdDrawIndexed(" + ToStr::Get(idxCount) + "," + ToStr::Get(instCount) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.numIndices = idxCount; draw.numInstances = instCount; @@ -411,7 +411,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(Serialiser *localSerialiser, // for 'single' draws, don't do complex multi-draw just inline it if(cnt <= 1) { - FetchDrawcall draw; + DrawcallDescription draw; if(cnt == 1) { @@ -447,7 +447,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(Serialiser *localSerialiser, return true; } - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags = DrawFlags::MultiDraw | DrawFlags::PushMarker; AddEvent(desc); @@ -475,7 +475,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirect(Serialiser *localSerialiser, offs += strd; - FetchDrawcall multi; + DrawcallDescription multi; multi.numIndices = params.vertexCount; multi.numInstances = params.instanceCount; multi.vertexOffset = params.firstVertex; @@ -704,7 +704,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(Serialiser *localSerialis // for 'single' draws, don't do complex multi-draw just inline it if(cnt <= 1) { - FetchDrawcall draw; + DrawcallDescription draw; if(cnt == 1) { @@ -741,7 +741,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(Serialiser *localSerialis return true; } - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags = DrawFlags::MultiDraw | DrawFlags::PushMarker; AddEvent(desc); @@ -769,7 +769,7 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirect(Serialiser *localSerialis offs += strd; - FetchDrawcall multi; + DrawcallDescription multi; multi.numIndices = params.indexCount; multi.numInstances = params.instanceCount; multi.vertexOffset = params.vertexOffset; @@ -871,7 +871,7 @@ bool WrappedVulkan::Serialise_vkCmdDispatch(Serialiser *localSerialiser, string name = "vkCmdDispatch(" + ToStr::Get(X) + "," + ToStr::Get(Y) + "," + ToStr::Get(Z) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.dispatchDimension[0] = X; draw.dispatchDimension[1] = Y; @@ -963,7 +963,7 @@ bool WrappedVulkan::Serialise_vkCmdDispatchIndirect(Serialiser *localSerialiser, string name = "vkCmdDispatchIndirect(<" + ToStr::Get(args->x) + "," + ToStr::Get(args->y) + "," + ToStr::Get(args->z) + ">)"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.dispatchDimension[0] = args->x; draw.dispatchDimension[1] = args->y; @@ -1071,7 +1071,7 @@ bool WrappedVulkan::Serialise_vkCmdBlitImage(Serialiser *localSerialiser, AddEvent(desc); string name = "vkCmdBlitImage(" + ToStr::Get(srcid) + "," + ToStr::Get(dstid) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Resolve; @@ -1198,7 +1198,7 @@ bool WrappedVulkan::Serialise_vkCmdResolveImage(Serialiser *localSerialiser, AddEvent(desc); string name = "vkCmdResolveImage(" + ToStr::Get(srcid) + "," + ToStr::Get(dstid) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Resolve; @@ -1325,7 +1325,7 @@ bool WrappedVulkan::Serialise_vkCmdCopyImage(Serialiser *localSerialiser, AddEvent(desc); string name = "vkCmdCopyImage(" + ToStr::Get(srcid) + "," + ToStr::Get(dstid) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -1452,7 +1452,7 @@ bool WrappedVulkan::Serialise_vkCmdCopyBufferToImage(Serialiser *localSerialiser AddEvent(desc); string name = "vkCmdCopyBufferToImage(" + ToStr::Get(bufid) + "," + ToStr::Get(imgid) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -1570,7 +1570,7 @@ bool WrappedVulkan::Serialise_vkCmdCopyImageToBuffer(Serialiser *localSerialiser AddEvent(desc); string name = "vkCmdCopyImageToBuffer(" + ToStr::Get(imgid) + "," + ToStr::Get(bufid) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -1688,7 +1688,7 @@ bool WrappedVulkan::Serialise_vkCmdCopyBuffer(Serialiser *localSerialiser, AddEvent(desc); string name = "vkCmdCopyBuffer(" + ToStr::Get(srcid) + "," + ToStr::Get(dstid) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Copy; @@ -1817,7 +1817,7 @@ bool WrappedVulkan::Serialise_vkCmdClearColorImage(Serialiser *localSerialiser, AddEvent(desc); string name = "vkCmdClearColorImage(" + ToStr::Get(col) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear | DrawFlags::ClearColour; @@ -1921,7 +1921,7 @@ bool WrappedVulkan::Serialise_vkCmdClearDepthStencilImage( string name = "vkCmdClearDepthStencilImage(" + ToStr::Get(ds.depth) + "," + ToStr::Get(ds.stencil) + ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear | DrawFlags::ClearDepthStencil; @@ -2021,7 +2021,7 @@ bool WrappedVulkan::Serialise_vkCmdClearAttachments(Serialiser *localSerialiser, name += ToStr::Get(atts[a]); name += ")"; - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::Clear; for(uint32_t a = 0; a < acount; a++) diff --git a/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp index cebf7c710..b635a2213 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_queue_funcs.cpp @@ -213,7 +213,7 @@ bool WrappedVulkan::Serialise_vkQueueSubmit(Serialiser *localSerialiser, VkQueue ToStr::Get(cmdIds[c]).c_str()); // add a fake marker - FetchDrawcall draw; + DrawcallDescription draw; draw.name = name; draw.flags |= DrawFlags::SetMarker; AddEvent(name); diff --git a/renderdoc/replay/replay_driver.h b/renderdoc/replay/replay_driver.h index ab5405e34..d7f5401ed 100644 --- a/renderdoc/replay/replay_driver.h +++ b/renderdoc/replay/replay_driver.h @@ -28,13 +28,12 @@ #include "api/replay/renderdoc_replay.h" #include "core/core.h" #include "maths/vec.h" -#include "replay/replay_driver.h" -struct FetchFrameRecord +struct FrameRecord { - FetchFrameInfo frameInfo; + FrameDescription frameInfo; - rdctype::array drawcallList; + rdctype::array drawcallList; }; enum RemapTextureEnum @@ -84,10 +83,10 @@ public: virtual APIProperties GetAPIProperties() = 0; virtual vector GetBuffers() = 0; - virtual FetchBuffer GetBuffer(ResourceId id) = 0; + virtual BufferDescription GetBuffer(ResourceId id) = 0; virtual vector GetTextures() = 0; - virtual FetchTexture GetTexture(ResourceId id) = 0; + virtual TextureDescription GetTexture(ResourceId id) = 0; virtual vector GetDebugMessages() = 0; @@ -101,7 +100,7 @@ public: virtual GLPipe::State GetGLPipelineState() = 0; virtual VKPipe::State GetVulkanPipelineState() = 0; - virtual FetchFrameRecord GetFrameRecord() = 0; + virtual FrameRecord GetFrameRecord() = 0; virtual void ReadLogInitialisation() = 0; virtual void ReplayLog(uint32_t endEventID, ReplayLogType replayType) = 0; @@ -178,12 +177,12 @@ public: CompType typeHint, float minval, float maxval, bool channels[4], vector &histogram) = 0; - virtual ResourceId CreateProxyTexture(const FetchTexture &templateTex) = 0; + virtual ResourceId CreateProxyTexture(const TextureDescription &templateTex) = 0; virtual void SetProxyTextureData(ResourceId texid, uint32_t arrayIdx, uint32_t mip, byte *data, size_t dataSize) = 0; virtual bool IsTextureSupported(const ResourceFormat &format) = 0; - virtual ResourceId CreateProxyBuffer(const FetchBuffer &templateBuf) = 0; + virtual ResourceId CreateProxyBuffer(const BufferDescription &templateBuf) = 0; virtual void SetProxyBufferData(ResourceId bufid, byte *data, size_t dataSize) = 0; virtual void RenderMesh(uint32_t eventID, const vector &secondaryDraws, @@ -206,16 +205,16 @@ public: }; // utility function useful in any driver implementation -template -FetchDrawcall *SetupDrawcallPointers(vector *drawcallTable, - FetchDrawcallContainer &draws, FetchDrawcall *parent, - FetchDrawcall *previous) +template +DrawcallDescription *SetupDrawcallPointers(vector *drawcallTable, + DrawcallContainer &draws, DrawcallDescription *parent, + DrawcallDescription *previous) { - FetchDrawcall *ret = NULL; + DrawcallDescription *ret = NULL; for(size_t i = 0; i < draws.size(); i++) { - FetchDrawcall *draw = &draws[i]; + DrawcallDescription *draw = &draws[i]; draw->parent = parent ? parent->eventID : 0; diff --git a/renderdoc/replay/replay_output.cpp b/renderdoc/replay/replay_output.cpp index 299117a58..23cbf2a9b 100644 --- a/renderdoc/replay/replay_output.cpp +++ b/renderdoc/replay/replay_output.cpp @@ -160,7 +160,7 @@ void ReplayOutput::SetFrameEvent(int eventID) void ReplayOutput::RefreshOverlay() { - FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID); + DrawcallDescription *draw = m_pRenderer->GetDrawcallByEID(m_EventID); passEvents = m_pDevice->GetPassEvents(m_EventID); @@ -415,7 +415,7 @@ bool ReplayOutput::PickPixel(ResourceId tex, bool customShader, uint32_t x, uint uint32_t ReplayOutput::PickVertex(uint32_t eventID, uint32_t x, uint32_t y, uint32_t *pickedInstance) { - FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(eventID); + DrawcallDescription *draw = m_pRenderer->GetDrawcallByEID(eventID); if(!draw) return ~0U; @@ -675,7 +675,7 @@ bool ReplayOutput::Display() void ReplayOutput::DisplayTex() { - FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID); + DrawcallDescription *draw = m_pRenderer->GetDrawcallByEID(m_EventID); if(m_MainOutput.outputID == 0) return; @@ -755,7 +755,7 @@ void ReplayOutput::DisplayTex() void ReplayOutput::DisplayMesh() { - FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID); + DrawcallDescription *draw = m_pRenderer->GetDrawcallByEID(m_EventID); if(draw == NULL || m_MainOutput.outputID == 0 || m_Width <= 0 || m_Height <= 0 || (m_RenderData.meshDisplay.type == MeshDataStage::Unknown) || @@ -810,7 +810,7 @@ void ReplayOutput::DisplayMesh() { for(size_t i = 0; m_RenderData.meshDisplay.showWholePass && i < passEvents.size(); i++) { - FetchDrawcall *d = m_pRenderer->GetDrawcallByEID(passEvents[i]); + DrawcallDescription *d = m_pRenderer->GetDrawcallByEID(passEvents[i]); if(d) { diff --git a/renderdoc/replay/replay_renderer.cpp b/renderdoc/replay/replay_renderer.cpp index f7c55bde5..4a7c3fa16 100644 --- a/renderdoc/replay/replay_renderer.cpp +++ b/renderdoc/replay/replay_renderer.cpp @@ -227,7 +227,7 @@ bool ReplayRenderer::GetVulkanPipelineState(VKPipe::State *state) return false; } -bool ReplayRenderer::GetFrameInfo(FetchFrameInfo *info) +bool ReplayRenderer::GetFrameInfo(FrameDescription *info) { if(info == NULL) return false; @@ -237,7 +237,7 @@ bool ReplayRenderer::GetFrameInfo(FetchFrameInfo *info) return true; } -FetchDrawcall *ReplayRenderer::GetDrawcallByEID(uint32_t eventID) +DrawcallDescription *ReplayRenderer::GetDrawcallByEID(uint32_t eventID) { if(eventID >= m_Drawcalls.size()) return NULL; @@ -245,12 +245,12 @@ FetchDrawcall *ReplayRenderer::GetDrawcallByEID(uint32_t eventID) return m_Drawcalls[eventID]; } -bool ReplayRenderer::GetDrawcalls(rdctype::array *draws) +bool ReplayRenderer::GetDrawcalls(rdctype::array *draws) { if(draws == NULL) return false; - *draws = m_FrameRecord.m_DrawCallList; + *draws = m_FrameRecord.drawcallList; return true; } @@ -290,7 +290,7 @@ bool ReplayRenderer::DescribeCounter(GPUCounter counterID, CounterDescription *d return true; } -bool ReplayRenderer::GetBuffers(rdctype::array *out) +bool ReplayRenderer::GetBuffers(rdctype::array *out) { if(m_Buffers.empty()) { @@ -311,7 +311,7 @@ bool ReplayRenderer::GetBuffers(rdctype::array *out) return false; } -bool ReplayRenderer::GetTextures(rdctype::array *out) +bool ReplayRenderer::GetTextures(rdctype::array *out) { if(m_Textures.empty()) { @@ -384,7 +384,7 @@ bool ReplayRenderer::GetPostVSData(uint32_t instID, MeshDataStage stage, MeshFor if(data == NULL) return false; - FetchDrawcall *draw = GetDrawcallByEID(m_EventID); + DrawcallDescription *draw = GetDrawcallByEID(m_EventID); MeshFormat ret; RDCEraseEl(ret); @@ -455,7 +455,7 @@ bool ReplayRenderer::SaveTexture(const TextureSave &saveData, const char *path) { TextureSave sd = saveData; // mutable copy ResourceId liveid = m_pDevice->GetLiveID(sd.id); - FetchTexture td = m_pDevice->GetTexture(liveid); + TextureDescription td = m_pDevice->GetTexture(liveid); bool success = false; @@ -1585,11 +1585,9 @@ ReplayStatus ReplayRenderer::PostCreateInit(IReplayDriver *device) FetchPipelineState(); - FetchFrameRecord fr = m_pDevice->GetFrameRecord(); + m_FrameRecord = m_pDevice->GetFrameRecord(); - m_FrameRecord.frameInfo = fr.frameInfo; - m_FrameRecord.m_DrawCallList = fr.drawcallList; - SetupDrawcallPointers(&m_Drawcalls, m_FrameRecord.m_DrawCallList, NULL, NULL); + SetupDrawcallPointers(&m_Drawcalls, m_FrameRecord.drawcallList, NULL, NULL); return ReplayStatus::Succeeded; } @@ -1781,12 +1779,12 @@ extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_FreeTargetResource(I } extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_GetFrameInfo(IReplayRenderer *rend, - FetchFrameInfo *frame) + FrameDescription *frame) { return rend->GetFrameInfo(frame); } extern "C" RENDERDOC_API bool32 RENDERDOC_CC -ReplayRenderer_GetDrawcalls(IReplayRenderer *rend, rdctype::array *draws) +ReplayRenderer_GetDrawcalls(IReplayRenderer *rend, rdctype::array *draws) { return rend->GetDrawcalls(draws); } @@ -1808,12 +1806,12 @@ extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_DescribeCounter(IRep return rend->DescribeCounter(counterID, desc); } extern "C" RENDERDOC_API bool32 RENDERDOC_CC -ReplayRenderer_GetTextures(IReplayRenderer *rend, rdctype::array *texs) +ReplayRenderer_GetTextures(IReplayRenderer *rend, rdctype::array *texs) { return rend->GetTextures(texs); } extern "C" RENDERDOC_API bool32 RENDERDOC_CC -ReplayRenderer_GetBuffers(IReplayRenderer *rend, rdctype::array *bufs) +ReplayRenderer_GetBuffers(IReplayRenderer *rend, rdctype::array *bufs) { return rend->GetBuffers(bufs); } diff --git a/renderdoc/replay/replay_renderer.h b/renderdoc/replay/replay_renderer.h index 9b5d795d8..e824b2630 100644 --- a/renderdoc/replay/replay_renderer.h +++ b/renderdoc/replay/replay_renderer.h @@ -152,14 +152,14 @@ public: bool RemoveReplacement(ResourceId id); bool FreeTargetResource(ResourceId id); - bool GetFrameInfo(FetchFrameInfo *frame); - bool GetDrawcalls(rdctype::array *draws); + bool GetFrameInfo(FrameDescription *frame); + bool GetDrawcalls(rdctype::array *draws); bool FetchCounters(GPUCounter *counters, uint32_t numCounters, rdctype::array *results); bool EnumerateCounters(rdctype::array *counters); bool DescribeCounter(GPUCounter counterID, CounterDescription *desc); - bool GetTextures(rdctype::array *texs); - bool GetBuffers(rdctype::array *bufs); + bool GetTextures(rdctype::array *texs); + bool GetBuffers(rdctype::array *bufs); bool GetResolve(uint64_t *callstack, uint32_t callstackLen, rdctype::array *trace); bool GetDebugMessages(rdctype::array *msgs); @@ -195,17 +195,11 @@ public: private: ReplayStatus PostCreateInit(IReplayDriver *device); - FetchDrawcall *GetDrawcallByEID(uint32_t eventID); + DrawcallDescription *GetDrawcallByEID(uint32_t eventID); IReplayDriver *GetDevice() { return m_pDevice; } - struct FrameRecord - { - FetchFrameInfo frameInfo; - - rdctype::array m_DrawCallList; - }; FrameRecord m_FrameRecord; - vector m_Drawcalls; + vector m_Drawcalls; uint32_t m_EventID; @@ -216,8 +210,8 @@ private: std::vector m_Outputs; - std::vector m_Buffers; - std::vector m_Textures; + std::vector m_Buffers; + std::vector m_Textures; IReplayDriver *m_pDevice; diff --git a/renderdoccmd/renderdoccmd.cpp b/renderdoccmd/renderdoccmd.cpp index 7088100e4..45ac39418 100644 --- a/renderdoccmd/renderdoccmd.cpp +++ b/renderdoccmd/renderdoccmd.cpp @@ -50,7 +50,7 @@ void DisplayRendererPreview(IReplayRenderer *renderer, uint32_t width, uint32_t if(renderer == NULL) return; - rdctype::array texs; + rdctype::array texs; renderer->GetTextures(&texs); TextureDisplay d; @@ -83,7 +83,7 @@ void DisplayRendererPreview(IReplayRenderer *renderer, uint32_t width, uint32_t } } - rdctype::array draws; + rdctype::array draws; renderer->GetDrawcalls(&draws); if(draws.count > 0 && draws[draws.count - 1].flags & DrawFlags::Present)