glsl: Add GLSL_TYPE_FUNCTION to the base types enums
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 25 Feb 2015 00:27:32 +0000 (16:27 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 16 May 2015 18:16:32 +0000 (11:16 -0700)
src/glsl/ast_to_hir.cpp
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h
src/glsl/ir_clone.cpp
src/glsl/link_uniform_initializers.cpp
src/glsl/nir/nir_lower_io.c
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/program/ir_to_mesa.cpp

index 14e63090557153b8597b570872e2b775b0ef795b..bf68ec3922916d901a8f2cb3bec4aacba6ac5982 100644 (file)
@@ -970,6 +970,7 @@ do_comparison(void *mem_ctx, int operation, ir_rvalue *op0, ir_rvalue *op1)
    case GLSL_TYPE_SAMPLER:
    case GLSL_TYPE_IMAGE:
    case GLSL_TYPE_INTERFACE:
+   case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_ATOMIC_UINT:
       /* I assume a comparison of a struct containing a sampler just
        * ignores the sampler present in the type.
index 9c9b7efcbc798b0568bc8ca1d62ffd0c98f6cd9f..3ee5c00b22d3dd9a569901e15b725c496aea1a1b 100644 (file)
@@ -955,6 +955,7 @@ glsl_type::component_slots() const
    case GLSL_TYPE_IMAGE:
       return 1;
 
+   case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_SAMPLER:
    case GLSL_TYPE_ATOMIC_UINT:
    case GLSL_TYPE_VOID:
@@ -1326,6 +1327,7 @@ glsl_type::count_attribute_slots() const
    case GLSL_TYPE_ARRAY:
       return this->length * this->fields.array->count_attribute_slots();
 
+   case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_SAMPLER:
    case GLSL_TYPE_IMAGE:
    case GLSL_TYPE_ATOMIC_UINT:
index 5645dcd5011c3b13e3004d630f69850c753e5e5f..c77e337bf63352fd833b37c4ba0becd24b69870b 100644 (file)
@@ -56,6 +56,7 @@ enum glsl_base_type {
    GLSL_TYPE_IMAGE,
    GLSL_TYPE_ATOMIC_UINT,
    GLSL_TYPE_STRUCT,
+   GLSL_TYPE_FUNCTION,
    GLSL_TYPE_INTERFACE,
    GLSL_TYPE_ARRAY,
    GLSL_TYPE_VOID,
index 914e0e4d540b33f119cb35d4636014a9cc451d84..636c143ddc28b9ada0d7cc5bbb43c4132981c681 100644 (file)
@@ -357,6 +357,7 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const
       return c;
    }
 
+   case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_SAMPLER:
    case GLSL_TYPE_IMAGE:
    case GLSL_TYPE_ATOMIC_UINT:
index 69073841ea4af80f33aa0a5fe7fdb03523621017..60bfc9c15c9458452c341946b230bc3b5ddbff86 100644 (file)
@@ -88,6 +88,7 @@ copy_constant_to_storage(union gl_constant_value *storage,
       case GLSL_TYPE_IMAGE:
       case GLSL_TYPE_ATOMIC_UINT:
       case GLSL_TYPE_INTERFACE:
+      case GLSL_TYPE_FUNCTION:
       case GLSL_TYPE_VOID:
       case GLSL_TYPE_ERROR:
         /* All other types should have already been filtered by other
index 03eed04e1e9e16ee4235a4ea13b0ee329e782e0c..561bebd3a9c114a585255b4706bb06de6cac7cff 100644 (file)
@@ -67,6 +67,7 @@ type_size(const struct glsl_type *type)
       return 0;
    case GLSL_TYPE_IMAGE:
       return 0;
+   case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_DOUBLE:
index b2701b896892e5c0bb3de6c8edddd2f463273367..2fa5a664d30e1498e49a87023e8951aa58da27f2 100644 (file)
@@ -671,6 +671,7 @@ fs_visitor::type_size(const struct glsl_type *type)
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_INTERFACE:
    case GLSL_TYPE_DOUBLE:
+   case GLSL_TYPE_FUNCTION:
       unreachable("not reached");
    }
 
index 80ca1b750f8d9dd802a15ef76e563f878a064f1c..c911a551038bde3a90d81020518f616bc8112407 100644 (file)
@@ -1348,6 +1348,7 @@ fs_visitor::emit_assignment_writes(fs_reg &l, fs_reg &r,
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_INTERFACE:
+   case GLSL_TYPE_FUNCTION:
       unreachable("not reached");
    }
 }
index c1fd859fef5316154eb5f3cbf76c01e480fc39c5..ebfb49acf8d70747f230baf9dfcd933fc87cd07f 100644 (file)
@@ -351,6 +351,7 @@ brw_type_for_base_type(const struct glsl_type *type)
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_INTERFACE:
    case GLSL_TYPE_DOUBLE:
+   case GLSL_TYPE_FUNCTION:
       unreachable("not reached");
    }
 
index 5a60fe43bf8894b5d83f009331a1d64f72fb69c6..e51c140c0f28924b906e5bd0988c7c7d9b495758 100644 (file)
@@ -615,6 +615,7 @@ type_size(const struct glsl_type *type)
    case GLSL_TYPE_DOUBLE:
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_INTERFACE:
+   case GLSL_TYPE_FUNCTION:
       unreachable("not reached");
    }
 
index 3dcb53702a55df2eb5fd2b5e57bd590fc3351b0a..fceed712bdb47d75d97005e84eaa77c883877fe2 100644 (file)
@@ -541,6 +541,7 @@ type_size(const struct glsl_type *type)
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_INTERFACE:
+   case GLSL_TYPE_FUNCTION:
       assert(!"Invalid type in type_size");
       break;
    }
@@ -2448,6 +2449,7 @@ _mesa_associate_uniform_storage(struct gl_context *ctx,
          case GLSL_TYPE_STRUCT:
          case GLSL_TYPE_ERROR:
          case GLSL_TYPE_INTERFACE:
+         case GLSL_TYPE_FUNCTION:
            assert(!"Should not get here.");
            break;
         }