Mesa (master): i965: Stop dumping programs after the first all-zeroes entry .
Eric Anholt
anholt at kemper.freedesktop.org
Fri Mar 6 07:44:12 UTC 2009
Module: Mesa
Branch: master
Commit: cade74e3f4ddf7a5221c9f200ff4c130ab92924d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cade74e3f4ddf7a5221c9f200ff4c130ab92924d
Author: Eric Anholt <eric at anholt.net>
Date: Thu Mar 5 18:17:13 2009 -0800
i965: Stop dumping programs after the first all-zeroes entry.
---
src/mesa/drivers/dri/i965/brw_state_dump.c | 8 ++++++++
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 b28c57c..5d332d0 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);
More information about the mesa-commit
mailing list