mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
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:
committed by
Compute-Runtime-Automation
parent
35aff13178
commit
8124bff387
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user