[Mesa-dev] new i965g pipe driver for Intel GEN6 (and later)

Marek Olšák maraeo at gmail.com
Tue Apr 16 17:09:15 PDT 2013


On Tue, Apr 16, 2013 at 9:58 PM, Chia-I Wu <olvaffe at gmail.com> wrote:
>
> On Wed, Apr 17, 2013 at 12:58 AM, Matt Turner <mattst88 at 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.

Marek


More information about the mesa-dev mailing list