Summary: | Hoard renders thick white fog | ||
---|---|---|---|
Product: | Mesa | Reporter: | Béla Gyebrószki <gyebro69> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED NOTOURBUG | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | gyebro69 |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | screenshot |
Description
Béla Gyebrószki
2016-07-12 16:09:18 UTC
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. BTW, I believe the correct solution here is to add a "force_glsl_version" option to drirc. Should be easy to do with the executable name (hopefully it's not "wine"). Can you test adding something like <application name="Hard" executable="Hoard"> <option name="force_glsl_version" value="130"/> </application> into an appropriate place in your drirc? Probably have to play around with the executable. You can also just stick that into the environment. Not to ask a stupid question, but...why are you running this in Wine? There's a native Linux version of the game which renders correctly without any workarounds, at least on i965. (In reply to Kenneth Graunke from comment #3) > Not to ask a stupid question, but...why are you running this in Wine? > There's a native Linux version of the game which renders correctly without > any workarounds, at least on i965. Yes, I know that the native Linux version runs properly on Mesa. I just thought it was worth noting that this bug still exists under Wine (I observed this bug over a year ago but didn't bother reporting it). |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.