summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/shaderapi.c10
-rw-r--r--src/mesa/main/shaderapi.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 6631f1ea479..733fee6b9aa 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2838,6 +2838,16 @@ _mesa_shader_write_subroutine_index(struct gl_context *ctx,
} while(i < sh->NumSubroutineUniformRemapTable);
}
+void
+_mesa_shader_write_subroutine_indices(struct gl_context *ctx,
+ gl_shader_stage stage)
+{
+ if (ctx->_Shader->CurrentProgram[stage] &&
+ ctx->_Shader->CurrentProgram[stage]->_LinkedShaders[stage])
+ _mesa_shader_write_subroutine_index(ctx,
+ ctx->_Shader->CurrentProgram[stage]->_LinkedShaders[stage]);
+}
+
static void
_mesa_shader_init_subroutine_defaults(struct gl_context *ctx,
struct gl_linked_shader *sh)
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index b3de5fab1e7..4297bfa3d65 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -69,6 +69,9 @@ _mesa_count_active_attribs(struct gl_shader_program *shProg);
extern size_t
_mesa_longest_attribute_name_length(struct gl_shader_program *shProg);
+extern void
+_mesa_shader_write_subroutine_indices(struct gl_context *ctx,
+ gl_shader_stage stage);
extern void GLAPIENTRY
_mesa_AttachObjectARB(GLhandleARB, GLhandleARB);