[Bug 101648] Adding a single-iteration do-while loop in a GLSL shader leads to a different image

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 2 09:51:19 UTC 2018


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

--- Comment #8 from Andriy Khulap <andriy.khulap at globallogic.com> ---
I am able to reproduce this issue on Skylake GT2. But it looks like it is
already fixed. Tested the fallowing mesa versions:
    Mesa 17.3.6 (git-b3e5a3f35b) - FAIL
    Mesa 17.3.7 (git-8a51f3857c) - FAIL
    mesa-18.0.0-rc1 (e91e68d6a87a14) - OK
    Mesa 18.0.0 (git-dceb1ce807) - OK
    Mesa 18.1.0-devel (git-e7fc18097e) - OK

Bisected and found the fix (tested it by reverting from the latest mesa
master):

commit 4d1959e69328cf0d59f0ec7aeea5a2b704ef0c5f
Author: Francisco Jerez <currojerez at riseup.net>
Date:   Fri Oct 13 17:52:00 2017 -0700

    intel/cfg: Represent divergent control flow paths caused by non-uniform
loop execution.

    This addresses a long-standing back-end compiler bug that could lead
    to cross-channel data corruption in loops executed non-uniformly.  In
    some cases live variables extending through a loop divergence point
    (e.g. a non-uniform break) into a convergence point (e.g. the end of
    the loop) wouldn't be considered live along all physical control flow
    paths the SIMD thread could possibly have taken in between due to some
    channels remaining in the loop for additional iterations.

    This patch fixes the problem by extending the CFG with physical edges
    that don't exist in the idealized non-vectorized program, but
    represent valid control flow paths the SIMD EU may take due to the
    divergence of logical threads.  This makes sense because the i965 IR
    is explicitly SIMD, and it's not uncommon for instructions to have an
    influence on neighboring channels (e.g. a force_writemask_all header
    setup), so the behavior of the SIMD thread as a whole needs to be
    considered.

    No changes in shader-db.

    Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

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


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