Implement copying between a buffer and a texture 2D array on Vulkan (#257)

Implement copying between a buffer and a texture 2D array on Vulkan

This patch implements the creation of a 2D array texture and data
copying between a buffer and a layer of a 2D array texture on
Vulkan back-ends.

TEST=dawn_end2end_tests
This commit is contained in:
Jiawei Shao
2018-08-30 16:27:38 +08:00
committed by Corentin Wallez
parent ec72443bf1
commit 4b74dbef7b
12 changed files with 187 additions and 128 deletions

View File

@@ -434,7 +434,7 @@ namespace {
dawn::Buffer staging = utils::CreateBufferFromData(device, data, rowPitch * iImage.height, dawn::BufferUsageBit::TransferSrc);
auto cmdbuf = device.CreateCommandBufferBuilder()
.CopyBufferToTexture(staging, 0, rowPitch, oTexture, 0, 0, 0, iImage.width, iImage.height, 1, 0)
.CopyBufferToTexture(staging, 0, rowPitch, oTexture, 0, 0, 0, iImage.width, iImage.height, 1, 0, 0)
.GetResult();
queue.Submit(1, &cmdbuf);