ShaderCompileWorker expects different HLSL header format

Yes, they use the same hlslcc version.

I’m building UE with ‘make’ - this builds editor and SCW.

/DerivedDataCache doesn’t exist, and /Engine/DerivedDataCache is empty.

To reproduce I run:

‘LD_PRELOAD=/usr/lib64/libGL.so.1 ./UE4Editor’

Here:
https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Developer/ShaderFormatOpenGL/Private/GlslBackend.cpp#L2674

has_packed_uniforms is false on my PC (probably GTX 760m doesn’t support this or maybe shader doesn’t use it… dunno), so backend generates @Samplers line in different format than SCW expects:

https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Developer/ShaderFormatOpenGL/Private/GlslBackend.cpp#L2712

https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Developer/ShaderFormatOpenGL/Private/GlslBackend.cpp#L2630

SCW doesn’t expect ‘;’ on that line - instead it expects ‘(’:

https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Developer/ShaderCompilerCommon/Private/ShaderCompilerCommon.cpp#L777

Which leads to these errors:

https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Developer/ShaderFormatOpenGL/Private/OpenGLShaderCompiler.cpp#L525

https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Developer/ShaderFormatOpenGL/Private/OpenGLShaderCompiler.cpp#L530