mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
UM-KM data refactor for Windows
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
dd6653892e
commit
70f8fe1c01
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
* Copyright (C) 2017-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -75,7 +75,11 @@ class MockGmmResourceInfo : public GmmResourceInfo {
|
||||
|
||||
bool is64KBPageSuitable() const override { return is64KBPageSuitableValue; }
|
||||
|
||||
GMM_RESOURCE_INFO *peekHandle() const override { return mockResourceInfoHandle; }
|
||||
GMM_RESOURCE_INFO *peekGmmResourceInfo() const override { return mockResourceInfoHandle; }
|
||||
|
||||
void *peekHandle() const override { return mockResourceInfoHandle; }
|
||||
|
||||
size_t peekHandleSize() const override { return sizeof(GMM_RESOURCE_INFO); }
|
||||
|
||||
GMM_RESOURCE_INFO *mockResourceInfoHandle = (GMM_RESOURCE_INFO *)this;
|
||||
GMM_RESCREATE_PARAMS mockResourceCreateParams = {};
|
||||
@ -90,6 +94,9 @@ class MockGmmResourceInfo : public GmmResourceInfo {
|
||||
void setAuxQPitch(uint32_t value);
|
||||
void setMipTailStartLod(uint32_t newMipTailStartLod) { mipTailStartLod = newMipTailStartLod; }
|
||||
|
||||
using GmmResourceInfo::clientContext;
|
||||
using GmmResourceInfo::createResourceInfo;
|
||||
|
||||
uint32_t getOffsetCalled = 0u;
|
||||
uint32_t arrayIndexPassedToGetOffset = 0;
|
||||
SurfaceFormatInfo tempSurface{};
|
||||
|
@ -26,7 +26,7 @@ struct mockHwDeviceId : public HwDeviceId {
|
||||
using HwDeviceId::osEnvironment;
|
||||
};
|
||||
|
||||
WddmMock::WddmMock(RootDeviceEnvironment &rootDeviceEnvironment) : Wddm(std::make_unique<HwDeviceId>(ADAPTER_HANDLE, LUID{}, rootDeviceEnvironment.executionEnvironment.osEnvironment.get()), rootDeviceEnvironment) {
|
||||
WddmMock::WddmMock(RootDeviceEnvironment &rootDeviceEnvironment) : Wddm(std::make_unique<HwDeviceId>(ADAPTER_HANDLE, LUID{}, rootDeviceEnvironment.executionEnvironment.osEnvironment.get(), std::make_unique<UmKmDataTranslator>()), rootDeviceEnvironment) {
|
||||
if (!rootDeviceEnvironment.executionEnvironment.osEnvironment.get()) {
|
||||
rootDeviceEnvironment.executionEnvironment.osEnvironment = std::make_unique<OsEnvironmentWin>();
|
||||
}
|
||||
|
Reference in New Issue
Block a user