From 91c92bb6fbacdf713e36a9702fbc2ab4d203152c Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 2 Aug 2012 17:50:43 -0700 Subject: [PATCH] glsl: Record in gl_shader_program whether the program uses GLSL ES. 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 Reviewed-by: Kenneth Graunke Reviewed-by: Eric Anholt Acked-by: Carl Worth --- src/glsl/linker.cpp | 1 + src/mesa/main/mtypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 311df6579f2..617deda0b61 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -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) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index a43c94e6a04..b353e7026f5 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -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. -- 2.30.2