From patchwork Mon Feb 4 15:27:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 2092651 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 533BD3FC23 for ; Mon, 4 Feb 2013 15:34:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 45A0AE6143 for ; Mon, 4 Feb 2013 07:34:20 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id BF5DAE60E7 for ; Mon, 4 Feb 2013 07:29:06 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 04 Feb 2013 07:27:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,600,1355126400"; d="scan'208";a="257441568" Received: from unknown (HELO dyon.amr.corp.intel.com) ([10.255.12.132]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2013 07:28:59 -0800 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Mon, 4 Feb 2013 15:27:04 +0000 Message-Id: <1359991705-5254-10-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.7.7.5 In-Reply-To: <1359991705-5254-1-git-send-email-damien.lespiau@intel.com> References: <1359991705-5254-1-git-send-email-damien.lespiau@intel.com> Subject: [Intel-gfx] [PATCH 09/90] assembler: Rename dp_gen6 to gen6_dp and sync with Mesa's 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+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org The purpose of this commit is to synchronize opcode definitions across the gen4asm assembler and mesa. I had to drop how mesa splits msg_control as the current assembly language gives access the the whole msg_control field. Recompiling the xorg and the intel driver of libva shaders doesn't show any difference in the assembly created. Signed-off-by: Damien Lespiau --- assembler/brw_structs.h | 34 ++++++++++++++++++++++------------ assembler/gram.y | 8 ++++---- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/assembler/brw_structs.h b/assembler/brw_structs.h index e2be147..e571052 100644 --- a/assembler/brw_structs.h +++ b/assembler/brw_structs.h @@ -1513,18 +1513,28 @@ struct brw_instruction GLuint end_of_thread:1; } dp_write_gen6; - struct { - GLuint binding_table_index:8; - GLuint msg_control:5; - GLuint msg_type:4; - GLuint send_commit_msg:1; /* ignore on read message */ - GLuint pad0:1; - GLuint header_present:1; - GLuint response_length:5; - GLuint msg_length:4; - GLuint pad1:2; - GLuint end_of_thread:1; - } dp_gen6; + /** + * Message for the Sandybridge Render Cache Data Port. + * + * Most fields are defined in the Sandybridge PRM, Volume 4 Part 1, + * Section 3.9.2.1.1: Message Descriptor. + * + * "Slot Group Select" and "Last Render Target" are part of the + * 5-bit message control for Render Target Write messages. See + * Section 3.9.9.2.1 of the same volume. + */ + struct { + GLuint binding_table_index:8; + GLuint msg_control:5; + GLuint msg_type:4; + GLuint send_commit_msg:1; + GLuint pad0:1; + GLuint header_present:1; + GLuint response_length:5; + GLuint msg_length:4; + GLuint pad1:2; + GLuint end_of_thread:1; + } gen6_dp; struct { GLuint binding_table_index:8; diff --git a/assembler/gram.y b/assembler/gram.y index 70caeb4..df26393 100644 --- a/assembler/gram.y +++ b/assembler/gram.y @@ -1471,10 +1471,10 @@ msgtarget: NULL_TOKEN YYERROR; } - $$.bits3.dp_gen6.send_commit_msg = $11; - $$.bits3.dp_gen6.binding_table_index = $9; - $$.bits3.dp_gen6.msg_control = $7; - $$.bits3.dp_gen6.msg_type = $5; + $$.bits3.gen6_dp.send_commit_msg = $11; + $$.bits3.gen6_dp.binding_table_index = $9; + $$.bits3.gen6_dp.msg_control = $7; + $$.bits3.gen6_dp.msg_type = $5; } else if (!IS_GENp(5)) { fprintf (stderr, "Gen6- doesn't support data port for sampler/render/constant/data cache\n"); YYERROR;