SWDEV-475482 - [6.4 Preview] Match hipTexObjectCreate with cuda (#408)

Co-authored-by: Rahul Manocha <rmanocha@amd.com>
Αυτή η υποβολή περιλαμβάνεται σε:
Manocha, Rahul
2025-05-28 00:51:45 -07:00
υποβλήθηκε από GitHub
γονέας 988c42a6e1
υποβολή b5e9bc55cb
2 αρχεία άλλαξαν με 1 προσθήκες και 9 διαγραφές
@@ -1093,7 +1093,7 @@ amd::Image* ihipImageCreate(const cl_channel_order channelOrder,
imageType,
CL_MEM_READ_WRITE,
imageFormat,
imageWidth,
(imageWidth == 0) ? 1 : imageWidth,
(imageHeight == 0) ? 1 : imageHeight,
(imageDepth == 0) ? 1 : imageDepth,
imageRowPitch,
@@ -685,10 +685,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;
@@ -724,10 +720,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;