View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005538 | Spring engine | Gfx driver issues | public | 2017-04-26 14:09 | 2017-04-26 16:08 |
| Reporter | dmdr | Assigned To | abma | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 103.0 | ||||
| Summary | 0005538: Dubious GLSL behaviour with Mesa drivers on Linux | ||||
| Description | I have an RX470 and am using the FOSS Mesa drivers on Arch Linux (everything has been kept up to date; Mesa version 17.0.4), and some shaders are not being compiled properly. The reported GLSL version is 1.30 but the shaders are being compiled against 1.10, resulting in some strange graphical artifacts (for example, in Zero-K I can see trees reflected in water but not on the playing field itself because of this shader: https://github.com/ZeroK-RTS/Zero-K/blob/master/ModelMaterials_103/4_features_trees.lua). The older version of GLSL being reported is a Mesa quirk and has nothing to do with my specific card -- see here: http://stackoverflow.com/questions/43288180/why-wont-mesa-let-me-use-opengl-4-5-or-anything-but-3-0 -- but if this could be solved on the engine side that would be excellent (I'll also report this to the Mesa devs if this is likely to be a driver bug). | ||||
| Additional Information | Turning on ATIHacks doesn't help (I have tried adding it to springsettings.cfg manually as well as setting it by running the spring executable directly and messing with the settings). I have not checked if the behaviour is any different with Catalyst on Linux (sorry Anarchid, I know I said I would) but those drivers are now outdated and installing them is a trip directly into dependency hell, at least on Arch. I can confirm that the shaders are working perfectly on Windows with the Crimson drivers. I can apparently only attach one file at a time (???) so it includes infologs for my Linux and Windows installs, as well as my glxinfo -B output on Linux. ctrl-F for INFOLOG-LINUX, INFOLOG-WINDOWS or GLXINFO as desired. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Checked infolog.txt for Errors | |||||
|
|
IMO the shader is broken, it must specify the version, i don't see why this should be an engine bug. i.e.: https://github.com/spring/spring/blob/fe754e6d36f0856de507cc592213097f8e641951/cont/base/springcontent/shaders/GLSL/SMFFragProg.glsl#L1 |
|
|
>>> I can apparently only attach one file at a time (???) whats the issue with uploading them one by one? |
|
|
[f=-000001] Custom Unit Shaders:, 0:11(16): warning: Float suffixes are invalid in GLSL 1.10 0:9(15): error: could not implicitly convert operands to arithmetic operator When the #version directive is omitted in a shader (as with ZK's) 1.10 is assumed to be the target, which restricts the set of allowed GLSL constructs. Note also that ATI's official drivers will accept more 'syntactic deviations' than Mesa's. |
|
|
Shader broken confirmed, adding the #version directive proceeds to spit out different errors. ``` [f=-000001] Warning: LuaMaterial: incorrect uniform type for "TeamColor", got: vec3 expected: vec4 [f=-000001] Warning: LuaMaterial: incorrect uniform type for "SunDir", got: unknown expected: vec3 [f=-000001] Warning: LuaMaterial: incorrect uniform type for "CameraPos", got: mat4 expected: vec3 [f=-000001] Warning: LuaMaterial: incorrect uniform type for "ShadowParams", got: mat4 expected: vec4 [f=-000001] Warning: LuaMaterial: incorrect uniform type for "ViewMatrix", got: mat3 expected: mat4 ``` This is clearly a ZK bug at this point. |
|
|
-> https://github.com/ZeroK-RTS/Zero-K/issues |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2017-04-26 14:09 | dmdr | New Issue | |
| 2017-04-26 14:09 | dmdr | File Added: infolog-upload.txt | |
| 2017-04-26 14:20 | abma | Status | new => feedback |
| 2017-04-26 14:20 | abma | Note Added: 0017522 | |
| 2017-04-26 14:22 | abma | Note Added: 0017523 | |
| 2017-04-26 14:33 | Kloot | Note Added: 0017524 | |
| 2017-04-26 14:38 | Kloot | Note Edited: 0017524 | |
| 2017-04-26 15:55 | Anarchid | Note Added: 0017525 | |
| 2017-04-26 16:08 | abma | Assigned To | => abma |
| 2017-04-26 16:08 | abma | Status | feedback => closed |
| 2017-04-26 16:08 | abma | Resolution | open => no change required |
| 2017-04-26 16:08 | abma | Note Added: 0017527 |