dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 103743] Nier:Automata - "if" in fragment shader incorrectly evaluated, causes artifacts
Date: Tue, 14 Nov 2017 18:09:01 +0000	[thread overview]
Message-ID: <bug-103743-502@http.bugs.freedesktop.org/> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1744 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=103743

            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=135457&action=edit
Fragment shader with workaround

When compiling Mesa against LLVM >= 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 = uintBitsToFloat(floatBitsToUint(R0).y >= 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 >= 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.

[-- Attachment #1.2: Type: text/html, Size: 3395 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2017-11-14 18:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 18:09 bugzilla-daemon [this message]
2017-11-14 18:10 ` [Bug 103743] Nier:Automata - "if" in fragment shader incorrectly evaluated, causes artifacts bugzilla-daemon
2017-11-14 18:10 ` bugzilla-daemon
2017-11-14 18:21 ` bugzilla-daemon
2017-11-27 11:02 ` bugzilla-daemon
2017-11-27 12:04 ` bugzilla-daemon
2017-11-27 20:42 ` bugzilla-daemon
2017-11-28 12:27 ` bugzilla-daemon
2017-11-28 12:28 ` bugzilla-daemon
2017-11-28 17:31 ` bugzilla-daemon
2017-11-28 17:33 ` bugzilla-daemon
2017-11-28 17:34 ` bugzilla-daemon
2018-04-18  9:50 ` bugzilla-daemon
2018-04-28 14:09 ` bugzilla-daemon
2019-02-18  1:36 ` bugzilla-daemon
2019-09-17  2:49 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-103743-502@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).