mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-09 08:11:06 +00:00
Allow the queued capturing of frame 1 immediately. Refs #150
This commit is contained in:
@@ -2988,6 +2988,20 @@ bool WrappedID3D11Device::EndFrameCapture(void *dev, void *wnd)
|
||||
}
|
||||
}
|
||||
|
||||
void WrappedID3D11Device::FirstFrame(IDXGISwapChain *swap)
|
||||
{
|
||||
DXGI_SWAP_CHAIN_DESC swapdesc;
|
||||
swap->GetDesc(&swapdesc);
|
||||
|
||||
// if we have to capture the first frame, begin capturing immediately
|
||||
if(m_State == WRITING_IDLE && RenderDoc::Inst().ShouldTriggerCapture(0))
|
||||
{
|
||||
StartFrameCapture(this, swapdesc.OutputWindow);
|
||||
|
||||
m_AppControlledCapture = false;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT WrappedID3D11Device::Present(IDXGISwapChain *swap, UINT SyncInterval, UINT Flags)
|
||||
{
|
||||
if((Flags & DXGI_PRESENT_TEST) != 0)
|
||||
|
||||
@@ -305,6 +305,8 @@ public:
|
||||
|
||||
const FetchDrawcall *GetDrawcall(uint32_t frameID, uint32_t eventID);
|
||||
|
||||
void FirstFrame(IDXGISwapChain *swap);
|
||||
|
||||
vector<DebugMessage> GetDebugMessages();
|
||||
void AddDebugMessage(DebugMessage msg) { if(m_State < WRITING) m_DebugMessages.push_back(msg); }
|
||||
void AddDebugMessage(DebugMessageCategory c, DebugMessageSeverity sv, DebugMessageSource src, std::string d);
|
||||
|
||||
@@ -272,6 +272,10 @@ WrappedIDXGISwapChain2::WrappedIDXGISwapChain2(IDXGISwapChain* real, HWND wnd, W
|
||||
}
|
||||
|
||||
SAFE_ADDREF(m_pDevice);
|
||||
|
||||
// we do a 'fake' present right at the start, so that we can capture frame 1, by
|
||||
// going from this fake present to the first present.
|
||||
m_pDevice->FirstFrame(this);
|
||||
}
|
||||
|
||||
WrappedIDXGISwapChain2::~WrappedIDXGISwapChain2()
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@
|
||||
0,
|
||||
0});
|
||||
this.queuedCapFrame.Minimum = new decimal(new int[] {
|
||||
2,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
|
||||
Reference in New Issue
Block a user