projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c867a2b
)
amdgpu/addrlib: support non-power2 height alignment (for linear surface)
author
Roy Zhan
<roy.zhan@amd.com>
Sun, 10 Jan 2016 12:56:11 +0000
(07:56 -0500)
committer
Marek Olšák
<marek.olsak@amd.com>
Thu, 30 Mar 2017 12:44:33 +0000
(14:44 +0200)
src/amd/addrlib/core/addrlib1.cpp
patch
|
blob
|
history
diff --git
a/src/amd/addrlib/core/addrlib1.cpp
b/src/amd/addrlib/core/addrlib1.cpp
index 040891c431c07a8bb8ac2aa522b47a2eaf89e665..34e286e4dd3ff5c588e5bed9678fbe660f763abd 100644
(file)
--- 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)