aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobin@lunarg.com>2014-12-09 17:00:33 -0700
committerTobin Ehlis <tobin@lunarg.com>2014-12-09 17:00:33 -0700
commit574dca6542a7b82bb287a9f4df1832f11d9a66a3 (patch)
tree69597030fe220c195c8dadc32cfb9d1ec10028ce
parent34e202dabe8be107999a9098231a03cdae97f890 (diff)
downloadusermoji-574dca6542a7b82bb287a9f4df1832f11d9a66a3.tar.xz
layers: Don't show totally unused DS slots or arrows for slots unused by a particular shader
-rw-r--r--layers/draw_state.c4
-rwxr-xr-xxgl-helper.py6
2 files changed, 7 insertions, 3 deletions
diff --git a/layers/draw_state.c b/layers/draw_state.c
index bffad7f7..75193b89 100644
--- a/layers/draw_state.c
+++ b/layers/draw_state.c
@@ -596,7 +596,9 @@ static void dsDumpDot(FILE* pOutFile)
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 c98c288c..298b30f9 100755
--- a/xgl-helper.py
+++ b/xgl-helper.py
@@ -1006,8 +1006,10 @@ class GraphVizGen:
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