aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/SConscript2
-rw-r--r--mesalib/src/glsl/glcpp/Makefile.am2
-rw-r--r--mesalib/src/glsl/glcpp/glcpp-parse.y8
-rw-r--r--mesalib/src/glsl/glcpp/glcpp.c2
-rw-r--r--mesalib/src/glsl/glcpp/glcpp.h2
-rw-r--r--mesalib/src/glsl/glcpp/pp.c2
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.h2
-rw-r--r--mesalib/src/glsl/ir.cpp2
-rw-r--r--mesalib/src/glsl/main.cpp2
-rw-r--r--mesalib/src/glsl/test_optpass.cpp2
10 files changed, 9 insertions, 17 deletions
diff --git a/mesalib/src/glsl/SConscript b/mesalib/src/glsl/SConscript
index 0855c67bb..b034f3b06 100644
--- a/mesalib/src/glsl/SConscript
+++ b/mesalib/src/glsl/SConscript
@@ -17,7 +17,7 @@ env.Prepend(CPPPATH = [
# Make glcpp-parse.h and glsl_parser.h reachable from the include path.
env.Append(CPPPATH = [Dir('.').abspath, Dir('glcpp').abspath])
-env.Append(YACCFLAGS = '-d')
+env.Append(YACCFLAGS = '-d -p "glcpp_parser_"')
parser_env = env.Clone()
parser_env.Append(YACCFLAGS = [
diff --git a/mesalib/src/glsl/glcpp/Makefile.am b/mesalib/src/glsl/glcpp/Makefile.am
index 7a95b6848..87affce1c 100644
--- a/mesalib/src/glsl/glcpp/Makefile.am
+++ b/mesalib/src/glsl/glcpp/Makefile.am
@@ -31,7 +31,7 @@ AM_CFLAGS = \
$(LIBRARY_DEFINES) \
$(API_DEFINES)
-AM_YFLAGS = -v -d
+AM_YFLAGS = -v -d -p "glcpp_parser_"
AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
noinst_LTLIBRARIES = libglcpp.la
diff --git a/mesalib/src/glsl/glcpp/glcpp-parse.y b/mesalib/src/glsl/glcpp/glcpp-parse.y
index bf6f3ad01..fb9bc588e 100644
--- a/mesalib/src/glsl/glcpp/glcpp-parse.y
+++ b/mesalib/src/glsl/glcpp/glcpp-parse.y
@@ -133,8 +133,6 @@ _glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc,
static void
_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc);
-#define yylex glcpp_parser_lex
-
static int
glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser);
@@ -1197,12 +1195,6 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
return parser;
}
-int
-glcpp_parser_parse (glcpp_parser_t *parser)
-{
- return yyparse (parser);
-}
-
void
glcpp_parser_destroy (glcpp_parser_t *parser)
{
diff --git a/mesalib/src/glsl/glcpp/glcpp.c b/mesalib/src/glsl/glcpp/glcpp.c
index 106c9916b..130f4324d 100644
--- a/mesalib/src/glsl/glcpp/glcpp.c
+++ b/mesalib/src/glsl/glcpp/glcpp.c
@@ -119,7 +119,7 @@ main (int argc, char *argv[])
if (shader == NULL)
return 1;
- ret = preprocess(ctx, &shader, &info_log, NULL, API_OPENGL);
+ ret = glcpp_preprocess(ctx, &shader, &info_log, NULL, API_OPENGL);
printf("%s", shader);
fprintf(stderr, "%s", info_log);
diff --git a/mesalib/src/glsl/glcpp/glcpp.h b/mesalib/src/glsl/glcpp/glcpp.h
index a13ade69e..a459289b2 100644
--- a/mesalib/src/glsl/glcpp/glcpp.h
+++ b/mesalib/src/glsl/glcpp/glcpp.h
@@ -196,7 +196,7 @@ void
glcpp_parser_destroy (glcpp_parser_t *parser);
int
-preprocess(void *ralloc_ctx, const char **shader, char **info_log,
+glcpp_preprocess(void *ralloc_ctx, const char **shader, char **info_log,
const struct gl_extensions *extensions, int api);
/* Functions for writing to the info log */
diff --git a/mesalib/src/glsl/glcpp/pp.c b/mesalib/src/glsl/glcpp/pp.c
index 9170d14a3..11b29417b 100644
--- a/mesalib/src/glsl/glcpp/pp.c
+++ b/mesalib/src/glsl/glcpp/pp.c
@@ -150,7 +150,7 @@ remove_line_continuations(glcpp_parser_t *ctx, const char *shader)
}
int
-preprocess(void *ralloc_ctx, const char **shader, char **info_log,
+glcpp_preprocess(void *ralloc_ctx, const char **shader, char **info_log,
const struct gl_extensions *extensions, int api)
{
int errors;
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h
index 43e5fbfba..a5f6845c4 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -300,7 +300,7 @@ _mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target);
extern "C" {
#endif
-extern int preprocess(void *ctx, const char **shader, char **info_log,
+extern int glcpp_preprocess(void *ctx, const char **shader, char **info_log,
const struct gl_extensions *extensions, int api);
extern void _mesa_destroy_shader_compiler(void);
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp
index f59cdd29a..1c7aadaca 100644
--- a/mesalib/src/glsl/ir.cpp
+++ b/mesalib/src/glsl/ir.cpp
@@ -1282,7 +1282,7 @@ ir_dereference::is_lvalue() const
}
-const char *tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf", "txs" };
+static const char *tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf", "txs" };
const char *ir_texture::opcode_string()
{
diff --git a/mesalib/src/glsl/main.cpp b/mesalib/src/glsl/main.cpp
index fbcc4aebb..23bd3cde2 100644
--- a/mesalib/src/glsl/main.cpp
+++ b/mesalib/src/glsl/main.cpp
@@ -155,7 +155,7 @@ compile_shader(struct gl_context *ctx, struct gl_shader *shader)
new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader);
const char *source = shader->Source;
- state->error = preprocess(state, &source, &state->info_log,
+ state->error = glcpp_preprocess(state, &source, &state->info_log,
state->extensions, ctx->API) != 0;
if (!state->error) {
diff --git a/mesalib/src/glsl/test_optpass.cpp b/mesalib/src/glsl/test_optpass.cpp
index 31f65c3d2..5ed11702c 100644
--- a/mesalib/src/glsl/test_optpass.cpp
+++ b/mesalib/src/glsl/test_optpass.cpp
@@ -216,7 +216,7 @@ int test_optpass(int argc, char **argv)
} else {
shader->Source = input.c_str();
const char *source = shader->Source;
- state->error = preprocess(state, &source, &state->info_log,
+ state->error = glcpp_preprocess(state, &source, &state->info_log,
state->extensions, ctx->API) != 0;
if (!state->error) {