Hi,
System Setup Information:
-----------------------------------------
System Used: Microsoft Surface Pro 3
CPU SKU: i5
GPU SKU: HD4400
Processor Line: ?
System BIOS Version: ?
CMOS settings: ?
Graphics Driver Version: 10.18.14.4264
GOP/VBIOS Version: ?
Operating System: Windows
OS Version: 8.1
API: OpenGL
Occurs on non-Intel GPUs?: No
Steps to Reproduce:
-------------------------------
1. Compile & link the following vertex & fragment shaders (also can be found here ; Crash Intel GLSL linker (drivers 10.18.14.4264) - minimal repro ; the two files compile fine, but when calling glLinkProgram, crashes the application (works fine on other vendors, even on Intel HD 4000) · GitHub)
shader.frag
#version 150
// UNCOMMENT the following line to crash the linker
// Crash happens on driver 10.18.14.4264 on Windows 8.1 x64, on Intel HD 4400
#define CRASH_DRIVER_PLEASE
in vec4 var_shadowTexCoords;
uniform sampler2DShadow py_shadowMaps[ 1 ];
out vec4 fragColor;
#ifdef CRASH_DRIVER_PLEASE
float _eval_shadow( sampler2DShadow shadowMap, vec4 shadowTexCoord )
{
return textureProj( shadowMap, shadowTexCoord );
}
#else
#define _eval_shadow(a, b) textureProj(a, b)
#endif
void main(void)
{
float shadow_factor = _eval_shadow( py_shadowMaps[0], var_shadowTexCoords );
fragColor = vec4(shadow_factor);
}
shader.vert
#version 150
out vec4 var_shadowTexCoords;
void init_shadows_es( vec4 someVertex )
{
var_shadowTexCoords = someVertex;
}
in vec4 mg_vertex;
void main(void)
{
init_shadows_es(mg_vertex);
gl_Position = mg_vertex;
}
Expected Results:
-------------------------------
Shaders compile and link.
Actual Results:
-------------------------------
Shaders compile, and the call to glLinkProgram crashes the application.
Additional Information:
-------------------------------
The code posted above is a stripped down version of a bigger shader.
My understanding is that passing an element of a sampler2DShadow array as an argument to a function causes the crash. If the uniform is changed to become a simple sampler2DShadow value, the crash goes away, idem if the functions are replaced by macros.
FWIW the problem does not occur on the latest avail. driver for HD4000.