nv50: fix textures with block size != cpp
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 31 Oct 2009 19:46:59 +0000 (20:46 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 31 Oct 2009 19:51:09 +0000 (20:51 +0100)
commit1cc16e1b831cef8e1573cc998cee3e55179bb830
tree631c2ee863ea4d896eb35740e5323d33c81f2003
parent91232b7004d7a9fbf4f99bb9ec4e5eea8e1c6eef
nv50: fix textures with block size != cpp

First, using width * block size as pitch is evidently
wrong if a block contains more than 1 texel.

For tiled textures, since a block occupies a contiguous
area of memory, y addressing in m2mf has to be done by
block index, not the y coordinate itself.

This should fix compressed textures.
src/gallium/drivers/nv50/nv50_miptree.c
src/gallium/drivers/nv50/nv50_transfer.c