Mesa (master): glsl: Make the standalone compiler accept '.glsl' files.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Apr 17 23:06:15 UTC 2012


Module: Mesa
Branch: master
Commit: 7e35d97a02cf139746ce9e85b78fe0c651139074
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e35d97a02cf139746ce9e85b78fe0c651139074

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Apr 16 14:40:45 2012 -0700

glsl: Make the standalone compiler accept '.glsl' files.

These ought to be treated as 'any stage', but for now, they're just
treated as vertex shaders.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Acked-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/glsl/main.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index d43bf1a..3231b1b 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -238,7 +238,7 @@ main(int argc, char **argv)
 	 usage_fail(argv[0]);
 
       const char *const ext = & argv[optind][len - 5];
-      if (strncmp(".vert", ext, 5) == 0)
+      if (strncmp(".vert", ext, 5) == 0 || strncmp(".glsl", ext, 5) == 0)
 	 shader->Type = GL_VERTEX_SHADER;
       else if (strncmp(".geom", ext, 5) == 0)
 	 shader->Type = GL_GEOMETRY_SHADER;




More information about the mesa-commit mailing list