[Mesa-stable] [PATCH 09/13] glsl/linker: Make get_main_function_signature public
Ian Romanick
idr at freedesktop.org
Fri Jun 20 18:00:59 PDT 2014
From: Ian Romanick <ian.d.romanick at intel.com>
The next patch will use this function in a different file.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
---
src/glsl/linker.cpp | 9 +++++----
src/glsl/linker.h | 3 +++
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 0b6a716..813108c 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1001,8 +1001,8 @@ move_non_declarations(exec_list *instructions, exec_node *last,
/**
* Get the function signature for main from a shader
*/
-static ir_function_signature *
-get_main_function_signature(gl_shader *sh)
+ir_function_signature *
+link_get_main_function_signature(gl_shader *sh)
{
ir_function *const f = sh->symbols->get_function("main");
if (f != NULL) {
@@ -1529,7 +1529,7 @@ link_intrastage_shaders(void *mem_ctx,
*/
gl_shader *main = NULL;
for (unsigned i = 0; i < num_shaders; i++) {
- if (get_main_function_signature(shader_list[i]) != NULL) {
+ if (link_get_main_function_signature(shader_list[i]) != NULL) {
main = shader_list[i];
break;
}
@@ -1558,7 +1558,8 @@ link_intrastage_shaders(void *mem_ctx,
/* The a pointer to the main function in the final linked shader (i.e., the
* copy of the original shader that contained the main function).
*/
- ir_function_signature *const main_sig = get_main_function_signature(linked);
+ ir_function_signature *const main_sig =
+ link_get_main_function_signature(linked);
/* Move any instructions other than variable declarations or function
* declarations into main.
diff --git a/src/glsl/linker.h b/src/glsl/linker.h
index 130915d..d2933bd 100644
--- a/src/glsl/linker.h
+++ b/src/glsl/linker.h
@@ -26,6 +26,9 @@
#ifndef GLSL_LINKER_H
#define GLSL_LINKER_H
+ir_function_signature *
+link_get_main_function_signature(gl_shader *sh);
+
extern bool
link_function_calls(gl_shader_program *prog, gl_shader *main,
gl_shader **shader_list, unsigned num_shaders);
--
1.8.1.4
More information about the mesa-stable
mailing list