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

@@ -96,7 +96,7 @@ void frame() {
if (s.b >= 1.0f) {s.b = 0.0f;}
buffer.TransitionUsage(nxt::BufferUsageBit::TransferDst);
buffer.SetSubData(0, sizeof(s) / sizeof(uint32_t), reinterpret_cast<uint32_t*>(&s));
buffer.SetSubData(0, sizeof(s), reinterpret_cast<uint8_t*>(&s));
nxt::Texture backbuffer;
nxt::Framebuffer framebuffer;