aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-17 16:10:59 +0200
committermarha <marha@users.sourceforge.net>2012-09-17 16:10:59 +0200
commite3c4aa34268f99562e66b43a7d9efcd16ca072e6 (patch)
tree8c827f3f78e2c2093734b68045f2a13045ca15d0 /mesalib/src/glsl
parentb08ba56019b146786e1cde553c036dd0c4fd02e5 (diff)
downloadvcxsrv-e3c4aa34268f99562e66b43a7d9efcd16ca072e6.tar.gz
vcxsrv-e3c4aa34268f99562e66b43a7d9efcd16ca072e6.tar.bz2
vcxsrv-e3c4aa34268f99562e66b43a7d9efcd16ca072e6.zip
mesa xserver pixman git update 17 sep 2012
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 e461a6502..35db47087 100644
--- a/mesalib/src/glsl/glcpp/glcpp.c
+++ b/mesalib/src/glsl/glcpp/glcpp.c
@@ -111,7 +111,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 fc08ee273..c8c40ab5a 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -296,7 +296,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 64c2496eb..04143ad43 100644
--- a/mesalib/src/glsl/main.cpp
+++ b/mesalib/src/glsl/main.cpp
@@ -144,7 +144,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) {