dawn.json: Use void* instead of uint8_t* for data pointers

This requires some changes in the wire because WireCmd doesn't know the
size of void. This also adds a handwritten implementation of the Wire
commands for SetSubData that internally converts to uint8_t so that
WireCmd can generate the de/serialization.

BUG=dawn:160

Change-Id: Icbf0fd7dd841639ee6f67333844e027b27a8afcc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7780
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2019-06-06 16:19:15 +00:00
committed by Commit Bot service account
parent 97c0885a4a
commit 67ab1ea8c7
21 changed files with 93 additions and 49 deletions

View File

@@ -440,7 +440,7 @@ TEST_F(BufferValidationTest, SetSubDataSuccess) {
dawn::Buffer buf = CreateSetSubDataBuffer(4);
uint32_t foo = 0x01020304;
buf.SetSubData(0, sizeof(foo), reinterpret_cast<uint8_t*>(&foo));
buf.SetSubData(0, sizeof(foo), &foo);
}
// Test error case for SetSubData out of bounds
@@ -498,7 +498,7 @@ TEST_F(BufferValidationTest, SetSubDataWithUnalignedOffset) {
uint64_t kOffset = 2999;
uint32_t value = 0x01020304;
ASSERT_DEVICE_ERROR(buf.SetSubData(kOffset, sizeof(value), reinterpret_cast<uint8_t*>(&value)));
ASSERT_DEVICE_ERROR(buf.SetSubData(kOffset, sizeof(value), &value));
}
// Test that it is valid to destroy an unmapped buffer