anv/pipeline: More aggressively optimize away color attachments
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 11 Jul 2018 06:31:47 +0000 (23:31 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 2 Aug 2018 01:02:28 +0000 (18:02 -0700)
commitb2e0b0dad6923ea6734cacba4b8282f32383f2a5
tree4c7b7d0ee097dcf08eaafd7d3fa5830aefc47a1d
parent80bc0b728c195517fd40027bd3c63f2483811b9f
anv/pipeline: More aggressively optimize away color attachments

Instead of just looking at the number of color attachments, look at
which ones are actually used by the subpass.  This lets us potentially
throw away chunks of the fragment shader.  In DXVK, for example, all
subpasses have 8 attachments and most are VK_ATTACHMENT_UNUSED so this
is very helpful in that case.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/intel/compiler/brw_compiler.h
src/intel/vulkan/anv_pipeline.c