mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Don't use current driver for creating RDC, pass in driver explicitly
This commit is contained in:
@@ -699,8 +699,8 @@ bool RenderDoc::ShouldTriggerCapture(uint32_t frameNumber)
|
||||
return ret;
|
||||
}
|
||||
|
||||
RDCFile *RenderDoc::CreateRDC(uint32_t frameNum, void *thpixels, size_t thlen, uint16_t thwidth,
|
||||
uint16_t thheight)
|
||||
RDCFile *RenderDoc::CreateRDC(RDCDriver driver, uint32_t frameNum, void *thpixels, size_t thlen,
|
||||
uint16_t thwidth, uint16_t thheight)
|
||||
{
|
||||
RDCFile *ret = new RDCFile;
|
||||
|
||||
@@ -731,7 +731,7 @@ RDCFile *RenderDoc::CreateRDC(uint32_t frameNum, void *thpixels, size_t thlen, u
|
||||
thumb = &th;
|
||||
}
|
||||
|
||||
ret->SetData(m_CurrentDriver, ToStr(m_CurrentDriver).c_str(), OSUtility::GetMachineIdent(), thumb);
|
||||
ret->SetData(driver, ToStr(driver).c_str(), OSUtility::GetMachineIdent(), thumb);
|
||||
|
||||
ret->Create(m_CurrentLogFile.c_str());
|
||||
|
||||
|
||||
@@ -288,8 +288,8 @@ public:
|
||||
void RecreateCrashHandler();
|
||||
void UnloadCrashHandler();
|
||||
ICrashHandler *GetCrashHandler() const { return m_ExHandler; }
|
||||
RDCFile *CreateRDC(uint32_t frameNum, void *thpixels, size_t thlen, uint16_t thwidth,
|
||||
uint16_t thheight);
|
||||
RDCFile *CreateRDC(RDCDriver driver, uint32_t frameNum, void *thpixels, size_t thlen,
|
||||
uint16_t thwidth, uint16_t thheight);
|
||||
void FinishCaptureWriting(RDCFile *rdc, uint32_t frameNumber);
|
||||
|
||||
void AddChildProcess(uint32_t pid, uint32_t ident)
|
||||
|
||||
@@ -1646,7 +1646,8 @@ bool WrappedID3D11Device::EndFrameCapture(void *dev, void *wnd)
|
||||
}
|
||||
}
|
||||
|
||||
RDCFile *rdc = RenderDoc::Inst().CreateRDC(m_FrameCounter, jpgbuf, len, thwidth, thheight);
|
||||
RDCFile *rdc = RenderDoc::Inst().CreateRDC(RDCDriver::D3D11, m_FrameCounter, jpgbuf, len,
|
||||
thwidth, thheight);
|
||||
|
||||
SAFE_DELETE_ARRAY(jpgbuf);
|
||||
SAFE_DELETE_ARRAY(thpixels);
|
||||
|
||||
@@ -1559,7 +1559,8 @@ bool WrappedID3D12Device::EndFrameCapture(void *dev, void *wnd)
|
||||
if((*it)->GetResourceRecord()->ContainsExecuteIndirect)
|
||||
WrappedID3D12Resource::RefBuffers(GetResourceManager());
|
||||
|
||||
rdc = RenderDoc::Inst().CreateRDC(m_FrameCounter, jpgbuf, len, thwidth, thheight);
|
||||
rdc = RenderDoc::Inst().CreateRDC(RDCDriver::D3D12, m_FrameCounter, jpgbuf, len, thwidth,
|
||||
thheight);
|
||||
|
||||
SAFE_DELETE_ARRAY(jpgbuf);
|
||||
SAFE_DELETE_ARRAY(thpixels);
|
||||
|
||||
@@ -2401,8 +2401,8 @@ bool WrappedOpenGL::EndFrameCapture(void *dev, void *wnd)
|
||||
if(bbim == NULL)
|
||||
bbim = SaveBackbufferImage();
|
||||
|
||||
RDCFile *rdc = RenderDoc::Inst().CreateRDC(m_FrameCounter, bbim->jpgbuf, bbim->len,
|
||||
bbim->thwidth, bbim->thheight);
|
||||
RDCFile *rdc = RenderDoc::Inst().CreateRDC(GetDriverType(), m_FrameCounter, bbim->jpgbuf,
|
||||
bbim->len, bbim->thwidth, bbim->thheight);
|
||||
|
||||
SAFE_DELETE(bbim);
|
||||
|
||||
|
||||
@@ -1291,7 +1291,8 @@ bool WrappedVulkan::EndFrameCapture(void *dev, void *wnd)
|
||||
}
|
||||
}
|
||||
|
||||
RDCFile *rdc = RenderDoc::Inst().CreateRDC(m_FrameCounter, jpgbuf, len, thwidth, thheight);
|
||||
RDCFile *rdc =
|
||||
RenderDoc::Inst().CreateRDC(RDCDriver::Vulkan, m_FrameCounter, jpgbuf, len, thwidth, thheight);
|
||||
|
||||
SAFE_DELETE_ARRAY(jpgbuf);
|
||||
SAFE_DELETE_ARRAY(thpixels);
|
||||
|
||||
Reference in New Issue
Block a user