Add sync in vulkan when writing to linear texture

Since mapping memory of linear textures happens in real time and not via
a command buffer, we need to flush all work that access the texture
before uploading new data to it. Even if the texture is already in the
correct layout, General, we still need to make sure all work has been
finished.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1943333002

Review-Url: https://codereview.chromium.org/1943333002
This commit is contained in:
egdaniel 2016-05-03 07:25:56 -07:00 committed by Commit bot
parent 89d09a1f70
commit bdf8811b31

View File

@ -280,6 +280,7 @@ bool GrVkGpu::onWritePixels(GrSurface* surface,
srcStageMask,
dstStageMask,
false);
this->submitCommandBuffer(kForce_SyncQueue);
}
success = this->uploadTexDataLinear(vkTex, left, top, width, height, config,
texels.begin()->fPixels, texels.begin()->fRowBytes);