From f73ef824869dbb1f91c32ad563c95ca917f40c12 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 21 Jul 2015 14:52:40 +1000 Subject: [PATCH] glsl: don't eliminate subroutine types. This stops dead code from removing subroutines types, we need these for the queries to work properly. Reviewed-by: Kenneth Graunke Signed-off-by: Dave Airlie --- src/glsl/opt_dead_code.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp index 04e4d5673d2..e4bf874700c 100644 --- a/src/glsl/opt_dead_code.cpp +++ b/src/glsl/opt_dead_code.cpp @@ -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(); -- 2.30.2