Refactor vulkan buffer mapping and unmapping
authoregdaniel <egdaniel@google.com>
Mon, 19 Sep 2016 16:32:09 +0000 (09:32 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 19 Sep 2016 16:32:09 +0000 (09:32 -0700)
commit927ac9c532084c816801434340383e4bd822c726
tree18a4a54190489672c4ee781b0aa507ac3c56af60
parent56b7dc476ba5e4a53ab24b5830b5ed03e404006d
Refactor vulkan buffer mapping and unmapping

A lot of this is so we don't have duplicated code in both the map/unmap and
updateData functions of GrVkBuffer. Also there were slightly differences in
how we handled various things in the two cases that this now unifies.

Also I added a barrier after the vkUpdateBuffer call which I believe was
missing.

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

Review-Url: https://codereview.chromium.org/2344323002
src/gpu/vk/GrVkBuffer.cpp
src/gpu/vk/GrVkBuffer.h
src/gpu/vk/GrVkGpu.cpp
src/gpu/vk/GrVkUniformBuffer.h