mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Destroy WDDM monitor fence during OS Context cleanup
Change-Id: I654bc28891bcd1ec23fa18a07bef79a98edbce2e Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
7eb8810402
commit
37a690a185
@@ -84,6 +84,7 @@ if(WIN32)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gmm_memory${BRANCH_DIR_SUFFIX}/mock_gmm_memory.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_gmm_page_table_mngr.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_gmm_page_table_mngr.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_wddm_interface20.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_wddm_interface23.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_wddm.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_wddm.cpp
|
||||
|
||||
24
unit_tests/mocks/mock_wddm_interface20.h
Normal file
24
unit_tests/mocks/mock_wddm_interface20.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "runtime/os_interface/windows/wddm/wddm_interface.h"
|
||||
|
||||
namespace NEO {
|
||||
class WddmMockInterface20 : public WddmInterface20 {
|
||||
public:
|
||||
using WddmInterface20::WddmInterface20;
|
||||
|
||||
void destroyMonitorFence(D3DKMT_HANDLE fenceHandle) override {
|
||||
destroyMonitorFenceCalled++;
|
||||
WddmInterface20::destroyMonitorFence(fenceHandle);
|
||||
}
|
||||
|
||||
uint32_t destroyMonitorFenceCalled = 0;
|
||||
};
|
||||
} // namespace NEO
|
||||
@@ -20,8 +20,15 @@ class WddmMockInterface23 : public WddmInterface23 {
|
||||
return createHwQueueResult;
|
||||
}
|
||||
|
||||
void destroyMonitorFence(D3DKMT_HANDLE fenceHandle) override {
|
||||
destroyMonitorFenceCalled++;
|
||||
WddmInterface23::destroyMonitorFence(fenceHandle);
|
||||
}
|
||||
|
||||
uint32_t createHwQueueCalled = 0;
|
||||
bool forceCreateHwQueueFail = false;
|
||||
bool createHwQueueResult = false;
|
||||
|
||||
uint32_t destroyMonitorFenceCalled = 0;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user