i965: Add program dumping for INTEL_DEBUG=gs.

This commit is contained in:
Eric Anholt 2010-05-14 10:04:41 -07:00
parent 1c25353bc6
commit c1423e34f9
3 changed files with 12 additions and 2 deletions

View File

@ -122,6 +122,16 @@ static void compile_gs_prog( struct brw_context *brw,
*/
program = brw_get_program(&c.func, &program_size);
if (INTEL_DEBUG & DEBUG_GS) {
int i;
printf("gs:\n");
for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
brw_disasm(stdout, &((struct brw_instruction *)program)[i],
intel->gen);
printf("\n");
}
/* Upload
*/
dri_bo_unreference(brw->gs.prog_bo);

View File

@ -471,7 +471,7 @@ static const struct dri_debug_control debug_control[] = {
{ "buf", DEBUG_BUFMGR},
{ "reg", DEBUG_REGION},
{ "fbo", DEBUG_FBO},
{ "lock", DEBUG_LOCK},
{ "gs", DEBUG_GS},
{ "sync", DEBUG_SYNC},
{ "prim", DEBUG_PRIMS },
{ "vert", DEBUG_VERTS },

View File

@ -326,7 +326,7 @@ extern int INTEL_DEBUG;
#define DEBUG_BUFMGR 0x200
#define DEBUG_REGION 0x400
#define DEBUG_FBO 0x800
#define DEBUG_LOCK 0x1000
#define DEBUG_GS 0x1000
#define DEBUG_SYNC 0x2000
#define DEBUG_PRIMS 0x4000
#define DEBUG_VERTS 0x8000