Support for L0 to read Device LUID from the WDDM driver using ext Properties

- Added Support for reading the Device LUID of the given device used in
Windows WDDM.
- 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 35aff13178
commit 8124bff387
16 changed files with 432 additions and 1 deletions

View File

@@ -51,6 +51,23 @@ void OsContextWin::reInitializeContext() {
UNRECOVERABLE_IF(!wddm.createContext(*this));
};
void OsContextWin::getDeviceLuidArray(std::vector<uint8_t> &luidData, size_t arraySize) {
auto *wddm = this->getWddm();
auto *hwDeviceID = wddm->getHwDeviceId();
auto luid = hwDeviceID->getAdapterLuid();
luidData.reserve(arraySize);
for (size_t i = 0; i < arraySize; i++) {
char *luidArray = nullptr;
if (i < 4) {
luidArray = (char *)&luid.LowPart;
luidData.emplace(luidData.end(), luidArray[i]);
} else {
luidArray = (char *)&luid.HighPart;
luidData.emplace(luidData.end(), luidArray[i - 4]);
}
}
};
OsContextWin::~OsContextWin() {
if (contextInitialized && (false == this->wddm.skipResourceCleanup())) {
wddm.getWddmInterface()->destroyHwQueue(hardwareQueue.handle);