@@ -544,14 +544,28 @@ TEST(Device_GetCaps, deviceReportsThrottleHintsExtension) {
544
544
EXPECT_THAT (caps.deviceExtensions , testing::HasSubstr (std::string (" cl_khr_throttle_hints" )));
545
545
}
546
546
547
- TEST (Device_GetCaps, deviceReportsMipmapImageExtensions) {
547
+ TEST (Device_GetCaps, givenAtleastOCL2DeviceThenExposesMipmapImageExtensions) {
548
+ DebugManagerStateRestore dbgRestorer;
549
+ DebugManager.flags .ForceOCLVersion .set (20 );
550
+
548
551
auto device = std::unique_ptr<Device>(DeviceHelper<>::create (platformDevices[0 ]));
549
552
const auto &caps = device->getDeviceInfo ();
550
553
551
554
EXPECT_THAT (caps.deviceExtensions , testing::HasSubstr (std::string (" cl_khr_mipmap_image" )));
552
555
EXPECT_THAT (caps.deviceExtensions , testing::HasSubstr (std::string (" cl_khr_mipmap_image_writes" )));
553
556
}
554
557
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
+
555
569
TEST (Device_GetCaps, givenDeviceThatDoesntHaveFp64ThenExtensionIsNotReported) {
556
570
HardwareInfo nonFp64Device = *platformDevices[0 ];
557
571
nonFp64Device.capabilityTable .ftrSupportsFP64 = false ;
0 commit comments