[Mesa-dev] [PATCH 08/20] glsl: don't eliminate subroutine types.

Dave Airlie airlied at gmail.com
Mon Jul 20 22:19:15 PDT 2015


From: Dave Airlie <airlied at redhat.com>

This stops dead code from removing subroutines types,
we need these for the queries to work properly.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 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 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();
-- 
2.4.3



More information about the mesa-dev mailing list