mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Make SetSubData take size in uint8_t not uint32_t.
Also change data pointer to uint8_t*. Add a test for a non-aligned SetSubData(). Implemented on all backends.
This commit is contained in:
committed by
Corentin Wallez
parent
ee66f25c4f
commit
e5ae3274a3
@@ -45,7 +45,7 @@ void init() {
|
||||
.SetInitialUsage(nxt::BufferUsageBit::TransferDst)
|
||||
.SetSize(sizeof(s))
|
||||
.GetResult();
|
||||
buffer.SetSubData(0, sizeof(s) / sizeof(uint32_t), reinterpret_cast<uint32_t*>(&s));
|
||||
buffer.SetSubData(0, sizeof(s), reinterpret_cast<uint8_t*>(&s));
|
||||
|
||||
nxt::BufferView view = buffer.CreateBufferViewBuilder()
|
||||
.SetExtent(0, sizeof(s))
|
||||
|
||||
Reference in New Issue
Block a user