summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_functions.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-11-23 10:58:51 -0800
committerKenneth Graunke <[email protected]>2013-12-01 15:33:02 -0800
commit1b557b1606ffcf05d2612d66226306e876b6b937 (patch)
tree135006952c9c11947b6021e6137d3a5df83892e3 /src/glsl/builtin_functions.cpp
parent5af97b43c962c57aceb9c40d3c9050745d124892 (diff)
glsl: Create an accessor for the built-in function shader.
Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/builtin_functions.cpp')
-rw-r--r--src/glsl/builtin_functions.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
index 8cb75e5ad6e..e768685d0a6 100644
--- a/src/glsl/builtin_functions.cpp
+++ b/src/glsl/builtin_functions.cpp
@@ -357,8 +357,6 @@ public:
ir_function_signature *find(_mesa_glsl_parse_state *state,
const char *name, exec_list *actual_parameters);
-private:
- void *mem_ctx;
/**
* A shader to hold all the built-in signatures; created by this module.
*
@@ -368,6 +366,9 @@ private:
*/
gl_shader *shader;
+private:
+ void *mem_ctx;
+
/** Global variables used by built-in functions. */
ir_variable *gl_ModelViewProjectionMatrix;
ir_variable *gl_Vertex;
@@ -4020,4 +4021,11 @@ _mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state,
{
return builtins.find(state, name, actual_parameters);
}
+
+gl_shader *
+_mesa_glsl_get_builtin_function_shader()
+{
+ return builtins.shader;
+}
+
/** @} */