L0 to read Device LUID from the WDDM driver given Debug Variable

- Added Support for reading the Device LUID of the given device used in
Windows WDDM given EnableL0ReadLUIDExtension=1.
- Added inital support for passing back the NodeMask of 1.

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
Spruit, Neil R
2022-07-15 01:28:43 +00:00
committed by Compute-Runtime-Automation
parent a8c9458936
commit 33a587c704
17 changed files with 482 additions and 0 deletions

View File

@@ -6,11 +6,13 @@
*/
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/helpers/string.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/os_interface/windows/wddm_fixture.h"
#include "shared/test/common/test_macros/hw_test.h"
namespace NEO {
std::unique_ptr<HwDeviceIdWddm> createHwDeviceIdFromAdapterLuid(OsEnvironmentWin &osEnvironment, LUID adapterLuid);
using WddmTests = WddmTestWithMockGdiDll;
@@ -386,6 +388,17 @@ TEST_F(WddmTests, GivenPlatformNotSupportEvictIfNecessaryWhenAdjustingEvictNeede
bool value = wddm->adjustEvictNeededParameter(false);
EXPECT_TRUE(value);
}
using WddmOsContextDeviceLuidTests = WddmFixtureLuid;
TEST_F(WddmFixtureLuid, givenValidOsContextAndLuidDataRequestThenValidDataReturned) {
LUID adapterLuid = {0x12, 0x1234};
wddm->hwDeviceId = NEO::createHwDeviceIdFromAdapterLuid(*osEnvironment, adapterLuid);
std::vector<uint8_t> luidData;
size_t arraySize = 8;
osContext->getDeviceLuidArray(luidData, arraySize);
uint64_t luid = 0;
memcpy_s(&luid, sizeof(uint64_t), luidData.data(), sizeof(uint8_t) * luidData.size());
EXPECT_NE(luid, (uint64_t)0);
}
uint64_t waitForSynchronizationObjectFromCpuCounter = 0u;