2 Replies Latest reply on Dec 30, 2008 6:53 PM by cameni

    GPU ShaderAnalyzer and Fragment Shader not supported by HW

    cameni

      hi,
      I have a quite complex fragment shader (written in cg) that works under arbfp1 profile but fails to load under glsl on x1x00 cards. Analyzing with GPU ShaderAnalyzer, I've found that if I comment out a call to arithmetic random number generator routine, the shader loads (24 GPR, 390 ALU, 33 TEX). But since the analyzer shows N/A when the shader doesn't load, I don't know which limit is being breached when the RNG code is there.
      The RNG routine doesn't use texture fetches; if used alone it takes 34 ALU and 6 GPR.

      Is it possible to find out somehow what exactly causes the shader not to load? glGetProgramInfoLog only remarks that "Fragment Shader not supported by HW", as does the analyzer.
      I suppose that when the shader works fine when compiled to ARB assembly language, that there is a way to write it in glsl so that it loads there too, isn't it?

      thanks,
      Brano Kemen

      Edit:Removed Advertising from the post

        • GPU ShaderAnalyzer and Fragment Shader not supported by HW
          bpurnomo

          Without looking at the shader, it would be hard to guess what the problem is.  It is possible that your shader has too many ALU instructions with the RNG routine.

          The reason it produces different results when compiled to ARB assembly language because the hardware assembly generated using a GLSL path might be different.

           

          • GPU ShaderAnalyzer and Fragment Shader not supported by HW
            cameni

            You're right, it was the ALU instruction limit - I am on the very edge, so that for example having y = x / 2000 didn't load but y = x * (1.0/2000) did.
            I've optimized the code and saved some ALU instructions here and there, for now it will do.

            Anyway, I was just wondering if the analyzer could provide more info about why the shader won't load, so I don't have to guess ...

            thanks,
            Brano Kemen

            Edit:Removed Advertising from the post