diff options
| author | Jason Sams <rjsams@android.com> | 2010-01-07 16:25:08 -0800 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-01-07 16:26:42 -0800 |
| commit | 917cd4fcda61c63429d73639284f34bb85c97f37 (patch) | |
| tree | d0daed9ee16db49a43e5d5b3de7fc7d7b02af5ae /libs/rs | |
| parent | 6286953eced16648d18e1efc57c3b089c49b5608 (diff) | |
| download | frameworks_base-917cd4fcda61c63429d73639284f34bb85c97f37.zip frameworks_base-917cd4fcda61c63429d73639284f34bb85c97f37.tar.gz frameworks_base-917cd4fcda61c63429d73639284f34bb85c97f37.tar.bz2 | |
Fix npot but where mipmap level sizes were rounding in the wrong direction. Should always be floor.
Diffstat (limited to 'libs/rs')
| -rw-r--r-- | libs/rs/rsType.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/rs/rsType.cpp b/libs/rs/rsType.cpp index d3b53d6..ddadd9f 100644 --- a/libs/rs/rsType.cpp +++ b/libs/rs/rsType.cpp @@ -92,9 +92,9 @@ void Type::compute() mLODs[lod].mZ = tz; mLODs[lod].mOffset = offset; offset += tx * rsMax(ty, 1u) * rsMax(tz, 1u) * mElement->getSizeBytes(); - tx = (tx + 1) >> 1; - ty = (ty + 1) >> 1; - tz = (tz + 1) >> 1; + if (tx > 1) tx >>= 1; + if (ty > 1) ty >>= 1; + if (tz > 1) tz >>= 1; } // At this point the offset is the size of a mipmap chain; |
