mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user