Bug 107306 - [GEN8+] Hang when discarding a fragment if dual source blending is enabled but shader doesn't support it
Summary: [GEN8+] Hang when discarding a fragment if dual source blending is enabled bu...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
Depends on: 107088
  Show dependency treegraph
Reported: 2018-07-20 11:10 UTC by Denis
Modified: 2018-10-30 20:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Denis 2018-07-20 11:10:08 UTC
Hi, as we found out, the same issue exists and for Vulkan (original description can be found in this issue -> https://bugs.freedesktop.org/show_bug.cgi?id=107088 )
Patch was also sent for review:

Comment 1 Kenneth Graunke 2018-10-30 20:00:39 UTC
Fixed by:

commit 00fc56a68d21d7aa91b95f0eaacba59a96c466f5 (HEAD -> master)
Author: Danylo Piliaiev <danylo.piliaiev@gmail.com>
Date:   Fri Jul 20 12:54:42 2018 +0300

    anv: Disable dual source blending when shader doesn't support it on gen8+
    Dual source blending behaviour is undefined when shader doesn't
    have second color output.
     "If SRC1 is included in a src/dst blend factor and
      a DualSource RT Write message is not used, results
      are UNDEFINED. (This reflects the same restriction in DX APIs,
      where undefined results are produced if “o1” is not written
      by a PS – there are no default values defined)."
    Dismissing fragment in such situation leads to a hang on gen8+
    if depth test in enabled.
    Since blending cannot be gracefully fixed in such case and the result
    is undefined - blending is simply disabled.
    v2 (Jason Ekstrand):
     - Apply the workaround to each individual entry
     - Emit a warning through debug_report
    Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.