Mesa (master): glsl_compiler: Re-enable building glsl_compiler

Ian Romanick idr at kemper.freedesktop.org
Mon Oct 7 16:59:33 UTC 2013


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Sep  9 09:58:08 2013 -0500

glsl_compiler: Re-enable building glsl_compiler

This allows application developers to use Mesa's compiler as a
standalone validator for their shaders.

This is mostly a revert of commit 569f0e4.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/glsl/Makefile.am |   11 +++++++++++
 src/glsl/SConscript  |    6 +++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
index 2e161b8..cbf253c 100644
--- a/src/glsl/Makefile.am
+++ b/src/glsl/Makefile.am
@@ -49,6 +49,8 @@ check_PROGRAMS =					\
 	tests/sampler-types-test			\
 	tests/uniform-initializer-test
 
+noinst_PROGRAMS = glsl_compiler
+
 tests_uniform_initializer_test_SOURCES =		\
 	$(top_srcdir)/src/mesa/main/hash_table.c	\
 	$(top_srcdir)/src/mesa/main/imports.c		\
@@ -99,6 +101,15 @@ libglsl_la_SOURCES =					\
 	glsl_parser.cpp					\
 	$(LIBGLSL_FILES)
 
+glsl_compiler_SOURCES = \
+	$(top_srcdir)/src/mesa/main/hash_table.c \
+	$(top_srcdir)/src/mesa/main/imports.c \
+	$(top_srcdir)/src/mesa/program/prog_hash_table.c \
+	$(top_srcdir)/src/mesa/program/symbol_table.c \
+	$(GLSL_COMPILER_CXX_FILES)
+
+glsl_compiler_LDADD = libglsl.la
+
 glsl_test_SOURCES = \
 	$(top_srcdir)/src/mesa/main/hash_table.c \
 	$(top_srcdir)/src/mesa/main/imports.c \
diff --git a/src/glsl/SConscript b/src/glsl/SConscript
index e386bdf..fe9d507 100644
--- a/src/glsl/SConscript
+++ b/src/glsl/SConscript
@@ -98,11 +98,11 @@ if env['platform'] == 'windows':
 
 env.Prepend(LIBS = [glsl])
 
-glsl2 = env.Program(
-    target = 'glsl2',
+glsl_compiler = env.Program(
+    target = 'glsl_compiler',
     source = compiler_objs,
 )
-env.Alias('glsl2', glsl2)
+env.Alias('glsl_compiler', glsl_compiler)
 
 glcpp = env.Program(
     target = 'glcpp/glcpp',




More information about the mesa-commit mailing list