glsl: Record in gl_shader_program whether the program uses GLSL ES.
authorPaul Berry <stereotype441@gmail.com>
Fri, 3 Aug 2012 00:50:43 +0000 (17:50 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 6 Dec 2012 20:13:22 +0000 (12:13 -0800)
Previously we recorded just the GLSL version (or the max version, if
GLSL 1.10 and GLSL 1.20 programs were linked together).

[v2, idr]: s/IsEs(Shader|Prog)/IsES/  Suggested by Ken and Eric.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Carl Worth <cworth@cworth.org>
src/glsl/linker.cpp
src/mesa/main/mtypes.h

index 311df6579f28b05c3cc295d92fa89661393110d2..617deda0b61e89f62df4d3f234e4cf03fc17b0c0 100644 (file)
@@ -2463,6 +2463,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
    }
 
    prog->Version = max_version;
+   prog->IsES = is_es_prog;
 
    for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) {
       if (prog->_LinkedShaders[i] != NULL)
index a43c94e6a04829b91649e87a73398c687d12401f..b353e7026f5f296f7d587ec0870c40747dcf5899 100644 (file)
@@ -2389,6 +2389,7 @@ struct gl_shader_program
    GLchar *InfoLog;
 
    unsigned Version;       /**< GLSL version used for linking */
+   GLboolean IsES;         /**< True if this program uses GLSL ES */
 
    /**
     * Per-stage shaders resulting from the first stage of linking.