Module: Mesa
Branch: master
Commit: ee36f14fa54723f2da3cf6054f822ebf05cca247
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee36f14fa54723f2da3cf6054f822ebf05cca247

Author: Kenneth Graunke <kenn...@whitecape.org>
Date:   Wed Nov 10 23:14:45 2010 -0800

glsl: Remove GLSL_TYPE_FUNCTION define.

Functions are not first class objects in GLSL, so there is never a value
of function type.  No code actually used this except for one function
which asserted it shouldn't occur.  One comment mentioned it, but was
incorrect.  So we may as well remove it entirely.

---

 src/glsl/glsl_types.h    |   10 ++--------
 src/glsl/ir_function.cpp |    1 -
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index dccab0a..d38ef0b 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -50,9 +50,8 @@ _mesa_glsl_release_types(void);
 #define GLSL_TYPE_SAMPLER       4
 #define GLSL_TYPE_STRUCT        5
 #define GLSL_TYPE_ARRAY         6
-#define GLSL_TYPE_FUNCTION      7
-#define GLSL_TYPE_VOID          8
-#define GLSL_TYPE_ERROR         9
+#define GLSL_TYPE_VOID          7
+#define GLSL_TYPE_ERROR         8
 
 enum glsl_sampler_dim {
    GLSL_SAMPLER_DIM_1D = 0,
@@ -123,11 +122,6 @@ struct glsl_type {
     * For \c GLSL_TYPE_ARRAY, this is the length of the array.  For
     * \c GLSL_TYPE_STRUCT, it is the number of elements in the structure and
     * the number of values pointed to by \c fields.structure (below).
-    *
-    * For \c GLSL_TYPE_FUNCTION, it is the number of parameters to the
-    * function.  The return value from a function is implicitly the first
-    * parameter.  The types of the parameters are stored in
-    * \c fields.parameters (below).
     */
    unsigned length;
 
diff --git a/src/glsl/ir_function.cpp b/src/glsl/ir_function.cpp
index dfdec14..8db7011 100644
--- a/src/glsl/ir_function.cpp
+++ b/src/glsl/ir_function.cpp
@@ -70,7 +70,6 @@ type_compare(const glsl_type *a, const glsl_type *b)
        */
       return (type_compare(a->fields.array, b->fields.array) == 0) ? 0 : -1;
 
-   case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_ERROR:
    default:

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to