layers: Don't show totally unused DS slots or arrows for slots unused by a particular shader
diff --git a/layers/draw_state.c b/layers/draw_state.c
index bffad7f..75193b8 100644
--- a/layers/draw_state.c
+++ b/layers/draw_state.c
@@ -596,7 +596,9 @@
         uint32_t j;
         char label[1024];
         for (j = 0; j < pDS->numSlots; j++) {
-            fprintf(pOutFile, "<TR><TD PORT=\"slot%u\">slot%u</TD></TR>", j, j);
+            // Don't draw unused slots
+            if (0 != pDS->dsSlot[j].activeMapping)
+                fprintf(pOutFile, "<TR><TD PORT=\"slot%u\">slot%u</TD></TR>", j, j);
         }
         fprintf(pOutFile, "</TABLE>>\n];\n");
         // Now tie each slot to its info