Nouveau Companion 38

Written by KoalaBR in Display Drivers on 3 April 2008 at 03:50 PM EDT. Page 2 of 2. 1 Comment.

Now that we have covered Marcheu, stillunknown, pq and Malc0 let's see what Darktama was up to. Well, he wrote a test program to talk directly to the NV5x hardware. That program is able to render triangles ignoring the non-existent DRM support for NV5x for now. That may not seem to be much, but it is a first: The proof that we (well, Darktama) can get the 3D engine to not only clear something (Milestone reached last issue) but render to something too. That was not an easy one, let's give him a pat on the back :) Not to be accused of laziness, Darktama continued his work on NV4x too. That won't take much longer though because we are nearly done with 3D on NV4x. Currently there are only two major issues remaining:

The memory management isn't using TTM yet. This will result in otherwise working OpenGL clients to crash out soon after start. How soon (or if at all) depends on the program and the hardware used. Rest assured, though: It will crash often.

The other problem is that every time we render we *have* to flush commands straight to the GPU, which is bad for a number of reasons:
- GPUs performance is best when they can process large batches of commands
- with TTM it'll become far too many kernel calls for my liking

Currently when rendering a scene, the driver will do: clear (maybe up to three times), flush, render, flush, swap buffers, flush which each flush meaning entering the kernel when using TTM. That is obviously not the best solution, so more thought is required here. That 3 times clearing needs some explanation though: That has to do with how Gallium handles some clears, it "bypasses" the driver and does them with quads separately for each buffer. That's bad when NVidia hardware is capable of far better methods.Regarding TTM: Apart from the problem noted above, Nouveau is nearly TTM ready. Basically someone could "just" start to (*ahem* some driver knowledge needed) plug the calls from Nouveau to TTM. Marcheu is sure this can be done differently, keeping objects much longer "pinned" by the TTM. That needs some more technical investigation.

Before you run and starting cheering: There is still some work left, we still have to deal with problems on our side (which I got covered for this issue) as well as with problems on the Gallium side of things. For example, when trying to get reflections working, we noticed that this isn't easy to do with current Gallium. Shortly put: On NVidia it is currently impossible to get glClipPlane() functionality without using shaders. However, exactly that is an assertion of Gallium. Only solution for now: A software fallback, which slows things down quite a bit (Try Neverball with and without reflections if you are curious). Darktama has a patch ready for Gallium which is currently review by the mighty ones of Gallium. Have a look here for a more detailed explanation here.

Other topics, which are worth mentioning:
- Malc0 fixed the broken back light code for Apple laptops.
- Some tests for NV5x mode setting and reverse engineering 3D rendering were done

If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.


Related Articles