[Mesa-dev] [Bug 111308] [Regression, NIR, bisected] Black squares in Unigine Heaven via DXVK

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 6 15:53:44 UTC 2019


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

            Bug ID: 111308
           Summary: [Regression, NIR, bisected] Black squares in Unigine
                    Heaven via DXVK
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: danylo.piliaiev at gmail.com
        QA Contact: mesa-dev at lists.freedesktop.org

Created attachment 144958
  --> https://bugs.freedesktop.org/attachment.cgi?id=144958&action=edit
unigine_heaven_artifacts

On latest master there are black squares artifacts when running Unigine Heaven
through DXVK under wine.

It is bisected to:

96fcb3f95bdd53c8c1bdc243c95811acabd3f52c is the first bad commit
commit 96fcb3f95bdd53c8c1bdc243c95811acabd3f52c
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Oct 11 14:21:42 2018 -0700

    nir/algebraic: Use value range analysis to eliminate tautological compares
not used by if-statements

    This just eliminates tautological / contradictory compares that are used
    for bcsel and other non-if-statement cases.  If-statements are not
    affected because removing flow control can cause the i965 instrution
    scheduler to create some very long live ranges resulting in unncessary
    spilling.  This causes some shaders to fall of a performance cliff.

    Since many small if-statements are already flattened to bcsel, this
    optimization covers more than 68% of the possible cases (2417 shaders
    helped for instructions on Skylake vs. 3554).

    v2: Reorder and add whitespace to make the relationship between the
    patterns more obvious.  Suggested by Caio.

    All Gen7+ platforms had similar results. (Ice Lake shown)
    total instructions in shared programs: 16333474 -> 16322028 (-0.07%)
    instructions in affected programs: 438559 -> 427113 (-2.61%)
    helped: 1765
    HURT: 0
    helped stats (abs) min: 1 max: 275 x̄: 6.48 x̃: 4
    helped stats (rel) min: 0.20% max: 36.36% x̄: 4.07% x̃: 1.82%
    95% mean confidence interval for instructions value: -6.87 -6.10
    95% mean confidence interval for instructions %-change: -4.30% -3.84%
    Instructions are helped.

    total cycles in shared programs: 367608554 -> 367511103 (-0.03%)
    cycles in affected programs: 8368829 -> 8271378 (-1.16%)
    helped: 1541
    HURT: 129
    helped stats (abs) min: 1 max: 4468 x̄: 66.78 x̃: 39
    helped stats (rel) min: 0.01% max: 45.69% x̄: 4.10% x̃: 2.17%
    HURT stats (abs)   min: 1 max: 973 x̄: 42.25 x̃: 10
    HURT stats (rel)   min: 0.02% max: 64.39% x̄: 2.15% x̃: 0.60%
    95% mean confidence interval for cycles value: -64.90 -51.81
    95% mean confidence interval for cycles %-change: -3.89% -3.36%
    Cycles are helped.

    total spills in shared programs: 8867 -> 8868 (0.01%)
    spills in affected programs: 18 -> 19 (5.56%)
    helped: 0
    HURT: 1

    total fills in shared programs: 21900 -> 21903 (0.01%)
    fills in affected programs: 78 -> 81 (3.85%)
    helped: 0
    HURT: 1

    All Gen6 and earlier platforms had similar results. (Sandy Bridge shown)
    total instructions in shared programs: 10829877 -> 10829247 (<.01%)
    instructions in affected programs: 30240 -> 29610 (-2.08%)
    helped: 177
    HURT: 0
    helped stats (abs) min: 1 max: 15 x̄: 3.56 x̃: 3
    helped stats (rel) min: 0.37% max: 17.39% x̄: 2.68% x̃: 1.94%
    95% mean confidence interval for instructions value: -3.93 -3.18
    95% mean confidence interval for instructions %-change: -3.04% -2.32%
    Instructions are helped.

    total cycles in shared programs: 154036580 -> 154035437 (<.01%)
    cycles in affected programs: 352402 -> 351259 (-0.32%)
    helped: 96
    HURT: 28
    helped stats (abs) min: 1 max: 128 x̄: 14.73 x̃: 6
    helped stats (rel) min: 0.03% max: 24.00% x̄: 1.51% x̃: 0.46%
    HURT stats (abs)   min: 1 max: 117 x̄: 9.68 x̃: 4
    HURT stats (rel)   min: 0.03% max: 2.24% x̄: 0.43% x̃: 0.23%
    95% mean confidence interval for cycles value: -13.40 -5.03
    95% mean confidence interval for cycles %-change: -1.62% -0.53%
    Cycles are helped.

    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>

:040000 040000 30117ba78cfcc635e7974f4af6e4eff4f16eadf2
7e5be8503a115d930b1dc2591365e1ea0e1d4d5f M      src

The exact optimization which causes it is:

(('flt', 'b(is_not_positive)', 'a(is_gt_zero)'),      True),

Which itself looks correct. Maybe there is a bug in range analysis or/and some
wild NaN sneaked in.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190806/e80dcc02/attachment.html>


More information about the mesa-dev mailing list