dawn_wire: Support deserializing s->c chained structs

Chained structs *may* contain objects which means
deserialization may need an ObjectIdResolver.
However, in practice, we never need to send chained
structs from the server to the client that contain objects for
a valid command.

The one upcoming need for chained server->client structs is to
serialize limit structs.

Because limit structs never need objects, we provide a dummy
implementation of the ObjectIdResolver which always yields an error.
An analogous change is done for ObjectIdProvider.
These classes will be used in a follow-up CL.

Bug: dawn:685
Change-Id: I1c0f3f2d080377f2e1a77bc6e896f24d3d9ab931
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63981
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng
2021-09-10 20:36:20 +00:00
committed by Dawn LUCI CQ
parent 8ee643c9d0
commit dc7971ce58
4 changed files with 58 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ class WireWGPUDevicePropertiesTests : public testing::Test {};
// Test that the serialization and deserialization of WGPUDeviceProperties can work correctly.
TEST_F(WireWGPUDevicePropertiesTests, SerializeWGPUDeviceProperties) {
WGPUDeviceProperties sentWGPUDeviceProperties;
WGPUDeviceProperties sentWGPUDeviceProperties = {};
sentWGPUDeviceProperties.textureCompressionBC = true;
// Set false to test that the serialization can handle both true and false correctly.
sentWGPUDeviceProperties.pipelineStatisticsQuery = false;