@@ -851,6 +851,37 @@ TEST(Device_GetCaps, givenDeviceWithNullSourceLevelDebuggerWhenCapsAreInitialize
851
851
EXPECT_FALSE (caps.sourceLevelDebuggerActive );
852
852
}
853
853
854
+ TEST (Device_UseCaps, givenCapabilityTableWhenDeviceInitializeCapsThenVmeVersionsAreSetProperly) {
855
+ HardwareInfo hwInfo = *platformDevices[0 ];
856
+
857
+ cl_uint expectedVmeVersion = CL_ME_VERSION_ADVANCED_VER_2_INTEL;
858
+ cl_uint expectedVmeAvcVersion = CL_AVC_ME_VERSION_1_INTEL;
859
+
860
+ hwInfo.capabilityTable .supportsVme = 0 ;
861
+ hwInfo.capabilityTable .ftrSupportsVmeAvcTextureSampler = 0 ;
862
+ hwInfo.capabilityTable .ftrSupportsVmeAvcPreemption = 0 ;
863
+
864
+ std::unique_ptr<MockDevice> device (MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
865
+ device->initializeCaps ();
866
+
867
+ EXPECT_EQ (0u , device->getDeviceInfo ().vmeVersion );
868
+ EXPECT_EQ (0u , device->getDeviceInfo ().vmeAvcVersion );
869
+ EXPECT_EQ (hwInfo.capabilityTable .ftrSupportsVmeAvcPreemption , device->getDeviceInfo ().vmeAvcSupportsPreemption );
870
+ EXPECT_EQ (hwInfo.capabilityTable .ftrSupportsVmeAvcTextureSampler , device->getDeviceInfo ().vmeAvcSupportsTextureSampler );
871
+
872
+ hwInfo.capabilityTable .supportsVme = 1 ;
873
+ hwInfo.capabilityTable .ftrSupportsVmeAvcTextureSampler = 1 ;
874
+ hwInfo.capabilityTable .ftrSupportsVmeAvcPreemption = 1 ;
875
+
876
+ device.reset (MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
877
+ device->initializeCaps ();
878
+
879
+ EXPECT_EQ (expectedVmeVersion, device->getDeviceInfo ().vmeVersion );
880
+ EXPECT_EQ (expectedVmeAvcVersion, device->getDeviceInfo ().vmeAvcVersion );
881
+ EXPECT_EQ (hwInfo.capabilityTable .ftrSupportsVmeAvcPreemption , device->getDeviceInfo ().vmeAvcSupportsPreemption );
882
+ EXPECT_EQ (hwInfo.capabilityTable .ftrSupportsVmeAvcTextureSampler , device->getDeviceInfo ().vmeAvcSupportsTextureSampler );
883
+ }
884
+
854
885
typedef HwHelperTest DeviceCapsWithModifiedHwInfoTest;
855
886
856
887
TEST_F (DeviceCapsWithModifiedHwInfoTest, givenPlatformWithSourceLevelDebuggerNotSupportedWhenDeviceIsCreatedThenSourceLevelDebuggerActiveIsSetToFalse) {
0 commit comments