summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/shaderapi.c13
-rw-r--r--src/mesa/main/shaderapi.h6
2 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index efbdda4ddb0..f028653700d 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -3162,6 +3162,7 @@ struct shader_includes {
/* Array to hold include paths given to glCompileShaderIncludeARB() */
struct sh_incl_path_entry **include_paths;
size_t num_include_paths;
+ size_t relative_path_cursor;
/* Root hash table holding the shader include tree */
struct hash_table *shader_include_tree;
@@ -3176,6 +3177,18 @@ _mesa_init_shader_includes(struct gl_shared_state *shared)
_mesa_key_string_equal);
}
+size_t
+_mesa_get_shader_include_cursor(struct gl_shared_state *shared)
+{
+ return shared->ShaderIncludes->relative_path_cursor;
+}
+
+void
+_mesa_set_shader_include_cursor(struct gl_shared_state *shared, size_t cursor)
+{
+ shared->ShaderIncludes->relative_path_cursor = cursor;
+}
+
static void
destroy_shader_include(struct hash_entry *entry)
{
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index 13cde963ff8..66acb6a9694 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -412,6 +412,12 @@ _mesa_dump_shader_source(const gl_shader_stage stage, const char *source);
void
_mesa_init_shader_includes(struct gl_shared_state *shared);
+size_t
+_mesa_get_shader_include_cursor(struct gl_shared_state *shared);
+
+void
+_mesa_set_shader_include_cursor(struct gl_shared_state *shared, size_t cusor);
+
void
_mesa_destroy_shader_includes(struct gl_shared_state *shared);