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 2/3] i965: aub dump for render buffer
Date: Wed, 16 Feb 2011 14:07:40 +0800	[thread overview]
Message-ID: <1297836461-31543-4-git-send-email-zhenyuw@linux.intel.com> (raw)
In-Reply-To: <1297836461-31543-1-git-send-email-zhenyuw@linux.intel.com>

Add render buffer info in aub file. When fulsim runs it will dump
BMP file for each requested buffer.
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index c931df3..6446cba 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -38,6 +38,7 @@
 #include "intel_batchbuffer.h"
 #include "intel_tex.h"
 #include "intel_fbo.h"
+#include "intel_bufmgr.h"
 
 #include "brw_context.h"
 #include "brw_state.h"
@@ -521,6 +522,21 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
 			   surf.ss1.base_addr - region->buffer->offset,
 			   I915_GEM_DOMAIN_RENDER,
 			   I915_GEM_DOMAIN_RENDER);
+
+   if (INTEL_DEBUG & DEBUG_AUB) {
+       struct drm_intel_aub_surface_bmp bmp = {0};
+
+       bmp.x_offset = surf.ss5.x_offset;
+       bmp.y_offset = surf.ss5.y_offset;
+       bmp.pitch = region->pitch;
+       bmp.bits_per_pixel = region->cpp * 8;
+       bmp.format = AUB_DUMP_BMP_ARGB_8888;
+       bmp.width = surf.ss2.width + 1;
+       bmp.height = surf.ss2.height + 1;
+       bmp.tiling = surf.ss3.tiled_surface;
+       bmp.tiling_walk_y = surf.ss3.tile_walk;
+       drm_intel_gem_aub_dump_bmp(intel->bufmgr, region->buffer, 0, &bmp);
+   }
 }
 
 static void
-- 
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 ` [PATCH 1/3] intel: new debug option for aub file dump Zhenyu Wang
2011-02-16  6:07 ` Zhenyu Wang [this message]
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-4-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.