mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
fix up heights for i830/i915 texture compression
This commit is contained in:
parent
78e19b5f98
commit
c058917343
2 changed files with 18 additions and 2 deletions
|
|
@ -157,7 +157,15 @@ static GLboolean i830SetTexImages( i830ContextPtr i830,
|
|||
|
||||
t->intel.image[0][i].offset = total_height * pitch;
|
||||
t->intel.image[0][i].internalFormat = baseImage->Format;
|
||||
total_height += MAX2(2, t->intel.image[0][i].image->Height);
|
||||
if (t->intel.image[0][i].image->IsCompressed)
|
||||
{
|
||||
if (t->intel.image[0][i].image->Height > 4)
|
||||
total_height += t->intel.image[0][i].image->Height/4;
|
||||
else
|
||||
total_height += 1;
|
||||
}
|
||||
else
|
||||
total_height += MAX2(2, t->intel.image[0][i].image->Height);
|
||||
}
|
||||
|
||||
t->intel.Pitch = pitch;
|
||||
|
|
|
|||
|
|
@ -238,7 +238,15 @@ static void i915SetTexImages( i915ContextPtr i915,
|
|||
|
||||
t->intel.image[0][i].offset = total_height * pitch;
|
||||
t->intel.image[0][i].internalFormat = baseImage->Format;
|
||||
total_height += MAX2(2, t->intel.image[0][i].image->Height);
|
||||
if (t->intel.image[0][i].image->IsCompressed)
|
||||
{
|
||||
if (t->intel.image[0][i].image->Height > 4)
|
||||
total_height += t->intel.image[0][i].image->Height/4;
|
||||
else
|
||||
total_height += 1;
|
||||
}
|
||||
else
|
||||
total_height += MAX2(2, t->intel.image[0][i].image->Height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue