What are the advantages of GLSL's compilation model?

Posted by Kos on Programmers See other posts from Programmers or by Kos
Published on 2012-06-09T10:02:25Z Indexed on 2012/06/09 10:47 UTC
Read the original article Hit count: 301

Filed under:
|
|

GLSL is fundamentally different from other shader solutions because the server (GPU driver) is responsible for shader compilation. Cg and HLSL are (afaik) generally compiled a priori and sent to the GPU in that way.

This causes some real-world practical issues:

  • many drivers provide buggy compilers
  • compilers differ in terms of strictness (one GPU can accept a program while another won't)
  • also we can't know how the assembler code will be optimised

What are the upsides of GLSL's current approach? Is it worth it?

© Programmers or respective owner

Related posts about opengl

Related posts about gpu