@@ -425,9 +425,11 @@ TEST(Device_GetCaps, givenEnablePackedYuvsetToTrueWhenCapsAreCreatedThenDeviceRe
425425 DebugManager.flags .EnablePackedYuv .set (false );
426426}
427427
428- TEST (Device_GetCaps, givenEnableVmeSetToTrueWhenCapsAreCreatedThenDeviceReportsVmeExtensionAndBuiltins ) {
428+ TEST (Device_GetCaps, givenEnableVmeSetToTrueAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceReportsVmeExtensionAndBuiltins ) {
429429 DebugManager.flags .EnableIntelVme .set (true );
430- auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0 ]));
430+ auto hwInfo = *platformDevices[0 ];
431+ hwInfo.capabilityTable .supportsVme = true ;
432+ auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
431433 const auto &caps = device->getDeviceInfo ();
432434
433435 EXPECT_THAT (caps.deviceExtensions , testing::HasSubstr (std::string (" cl_intel_motion_estimation" )));
@@ -438,9 +440,41 @@ TEST(Device_GetCaps, givenEnableVmeSetToTrueWhenCapsAreCreatedThenDeviceReportsV
438440 DebugManager.flags .EnableIntelVme .set (false );
439441}
440442
441- TEST (Device_GetCaps, givenEnableVmeSetToFalseWhenCapsAreCreatedThenDeviceDoesNotReportsVmeExtensionAndBuiltins) {
443+ TEST (Device_GetCaps, givenEnableVmeSetToTrueAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportVmeExtensionAndBuiltins) {
444+ DebugManager.flags .EnableIntelVme .set (true );
445+ auto hwInfo = *platformDevices[0 ];
446+ hwInfo.capabilityTable .supportsVme = false ;
447+ auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
448+ const auto &caps = device->getDeviceInfo ();
449+
450+ EXPECT_THAT (caps.deviceExtensions , testing::Not (testing::HasSubstr (std::string (" cl_intel_motion_estimation" ))));
451+ EXPECT_FALSE (caps.vmeExtension );
452+
453+ EXPECT_THAT (caps.builtInKernels , testing::Not (testing::HasSubstr (" block_motion_estimate_intel" )));
454+
442455 DebugManager.flags .EnableIntelVme .set (false );
443- auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0 ]));
456+ }
457+
458+ TEST (Device_GetCaps, givenEnableVmeSetToFalseAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportVmeExtensionAndBuiltins) {
459+ DebugManager.flags .EnableIntelVme .set (false );
460+ auto hwInfo = *platformDevices[0 ];
461+ hwInfo.capabilityTable .supportsVme = false ;
462+ auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
463+ const auto &caps = device->getDeviceInfo ();
464+
465+ EXPECT_THAT (caps.deviceExtensions , testing::Not (testing::HasSubstr (std::string (" cl_intel_motion_estimation" ))));
466+ EXPECT_FALSE (caps.vmeExtension );
467+
468+ EXPECT_THAT (caps.builtInKernels , testing::Not (testing::HasSubstr (" block_motion_estimate_intel" )));
469+
470+ DebugManager.flags .EnableIntelVme .set (false );
471+ }
472+
473+ TEST (Device_GetCaps, givenEnableVmeSetToFalseAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceDoesNotReportVmeExtensionAndBuiltins) {
474+ DebugManager.flags .EnableIntelVme .set (false );
475+ auto hwInfo = *platformDevices[0 ];
476+ hwInfo.capabilityTable .supportsVme = true ;
477+ auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
444478 const auto &caps = device->getDeviceInfo ();
445479
446480 EXPECT_THAT (caps.deviceExtensions , testing::Not (testing::HasSubstr (std::string (" cl_intel_motion_estimation" ))));
@@ -451,9 +485,11 @@ TEST(Device_GetCaps, givenEnableVmeSetToFalseWhenCapsAreCreatedThenDeviceDoesNot
451485 DebugManager.flags .EnableIntelVme .set (false );
452486}
453487
454- TEST (Device_GetCaps, givenEnableAdvancedVmeSetToTrueWhenCapsAreCreatedThenDeviceReportsAdvancedVmeExtensionAndBuiltins ) {
488+ TEST (Device_GetCaps, givenEnableAdvancedVmeSetToTrueAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceReportsAdvancedVmeExtensionAndBuiltins ) {
455489 DebugManager.flags .EnableIntelAdvancedVme .set (true );
456- auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0 ]));
490+ auto hwInfo = *platformDevices[0 ];
491+ hwInfo.capabilityTable .supportsVme = true ;
492+ auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
457493 const auto &caps = device->getDeviceInfo ();
458494
459495 EXPECT_THAT (caps.deviceExtensions , testing::HasSubstr (std::string (" cl_intel_advanced_motion_estimation" )));
@@ -464,9 +500,41 @@ TEST(Device_GetCaps, givenEnableAdvancedVmeSetToTrueWhenCapsAreCreatedThenDevice
464500 DebugManager.flags .EnableIntelAdvancedVme .set (false );
465501}
466502
467- TEST (Device_GetCaps, givenEnableAdvancedVmeSetToFalseWhenCapsAreCreatedThenDeviceDoesNotReportsAdvancedVmeExtensionAndBuiltins) {
503+ TEST (Device_GetCaps, givenEnableAdvancedVmeSetToTrueAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
504+ DebugManager.flags .EnableIntelAdvancedVme .set (true );
505+ auto hwInfo = *platformDevices[0 ];
506+ hwInfo.capabilityTable .supportsVme = false ;
507+ auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
508+ const auto &caps = device->getDeviceInfo ();
509+
510+ EXPECT_THAT (caps.deviceExtensions , testing::Not (testing::HasSubstr (std::string (" cl_intel_advanced_motion_estimation" ))));
511+
512+ EXPECT_THAT (caps.builtInKernels , testing::Not (testing::HasSubstr (" block_advanced_motion_estimate_check_intel" )));
513+ EXPECT_THAT (caps.builtInKernels , testing::Not (testing::HasSubstr (" block_advanced_motion_estimate_bidirectional_check_intel" )));
514+
468515 DebugManager.flags .EnableIntelAdvancedVme .set (false );
469- auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0 ]));
516+ }
517+
518+ TEST (Device_GetCaps, givenEnableAdvancedVmeSetToFalseAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
519+ DebugManager.flags .EnableIntelAdvancedVme .set (false );
520+ auto hwInfo = *platformDevices[0 ];
521+ hwInfo.capabilityTable .supportsVme = false ;
522+ auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
523+ const auto &caps = device->getDeviceInfo ();
524+
525+ EXPECT_THAT (caps.deviceExtensions , testing::Not (testing::HasSubstr (std::string (" cl_intel_advanced_motion_estimation" ))));
526+
527+ EXPECT_THAT (caps.builtInKernels , testing::Not (testing::HasSubstr (" block_advanced_motion_estimate_check_intel" )));
528+ EXPECT_THAT (caps.builtInKernels , testing::Not (testing::HasSubstr (" block_advanced_motion_estimate_bidirectional_check_intel" )));
529+
530+ DebugManager.flags .EnableIntelAdvancedVme .set (false );
531+ }
532+
533+ TEST (Device_GetCaps, givenEnableAdvancedVmeSetToFalseAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
534+ DebugManager.flags .EnableIntelAdvancedVme .set (false );
535+ auto hwInfo = *platformDevices[0 ];
536+ hwInfo.capabilityTable .supportsVme = true ;
537+ auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
470538 const auto &caps = device->getDeviceInfo ();
471539
472540 EXPECT_THAT (caps.deviceExtensions , testing::Not (testing::HasSubstr (std::string (" cl_intel_advanced_motion_estimation" ))));
0 commit comments