summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-08-15 12:48:25 +1000
committerTimothy Arceri <[email protected]>2019-11-20 05:05:55 +0000
commite0fd2fa6894d875854990a33e41d538f0cdea24c (patch)
treef68734706a5b585cd4f98967f12cd7ee33d2dbcc /src
parent67b32190f3c953c5b7091d76ddeff95c0cbfb439 (diff)
glsl: pass gl_context to glcpp_parser_create()
This is a small tidy up and will be useful in the following commit. Reviewed-by: Witold Baryluk <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/glcpp/glcpp-parse.y8
-rw-r--r--src/compiler/glsl/glcpp/glcpp.h4
-rw-r--r--src/compiler/glsl/glcpp/pp.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y
index b975e8b3f40..4ae78fbf8f2 100644
--- a/src/compiler/glsl/glcpp/glcpp-parse.y
+++ b/src/compiler/glsl/glcpp/glcpp-parse.y
@@ -1368,8 +1368,8 @@ add_builtin_define(glcpp_parser_t *parser, const char *name, int value)
#define INITIAL_PP_OUTPUT_BUF_SIZE 4048
glcpp_parser_t *
-glcpp_parser_create(const struct gl_extensions *extension_list,
- glcpp_extension_iterator extensions, void *state, gl_api api)
+glcpp_parser_create(struct gl_context *gl_ctx,
+ glcpp_extension_iterator extensions, void *state)
{
glcpp_parser_t *parser;
@@ -1404,9 +1404,9 @@ glcpp_parser_create(const struct gl_extensions *extension_list,
parser->error = 0;
parser->extensions = extensions;
- parser->extension_list = extension_list;
+ parser->extension_list = &gl_ctx->Extensions;
parser->state = state;
- parser->api = api;
+ parser->api = gl_ctx->API;
parser->version = 0;
parser->version_set = false;
diff --git a/src/compiler/glsl/glcpp/glcpp.h b/src/compiler/glsl/glcpp/glcpp.h
index e786b24b132..1b929345208 100644
--- a/src/compiler/glsl/glcpp/glcpp.h
+++ b/src/compiler/glsl/glcpp/glcpp.h
@@ -229,8 +229,8 @@ struct glcpp_parser {
};
glcpp_parser_t *
-glcpp_parser_create(const struct gl_extensions *extension_list,
- glcpp_extension_iterator extensions, void *state, gl_api api);
+glcpp_parser_create(struct gl_context *gl_ctx,
+ glcpp_extension_iterator extensions, void *state);
int
glcpp_parser_parse (glcpp_parser_t *parser);
diff --git a/src/compiler/glsl/glcpp/pp.c b/src/compiler/glsl/glcpp/pp.c
index 32dee11ee34..aadf899a7d0 100644
--- a/src/compiler/glsl/glcpp/pp.c
+++ b/src/compiler/glsl/glcpp/pp.c
@@ -228,7 +228,7 @@ glcpp_preprocess(void *ralloc_ctx, const char **shader, char **info_log,
{
int errors;
glcpp_parser_t *parser =
- glcpp_parser_create(&gl_ctx->Extensions, extensions, state, gl_ctx->API);
+ glcpp_parser_create(gl_ctx, extensions, state);
if (! gl_ctx->Const.DisableGLSLLineContinuations)
*shader = remove_line_continuations(parser, *shader);