Files
compute-runtime/unit_tests/mocks/mock_wddm_interface23.h
Zbigniew Zdanowicz 58fa5bd347 Add separate methods to Wddm interface to create monitor fence
Related-To: NEO-3639

Change-Id: Id1216def65c873028eb6a577fa30ad68ebec8f19
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2019-12-19 13:38:19 +01:00

35 lines
889 B
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/os_interface/windows/wddm/wddm_interface.h"
namespace NEO {
class WddmMockInterface23 : public WddmInterface23 {
public:
using WddmInterface23::WddmInterface23;
bool createHwQueue(OsContextWin &osContext) override {
createHwQueueCalled++;
createHwQueueResult = forceCreateHwQueueFail ? false : WddmInterface23::createHwQueue(osContext);
return createHwQueueResult;
}
void destroyMonitorFence(MonitoredFence &monitorFence) override {
destroyMonitorFenceCalled++;
WddmInterface23::destroyMonitorFence(monitorFence);
}
uint32_t createHwQueueCalled = 0;
bool forceCreateHwQueueFail = false;
bool createHwQueueResult = false;
uint32_t destroyMonitorFenceCalled = 0;
};
} // namespace NEO