Created
September 24, 2015 17:04
-
-
Save nicomgd/08edf6a7741500997414 to your computer and use it in GitHub Desktop.
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment