Fixing unset bytes in device properties

Change-Id: I2c5cb68e013b26c43c9f1bad45507e4a03e939f4
Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
Brandon Yates
2020-04-06 16:34:35 -04:00
committed by sys_ocldev
parent 232fd2befa
commit 86c8b87c8b
2 changed files with 53 additions and 0 deletions

View File

@@ -310,6 +310,7 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
uint32_t rootDeviceIndex = this->neoDevice->getRootDeviceIndex();
memset(pDeviceProperties->uuid.id, 0, ZE_MAX_DEVICE_UUID_SIZE);
memcpy_s(pDeviceProperties->uuid.id, sizeof(uint32_t), &pDeviceProperties->vendorId, sizeof(pDeviceProperties->vendorId));
memcpy_s(pDeviceProperties->uuid.id + sizeof(uint32_t), sizeof(uint32_t), &pDeviceProperties->deviceId, sizeof(pDeviceProperties->deviceId));
memcpy_s(pDeviceProperties->uuid.id + (2 * sizeof(uint32_t)), sizeof(uint32_t), &rootDeviceIndex, sizeof(rootDeviceIndex));
@@ -346,6 +347,7 @@ ze_result_t DeviceImp::getProperties(ze_device_properties_t *pDeviceProperties)
pDeviceProperties->timerResolution = this->neoDevice->getDeviceInfo().outProfilingTimerResolution;
memset(pDeviceProperties->name, 0, ZE_MAX_DEVICE_NAME);
std::string name = "Intel(R) ";
name += NEO::familyName[hardwareInfo.platform.eRenderCoreFamily];
name += '\0';