From 920d952a4a4016cbcaace15b9691a673b6c15dbc Mon Sep 17 00:00:00 2001 From: "Mrozek, Michal" Date: Fri, 12 Jan 2018 14:03:02 +0100 Subject: [PATCH] Add Unrecoverable if GraphicsAllocation in use is being destroyed. Change-Id: Ie224ac4d098678a99da0a8c084f02740f323c475 --- runtime/os_interface/windows/wddm_memory_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime/os_interface/windows/wddm_memory_manager.cpp b/runtime/os_interface/windows/wddm_memory_manager.cpp index 1925980f0b..bdacf9584c 100644 --- a/runtime/os_interface/windows/wddm_memory_manager.cpp +++ b/runtime/os_interface/windows/wddm_memory_manager.cpp @@ -20,6 +20,8 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#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_helper.h" @@ -268,6 +270,8 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation releaseResidencyLock(); + UNRECOVERABLE_IF(gfxAllocation->taskCount != ObjectNotUsed && this->device && gfxAllocation->taskCount > *this->device->getCommandStreamReceiver().getTagAddress()); + if (input->gmm) { if (input->gmm->isRenderCompressed) { status = unmapAuxVA(input->gmm, input->gpuPtr);