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>
Mon, 31 Aug 2015 23:58:20 +0000 (16:58 -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/mesa/drivers/dri/i965/brw_fs.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 517841c99f8b1ee81f0f32072a651351c2a8e0b8..81b44bd6786c8c8f427650159bf3953da9d26dfe 100644 (file)
@@ -1019,6 +1019,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:
    case GLSL_TYPE_SUBROUTINE:
       /* I assume a comparison of a struct containing a sampler just
index 755618ac28b10b51f4a727a8f22503200cedcbec..50409dd50de8ab56657089e39f2decf27088b9b8 100644 (file)
@@ -1029,6 +1029,8 @@ glsl_type::component_slots() const
       return 1;
    case GLSL_TYPE_SUBROUTINE:
      return 1;
+
+   case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_SAMPLER:
    case GLSL_TYPE_ATOMIC_UINT:
    case GLSL_TYPE_VOID:
@@ -1402,6 +1404,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 02a398f6112effcd1f421965a9676f23fd0498fb..3c5345955faab430a187909e96dfca34839f2fd3 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 a8fac183a8d0d4820efddbf446055d0a585ecbf8..4edf70dba5d96ea0fb617a12eb8f37bb453c4765 100644 (file)
@@ -363,6 +363,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 05000fc39efad1e2a65dd12d192c7f386869ac19..f238513f17451b09ad97d4ae6c8fbaf474435e71 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_SUBROUTINE:
       case GLSL_TYPE_ERROR:
index 269914d64a887e346f0d680e869c7e99033960d7..39c3eb2d4a1661803a1dd8977ba8c9d1961eb4be 100644 (file)
@@ -491,6 +491,7 @@ type_size_scalar(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 445764d3d065b5b2b1b0e2fc138f851c3d8f7828..0007e5c07a5ea56f794c490c72a262ceff71826c 100644 (file)
@@ -459,6 +459,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 ca86e8b6d564f8820bc43de649a8f2be78c5a8a4..499f6288aeec1295a583ecde6f02951cf215ee99 100644 (file)
@@ -643,6 +643,7 @@ type_size_vec4(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 8f58f3edf986f1ff924e4cae2b2bf4f296528bb1..b8b082e2a5905041761d5d91bd392f691c81041d 100644 (file)
@@ -543,6 +543,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;
    }
@@ -2463,6 +2464,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;
         }