mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Remove now-unused functionality, context filter and deferred events
This commit is contained in:
@@ -308,7 +308,6 @@ struct FetchFrameInfo
|
||||
uint64_t persistentSize;
|
||||
uint64_t initDataSize;
|
||||
uint64_t captureTime;
|
||||
ResourceId immContextId;
|
||||
FetchFrameStatistics stats;
|
||||
rdctype::array<DebugMessage> debugMessages;
|
||||
};
|
||||
@@ -359,7 +358,6 @@ struct FetchDrawcall
|
||||
copySource = ResourceId();
|
||||
copyDestination = ResourceId();
|
||||
|
||||
context = ResourceId();
|
||||
parent = 0;
|
||||
previous = 0;
|
||||
next = 0;
|
||||
@@ -393,8 +391,6 @@ struct FetchDrawcall
|
||||
ResourceId copySource;
|
||||
ResourceId copyDestination;
|
||||
|
||||
ResourceId context;
|
||||
|
||||
int64_t parent;
|
||||
|
||||
int64_t previous;
|
||||
|
||||
@@ -229,7 +229,6 @@ struct IReplayRenderer
|
||||
virtual bool HasCallstacks() = 0;
|
||||
virtual bool InitResolver() = 0;
|
||||
|
||||
virtual bool SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv) = 0;
|
||||
virtual bool SetFrameEvent(uint32_t eventID, bool force) = 0;
|
||||
virtual bool GetD3D11PipelineState(D3D11PipelineState *state) = 0;
|
||||
virtual bool GetGLPipelineState(GLPipelineState *state) = 0;
|
||||
@@ -321,10 +320,6 @@ extern "C" RENDERDOC_API void RENDERDOC_CC ReplayRenderer_FileChanged(ReplayRend
|
||||
extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_HasCallstacks(ReplayRenderer *rend);
|
||||
extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_InitResolver(ReplayRenderer *rend);
|
||||
|
||||
extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_SetContextFilter(ReplayRenderer *rend,
|
||||
ResourceId id,
|
||||
uint32_t firstDefEv,
|
||||
uint32_t lastDefEv);
|
||||
extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_SetFrameEvent(ReplayRenderer *rend,
|
||||
uint32_t eventID,
|
||||
bool32 force);
|
||||
|
||||
@@ -46,12 +46,10 @@ public:
|
||||
m_FrameRecord.frameInfo.fileOffset = 0;
|
||||
m_FrameRecord.frameInfo.firstEvent = 1;
|
||||
m_FrameRecord.frameInfo.frameNumber = 1;
|
||||
m_FrameRecord.frameInfo.immContextId = ResourceId();
|
||||
RDCEraseEl(m_FrameRecord.frameInfo.stats);
|
||||
|
||||
create_array_uninit(m_FrameRecord.drawcallList, 1);
|
||||
FetchDrawcall &d = m_FrameRecord.drawcallList[0];
|
||||
d.context = ResourceId();
|
||||
d.drawcallID = 1;
|
||||
d.eventID = 1;
|
||||
d.name = filename;
|
||||
@@ -168,7 +166,6 @@ public:
|
||||
void SavePipelineState() {}
|
||||
GLPipelineState GetGLPipelineState() { return GLPipelineState(); }
|
||||
VulkanPipelineState GetVulkanPipelineState() { return VulkanPipelineState(); }
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv) {}
|
||||
void ReplayLog(uint32_t endEventID, ReplayLogType replayType) {}
|
||||
vector<uint32_t> GetPassEvents(uint32_t eventID) { return vector<uint32_t>(); }
|
||||
vector<EventUsage> GetUsage(ResourceId id) { return vector<EventUsage>(); }
|
||||
|
||||
@@ -1115,8 +1115,6 @@ void Serialiser::Serialise(const char *name, FetchDrawcall &el)
|
||||
Serialise("", el.indexByteWidth);
|
||||
Serialise("", el.topology);
|
||||
|
||||
Serialise("", el.context);
|
||||
|
||||
Serialise("", el.copySource);
|
||||
Serialise("", el.copyDestination);
|
||||
|
||||
@@ -1130,7 +1128,7 @@ void Serialiser::Serialise(const char *name, FetchDrawcall &el)
|
||||
Serialise("", el.events);
|
||||
Serialise("", el.children);
|
||||
|
||||
SIZE_CHECK(FetchDrawcall, 256);
|
||||
SIZE_CHECK(FetchDrawcall, 248);
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -1328,11 +1326,10 @@ void Serialiser::Serialise(const char *name, FetchFrameInfo &el)
|
||||
Serialise("", el.persistentSize);
|
||||
Serialise("", el.initDataSize);
|
||||
Serialise("", el.captureTime);
|
||||
Serialise("", el.immContextId);
|
||||
Serialise("", el.stats);
|
||||
Serialise("", el.debugMessages);
|
||||
|
||||
SIZE_CHECK(FetchFrameInfo, 1208);
|
||||
SIZE_CHECK(FetchFrameInfo, 1200);
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -1341,7 +1338,7 @@ void Serialiser::Serialise(const char *name, FetchFrameRecord &el)
|
||||
Serialise("", el.frameInfo);
|
||||
Serialise("", el.drawcallList);
|
||||
|
||||
SIZE_CHECK(FetchFrameRecord, 1224);
|
||||
SIZE_CHECK(FetchFrameRecord, 1216);
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -1772,7 +1769,6 @@ bool ReplayProxy::Tick(int type, Serialiser *incomingPacket)
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case eReplayProxy_SetCtxFilter: SetContextFilter(ResourceId(), 0, 0); break;
|
||||
case eReplayProxy_ReplayLog: ReplayLog(0, (ReplayLogType)0); break;
|
||||
case eReplayProxy_GetPassEvents: GetPassEvents(0); break;
|
||||
case eReplayProxy_GetAPIProperties: GetAPIProperties(); break;
|
||||
@@ -2030,23 +2026,6 @@ void ReplayProxy::SavePipelineState()
|
||||
m_FromReplaySerialiser->Serialise("", m_VulkanPipelineState);
|
||||
}
|
||||
|
||||
void ReplayProxy::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
|
||||
{
|
||||
m_ToReplaySerialiser->Serialise("", id);
|
||||
m_ToReplaySerialiser->Serialise("", firstDefEv);
|
||||
m_ToReplaySerialiser->Serialise("", lastDefEv);
|
||||
|
||||
if(m_RemoteServer)
|
||||
{
|
||||
m_Remote->SetContextFilter(id, firstDefEv, lastDefEv);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!SendReplayCommand(eReplayProxy_SetCtxFilter))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void ReplayProxy::ReplayLog(uint32_t endEventID, ReplayLogType replayType)
|
||||
{
|
||||
m_ToReplaySerialiser->Serialise("", endEventID);
|
||||
|
||||
@@ -36,8 +36,7 @@ enum ReplayProxyPacket
|
||||
// peacefully with remote server packet numbers
|
||||
eReplayProxy_First = 0x1000,
|
||||
|
||||
eReplayProxy_SetCtxFilter = eReplayProxy_First,
|
||||
eReplayProxy_ReplayLog,
|
||||
eReplayProxy_ReplayLog = eReplayProxy_First,
|
||||
|
||||
eReplayProxy_GetPassEvents,
|
||||
|
||||
@@ -399,7 +398,6 @@ public:
|
||||
D3D11PipelineState GetD3D11PipelineState() { return m_D3D11PipelineState; }
|
||||
GLPipelineState GetGLPipelineState() { return m_GLPipelineState; }
|
||||
VulkanPipelineState GetVulkanPipelineState() { return m_VulkanPipelineState; }
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t eventID);
|
||||
|
||||
@@ -132,6 +132,8 @@ WrappedID3D11DeviceContext::WrappedID3D11DeviceContext(WrappedID3D11Device *real
|
||||
{
|
||||
m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser);
|
||||
m_State = WRITING_IDLE;
|
||||
|
||||
m_pSerialiser->SetDebugText(true);
|
||||
}
|
||||
|
||||
m_OwnSerialiser = false;
|
||||
@@ -925,40 +927,10 @@ void WrappedID3D11DeviceContext::AddUsage(const FetchDrawcall &d)
|
||||
}
|
||||
}
|
||||
|
||||
void WrappedID3D11DeviceContext::RefreshDrawcallIDs(DrawcallTreeNode &node)
|
||||
{
|
||||
if(GetType() == D3D11_DEVICE_CONTEXT_DEFERRED)
|
||||
{
|
||||
m_pDevice->GetImmediateContext()->RefreshDrawcallIDs(node);
|
||||
return;
|
||||
}
|
||||
|
||||
// assign new drawcall IDs
|
||||
for(size_t i = 0; i < node.children.size(); i++)
|
||||
{
|
||||
m_CurEventID++;
|
||||
|
||||
node.children[i].draw.eventID = m_CurEventID;
|
||||
node.children[i].draw.drawcallID = m_CurDrawcallID;
|
||||
|
||||
// markers don't increment drawcall ID
|
||||
if((node.children[i].draw.flags & (eDraw_SetMarker | eDraw_PushMarker)) == 0)
|
||||
m_CurDrawcallID++;
|
||||
|
||||
RefreshDrawcallIDs(node.children[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void WrappedID3D11DeviceContext::AddDrawcall(const FetchDrawcall &d, bool hasEvents)
|
||||
{
|
||||
FetchDrawcall draw = d;
|
||||
|
||||
if(GetType() == D3D11_DEVICE_CONTEXT_DEFERRED)
|
||||
{
|
||||
m_pDevice->GetImmediateContext()->AddDrawcall(draw, hasEvents);
|
||||
return;
|
||||
}
|
||||
|
||||
m_AddedDrawcall = true;
|
||||
|
||||
draw.eventID = m_CurEventID;
|
||||
@@ -1013,17 +985,8 @@ void WrappedID3D11DeviceContext::AddDrawcall(const FetchDrawcall &d, bool hasEve
|
||||
RDCERR("Somehow lost drawcall stack!");
|
||||
}
|
||||
|
||||
void WrappedID3D11DeviceContext::AddEvent(D3D11ChunkType type, string description, ResourceId ctx)
|
||||
void WrappedID3D11DeviceContext::AddEvent(D3D11ChunkType type, string description)
|
||||
{
|
||||
if(ctx == ResourceId())
|
||||
ctx = m_pDevice->GetResourceManager()->GetOriginalID(m_ResourceID);
|
||||
|
||||
if(GetType() == D3D11_DEVICE_CONTEXT_DEFERRED)
|
||||
{
|
||||
m_pDevice->GetImmediateContext()->AddEvent(type, description, ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
FetchAPIEvent apievent;
|
||||
|
||||
apievent.fileOffset = m_CurChunkOffset;
|
||||
|
||||
@@ -256,9 +256,8 @@ private:
|
||||
|
||||
void AddUsage(const FetchDrawcall &d);
|
||||
|
||||
void AddEvent(D3D11ChunkType type, string description, ResourceId ctx = ResourceId());
|
||||
void AddEvent(D3D11ChunkType type, string description);
|
||||
void AddDrawcall(const FetchDrawcall &d, bool hasEvents);
|
||||
void RefreshDrawcallIDs(DrawcallTreeNode &node);
|
||||
|
||||
void RecordIndexBindStats(ID3D11Buffer *Buffer);
|
||||
void RecordVertexBindStats(UINT NumBuffers, ID3D11Buffer *Buffers[]);
|
||||
|
||||
@@ -156,7 +156,6 @@ bool WrappedID3D11DeviceContext::Serialise_UpdateSubresource1(ID3D11Resource *pD
|
||||
|
||||
if(pBox && m_NeedUpdateSubWorkaround && GetType() == D3D11_DEVICE_CONTEXT_DEFERRED)
|
||||
{
|
||||
RDCWARN("oops!");
|
||||
// apply the workaround for the data we're about to pass
|
||||
|
||||
D3D11_BOX alignedBox = *pBox;
|
||||
|
||||
@@ -3710,9 +3710,6 @@ void WrappedID3D11DeviceContext::Serialise_DebugMessages()
|
||||
msg.messageID = ID;
|
||||
msg.description = Description;
|
||||
|
||||
if(GetType() == D3D11_DEVICE_CONTEXT_DEFERRED)
|
||||
msg.eventID = m_pDevice->GetImmediateContext()->GetEventID();
|
||||
|
||||
m_pDevice->AddDebugMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,6 +369,8 @@ WrappedID3D11Device::WrappedID3D11Device(ID3D11Device *realDevice, D3D11InitPara
|
||||
{
|
||||
m_State = WRITING_IDLE;
|
||||
m_pSerialiser = new Serialiser(NULL, Serialiser::WRITING, debugSerialiser);
|
||||
|
||||
m_pSerialiser->SetDebugText(true);
|
||||
}
|
||||
|
||||
m_ResourceManager = new D3D11ResourceManager(m_State, m_pSerialiser, this);
|
||||
@@ -434,8 +436,6 @@ WrappedID3D11Device::WrappedID3D11Device(ID3D11Device *realDevice, D3D11InitPara
|
||||
|
||||
m_InitParams = *params;
|
||||
|
||||
SetContextFilter(ResourceId(), 0, 0);
|
||||
|
||||
// ATI workaround - these dlls can get unloaded and cause a crash.
|
||||
|
||||
if(GetModuleHandleA("aticfx32.dll"))
|
||||
@@ -1025,8 +1025,6 @@ void WrappedID3D11Device::Serialise_CaptureScope(uint64_t offset)
|
||||
m_FrameRecord.frameInfo.fileOffset = offset;
|
||||
m_FrameRecord.frameInfo.firstEvent = m_pImmediateContext->GetEventID();
|
||||
m_FrameRecord.frameInfo.frameNumber = FrameNumber;
|
||||
m_FrameRecord.frameInfo.immContextId =
|
||||
GetResourceManager()->GetOriginalID(m_pImmediateContext->GetResourceID());
|
||||
|
||||
FetchFrameStatistics &stats = m_FrameRecord.frameInfo.stats;
|
||||
RDCEraseEl(stats);
|
||||
@@ -1132,8 +1130,7 @@ void WrappedID3D11Device::ReadLogInitialisation()
|
||||
break;
|
||||
}
|
||||
|
||||
SetupDrawcallPointers(&m_Drawcalls, m_FrameRecord.frameInfo.immContextId,
|
||||
m_FrameRecord.drawcallList, NULL, NULL);
|
||||
SetupDrawcallPointers(&m_Drawcalls, m_FrameRecord.drawcallList, NULL, NULL);
|
||||
|
||||
#if !defined(RELEASE)
|
||||
for(auto it = chunkInfos.begin(); it != chunkInfos.end(); ++it)
|
||||
@@ -2325,13 +2322,6 @@ void WrappedID3D11Device::Apply_InitialState(ID3D11DeviceChild *live,
|
||||
}
|
||||
}
|
||||
|
||||
void WrappedID3D11Device::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
|
||||
{
|
||||
m_ReplayDefCtx = id;
|
||||
m_FirstDefEv = firstDefEv;
|
||||
m_LastDefEv = lastDefEv;
|
||||
}
|
||||
|
||||
void WrappedID3D11Device::ReplayLog(uint32_t startEventID, uint32_t endEventID,
|
||||
ReplayLogType replayType)
|
||||
{
|
||||
@@ -2363,51 +2353,14 @@ void WrappedID3D11Device::ReplayLog(uint32_t startEventID, uint32_t endEventID,
|
||||
|
||||
m_State = EXECUTING;
|
||||
|
||||
if(m_ReplayDefCtx == ResourceId())
|
||||
{
|
||||
if(replayType == eReplay_Full)
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, startEventID, endEventID, partial);
|
||||
else if(replayType == eReplay_WithoutDraw)
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, startEventID, RDCMAX(1U, endEventID) - 1, partial);
|
||||
else if(replayType == eReplay_OnlyDraw)
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, endEventID, endEventID, partial);
|
||||
else
|
||||
RDCFATAL("Unexpected replay type");
|
||||
}
|
||||
if(replayType == eReplay_Full)
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, startEventID, endEventID, partial);
|
||||
else if(replayType == eReplay_WithoutDraw)
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, startEventID, RDCMAX(1U, endEventID) - 1, partial);
|
||||
else if(replayType == eReplay_OnlyDraw)
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, endEventID, endEventID, partial);
|
||||
else
|
||||
{
|
||||
if(replayType == eReplay_Full || replayType == eReplay_WithoutDraw)
|
||||
{
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, startEventID, endEventID, partial);
|
||||
}
|
||||
|
||||
m_pSerialiser->SetOffset(offs);
|
||||
|
||||
header = (D3D11ChunkType)m_pSerialiser->PushContext(NULL, NULL, 1, false);
|
||||
m_pSerialiser->SkipCurrentChunk();
|
||||
m_pSerialiser->PopContext(header);
|
||||
|
||||
m_pImmediateContext->ReplayFakeContext(m_ReplayDefCtx);
|
||||
|
||||
if(replayType == eReplay_Full)
|
||||
{
|
||||
m_pImmediateContext->ClearState();
|
||||
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, m_FirstDefEv, m_LastDefEv, true);
|
||||
}
|
||||
else if(replayType == eReplay_WithoutDraw && m_LastDefEv - 1 >= m_FirstDefEv)
|
||||
{
|
||||
m_pImmediateContext->ClearState();
|
||||
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, m_FirstDefEv, RDCMAX(m_LastDefEv, 1U) - 1, true);
|
||||
}
|
||||
else if(replayType == eReplay_OnlyDraw)
|
||||
{
|
||||
m_pImmediateContext->ReplayLog(EXECUTING, m_LastDefEv, m_LastDefEv, true);
|
||||
}
|
||||
|
||||
m_pImmediateContext->ReplayFakeContext(ResourceId());
|
||||
}
|
||||
RDCFATAL("Unexpected replay type");
|
||||
}
|
||||
|
||||
void WrappedID3D11Device::ReleaseSwapchainResources(WrappedIDXGISwapChain3 *swap)
|
||||
|
||||
@@ -336,10 +336,6 @@ private:
|
||||
map<ID3D11InputLayout *, vector<D3D11_INPUT_ELEMENT_DESC> > m_LayoutDescs;
|
||||
map<ID3D11InputLayout *, WrappedShader *> m_LayoutShaders;
|
||||
|
||||
ResourceId m_ReplayDefCtx;
|
||||
uint32_t m_FirstDefEv;
|
||||
uint32_t m_LastDefEv;
|
||||
|
||||
static WrappedID3D11Device *m_pCurrentWrappedDevice;
|
||||
|
||||
map<WrappedIDXGISwapChain3 *, ID3D11RenderTargetView *> m_SwapChains;
|
||||
@@ -425,7 +421,6 @@ public:
|
||||
|
||||
void ReadLogInitialisation();
|
||||
void ProcessChunk(uint64_t offset, D3D11ChunkType context);
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1305,11 +1305,6 @@ void D3D11Replay::ReadLogInitialisation()
|
||||
m_pDevice->ReadLogInitialisation();
|
||||
}
|
||||
|
||||
void D3D11Replay::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
|
||||
{
|
||||
m_pDevice->SetContextFilter(id, firstDefEv, lastDefEv);
|
||||
}
|
||||
|
||||
void D3D11Replay::ReplayLog(uint32_t endEventID, ReplayLogType replayType)
|
||||
{
|
||||
m_pDevice->ReplayLog(0, endEventID, replayType);
|
||||
|
||||
@@ -70,7 +70,6 @@ public:
|
||||
void FreeCustomShader(ResourceId id);
|
||||
|
||||
void ReadLogInitialisation();
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t eventID);
|
||||
|
||||
@@ -878,7 +878,6 @@ void WrappedID3D12Device::Serialise_CaptureScope(uint64_t offset)
|
||||
m_FrameRecord.frameInfo.fileOffset = offset;
|
||||
m_FrameRecord.frameInfo.firstEvent = 1;
|
||||
m_FrameRecord.frameInfo.frameNumber = FrameNumber;
|
||||
m_FrameRecord.frameInfo.immContextId = ResourceId();
|
||||
RDCEraseEl(m_FrameRecord.frameInfo.stats);
|
||||
|
||||
GetResourceManager()->CreateInitialContents();
|
||||
@@ -1522,8 +1521,7 @@ void WrappedID3D12Device::ReadLogInitialisation()
|
||||
|
||||
m_Queue->GetParentDrawcall().children.clear();
|
||||
|
||||
SetupDrawcallPointers(&m_Drawcalls, m_FrameRecord.frameInfo.immContextId,
|
||||
m_FrameRecord.drawcallList, NULL, NULL);
|
||||
SetupDrawcallPointers(&m_Drawcalls, m_FrameRecord.drawcallList, NULL, NULL);
|
||||
}
|
||||
|
||||
#if !defined(RELEASE)
|
||||
|
||||
@@ -53,11 +53,6 @@ void D3D12Replay::ReplayLog(uint32_t endEventID, ReplayLogType replayType)
|
||||
m_pDevice->ReplayLog(0, endEventID, replayType);
|
||||
}
|
||||
|
||||
void D3D12Replay::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
|
||||
{
|
||||
RDCERR("Should never hit SetContextFilter");
|
||||
}
|
||||
|
||||
vector<ResourceId> D3D12Replay::GetBuffers()
|
||||
{
|
||||
vector<ResourceId> ret;
|
||||
|
||||
@@ -65,7 +65,6 @@ public:
|
||||
void FreeCustomShader(ResourceId id);
|
||||
|
||||
void ReadLogInitialisation();
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t eventID);
|
||||
|
||||
@@ -2839,7 +2839,6 @@ void WrappedOpenGL::Serialise_CaptureScope(uint64_t offset)
|
||||
m_FrameRecord.frameInfo.fileOffset = offset;
|
||||
m_FrameRecord.frameInfo.firstEvent = 1; // m_pImmediateContext->GetEventID();
|
||||
m_FrameRecord.frameInfo.frameNumber = FrameNumber;
|
||||
m_FrameRecord.frameInfo.immContextId = GetResourceManager()->GetOriginalID(m_ContextResourceID);
|
||||
RDCEraseEl(m_FrameRecord.frameInfo.stats);
|
||||
|
||||
GetResourceManager()->CreateInitialContents();
|
||||
@@ -3785,8 +3784,7 @@ void WrappedOpenGL::ContextReplayLog(LogState readType, uint32_t startEventID, u
|
||||
GetFrameRecord().drawcallList = m_ParentDrawcall.Bake();
|
||||
GetFrameRecord().frameInfo.debugMessages = GetDebugMessages();
|
||||
|
||||
SetupDrawcallPointers(&m_Drawcalls, GetFrameRecord().frameInfo.immContextId,
|
||||
GetFrameRecord().drawcallList, NULL, NULL);
|
||||
SetupDrawcallPointers(&m_Drawcalls, GetFrameRecord().drawcallList, NULL, NULL);
|
||||
|
||||
// it's easier to remove duplicate usages here than check it as we go.
|
||||
// this means if textures are bound in multiple places in the same draw
|
||||
@@ -4125,9 +4123,6 @@ void WrappedOpenGL::AddDrawcall(const FetchDrawcall &d, bool hasEvents)
|
||||
draw.eventID = m_CurEventID;
|
||||
draw.drawcallID = m_CurDrawcallID;
|
||||
|
||||
if(draw.context == ResourceId())
|
||||
draw.context = GetResourceManager()->GetOriginalID(m_ContextResourceID);
|
||||
|
||||
GLuint curCol[8] = {0};
|
||||
GLuint curDepth = 0;
|
||||
|
||||
@@ -4157,22 +4152,8 @@ void WrappedOpenGL::AddDrawcall(const FetchDrawcall &d, bool hasEvents)
|
||||
|
||||
if(hasEvents)
|
||||
{
|
||||
vector<FetchAPIEvent> evs;
|
||||
evs.reserve(m_CurEvents.size());
|
||||
for(size_t i = 0; i < m_CurEvents.size();)
|
||||
{
|
||||
if(m_CurEvents[i].context == draw.context)
|
||||
{
|
||||
evs.push_back(m_CurEvents[i]);
|
||||
m_CurEvents.erase(m_CurEvents.begin() + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
draw.events = evs;
|
||||
draw.events = m_CurEvents;
|
||||
m_CurEvents.clear();
|
||||
}
|
||||
|
||||
AddUsage(draw);
|
||||
|
||||
@@ -3022,11 +3022,6 @@ vector<EventUsage> GLReplay::GetUsage(ResourceId id)
|
||||
|
||||
#pragma endregion
|
||||
|
||||
void GLReplay::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
|
||||
{
|
||||
GLNOTIMP("SetContextFilter");
|
||||
}
|
||||
|
||||
vector<PixelModification> GLReplay::PixelHistory(vector<EventUsage> events, ResourceId target,
|
||||
uint32_t x, uint32_t y, uint32_t slice, uint32_t mip,
|
||||
uint32_t sampleIdx, FormatComponentType typeHint)
|
||||
|
||||
@@ -110,7 +110,6 @@ public:
|
||||
void FreeTargetResource(ResourceId id);
|
||||
|
||||
void ReadLogInitialisation();
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t eventID);
|
||||
|
||||
@@ -815,7 +815,6 @@ void WrappedVulkan::Serialise_CaptureScope(uint64_t offset)
|
||||
m_FrameRecord.frameInfo.fileOffset = offset;
|
||||
m_FrameRecord.frameInfo.firstEvent = 1; // m_pImmediateContext->GetEventID();
|
||||
m_FrameRecord.frameInfo.frameNumber = FrameNumber;
|
||||
m_FrameRecord.frameInfo.immContextId = ResourceId();
|
||||
RDCEraseEl(m_FrameRecord.frameInfo.stats);
|
||||
|
||||
GetResourceManager()->CreateInitialContents();
|
||||
@@ -1624,8 +1623,7 @@ void WrappedVulkan::ContextReplayLog(LogState readType, uint32_t startEventID, u
|
||||
{
|
||||
GetFrameRecord().drawcallList = m_ParentDrawcall.Bake();
|
||||
|
||||
SetupDrawcallPointers(&m_Drawcalls, GetFrameRecord().frameInfo.immContextId,
|
||||
GetFrameRecord().drawcallList, NULL, NULL);
|
||||
SetupDrawcallPointers(&m_Drawcalls, GetFrameRecord().drawcallList, NULL, NULL);
|
||||
|
||||
struct SortEID
|
||||
{
|
||||
|
||||
@@ -4566,11 +4566,6 @@ vector<EventUsage> VulkanReplay::GetUsage(ResourceId id)
|
||||
return m_pDriver->GetUsage(id);
|
||||
}
|
||||
|
||||
void VulkanReplay::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
|
||||
{
|
||||
RDCERR("Should never hit SetContextFilter");
|
||||
}
|
||||
|
||||
MeshFormat VulkanReplay::GetPostVSBuffers(uint32_t eventID, uint32_t instID, MeshDataStage stage)
|
||||
{
|
||||
return GetDebugManager()->GetPostVSBuffers(eventID, instID, stage);
|
||||
|
||||
@@ -151,7 +151,6 @@ public:
|
||||
void FreeTargetResource(ResourceId id);
|
||||
|
||||
void ReadLogInitialisation();
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
void ReplayLog(uint32_t endEventID, ReplayLogType replayType);
|
||||
|
||||
vector<uint32_t> GetPassEvents(uint32_t eventID);
|
||||
|
||||
@@ -74,7 +74,6 @@ public:
|
||||
virtual FetchFrameRecord GetFrameRecord() = 0;
|
||||
|
||||
virtual void ReadLogInitialisation() = 0;
|
||||
virtual void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv) = 0;
|
||||
virtual void ReplayLog(uint32_t endEventID, ReplayLogType replayType) = 0;
|
||||
|
||||
virtual vector<uint32_t> GetPassEvents(uint32_t eventID) = 0;
|
||||
@@ -181,7 +180,7 @@ public:
|
||||
|
||||
// utility function useful in any driver implementation
|
||||
template <typename FetchDrawcallContainer>
|
||||
FetchDrawcall *SetupDrawcallPointers(vector<FetchDrawcall *> *drawcallTable, ResourceId contextID,
|
||||
FetchDrawcall *SetupDrawcallPointers(vector<FetchDrawcall *> *drawcallTable,
|
||||
FetchDrawcallContainer &draws, FetchDrawcall *parent,
|
||||
FetchDrawcall *previous)
|
||||
{
|
||||
@@ -197,14 +196,12 @@ FetchDrawcall *SetupDrawcallPointers(vector<FetchDrawcall *> *drawcallTable, Res
|
||||
{
|
||||
if(drawcallTable)
|
||||
{
|
||||
RDCASSERT(drawcallTable->empty() || draw->eventID > drawcallTable->back()->eventID ||
|
||||
draw->context != contextID);
|
||||
RDCASSERT(drawcallTable->empty() || draw->eventID > drawcallTable->back()->eventID);
|
||||
drawcallTable->resize(RDCMAX(drawcallTable->size(), size_t(draw->eventID + 1)));
|
||||
(*drawcallTable)[draw->eventID] = draw;
|
||||
}
|
||||
|
||||
ret = previous =
|
||||
SetupDrawcallPointers(drawcallTable, contextID, draw->children, draw, previous);
|
||||
ret = previous = SetupDrawcallPointers(drawcallTable, draw->children, draw, previous);
|
||||
}
|
||||
else if(draw->flags & (eDraw_PushMarker | eDraw_SetMarker | eDraw_Present | eDraw_MultiDraw))
|
||||
{
|
||||
@@ -212,8 +209,7 @@ FetchDrawcall *SetupDrawcallPointers(vector<FetchDrawcall *> *drawcallTable, Res
|
||||
|
||||
if(drawcallTable)
|
||||
{
|
||||
RDCASSERT(drawcallTable->empty() || draw->eventID > drawcallTable->back()->eventID ||
|
||||
draw->context != contextID);
|
||||
RDCASSERT(drawcallTable->empty() || draw->eventID > drawcallTable->back()->eventID);
|
||||
drawcallTable->resize(RDCMAX(drawcallTable->size(), size_t(draw->eventID + 1)));
|
||||
(*drawcallTable)[draw->eventID] = draw;
|
||||
}
|
||||
@@ -226,8 +222,7 @@ FetchDrawcall *SetupDrawcallPointers(vector<FetchDrawcall *> *drawcallTable, Res
|
||||
|
||||
if(drawcallTable)
|
||||
{
|
||||
RDCASSERT(drawcallTable->empty() || draw->eventID > drawcallTable->back()->eventID ||
|
||||
draw->context != contextID);
|
||||
RDCASSERT(drawcallTable->empty() || draw->eventID > drawcallTable->back()->eventID);
|
||||
drawcallTable->resize(RDCMAX(drawcallTable->size(), size_t(draw->eventID + 1)));
|
||||
(*drawcallTable)[draw->eventID] = draw;
|
||||
}
|
||||
|
||||
@@ -104,9 +104,6 @@ ReplayOutput::ReplayOutput(ReplayRenderer *parent, WindowingSystem system, void
|
||||
|
||||
m_pDevice->GetOutputWindowDimensions(m_MainOutput.outputID, m_Width, m_Height);
|
||||
|
||||
m_FirstDeferredEvent = 0;
|
||||
m_LastDeferredEvent = 0;
|
||||
|
||||
m_CustomShaderResourceId = ResourceId();
|
||||
}
|
||||
|
||||
@@ -156,12 +153,6 @@ bool ReplayOutput::SetMeshDisplay(const MeshDisplay &o)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ReplayOutput::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
|
||||
{
|
||||
m_FirstDeferredEvent = firstDefEv;
|
||||
m_LastDeferredEvent = lastDefEv;
|
||||
}
|
||||
|
||||
void ReplayOutput::SetFrameEvent(int eventID)
|
||||
{
|
||||
m_EventID = eventID;
|
||||
@@ -177,9 +168,9 @@ void ReplayOutput::SetFrameEvent(int eventID)
|
||||
|
||||
void ReplayOutput::RefreshOverlay()
|
||||
{
|
||||
FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID, m_LastDeferredEvent);
|
||||
FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID);
|
||||
|
||||
passEvents = m_pDevice->GetPassEvents(m_LastDeferredEvent > 0 ? m_LastDeferredEvent : m_EventID);
|
||||
passEvents = m_pDevice->GetPassEvents(m_EventID);
|
||||
|
||||
if(m_Config.m_Type == eOutputType_TexDisplay && m_RenderData.texDisplay.overlay != eTexOverlay_None)
|
||||
{
|
||||
@@ -332,7 +323,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)
|
||||
{
|
||||
FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(eventID, 0);
|
||||
FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(eventID);
|
||||
|
||||
if(!draw)
|
||||
return ~0U;
|
||||
@@ -542,7 +533,7 @@ bool ReplayOutput::Display()
|
||||
|
||||
void ReplayOutput::DisplayTex()
|
||||
{
|
||||
FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID, m_LastDeferredEvent);
|
||||
FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID);
|
||||
|
||||
if(m_MainOutput.outputID == 0)
|
||||
return;
|
||||
@@ -622,7 +613,7 @@ void ReplayOutput::DisplayTex()
|
||||
|
||||
void ReplayOutput::DisplayMesh()
|
||||
{
|
||||
FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID, m_LastDeferredEvent);
|
||||
FetchDrawcall *draw = m_pRenderer->GetDrawcallByEID(m_EventID);
|
||||
|
||||
if(draw == NULL || m_MainOutput.outputID == 0 || m_Width <= 0 || m_Height <= 0 ||
|
||||
(m_RenderData.meshDisplay.type == eMeshDataStage_Unknown) || (draw->flags & eDraw_Drawcall) == 0)
|
||||
@@ -676,7 +667,7 @@ void ReplayOutput::DisplayMesh()
|
||||
{
|
||||
for(size_t i = 0; m_RenderData.meshDisplay.showWholePass && i < passEvents.size(); i++)
|
||||
{
|
||||
FetchDrawcall *d = m_pRenderer->GetDrawcallByEID(passEvents[i], m_LastDeferredEvent);
|
||||
FetchDrawcall *d = m_pRenderer->GetDrawcallByEID(passEvents[i]);
|
||||
|
||||
if(d)
|
||||
{
|
||||
|
||||
@@ -138,10 +138,6 @@ ReplayRenderer::ReplayRenderer()
|
||||
m_pDevice = NULL;
|
||||
|
||||
m_EventID = 100000;
|
||||
|
||||
m_DeferredCtx = ResourceId();
|
||||
m_FirstDeferredEvent = 0;
|
||||
m_LastDeferredEvent = 0;
|
||||
}
|
||||
|
||||
ReplayRenderer::~ReplayRenderer()
|
||||
@@ -166,25 +162,6 @@ ReplayRenderer::~ReplayRenderer()
|
||||
m_pDevice = NULL;
|
||||
}
|
||||
|
||||
bool ReplayRenderer::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
|
||||
{
|
||||
if(m_DeferredCtx == ResourceId() && id == ResourceId())
|
||||
return true;
|
||||
|
||||
m_pDevice->SetContextFilter(id, firstDefEv, lastDefEv);
|
||||
|
||||
m_DeferredCtx = id;
|
||||
m_FirstDeferredEvent = firstDefEv;
|
||||
m_LastDeferredEvent = lastDefEv;
|
||||
|
||||
for(size_t i = 0; i < m_Outputs.size(); i++)
|
||||
m_Outputs[i]->SetContextFilter(id, firstDefEv, lastDefEv);
|
||||
|
||||
SetFrameEvent(m_EventID, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ReplayRenderer::SetFrameEvent(uint32_t eventID, bool force)
|
||||
{
|
||||
if(eventID != m_EventID || force)
|
||||
@@ -247,14 +224,12 @@ bool ReplayRenderer::GetFrameInfo(FetchFrameInfo *info)
|
||||
return true;
|
||||
}
|
||||
|
||||
FetchDrawcall *ReplayRenderer::GetDrawcallByEID(uint32_t eventID, uint32_t defEventID)
|
||||
FetchDrawcall *ReplayRenderer::GetDrawcallByEID(uint32_t eventID)
|
||||
{
|
||||
uint32_t ev = defEventID > 0 ? defEventID : eventID;
|
||||
|
||||
if(ev >= m_Drawcalls.size())
|
||||
if(eventID >= m_Drawcalls.size())
|
||||
return NULL;
|
||||
|
||||
return m_Drawcalls[ev];
|
||||
return m_Drawcalls[eventID];
|
||||
}
|
||||
|
||||
bool ReplayRenderer::GetDrawcalls(rdctype::array<FetchDrawcall> *draws)
|
||||
@@ -396,7 +371,7 @@ bool ReplayRenderer::GetPostVSData(uint32_t instID, MeshDataStage stage, MeshFor
|
||||
if(data == NULL)
|
||||
return false;
|
||||
|
||||
FetchDrawcall *draw = GetDrawcallByEID(m_EventID, m_LastDeferredEvent);
|
||||
FetchDrawcall *draw = GetDrawcallByEID(m_EventID);
|
||||
|
||||
MeshFormat ret;
|
||||
RDCEraseEl(ret);
|
||||
@@ -1602,8 +1577,7 @@ ReplayCreateStatus ReplayRenderer::PostCreateInit(IReplayDriver *device)
|
||||
|
||||
m_FrameRecord.frameInfo = fr.frameInfo;
|
||||
m_FrameRecord.m_DrawCallList = fr.drawcallList;
|
||||
SetupDrawcallPointers(&m_Drawcalls, fr.frameInfo.immContextId, m_FrameRecord.m_DrawCallList, NULL,
|
||||
NULL);
|
||||
SetupDrawcallPointers(&m_Drawcalls, m_FrameRecord.m_DrawCallList, NULL, NULL);
|
||||
|
||||
return eReplayCreate_Success;
|
||||
}
|
||||
@@ -1714,13 +1688,6 @@ extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_InitResolver(ReplayR
|
||||
return rend->InitResolver();
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_SetContextFilter(ReplayRenderer *rend,
|
||||
ResourceId id,
|
||||
uint32_t firstDefEv,
|
||||
uint32_t lastDefEv)
|
||||
{
|
||||
return rend->SetContextFilter(id, firstDefEv, lastDefEv);
|
||||
}
|
||||
extern "C" RENDERDOC_API bool32 RENDERDOC_CC ReplayRenderer_SetFrameEvent(ReplayRenderer *rend,
|
||||
uint32_t eventID,
|
||||
bool32 force)
|
||||
|
||||
@@ -63,7 +63,6 @@ private:
|
||||
virtual ~ReplayOutput();
|
||||
|
||||
void SetFrameEvent(int eventID);
|
||||
void SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
|
||||
void RefreshOverlay();
|
||||
|
||||
@@ -100,8 +99,6 @@ private:
|
||||
OutputPair m_PixelContext;
|
||||
|
||||
uint32_t m_EventID;
|
||||
uint32_t m_FirstDeferredEvent;
|
||||
uint32_t m_LastDeferredEvent;
|
||||
OutputConfig m_Config;
|
||||
|
||||
vector<uint32_t> passEvents;
|
||||
@@ -134,7 +131,6 @@ public:
|
||||
bool HasCallstacks();
|
||||
bool InitResolver();
|
||||
|
||||
bool SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv);
|
||||
bool SetFrameEvent(uint32_t eventID, bool force);
|
||||
|
||||
void FetchPipelineState();
|
||||
@@ -202,7 +198,7 @@ public:
|
||||
private:
|
||||
ReplayCreateStatus PostCreateInit(IReplayDriver *device);
|
||||
|
||||
FetchDrawcall *GetDrawcallByEID(uint32_t eventID, uint32_t defEventID);
|
||||
FetchDrawcall *GetDrawcallByEID(uint32_t eventID);
|
||||
|
||||
IReplayDriver *GetDevice() { return m_pDevice; }
|
||||
struct FrameRecord
|
||||
@@ -215,9 +211,6 @@ private:
|
||||
vector<FetchDrawcall *> m_Drawcalls;
|
||||
|
||||
uint32_t m_EventID;
|
||||
ResourceId m_DeferredCtx;
|
||||
uint32_t m_FirstDeferredEvent;
|
||||
uint32_t m_LastDeferredEvent;
|
||||
|
||||
D3D11PipelineState m_D3D11PipelineState;
|
||||
GLPipelineState m_GLPipelineState;
|
||||
|
||||
@@ -65,7 +65,6 @@ namespace renderdocui.Code
|
||||
private string m_LogFile = "";
|
||||
|
||||
private UInt32 m_EventID = 0;
|
||||
private UInt32 m_DeferredEvent = 0;
|
||||
|
||||
private APIProperties m_APIProperties = null;
|
||||
|
||||
@@ -123,7 +122,7 @@ namespace renderdocui.Code
|
||||
|
||||
public APIProperties APIProps { get { return m_APIProperties; } }
|
||||
|
||||
public UInt32 CurEvent { get { return m_DeferredEvent > 0 ? m_DeferredEvent : m_EventID; } }
|
||||
public UInt32 CurEvent { get { return m_EventID; } }
|
||||
|
||||
public FetchDrawcall[] CurDrawcalls { get { return GetDrawcalls(); } }
|
||||
|
||||
@@ -227,10 +226,6 @@ namespace renderdocui.Code
|
||||
if ((a.flags & DrawcallFlags.Present) != (b.flags & DrawcallFlags.Present))
|
||||
return false;
|
||||
|
||||
// don't group things run on different multithreaded contexts
|
||||
if(a.context != b.context)
|
||||
return false;
|
||||
|
||||
// don't group things with different depth outputs
|
||||
if (a.depthOut != b.depthOut)
|
||||
return false;
|
||||
@@ -336,9 +331,7 @@ namespace renderdocui.Code
|
||||
int end = i-1;
|
||||
|
||||
if (end - start < 2 ||
|
||||
draws[i].children.Length > 0 || draws[refdraw].children.Length > 0 ||
|
||||
draws[i].context != m_FrameInfo.immContextId ||
|
||||
draws[refdraw].context != m_FrameInfo.immContextId)
|
||||
draws[i].children.Length > 0 || draws[refdraw].children.Length > 0)
|
||||
{
|
||||
for (int j = start; j <= end; j++)
|
||||
ret.Add(draws[j]);
|
||||
@@ -367,7 +360,6 @@ namespace renderdocui.Code
|
||||
mark.drawcallID = draws[start].drawcallID;
|
||||
mark.markerColour = new float[] { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
|
||||
mark.context = draws[end].context;
|
||||
mark.flags = DrawcallFlags.PushMarker;
|
||||
mark.outputs = draws[end].outputs;
|
||||
mark.depthOut = draws[end].depthOut;
|
||||
@@ -892,37 +884,6 @@ namespace renderdocui.Code
|
||||
|
||||
#region Log Browsing
|
||||
|
||||
// setting a context filter allows replaying of deferred events. You can set the deferred
|
||||
// events to replay in a context, after replaying up to a given event on the main thread
|
||||
public void SetContextFilter(ILogViewerForm exclude, UInt32 eventID,
|
||||
ResourceId ctx, UInt32 firstDeferred, UInt32 lastDeferred)
|
||||
{
|
||||
m_EventID = eventID;
|
||||
|
||||
m_DeferredEvent = lastDeferred;
|
||||
|
||||
m_Renderer.Invoke((ReplayRenderer r) => { r.SetContextFilter(ctx, firstDeferred, lastDeferred); });
|
||||
m_Renderer.Invoke((ReplayRenderer r) => {
|
||||
r.SetFrameEvent(m_EventID, true);
|
||||
m_D3D11PipelineState = r.GetD3D11PipelineState();
|
||||
m_GLPipelineState = r.GetGLPipelineState();
|
||||
m_VulkanPipelineState = r.GetVulkanPipelineState();
|
||||
m_PipelineState.SetStates(m_APIProperties, m_D3D11PipelineState, m_GLPipelineState, m_VulkanPipelineState);
|
||||
});
|
||||
|
||||
foreach (var logviewer in m_LogViewers)
|
||||
{
|
||||
if (logviewer == exclude)
|
||||
continue;
|
||||
|
||||
Control c = (Control)logviewer;
|
||||
if (c.InvokeRequired)
|
||||
c.BeginInvoke(new Action(() => logviewer.OnEventSelected(eventID)));
|
||||
else
|
||||
logviewer.OnEventSelected(eventID);
|
||||
}
|
||||
}
|
||||
|
||||
public void RefreshStatus()
|
||||
{
|
||||
SetEventID(null, m_EventID, true);
|
||||
@@ -937,9 +898,6 @@ namespace renderdocui.Code
|
||||
{
|
||||
m_EventID = eventID;
|
||||
|
||||
m_DeferredEvent = 0;
|
||||
|
||||
m_Renderer.Invoke((ReplayRenderer r) => { r.SetContextFilter(ResourceId.Null, 0, 0); });
|
||||
m_Renderer.Invoke((ReplayRenderer r) =>
|
||||
{
|
||||
r.SetFrameEvent(m_EventID, force);
|
||||
|
||||
@@ -502,7 +502,6 @@ namespace renderdoc
|
||||
public UInt64 persistentSize;
|
||||
public UInt64 initDataSize;
|
||||
public UInt64 captureTime;
|
||||
public ResourceId immContextId;
|
||||
[CustomMarshalAs(CustomUnmanagedType.CustomClass)]
|
||||
public FetchFrameStatistics stats;
|
||||
|
||||
@@ -611,8 +610,6 @@ namespace renderdoc
|
||||
public ResourceId copySource;
|
||||
public ResourceId copyDestination;
|
||||
|
||||
public ResourceId context;
|
||||
|
||||
public Int64 parentDrawcall;
|
||||
public Int64 previousDrawcall;
|
||||
public Int64 nextDrawcall;
|
||||
|
||||
@@ -248,8 +248,6 @@ namespace renderdoc
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayRenderer_InitResolver(IntPtr real);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayRenderer_SetContextFilter(IntPtr real, ResourceId id, UInt32 firstDefEv, UInt32 lastDefEv);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool ReplayRenderer_SetFrameEvent(IntPtr real, UInt32 eventID, bool force);
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
@@ -372,8 +370,6 @@ namespace renderdoc
|
||||
public bool InitResolver()
|
||||
{ return ReplayRenderer_InitResolver(m_Real); }
|
||||
|
||||
public bool SetContextFilter(ResourceId id, UInt32 firstDefEv, UInt32 lastDefEv)
|
||||
{ return ReplayRenderer_SetContextFilter(m_Real, id, firstDefEv, lastDefEv); }
|
||||
public bool SetFrameEvent(UInt32 eventID, bool force)
|
||||
{ return ReplayRenderer_SetFrameEvent(m_Real, eventID, force); }
|
||||
|
||||
|
||||
@@ -93,11 +93,6 @@ namespace renderdocui.Windows
|
||||
{
|
||||
foreach (var ev in draw.events)
|
||||
{
|
||||
// hack until I have a proper interface. Skip events associated with this draw that
|
||||
// come from another context (means they will just be completely omitted/invisible).
|
||||
if (ev.context != draw.context)
|
||||
continue;
|
||||
|
||||
string[] lines = ev.eventDesc.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.None);
|
||||
|
||||
TreelistView.Node root = new TreelistView.Node(new object[] { ev.eventID, lines[0] });
|
||||
|
||||
@@ -47,10 +47,6 @@ namespace renderdocui.Windows
|
||||
public UInt32 eventID = 0;
|
||||
|
||||
public bool marker = false;
|
||||
|
||||
public ResourceId defCtx = ResourceId.Null;
|
||||
public UInt32 firstDefEv = 0;
|
||||
public UInt32 lastDefEv = 0;
|
||||
}
|
||||
|
||||
private TreelistView.Node m_FrameNode = null;
|
||||
@@ -668,11 +664,7 @@ namespace renderdocui.Windows
|
||||
if (eventView.SelectedNode.Tag != null)
|
||||
{
|
||||
DeferredEvent def = eventView.SelectedNode.Tag as DeferredEvent;
|
||||
|
||||
if (def.defCtx != ResourceId.Null)
|
||||
m_Core.SetContextFilter(this, def.eventID, def.defCtx, def.firstDefEv, def.lastDefEv);
|
||||
else
|
||||
m_Core.SetEventID(this, def.eventID);
|
||||
m_Core.SetEventID(this, def.eventID);
|
||||
}
|
||||
|
||||
HighlightBookmarks();
|
||||
|
||||
Reference in New Issue
Block a user