i965: Fix byte vs. pixel unit mixup for aligned texture pitch.

I sincerely hope I don't manage to mess this up yet again...

Thanks again to Todd Merrill for pointing out the problem and testing the fix
on IRC.
This commit is contained in:
Michel Dänzer 2008-01-14 16:30:58 +01:00
parent 45cdb6eb45
commit 48ae5cf09d

View file

@ -128,7 +128,7 @@ int intel_miptree_pitch_align (struct intel_context *intel,
int pitch)
{
if (!mt->compressed)
pitch = (pitch * mt->cpp + 3) & ~3;
pitch = ((pitch * mt->cpp + 3) & ~3) / mt->cpp;
return pitch;
}