mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Move device UUID from L0 to shared
Related-To: NEO-5681 Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5118a5d3a6
commit
1f7fd45251
@@ -704,4 +704,13 @@ bool Device::generateUuidFromPciBusInfo(const PhysicalDevicePciBusInfo &pciBusIn
|
||||
return false;
|
||||
}
|
||||
|
||||
void Device::generateUuid(std::array<uint8_t, HwInfoConfig::uuidSize> &uuid) {
|
||||
const auto &deviceInfo = getDeviceInfo();
|
||||
const auto &hardwareInfo = getHardwareInfo();
|
||||
uint32_t rootDeviceIndex = getRootDeviceIndex();
|
||||
uuid.fill(0);
|
||||
memcpy_s(&uuid[0], sizeof(uint32_t), &deviceInfo.vendorId, sizeof(deviceInfo.vendorId));
|
||||
memcpy_s(&uuid[4], sizeof(uint32_t), &hardwareInfo.platform.usDeviceID, sizeof(hardwareInfo.platform.usDeviceID));
|
||||
memcpy_s(&uuid[8], sizeof(uint32_t), &rootDeviceIndex, sizeof(rootDeviceIndex));
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -134,6 +134,7 @@ class Device : public ReferenceTrackedObject<Device> {
|
||||
uint64_t getGlobalMemorySize(uint32_t deviceBitfield) const;
|
||||
const std::vector<SubDevice *> getSubDevices() const { return subdevices; }
|
||||
bool getUuid(std::array<uint8_t, HwInfoConfig::uuidSize> &uuid);
|
||||
void generateUuid(std::array<uint8_t, HwInfoConfig::uuidSize> &uuid);
|
||||
|
||||
protected:
|
||||
Device() = delete;
|
||||
|
||||
Reference in New Issue
Block a user