GPU: Clear display texture on fatal error

This commit is contained in:
Stenzek 2025-02-09 13:22:03 +10:00
parent 06b02183cb
commit 94b2060979
No known key found for this signature in database

View File

@ -1139,6 +1139,7 @@ void GPUThread::ReportFatalErrorAndShutdown(std::string_view reason)
// replace the renderer with a dummy/null backend, so that all commands get dropped
ERROR_LOG("Switching to null renderer: {}", reason);
s_state.gpu_presenter->ClearDisplayTexture();
s_state.gpu_backend.reset();
s_state.gpu_backend = GPUBackend::CreateNullBackend(*s_state.gpu_presenter);
if (!s_state.gpu_backend->Initialize(false, nullptr)) [[unlikely]]