glShaderSource must not change compile status.
authorJamey Sharp <jamey@minilop.net>
Tue, 26 Apr 2016 05:06:40 +0000 (22:06 -0700)
committerTimothy Arceri <timothy.arceri@collabora.com>
Sun, 1 May 2016 08:46:24 +0000 (18:46 +1000)
OpenGL 4.5 Core Profile section 7.1, in the documentation for
CompileShader, says: "Changing the source code of a shader object with
ShaderSource does not change its compile status or the compiled shader
code."

According to Karol Herbst, the game "Divinity: Original Sin - Enhanced
Edition" depends on this odd quirk of the spec.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93551
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/mesa/main/shaderapi.c

index b972f8e495c43660e291f51dad30919e45a9e22f..8c1fba8b26f596d0e84e753f4b5d8311fdab4dcb 100644 (file)
@@ -949,7 +949,6 @@ shader_source(struct gl_shader *sh, const GLchar *source)
    /* free old shader source string and install new one */
    free((void *)sh->Source);
    sh->Source = source;
-   sh->CompileStatus = GL_FALSE;
 #ifdef DEBUG
    sh->SourceChecksum = _mesa_str_checksum(sh->Source);
 #endif