diff --git a/opencl/test/unit_test/mocks/mock_wddm.h b/opencl/test/unit_test/mocks/mock_wddm.h index f9f1824a56..75362eafce 100644 --- a/opencl/test/unit_test/mocks/mock_wddm.h +++ b/opencl/test/unit_test/mocks/mock_wddm.h @@ -32,6 +32,7 @@ class WddmMock : public Wddm { using Wddm::currentPagingFenceValue; using Wddm::dedicatedVideoMemory; using Wddm::device; + using Wddm::deviceRegistryPath; using Wddm::featureTable; using Wddm::getSystemInfo; using Wddm::gmmMemory; diff --git a/opencl/test/unit_test/windows/os_interface_tests.cpp b/opencl/test/unit_test/windows/os_interface_tests.cpp index 1b9f5cb1ef..b704ede013 100644 --- a/opencl/test/unit_test/windows/os_interface_tests.cpp +++ b/opencl/test/unit_test/windows/os_interface_tests.cpp @@ -26,6 +26,8 @@ TEST(osInterfaceTests, whenOsInterfaceSetupGmmInputArgsThenArgsAreSet) { wddm->init(); EXPECT_NE(nullptr, rootDeviceEnvironment.osInterface.get()); + wddm->deviceRegistryPath = "registyPath"; + auto expectedRegistryPath = wddm->deviceRegistryPath.c_str(); auto &adapterBDF = wddm->adapterBDF; adapterBDF.Bus = 0x12; adapterBDF.Device = 0x34; @@ -33,9 +35,11 @@ TEST(osInterfaceTests, whenOsInterfaceSetupGmmInputArgsThenArgsAreSet) { GMM_INIT_IN_ARGS gmmInputArgs = {}; EXPECT_NE(0, memcmp(&adapterBDF, &gmmInputArgs.stAdapterBDF, sizeof(ADAPTER_BDF))); + EXPECT_STRNE(expectedRegistryPath, gmmInputArgs.DeviceRegistryPath); rootDeviceEnvironment.osInterface->setGmmInputArgs(&gmmInputArgs); EXPECT_EQ(0, memcmp(&adapterBDF, &gmmInputArgs.stAdapterBDF, sizeof(ADAPTER_BDF))); EXPECT_EQ(GMM_CLIENT::GMM_OCL_VISTA, gmmInputArgs.ClientType); + EXPECT_STREQ(expectedRegistryPath, gmmInputArgs.DeviceRegistryPath); } diff --git a/shared/source/os_interface/windows/wddm/wddm.cpp b/shared/source/os_interface/windows/wddm/wddm.cpp index dd69047d3e..5171467f40 100644 --- a/shared/source/os_interface/windows/wddm/wddm.cpp +++ b/shared/source/os_interface/windows/wddm/wddm.cpp @@ -1017,6 +1017,7 @@ void Wddm::setGmmInputArg(void *args) { gmmInArgs->stAdapterBDF = this->adapterBDF; gmmInArgs->ClientType = GMM_CLIENT::GMM_OCL_VISTA; + gmmInArgs->DeviceRegistryPath = const_cast(deviceRegistryPath.c_str()); } void Wddm::updatePagingFenceValue(uint64_t newPagingFenceValue) {