From: Felix <fx...@gm...> - 2004-05-15 12:24:28
|
Hi Mark, Your description of the problems sounds like the tiling code does the right thing. However, in the driver there were originally some constants for 4bit per pixel texture formats. I thought they were for compressed texture formats. For example one of the texture formats is named TFT_S3TC4Bit. There are now some guessed numbers in the tileInfo_*[0] for 4bit texture formats. They are completely untested as the driver didn't support any such texture formats so far. Have you tried playing with these? Felix On Fri, 14 May 2004 18:30:24 -0700 "Mark Cass" <mr...@ad...> wrote: > guys, >=20 > as i have mentioned before i am working on adding s3tc texture compressio= n support to the savage driver. i have added code to the savage driver base= d upon the radeon driver (and patches). the code i have added only supports= uploading pre-compressed textures. as also previously mentioned, i have te= sted the code and texture on a different computer that uses nvidia's driver= and everything works. >=20 > as it stands now, i have the compressed texture showing up but it does no= t look right. the colors are all messed up. the proportions and layout of t= he texture are correct. >=20 > i set the size of the texture from the compressedSize variable in the tex= ture struct. i set the width and height from the formulas in the radeon dri= ver. width =3D (ImageWidthUncompressed / 4) x 16. height =3D ImageHeightUnc= ompressed / 4. the "16" in the width formula is used for DXT3 and DXT5, "8"= is used for DXT1. this width and height are used as input to the tile uplo= ad code, as well as inputs to the texture registers (width & height in powe= r of 2).=20 >=20 > i have tried using all possible internal formats for s3tc, as enumerated = in savage_bci.h, but none make the picture look any better. in fact, most m= ake it look worse so i think i have these right. >=20 > i have also tried using a diffeerent bytes per texel which affects how th= e tiles are uploaded. currently i am using 1 byte per texel. >=20 > it seems that the right amount of data is getting uploaded. i have played= with the formulas (i.e. width and height just divided by 4 instead of the = current disproportional values) and the texture appears distorted in propor= tion and composition. >=20 > does anyone have an idea? > mark | Felix K=FChling <fx...@gm...> http://fxk.de.vu | | PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 | |