SWDEV-475482 - hipTexObjectCreate align with cuda

Support zero width and height for hipTextObjectCreate to align
with cuda.

Change-Id: I5d4c48625faf5f060ed2a7e634ec65e4ecac9da5
Этот коммит содержится в:
Rahul Manocha
2024-07-29 12:33:13 -07:00
коммит произвёл Rahul Manocha
родитель a2d8199402
Коммит efce2f77c4
2 изменённых файлов: 1 добавлений и 9 удалений
-8
Просмотреть файл
@@ -675,10 +675,6 @@ 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;
@@ -714,10 +710,6 @@ 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;