Add cl_device_uuid_khr to getDeviceInfo.

Related-To: NEO-5681

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
This commit is contained in:
Baj, Tomasz
2022-03-28 14:09:31 +00:00
committed by Compute-Runtime-Automation
parent d63a044e60
commit 4e4560fe91
4 changed files with 32 additions and 17 deletions

View File

@@ -86,6 +86,19 @@ TEST_F(DeviceTest, whenAllocateRTDispatchGlobalsIsCalledThenRTDispatchGlobalsIsA
EXPECT_NE(nullptr, pDevice->getRTDispatchGlobals(3));
}
TEST_F(DeviceTest, GivenDeviceWhenGenerateUuidThenValidValuesAreSet) {
std::array<uint8_t, HwInfoConfig::uuidSize> uuid, expectedUuid;
pDevice->generateUuid(uuid);
uint32_t rootDeviceIndex = pDevice->getRootDeviceIndex();
expectedUuid.fill(0);
memcpy_s(&expectedUuid[0], sizeof(uint32_t), &pDevice->getDeviceInfo().vendorId, sizeof(pDevice->getDeviceInfo().vendorId));
memcpy_s(&expectedUuid[4], sizeof(uint32_t), &pDevice->getHardwareInfo().platform.usDeviceID, sizeof(pDevice->getHardwareInfo().platform.usDeviceID));
memcpy_s(&expectedUuid[8], sizeof(uint32_t), &rootDeviceIndex, sizeof(rootDeviceIndex));
EXPECT_EQ(memcmp(&uuid, &expectedUuid, HwInfoConfig::uuidSize), 0);
}
using DeviceGetCapsTest = Test<DeviceFixture>;
TEST_F(DeviceGetCapsTest, givenMockCompilerInterfaceWhenInitializeCapsIsCalledThenMaxParameterSizeIsSetCorrectly) {