glsl: don't eliminate subroutine types.
authorDave Airlie <airlied@redhat.com>
Tue, 21 Jul 2015 04:52:40 +0000 (14:52 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 23 Jul 2015 07:25:27 +0000 (17:25 +1000)
This stops dead code from removing subroutines types,
we need these for the queries to work properly.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/glsl/opt_dead_code.cpp

index 04e4d5673d2be0a213f5aab929c0c46211a99a18..e4bf874700c2b1274a7e63b792b1d50aa8a1edfd 100644 (file)
@@ -126,6 +126,9 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned)
                if (block_type->interface_packing != GLSL_INTERFACE_PACKING_PACKED)
                   continue;
             }
+
+            if (entry->var->type->is_subroutine())
+               continue;
          }
 
         entry->var->remove();