mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
Revert "image create check"
This reverts commit 333906e278.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3804b07fe8
commit
d8a66cd14d
@@ -352,12 +352,6 @@ ze_result_t DeviceImp::getCommandQueueGroupProperties(uint32_t *pCount,
|
|||||||
ze_result_t DeviceImp::createImage(const ze_image_desc_t *desc, ze_image_handle_t *phImage) {
|
ze_result_t DeviceImp::createImage(const ze_image_desc_t *desc, ze_image_handle_t *phImage) {
|
||||||
auto productFamily = neoDevice->getHardwareInfo().platform.eProductFamily;
|
auto productFamily = neoDevice->getHardwareInfo().platform.eProductFamily;
|
||||||
Image *pImage = nullptr;
|
Image *pImage = nullptr;
|
||||||
|
|
||||||
if (neoDevice->getDeviceInfo().imageSupport == false) {
|
|
||||||
*phImage = nullptr;
|
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto result = Image::create(productFamily, this, desc, &pImage);
|
auto result = Image::create(productFamily, this, desc, &pImage);
|
||||||
if (result == ZE_RESULT_SUCCESS) {
|
if (result == ZE_RESULT_SUCCESS) {
|
||||||
*phImage = pImage->toHandle();
|
*phImage = pImage->toHandle();
|
||||||
|
|||||||
@@ -3478,24 +3478,6 @@ TEST(zeDevice, givenNoImagesSupportedWhenGettingImagePropertiesThenZeroValuesAre
|
|||||||
EXPECT_EQ(0u, properties.maxWriteImageArgs);
|
EXPECT_EQ(0u, properties.maxWriteImageArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(zeDevice, givenNoImagesSupportedWhenCreatingImageErrorReturns) {
|
|
||||||
ze_result_t errorValue;
|
|
||||||
|
|
||||||
DriverHandleImp driverHandle{};
|
|
||||||
NEO::MockDevice *neoDevice = (NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
|
|
||||||
auto device = std::unique_ptr<L0::Device>(Device::create(&driverHandle, neoDevice, false, &errorValue));
|
|
||||||
|
|
||||||
ze_image_handle_t image = {};
|
|
||||||
ze_image_desc_t desc = {};
|
|
||||||
desc.stype = ZE_STRUCTURE_TYPE_IMAGE_DESC;
|
|
||||||
|
|
||||||
neoDevice->deviceInfo.imageSupport = false;
|
|
||||||
|
|
||||||
auto result = device->createImage(&desc, &image);
|
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, result);
|
|
||||||
EXPECT_EQ(nullptr, image);
|
|
||||||
}
|
|
||||||
|
|
||||||
class MockCacheReservation : public CacheReservation {
|
class MockCacheReservation : public CacheReservation {
|
||||||
public:
|
public:
|
||||||
~MockCacheReservation() override = default;
|
~MockCacheReservation() override = default;
|
||||||
|
|||||||
Reference in New Issue
Block a user