3 Replies Latest reply on Jun 15, 2011 7:50 AM by closed

    Shader Analyzer fails or huge problems with GLSL support?

      Some weird behaviour i've noticed while testing my GLSL shader in AMD GPU shader Analyzer

      Hey, today out of curiosity i've put my GLSL Vertex and Fragment shader to GPU Shader Analyzer while doing major changes in it.

      And what i did get:

      1)  varying mat4(or mat3) var_name; - causes "error(#174) Not enough data provided for construction constructor" in Fragment shader by just declaring it on every GPU listed in program. Even in empty shader.

      2)  Arrays. I'm not sure but it looks like using varying array with int variable as iterator in cycle(Vertex Shader) makes it compile on about half of adapters. it says just "unexpected error" on 5xxx and 6xxx series. removing lines using arrays makes it compile on almost everything(except  x1xxx and older).

      3) Radeon x1xxx and older - even empty shader won't compile on those, it shows N/A on every driver available.

      4) Type casting. In some obscure cases(like "Array[int(some_float)] = 1.0") causes crash.

      Conclusion: I'm scared. I'm really scared. If AMD GLSL compiler acts the same way on real adapters... That's not even funny, i didn't expect something like that even from AMD. Anyone can tell me that's just Shader Analyzer? Or i'm doing it just wrong?

        • Shader Analyzer fails or huge problems with GLSL support?

          Yes, dude! I totally agree with you, and i can confirm, that:

          1) all drivers later than 11.3 can't to compile long shaders with different functions, and fails with AMD favorite mistake - "unexpected error"

          2) yes, in most cases expressions like:

          float a = some_array[int(anything_float)];

          leads to crash in driver, in function DrvBufferPresent()

          3) usage of GLSL interfaces with special interpolation qualifiers leads to total ignoration of this qualifiers, example:

          out s_gtof_OmniOuter
              flat float4 vViewPos3_fSqRange;            // this flat will not work!
              flat float4 vColor3_fInvRange;
              float3 vRay3;
              float3 vProjUv3;

          4) glClearBuffer behavior is not corresponding OpenGL 3.3/4.1 specification

          P.S. I HATE AMD! I'm a graphics programmer, and i can't to do my job, because with every new driver i first of all do a lot of test... and what i see, nvidia - all works fine, amd/ati - crash or undefined behavior

          IM SO ANGRY!