0 Replies Latest reply on Dec 18, 2015 12:54 PM by tobspr

    GPU Shader Analyzer - Compilation Bug

    tobspr

      I think I found a bug in the GPU Shader Analyzer (Version 1.59.3208). This GLSL fragment shader fails to compile with all available compilers:

       

      #version 130

      struct MyStruct {

        int member;

      };

      in SomeVertexInput {

        int member_2;

      };

      void main() {}

       

      Error message:

       

      Internal compilation failure. Possibly caused by GSA not supporting a GLSL feature used in shader.

      ERROR: 0:7: error(#132) Syntax error: ';' parse error

      ERROR: error(#273) 1 compilation errors.  No code generated

       

      My first thought was, maybe the compiler does not support global struct declarations. However, this compiles just fine:

       

      #version 130

      struct MyStruct {

        int member;

      };

      void main() {}

       

      So obviously thats not the issue. Only using the vertex input works fine, too, though:

       

      #version 130

      in SomeVertexInput {

        int member_2;

      };

      void main() {}

       

      All three shaders compile with the NVIDIA drivers, but only the last 2 compile with GPU Shader Analyzer. Am I doing something wrong? Or did I discover a compiler bug?

       

      (BTW, is there some way to format code?)