From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 103743] Nier:Automata - "if" in fragment shader incorrectly evaluated, causes artifacts Date: Tue, 14 Nov 2017 18:09:01 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1949846582==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id BCC796E1C6 for ; Tue, 14 Nov 2017 18:09:01 +0000 (UTC) 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 --===============1949846582== Content-Type: multipart/alternative; boundary="15106829410.573a6D5.20595"; charset="UTF-8" --15106829410.573a6D5.20595 Date: Tue, 14 Nov 2017 18:09:01 +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=3D103743 Bug ID: 103743 Summary: Nier:Automata - "if" in fragment shader incorrectly evaluated, causes artifacts Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: philip.rebohle@tu-dortmund.de QA Contact: dri-devel@lists.freedesktop.org Created attachment 135457 --> https://bugs.freedesktop.org/attachment.cgi?id=3D135457&action=3Dedit Fragment shader with workaround When compiling Mesa against LLVM >=3D 5.0, Nier:Automata shows lighting art= ifacts that are caused by a misbehaving 'if' in a fragment shader. Apitrace that shows the issue (2.5G, bz2-compressed): https://mega.nz/#!JaBD0IoT!yBekRb7ZmvsSY60mo0E7N6uwaYfp_KfRDlnQWL0-QOo I attached a copy of the fragment shader that causes the problem, but also includes a workaround. The file name for MESA_SHADER_READ_PATH is FS_feba74122c9590d1522b92bbec52d662ecd99012.glsl. The offending code is located at line 135: R1.x =3D uintBitsToFloat(floatBitsToUint(R0).y >=3D 0x4u ? 0xffffffffu = : 0u); if (bool(floatBitsToUint(R1).x)) The artifacts go away when changing the original 'if' condition to the following: if (floatBitsToUint(R0).y >=3D 0x4u) This happens with both Mesa 17.2 and latest Mesa-git when compiling against LLVM 5.0 or later. This does *not* happen with LLVM 4.0.1. My GPU is an RX = 480. --=20 You are receiving this mail because: You are the assignee for the bug.= --15106829410.573a6D5.20595 Date: Tue, 14 Nov 2017 18:09:01 +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
Bug ID 103743
Summary Nier:Automata - "if" in fragment shader incorrectly= evaluated, causes artifacts
Product Mesa
Version git
Hardware x86-64 (AMD64)
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component Drivers/Gallium/radeonsi
Assignee dri-devel@lists.freedesktop.org
Reporter philip.rebohle@tu-dortmund.de
QA Contact dri-devel@lists.freedesktop.org

Created attachme=
nt 135457 [details]
Fragment shader with workaround

When compiling Mesa against LLVM >=3D 5.0, Nier:Automata shows lighting =
artifacts
that are caused by a misbehaving 'if' in a fragment shader.

Apitrace that shows the issue (2.5G, bz2-compressed):
https://mega.nz/#!JaBD0IoT!yBekRb7ZmvsSY60mo0E7N6uwaYfp_KfRDlnQWL0-=
QOo

I attached a copy of the fragment shader that causes the problem, but also
includes a workaround. The file name for MESA_SHADER_READ_PATH is
FS_feba74122c9590d1522b92bbec52d662ecd99012.glsl.

The offending code is located at line 135:

    R1.x =3D uintBitsToFloat(floatBitsToUint(R0).y >=3D 0x4u ? 0xfffffff=
fu : 0u);
    if (bool(floatBitsToUint(R1).x))

The artifacts go away when changing the original 'if' condition to the
following:

    if (floatBitsToUint(R0).y >=3D 0x4u)

This happens with both Mesa 17.2 and latest Mesa-git when compiling against
LLVM 5.0 or later. This does *not* happen with LLVM 4.0.1. My GPU is an RX =
480.


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