Nouveau Companion 27

Written by KoalaBR in Display Drivers on 26 September 2007 at 05:06 PM EDT. Page 2 of 4. 2 Comments.

Meanwhile pmdata and matc fought a hard battle against the Denial of Service that is glxgears on NV1x cards. During the last few issues quite a few problems were fixed (like invalid FIFO size, incorrect handling of PGRAPH interrupts) which slowly but steadily got glxgears "working" better. But still no output.

Trying some of NEHE's OpenGL lessons, pmdata noticed that the modelview and projection matrices were not handled correctly. p0g tried his luck on rendering a simple triangle. Therefore he used nv10_demo, checked a renouveau dump of his card and added all init data from the dump to the program. That caused some invalid state interrupts, so everything that caused an invalid state was in turn thrown out again.

Finally a triangle was rendered but only in very special circumstances (like certain window positions) and still the color was wrong. p0g investigated further and found that VIEWPORT_SCALE_[XYZ] values were not correctly calculated. He committed his changes to the demo where pmdata took up the ball again, trying his luck. After some minor corrections (resolution was fixed at 1280x1024), he finally found the error in his code: The color mask was set as a float while it should be an integer value. Again it was p0g who found yet another error: The sequence in which color and positional data was sent to the card was wrong.

So after much work, pmdata finally got this:

At this point, all that was missing was a proper depth buffer setup. A small hack for Mesa by p0g resulted in:

This led pmdata to the final bug: The state buffer init for the depth buffer was incorrectly setup, after that was fixed, pmdata saw working glxgears too. We would like to thank p0g too, he did some very important support work, but somehow I couldn't find a topic to mention him in context - apologies :)

But as we still do have some problems with clipping, resizing the window will give you strange results.

After some work on NV3x EXA marcheu switched over to NV04 drm issues. That nv30 work was to avoid running the blob before nouveau to be able to use the 3D engine.

Reason for the switch to NV04 was that ahuillet was expecting a NV04 card donation from a supporter of our project (Thanks!). But as DRM was broken by the "TTM" update (reserving a FIFO for the DRM), working context switching was needed. Some patches were already done marcheu but lost in his harddisk crash mentioned in the last issue. So he set out to recreate them.

Also nv04_demo is now able to draw triangles on NV04 :)


Related Articles