From: Eric Anholt Date: Fri, 6 Mar 2009 02:17:13 +0000 (-0800) Subject: i965: Stop dumping programs after the first all-zeroes entry. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cade74e3f4ddf7a5221c9f200ff4c130ab92924d;p=mesa.git i965: Stop dumping programs after the first all-zeroes entry. --- diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c index b28c57c2bcf..5d332d010c2 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);