Always add a barrier when old layout was general in vulkan.
authoregdaniel <egdaniel@google.com>
Wed, 31 Aug 2016 17:13:08 +0000 (10:13 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 31 Aug 2016 17:13:08 +0000 (10:13 -0700)
commit19ff1035d3334ffa513c93edce04662bb5ead5bd
treea009226f86bc0b3dd52c210abf072f60d056e399
parent682580fb204b72925a48d1d6fe8c9c30fa53bb67
Always add a barrier when old layout was general in vulkan.

When we have a general layout, we need to always add a barrier even if
leaving the layout in general since we don't know what the use case for
general was with the old layout.

This doesn't seem to fix any of our synchronization issues which makes
sense since we don't really use a general layout much. The only place it
is used is for mipmap generation, but then we add explicit barriers in
that function itself and the first use of the image after mipmap generation
will change the layout to something other than general, usually SHADER_READ.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2298483002

Review-Url: https://codereview.chromium.org/2298483002
src/gpu/vk/GrVkImage.cpp
src/gpu/vk/GrVkMemory.cpp