From a46ed60e2eaa89cb100171b6a13786d2fa51e2ae Mon Sep 17 00:00:00 2001 From: "Brzak, Branislav" Date: Wed, 21 May 2025 17:27:09 +0200 Subject: [PATCH] SWDEV-508970 - Match hipBindTextureToArray negative return with Cuda (#325) --- hipamd/src/hip_texture.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hipamd/src/hip_texture.cpp b/hipamd/src/hip_texture.cpp index f0d433d0f3..12600bdec6 100644 --- a/hipamd/src/hip_texture.cpp +++ b/hipamd/src/hip_texture.cpp @@ -85,13 +85,13 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject, // Validate input params if (pTexObject == nullptr || pResDesc == nullptr || pTexDesc == nullptr) { - return hipErrorInvalidValue; + return hipErrorInvalidChannelDescriptor; } // pResViewDesc can only be specified if the type of resource is a HIP array or a HIP mipmapped array. if ((pResViewDesc != nullptr) && ((pResDesc->resType != hipResourceTypeArray) && (pResDesc->resType != hipResourceTypeMipmappedArray))) { - return hipErrorInvalidValue; + return hipErrorInvalidChannelDescriptor; } // If hipResourceDesc::resType is set to hipResourceTypeArray, @@ -124,7 +124,7 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject, return hipErrorNotSupported; } if (pResDesc->res.mipmap.mipmap == nullptr || pTexDesc->normalizedCoords == 0) { - return hipErrorInvalidValue; + return hipErrorInvalidChannelDescriptor; } } @@ -135,7 +135,7 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject, ((pResDesc->res.linear.devPtr == nullptr) || (!amd::isMultipleOf(pResDesc->res.linear.devPtr, info.imageBaseAddressAlignment_)) || (pResDesc->res.linear.sizeInBytes >= info.imageMaxBufferSize_ * hip::getElementSize(pResDesc->res.linear.desc)))) { - return hipErrorInvalidValue; + return hipErrorInvalidChannelDescriptor; } // If hipResourceDesc::resType is set to hipResourceTypePitch2D,