All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: yuanhan.liu@intel.com
Subject: [PATCH 1/3] intel: new debug option for aub file dump
Date: Wed, 16 Feb 2011 14:07:39 +0800	[thread overview]
Message-ID: <1297836461-31543-3-git-send-email-zhenyuw@linux.intel.com> (raw)
In-Reply-To: <1297836461-31543-1-git-send-email-zhenyuw@linux.intel.com>

New INTEL_DEBUG option to enable aub file dump with intel drm.
---
 src/mesa/drivers/dri/intel/intel_context.c |   10 ++++++++++
 src/mesa/drivers/dri/intel/intel_context.h |    2 ++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 65c4148..45e9915 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -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);
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 134e07e..c3c83e4 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -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))		\
-- 
1.7.2.3

  parent reply	other threads:[~2011-02-16  6:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16  6:07 AUB file dump support patches Zhenyu Wang
2011-02-16  6:07 ` [PATCH] intel: Add AUB file dump support Zhenyu Wang
2011-02-22  5:20   ` Xiang, Haihao
2011-02-22  5:51     ` Zhenyu Wang
2011-02-22  6:09       ` Xiang, Haihao
2011-02-22  6:22         ` Zhenyu Wang
2011-02-22  6:51           ` Xiang, Haihao
2011-02-22  6:55             ` Zhenyu Wang
2011-02-22 17:33               ` Eric Anholt
2011-02-23  1:49                 ` Zhenyu Wang
2011-02-23  2:18                   ` Kenneth Graunke
2011-02-16  6:07 ` Zhenyu Wang [this message]
2011-02-16  6:07 ` [PATCH 2/3] i965: aub dump for render buffer Zhenyu Wang
2011-02-16  6:07 ` [PATCH 3/3] i965: new state cache for SF scissor on gen6 Zhenyu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297836461-31543-3-git-send-email-zhenyuw@linux.intel.com \
    --to=zhenyuw@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=yuanhan.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.