revert: restore BeginCapture/EndCapture instead of TriggerCapture
TriggerCapture caused incomplete rdc files due to async file writing. BeginCapture/EndCapture ensures synchronous file write on EndCapture.
This commit is contained in:
@@ -400,6 +400,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
frameCount++;
|
||||
|
||||
if (frameCount >= targetFrameCount) {
|
||||
if (RenderDocCapture::Get().EndCapture()) {
|
||||
Log("[INFO] RenderDoc capture ended");
|
||||
}
|
||||
Log("[INFO] Reached target frame count %d - taking screenshot!", targetFrameCount);
|
||||
WaitForGPU();
|
||||
bool screenshotResult = D3D12Screenshot::Capture(
|
||||
@@ -417,8 +420,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
}
|
||||
|
||||
if (frameCount == targetFrameCount - 1) {
|
||||
RenderDocCapture::Get().TriggerCapture();
|
||||
Log("[INFO] RenderDoc capture triggered");
|
||||
if (RenderDocCapture::Get().BeginCapture("D3D12_Quad_Test")) {
|
||||
Log("[INFO] RenderDoc capture started");
|
||||
}
|
||||
}
|
||||
|
||||
EndRender();
|
||||
|
||||
Reference in New Issue
Block a user