anv/image: Get rid of the memset(aux, 0, sizeof(aux)) hack
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 18 May 2017 18:31:48 +0000 (11:31 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 23 May 2017 23:46:22 +0000 (16:46 -0700)
commit4eecd534f0544b62ae831a97708ade007541bd32
tree2a4b9f8ec815d623e0042d4d3404b7dd352f715e
parentcc45c4bb8072b6593812f9b68a7b3d2d00bfb9f0
anv/image: Get rid of the memset(aux, 0, sizeof(aux)) hack

Up until now, we've been memsetting the auxiliary surface to 0 at
BindImageMemory time to ensure that it is properly initialized.
However, this isn't correct because apps are allowed to freely alias
memory between different images and buffers so long as they properly
track whether or not a particular image is valid and, if it isn't,
transition from UNINITIALIZED to something else before using it.  We
now implement those transitions so we can drop the hack.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: "17.1" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_image.c