glsl/linker: Make get_main_function_signature public
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 19 Jun 2014 19:05:20 +0000 (12:05 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 10 Sep 2014 18:05:05 +0000 (11:05 -0700)
The next patch will use this function in a different file.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/glsl/linker.cpp
src/glsl/linker.h

index e9cf5503a27355ed21d82032b75e195f5c98a886..bdd81c790655753e0ee8e41610f3dcfe6d310158 100644 (file)
@@ -1115,8 +1115,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) {
@@ -1644,7 +1644,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;
       }
@@ -1673,7 +1673,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.
index beb9bb216957a914e489ad86a46227dddd5849c8..9440794e23fcac508f5fdccc4315e59e0342245c 100644 (file)
@@ -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);