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);