i965: Add SF program disasm under INTEL_DEBUG=sf.

This commit is contained in:
Eric Anholt 2010-05-17 16:48:16 -07:00
parent b3f625f5e4
commit b8b2670fef
3 changed files with 11 additions and 2 deletions

View file

@ -46,6 +46,7 @@
static void compile_sf_prog( struct brw_context *brw,
struct brw_sf_prog_key *key )
{
struct intel_context *intel = &brw->intel;
struct brw_sf_compile c;
const GLuint *program;
GLuint program_size;
@ -107,6 +108,14 @@ static void compile_sf_prog( struct brw_context *brw,
*/
program = brw_get_program(&c.func, &program_size);
if (INTEL_DEBUG & DEBUG_SF) {
printf("sf:\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->sf.prog_bo);

View file

@ -476,7 +476,7 @@ static const struct dri_debug_control debug_control[] = {
{ "prim", DEBUG_PRIMS },
{ "vert", DEBUG_VERTS },
{ "dri", DEBUG_DRI },
{ "dma", DEBUG_DMA },
{ "sf", DEBUG_SF },
{ "san", DEBUG_SANITY },
{ "sleep", DEBUG_SLEEP },
{ "stats", DEBUG_STATS },

View file

@ -331,7 +331,7 @@ extern int INTEL_DEBUG;
#define DEBUG_PRIMS 0x4000
#define DEBUG_VERTS 0x8000
#define DEBUG_DRI 0x10000
#define DEBUG_DMA 0x20000
#define DEBUG_SF 0x20000
#define DEBUG_SANITY 0x40000
#define DEBUG_SLEEP 0x80000
#define DEBUG_STATS 0x100000