mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add check for vme support
Change-Id: Ic51e87e1e049bce4ce8ce111e35b94d3806db21b Signed-off-by: Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
@ -851,6 +851,37 @@ TEST(Device_GetCaps, givenDeviceWithNullSourceLevelDebuggerWhenCapsAreInitialize
|
||||
EXPECT_FALSE(caps.sourceLevelDebuggerActive);
|
||||
}
|
||||
|
||||
TEST(Device_UseCaps, givenCapabilityTableWhenDeviceInitializeCapsThenVmeVersionsAreSetProperly) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
|
||||
cl_uint expectedVmeVersion = CL_ME_VERSION_ADVANCED_VER_2_INTEL;
|
||||
cl_uint expectedVmeAvcVersion = CL_AVC_ME_VERSION_1_INTEL;
|
||||
|
||||
hwInfo.capabilityTable.supportsVme = 0;
|
||||
hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler = 0;
|
||||
hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption = 0;
|
||||
|
||||
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
device->initializeCaps();
|
||||
|
||||
EXPECT_EQ(0u, device->getDeviceInfo().vmeVersion);
|
||||
EXPECT_EQ(0u, device->getDeviceInfo().vmeAvcVersion);
|
||||
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption, device->getDeviceInfo().vmeAvcSupportsPreemption);
|
||||
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler, device->getDeviceInfo().vmeAvcSupportsTextureSampler);
|
||||
|
||||
hwInfo.capabilityTable.supportsVme = 1;
|
||||
hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler = 1;
|
||||
hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption = 1;
|
||||
|
||||
device.reset(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
device->initializeCaps();
|
||||
|
||||
EXPECT_EQ(expectedVmeVersion, device->getDeviceInfo().vmeVersion);
|
||||
EXPECT_EQ(expectedVmeAvcVersion, device->getDeviceInfo().vmeAvcVersion);
|
||||
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption, device->getDeviceInfo().vmeAvcSupportsPreemption);
|
||||
EXPECT_EQ(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler, device->getDeviceInfo().vmeAvcSupportsTextureSampler);
|
||||
}
|
||||
|
||||
typedef HwHelperTest DeviceCapsWithModifiedHwInfoTest;
|
||||
|
||||
TEST_F(DeviceCapsWithModifiedHwInfoTest, givenPlatformWithSourceLevelDebuggerNotSupportedWhenDeviceIsCreatedThenSourceLevelDebuggerActiveIsSetToFalse) {
|
||||
|
Reference in New Issue
Block a user