i965/fs: Fix slight layering violation in emit_single_fb_writes().
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 15 Jul 2015 13:42:57 +0000 (16:42 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 29 Jul 2015 11:12:46 +0000 (14:12 +0300)
commit1ad928ed9f4e7723f709f91d18d17726c92f0b7b
tree454db093c38bc91a9694fe83c76665613399d53b
parentf68ec2baf49e37f9ce4fffe95f13177eb7225015
i965/fs: Fix slight layering violation in emit_single_fb_writes().

In cases where the color0 argument wasn't being provided,
emit_single_fb_writes() would take the alpha channel directly from the
visitor state instead of taking it from its arguments.  This sort of
hack didn't fit nicely into the logical send-message approach because
all parameters of the instruction have to be visible to the SIMD
lowering pass for it to be able to split them into halves at all.

Fix it by using LOAD_PAYLOAD in fs_visitor::emit_fb_writes() to
provide an actual color0 vector with undefined contents except for the
alpha component to match the previous behavior when no color buffers
are enabled.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp