Here's a picture showing interactions between shader IRs and drivers in Mesa:
Announcement
Collapse
No announcement yet.
Mesa Makes Way For Assembly Shaders To GLSL IR
Collapse
X
-
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:
-
Originally posted by smitty3268 View PostSeveral 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).
Leave a comment:
-
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:
-
Originally posted by 89c51 View Postis there anybody that actually cares about mesa running on windows???
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; 18 April 2012, 08:21 PM.
Leave a comment:
-
Originally posted by shatsky View PostI 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.
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:
-
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:
-
Originally posted by Drago View PostMy 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.
Leave a comment:
-
Originally posted by smitty3268 View Post(IR is a common compiler term - internal 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; 18 April 2012, 03:41 PM.
Leave a comment:
-
Originally posted by shatsky View PostAs I understand, before Gallium3D in Mesa GLSL used to be compiled to some Mesa IR, which was tied to OpenGL API, thus forbidding other APIs to be implemented on top of it. Then the Tungsten Graphics developed Gallium3D, and now Gallium3D OpenGL state tracker translates GLSL directly to their API-independent TGSI, and other state trackers as well. Then idea of using LLVM for common optimizations came out, TGSI->LLVM translator was written and now LunarG crew is working on their stack which uses LLVM as its only IR.
So what is "GLSL IR" and what is its place in all this?
When Gallium3D was added, it converted this Mesa IR into TGSI for gallium drivers to use. TGSI was actually a similar format, i think, but better defined, cross-platform, and with more features available.
Around Mesa 7.10 or so, Intel committed a new GLSL compiler, which generates GLSL IR natively (IR is a common compiler term - internal representation). At first, this GLSL IR was converted into Mesa IR for backwards compatibility - then sent off to the classic drivers or turned into TGSI for gallium. Later, the i965 driver gained the ability to work on GLSL IR directly, and gallium converted directly from it into TGSI to bypass the Mesa IR as well. That was important because Mesa IR was getting old and missing features that both GLSL IR and TGSI had that were necessary for newer GL features.
My understanding of the current LLVM work is that it would directly replace TGSI in the gallium stack (as an alternative option) - although it's still early and many different things could eventually end up happening. There's also been whispers of possibly replacing TGSI with GLSL IR, or it could introduce multiple levels where it starts as one language and is later converted to another.
Leave a comment:
Leave a comment: