glsl: replace unreachable code path with assert
authorTimothy Arceri <timothy.arceri@collabora.com>
Fri, 8 Jan 2016 04:25:37 +0000 (15:25 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Sun, 10 Jan 2016 22:18:51 +0000 (09:18 +1100)
The lower_named_interface_blocks() pass is called before we try
assign locations to varyings so this shouldn't be reachable.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/glsl/link_varyings.cpp

index 3853abdb8e6bc07199845e2c0593ded405ae66e0..7cc58800765f2d11253171873ef9bed3e7606dfa 100644 (file)
@@ -1295,13 +1295,12 @@ public:
 
    void process(ir_variable *var)
    {
+      /* All named varying interface blocks should be flattened by now */
+      assert(!var->is_interface_instance());
+
       this->toplevel_var = var;
       this->varying_floats = 0;
-      if (var->is_interface_instance())
-         program_resource_visitor::process(var->get_interface_type(),
-                                           var->get_interface_type()->name);
-      else
-         program_resource_visitor::process(var);
+      program_resource_visitor::process(var);
    }
 
 private: