[Mesa-dev] [PATCH] glShaderSource must not change compile status.
Kenneth Graunke
kenneth at whitecape.org
Wed Apr 27 03:13:31 UTC 2016
On Monday, April 25, 2016 10:06:40 PM PDT Jamey Sharp wrote:
> 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." (I haven't checked older versions of the spec.)
>
> According to Karol Herbst, the game "Divinity: Original Sin - Enhanced
> Edition" depends on this odd quirk of the spec. See:
> https://lists.freedesktop.org/archives/mesa-dev/2016-March/109789.html
>
> This patch, together with MESA_GL_VERSION_OVERRIDE=4.2, allows
> "Divinity" to start up successfully on i965, though rendering bugs
> remain.
>
> Signed-off-by: Jamey Sharp <jamey at minilop.net>
> Cc: Karol Herbst <nouveau at karolherbst.de>
> ---
> src/mesa/main/shaderapi.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
> index b28b5ce..fc2e885 100644
> --- a/src/mesa/main/shaderapi.c
> +++ b/src/mesa/main/shaderapi.c
> @@ -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
>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160426/ecbdd57e/attachment.sig>
More information about the mesa-dev
mailing list