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