OSDN Git Service

anv: Disable dual source blending when shader doesn't support it on gen8+
authorDanylo Piliaiev <danylo.piliaiev@gmail.com>
Fri, 20 Jul 2018 09:54:42 +0000 (12:54 +0300)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 30 Oct 2018 19:59:53 +0000 (12:59 -0700)
commit00fc56a68d21d7aa91b95f0eaacba59a96c466f5
tree9eb37e00be0650684b871ac6a80dc53cda03ae97
parenteca4a6548d07bbbb02a7768edb397bad7b72cfc2
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>
src/intel/vulkan/genX_pipeline.c