summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-03-05 18:17:13 -0800
committerEric Anholt <eric@anholt.net>2009-03-05 19:42:18 -0800
commitcade74e3f4ddf7a5221c9f200ff4c130ab92924d (patch)
tree1ac10b4a7371fb782a4f879f3a585737a8791979 /src
parent40bc2748c2781600c748e546160bcc2aab637825 (diff)
i965: Stop dumping programs after the first all-zeroes entry.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_dump.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index b28c57c2bc..5d332d010c 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -162,6 +162,14 @@ static void brw_debug_prog(const char *name, dri_bo *prog)
fprintf(stderr, "%8s: 0x%08x: 0x%08x 0x%08x 0x%08x 0x%08x\n",
name, (unsigned int)prog->offset + i * 4 * 4,
data[i * 4], data[i * 4 + 1], data[i * 4 + 2], data[i * 4 + 3]);
+ /* Stop at the end of the program. It'd be nice to keep track of the actual
+ * intended program size instead of guessing like this.
+ */
+ if (data[i * 4 + 0] == 0 &&
+ data[i * 4 + 1] == 0 &&
+ data[i * 4 + 2] == 0 &&
+ data[i * 4 + 3] == 0)
+ break;
}
dri_bo_unmap(prog);