3 Replies Latest reply on Jan 22, 2015 2:48 AM by davychen

    GL Shader compiler crash


      So, even after a year of reporting that my Instance Tesselation shader is crashing on AMD hardware, it's still not fixed, so this time I arranged a binary that can reproduce the crash. Actually on 14.9 drivers it's a crash only because my app doesn't handle some states, but the log clearly states something like this :

      Program link log:

      Vertex shader(s) failed to link, fragment shader(s) failed to link.
      Vertex link error: INVALID_OPERATION.
      unexpected error.
      fragment link error: INVALID_OPERATION.
      unexpected error.


      The shaders ( Water.vert & Water.frag ) compile ok btw. So here it is, just press "Start Benchmark" and it will crash. You can deselect Instanced Tesselation and it will not crash.

        • Re: GL Shader compiler crash

          hi cippyboy,


          i've checked your shader source,


          there is no GLSL version declaration in Water.* shaders.


          you used in / out variables in your shaders,

          if you don't declare GLSL version, default version would be #version 110,

          in / out variables are not supported by version 110, so there will be compiling errors.


          i added


          #version 440 compatibility


          to first line of following shaders:






          then the cash can't be observed.


          can you check again?




            • Re: GL Shader compiler crash

              That answer tells me you haven't run the app in any profiler since in code I manually add #version 420 core

              If you were to check the Log.txt and go to Water.vert you'd see it would then say :

              ERROR: 0:5: error(#105) #version must occur before any other program statement

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


              The crash doesn't occur anymore because the shader clearly fails compilation so the object doesn't get rendered at all...

              Still crashes though as of 14.12

                • Re: GL Shader compiler crash

                  hi cippyboy,


                  we are able to reproduce your issue,

                  fix will be delivered in future catalyst release.


                  if you need a temporary work aroud,


                  please rewrite:

                  VertexData Vertex[ 3 ] = { Vertices[ FetchedIndices[ 0 ]], Vertices[ FetchedIndices[ 1 ]], Vertices[ FetchedIndices[ 2 ]] };


                          VertexData Vertex[ 3 ];

                          for (int i = 0; i < 3; i++)


                              Vertex[i] = Vertices[ FetchedIndices[ i ]];



                  thank you for reporting this issue.