2 Replies Latest reply on Feb 9, 2012 9:20 AM by dchristopherfennell

    GPU Shader Analyzer

    dchristopherfennell

      Whenever I use a Uniform Buffer Object in my fragment shader, I get "Internal compilation failure. Possibly caused by GSA not supporting a GLSL feature used in shader". Is there some configuration setting I'm missing? The shader compiles/links when used in my application. I have the latest drivers.

        • Re: GPU Shader Analyzer
          bpurnomo

          Could you post a simple test case?  Thanks.

            • Re: GPU Shader Analyzer
              dchristopherfennell

              I figured out that if you put the uniform block as the last declaration, it will work. The source below will give the error stated above. If you change this and put the UBO declaration just above main() (the last delcaration), it will compile.

               

              #version 330

              #extension GL_AB_uniform_buffer_object : enable

               

              uniform MaterialBlock

              {

                  vec4 Kd;

                  vec4 Ka;

                  vec4 Ks;

                  vec4 Ke;

                  float shininess;

              };

               

              uniform sampler2D src1;

               

              in vec2 tex0;

              out vec4 out_color;

               

              void main()

              {

                  out_color = texture(src1, tex0);

              }