summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-03-18 22:14:00 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2007-03-18 22:14:00 +0000
commitc85a448e8a4e6e8db429cc6164de0f054f57a80e (patch)
tree97abb997d47a1c25c4f528e95c152fea2b28d9cc
parent856513bc0b34927b1cb10157187e2e8088434c43 (diff)
disassemble pixel shader packets
-rw-r--r--src/mesa/drivers/dri/i915tex/i915_vtbl.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i915tex/i915_vtbl.c b/src/mesa/drivers/dri/i915tex/i915_vtbl.c
index aff49e22b4..dfd1bbe936 100644
--- a/src/mesa/drivers/dri/i915tex/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915tex/i915_vtbl.c
@@ -44,21 +44,30 @@
#include "i915_context.h"
#include "i915_cache.h"
-static GLuint debug( const int *stream,
- const char *name,
- GLuint len )
+static GLuint debug( const int *stream, const char *name, GLuint len )
{
GLuint i;
- switch (len) {
- case 0:
+ if (len == 0)
_mesa_printf("Error - zero length packet (0x%08x)\n", stream[0]);
- break;
- default:
+ else
_mesa_printf("%s (%d dwords):\n", name, len);
- break;
+
+ return len;
+}
+
+static GLuint debug_program( const int *stream, const char *name, GLuint len )
+{
+ GLuint i;
+
+ if (len == 0) {
+ _mesa_printf("Error - zero length packet (0x%08x)\n", stream[0]);
+ return 0;
}
+ _mesa_printf("%s (%d dwords):\n", name, len);
+ i915_disassemble_program( stream, len );
+
return len;
}
@@ -130,7 +139,7 @@ static GLuint i915_debug_packet(const GLuint *stream)
case 0x4:
return debug(stream, "3DSTATE_LOAD_STATE_IMMEDIATE", (cmd & 0xf) + 2);
case 0x5:
- return debug(stream, "3DSTATE_PIXEL_SHADER_PROGRAM", (cmd & 0x1ff) + 2);
+ return debug_program(stream, "3DSTATE_PIXEL_SHADER_PROGRAM", (cmd & 0x1ff) + 2);
case 0x6:
return debug(stream, "3DSTATE_PIXEL_SHADER_CONSTANTS", (cmd & 0xff) + 2);
case 0x7: