Windows: Use timestamp frequency from adapter info

Related-To: NEO-5435
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-02-01 18:37:13 +00:00
committed by Compute-Runtime-Automation
parent 0ca1cdc565
commit 2b0b2231a7
7 changed files with 21 additions and 9 deletions

View File

@@ -291,6 +291,7 @@ NTSTATUS __stdcall D3DKMTQueryAdapterInfo(IN CONST D3DKMT_QUERYADAPTERINFO *quer
adapterInfo->GfxMemorySize = 2181038080;
adapterInfo->SystemSharedMemory = 4249540608;
adapterInfo->SystemVideoMemory = 0;
adapterInfo->GfxTimeStampFreq = 1;
adapterInfo->GfxPartition.Standard.Base = gAdapterInfo.GfxPartition.Standard.Base;
adapterInfo->GfxPartition.Standard.Limit = gAdapterInfo.GfxPartition.Standard.Limit;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -39,6 +39,12 @@ TEST_F(WddmTests, whenInitializingWddmThenSetMinAddressToCorrectValue) {
ASSERT_EQ(expectedMinAddress, wddm->getWddmMinAddress());
}
TEST_F(WddmTests, whenInitializingWddmThenSetTimestampFrequencyToCorrectValue) {
EXPECT_EQ(0u, wddm->timestampFrequency);
init();
EXPECT_EQ(1u, wddm->timestampFrequency);
}
TEST_F(WddmTests, givenWddmWhenPassesCorrectHandleToVerifySharedHandleThenReturnTrue) {
init();
D3DKMT_HANDLE handle = 1u;