Mesa (7.11): glsl: Make prototype_string publicly available

Ian Romanick idr at kemper.freedesktop.org
Sat Jul 23 08:56:31 UTC 2011


Module: Mesa
Branch: 7.11
Commit: 0ce6506d6e5d1e6b3df640c1d72f6774fbebeb95
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ce6506d6e5d1e6b3df640c1d72f6774fbebeb95

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Jul  8 10:34:38 2011 -0700

glsl: Make prototype_string publicly available

Also clarify the documentation for one of the parameters.

Reviewed-by: Paul Berry <stereotype441 at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
(cherry picked from commit 1ad3ba4ad954b86751bd5b6ad0a431920bff9958)

---

 src/glsl/ast_function.cpp |    6 ++++--
 src/glsl/ir.h             |    4 ++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 3ba699a..9aa8556 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -62,8 +62,10 @@ process_parameters(exec_list *instructions, exec_list *actual_parameters,
  *
  * \param return_type Return type of the function.  May be \c NULL.
  * \param name        Name of the function.
- * \param parameters  Parameter list for the function.  This may be either a
- *                    formal or actual parameter list.  Only the type is used.
+ * \param parameters  List of \c ir_instruction nodes representing the
+ *                    parameter list for the function.  This may be either a
+ *                    formal (\c ir_variable) or actual (\c ir_rvalue)
+ *                    parameter list.  Only the type is used.
  *
  * \return
  * A ralloced string representing the prototype of the function.
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 2e3ac7f..f4cd42d 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1667,4 +1667,8 @@ ir_has_call(ir_instruction *ir);
 extern void
 do_set_program_inouts(exec_list *instructions, struct gl_program *prog);
 
+extern char *
+prototype_string(const glsl_type *return_type, const char *name,
+		 exec_list *parameters);
+
 #endif /* IR_H */




More information about the mesa-commit mailing list