Setup device registry path in GMM_INIT_IN_ARGS
Change-Id: If4eed9cb16bd0bba24a0d5803488e00ef48a3fa5 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
7d9d4e743a
commit
171c40d58a
|
@ -32,6 +32,7 @@ class WddmMock : public Wddm {
|
||||||
using Wddm::currentPagingFenceValue;
|
using Wddm::currentPagingFenceValue;
|
||||||
using Wddm::dedicatedVideoMemory;
|
using Wddm::dedicatedVideoMemory;
|
||||||
using Wddm::device;
|
using Wddm::device;
|
||||||
|
using Wddm::deviceRegistryPath;
|
||||||
using Wddm::featureTable;
|
using Wddm::featureTable;
|
||||||
using Wddm::getSystemInfo;
|
using Wddm::getSystemInfo;
|
||||||
using Wddm::gmmMemory;
|
using Wddm::gmmMemory;
|
||||||
|
|
|
@ -26,6 +26,8 @@ TEST(osInterfaceTests, whenOsInterfaceSetupGmmInputArgsThenArgsAreSet) {
|
||||||
wddm->init();
|
wddm->init();
|
||||||
EXPECT_NE(nullptr, rootDeviceEnvironment.osInterface.get());
|
EXPECT_NE(nullptr, rootDeviceEnvironment.osInterface.get());
|
||||||
|
|
||||||
|
wddm->deviceRegistryPath = "registyPath";
|
||||||
|
auto expectedRegistryPath = wddm->deviceRegistryPath.c_str();
|
||||||
auto &adapterBDF = wddm->adapterBDF;
|
auto &adapterBDF = wddm->adapterBDF;
|
||||||
adapterBDF.Bus = 0x12;
|
adapterBDF.Bus = 0x12;
|
||||||
adapterBDF.Device = 0x34;
|
adapterBDF.Device = 0x34;
|
||||||
|
@ -33,9 +35,11 @@ TEST(osInterfaceTests, whenOsInterfaceSetupGmmInputArgsThenArgsAreSet) {
|
||||||
|
|
||||||
GMM_INIT_IN_ARGS gmmInputArgs = {};
|
GMM_INIT_IN_ARGS gmmInputArgs = {};
|
||||||
EXPECT_NE(0, memcmp(&adapterBDF, &gmmInputArgs.stAdapterBDF, sizeof(ADAPTER_BDF)));
|
EXPECT_NE(0, memcmp(&adapterBDF, &gmmInputArgs.stAdapterBDF, sizeof(ADAPTER_BDF)));
|
||||||
|
EXPECT_STRNE(expectedRegistryPath, gmmInputArgs.DeviceRegistryPath);
|
||||||
|
|
||||||
rootDeviceEnvironment.osInterface->setGmmInputArgs(&gmmInputArgs);
|
rootDeviceEnvironment.osInterface->setGmmInputArgs(&gmmInputArgs);
|
||||||
|
|
||||||
EXPECT_EQ(0, memcmp(&adapterBDF, &gmmInputArgs.stAdapterBDF, sizeof(ADAPTER_BDF)));
|
EXPECT_EQ(0, memcmp(&adapterBDF, &gmmInputArgs.stAdapterBDF, sizeof(ADAPTER_BDF)));
|
||||||
EXPECT_EQ(GMM_CLIENT::GMM_OCL_VISTA, gmmInputArgs.ClientType);
|
EXPECT_EQ(GMM_CLIENT::GMM_OCL_VISTA, gmmInputArgs.ClientType);
|
||||||
|
EXPECT_STREQ(expectedRegistryPath, gmmInputArgs.DeviceRegistryPath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1017,6 +1017,7 @@ void Wddm::setGmmInputArg(void *args) {
|
||||||
|
|
||||||
gmmInArgs->stAdapterBDF = this->adapterBDF;
|
gmmInArgs->stAdapterBDF = this->adapterBDF;
|
||||||
gmmInArgs->ClientType = GMM_CLIENT::GMM_OCL_VISTA;
|
gmmInArgs->ClientType = GMM_CLIENT::GMM_OCL_VISTA;
|
||||||
|
gmmInArgs->DeviceRegistryPath = const_cast<char *>(deviceRegistryPath.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wddm::updatePagingFenceValue(uint64_t newPagingFenceValue) {
|
void Wddm::updatePagingFenceValue(uint64_t newPagingFenceValue) {
|
||||||
|
|
Loading…
Reference in New Issue