Sunday, February 12, 2006

 

Mesa 3.2.1 and accelerated 3D on nVidia (again)

While working on updating the nVidia 2D driver for a new BeBits release, I decided to clean-up for 3D support. I tested a lot of register configuration settings with help of two cards in a system: I could never test as speedy as these days (nolonger reboots required).

Some 'nonsense' 3D setup where removed, and I could also find one point where more speed could be gained for 3D: I modified the rendering output colorspace from some 'special' type with different input/output spaces, to 'standard' ARGB32. This apparantly means less drawing overhead, which lead to a 11% rendering speedup in B_RGB32 space on my P4-2.8Ghz using the NV18 card. On my dualP3-500 with NV11 a 7% speedup was still gained. 15 and 16 bit spaces are unmodified speed-wise.

While I was very nearby the 3D subject again, I wandered off more into the 3D accelerant and Mesa3.2.1. I ended up trying to setup a real swapbuffer command (instead of using blitting), which could give us another 5% speedgain for all spaces in fullscreen modes. It still doesn't work correctly (I am thinking another Mesa bug..), but it gave me an interesting view on the rendering behind-the-scenes (seeing a scene being constructed in the backbuffer).

It became apparant to me, that although we have several drawing errors with Quake2 (missing texts, missing parts of text, missing bitmaps, intermittant missing crosshair and scores), these items were drawn none the less! As it turns out, the normally visible rendered buffer (with the just mentioned errors) is rendered in the background, then swapped on-screen, and then the missing pieces are rendered in the now obsolete background! Of course they are never shown, as after this final rendering part, the erase buffers command comes up...

So, I tried a delayed swap, and YES!! Q2 renders without any drawing fault (32bit mode atm)!

This sudden success means I'll put some more time in the alpha3.5 3D add-on, and see what I can do to modify it for general improvement here: I am hoping I can get this incorporated so that it's still useable with other 3D apps as well. I will update the BeBits entry to be Alpha4 after I release the 'current' 2D driver, hopefully with both the 'perfect draw' and the fullscreen swap function in place: all in all for instance 1024x768x32 mode in Q2 would go up from 22 to 28fps then, and without drawing errors anymore.

Well, 'back to work'. Talk to you later!

Comments:
Gaaf, ik zou willen dat ik jouw 'skills' had.

Maar Q2, zucht, het wordt tijd voor wat nieuwe 3D- spellen en apllicaties.

Ik heb een paar jaar terug op de IBC in de RAI in A'dam een 3D filmcamera gezien, dat was nog eens wat. Er waren alleen problemen met Z-buffer diepte die erg (te) grof was.
 
Man ... you definitly rock out the scene !!
 
Nutela:

Q2 met mods schijnt mooi te zijn.. We hebben MrX op BeOS: hij is een echte hardcore gamer lijkt me.

Hij weet erg veel van o.a. Q2 en wat je daar allemaal me uit kunt spoken om het onder andere 'meer van deze tijd' te maken.

Maar ik zou het ook gaaf vinden als meer recent spul op BeOS zou draaien. Q3 opensource op BGLview zou een leuke start zijn ;-)

---

thanks for the compliments guys!!
 
Er zijn grappgie (OS-)spellen op http://graphics.stanford.edu.nyud.net:8090/courses/cs248-videogame-competition/cs248-05/ voor Linux en/of windows die wel geport zouden kunnen worden.
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?