From 702a8732c8914526ebfb95c6fb645df862e3aa31 Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 28 Feb 2018 15:09:40 -0600 Subject: [PATCH] [GPU] Free the command processor in the destructor rather than on shutdown Fixes a race condition: TDR followed by WriteRegister will cause a crash. It's okay to continue writing to the command processor (it may be setup again later). --- src/xenia/gpu/graphics_system.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/xenia/gpu/graphics_system.cc b/src/xenia/gpu/graphics_system.cc index f292b81d8..56443db3a 100644 --- a/src/xenia/gpu/graphics_system.cc +++ b/src/xenia/gpu/graphics_system.cc @@ -138,12 +138,7 @@ X_STATUS GraphicsSystem::Setup(cpu::Processor* processor, void GraphicsSystem::Shutdown() { if (command_processor_) { EndTracing(); - } - - if (command_processor_) { command_processor_->Shutdown(); - // TODO(benvanik): remove mapped range. - command_processor_.reset(); } if (vsync_worker_thread_) {