@@ -544,14 +544,28 @@ TEST(Device_GetCaps, deviceReportsThrottleHintsExtension) {
544544 EXPECT_THAT (caps.deviceExtensions , testing::HasSubstr (std::string (" cl_khr_throttle_hints" )));
545545}
546546
547- TEST (Device_GetCaps, deviceReportsMipmapImageExtensions) {
547+ TEST (Device_GetCaps, givenAtleastOCL2DeviceThenExposesMipmapImageExtensions) {
548+ DebugManagerStateRestore dbgRestorer;
549+ DebugManager.flags .ForceOCLVersion .set (20 );
550+
548551 auto device = std::unique_ptr<Device>(DeviceHelper<>::create (platformDevices[0 ]));
549552 const auto &caps = device->getDeviceInfo ();
550553
551554 EXPECT_THAT (caps.deviceExtensions , testing::HasSubstr (std::string (" cl_khr_mipmap_image" )));
552555 EXPECT_THAT (caps.deviceExtensions , testing::HasSubstr (std::string (" cl_khr_mipmap_image_writes" )));
553556}
554557
558+ TEST (Device_GetCaps, givenOCL12DeviceThenDoesNotExposeMipmapImageExtensions) {
559+ DebugManagerStateRestore dbgRestorer;
560+ DebugManager.flags .ForceOCLVersion .set (12 );
561+
562+ auto device = std::unique_ptr<Device>(DeviceHelper<>::create (platformDevices[0 ]));
563+ const auto &caps = device->getDeviceInfo ();
564+
565+ EXPECT_THAT (caps.deviceExtensions , testing::Not (testing::HasSubstr (std::string (" cl_khr_mipmap_image" ))));
566+ EXPECT_THAT (caps.deviceExtensions , testing::Not (testing::HasSubstr (std::string (" cl_khr_mipmap_image_writes" ))));
567+ }
568+
555569TEST (Device_GetCaps, givenDeviceThatDoesntHaveFp64ThenExtensionIsNotReported) {
556570 HardwareInfo nonFp64Device = *platformDevices[0 ];
557571 nonFp64Device.capabilityTable .ftrSupportsFP64 = false ;
0 commit comments