Implement CreateBufferMapped in dawn_native for MAP_WRITE buffers only.

This is the first command to return a struct. This patch also
updates the code generator to support structure return values.

Bug: dawn:7
Change-Id: Ie8acec895c0ec88429672138ffc900032fbbc447
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/4780
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
diff --git a/dawn.json b/dawn.json
index 6044c96..b7a18ce 100644
--- a/dawn.json
+++ b/dawn.json
@@ -213,6 +213,14 @@
     "char": {
         "category": "native"
     },
+    "create buffer mapped result": {
+        "category": "structure",
+        "members": [
+            {"name": "buffer", "type": "buffer"},
+            {"name": "data length", "type": "uint64_t"},
+            {"name": "data", "type": "uint8_t", "annotation": "*", "length": "data length"}
+        ]
+    },
     "color": {
         "category": "structure",
         "members": [
@@ -411,6 +419,13 @@
                 ]
             },
             {
+                "name": "create buffer mapped",
+                "returns": "create buffer mapped result",
+                "args": [
+                    {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"}
+                ]
+            },
+            {
                 "name": "create command encoder",
                 "returns": "command encoder"
             },