Update usage of CopyBufferToTexture and CopyTextureToBuffer to include row pitch

This commit is contained in:
Austin Eng
2017-07-13 11:19:14 -04:00
committed by Austin Eng
parent 359acd6e95
commit c5f8e7ae77
5 changed files with 41 additions and 41 deletions

View File

@@ -69,7 +69,7 @@ void initTextures() {
nxt::Buffer stagingBuffer = utils::CreateFrozenBufferFromData(device, data.data(), static_cast<uint32_t>(data.size()), nxt::BufferUsageBit::TransferSrc);
nxt::CommandBuffer copy = device.CreateCommandBufferBuilder()
.TransitionTextureUsage(texture, nxt::TextureUsageBit::TransferDst)
.CopyBufferToTexture(stagingBuffer, 0, texture, 0, 0, 0, 1024, 1024, 1, 0)
.CopyBufferToTexture(stagingBuffer, 0, 0, texture, 0, 0, 0, 1024, 1024, 1, 0)
.GetResult();
queue.Submit(1, &copy);