[Mesa-dev] [RFC PATCH 00/16] A new IR for Mesa

Ilia Mirkin imirkin at alum.mit.edu
Mon Aug 18 09:38:37 PDT 2014


On Mon, Aug 18, 2014 at 12:25 PM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> On Mon, Aug 18, 2014 at 11:47 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
>> On 18/08/14 14:21, Marek Olšák wrote:
>> Once these are in place, all development effort to go on to
>> improving/leveraging the new IR.  We could deprecate TGSI when it would have
>> few users.
>
> Also, switching to LLVM, NIR, or some other IR that uses SSA (or at
> least modifying TGSI to support it) seems like something that's really
> necessary for the Gallium folks. Soon, considering most backends
> already use SSA in one form or another, the situation will look like:
>
> GLSL IR -> NIR -> NIR with SSA -> optimizations -> NIR without SSA ->
> TGSI -> backend without SSA -> backend with SSA
>
> So backends would have to duplicate the into-SSA logic and every
> shader would have to pay the penalty of being converted out of and
> then back into SSA thanks to TGSI not supporting it.

Looking at it another way, perhaps we should just accept that backends
will want to do their own things, and try to minimize the damage by
doing

GLSL IR -> transport ir -> backend

Are you envisioning a world where every backend uses NIR, and uses
some sort of shared register allocation/spilling/etc logic,
configurable instruction lists, pluggable with lowering passes? By
then you've invented LLVM...

  -ilia


More information about the mesa-dev mailing list