mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Do not begin a new frame during RenderingDevice's shutdown.
This commit is contained in:
parent
20430236e7
commit
af584b1ba8
2 changed files with 7 additions and 4 deletions
|
@ -6584,11 +6584,14 @@ void RenderingDevice::_stall_for_previous_frames() {
|
|||
}
|
||||
}
|
||||
|
||||
void RenderingDevice::_flush_and_stall_for_all_frames() {
|
||||
void RenderingDevice::_flush_and_stall_for_all_frames(bool p_begin_frame) {
|
||||
_stall_for_previous_frames();
|
||||
_end_frame();
|
||||
_execute_frame(false);
|
||||
|
||||
if (p_begin_frame) {
|
||||
_begin_frame();
|
||||
}
|
||||
}
|
||||
|
||||
Error RenderingDevice::initialize(RenderingContextDriver *p_context, DisplayServer::WindowID p_main_window) {
|
||||
|
@ -7086,7 +7089,7 @@ void RenderingDevice::finalize() {
|
|||
|
||||
if (!frames.is_empty()) {
|
||||
// Wait for all frames to have finished rendering.
|
||||
_flush_and_stall_for_all_frames();
|
||||
_flush_and_stall_for_all_frames(false);
|
||||
}
|
||||
|
||||
// Wait for transfer workers to finish.
|
||||
|
|
|
@ -1587,7 +1587,7 @@ public:
|
|||
void _execute_frame(bool p_present);
|
||||
void _stall_for_frame(uint32_t p_frame);
|
||||
void _stall_for_previous_frames();
|
||||
void _flush_and_stall_for_all_frames();
|
||||
void _flush_and_stall_for_all_frames(bool p_begin_frame = true);
|
||||
|
||||
template <typename T>
|
||||
void _free_rids(T &p_owner, const char *p_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue