[Mesa-dev] [PATCH 17/26] glsl: Record in gl_shader_program whether the program uses GLSL ES.
Ian Romanick
idr at freedesktop.org
Fri Nov 30 10:07:32 PST 2012
From: Paul Berry <stereotype441 at gmail.com>
Previously we recorded just the GLSL version (or the max version, if
GLSL 1.10 and GLSL 1.20 programs were linked together).
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
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 1bae043..d74911f 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2465,6 +2465,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
}
prog->Version = max_version;
+ prog->IsEsProg = 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 f364ae1..4e5be1f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2387,6 +2387,7 @@ struct gl_shader_program
GLchar *InfoLog;
unsigned Version; /**< GLSL version used for linking */
+ GLboolean IsEsProg; /**< True if this program uses GLSL ES */
/**
* Per-stage shaders resulting from the first stage of linking.
--
1.7.11.7
More information about the mesa-dev
mailing list