From: Dave Airlie Date: Tue, 21 Jul 2015 04:52:40 +0000 (+1000) Subject: glsl: don't eliminate subroutine types. X-Git-Tag: upstream/17.1.0~17491 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f73ef824869dbb1f91c32ad563c95ca917f40c12;p=platform%2Fupstream%2Fmesa.git 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 --- diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp index 04e4d56..e4bf874 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();