mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Correct media_block_io extension reporting
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
9ddf47b8b4
commit
3dbe37c423
@ -146,7 +146,7 @@ void ClDevice::initializeCaps() {
|
||||
if (supportsVme) {
|
||||
deviceExtensions += "cl_intel_spirv_device_side_avc_motion_estimation ";
|
||||
}
|
||||
if (hwInfo.capabilityTable.supportsImages) {
|
||||
if (hwHelper.isMediaBlockIOSupported(hwInfo)) {
|
||||
deviceExtensions += "cl_intel_spirv_media_block_io ";
|
||||
}
|
||||
deviceExtensions += "cl_intel_spirv_subgroups ";
|
||||
|
@ -569,21 +569,27 @@ TEST_F(DeviceGetCapsTest, givenOpenCLVersion21WhenCapsAreCreatedThenDeviceReport
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
const HardwareInfo *hwInfo = defaultHwInfo.get();
|
||||
auto &hwHelper = HwHelper::get(hwInfo->platform.eRenderCoreFamily);
|
||||
{
|
||||
if (hwInfo->capabilityTable.supportsVme) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation"))));
|
||||
}
|
||||
if (hwInfo->capabilityTable.supportsImages) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_3d_image_writes")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(std::string("cl_khr_3d_image_writes")));
|
||||
}
|
||||
if (hwHelper.isMediaBlockIOSupported(*hwInfo)) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_media_block_io")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_spirv_media_block_io"))));
|
||||
}
|
||||
|
||||
if (hwInfo->capabilityTable.supportsVme) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_spirv_device_side_avc_motion_estimation"))));
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_subgroups")));
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_spirv_no_integer_wrap_decoration")));
|
||||
}
|
||||
if (hwInfo->capabilityTable.supportsImages) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_media_block_io")));
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_3d_image_writes")));
|
||||
} else {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(testing::HasSubstr(std::string("cl_intel_spirv_media_block_io"))));
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::Not(std::string("cl_khr_3d_image_writes")));
|
||||
}
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_subgroups")));
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_spirv_no_integer_wrap_decoration")));
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsClIntelSpirvMediaBlockIoExtensions) {
|
||||
@ -593,7 +599,11 @@ TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsC
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_media_block_io")));
|
||||
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
if (hwHelper.isMediaBlockIOSupported(hwInfo)) {
|
||||
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_spirv_media_block_io")));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenNotSupportImagesWhenCapsAreCreatedThenDeviceNotReportsClIntelSpirvMediaBlockIoExtensions) {
|
||||
@ -985,9 +995,11 @@ TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCreateExtentionsListThenDeviceRe
|
||||
EXPECT_THAT(extensions, testing::HasSubstr(std::string("cl_khr_image2d_from_buffer")));
|
||||
EXPECT_THAT(extensions, testing::HasSubstr(std::string("cl_khr_depth_images")));
|
||||
|
||||
auto &hwHelper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
|
||||
if (hwHelper.isMediaBlockIOSupported(*defaultHwInfo)) {
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
if (hwHelper.isMediaBlockIOSupported(hwInfo)) {
|
||||
EXPECT_THAT(extensions, testing::HasSubstr(std::string("cl_intel_media_block_io")));
|
||||
} else {
|
||||
EXPECT_THAT(extensions, testing::Not(testing::HasSubstr(std::string("cl_intel_media_block_io"))));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user