From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 104143] r600/sb: clobbers gl_Position -> gl_FragCoord Date: Wed, 06 Dec 2017 14:32:07 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0393001901==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id B4B1B6E1B8 for ; Wed, 6 Dec 2017 14:32:06 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0393001901== Content-Type: multipart/alternative; boundary="15125707260.db0d.12491"; charset="UTF-8" --15125707260.db0d.12491 Date: Wed, 6 Dec 2017 14:32:06 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D104143 --- Comment #8 from Gert Wollny --- I found the problem:=20 if KC0[0].x =3D=3D index (=3D0):=20=20 1 x: ADD_INT T0.x, KC0[0].x, [0xfffffffe -nan].x 2 x: MOVA_INT __.x, T0.x Address register is now -2 and hence, in the next step R1 is unconditional= ly written, and this is actually the gl_Vertex value ... 3 z: MOV R[3+AR].z, 0 w: MOV R[3+AR].w, [0x3dcccccd 0.1].x that is here used to evaluate the gl_Posuition.=20 5 x: MUL_IEEE T0.x, KC0[1].w, R1.x y: MUL_IEEE T0.y, KC0[1].z, R1.x 6 t: MULADD_IEEE T0.y, KC0[2].z, R1.y, T0.y SCL_212 ... In the un-optimized shader R[3+AR].w is only written to if (KC0[0].x >=3D 2= ), and hence AR >=3D 0; I.e. the sb optimizer is to aggressive in optimizing away the conditional blocks. --=20 You are receiving this mail because: You are the assignee for the bug.= --15125707260.db0d.12491 Date: Wed, 6 Dec 2017 14:32:06 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 8 on bug 10414= 3 from Gert Wollny
I found the problem:=20

if KC0[0].x =3D=3D index (=3D0):=20=20

1      x: ADD_INT            T0.x,  KC0[0].x, [0xfffffffe -nan].x
2      x: MOVA_INT           __.x,  T0.x

Address register is now -2 and hence,  in the next step R1 is unconditional=
ly
written, and this is actually the gl_Vertex value ...

3      z: MOV                R[3+AR].z,  0
       w: MOV                R[3+AR].w,  [0x3dcccccd 0.1].x

that is here used to evaluate the gl_Posuition.=20

5      x: MUL_IEEE           T0.x,  KC0[1].w, R1.x
       y: MUL_IEEE           T0.y,  KC0[1].z, R1.x
6      t: MULADD_IEEE        T0.y,  KC0[2].z, R1.y, T0.y   SCL_212
...

In the un-optimized shader R[3+AR].w is only written to if (KC0[0].x >=
=3D 2), and
hence AR >=3D 0;

I.e. the sb optimizer is to aggressive in optimizing away the conditional
blocks.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15125707260.db0d.12491-- --===============0393001901== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0393001901==--