All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 103743] Nier:Automata - "if" in fragment shader incorrectly evaluated, causes artifacts
@ 2017-11-14 18:09 bugzilla-daemon
  2017-11-14 18:10 ` bugzilla-daemon
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: bugzilla-daemon @ 2017-11-14 18:09 UTC (permalink / raw)
  To: dri-devel


[-- 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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-09-17  2:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-14 18:09 [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: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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.