mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
Add bufferOffset to CopyBufferToTexture.
This commit is contained in:
committed by
Corentin Wallez
parent
a2d4d14bd4
commit
7f433a5b52
@@ -377,7 +377,7 @@ namespace {
|
||||
staging.FreezeUsage(nxt::BufferUsageBit::TransferSrc);
|
||||
auto cmdbuf = device.CreateCommandBufferBuilder()
|
||||
.TransitionTextureUsage(oTexture, nxt::TextureUsageBit::TransferDst)
|
||||
.CopyBufferToTexture(staging, oTexture, 0, 0, 0, 1, 1, 1, 0)
|
||||
.CopyBufferToTexture(staging, 0, oTexture, 0, 0, 0, 1, 1, 1, 0)
|
||||
.GetResult();
|
||||
queue.Submit(1, &cmdbuf);
|
||||
oTexture.FreezeUsage(nxt::TextureUsageBit::Sampled);
|
||||
@@ -440,7 +440,7 @@ namespace {
|
||||
staging.FreezeUsage(nxt::BufferUsageBit::TransferSrc);
|
||||
auto cmdbuf = device.CreateCommandBufferBuilder()
|
||||
.TransitionTextureUsage(oTexture, nxt::TextureUsageBit::TransferDst)
|
||||
.CopyBufferToTexture(staging, oTexture, 0, 0, 0, iImage.width, iImage.height, 1, 0)
|
||||
.CopyBufferToTexture(staging, 0, oTexture, 0, 0, 0, iImage.width, iImage.height, 1, 0)
|
||||
.GetResult();
|
||||
queue.Submit(1, &cmdbuf);
|
||||
oTexture.FreezeUsage(nxt::TextureUsageBit::Sampled);
|
||||
|
||||
Reference in New Issue
Block a user