From: Stephan Schmid Subject: [PATCH] r600g: fix relative addressing when splitting constant accesses Date: Tue, 12 Oct 2010 21:17:36 +0200 Message-ID: <201010122117.36937.stephan_2303@gmx.de> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_QRLtMc2VfOdMsME" Return-path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by gabe.freedesktop.org (Postfix) with SMTP id 10C7F9E75A for ; Tue, 12 Oct 2010 12:17:44 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --Boundary-00=_QRLtMc2VfOdMsME Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, currently r600g ignores relative constant addressing when splitting constant accesses into multiple instructions which is fixed by the attached patch. I noticed it when messing with vp-tris arl.txt of git://anongit.freedesktop.org/mesa/demos (I modified "arr[addr.x-2]" into "arr[addr.x]" in arl.txt to get rid of the negative register indices) Cheers Stephan Schmid --Boundary-00=_QRLtMc2VfOdMsME Content-Type: text/x-patch; charset="UTF-8"; name="0001-r600g-fix-relative-addressing-when-splitting-constan.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-r600g-fix-relative-addressing-when-splitting-constan.patch" =46rom 200cf6884ca06ecd4f3a8dcbf8f88e2d04ebab32 Mon Sep 17 00:00:00 2001 =46rom: Stephan Schmid Date: Mon, 11 Oct 2010 15:49:56 +0200 Subject: [PATCH] r600g: fix relative addressing when splitting constant acc= esses =2D-- src/gallium/drivers/r600/r600_shader.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r= 600/r600_shader.c index 3418003..df2789d 100644 =2D-- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -796,6 +796,7 @@ static int tgsi_split_constant(struct r600_shader_ctx *= ctx, struct r600_bc_alu_s alu.inst =3D CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV); alu.src[0].sel =3D r600_src[i].sel; alu.src[0].chan =3D k; + alu.src[0].rel =3D r600_src[i].rel; alu.dst.sel =3D treg; alu.dst.chan =3D k; alu.dst.write =3D 1; @@ -806,6 +807,7 @@ static int tgsi_split_constant(struct r600_shader_ctx *= ctx, struct r600_bc_alu_s return r; } r600_src[i].sel =3D treg; + r600_src[i].rel =3D0; j--; } } =2D-=20 1.7.1 --Boundary-00=_QRLtMc2VfOdMsME Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --Boundary-00=_QRLtMc2VfOdMsME--