[Mesa-dev] [Bug 96903] Hoard renders thick white fog

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 12 16:28:00 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=96903

--- Comment #1 from Ilia Mirkin <imirkin at alum.mit.edu> ---
>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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160712/d7571365/attachment-0001.html>


More information about the mesa-dev mailing list