Revert "SWDEV-475482 - hipTexObjectCreate align with cuda"

This reverts commit efce2f77c4.

Reason for revert: Even though this change is valid, this would break backward compatibility.

Change-Id: I9c7cab83198c8d5c8485b11194099162e3e7a874
Этот коммит содержится в:
Maneesh Gupta
2024-11-21 00:55:24 -05:00
родитель 9473f143c2
Коммит ec6f83b544
2 изменённых файлов: 9 добавлений и 1 удалений
+1 -1
Просмотреть файл
@@ -1063,7 +1063,7 @@ amd::Image* ihipImageCreate(const cl_channel_order channelOrder,
imageType,
CL_MEM_READ_WRITE,
imageFormat,
(imageWidth == 0) ? 1 : imageWidth,
imageWidth,
(imageHeight == 0) ? 1 : imageHeight,
(imageDepth == 0) ? 1 : imageDepth,
imageRowPitch,
+8
Просмотреть файл
@@ -675,6 +675,10 @@ bool Image::validateDimensions(const std::vector<amd::Device*>& devices, cl_mem_
}
// Fall through...
case CL_MEM_OBJECT_IMAGE2D:
if ((width == 0) || (height == 0)) {
DevLogPrintfError("Invalid dimensions width: %u height: %u \n", width, height);
return false;
}
for (const auto dev : devices) {
if ((dev->info().image2DMaxHeight_ >= height) && (dev->info().image2DMaxWidth_ >= width)) {
return true;
@@ -710,6 +714,10 @@ bool Image::validateDimensions(const std::vector<amd::Device*>& devices, cl_mem_
}
break;
case CL_MEM_OBJECT_IMAGE1D_BUFFER:
if (width == 0) {
DevLogError("Invalid dimension \n");
return false;
}
for (const auto& dev : devices) {
if (dev->info().imageMaxBufferSize_ >= width) {
return true;