<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Hoard renders thick white fog"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=96903#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Hoard renders thick white fog"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=96903">bug 96903</a>
              from <span class="vcard"><a class="email" href="mailto:imirkin@alum.mit.edu" title="Ilia Mirkin <imirkin@alum.mit.edu>"> <span class="fn">Ilia Mirkin</span></a>
</span></b>
        <pre>From the trace:

"""
16981 glCreateShader(type = GL_FRAGMENT_SHADER) = 12
16982 glShaderSource(shader = 12, count = 1, string = &"//!!FS
// ======================= Begin fragment shader program
===================================
uniform sampler2D Tex0;
uniform sampler2D Tex1;

vec2 encodeNormal(vec3 n)
{
    float p = sqrt(n.z * 8.0 + 8.0);
    return vec2(n.xy / p + 0.5);
}

vec2 encodeColor(vec3 rgb24)
{
        rgb24 *= 255.0f;
        // nvidia int3 rgb16 = rgb24 / int3(8,4,8);
        ivec3 rgb16 = ivec3(rgb24) / ivec3(8,4,8);
        float greenSplit = rgb16.g / 8.0f;
        vec2 stuff;
        stuff.x = rgb16.r * 8 + floor(greenSplit);
        // nvidia stuff.y = frac(greenSplit) * 256 + rgb16.b; 
        stuff.y = fract(greenSplit) * 256 + rgb16.b;
        stuff /= 255.0f;
        return stuff;
}

void main(void)
{
        vec4 tex0 = texture2D(Tex0,gl_TexCoord[0].st);

    if(tex0.a < 0.5)
    {
                discard;
    }

    gl_FragColor = vec4(encodeColor(tex0.rgb *
gl_Color.rgb),encodeNormal(gl_TexCoord[2].xyz));
}

// ======================= End fragment shader program
===================================
", length = NULL)
16983 glCompileShader(shader = 12)
16984 glGetShaderiv(shader = 12, pname = GL_INFO_LOG_LENGTH, params = &580)
16985 glGetShaderInfoLog(shader = 12, bufSize = 581, length = NULL, infoLog =
"0:14(11): warning: Float suffixes are invalid in GLSL 1.10
0:17(31): warning: Float suffixes are invalid in GLSL 1.10
0:22(11): warning: Float suffixes are invalid in GLSL 1.10
0:17(21): error: could not implicitly convert operands to arithmetic operator
0:19(32): warning: `greenSplit' used uninitialized
0:19(12): error: could not implicitly convert operands to arithmetic operator
0:21(18): warning: `greenSplit' used uninitialized
0:21(12): error: could not implicitly convert operands to arithmetic operator
0:21(12): error: operands to arithmetic operators must be numeric
")
"""

I tried running it with force_glsl_version=130 -- that seems to help with
st/mesa, but it doesn't appear to be hooked up for i965 (??? it used to be! it
hought...)

I'm not sure when float <-> int autoconversion was added, maybe in 1.20? But it
also uses textureSize, which was only added in 1.30.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>