Files
compute-runtime/unit_tests/os_interface/windows/mock_wddm_allocation.h
Mateusz Jablonski 5b22a50b28 Allow to create WddmAllocation with multiple handles
Change-Id: Iac9df91b08a6ce610b985586dfb6b5f63dc668cb
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-07 13:29:00 +01:00

26 lines
625 B
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/os_interface/windows/wddm_allocation.h"
namespace OCLRT {
class MockWddmAllocation : public WddmAllocation {
public:
MockWddmAllocation() : WddmAllocation(GraphicsAllocation::AllocationType::UNDECIDED, nullptr, 0, nullptr, MemoryPool::MemoryNull, false), gpuPtr(gpuAddress), handle(handles[0]) {
}
using WddmAllocation::cpuPtr;
using WddmAllocation::memoryPool;
using WddmAllocation::size;
D3DGPU_VIRTUAL_ADDRESS &gpuPtr;
D3DKMT_HANDLE &handle;
};
} // namespace OCLRT