On 04/16/2013 05:09 PM, Marek Olšák wrote:
On Tue, Apr 16, 2013 at 9:58 PM, Chia-I Wu <olva...@gmail.com> wrote:

On Wed, Apr 17, 2013 at 12:58 AM, Matt Turner <matts...@gmail.com> wrote:

I think everything Marek said was correct. If you could extend Gallium
to consume GLSL IR it might actually be an interesting project.

Yes, it is.  I do want to make pipe drivers be able to express the preferred IR 
and make the mesa state tracker generate it.  I had LLVM IR in mind, but GLSL 
IR could be a much less intrusive choice.  I will check that out.

Actually, there is even a better option. You don't have to fork the
compiler, you can add source files from src/mesa/drivers/dri/i965 to
your gallium driver. We have done this before. r300g did not have its
own compiler for a couple of *years*. The compiler lived in r300c in
src/mesa/drivers/dri/r300/compiler and it was more or less a separate
library (it did not depend on gl_context). If r300g was enabled, the
build system also compiled files in the r300 compiler directory and
the linker included them in the .so file. r300g also used (and still
uses) the register allocator from src/mesa/program, which is also used
by i965.

Feel free to use the same approach. It was a big win for us.

That worked because the same set of people were working on both. If we'll be expected to keep the i965g driver building and working when we make changes to our compiler back-end, that will be a deal breaker.

Marek
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to