mercredi 21 mai 2014

Swizzle [eng]

I'd already talked about this in a previous article : the 3dfx video cards were produced for the gigantic PC market which is the one of Little Endian.

Yet, our 68k are Big Endian, which causes a necessary data conversion with three instructions : ror/swap/ror...

Of course, this essential instructions already take CPU time and also weighs 6 bytes for every conversion in Warp3D !

Looking more closely the 3dfx datasheet, there's a bit called Swizzle which allows to change the GPU internal registers in Big Endian :

And it works !!

Yes, after some changes, this bit works nicely and it's now possible to remove all the ror/swap/ror conversions from the W3D_AvengerLE.library and W3D_AvengerLEMU.library !

The GPU "becomes" in a way Big Endian, what suits us !

So I made a very nice optimization : 22,2 Kb of saved on the library ! Yes, you still have read it well, there was 22,2 Kb of ror/swap/ror inside, and they are all wiped out now !! Clear off !

A big THANK YOU to 3dfx engineers who have made a nice job !

You still have to be patient, I'll put the new versions in Downloads soon...

(translated by Squaley)

Aucun commentaire:

Enregistrer un commentaire

Laissez vos commentaires ici :