@@ -522,6 +522,7 @@ static const struct dri_debug_control debug_control[] = {
{ "urb", DEBUG_URB },
{ "vs", DEBUG_VS },
{ "clip", DEBUG_CLIP },
+ { "aub", DEBUG_AUB },
{ NULL, 0 }
};
@@ -863,6 +864,15 @@ intelInitContext(struct intel_context *intel,
if (INTEL_DEBUG & DEBUG_BUFMGR)
dri_bufmgr_set_debug(intel->bufmgr, GL_TRUE);
+ if (INTEL_DEBUG & DEBUG_AUB) {
+ fprintf(stderr, "Enable Aub file dump.\n");
+ intel->aub_file = fopen("intel.aub", "w");
+ if (intel->aub_file)
+ drm_intel_bufmgr_gem_set_aubfile(intel->bufmgr, intel->aub_file);
+ else
+ fprintf(stderr, "Fail to create aub file.\n");
+ }
+
intel->batch = intel_batchbuffer_alloc(intel);
intel_fbo_init(intel);
@@ -267,6 +267,7 @@ struct intel_context
* Configuration cache
*/
driOptionCache optionCache;
+ FILE *aub_file;
};
extern char *__progname;
@@ -360,6 +361,7 @@ extern int INTEL_DEBUG;
#define DEBUG_URB 0x1000000
#define DEBUG_VS 0x2000000
#define DEBUG_CLIP 0x8000000
+#define DEBUG_AUB 0x10000000
#define DBG(...) do { \
if (unlikely(INTEL_DEBUG & FILE_DEBUG_FLAG)) \