7 Replies Latest reply on May 28, 2014 2:18 PM by yours3lf

    infinite loop when compiling glsl compute shader

    yours3lf

      Hi,

       

      when I try to compile a custom glsl compute shader using the 4.3 features, the driver goes nuts, and starts an infinite loop. I waited for half an hour for it, but it didn't stop.

      The same shader works on nvidia, and the opencl version works on amd too.
      Unfortunately I can't attach the source as it's private, but if there's a way I could share the binaries let me know.

       

      Best regards,

      Yours3!f

        • Re: infinite loop when compiling glsl compute shader
          yours3lf

          win7 64 bit, catalyst 13.11 beta v6 i think opengl version from driver: 6.14.10.12614
          amd a8-4500m

            • Re: infinite loop when compiling glsl compute shader
              ronan.bel

              Hi.

              I have the "same" problem.

              CS compiling fine on NVidia.

              On ATI (7970, win8 x64, catalyst 13.9), CompileShader ok, LinkProgram ok then call glGetProgramiv( id, GL_LINK_STATUS, &iLinked ) => never returns.

               

              Even with a very basic CS.

               

              I can send you by private email some sample code

              ronan.bel@ubisoft.com

               

              EDIT: OpenGL Version 6.14.10.12430

              1 of 1 people found this helpful
                • Re: Re: infinite loop when compiling glsl compute shader
                  ronan.bel

                  One sample

                  (original SL code is HLSL, converted with a dirty tool to GLSL syntax, with a lot of "define" at the beginning of the file)

                  (I'm not sure the converted code is OK, currently I'm trying to compile all my shaders to be able to test them)

                   

                  float SL_step(float b, float a) { return step(b,a); }

                  vec2 SL_step(vec2 b, vec2 a) { return step(b,a); }

                  vec2 SL_step(float b, vec2 a) { return step(vec2(b),a); }

                  vec2 SL_step(vec2 b, float a) { return step(b,vec2(a)); }

                  vec3 SL_step(vec3 b, vec3 a) { return step(b,a); }

                  vec3 SL_step(float b, vec3 a) { return step(vec3(b),a); }

                  vec3 SL_step(vec3 b, float a) { return step(b,vec3(a)); }

                  vec4 SL_step(vec4 b, vec4 a) { return step(b,a); }

                  vec4 SL_step(float b, vec4 a) { return step(vec4(b),a); }

                  vec4 SL_step(vec4 b, float a) { return step(b,vec4(a)); }

                  bvec4 SL_notEqual(ivec4 a, int b) { return notEqual(a, ivec4(b) ); }

                  bvec4 SL_notEqual(int a, ivec4 b) { return notEqual(ivec4(a), b ); }

                  bvec4 SL_notEqual(ivec4 a, ivec4 b) { return notEqual(a, b ); }

                  bool SL_notEqual(int a, int b) { return (a != b); }

                  bvec4 SL_notEqual(uvec4 a, uint b) { return notEqual(a, uvec4(b) ); }

                  bvec4 SL_notEqual(uint a, uvec4 b) { return notEqual(uvec4(a), b ); }

                  bvec4 SL_notEqual(uvec4 a, uvec4 b) { return notEqual(a, b ); }

                  bool SL_notEqual(uint a, uint b) { return (a != b); }

                  bvec4 SL_notEqual(vec4 a, float b) { return notEqual(a, vec4(b) ); }

                  bvec4 SL_notEqual(float a, vec4 b) { return notEqual(vec4(a), b ); }

                  bvec4 SL_notEqual(vec4 a, vec4 b) { return notEqual(a, b ); }

                  bool SL_notEqual(float a, float b) { return (a != b); }

                  bvec4 SL_equal(vec4 a, float b) { return equal(a, vec4(b) ); }

                  bvec4 SL_equal(float a, vec4 b) { return equal(vec4(a), b ); }

                  bvec4 SL_equal(vec4 a, vec4 b) { return equal(a, b ); }

                  bvec3 SL_equal(vec3 a, float b) { return equal(a, vec3(b) ); }

                  bvec3 SL_equal(float a, vec3 b) { return equal(vec3(a), b ); }

                  bvec3 SL_equal(vec3 a, vec3 b) { return equal(a, b ); }

                  bvec2 SL_equal(vec2 a, float b) { return equal(a, vec2(b) ); }

                  bvec2 SL_equal(float a, vec2 b) { return equal(vec2(a), b ); }

                  bvec2 SL_equal(vec2 a, vec2 b) { return equal(a, b ); }

                  bool SL_equal(float a, float b) { return (a > b); }

                  bvec4 SL_greaterThan(vec4 a, float b) { return greaterThan(a, vec4(b) ); }

                  bvec4 SL_greaterThan(float a, vec4 b) { return greaterThan(vec4(a), b ); }

                  bvec4 SL_greaterThan(vec4 a, vec4 b) { return greaterThan(a, b ); }

                  bvec3 SL_greaterThan(vec3 a, float b) { return greaterThan(a, vec3(b) ); }

                  bvec3 SL_greaterThan(float a, vec3 b) { return greaterThan(vec3(a), b ); }

                  bvec3 SL_greaterThan(vec3 a, vec3 b) { return greaterThan(a, b ); }

                  bvec2 SL_greaterThan(vec2 a, float b) { return greaterThan(a, vec2(b) ); }

                  bvec2 SL_greaterThan(float a, vec2 b) { return greaterThan(vec2(a), b ); }

                  bvec2 SL_greaterThan(vec2 a, vec2 b) { return greaterThan(a, b ); }

                  bool SL_greaterThan(float a, float b) { return (a > b); }

                  bvec4 SL_greaterThan(uvec4 a, uint b) { return greaterThan(a, uvec4(b) ); }

                  bvec4 SL_greaterThan(uint a, uvec4 b) { return greaterThan(uvec4(a), b ); }

                  bvec4 SL_greaterThan(uvec4 a, uvec4 b) { return greaterThan(a, b ); }

                  bvec3 SL_greaterThan(uvec3 a, uint b) { return greaterThan(a, uvec3(b) ); }

                  bvec3 SL_greaterThan(uint a, uvec3 b) { return greaterThan(uvec3(a), b ); }

                  bvec3 SL_greaterThan(uvec3 a, uvec3 b) { return greaterThan(a, b ); }

                  bvec2 SL_greaterThan(uvec2 a, uint b) { return greaterThan(a, uvec2(b) ); }

                  bvec2 SL_greaterThan(uint a, uvec2 b) { return greaterThan(uvec2(a), b ); }

                  bvec2 SL_greaterThan(uvec2 a, uvec2 b) { return greaterThan(a, b ); }

                  bool SL_greaterThan(uint a, uint b) { return (a > b); }

                  bvec4 SL_greaterThan(ivec4 a, int b) { return greaterThan(a, ivec4(b) ); }

                  bvec4 SL_greaterThan(int a, ivec4 b) { return greaterThan(ivec4(a), b ); }

                  bvec4 SL_greaterThan(ivec4 a, ivec4 b) { return greaterThan(a, b ); }

                  bvec3 SL_greaterThan(ivec3 a, int b) { return greaterThan(a, ivec3(b) ); }

                  bvec3 SL_greaterThan(int a, ivec3 b) { return greaterThan(ivec3(a), b ); }

                  bvec3 SL_greaterThan(ivec3 a, ivec3 b) { return greaterThan(a, b ); }

                  bvec2 SL_greaterThan(ivec2 a, int b) { return greaterThan(a, ivec2(b) ); }

                  bvec2 SL_greaterThan(int a, ivec2 b) { return greaterThan(ivec2(a), b ); }

                  bvec2 SL_greaterThan(ivec2 a, ivec2 b) { return greaterThan(a, b ); }

                  bool SL_greaterThan(int a, int b) { return (a > b); }

                  bvec4 SL_greaterThanEqual(vec4 a, float b) { return greaterThanEqual(a, vec4(b) ); }

                  bvec4 SL_greaterThanEqual(float a, vec4 b) { return greaterThanEqual(vec4(a), b ); }

                  bvec4 SL_greaterThanEqual(vec4 a, vec4 b) { return greaterThanEqual(a, b ); }

                  bvec3 SL_greaterThanEqual(vec3 a, float b) { return greaterThanEqual(a, vec3(b) ); }

                  bvec3 SL_greaterThanEqual(float a, vec3 b) { return greaterThanEqual(vec3(a), b ); }

                  bvec3 SL_greaterThanEqual(vec3 a, vec3 b) { return greaterThanEqual(a, b ); }

                  bvec2 SL_greaterThanEqual(vec2 a, float b) { return greaterThanEqual(a, vec2(b) ); }

                  bvec2 SL_greaterThanEqual(float a, vec2 b) { return greaterThanEqual(vec2(a), b ); }

                  bvec2 SL_greaterThanEqual(vec2 a, vec2 b) { return greaterThanEqual(a, b ); }

                  bool SL_greaterThanEqual(float a, float b) { return (a >= b); }

                  bvec4 SL_greaterThanEqual(uvec4 a, uint b) { return greaterThanEqual(a, uvec4(b) ); }

                  bvec4 SL_greaterThanEqual(uint a, uvec4 b) { return greaterThanEqual(uvec4(a), b ); }

                  bvec4 SL_greaterThanEqual(uvec4 a, uvec4 b) { return greaterThanEqual(a, b ); }

                  bvec3 SL_greaterThanEqual(uvec3 a, uint b) { return greaterThanEqual(a, uvec3(b) ); }

                  bvec3 SL_greaterThanEqual(uint a, uvec3 b) { return greaterThanEqual(uvec3(a), b ); }

                  bvec3 SL_greaterThanEqual(uvec3 a, uvec3 b) { return greaterThanEqual(a, b ); }

                  bvec2 SL_greaterThanEqual(uvec2 a, uint b) { return greaterThanEqual(a, uvec2(b) ); }

                  bvec2 SL_greaterThanEqual(uint a, uvec2 b) { return greaterThanEqual(uvec2(a), b ); }

                  bvec2 SL_greaterThanEqual(uvec2 a, uvec2 b) { return greaterThanEqual(a, b ); }

                  bool SL_greaterThanEqual(uint a, uint b) { return (a >= b); }

                  bvec4 SL_greaterThanEqual(ivec4 a, int b) { return greaterThanEqual(a, ivec4(b) ); }

                  bvec4 SL_greaterThanEqual(int a, ivec4 b) { return greaterThanEqual(ivec4(a), b ); }

                  bvec4 SL_greaterThanEqual(ivec4 a, ivec4 b) { return greaterThanEqual(a, b ); }

                  bvec3 SL_greaterThanEqual(ivec3 a, int b) { return greaterThanEqual(a, ivec3(b) ); }

                  bvec3 SL_greaterThanEqual(int a, ivec3 b) { return greaterThanEqual(ivec3(a), b ); }

                  bvec3 SL_greaterThanEqual(ivec3 a, ivec3 b) { return greaterThanEqual(a, b ); }

                  bvec2 SL_greaterThanEqual(ivec2 a, int b) { return greaterThanEqual(a, ivec2(b) ); }

                  bvec2 SL_greaterThanEqual(int a, ivec2 b) { return greaterThanEqual(ivec2(a), b ); }

                  bvec2 SL_greaterThanEqual(ivec2 a, ivec2 b) { return greaterThanEqual(a, b ); }

                  bool SL_greaterThanEqual(int a, int b) { return (a >= b); }

                  vec4 SL_select(bvec4 c, vec4 a, float b) { return mix( vec4(b), a, c ); }

                  vec4 SL_select(bvec4 c, float a, vec4 b) { return mix( b, vec4(a), c ); }

                  vec4 SL_select(bvec4 c, vec4 a, vec4 b) { return mix( b, a, c ); }

                  vec4 SL_select(bool c, vec4 a, float b) { return mix( vec4(b), a, bvec4(c) ); }

                  vec4 SL_select(bool c, float a, vec4 b) { return mix( b, vec4(a), bvec4(c) ); }

                  vec4 SL_select(bool c, vec4 a, vec4 b) { return mix( b, a, bvec4(c) ); }

                  vec3 SL_select(bvec3 c, vec3 a, float b) { return mix( vec3(b), a, c ); }

                  vec3 SL_select(bvec3 c, float a, vec3 b) { return mix( b, vec3(a), c ); }

                  vec3 SL_select(bvec3 c, vec3 a, vec3 b) { return mix( b, a, c ); }

                  vec3 SL_select(bool c, vec3 a, float b) { return mix( vec3(b), a, bvec3(c) ); }

                  vec3 SL_select(bool c, float a, vec3 b) { return mix( b, vec3(a), bvec3(c) ); }

                  vec3 SL_select(bool c, vec3 a, vec3 b) { return mix( b, a, bvec3(c) ); }

                  vec2 SL_select(bvec2 c, vec2 a, float b) { return mix( vec2(b), a, c ); }

                  vec2 SL_select(bvec2 c, float a, vec2 b) { return mix( b, vec2(a), c ); }

                  vec2 SL_select(bvec2 c, vec2 a, vec2 b) { return mix( b, a, c ); }

                  vec2 SL_select(bool c, vec2 a, float b) { return mix( vec2(b), a, bvec2(c) ); }

                  vec2 SL_select(bool c, float a, vec2 b) { return mix( b, vec2(a), bvec2(c) ); }

                  vec2 SL_select(bool c, vec2 a, vec2 b) { return mix( b, a, bvec2(c) ); }

                  float SL_select(bool c, float a, float b) { return (c) ? a : b; }

                  uvec4 SL_select(bvec4 c, uvec4 a, uint b) { return floatBitsToUint(mix( uintBitsToFloat(uvec4(b)), uintBitsToFloat(a), c )); }

                  uvec4 SL_select(bvec4 c, uint a, uvec4 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(uvec4(a)), c )); }

                  uvec4 SL_select(bvec4 c, uint a, uint b) { return floatBitsToUint(mix( uintBitsToFloat(uvec4(b)), uintBitsToFloat(uvec4(a)), c )); }

                  uvec4 SL_select(bvec4 c, uvec4 a, uvec4 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(a), c )); }

                  uvec4 SL_select(bool c, uvec4 a, uvec4 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(a), bvec4(c) )); }

                  uvec4 SL_select(bool c, uint a, uvec4 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(uvec4(a)), bvec4(c) )); }

                  uvec4 SL_select(bool c, uvec4 a, uint b) { return floatBitsToUint(mix( uintBitsToFloat(uvec4(b)), uintBitsToFloat(a), bvec4(c) )); }

                  uvec3 SL_select(bvec3 c, uvec3 a, uint b) { return floatBitsToUint(mix( uintBitsToFloat(uvec3(b)), uintBitsToFloat(a), c )); }

                  uvec3 SL_select(bvec3 c, uint a, uvec3 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(uvec3(a)), c )); }

                  uvec3 SL_select(bvec3 c, uvec3 a, uvec3 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(a), c )); }

                  uvec3 SL_select(bool c, uvec3 a, uvec3 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(a), bvec3(c) )); }

                  uvec3 SL_select(bool c, uint a, uvec3 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(uvec3(a)), bvec3(c) )); }

                  uvec3 SL_select(bool c, uvec3 a, uint b) { return floatBitsToUint(mix( uintBitsToFloat(uvec3(b)), uintBitsToFloat(a), bvec3(c) )); }

                  uvec2 SL_select(bvec2 c, uvec2 a, uint b) { return floatBitsToUint(mix( uintBitsToFloat(uvec2(b)), uintBitsToFloat(a), c )); }

                  uvec2 SL_select(bvec2 c, uint a, uvec2 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(uvec2(a)), c )); }

                  uvec2 SL_select(bvec2 c, uvec2 a, uvec2 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(a), c )); }

                  uvec2 SL_select(bool c, uvec2 a, uvec2 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(a), bvec2(c) )); }

                  uvec2 SL_select(bool c, uint a, uvec2 b) { return floatBitsToUint(mix( uintBitsToFloat(b), uintBitsToFloat(uvec2(a)), bvec2(c) )); }

                  uvec2 SL_select(bool c, uvec2 a, uint b) { return floatBitsToUint(mix( uintBitsToFloat(uvec2(b)), uintBitsToFloat(a), bvec2(c) )); }

                  uint SL_select(bool c, uint a, uint b) { return (c) ? a : b; }

                  ivec4 SL_select(bvec4 c, ivec4 a, int b) { return floatBitsToInt(mix( intBitsToFloat(ivec4(b)), intBitsToFloat(a), c )); }

                  ivec4 SL_select(bvec4 c, int a, ivec4 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(ivec4(a)), c )); }

                  ivec4 SL_select(bvec4 c, ivec4 a, ivec4 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(a), c )); }

                  ivec4 SL_select(bool c, ivec4 a, ivec4 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(a), bvec4(c) )); }

                  ivec4 SL_select(bool c, int a, ivec4 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(ivec4(a)), bvec4(c) )); }

                  ivec4 SL_select(bool c, ivec4 a, int b) { return floatBitsToInt(mix( intBitsToFloat(ivec4(b)), intBitsToFloat(a), bvec4(c) )); }

                  ivec3 SL_select(bvec3 c, ivec3 a, int b) { return floatBitsToInt(mix( intBitsToFloat(ivec3(b)), intBitsToFloat(a), c )); }

                  ivec3 SL_select(bvec3 c, int a, ivec3 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(ivec3(a)), c )); }

                  ivec3 SL_select(bvec3 c, ivec3 a, ivec3 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(a), c )); }

                  ivec3 SL_select(bool c, ivec3 a, ivec3 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(a), bvec3(c) )); }

                  ivec3 SL_select(bool c, int a, ivec3 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(ivec3(a)), bvec3(c) )); }

                  ivec3 SL_select(bool c, ivec3 a, int b) { return floatBitsToInt(mix( intBitsToFloat(ivec3(b)), intBitsToFloat(a), bvec3(c) )); }

                  ivec2 SL_select(bvec2 c, ivec2 a, int b) { return floatBitsToInt(mix( intBitsToFloat(ivec2(b)), intBitsToFloat(a), c )); }

                  ivec2 SL_select(bvec2 c, int a, ivec2 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(ivec2(a)), c )); }

                  ivec2 SL_select(bvec2 c, ivec2 a, ivec2 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(a), c )); }

                  ivec2 SL_select(bool c, ivec2 a, ivec2 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(a), bvec2(c) )); }

                  ivec2 SL_select(bool c, int a, ivec2 b) { return floatBitsToInt(mix( intBitsToFloat(b), intBitsToFloat(ivec2(a)), bvec2(c) )); }

                  ivec2 SL_select(bool c, ivec2 a, int b) { return floatBitsToInt(mix( intBitsToFloat(ivec2(b)), intBitsToFloat(a), bvec2(c) )); }

                  int SL_select(bool c, int a, int b) { return (c) ? a : b; }

                  bool SL_or( bool a, bool b ) { return (a || b); }

                  bvec2 SL_or( bvec2 a, bvec2 b ) { return bvec2( (a.x || b.x), (a.y || b.y) ); }

                  bvec3 SL_or( bvec3 a, bvec3 b ) { return bvec3( (a.x || b.x), (a.y || b.y), (a.z || b.z) ); }

                  bvec4 SL_or( bvec4 a, bvec4 b ) { return bvec4( (a.x || b.x), (a.y || b.y), (a.z || b.z), (a.w || b.w) ); }

                  bool SL_and( bool a, bool b ) { return (a && b); }

                  bvec2 SL_and( bvec2 a, bvec2 b ) { return bvec2( (a.x && b.x), (a.y && b.y) ); }

                  bvec3 SL_and( bvec3 a, bvec3 b ) { return bvec3( (a.x && b.x), (a.y && b.y), (a.z && b.z) ); }

                  bvec4 SL_and( bvec4 a, bvec4 b ) { return bvec4( (a.x && b.x), (a.y && b.y), (a.z && b.z), (a.w && b.w) ); }

                  uniform CommonInstance {

                    vec4  cCenter;

                    float cScaleXY;

                    float cScaleZ;

                    float cQuantityNormalized;

                    float cRcpQuantityNormalized;

                    vec2  cRcpDim;

                    vec2  cClampDimMax;

                    float cQuantityScale;

                    float cRcpQuantityScale;

                    float cScaleRatio;

                    float cDetailDistanceMax;

                    uint cDimShift;

                    uint cGridId;

                    uint cQuantityShift;

                    uint cBaseQuantityShift;

                    uint cFrancoisHollande;

                    uint cHarlemDesir;

                    vec2  cRcpModelDim;

                    uvec2  cHalfDim;

                    uvec2  cMaskDim;

                    uint cMaskHard;

                    uint cMaskFluid;

                    uint cTileMaskX;

                    uint cTileShiftY;

                    uint cSubTileMaskX;

                    uint cSubTileShiftY;

                    uint cMaskBase;

                    uint cLoop;

                    float cPerlinScale;

                    float cRatio3;

                    float cRatio2;

                    float cRatioMin;

                    float cDepthScale;

                    float cSedimentScale;

                    float cFluxScaleFluid;

                    float cFluxScaleSand;

                    vec4  cColorBase;

                    vec4  cColorHard;

                    vec4  cColorSand;

                    vec4  cColorWater;

                    vec4  cColorSediment;

                    vec4  cColorSky0;

                    vec4  cColorSky1;

                    vec4  cColorPad;

                    vec4  cGridMatNoScale0;

                    vec4  cGridMatNoScale1;

                    vec4  cGridMatNoScale2;

                    vec4  cGridMatNoScale3;

                    vec4  cGridMat0;

                    vec4  cGridMat1;

                    vec4  cGridMat2;

                    vec4  cGridMat3;

                    vec4  cGridMatInv0;

                    vec4  cGridMatInv1;

                    vec4  cGridMatInv2;

                    vec4  cGridMatInv3;

                    vec4  cLocalMat0;

                    vec4  cLocalMat1;

                    vec4  cLocalMat2;

                    vec4  cLocalMat3;

                  } gCommonInstance ;

                  layout(rgba32ui) restrict readonly uniform uimageBuffer Buffer_Cursor;

                    uint PackSnow( in  uvec2  _uiVal )

                    { return (_uiVal.y << 16U) | (_uiVal.x); }

                    uvec2  UnpackSnow( in uint _uiVal )

                    { return  uvec2 ( _uiVal & 0xFFFF, _uiVal >> 16U ); }

                  uniform usampler2D Texture_Snow;

                  uniform usampler2D Texture_IceBase;

                    uvec2  GetSnow( in  uvec2  _uiPos )

                    { return UnpackSnow(  texelFetch(Texture_Snow, ivec2 ( ivec2 (_uiPos)),0) .r ); }

                    uvec2  GetIceBase( in  uvec2  _uiPos )

                    { return UnpackSnow(  texelFetch(Texture_IceBase, ivec2 ( ivec2 (_uiPos)),0) .r ); }

                  layout(rgba32ui) restrict writeonly uniform uimageBuffer Buffer_MinMax;

                  shared   uvec4  gs_MinMax;

                  layout (local_size_x = 256 , local_size_y = 1, local_size_z = 1) in;

                  void main() {

                    if (  gl_LocalInvocationIndex  == 0 )

                    {

                    gs_MinMax.x = 0xFFFFFFFF;

                    gs_MinMax.y = 0x00000000;

                    gs_MinMax.z = 0xFFFFFFFF;

                    gs_MinMax.w = 0x00000000;

                    }

                    groupMemoryBarrier();

                    vec4  fInputPos = uintBitsToFloat(  imageLoad(Buffer_Cursor,int(0)).rgba  );

                    vec4  fInputColor = uintBitsToFloat(  imageLoad(Buffer_Cursor,int(16)).rgba  );

                    vec2  fGridPos = fInputPos.xy + 0.5;

                    float fScale = fInputPos.z;

                    float fAngle = -fInputPos.w;

                    uvec2  uiDim =  gCommonInstance .cMaskDim  + 1;

                    uint uiIterNum = (uiDim.x * uiDim.y) /  256 ;

                    uvec4  uiMinMax =  uvec4 ( 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0x00000000 );

                    for ( uint i = 0; i < uiIterNum; i++ )

                    {

                    uint uiGridOffset =  gl_LocalInvocationIndex  + ( 256  * i);

                    uvec2  uiPos =  uvec2 ( uiGridOffset &  gCommonInstance .cMaskDim .x, uiGridOffset / uiDim.x );

                    vec2  fXY =  vec2 (uiPos) - fInputPos.xy;

                    vec2  fUV =  vec2 ( fXY.x * cos(fAngle) - fXY.y * sin(fAngle), fXY.x * sin(fAngle) + fXY.y * cos(fAngle) );

                    bool bInside = all( SL_greaterThanEqual( fScale, abs(fUV) ) );

                    uvec2  uiSnow = GetSnow( uiPos );

                    uvec2  uiIceBase = GetIceBase( uiPos );

                    uint uiSurface_C = ( uiIceBase.y + uiIceBase.x + uiSnow.y );

                    uiMinMax.x = min( uiMinMax.x, uiSurface_C );

                    uiMinMax.y = max( uiMinMax.y, uiSurface_C );

                    uiMinMax.z = (bInside) ? min( uiMinMax.z, uiSurface_C ) : uiMinMax.z;

                    uiMinMax.w = (bInside) ? max( uiMinMax.w, uiSurface_C ) : uiMinMax.w;

                    }

                    groupMemoryBarrier();

                    atomicMin(gs_MinMax.x,uiMinMax.x) ;

                    atomicMax(gs_MinMax.y,uiMinMax.y) ;

                    atomicMin(gs_MinMax.z,uiMinMax.z) ;

                    atomicMax(gs_MinMax.w,uiMinMax.w) ;

                    groupMemoryBarrier();

                    if (  gl_LocalInvocationIndex  == 0 )

                    {

                    imageStore(Buffer_MinMax,int(0),gs_MinMax) ;

                    }

                  }

                  1 of 1 people found this helpful
              • Re: infinite loop when compiling glsl compute shader
                tonyo_au

                If you call glGetUniformLocation on a compute shader the call hangs.on 13.12

                • Re: infinite loop when compiling glsl compute shader
                  yours3lf

                  thanks for all the replies, issue resolved (for me) in catalyst 14.6 beta, please try it out!