Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: intermediate language for glsl, hlsl, et al.

  1. #1
    Senior Member OpenGL Pro
    Join Date
    Sep 2004
    Location
    Prombaatu
    Posts
    1,386

    intermediate language for glsl, hlsl, et al.

    guys, what the heck would be wrong with some kind of IL like .net's. decouple the high-level syntax and expose a language that targets the hardware functionality only. any syntax could compile to this IL target and be jit'd on demand. with all hardware providing essentially the same functionality, it doesn't make sense to me to have such dependencies on a language syntax, especially when there seems to be so much disagreement on how that syntax should play out. with an IL, any high level language could be used, as long as some tool can compile it to the IL. glsl could exist as is, but so could hlsl, and hlsl could be used as easily in opengl as it is in d3d, and vice versa.

    this IL could be developed cooperatively amongst the ihv's, and competition could be based on the performance of their implementations, as it should be. having just written that, i see the problem of how to agree on an IL that implements favorably for a given ihv. this could be a point of contention and a basis for delay in specification and implementation, but it's not like we haven't seen delays already, and a good design of this thing should be independent of any explicit implementation details.

    well, i've blabbed enough. i was just kicking this around and thought it might be fun to discuss. given that this has probably come up before in one form or another, my apologies in advance.

    any and all comments are welcome.
    (except those from "raystonn" and his/her associates.)

    seasonal salutations,
    bonehead

  2. #2
    Intern Contributor
    Join Date
    Feb 2006
    Posts
    50

    Re: intermediate language for glsl, hlsl, et al.

    decouple the high-level syntax and expose a language that targets the hardware functionality only.
    OpenGL is supposed to be abstracting the hardware, not exposing it.

    with all hardware providing essentially the same functionality, it doesn't make sense to me to have such dependencies on a language syntax, especially when there seems to be so much disagreement on how that syntax should play out.
    An IL Intermediate language would still need a "language syntax". What does this save us?

    with an IL, any high level language could be used, as long as some tool can compile it to the IL.
    You can do this now. Think of GLSL as the IL. Now go write a C/C++ compiler, or a compiler for some other language, that outputs GLSL. All done!

    -Raystonn

  3. #3
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,932

    Re: intermediate language for glsl, hlsl, et al.

    I currently work on a sort of virtual machine(merely for fun and in my free time) and I have designed an interesting IL for it. It is fully based on the SSA-form, giving potentially very powerfull algorithmical trees. I thought about applying it to the OpenGL so that it would output an GLSL code, but this are just ideas... Really, there is simpy no reason, exept if ARB will deside to adopt my IL ;-)

    Hovewer, this is just an research by now, I never get to do something real about it...

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Sep 2004
    Location
    Prombaatu
    Posts
    1,386

    Re: intermediate language for glsl, hlsl, et al.

    thanks zengar, that's exactly the kind of thing i'm talking about.

    technically an il would be easy to produce, in that the subject is well understood and it's just a matter of deciding on the details, but "politically" it's probably next to impossible, since you'll likely never get the principals to agree on those details.

    besides, it's now clear to me that opengl has something very different in mind with glsl. something far more "forward-looking".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •