-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminate process once all trim ranges have been captured #1194
Terminate process once all trim ranges have been captured #1194
Conversation
CI gfxreconstruct build queued with queue ID 5586. |
CI gfxreconstruct build # 2974 running. |
CI gfxreconstruct build # 2974 passed. |
31ef0c6
to
8544ee1
Compare
CI gfxreconstruct build queued with queue ID 6278. |
CI gfxreconstruct build # 2980 running. |
CI gfxreconstruct build # 2980 failed. |
8544ee1
to
da369ee
Compare
CI gfxreconstruct build queued with queue ID 6350. |
CI gfxreconstruct build # 2981 running. |
CI gfxreconstruct build # 2981 passed. |
I don't care myself but just mentioning this would cause an otherwise validation-passing replay to not pass validation since all Vulkan handles must be destroyed. I guess hard exiting this way might stop validation errors on exit being reported anyway even if the To make this clean for use in a zero validation error environment you'd add a shutdown function which destroyed and freed every live object and memory allocation in reverse order to that of their creation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It looks like this would also stop D3D12 captures after the last trim range. @davidd-lunarg do you agree? @panos-lunarg could you add your Vulkan usage note to the D3D12 usage |
framework/encode/capture_manager.cpp
Outdated
if (quit_after_frame_ranges_) | ||
{ | ||
GFXRECON_LOG_INFO("All trim ranges have been captured. Quitting."); | ||
exit(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This skips DestroyInstance
which calls ~CaptureManager()
which calls util::PageGuardManager::Destroy();
. I think exiting is relatively safe or we'd have real problems when applications crash and cause GFXR to terminate unexpectedly. Still, what do you think about a more formal shutdown path here which closes out CaptureManager, calling the virtual dtor for the derived capture managers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exit(0)
still exists but now I am installing an atexit
function which should be called right after exit()
and call the destructor
da369ee
to
a55e256
Compare
CI gfxreconstruct build queued with queue ID 8981. |
CI gfxreconstruct build # 2994 running. |
a55e256
to
6c32717
Compare
CI gfxreconstruct build queued with queue ID 9022. |
CI gfxreconstruct build # 2995 running. |
CI gfxreconstruct build # 2995 passed. |
Once all frame ranges specified by GFXRECON_CAPTURE_FRAMES / debug.gfxrecon.capture_frames have been recorded, GFXR will call exit(), forcing the whole process to terminate. New control boolean options (GFXRECON_QUIT_AFTER_CAPTURE_FRAMES for desktop and debug_gfxrecon.quit_after_capture_frames for Android) can be used to control the new behavior.
6c32717
to
8c466e7
Compare
CI gfxreconstruct build queued with queue ID 24991. |
CI gfxreconstruct build # 3089 running. |
CI gfxreconstruct build # 3089 failed. |
Once all frame ranges specified by
GFXRECON_CAPTURE_FRAMES/debug.gfxrecon.capture_frames) have been
recorded, GFXR will call exit() forcing the whole process to terminate.
New control options (GFXRECON_QUIT_AFTER_CAPTURE_FRAMES for desktop and
debug_gfxrecon.quit_after_capture_frames for Android) can be used to
enable or disable this.