anv: Rework CCS memory handling on TGL-LP

The previous way we were attempting to handle AUX tables on TGL-LP was
very GL-like.  We used the same aux table management code that's shared
with iris and we updated the table on image create/destroy.  The problem
with this is that Vulkan allows multiple VkImage objects to be bound to
the same memory location simultaneously and the app can ping-pong back
and forth between them in the same command buffer.  Because the AUX
table contains format-specific data, we cannot support this ping-pong
behavior with only CPU updates of the AUX table.

The new mechanism switches things around a bit and instead makes the aux
data part of the BO.  At BO creation time, a bit of space is appended to
the end of the BO for AUX data and the AUX table is updated in bulk for
the entire BO.  The problem here, of course, is that we can't insert the
format-specific data into the AUX table at BO create time.

Fortunately, Vulkan has a requirement that every TILING_OPTIMAL image
must be initialized prior to use by transitioning the image from
VK_IMAGE_LAYOUT_UNDEFINED to something else.  When doing the above
described ping-pong behavior, the app has to do such an initialization
transition every time it corrupts the underlying memory of the VkImage
by using it as something else.  We can hook into this initialization and
use it to update the AUX-TT entries from the command streamer.  This way
the AUX table gets its format information, apps get aliasing support,
and everyone is happy.

One side-effect of this is that we disallow CCS on shared buffers.
We'll need to fix this for modifiers on the scanout path but that's a
task for another patch.  We should be able to do it with dedicated
allocations.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Marge Bot <mesa/mesa!3519>
Part-of: <mesa/mesa!3519>
38 jobs for !3519 with wip/tgl-aux-tt-alias in 15 minutes and 8 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Container
passed #1461570
aarch64
arm_build

00:00:26

passed #1461571
aarch64
arm_test

00:00:19

passed #1461567
x86_build

00:00:18

passed #1461569
x86_build_old

00:00:19

passed #1461568
x86_test-gl

00:00:18

 
  Build
passed #1461575
aarch64
meson-arm64

00:06:16

passed #1461574
aarch64
meson-armhf

00:06:29

passed #1461576
meson-clang

00:04:59

passed #1461579
meson-clover

00:04:54

passed #1461580
meson-clover-old-llvm

00:05:29

passed #1461582
meson-i386

00:04:24

passed #1461573
meson-main

00:05:40

passed #1461583
meson-mingw32-x86_64

00:03:38

passed #1461572
meson-testing

00:05:35

passed #1461581
meson-vulkan

00:01:54

passed #1461584
scons

00:04:46

passed #1461585
scons-old-llvm

00:03:41

passed #1461577
scons-swr

00:02:28

passed #1461578
scons-win64

00:04:19

 
  Test
passed #1461604
db410c
arm64_a306_gles2

00:06:03

passed #1461601
mesa-cheza
arm64_a630_gles2

00:01:45

passed #1461603
mesa-cheza
arm64_a630_gles3

00:06:22

passed #1461602
mesa-cheza
arm64_a630_gles31

00:04:39

passed #1461589
lava-meson-gxl-s905x-libretech-cc
lima-mali450-test:arm64

00:08:11

passed #1461586
lava-sun50i-h6-pine-h64
panfrost-t720-test:arm64

00:08:21

passed #1461587
lava-rk3288-veyron-jaq
panfrost-t760-test:armhf

00:05:53

passed #1461588
lava-rk3399-gru-kevin
panfrost-t860-test:arm64

00:05:43

passed #1461591
piglit-glslparser

00:04:43

passed #1461590
piglit-quick_gl

00:08:03

passed #1461592
piglit-quick_shader

00:05:35

passed #1461593
test-llvmpipe-gles2

00:04:14

passed #1461594
test-softpipe-gles2

00:01:34

passed #1461597
test-softpipe-gles31 1/4

00:02:44

passed #1461595
test-softpipe-gles3 1/2

00:05:12

passed #1461598
test-softpipe-gles31 2/4

00:04:21

passed #1461599
test-softpipe-gles31 3/4

00:04:47

passed #1461600
test-softpipe-gles31 4/4

00:03:10

passed #1461596
test-softpipe-gles3 2/2

00:03:29