From patchwork Wed Feb 16 06:07:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 565771 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1G68tum030343 for ; Wed, 16 Feb 2011 06:09:15 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE2959EB3C for ; Tue, 15 Feb 2011 22:08:55 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id BCBF59E7EA for ; Tue, 15 Feb 2011 22:08:13 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 15 Feb 2011 22:07:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.60,479,1291622400"; d="scan'208";a="603105405" Received: from ubuntu-hp.sh.intel.com ([10.239.36.56]) by orsmga002.jf.intel.com with ESMTP; 15 Feb 2011 22:07:45 -0800 From: Zhenyu Wang To: intel-gfx@lists.freedesktop.org Date: Wed, 16 Feb 2011 14:07:40 +0800 Message-Id: <1297836461-31543-4-git-send-email-zhenyuw@linux.intel.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1297836461-31543-1-git-send-email-zhenyuw@linux.intel.com> References: <1297836461-31543-1-git-send-email-zhenyuw@linux.intel.com> Cc: yuanhan.liu@intel.com Subject: [Intel-gfx] [PATCH 2/3] i965: aub dump for render buffer X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 16 Feb 2011 06:09:15 +0000 (UTC) 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