Announcement

Collapse
No announcement yet.

Mesa Makes Way For Assembly Shaders To GLSL IR

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • phoronix
    started a topic Mesa Makes Way For Assembly Shaders To GLSL IR

    Mesa Makes Way For Assembly Shaders To GLSL IR

    Phoronix: Mesa Makes Way For Assembly Shaders To GLSL IR

    Intel's Ian Romanick has made progress in his long side-project of compiling OpenGL assembly shaders to GLSL IR. He's now up to the point of being able to run the Doom 3 binaries with this conversion work for Mesa...

    http://www.phoronix.com/vr.php?view=MTA4OTE

  • marek
    replied
    Here's a picture showing interactions between shader IRs and drivers in Mesa:

    http://people.freedesktop.org/~mareko/ir.gif

    Leave a comment:


  • curaga
    replied
    I recall reading something to the effect that with this conversion, GL ASM could be optimized better (though still not as well as GLSL). Do I remember right?

    Leave a comment:


  • Drago
    replied
    Originally posted by smitty3268 View Post
    Several full time mesa developers are paid by companies that have proprietary drivers running on Mesa in Windows. Which is why they take care to make sure Mesa compiles in Visual Studio, maintain the scons build system, etc.

    So yes, there is, although you won't find any of them on this website.

    Though i don't think that's any reason that TGSI has to stick around. They just modelled it off that as something easy to start with that they knew would work. I'm sure they could move to GLSL IR eventually if they wanted to (which may not be very likely - i'm guessing Intel would have to make a commitment to move their drivers into Gallium before it would happen).
    I am not by any kind a GPU driver programmer,...yet, but I think that DX front-end(HLSL,runtime, etc.) is written by m$ and is closed source and in the end it spits something which can easily converted to TGSI, if not the same. Maybe someone from VMware can explain better.

    Leave a comment:


  • benjamin545
    replied
    its all either got to go tgsi or llvm. they really gotta pick one. hey, in a couple years gcc ir might even be a good choice seeing as they want to make their compiler structure more like llvm. i think they should all just stick with tgsi and mortph it to what they need to support whatever functionality they need.

    Leave a comment:


  • smitty3268
    replied
    Originally posted by 89c51 View Post
    is there anybody that actually cares about mesa running on windows???

    Several full time mesa developers are paid by companies that have proprietary drivers running on Mesa in Windows. Which is why they take care to make sure Mesa compiles in Visual Studio, maintain the scons build system, etc.

    So yes, there is, although you won't find any of them on this website.

    Though i don't think that's any reason that TGSI has to stick around. They just modelled it off that as something easy to start with that they knew would work. I'm sure they could move to GLSL IR eventually if they wanted to (which may not be very likely - i'm guessing Intel would have to make a commitment to move their drivers into Gallium before it would happen).
    Last edited by smitty3268; 04-18-2012, 08:21 PM.

    Leave a comment:


  • smitty3268
    replied
    Originally posted by shatsky View Post
    I know what intermediate representation is. TGSI, LLVM IRs, AMD IL - they all are documented and their usage is clear enough. My question is what exactly GLSL IR is and where is it documented. Here, for example, it's mentioned that ARB assembly language itself is used as an IR. And here such things as High level IR, Mesa IR and GLSL IR are mentioned.
    In this "GLSL IR to TSGI" message the example code seems to be ARB assembly. But the words "compiling assembly shaders (e.g. GL_ARB_vertex_program) to GLSL IR" clearly state that these two are not equal.
    I'm not sure there is any good documentation of the GLSL IR, or if there is whether it's public or not. That's Intel's baby and they're using it in their GLSL compiler and their i965 driver. Also the GLSL IR -> TGSI conversion is probably some pretty easy code to look through and figure it out.

    The big difference with GLSL IR is that it's more of an object-oriented structure - there will be a class for a while-loop, for example, and that will have members for the expression and the loop body, which will have classes for statements, etc.

    TGSI/AMD IL/DX11 is all more like assembly instructions where it's just text that you read through one line at a time.

    Leave a comment:


  • shatsky
    replied
    I know what intermediate representation is. TGSI, LLVM IRs, AMD IL - they all are documented and their usage is clear enough. My question is what exactly GLSL IR is and where is it documented. Here, for example, it's mentioned that ARB assembly language itself is used as an IR. And here such things as High level IR, Mesa IR and GLSL IR are mentioned.
    In this "GLSL IR to TSGI" message the example code seems to be ARB assembly. But the words "compiling assembly shaders (e.g. GL_ARB_vertex_program) to GLSL IR" clearly state that these two are not equal.

    Leave a comment:


  • 89c51
    replied
    Originally posted by Drago View Post
    My inderstanding so far is that TGSI is modelled after DX intermediate representation, so if anyone wants Mesa to be replacement GPU driver implementation for windows, TGSI should stay.
    is there anybody that actually cares about mesa running on windows???

    Leave a comment:


  • Drago
    replied
    Originally posted by smitty3268 View Post
    (IR is a common compiler term - internal representation).
    It is "Intermediate Representation".
    LLVM will not replace TGSI in near term. It is used only in AMD backend for the moment, where TGSI IR is converted to LLVM IR, to be optimized further and converted to VLIW for r600 class hardware, or SIMD for GCN.
    My inderstanding so far is that TGSI is modelled after DX intermediate representation, so if anyone wants Mesa to be replacement GPU driver implementation for windows, TGSI should stay.
    Last edited by Drago; 04-18-2012, 03:41 PM.

    Leave a comment:

Working...
X