I have spent some time refactoring the r300 classic Mesa shader compiler 
(backend) to be more or less independent of Mesa. The goal is to create a 
library that can be used from both classic Mesa _and_ from a Gallium driver 
(thus bug fixing and other improvements will be beneficial to both projects at 
the same time; in particular, the significant amount of bugfixing that has 
already gone into the project will be immediately available to Gallium).

The code is at:

    git://anongit.freedesktop.org/~nh/mesa r300-compiler
    http://cgit.freedesktop.org/~nh/mesa/log/?h=r300-compiler

The current state is:

. More regression testing would be good.
. Almost all assumptions about Mesa in the compiler proper are gone.
. Mesa *is* still used for its instruction printer and prog_instruction and 
related structures.

On top of that, the branch contains a significant cleanup of the vertex 
program compiler.

Internally, the compiler now uses a very simply program representation based 
on prog_instruction. Both classic Mesa and Gallium will translate their input 
representation into this intermediate representation. The end result of 
compilation is a structure full of raw register settings and translated 
instructions that can be uploaded to the hardware pretty much directly. I have 
some comments with rationale for this (and a rant about TGSI), as well as a 
comment about the memory pool structure, which I will write about in a 
followup.

I plan to do some more testing on the branch and then start hooking it up into 
the Gallium driver over the next week or so.

cu,
Nicolai

------------------------------------------------------------------------------
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to