From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 111241] Shadertoy shader causing hang Date: Fri, 09 Aug 2019 16:22:09 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1536819545==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 42AF86EE57 for ; Fri, 9 Aug 2019 16:22:09 +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 --===============1536819545== Content-Type: multipart/alternative; boundary="15653677290.9BAA3.21266" Content-Transfer-Encoding: 7bit --15653677290.9BAA3.21266 Date: Fri, 9 Aug 2019 16:22:09 +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 #3 from Pierre-Eric Pelloux-Prayer --- Here's my understanding of the issue. This shader uses 2 passes: - the first pass has BufferA as input and output and does: if (first frame) // init bufferA content else // do something useful - the 2nd pass has BufferA as input and does: N =3D texelFetch(bufferA) for(i=3D0; i < N; i++) // do something The problem here is the "// init bufferA content": it fails to initialize t= he buffer content properly, leading to an infinite loop in the 2nd pass. The exact code is: if (iFrame=3D=3D0) { O -=3D O; return; } If one replaces this line with: if (iFrame=3D=3D0) { O =3D vec4(0.0f); return; } The shader works fine (you can test the modified version here: https://www.shadertoy.com/view/wtSXzw ). --=20 You are receiving this mail because: You are the assignee for the bug.= --15653677290.9BAA3.21266 Date: Fri, 9 Aug 2019 16:22:09 +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 # 3 on bug 11124= 1 from Pierre= -Eric Pelloux-Prayer
Here's my understanding of the issue.

This shader uses 2 passes:
 - the first pass has BufferA as input and output and does:

if (first frame)
  // init bufferA content
else
  // do something useful

 - the 2nd pass has BufferA as input and does:

N =3D texelFetch(bufferA)
for(i=3D0; i < N; i++)
  // do something


The problem here is the "// init bufferA content": it fails to in=
itialize the
buffer content properly, leading to an infinite loop in the 2nd pass.

The exact code is:
   if (iFrame=3D=3D0) { O -=3D O; return; }

If one replaces this line with:
   if (iFrame=3D=3D0) { O =3D vec4(0.0f); return; }

The shader works fine (you can test the modified version here:
https://www.shadertoy.com=
/view/wtSXzw ).


You are receiving this mail because:
  • You are the assignee for the bug.
= --15653677290.9BAA3.21266-- --===============1536819545== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1536819545==--