intel/fs: Set src0 alpha present bit in header when provided in message payload.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 27 Dec 2019 22:14:06 +0000 (14:14 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 14 Feb 2020 22:31:48 +0000 (14:31 -0800)
commit57dee58c82d631261c953705c32dd2d383ec2f4f
tree3bdd4c51281a6a663d12d2ab05b1f0f4f49a44ba
parente14529ff3262a527d630cecac655f69c8ae15c3f
intel/fs: Set src0 alpha present bit in header when provided in message payload.

Currently the "Source0 Alpha Present to RenderTarget" bit of the RT
write message header is derived from brw_wm_prog_data::replicate_alpha.
However the src0_alpha payload is provided anytime it's specified to
the logical message.  This could theoretically lead to an
inconsistency if somebody provided a src0_alpha value while
brw_wm_prog_data::replicate_alpha was false, as I'm planning to do in
a future commit in order to implement a hardware workaround.

Instead calculate the header bit based on whether a src0_alpha value
was provided to the logical message, which guarantees the same
behavior on pre-ICL and ICL+ (the latter used an extended descriptor
bit for this which didn't suffer from the same issue).  Remove the
brw_wm_prog_data::replicate_alpha flag.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_fs_visitor.cpp