From: bugzilla-daemon@freedesktop.org
Subject: [Bug 111241] Shadertoy shader causing hang
Date: Wed, 14 Aug 2019 12:56:48 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0641818296=="
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 62DCD6E5D4
for ; Wed, 14 Aug 2019 12:56:48 +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
--===============0641818296==
Content-Type: multipart/alternative; boundary="15657874081.E51d.2135"
Content-Transfer-Encoding: 7bit
--15657874081.E51d.2135
Date: Wed, 14 Aug 2019 12:56:48 +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=3D111241
--- Comment #6 from Pierre-Eric Pelloux-Prayer ---
I've created a different shadertoy showing the problem:
https://www.shadertoy.com/view/Wt2SW1 (but this one doesn't hang the GPU).
The shader for "Buffer A" is:
0: MOV TEMP[0], SV[0]
1: MAD TEMP[0].y, SV[0], CONST[0][2].xxxx, CONST[0][2].yyyy
2: MOV OUT[0], IMM[0].xxxx
3: USEQ TEMP[1].x, CONST[0][1].xxxx, IMM[1].xxxx
4: UIF TEMP[1].xxxx
5: ADD TEMP[2], TEMP[2], -TEMP[2]
6: ELSE
[...]
13: MOV OUT[0], TEMP[2]
14: END
TEMP[2] is used before being assigned a value, so I suppose that's what all=
ows
LLVM to turn line 5 in:
v_mov_b32_e32 v3, 0x7fc00000
v_mov_b32_e32 v2, 0x7fc00000
v_mov_b32_e32 v1, 0x7fc00000
v_mov_b32_e32 v0, 0x7fc00000
(ie: output is NaN)
A possible way to fix this is to transform "dst =3D x - x" operations in "d=
st =3D
0" which is what nir does in its nir_opt_algebraic pass.
I've open a MR to fix/discuss this issue:
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1681
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--15657874081.E51d.2135
Date: Wed, 14 Aug 2019 12:56:48 +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 # 6
on bug 11124=
1
from Pierre=
-Eric Pelloux-Prayer
I've created a different shadertoy showing the problem:
https://www.shadertoy.com=
/view/Wt2SW1 (but this one doesn't hang the GPU).
The shader for "Buffer A" is:
0: MOV TEMP[0], SV[0]
1: MAD TEMP[0].y, SV[0], CONST[0][2].xxxx, CONST[0][2].yyyy
2: MOV OUT[0], IMM[0].xxxx
3: USEQ TEMP[1].x, CONST[0][1].xxxx, IMM[1].xxxx
4: UIF TEMP[1].xxxx
5: ADD TEMP[2], TEMP[2], -TEMP[2]
6: ELSE
[...]
13: MOV OUT[0], TEMP[2]
14: END
TEMP[2] is used before being assigned a value, so I suppose that's what all=
ows
LLVM to turn line 5 in:
v_mov_b32_e32 v3, 0x7fc00000
v_mov_b32_e32 v2, 0x7fc00000
v_mov_b32_e32 v1, 0x7fc00000
v_mov_b32_e32 v0, 0x7fc00000
(ie: output is NaN)
A possible way to fix this is to transform "dst =3D x - x" operat=
ions in "dst =3D
0" which is what nir does in its nir_opt_algebraic pass.
I've open a MR to fix/discuss this issue:
ht=
tps://gitlab.freedesktop.org/mesa/mesa/merge_requests/1681
You are receiving this mail because:
- You are the assignee for the bug.
=
--15657874081.E51d.2135--
--===============0641818296==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs
IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz
dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs
--===============0641818296==--