From 8a69656446e6b48c5c6981c0da595e2cdf120a1c Mon Sep 17 00:00:00 2001 From: "Mrozek, Michal" Date: Mon, 16 Jul 2018 17:30:56 +0200 Subject: [PATCH] Fix unrecoverable. - Do not rely on device as it may be destroyed use command stream receiver instead. Change-Id: I2c8a1542a27e5688cec6031e931d5765bcbebc28 --- runtime/os_interface/windows/wddm_memory_manager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/os_interface/windows/wddm_memory_manager.cpp b/runtime/os_interface/windows/wddm_memory_manager.cpp index 8e11ad47a5..5dff17d114 100644 --- a/runtime/os_interface/windows/wddm_memory_manager.cpp +++ b/runtime/os_interface/windows/wddm_memory_manager.cpp @@ -20,19 +20,19 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include "runtime/os_interface/windows/wddm_memory_manager.h" #include "runtime/command_stream/command_stream_receiver_hw.h" #include "runtime/device/device.h" -#include "runtime/helpers/aligned_memory.h" -#include "runtime/helpers/ptr_math.h" #include "runtime/gmm_helper/gmm.h" #include "runtime/gmm_helper/gmm_helper.h" #include "runtime/gmm_helper/resource_info.h" +#include "runtime/helpers/aligned_memory.h" +#include "runtime/helpers/ptr_math.h" #include "runtime/helpers/surface_formats.h" -#include "runtime/memory_manager/deferred_deleter.h" #include "runtime/memory_manager/deferrable_deletion.h" -#include "runtime/os_interface/windows/wddm_memory_manager.h" -#include "runtime/os_interface/windows/wddm_allocation.h" +#include "runtime/memory_manager/deferred_deleter.h" #include "runtime/os_interface/windows/wddm/wddm.h" +#include "runtime/os_interface/windows/wddm_allocation.h" #include namespace OCLRT { @@ -295,7 +295,7 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation releaseResidencyLock(); - UNRECOVERABLE_IF(gfxAllocation->taskCount != ObjectNotUsed && this->device && this->device->peekCommandStreamReceiver() && gfxAllocation->taskCount > *this->device->getCommandStreamReceiver().getTagAddress()); + UNRECOVERABLE_IF(gfxAllocation->taskCount != ObjectNotUsed && this->csr && this->csr->getTagAddress() && gfxAllocation->taskCount > *this->csr->getTagAddress()); if (input->gmm) { if (input->gmm->isRenderCompressed) {