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
diff --git a/xgl-helper.py b/xgl-helper.py
index c98c288..298b30f 100755
--- a/xgl-helper.py
+++ b/xgl-helper.py
@@ -1006,8 +1006,10 @@
gv_funcs.append(' strncat(str, "</TABLE>>\\n];\\n\\n", 20);\n')
# TODO : Another hard-coded hack. Tie these slots to "magical" DS0_MEMORY slots that should appear separately
gv_funcs.append(' for (uint32_t i=0; i < count; i++) {\n')
- gv_funcs.append(' sprintf(tmpStr, "\\"%s\\":slot%u -> \\"DS0_MEMORY\\":slot%u [];\\n", myNodeName, i, i);\n')
- gv_funcs.append(' strncat(str, tmpStr, strlen(tmpStr));\n')
+ gv_funcs.append(' if (XGL_SLOT_UNUSED != pStruct[i].slotObjectType) {\n')
+ gv_funcs.append(' sprintf(tmpStr, "\\"%s\\":slot%u -> \\"DS0_MEMORY\\":slot%u [];\\n", myNodeName, i, i);\n')
+ gv_funcs.append(' strncat(str, tmpStr, strlen(tmpStr));\n')
+ gv_funcs.append(' }\n')
gv_funcs.append(' }\n')
gv_funcs.append(' return str;\n}\n')
# Add function to dynamically print out unknown struct