2018-05-18 16:18:16 +08:00
|
|
|
/*
|
2021-12-21 01:54:26 +08:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2018-09-18 15:11:08 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
2018-05-18 16:18:16 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/os_interface/windows/wddm/wddm_interface.h"
|
2018-05-18 16:18:16 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-08-10 22:41:44 +08:00
|
|
|
class WddmMockInterface23 : public WddmInterface23 {
|
|
|
|
public:
|
|
|
|
using WddmInterface23::WddmInterface23;
|
|
|
|
|
2019-02-27 18:17:17 +08:00
|
|
|
bool createHwQueue(OsContextWin &osContext) override {
|
2018-05-18 16:18:16 +08:00
|
|
|
createHwQueueCalled++;
|
2019-02-27 18:17:17 +08:00
|
|
|
createHwQueueResult = forceCreateHwQueueFail ? false : WddmInterface23::createHwQueue(osContext);
|
2018-05-18 16:18:16 +08:00
|
|
|
return createHwQueueResult;
|
|
|
|
}
|
|
|
|
|
2019-12-17 22:26:00 +08:00
|
|
|
void destroyMonitorFence(MonitoredFence &monitorFence) override {
|
2019-12-13 22:47:45 +08:00
|
|
|
destroyMonitorFenceCalled++;
|
2019-12-17 22:26:00 +08:00
|
|
|
WddmInterface23::destroyMonitorFence(monitorFence);
|
2019-12-13 22:47:45 +08:00
|
|
|
}
|
|
|
|
|
2018-05-18 16:18:16 +08:00
|
|
|
uint32_t createHwQueueCalled = 0;
|
|
|
|
bool forceCreateHwQueueFail = false;
|
|
|
|
bool createHwQueueResult = false;
|
2019-12-13 22:47:45 +08:00
|
|
|
|
|
|
|
uint32_t destroyMonitorFenceCalled = 0;
|
2018-05-18 16:18:16 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|