anv: Don't ambiguate for undefined layouts on TGL+
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 30 Nov 2022 23:02:14 +0000 (15:02 -0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 6 Dec 2022 00:49:17 +0000 (00:49 +0000)
commitea4de4ad3d13af714db4f7956ed4262eafd6460b
tree27609d073eb0c89db38ac399e1ec50ce1211bf72
parent5c84b318916c114712b28b6211e4de712ef51ca7
anv: Don't ambiguate for undefined layouts on TGL+

For Tiger Lake and onward, we generally don't need to ambiguate the CCS
before accessing it. This is safe for two reasons:

- Tiger Lake and onward treat all CCS values as legal.
- We enable compression on all writable image layouts. The CCS will
  receive all writes and will therefore always be valid.

When dealing with modifiers, we continue to allow ambiguates in some
instances.

Before this patch, I found ~19.5k ambiguates in Wolfenstein:
Youngblood's Riverside benchmark (note that this includes manually
entering the benchmark and exiting the app). With this patch, the number
of ambiguates goes down to zero.

Improves performance of Fallout 4 at 1080p/High settings on Arc A380 by
around 22%.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20118>
src/intel/vulkan/genX_cmd_buffer.c