mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add cl_khr_pci_bus_info extension
Signed-off-by: Egor Suldin <egor.suldin@intel.com> https://github.com/intel/compute-runtime/pull/374
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c94ad034d9
commit
2b3b47b495
@@ -260,8 +260,7 @@ bool validDriverStorePath(OsEnvironmentWin &osEnvironment, D3DKMT_HANDLE adapter
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string deviceRegistryPath = adapterInfo.DeviceRegistryPath;
|
||||
DriverInfoWindows driverInfo(std::move(deviceRegistryPath));
|
||||
DriverInfoWindows driverInfo(adapterInfo.DeviceRegistryPath, PhysicalDevicePciBusInfo(PhysicalDevicePciBusInfo::InvalidValue, PhysicalDevicePciBusInfo::InvalidValue, PhysicalDevicePciBusInfo::InvalidValue, PhysicalDevicePciBusInfo::InvalidValue));
|
||||
return driverInfo.isCompatibleDriverStore();
|
||||
}
|
||||
|
||||
@@ -1169,4 +1168,24 @@ void Wddm::createPagingFenceLogger() {
|
||||
residencyLogger = std::make_unique<WddmResidencyLogger>(device, pagingFenceAddress);
|
||||
}
|
||||
}
|
||||
|
||||
PhysicalDevicePciBusInfo Wddm::getPciBusInfo() const {
|
||||
D3DKMT_ADAPTERADDRESS adapterAddress;
|
||||
D3DKMT_QUERYADAPTERINFO queryAdapterInfo;
|
||||
|
||||
queryAdapterInfo.hAdapter = getAdapter();
|
||||
queryAdapterInfo.Type = KMTQAITYPE_ADAPTERADDRESS;
|
||||
queryAdapterInfo.pPrivateDriverData = &adapterAddress;
|
||||
queryAdapterInfo.PrivateDriverDataSize = sizeof(adapterAddress);
|
||||
|
||||
auto gdi = getGdi();
|
||||
UNRECOVERABLE_IF(gdi == nullptr);
|
||||
|
||||
if (gdi->queryAdapterInfo(&queryAdapterInfo) == STATUS_SUCCESS) {
|
||||
return PhysicalDevicePciBusInfo(0, adapterAddress.BusNumber, adapterAddress.DeviceNumber, adapterAddress.FunctionNumber);
|
||||
}
|
||||
|
||||
return PhysicalDevicePciBusInfo(PhysicalDevicePciBusInfo::InvalidValue, PhysicalDevicePciBusInfo::InvalidValue, PhysicalDevicePciBusInfo::InvalidValue, PhysicalDevicePciBusInfo::InvalidValue);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user