[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).
This commit is contained in:
parent
a976056afb
commit
702a8732c8
|
@ -138,12 +138,7 @@ X_STATUS GraphicsSystem::Setup(cpu::Processor* processor,
|
||||||
void GraphicsSystem::Shutdown() {
|
void GraphicsSystem::Shutdown() {
|
||||||
if (command_processor_) {
|
if (command_processor_) {
|
||||||
EndTracing();
|
EndTracing();
|
||||||
}
|
|
||||||
|
|
||||||
if (command_processor_) {
|
|
||||||
command_processor_->Shutdown();
|
command_processor_->Shutdown();
|
||||||
// TODO(benvanik): remove mapped range.
|
|
||||||
command_processor_.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vsync_worker_thread_) {
|
if (vsync_worker_thread_) {
|
||||||
|
|
Loading…
Reference in New Issue