summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/amd/addrlib/core/addrlib1.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/amd/addrlib/core/addrlib1.cpp b/src/amd/addrlib/core/addrlib1.cpp
index 040891c431c..34e286e4dd3 100644
--- a/src/amd/addrlib/core/addrlib1.cpp
+++ b/src/amd/addrlib/core/addrlib1.cpp
@@ -3278,7 +3278,16 @@ VOID Lib::PadDimensions(
if (padDims > 1)
{
- *pHeight = PowTwoAlign((*pHeight), heightAlign);
+ if (IsPow2(heightAlign))
+ {
+ *pHeight = PowTwoAlign((*pHeight), heightAlign);
+ }
+ else
+ {
+ *pHeight += heightAlign - 1;
+ *pHeight /= heightAlign;
+ *pHeight *= heightAlign;
+ }
}
if (padDims > 2 || thickness > 1)