Use family type from hwInfo in WDDM

Change-Id: I3120673781b4cc0eb170833ac42eab1aad718d79
This commit is contained in:
Maciej Dziuban
2020-07-06 14:42:48 +02:00
committed by sys_ocldev
parent 85152c5107
commit b1062812be
4 changed files with 22 additions and 2 deletions

View File

@@ -25,4 +25,18 @@ TEST_F(WddmTests, whenCreatingAllocation64kThenDoNotCreateResource) {
EXPECT_EQ(FALSE, gdiParam->Flags.CreateResource);
}
TEST_F(WddmTests, whenInitializingWddmThenSetMinAddressToCorrectValue) {
constexpr static uintptr_t mockedInternalGpuVaRange = 0x9876u;
auto gmmMemory = new MockGmmMemoryBase(wddm->rootDeviceEnvironment.getGmmClientContext());
gmmMemory->overrideInternalGpuVaRangeLimit(mockedInternalGpuVaRange);
wddm->gmmMemory.reset(gmmMemory);
ASSERT_EQ(0u, wddm->getWddmMinAddress());
wddm->init();
const bool obtainFromGmm = defaultHwInfo->platform.eRenderCoreFamily == IGFX_GEN12LP_CORE;
const auto expectedMinAddress = obtainFromGmm ? mockedInternalGpuVaRange : windowsMinAddress;
ASSERT_EQ(expectedMinAddress, wddm->getWddmMinAddress());
}
} // namespace NEO