mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-29 10:40:42 +02:00
swr: [rasterizer memory] minify texture width before alignment
The minification should happen before alignment, not after. See similar logic on ComputeLODOffsetY. The current logic requires unnecessarily large textures when there's an initial NPOT size. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
This commit is contained in:
parent
c5a654786b
commit
ee0b6597a9
1 changed files with 2 additions and 2 deletions
|
|
@ -284,8 +284,8 @@ INLINE void ComputeLODOffset1D(
|
|||
offset = GFX_ALIGN(curWidth, hAlign);
|
||||
for (uint32_t l = 1; l < lod; ++l)
|
||||
{
|
||||
curWidth = GFX_ALIGN(std::max<uint32_t>(curWidth >> 1, 1U), hAlign);
|
||||
offset += curWidth;
|
||||
curWidth = std::max<uint32_t>(curWidth >> 1, 1U);
|
||||
offset += GFX_ALIGN(curWidth, hAlign);
|
||||
}
|
||||
|
||||
if (info.isSubsampled || info.isBC)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue