Created attachment 121467 [details]
Shader compilation log
Advanced Lighting Model shader for Second Life fails to compile. When enabled, the menu waits for a moment then turns the option back off. I attached a log of the messages printed to the console during shader activation... there seem to be a lot of complaints about FXAA.
The problem only exists in the RadeonSI driver, not the R600 driver! Until yesterday I had a Radeon HD 6870 video card (AMD BARTS) and the shader worked perfectly, now I got a Radeon R7 370 (AMD PITCAIRN) and the problem occurs since I installed it.
Created attachment 121468 [details]
System data from the Help -> About menu
Try running with force_glsl_extensions_warn=true in the environment. Looks like the shader tries to use some advanced functionality without enabling the extensions. It checks with #ifdef GL_ARB_gpu_shader5, without enabling the ext, which is unfortunate. My understanding is that the preprocessor macros are set to 1 even when the ext isn't enabled with #extension.
(In reply to Ilia Mirkin from comment #2)
Thank you, that got the shader working again! I already had to add allow_glsl_extension_directive_midshader=true to my ~/.profile file for Second Life shaders, so until either the driver or SL fix this I'll include that one too. If the problem lies with Mesa this bug should stay open, if not someone close it please.
There's a drirc entry for Second Life already:
<application name="Second Life" executable="do-not-directly-run-secondlife-bin">
<option name="allow_glsl_extension_directive_midshader" value="true" />
You could just add the other option there as well - no need to set them globally (in fact, it might cause other things to break as a result - various exts can cause older shaders to become invalid, as keywords are added/etc).
I downloaded the latest Second Life viewer (which is apparently not longer supported for Linux) and Advanced Lighting Model seems to work without any workarounds so seems this was fixed in the game at some point. Closing.