SWDEV-345020 - The bit channel description should not allow any channels after a zero channel

Change-Id: I66e6d25c032d22f9616dc59730f1f094d30c01cf


[ROCm/clr commit: 5b4e0321d4]
This commit is contained in:
Jaydeep Patel
2022-07-11 11:41:58 +00:00
committed by Maneesh Gupta
parent 57473658dd
commit a1a75f02f0
@@ -313,6 +313,14 @@ bool CheckArrayFormat(const hipChannelFormatDesc& desc) {
return false;
}
}
// The bit channel description should not allow any channels after a zero channel
if (desc.y == 0) {
return !(desc.z > 0 || desc.w > 0);
}
else if (desc.z == 0) {
return !(desc.w > 0);
}
return true;
}