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:
Stephen White
2018-02-04 11:07:02 -05:00
committed by Corentin Wallez
parent ee66f25c4f
commit e5ae3274a3
27 changed files with 93 additions and 68 deletions

View File

@@ -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))