2018-05-18 16:18:16 +08:00
|
|
|
/*
|
2019-01-29 03:16:36 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-09-18 15:11:08 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
2018-05-18 16:18:16 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-01-29 03:16:36 +08:00
|
|
|
#include "runtime/os_interface/windows/wddm/wddm_interface.h"
|
2018-05-18 16:18:16 +08:00
|
|
|
|
|
|
|
namespace OCLRT {
|
2018-08-10 22:41:44 +08:00
|
|
|
class WddmMockInterface23 : public WddmInterface23 {
|
|
|
|
public:
|
|
|
|
using WddmInterface23::WddmInterface23;
|
|
|
|
|
2018-08-21 23:36:08 +08:00
|
|
|
bool createHwQueue(PreemptionMode preemptionMode, OsContextWin &osContext) override {
|
2018-05-18 16:18:16 +08:00
|
|
|
createHwQueueCalled++;
|
2018-08-21 23:36:08 +08:00
|
|
|
createHwQueueResult = forceCreateHwQueueFail ? false : WddmInterface23::createHwQueue(preemptionMode, osContext);
|
2018-05-18 16:18:16 +08:00
|
|
|
return createHwQueueResult;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t createHwQueueCalled = 0;
|
|
|
|
bool forceCreateHwQueueFail = false;
|
|
|
|
bool createHwQueueResult = false;
|
|
|
|
};
|
|
|
|
} // namespace OCLRT
|