layers: Fix for VkBufferImageCopy for depth/stencil
authorMarcin Kantoch <Marcin.Kantoch@amd.com>
Fri, 27 Jan 2017 11:33:21 +0000 (12:33 +0100)
committerMark Lobodzinski <mark@lunarg.com>
Fri, 27 Jan 2017 15:55:56 +0000 (08:55 -0700)
commit8d5226c619572dacf4778aa95dc51a98557f9554
treead963c73d77dd7e9b1693592a63e4a92091cd087
parent85dbd823c410a2817b077e2c6d1ee0cda7e247dd
layers: Fix for VkBufferImageCopy for depth/stencil

According to the Vulkan spec:

"If the the calling command's VkImage parameter's format is not a
depth/stencil format, then VkBufferImageCopy::bufferOffset must be
a multiple of the format's element size"

Currently the image validation layer is checking unconditionally if
VkBufferImageCopy::bufferOffset is a multiple of the format's
element size and reporting error otherwise.

Added code that skips the alignment check if the VkImage parameter's
format is combined depth/stencil.

Change-Id: I92f2a67eee590fa3616df9da121aceec65204c24
layers/image.cpp