SWDEV-508970 - Match hipBindTextureToArray negative return with Cuda (#325)

这个提交包含在:
Brzak, Branislav 编写, GitHub 于 2025-05-21 20:57:09 +05:30 提交
1 父节点 78f3caba0b
当前提交 a46ed60e2e
1 个文件已更改
+4 -4
+4 -4
查看文件
@@ -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,