PDA

View Full Version : GLSL capabilities compared?



vear
04-03-2006, 11:17 AM
Can someone point out a resource where GLSL capabilityes are listed for different graphic cards?
For example some older cards dont support branching ("if" statement), while others only support vertex (not fragment shaders). Other situation is when a feature is working, but is too slow. Is there a tabular comparission of graphic cards with such differences listed? Or a benchmark database? I found no such thing on Nvidia nor on ATI website or by google.
Thx.

Zulfiqar Malik
04-04-2006, 01:22 AM
The purpose of a high-level language is to think about the algorithm rather than basic constructs such as branching, loops, jumps etc. So, ideally you should try to find a reasonable balance between writing "natural" and performance code. This might not be possible as programmable hardware is in its infancy.
As far as your question goes, i don't know any such list about OpenGL, but hardware is generally categorized as supporting a certain shader model (e.g. SM2.0, SM3.0 etc, and coming soon, SM4.0). You can lookup the description of a particular shader model and find out what requirements it lays down on the hardware. A similar set of features should(/would) be supported for OpenGL as well. E.g. SM3.0 requires hardware to support dynamic branching. So SM3.0 capable hardware supports dynamic branching for GLSL as well.

V-man
04-04-2006, 09:40 PM
I don't think a list has been made.
For nVidia, you can check if the NV extensions are present and you'll know what the hw can do.
For ATI, you can hardcode according to what GL_RENDERER returns. You can extract the GPU name from GL_RENDERER.