From patchwork Fri Nov 29 06:57:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 3256551 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 51F039F1F4 for ; Fri, 29 Nov 2013 06:54:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 664652065A for ; Fri, 29 Nov 2013 06:54:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8203720651 for ; Fri, 29 Nov 2013 06:54:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 279D1FAB70; Thu, 28 Nov 2013 22:54:30 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 8025EFA867 for ; Thu, 28 Nov 2013 22:54:26 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 28 Nov 2013 22:54:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,796,1378882800"; d="scan'208";a="441898811" Received: from xhh-hsw32.sh.intel.com ([10.239.37.135]) by fmsmga002.fm.intel.com with ESMTP; 28 Nov 2013 22:54:25 -0800 From: "Xiang, Haihao" To: intel-gfx@lists.freedesktop.org Date: Fri, 29 Nov 2013 14:57:16 +0800 Message-Id: <1385708236-29833-4-git-send-email-haihao.xiang@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1385708236-29833-1-git-send-email-haihao.xiang@intel.com> References: <1385708236-29833-1-git-send-email-haihao.xiang@intel.com> Subject: [Intel-gfx] [Intel gfx][i-g-t PATCH 4/4] tests/gem_media_fill: the assembly code for the shader used in the case X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 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@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Xiang, Haihao" The code is for reference only Signed-off-by: Xiang, Haihao --- shaders/media/README | 6 ++++++ shaders/media/media_fill.gxa | 30 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 shaders/media/README create mode 100644 shaders/media/media_fill.gxa diff --git a/shaders/media/README b/shaders/media/README new file mode 100644 index 0000000..334106c --- /dev/null +++ b/shaders/media/README @@ -0,0 +1,6 @@ +These files are here for reference only. + +Commands used to generate the shader on gen8 +$> m4 media_fill.gxa > media_fill.gxm +$> intel-gen4asm -g 8 -o media_fill.gxm + diff --git a/shaders/media/media_fill.gxa b/shaders/media/media_fill.gxa new file mode 100644 index 0000000..d2931d4 --- /dev/null +++ b/shaders/media/media_fill.gxa @@ -0,0 +1,30 @@ +/* + * Registers + * g0 -- header + * g1 -- constant + * g2 -- inline data + * g3 -- reserved + * g4-g12 message payload + */ +define(`ORIG', `g2.0<2,2,1>UD') +define(`COLOR', `g1.0') +define(`COLORUB', `COLOR<0,1,0>UB') +define(`COLORUD', `COLOR<0,1,0>UD') + +mov(4) COLOR<1>UB COLORUB {align1}; + +/* WRITE */ +mov(8) g4.0<1>UD g0.0<8,8,1>UD {align1}; +mov(2) g4.0<1>UD ORIG {align1}; +mov(1) g4.8<1>UD 0x000f000fUD {align1}; + +mov(16) g5.0<1>UD COLORUD {align1 compr}; +mov(16) g7.0<1>UD COLORUD {align1 compr}; +mov(16) g9.0<1>UD COLORUD {align1 compr}; +mov(16) g11.0<1>UD COLORUD {align1 compr}; + +send(16) 4 acc0<1>UW null write(0, 0, 10, 0) mlen 9 rlen 0 {align1}; + +/* EOT */ +mov(8) g4.0<1>UD g0.0<8,8,1>UD {align1}; +send(16) 4 acc0<1>UW null thread_spawner(0, 0, 1) mlen 1 rlen 0 {align1 EOT};