SWDEV-508966 - hipGetTextureAlignmentOffset return hipErrorInvalidTexture (#389)

This commit is contained in:
Belton-Schure, Aidan authored and GitHub committed 2025-05-22 23:19:45 +05:30
1 parent 51dd60a64f
commit 7aae33951b
1 file changed
+5 -1
+5 -1
View File
@@ -785,7 +785,11 @@ hipError_t hipGetTextureAlignmentOffset(size_t* offset,
const textureReference* texref) {
HIP_INIT_API(hipGetTextureAlignmentOffset, offset, texref);
if ((offset == nullptr) || (texref == nullptr)) {
if (texref == nullptr) {
HIP_RETURN(hipErrorInvalidTexture);
}
if (offset == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
amd::Device* device = hip::getCurrentDevice()->devices()[0];