From: Eric Anholt Date: Mon, 17 May 2010 23:48:16 +0000 (-0700) Subject: i965: Add SF program disasm under INTEL_DEBUG=sf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8b2670fef4790d650939fece8c7e6c7b76c3171;p=mesa.git i965: Add SF program disasm under INTEL_DEBUG=sf. --- diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c index 57d1c29ade1..e05a038d483 100644 --- a/src/mesa/drivers/dri/i965/brw_sf.c +++ b/src/mesa/drivers/dri/i965/brw_sf.c @@ -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); diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index e714e2e90b0..a94f6886f98 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -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 }, diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index 7541f1dfbbd..dae5896a5cd 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -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