[Bug 105440] GEN7: rendering issue on citra

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 14 13:33:47 UTC 2018


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

--- Comment #2 from vadym <vadym.shovkoplias at globallogic.com> ---
Bisected:

2458ea95c5676807a064f24ec720f12506975402 is the first bad commit
commit 2458ea95c5676807a064f24ec720f12506975402
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Wed Sep 9 14:40:06 2015 -0700

    nir/lower_vec_to_movs: Coalesce movs on-the-fly when possible

    The old pass blindly inserted a bunch of moves into the shader with no
    concern for whether or not it was really needed.  This adds code to try and
    coalesce into the destination of the instruction providing the value.

    Shader-db results for vec4 shaders on Haswell:

       total instructions in shared programs: 1754420 -> 1747753 (-0.38%)
       instructions in affected programs:     231230 -> 224563 (-2.88%)
       helped:                                1017
       HURT:                                  2

    This approach is heavily based on a different patch by Eduardo Lima Mitev
    <elima at igalia.com>.  Eduardo's patch did this in a separate pass as opposed
    to integrating it into nir_lower_vec_to_movs.

    Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>

Issue is related to optimizations in try_coalesce() function. With the simple
change bug is no longer reproducible:

diff --git a/src/compiler/nir/nir_lower_vec_to_movs.c
b/src/compiler/nir/nir_lower_vec_to_movs.c
index 711ddd3..73efa0e 100644
--- a/src/compiler/nir/nir_lower_vec_to_movs.c
+++ b/src/compiler/nir/nir_lower_vec_to_movs.c
@@ -263,8 +263,8 @@ lower_vec_to_movs_block(nir_block *block, nir_function_impl
*impl)
          if (!(vec->dest.write_mask & (1 << i)))
             continue;

-         if (!(finished_write_mask & (1 << i)))
-            finished_write_mask |= try_coalesce(vec, i);
+         //if (!(finished_write_mask & (1 << i)))
+         //   finished_write_mask |= try_coalesce(vec, i);

          if (!(finished_write_mask & (1 << i)))
             finished_write_mask |= insert_mov(vec, i, shader);

Below are the results of Shader-db on Haswell with this patch:

total instructions in shared programs: 241498 -> 241599 (0.04%)
instructions in affected programs: 25728 -> 25829 (0.39%)
helped: 14
HURT: 29

total cycles in shared programs: 142924052 -> 143021242 (0.07%)
cycles in affected programs: 85446208 -> 85543398 (0.11%)
helped: 16
HURT: 64

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180314/f0f56853/attachment.html>


More information about the intel-3d-bugs mailing list