| { |
| "_comment": [ |
| "Copyright 2017 The Dawn & Tint Authors", |
| "", |
| "Redistribution and use in source and binary forms, with or without", |
| "modification, are permitted provided that the following conditions are met:", |
| "", |
| " 1. Redistributions of source code must retain the above copyright notice, this", |
| " list of conditions and the following disclaimer.", |
| "", |
| " 2. Redistributions in binary form must reproduce the above copyright notice,", |
| " this list of conditions and the following disclaimer in the documentation", |
| " and/or other materials provided with the distribution.", |
| "", |
| " 3. Neither the name of the copyright holder nor the names of its", |
| " contributors may be used to endorse or promote products derived from", |
| " this software without specific prior written permission.", |
| " ", |
| "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"", |
| "AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE", |
| "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE", |
| "DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE", |
| "FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL", |
| "DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR", |
| "SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER", |
| "CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,", |
| "OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE", |
| "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." |
| ], |
| |
| "_doc": "See docs/dawn/codegen.md", |
| |
| "_metadata": { |
| "api": "WebGPU", |
| "c_prefix": "WGPU", |
| "namespace": "wgpu", |
| "proc_table_prefix": "Dawn", |
| "native_namespace": "dawn native", |
| "copyright_year": "2019" |
| }, |
| |
| "create instance": { |
| "category": "function", |
| "returns": "instance", |
| "_comment": "TODO(crbug.com/dawn/2048): The return type should be nullable; null is returned in error cases.", |
| "args": [ |
| {"name": "descriptor", "type": "instance descriptor", "annotation": "const*", "optional": true} |
| ] |
| }, |
| "proc": { |
| "category": "function pointer", |
| "returns": "void", |
| "args": [] |
| }, |
| "get proc address": { |
| "category": "function", |
| "returns": "proc", |
| "args": [ |
| {"name": "device", "type": "device", "optional": true}, |
| {"name": "proc name", "type": "char", "annotation": "const*"} |
| ] |
| }, |
| |
| "request adapter options": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "compatible surface", "type": "surface", "optional": true}, |
| {"name": "power preference", "type": "power preference", "default": "undefined"}, |
| {"name": "backend type", "type": "backend type", "default": "undefined"}, |
| {"name": "force fallback adapter", "type": "bool", "default": "false"}, |
| {"name": "compatibility mode", "type": "bool", "default": "false", "tags": ["dawn", "emscripten"]} |
| ] |
| }, |
| "request adapter callback": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "status", "type": "request adapter status"}, |
| {"name": "adapter", "type": "adapter", "optional": true}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "request adapter callback 2": { |
| "category": "callback function", |
| "args": [ |
| {"name": "status", "type": "request adapter status"}, |
| {"name": "adapter", "type": "adapter", "optional": true}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| ] |
| }, |
| "request adapter callback info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "mode", "type": "callback mode"}, |
| {"name": "callback", "type": "request adapter callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "request adapter callback info 2": { |
| "category": "callback info", |
| "members": [ |
| {"name": "callback", "type": "request adapter callback 2"} |
| ] |
| }, |
| "request adapter status": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 0, "name": "success"}, |
| {"value": 1, "name": "instance dropped"}, |
| {"value": 2, "name": "unavailable"}, |
| {"value": 3, "name": "error"}, |
| {"value": 4, "name": "unknown"} |
| ] |
| }, |
| "adapter": { |
| "category": "object", |
| "no autolock": true, |
| "methods": [ |
| { |
| "name": "get instance", |
| "tags": ["dawn"], |
| "returns": "instance" |
| }, |
| { |
| "name": "get limits", |
| "returns": "bool", |
| "args": [ |
| {"name": "limits", "type": "supported limits", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "get properties", |
| "args": [ |
| {"name": "properties", "type": "adapter properties", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "has feature", |
| "returns": "bool", |
| "args": [ |
| {"name": "feature", "type": "feature name"} |
| ] |
| }, |
| { |
| "name": "enumerate features", |
| "returns": "size_t", |
| "args": [ |
| {"name": "features", "type": "feature name", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "request device", |
| "args": [ |
| {"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true, "no_default": true}, |
| {"name": "callback", "type": "request device callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| { |
| "name": "request device f", |
| "_comment": "TODO(crbug.com/dawn/2021): This is dawn/emscripten-only until we rename it to replace the old API. See bug for details.", |
| "tags": ["dawn", "emscripten"], |
| "returns": "future", |
| "args": [ |
| {"name": "options", "type": "device descriptor", "annotation": "const*", "optional": true, "no_default": true}, |
| {"name": "callback info", "type": "request device callback info"} |
| ] |
| }, |
| { |
| "name": "create device", |
| "tags": ["dawn"], |
| "returns": "device", |
| "args": [ |
| {"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true} |
| ] |
| }, |
| { |
| "name": "get format capabilities", |
| "tags": ["dawn"], |
| "returns": "bool", |
| "args": [ |
| {"name": "format", "type": "texture format"}, |
| {"name": "capabilities", "type": "format capabilities", "annotation": "*"} |
| ] |
| } |
| ] |
| }, |
| "adapter properties": { |
| "category": "structure", |
| "extensible": "out", |
| "members": [ |
| {"name": "vendor ID", "type": "uint32_t"}, |
| {"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"}, |
| {"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"}, |
| {"name": "device ID", "type": "uint32_t"}, |
| {"name": "name", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"}, |
| {"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"}, |
| {"name": "adapter type", "type": "adapter type"}, |
| {"name": "backend type", "type": "backend type"}, |
| {"name": "compatibility mode", "type": "bool", "default": "false", "tags": ["dawn", "emscripten"]} |
| ] |
| }, |
| "adapter type": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 1, "name": "discrete GPU"}, |
| {"value": 2, "name": "integrated GPU"}, |
| {"value": 3, "name": "CPU"}, |
| {"value": 4, "name": "unknown"} |
| ] |
| }, |
| "device descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "required feature count", "type": "size_t", "default": 0}, |
| {"name": "required features", "type": "feature name", "annotation": "const*", "length": "required feature count", "default": "nullptr"}, |
| {"name": "required limits", "type": "required limits", "annotation": "const*", "optional": true}, |
| {"name": "default queue", "type": "queue descriptor"}, |
| {"name": "device lost callback", "type": "device lost callback", "default": "nullptr", "tags": ["deprecated"]}, |
| {"name": "device lost userdata", "type": "void *", "default": "nullptr", "tags": ["deprecated"]}, |
| {"name": "device lost callback info", "type": "device lost callback info"}, |
| {"name": "uncaptured error callback info", "type": "uncaptured error callback info"} |
| ] |
| }, |
| "dawn toggles descriptor": { |
| "tags": ["dawn", "native"], |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["instance descriptor", "request adapter options", "device descriptor"], |
| "members": [ |
| {"name": "enabled toggle count", "type": "size_t", "default": 0}, |
| {"name": "enabled toggles", "type": "char", "annotation": "const*const*", "length": "enabled toggle count"}, |
| {"name": "disabled toggle count", "type": "size_t", "default": 0}, |
| {"name": "disabled toggles", "type": "char", "annotation": "const*const*", "length": "disabled toggle count"} |
| ] |
| }, |
| "dawn load cache data function": { |
| "tags": ["dawn", "native"], |
| "category": "function pointer", |
| "returns": "size_t", |
| "args": [ |
| {"name": "key", "type": "void const *"}, |
| {"name": "key size", "type": "size_t"}, |
| {"name": "value", "type": "void *"}, |
| {"name": "value size", "type": "size_t"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "dawn store cache data function": { |
| "tags": ["dawn", "native"], |
| "category": "function pointer", |
| "args": [ |
| {"name": "key", "type": "void const *"}, |
| {"name": "key size", "type": "size_t"}, |
| {"name": "value", "type": "void const *"}, |
| {"name": "value size", "type": "size_t"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "dawn cache device descriptor" : { |
| "tags": ["dawn", "native"], |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["device descriptor"], |
| "members": [ |
| {"name": "isolation key", "type": "char", "annotation": "const*", "length": "strlen", "default": "\"\""}, |
| {"name": "load data function", "type": "dawn load cache data function", "default": "nullptr"}, |
| {"name": "store data function", "type": "dawn store cache data function", "default": "nullptr"}, |
| {"name": "function userdata", "type": "void *", "default": "nullptr"} |
| ] |
| }, |
| "dawn WGSL blocklist": { |
| "tags": ["dawn", "native"], |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["instance descriptor"], |
| "members": [ |
| {"name": "blocklisted feature count", "type": "size_t", "default": 0}, |
| {"name": "blocklisted features", "type": "char", "annotation": "const*const*", "length": "blocklisted feature count"} |
| ] |
| }, |
| "address mode": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| {"value": 1, "name": "clamp to edge"}, |
| {"value": 2, "name": "repeat"}, |
| {"value": 3, "name": "mirror repeat"} |
| ] |
| }, |
| "backend type": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| {"value": 1, "name": "null"}, |
| {"value": 2, "name": "WebGPU"}, |
| {"value": 3, "name": "D3D11"}, |
| {"value": 4, "name": "D3D12"}, |
| {"value": 5, "name": "metal"}, |
| {"value": 6, "name": "vulkan"}, |
| {"value": 7, "name": "openGL"}, |
| {"value": 8, "name": "openGLES"} |
| ] |
| }, |
| "bind group": { |
| "category": "object", |
| "methods": [ |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| } |
| ] |
| }, |
| "bind group entry": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "binding", "type": "uint32_t"}, |
| {"name": "buffer", "type": "buffer", "optional": true}, |
| {"name": "offset", "type": "uint64_t", "default": "0"}, |
| {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}, |
| {"name": "sampler", "type": "sampler", "optional": true}, |
| {"name": "texture view", "type": "texture view", "optional": true} |
| ] |
| }, |
| "bind group descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "layout", "type": "bind group layout"}, |
| {"name": "entry count", "type": "size_t"}, |
| {"name": "entries", "type": "bind group entry", "annotation": "const*", "length": "entry count"} |
| ] |
| }, |
| "bind group layout": { |
| "category": "object", |
| "methods": [ |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| } |
| ] |
| }, |
| |
| "buffer binding type": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| {"value": 1, "name": "uniform"}, |
| {"value": 2, "name": "storage"}, |
| {"value": 3, "name": "read only storage"} |
| ] |
| }, |
| "buffer binding layout": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "type", "type": "buffer binding type", "default": "undefined"}, |
| {"name": "has dynamic offset", "type": "bool", "default": "false"}, |
| {"name": "min binding size", "type": "uint64_t", "default": "0"} |
| ] |
| }, |
| |
| "sampler binding type": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| {"value": 1, "name": "filtering"}, |
| {"value": 2, "name": "non filtering"}, |
| {"value": 3, "name": "comparison"} |
| ] |
| }, |
| "sampler binding layout": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "type", "type": "sampler binding type", "default": "undefined"} |
| ] |
| }, |
| "static sampler binding layout": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["bind group layout entry"], |
| "tags": ["dawn"], |
| "members": [ |
| {"name": "sampler", "type": "sampler"} |
| ] |
| }, |
| "texture sample type": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| {"value": 1, "name": "float"}, |
| {"value": 2, "name": "unfilterable float"}, |
| {"value": 3, "name": "depth"}, |
| {"value": 4, "name": "sint"}, |
| {"value": 5, "name": "uint"} |
| ] |
| }, |
| "texture binding layout": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "sample type", "type": "texture sample type", "default": "undefined"}, |
| {"name": "view dimension", "type": "texture view dimension", "default": "2D"}, |
| {"name": "multisampled", "type": "bool", "default": "false"} |
| ] |
| }, |
| "surface capabilities": { |
| "category": "structure", |
| "extensible": "out", |
| "members": [ |
| {"name": "format count", "type": "size_t"}, |
| {"name": "formats", "type": "texture format", "annotation": "const*", "length": "format count"}, |
| {"name": "present mode count", "type": "size_t"}, |
| {"name": "present modes", "type": "present mode", "annotation": "const*", "length": "present mode count"}, |
| {"name": "alpha mode count", "type": "size_t"}, |
| {"name": "alpha modes", "type": "composite alpha mode", "annotation": "const*", "length": "alpha mode count"} |
| ], |
| "methods": [ |
| { |
| "name": "free members", |
| "returns": "void", |
| "args": [] |
| } |
| ] |
| }, |
| "surface configuration": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "device", "type": "device"}, |
| {"name": "format", "type": "texture format"}, |
| {"name": "usage", "type": "texture usage", "default": "render attachment"}, |
| {"name": "view format count", "type": "size_t", "default": 0}, |
| {"name": "view formats", "type": "texture format", "annotation": "const*", "length": "view format count"}, |
| {"name": "alpha mode", "type": "composite alpha mode", "default": "opaque"}, |
| {"name": "width", "type": "uint32_t"}, |
| {"name": "height", "type": "uint32_t"}, |
| {"name": "present mode", "type": "present mode", "default": "fifo"} |
| ] |
| }, |
| "external texture binding entry": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["bind group entry"], |
| "tags": ["dawn"], |
| "members": [ |
| {"name": "external texture", "type": "external texture"} |
| ] |
| }, |
| |
| "external texture binding layout": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["bind group layout entry"], |
| "tags": ["dawn"], |
| "members": [] |
| }, |
| |
| "storage texture access": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| {"value": 1, "name": "write only"}, |
| {"value": 2, "name": "read only"}, |
| {"value": 3, "name": "read write"} |
| ] |
| }, |
| "storage texture binding layout": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "access", "type": "storage texture access", "default": "undefined"}, |
| {"name": "format", "type": "texture format", "default": "undefined"}, |
| {"name": "view dimension", "type": "texture view dimension", "default": "2D"} |
| ] |
| }, |
| |
| "bind group layout entry": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "binding", "type": "uint32_t"}, |
| {"name": "visibility", "type": "shader stage"}, |
| {"name": "buffer", "type": "buffer binding layout"}, |
| {"name": "sampler", "type": "sampler binding layout"}, |
| {"name": "texture", "type": "texture binding layout"}, |
| {"name": "storage texture", "type": "storage texture binding layout"} |
| ] |
| }, |
| "bind group layout descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "entry count", "type": "size_t"}, |
| {"name": "entries", "type": "bind group layout entry", "annotation": "const*", "length": "entry count"} |
| ] |
| }, |
| "blend component": { |
| "category": "structure", |
| "extensible": false, |
| "members": [ |
| {"name": "operation", "type": "blend operation", "default": "add"}, |
| {"name": "src factor", "type": "blend factor", "default": "one"}, |
| {"name": "dst factor", "type": "blend factor", "default": "zero"} |
| ] |
| }, |
| "blend factor": { |
| "category": "enum", |
| "_comment": "TODO(github.com/gpuweb/gpuweb/issues/4283): make sure the dual source blending names match the spec when it lands, and remove the tags.", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| {"value": 1, "name": "zero"}, |
| {"value": 2, "name": "one"}, |
| {"value": 3, "name": "src"}, |
| {"value": 4, "name": "one minus src"}, |
| {"value": 5, "name": "src alpha"}, |
| {"value": 6, "name": "one minus src alpha"}, |
| {"value": 7, "name": "dst"}, |
| {"value": 8, "name": "one minus dst"}, |
| {"value": 9, "name": "dst alpha"}, |
| {"value": 10, "name": "one minus dst alpha"}, |
| {"value": 11, "name": "src alpha saturated"}, |
| {"value": 12, "name": "constant"}, |
| {"value": 13, "name": "one minus constant"}, |
| {"value": 14, "name": "src1", "tags": ["dawn"]}, |
| {"value": 15, "name": "one minus src1", "tags": ["dawn"]}, |
| {"value": 16, "name": "src1 alpha", "tags": ["dawn"]}, |
| {"value": 17, "name": "one minus src1 alpha", "tags": ["dawn"]} |
| ] |
| }, |
| "blend operation": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| {"value": 1, "name": "add"}, |
| {"value": 2, "name": "subtract"}, |
| {"value": 3, "name": "reverse subtract"}, |
| {"value": 4, "name": "min"}, |
| {"value": 5, "name": "max"} |
| ] |
| }, |
| "bool": { |
| "category": "native" |
| }, |
| "buffer": { |
| "category": "object", |
| "methods": [ |
| { |
| "name": "map async", |
| "args": [ |
| {"name": "mode", "type": "map mode"}, |
| {"name": "offset", "type": "size_t"}, |
| {"name": "size", "type": "size_t"}, |
| {"name": "callback", "type": "buffer map callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| { |
| "name": "map async f", |
| "_comment": "TODO(crbug.com/dawn/2021): This is dawn/emscripten-only until we rename it to replace the old API. See bug for details.", |
| "tags": ["dawn", "emscripten"], |
| "returns": "future", |
| "args": [ |
| {"name": "mode", "type": "map mode"}, |
| {"name": "offset", "type": "size_t"}, |
| {"name": "size", "type": "size_t"}, |
| {"name": "callback info", "type": "buffer map callback info"} |
| ] |
| }, |
| { |
| "name": "get mapped range", |
| "returns": "void *", |
| "args": [ |
| {"name": "offset", "type": "size_t", "default": 0}, |
| {"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"} |
| ] |
| }, |
| { |
| "name": "get const mapped range", |
| "returns": "void const *", |
| "args": [ |
| {"name": "offset", "type": "size_t", "default": 0}, |
| {"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"} |
| ] |
| }, |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "get usage", |
| "no autolock": true, |
| "returns": "buffer usage" |
| }, |
| { |
| "name": "get size", |
| "no autolock": true, |
| "returns": "uint64_t" |
| }, |
| { |
| "name": "get map state", |
| "returns": "buffer map state" |
| }, |
| { |
| "name": "unmap" |
| }, |
| { |
| "name": "destroy" |
| } |
| ] |
| }, |
| "buffer descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "usage", "type": "buffer usage"}, |
| {"name": "size", "type": "uint64_t"}, |
| {"name": "mapped at creation", "type": "bool", "default": "false"} |
| ] |
| }, |
| "buffer host mapped pointer": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["buffer descriptor"], |
| "tags": ["dawn"], |
| "members": [ |
| {"name": "pointer", "type": "void *"}, |
| {"name": "dispose callback", "type": "callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "callback": { |
| "category": "function pointer", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "buffer map callback": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "status", "type": "buffer map async status"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "buffer map callback info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "mode", "type": "callback mode"}, |
| {"name": "callback", "type": "buffer map callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "buffer map async status": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 0, "name": "success"}, |
| {"value": 1, "name": "instance dropped"}, |
| {"value": 2, "name": "validation error"}, |
| {"value": 3, "name": "unknown"}, |
| {"value": 4, "name": "device lost"}, |
| {"value": 5, "name": "destroyed before callback"}, |
| {"value": 6, "name": "unmapped before callback"}, |
| {"value": 7, "name": "mapping already pending"}, |
| {"value": 8, "name": "offset out of range"}, |
| {"value": 9, "name": "size out of range"} |
| ] |
| }, |
| "buffer map state": { |
| "category": "enum", |
| "values": [ |
| {"value": 1, "name": "unmapped"}, |
| {"value": 2, "name": "pending"}, |
| {"value": 3, "name": "mapped"} |
| ] |
| }, |
| "buffer usage": { |
| "category": "bitmask", |
| "values": [ |
| {"value": 0, "name": "none"}, |
| {"value": 1, "name": "map read"}, |
| {"value": 2, "name": "map write"}, |
| {"value": 4, "name": "copy src"}, |
| {"value": 8, "name": "copy dst"}, |
| {"value": 16, "name": "index"}, |
| {"value": 32, "name": "vertex"}, |
| {"value": 64, "name": "uniform"}, |
| {"value": 128, "name": "storage"}, |
| {"value": 256, "name": "indirect"}, |
| {"value": 512, "name": "query resolve"} |
| ] |
| }, |
| "char": { |
| "category": "native" |
| }, |
| "color": { |
| "category": "structure", |
| "members": [ |
| {"name": "r", "type": "double"}, |
| {"name": "g", "type": "double"}, |
| {"name": "b", "type": "double"}, |
| {"name": "a", "type": "double"} |
| ] |
| }, |
| "color write mask": { |
| "category": "bitmask", |
| "values": [ |
| {"value": 0, "name": "none"}, |
| {"value": 1, "name": "red"}, |
| {"value": 2, "name": "green"}, |
| {"value": 4, "name": "blue"}, |
| {"value": 8, "name": "alpha"}, |
| {"value": 15, "name": "all"} |
| ] |
| }, |
| "constant entry": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "key", "type": "char", "annotation": "const*", "length": "strlen"}, |
| {"name": "value", "type": "double"} |
| ] |
| }, |
| "command buffer": { |
| "category": "object", |
| "methods": [ |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| } |
| ] |
| }, |
| "command buffer descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| ] |
| }, |
| "command encoder": { |
| "category": "object", |
| "no autolock": true, |
| "methods": [ |
| { |
| "name": "finish", |
| "returns": "command buffer", |
| "args": [ |
| {"name": "descriptor", "type": "command buffer descriptor", "annotation": "const*", "optional": true} |
| ] |
| }, |
| { |
| "name": "begin compute pass", |
| "returns": "compute pass encoder", |
| "args": [ |
| {"name": "descriptor", "type": "compute pass descriptor", "annotation": "const*", "optional": true} |
| ] |
| }, |
| { |
| "name": "begin render pass", |
| "returns": "render pass encoder", |
| "args": [ |
| {"name": "descriptor", "type": "render pass descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "copy buffer to buffer", |
| "args": [ |
| {"name": "source", "type": "buffer"}, |
| {"name": "source offset", "type": "uint64_t"}, |
| {"name": "destination", "type": "buffer"}, |
| {"name": "destination offset", "type": "uint64_t"}, |
| {"name": "size", "type": "uint64_t"} |
| ] |
| }, |
| { |
| "name": "copy buffer to texture", |
| "args": [ |
| {"name": "source", "type": "image copy buffer", "annotation": "const*"}, |
| {"name": "destination", "type": "image copy texture", "annotation": "const*"}, |
| {"name": "copy size", "type": "extent 3D", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "copy texture to buffer", |
| "args": [ |
| {"name": "source", "type": "image copy texture", "annotation": "const*"}, |
| {"name": "destination", "type": "image copy buffer", "annotation": "const*"}, |
| {"name": "copy size", "type": "extent 3D", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "copy texture to texture", |
| "args": [ |
| {"name": "source", "type": "image copy texture", "annotation": "const*"}, |
| {"name": "destination", "type": "image copy texture", "annotation": "const*"}, |
| {"name": "copy size", "type": "extent 3D", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "clear buffer", |
| "args": [ |
| {"name": "buffer", "type": "buffer"}, |
| {"name": "offset", "type": "uint64_t", "default": 0}, |
| {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"} |
| ] |
| }, |
| { |
| "name": "inject validation error", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "insert debug marker", |
| "args": [ |
| {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "pop debug group", |
| "args": [] |
| }, |
| { |
| "name": "push debug group", |
| "args": [ |
| {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "resolve query set", |
| "args": [ |
| {"name": "query set", "type": "query set"}, |
| {"name": "first query", "type": "uint32_t"}, |
| {"name": "query count", "type": "uint32_t"}, |
| {"name": "destination", "type": "buffer"}, |
| {"name": "destination offset", "type": "uint64_t"} |
| ] |
| }, |
| { |
| "name": "write buffer", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "buffer", "type": "buffer"}, |
| {"name": "buffer offset", "type": "uint64_t"}, |
| {"name": "data", "type": "uint8_t", "annotation": "const*", "length": "size"}, |
| {"name": "size", "type": "uint64_t"} |
| ] |
| }, |
| { |
| "name": "write timestamp", |
| "args": [ |
| {"name": "query set", "type": "query set"}, |
| {"name": "query index", "type": "uint32_t"} |
| ] |
| }, |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| } |
| ] |
| }, |
| "command encoder descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| ] |
| }, |
| "compare function": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| {"value": 1, "name": "never"}, |
| {"value": 2, "name": "less"}, |
| {"value": 3, "name": "equal"}, |
| {"value": 4, "name": "less equal"}, |
| {"value": 5, "name": "greater"}, |
| {"value": 6, "name": "not equal"}, |
| {"value": 7, "name": "greater equal"}, |
| {"value": 8, "name": "always"} |
| ] |
| }, |
| "compilation info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "message count", "type": "size_t"}, |
| {"name": "messages", "type": "compilation message", "annotation": "const*", "length": "message count"} |
| ] |
| }, |
| "compilation info callback": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "status", "type": "compilation info request status"}, |
| {"name": "compilation info", "type": "compilation info", "annotation": "const*"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "compilation info callback info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "mode", "type": "callback mode"}, |
| {"name": "callback", "type": "compilation info callback"}, |
| {"name": "userdata", "type": "void *", "default": "nullptr"} |
| ] |
| }, |
| "compilation info request status": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "success"}, |
| {"value": 1, "name": "instance dropped"}, |
| {"value": 2, "name": "error"}, |
| {"value": 3, "name": "device lost"}, |
| {"value": 4, "name": "unknown"} |
| ] |
| }, |
| "compilation message": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "type", "type": "compilation message type"}, |
| {"name": "line num", "type": "uint64_t"}, |
| {"name": "line pos", "type": "uint64_t"}, |
| {"name": "offset", "type": "uint64_t"}, |
| {"name": "length", "type": "uint64_t"}, |
| {"name": "utf16 line pos", "type": "uint64_t"}, |
| {"name": "utf16 offset", "type": "uint64_t"}, |
| {"name": "utf16 length", "type": "uint64_t"} |
| ] |
| }, |
| "compilation message type": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 1, "name": "error"}, |
| {"value": 2, "name": "warning"}, |
| {"value": 3, "name": "info"} |
| ] |
| }, |
| "compute pass descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "timestamp writes", "type": "compute pass timestamp writes", "annotation": "const*", "optional": true} |
| ] |
| }, |
| "compute pass encoder": { |
| "category": "object", |
| "no autolock": true, |
| "methods": [ |
| { |
| "name": "insert debug marker", |
| "args": [ |
| {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "pop debug group", |
| "args": [] |
| }, |
| { |
| "name": "push debug group", |
| "args": [ |
| {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "set pipeline", |
| "args": [ |
| {"name": "pipeline", "type": "compute pipeline"} |
| ] |
| }, |
| { |
| "name": "set bind group", |
| "args": [ |
| {"name": "group index", "type": "uint32_t"}, |
| {"name": "group", "type": "bind group", "optional": true}, |
| {"name": "dynamic offset count", "type": "size_t", "default": "0"}, |
| {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"} |
| ] |
| }, |
| { |
| "name": "write timestamp", |
| "tags": ["emscripten", "dawn"], |
| "args": [ |
| {"name": "query set", "type": "query set"}, |
| {"name": "query index", "type": "uint32_t"} |
| ] |
| }, |
| { |
| "name": "dispatch workgroups", |
| "args": [ |
| {"name": "workgroupCountX", "type": "uint32_t"}, |
| {"name": "workgroupCountY", "type": "uint32_t", "default": "1"}, |
| {"name": "workgroupCountZ", "type": "uint32_t", "default": "1"} |
| ] |
| }, |
| { |
| "name": "dispatch workgroups indirect", |
| "args": [ |
| {"name": "indirect buffer", "type": "buffer"}, |
| {"name": "indirect offset", "type": "uint64_t"} |
| ] |
| }, |
| { |
| "name": "end" |
| }, |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| } |
| ] |
| }, |
| "composite alpha mode": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "auto"}, |
| {"value": 1, "name": "opaque"}, |
| {"value": 2, "name": "premultiplied"}, |
| {"value": 3, "name": "unpremultiplied"}, |
| {"value": 4, "name": "inherit"} |
| ] |
| }, |
| "compute pass timestamp writes": { |
| "category": "structure", |
| "members": [ |
| {"name": "query set", "type": "query set"}, |
| {"name": "beginning of pass write index", "type": "uint32_t", "default": "WGPU_QUERY_SET_INDEX_UNDEFINED"}, |
| {"name": "end of pass write index", "type": "uint32_t", "default": "WGPU_QUERY_SET_INDEX_UNDEFINED"} |
| ] |
| }, |
| "compute pipeline": { |
| "category": "object", |
| "methods": [ |
| { |
| "name": "get bind group layout", |
| "returns": "bind group layout", |
| "args": [ |
| {"name": "group index", "type": "uint32_t"} |
| ] |
| }, |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| } |
| ] |
| }, |
| "compute pipeline descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "layout", "type": "pipeline layout", "optional": true}, |
| {"name": "compute", "type": "programmable stage descriptor"} |
| ] |
| }, |
| "dawn compute pipeline full subgroups": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["compute pipeline descriptor"], |
| "tags": ["dawn"], |
| "members": [ |
| {"name": "requires full subgroups", "type": "bool", "default": "false"} |
| ] |
| }, |
| "alpha mode": { |
| "category": "enum", |
| "tags": ["dawn"], |
| "values": [ |
| {"value": 1, "name": "opaque"}, |
| {"value": 2, "name": "premultiplied"}, |
| {"value": 3, "name": "unpremultiplied"} |
| ] |
| }, |
| "copy texture for browser options": { |
| "category": "structure", |
| "extensible": "in", |
| "tags": ["dawn"], |
| "members": [ |
| {"name": "flip y", "type": "bool", "default": "false"}, |
| {"name": "needs color space conversion", "type": "bool", "default": "false"}, |
| {"name": "src alpha mode", "type": "alpha mode", "default": "unpremultiplied"}, |
| {"name": "src transfer function parameters", "type": "float", "annotation": "const*", |
| "length": 7, "optional": true}, |
| {"name": "conversion matrix", "type": "float", "annotation": "const*", |
| "length": 9, "optional": true}, |
| {"name": "dst transfer function parameters", "type": "float", "annotation": "const*", |
| "length": 7, "optional": true}, |
| {"name": "dst alpha mode", "type": "alpha mode", "default": "unpremultiplied"}, |
| {"name": "internal usage", "type": "bool", "default": "false"} |
| ] |
| }, |
| "create compute pipeline async callback": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "status", "type": "create pipeline async status"}, |
| {"name": "pipeline", "type": "compute pipeline", "optional": true}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "create compute pipeline async callback info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "mode", "type": "callback mode"}, |
| {"name": "callback", "type": "create compute pipeline async callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "create pipeline async status": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 0, "name": "success"}, |
| {"value": 1, "name": "instance dropped"}, |
| {"value": 2, "name": "validation error"}, |
| {"value": 3, "name": "internal error"}, |
| {"value": 4, "name": "device lost"}, |
| {"value": 5, "name": "device destroyed"}, |
| {"value": 6, "name": "unknown"} |
| ] |
| }, |
| "create render pipeline async callback": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "status", "type": "create pipeline async status"}, |
| {"name": "pipeline", "type": "render pipeline", "optional": true}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "create render pipeline async callback info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "mode", "type": "callback mode"}, |
| {"name": "callback", "type": "create render pipeline async callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "cull mode": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| {"value": 1, "name": "none"}, |
| {"value": 2, "name": "front"}, |
| {"value": 3, "name": "back"} |
| ] |
| }, |
| "device": { |
| "category": "object", |
| "methods": [ |
| { |
| "name": "create bind group", |
| "returns": "bind group", |
| "args": [ |
| {"name": "descriptor", "type": "bind group descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create bind group layout", |
| "returns": "bind group layout", |
| "args": [ |
| {"name": "descriptor", "type": "bind group layout descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create buffer", |
| "no autolock": true, |
| "returns": "buffer", |
| "args": [ |
| {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create error buffer", |
| "returns": "buffer", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create command encoder", |
| "returns": "command encoder", |
| "args": [ |
| {"name": "descriptor", "type": "command encoder descriptor", "annotation": "const*", "optional": true} |
| ] |
| }, |
| { |
| "name": "create compute pipeline", |
| "no autolock": true, |
| "returns": "compute pipeline", |
| "args": [ |
| {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create compute pipeline async", |
| "returns": "void", |
| "args": [ |
| {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}, |
| {"name": "callback", "type": "create compute pipeline async callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| { |
| "name": "create compute pipeline async f", |
| "_comment": "TODO(crbug.com/dawn/2021): This is dawn/emscripten-only until we rename it to replace the old API. See bug for details.", |
| "tags": ["dawn", "emscripten"], |
| "returns": "future", |
| "args": [ |
| {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}, |
| {"name": "callback info", "type": "create compute pipeline async callback info"} |
| ] |
| }, |
| { |
| "name": "create external texture", |
| "returns": "external texture", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "external texture descriptor", "type": "external texture descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create error external texture", |
| "returns": "external texture", |
| "tags": ["dawn"] |
| }, |
| { |
| "name": "create pipeline layout", |
| "returns": "pipeline layout", |
| "args": [ |
| {"name": "descriptor", "type": "pipeline layout descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create query set", |
| "returns": "query set", |
| "args": [ |
| {"name": "descriptor", "type": "query set descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create render pipeline async", |
| "returns": "void", |
| "args": [ |
| {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}, |
| {"name": "callback", "type": "create render pipeline async callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| { |
| "name": "create render pipeline async f", |
| "_comment": "TODO(crbug.com/dawn/2021): This is dawn/emscripten-only until we rename it to replace the old API. See bug for details.", |
| "tags": ["dawn", "emscripten"], |
| "returns": "future", |
| "args": [ |
| {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}, |
| {"name": "callback info", "type": "create render pipeline async callback info"} |
| ] |
| }, |
| { |
| "name": "create render bundle encoder", |
| "returns": "render bundle encoder", |
| "args": [ |
| {"name": "descriptor", "type": "render bundle encoder descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create render pipeline", |
| "no autolock": true, |
| "returns": "render pipeline", |
| "args": [ |
| {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create sampler", |
| "returns": "sampler", |
| "args": [ |
| {"name": "descriptor", "type": "sampler descriptor", "annotation": "const*", "optional": true} |
| ] |
| }, |
| { |
| "name": "create shader module", |
| "no autolock": true, |
| "returns": "shader module", |
| "args": [ |
| {"name": "descriptor", "type": "shader module descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create error shader module", |
| "returns": "shader module", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "descriptor", "type": "shader module descriptor", "annotation": "const*"}, |
| {"name": "error message", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "create swap chain", |
| "tags": ["dawn", "emscripten"], |
| "returns": "swap chain", |
| "args": [ |
| {"name": "surface", "type": "surface"}, |
| {"name": "descriptor", "type": "swap chain descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create texture", |
| "returns": "texture", |
| "args": [ |
| {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "import shared buffer memory", |
| "returns": "shared buffer memory", |
| "tags": ["dawn", "native"], |
| "args": [ |
| {"name": "descriptor", "type": "shared buffer memory descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "import shared texture memory", |
| "returns": "shared texture memory", |
| "tags": ["dawn", "native"], |
| "args": [ |
| {"name": "descriptor", "type": "shared texture memory descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "import shared fence", |
| "returns": "shared fence", |
| "tags": ["dawn", "native"], |
| "args": [ |
| {"name": "descriptor", "type": "shared fence descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "create error texture", |
| "returns": "texture", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "destroy" |
| }, |
| { |
| "name": "get limits", |
| "returns": "bool", |
| "args": [ |
| {"name": "limits", "type": "supported limits", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "has feature", |
| "returns": "bool", |
| "args": [ |
| {"name": "feature", "type": "feature name"} |
| ] |
| }, |
| { |
| "name": "enumerate features", |
| "returns": "size_t", |
| "args": [ |
| {"name": "features", "type": "feature name", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "get adapter", |
| "returns": "adapter", |
| "tags": ["dawn", "native"] |
| }, |
| { |
| "name": "get queue", |
| "returns": "queue" |
| }, |
| { |
| "name": "inject error", |
| "args": [ |
| {"name": "type", "type": "error type"}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"} |
| ], |
| "tags": ["dawn"] |
| }, |
| { |
| "name": "force loss", |
| "args": [ |
| {"name": "type", "type": "device lost reason"}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"} |
| ], |
| "tags": ["dawn"] |
| }, |
| { |
| "name": "tick", |
| "no autolock": true, |
| "tags": ["dawn"] |
| }, |
| { |
| "name": "set uncaptured error callback", |
| "no autolock": true, |
| "args": [ |
| {"name": "callback", "type": "error callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| { |
| "name": "set logging callback", |
| "no autolock": true, |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "callback", "type": "logging callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| { |
| "name": "set device lost callback", |
| "no autolock": true, |
| "tags": ["deprecated"], |
| "args": [ |
| {"name": "callback", "type": "device lost callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| { |
| "name": "push error scope", |
| "args": [ |
| {"name": "filter", "type": "error filter"} |
| ] |
| }, |
| { |
| "name": "pop error scope", |
| "no autolock": true, |
| "args": [ |
| {"name": "old callback", "type": "error callback"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| { |
| "name": "pop error scope f", |
| "_comment": "TODO(crbug.com/dawn/2021): This is dawn/emscripten-only until we rename it to replace the old API. See bug for details.", |
| "tags": ["dawn", "emscripten"], |
| "returns": "future", |
| "args": [ |
| {"name": "callback info", "type": "pop error scope callback info"} |
| ] |
| }, |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "validate texture descriptor", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "get supported surface usage", |
| "tags": ["dawn", "native"], |
| "returns": "texture usage", |
| "args": [ |
| {"name": "surface", "type": "surface"} |
| ] |
| } |
| ] |
| }, |
| "device lost callback": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "reason", "type": "device lost reason"}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "device lost callback new": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "device", "type": "device", "annotation": "const*", "length": 1}, |
| {"name": "reason", "type": "device lost reason"}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "device lost callback info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "mode", "type": "callback mode", "default": "wait any only", "_comment": "TODO(crbug.com/dawn/2458) Default should be removed."}, |
| {"name": "callback", "type": "device lost callback new", "default": "nullptr"}, |
| {"name": "userdata", "type": "void *", "default": "nullptr"} |
| ] |
| }, |
| "device lost reason": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| {"value": 1, "name": "unknown"}, |
| {"value": 2, "name": "destroyed"}, |
| {"value": 3, "name": "instance dropped"}, |
| {"value": 4, "name": "failed creation"} |
| ] |
| }, |
| "double": { |
| "category": "native" |
| }, |
| "error callback": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "type", "type": "error type"}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "uncaptured error callback info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "callback", "type": "error callback", "default": "nullptr"}, |
| {"name": "userdata", "type": "void *", "default": "nullptr"} |
| ] |
| }, |
| "pop error scope status": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 0, "name": "success"}, |
| {"value": 1, "name": "instance dropped"} |
| ] |
| }, |
| "pop error scope callback": { |
| "category": "function pointer", |
| "args": [ |
| {"name": "status", "type": "pop error scope status"}, |
| {"name": "type", "type": "error type"}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "pop error scope callback info": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "mode", "type": "callback mode", "default": "wait any only"}, |
| {"name": "callback", "type": "pop error scope callback"}, |
| {"name": "old callback", "type": "error callback", "_comment": "TODO(crbug.com/dawn/2021) Deprecate this field once we have moved callers to use the new callback signature."}, |
| {"name": "userdata", "type": "void *", "default": "nullptr"} |
| ] |
| }, |
| "limits": { |
| "category": "structure", |
| "members": [ |
| {"name": "max texture dimension 1D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max texture dimension 2D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max texture dimension 3D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max texture array layers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max bind groups", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max bind groups plus vertex buffers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max bindings per bind group", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max dynamic uniform buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max dynamic storage buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max sampled textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max samplers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max storage buffers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max storage textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max uniform buffers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max uniform buffer binding size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"}, |
| {"name": "max storage buffer binding size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"}, |
| {"name": "min uniform buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "min storage buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max vertex buffers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max buffer size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"}, |
| {"name": "max vertex attributes", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max vertex buffer array stride", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max inter stage shader components", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max inter stage shader variables", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max color attachments", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max color attachment bytes per sample", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max compute workgroup storage size", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max compute invocations per workgroup", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max compute workgroup size x", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max compute workgroup size y", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max compute workgroup size z", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max compute workgroups per dimension", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"} |
| ] |
| }, |
| "dawn experimental subgroup limits": { |
| "category": "structure", |
| "chained": "out", |
| "chain roots": ["supported limits"], |
| "tags": ["dawn"], |
| "members": [ |
| {"name": "min subgroup size", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| {"name": "max subgroup size", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"} |
| ] |
| }, |
| "required limits": { |
| "category": "structure", |
| "extensible": "in", |
| "members": [ |
| {"name": "limits", "type": "limits"} |
| ] |
| }, |
| "supported limits": { |
| "category": "structure", |
| "extensible": "out", |
| "members": [ |
| {"name": "limits", "type": "limits"} |
| ] |
| }, |
| "logging callback": { |
| "category": "function pointer", |
| "tags": ["dawn"], |
| "args": [ |
| {"name": "type", "type": "logging type"}, |
| {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}, |
| {"name": "userdata", "type": "void *"} |
| ] |
| }, |
| "error filter": { |
| "category": "enum", |
| "values": [ |
| {"value": 1, "name": "validation"}, |
| {"value": 2, "name": "out of memory"}, |
| {"value": 3, "name": "internal"} |
| ] |
| }, |
| "error type": { |
| "category": "enum", |
| "emscripten_no_enum_table": true, |
| "values": [ |
| {"value": 0, "name": "no error"}, |
| {"value": 1, "name": "validation"}, |
| {"value": 2, "name": "out of memory"}, |
| {"value": 3, "name": "internal"}, |
| {"value": 4, "name": "unknown"}, |
| {"value": 5, "name": "device lost"} |
| ] |
| }, |
| "logging type": { |
| "category": "enum", |
| "tags": ["dawn"], |
| "values": [ |
| {"value": 1, "name": "verbose"}, |
| {"value": 2, "name": "info"}, |
| {"value": 3, "name": "warning"}, |
| {"value": 4, "name": "error"} |
| ] |
| }, |
| "extent 2D": { |
| "category": "structure", |
| "tags": ["dawn"], |
| "members": [ |
| {"name": "width", "type": "uint32_t"}, |
| {"name": "height", "type": "uint32_t"} |
| ] |
| }, |
| "extent 3D": { |
| "category": "structure", |
| "members": [ |
| {"name": "width", "type": "uint32_t"}, |
| {"name": "height", "type": "uint32_t", "default": 1}, |
| {"name": "depth or array layers", "type": "uint32_t", "default": 1} |
| ] |
| }, |
| "external texture": { |
| "category": "object", |
| "tags": ["dawn"], |
| "methods": [ |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "destroy", |
| "returns": "void" |
| }, |
| { |
| "name": "expire", |
| "returns": "void" |
| }, |
| { |
| "name": "refresh", |
| "returns": "void" |
| } |
| ] |
| }, |
| "external texture rotation":{ |
| "category": "enum", |
| "tags": ["dawn"], |
| "_comment": "ANGLEs are clockwise rotation degrees and not trigonometric.", |
| "values": [ |
| {"value": 0, "name": "rotate 0 degrees"}, |
| {"value": 1, "name": "rotate 90 degrees"}, |
| {"value": 2, "name": "rotate 180 degrees"}, |
| {"value": 3, "name": "rotate 270 degrees"} |
| ] |
| }, |
| "external texture descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "tags": ["dawn"], |
| "_comment": "TODO(crbug.com/1514732): deprecate flipY", |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| {"name": "plane 0", "type": "texture view"}, |
| {"name": "plane 1", "type": "texture view", "optional": true}, |
| {"name": "visible origin", "type": "origin 2D"}, |
| {"name": "visible size", "type": "extent 2D"}, |
| {"name": "do yuv to rgb conversion only", "type": "bool", "default": "false"}, |
| {"name": "yuv to rgb conversion matrix", "type": "float", "annotation": "const*", |
| "length": 12, "optional": true}, |
| {"name": "src transfer function parameters", "type": "float", "annotation": "const*", |
| "length": 7}, |
| {"name": "dst transfer function parameters", "type": "float", "annotation": "const*", |
| "length": 7}, |
| {"name": "gamut conversion matrix", "type": "float", "annotation": "const*", |
| "length": 9}, |
| {"name": "flip y", "type": "bool", "default": "false", "tags": ["deprecated"]}, |
| {"name": "mirrored", "type": "bool", "default": "false"}, |
| {"name": "rotation", "type": "external texture rotation", "default": "rotate 0 degrees"} |
| ] |
| }, |
| "shared buffer memory": { |
| "category": "object", |
| "tags": ["dawn", "native"], |
| "methods": [ |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "get properties", |
| "returns": "void", |
| "args": [ |
| {"name": "properties", "type": "shared buffer memory properties", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "create buffer", |
| "returns": "buffer", |
| "args": [ |
| {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*", "optional": true, "default": "nullptr"} |
| ] |
| }, |
| { |
| "name": "begin access", |
| "returns": "bool", |
| "args": [ |
| {"name": "buffer", "type": "buffer"}, |
| {"name": "descriptor", "type": "shared buffer memory begin access descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "end access", |
| "returns": "bool", |
| "args": [ |
| {"name": "buffer", "type": "buffer"}, |
| {"name": "descriptor", "type": "shared buffer memory end access state", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "is device lost", |
| "returns": "bool", |
| "args": [] |
| } |
| ] |
| }, |
| "shared buffer memory properties": { |
| "category": "structure", |
| "extensible": "out", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "usage", "type": "buffer usage"}, |
| {"name": "size", "type": "uint64_t"} |
| ] |
| }, |
| "shared buffer memory descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| ] |
| }, |
| "shared texture memory": { |
| "category": "object", |
| "tags": ["dawn", "native"], |
| "methods": [ |
| { |
| "name": "set label", |
| "returns": "void", |
| "args": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| ] |
| }, |
| { |
| "name": "get properties", |
| "returns": "void", |
| "args": [ |
| {"name": "properties", "type": "shared texture memory properties", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "create texture", |
| "returns": "texture", |
| "args": [ |
| {"name": "descriptor", "type": "texture descriptor", "annotation": "const*", "optional": true, "default": "nullptr"} |
| ] |
| }, |
| { |
| "name": "begin access", |
| "returns": "bool", |
| "args": [ |
| {"name": "texture", "type": "texture"}, |
| {"name": "descriptor", "type": "shared texture memory begin access descriptor", "annotation": "const*"} |
| ] |
| }, |
| { |
| "name": "end access", |
| "returns": "bool", |
| "args": [ |
| {"name": "texture", "type": "texture"}, |
| {"name": "descriptor", "type": "shared texture memory end access state", "annotation": "*"} |
| ] |
| }, |
| { |
| "name": "is device lost", |
| "returns": "bool", |
| "args": [] |
| } |
| ] |
| }, |
| "shared texture memory properties": { |
| "category": "structure", |
| "extensible": "out", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "usage", "type": "texture usage"}, |
| {"name": "size", "type": "extent 3D"}, |
| {"name": "format", "type": "texture format"} |
| ] |
| }, |
| "shared texture memory descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| ] |
| }, |
| "shared buffer memory begin access descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "initialized", "type": "bool"}, |
| {"name": "fence count", "type": "size_t", "default": "0"}, |
| {"name": "fences", "type": "shared fence", "annotation": "const*", "length": "fence count"}, |
| {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"} |
| ] |
| }, |
| "shared buffer memory end access state": { |
| "category": "structure", |
| "extensible": "out", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "initialized", "type": "bool"}, |
| {"name": "fence count", "type": "size_t", "default": "0"}, |
| {"name": "fences", "type": "shared fence", "annotation": "const*", "length": "fence count"}, |
| {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"} |
| ] |
| }, |
| "shared texture memory vk image descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "vk format", "type": "int32_t"}, |
| {"name": "vk usage flags", "type": "int32_t"}, |
| {"name": "vk extent 3D", "type": "extent 3D"} |
| ] |
| }, |
| "shared texture memory vk dedicated allocation descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "dedicated allocation", "type": "bool"} |
| ] |
| }, |
| "shared texture memory a hardware buffer descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "void *"} |
| ] |
| }, |
| "shared texture memory dma buf plane": { |
| "category": "structure", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "fd", "type": "int"}, |
| {"name": "offset", "type": "uint64_t"}, |
| {"name": "stride", "type": "uint32_t"} |
| ] |
| }, |
| "shared texture memory dma buf descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "size", "type": "extent 3D"}, |
| {"name": "drm format", "type": "uint32_t"}, |
| {"name": "drm modifier", "type": "uint64_t"}, |
| {"name": "plane count", "type": "size_t"}, |
| {"name": "planes", "type": "shared texture memory dma buf plane", "annotation": "const*", "length": "plane count"} |
| ] |
| }, |
| "shared texture memory opaque FD descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "vk image create info", "type": "void const *"}, |
| {"name": "memory FD", "type": "int"}, |
| {"name": "memory type index", "type": "uint32_t"}, |
| {"name": "allocation size", "type": "uint64_t"}, |
| {"name": "dedicated allocation", "type": "bool"} |
| ] |
| }, |
| "shared texture memory zircon handle descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "memory FD", "type": "uint32_t"}, |
| {"name": "allocation size", "type": "uint64_t"} |
| ] |
| }, |
| "shared texture memory DXGI shared handle descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "_comment": "TODO(crbug.com/dawn/1745): improve type safety", |
| "members": [ |
| {"name": "handle", "type": "void *"}, |
| {"name": "use keyed mutex", "type": "bool"} |
| ] |
| }, |
| "shared texture memory IO surface descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "_comment": "TODO(crbug.com/dawn/1745): improve type safety", |
| "members": [ |
| {"name": "io surface", "type": "void *"} |
| ] |
| }, |
| "shared texture memory EGL image descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory descriptor"], |
| "tags": ["dawn", "native"], |
| "_comment": "TODO(crbug.com/dawn/1745): improve type safety", |
| "members": [ |
| {"name": "image", "type": "void *"} |
| ] |
| }, |
| "shared texture memory begin access descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "concurrent read", "type": "bool"}, |
| {"name": "initialized", "type": "bool"}, |
| {"name": "fence count", "type": "size_t"}, |
| {"name": "fences", "type": "shared fence", "annotation": "const*", "length": "fence count"}, |
| {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"} |
| ] |
| }, |
| "shared texture memory end access state": { |
| "category": "structure", |
| "extensible": "out", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "initialized", "type": "bool"}, |
| {"name": "fence count", "type": "size_t"}, |
| {"name": "fences", "type": "shared fence", "annotation": "const*", "length": "fence count"}, |
| {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"} |
| ] |
| }, |
| "shared texture memory vk image layout begin state": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory begin access descriptor"], |
| "tags": ["dawn", "native"], |
| "_comment": "TODO(crbug.com/dawn/1745): improve type safety", |
| "members": [ |
| {"name": "old layout", "type": "int32_t"}, |
| {"name": "new layout", "type": "int32_t"} |
| ] |
| }, |
| "shared texture memory vk image layout end state": { |
| "category": "structure", |
| "chained": "out", |
| "chain roots": ["shared texture memory end access state"], |
| "tags": ["dawn", "native"], |
| "_comment": "TODO(crbug.com/dawn/1745): improve type safety", |
| "members": [ |
| {"name": "old layout", "type": "int32_t"}, |
| {"name": "new layout", "type": "int32_t"} |
| ] |
| }, |
| "shared texture memory D3D swapchain begin state": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared texture memory begin access descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "is swapchain", "type": "bool", "default": "false"} |
| ] |
| }, |
| "shared fence": { |
| "category": "object", |
| "tags": ["dawn", "native"], |
| "methods": [ |
| { |
| "name": "export info", |
| "returns": "void", |
| "args": [ |
| {"name": "info", "type": "shared fence export info", "annotation": "*"} |
| ] |
| } |
| ] |
| }, |
| "shared fence descriptor": { |
| "category": "structure", |
| "extensible": "in", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| ] |
| }, |
| "shared fence vk semaphore opaque FD descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared fence descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "int"} |
| ] |
| }, |
| "shared fence vk semaphore sync FD descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared fence descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "int"} |
| ] |
| }, |
| "shared fence vk semaphore zircon handle descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared fence descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "uint32_t"} |
| ] |
| }, |
| "shared fence DXGI shared handle descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared fence descriptor"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "void *"} |
| ] |
| }, |
| "shared fence MTL shared event descriptor": { |
| "category": "structure", |
| "chained": "in", |
| "chain roots": ["shared fence descriptor"], |
| "tags": ["dawn", "native"], |
| "_comment": "TODO(crbug.com/dawn/1745): improve type safety", |
| "members": [ |
| {"name": "shared event", "type": "void *"} |
| ] |
| }, |
| "shared fence type": { |
| "category": "enum", |
| "tags": ["dawn", "native"], |
| "values": [ |
| {"value": 0, "name": "undefined", "valid": false}, |
| {"value": 1, "name": "vk semaphore opaque FD"}, |
| {"value": 2, "name": "vk semaphore sync FD"}, |
| {"value": 3, "name": "vk semaphore zircon handle"}, |
| {"value": 4, "name": "DXGI shared handle"}, |
| {"value": 5, "name": "MTL shared event"} |
| ] |
| }, |
| "shared fence export info": { |
| "category": "structure", |
| "extensible": "out", |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "type", "type": "shared fence type"} |
| ] |
| }, |
| "shared fence vk semaphore opaque FD export info": { |
| "category": "structure", |
| "chained": "out", |
| "chain roots": ["shared fence export info"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "int"} |
| ] |
| }, |
| "shared fence vk semaphore sync FD export info": { |
| "category": "structure", |
| "chained": "out", |
| "chain roots": ["shared fence export info"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "int"} |
| ] |
| }, |
| "shared fence vk semaphore zircon handle export info": { |
| "category": "structure", |
| "chained": "out", |
| "chain roots": ["shared fence export info"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "uint32_t"} |
| ] |
| }, |
| "shared fence DXGI shared handle export info": { |
| "category": "structure", |
| "chained": "out", |
| "chain roots": ["shared fence export info"], |
| "tags": ["dawn", "native"], |
| "members": [ |
| {"name": "handle", "type": "void *"} |
| ] |
| }, |
| "shared fence MTL shared event export info": { |
| "category": "structure", |
| "chained": "out", |
| "chain roots": ["shared fence export info"], |
| "tags": ["dawn", "native"], |
| "_comment": "TODO(crbug.com/dawn/1745): improve type safety", |
| "members": [ |
| {"name": "shared event", "type": "void *"} |
| ] |
| }, |
| "feature name": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| {"value": 1, "name": "depth clip control"}, |
| {"value": 2, "name": "depth32 float stencil8"}, |
| {"value": 3, "name": "timestamp query"}, |
| {"value": 4, "name": "texture compression BC"}, |
| {"value": 5, "name": "texture compression ETC2"}, |
| {"value": 6, "name": "texture compression ASTC"}, |
| {"value": 7, "name": "indirect first instance"}, |
| {"value": 8, "name": "shader f16"}, |
| {"value": 9, "name": "RG11B10 ufloat renderable"}, |
| {"value": 10, "name": "BGRA8 unorm storage"}, |
| {"value": 11, "name": "float32 filterable", "jsrepr": "'float32-filterable'"}, |
| |
| {"value": 1002, "name": "dawn internal usages", "tags": ["dawn"]}, |
| {"value": 1003, "name": "dawn multi planar formats", "tags": ["dawn"]}, |
| {"value": 1004, "name": "dawn native", "tags": ["dawn", "native"]}, |
| {"value": 1006, "name": "chromium experimental timestamp query inside passes", "tags": ["dawn"]}, |
| {"value": 1007, "name": "implicit device synchronization", "tags": ["dawn", "native"]}, |
| {"value": 1008, "name": "surface capabilities", "tags": ["dawn", "native"]}, |
| {"value": 1009, "name": "transient attachments", "tags": ["dawn"]}, |
| {"value": 1010, "name": "MSAA render to single sampled", "tags": ["dawn"]}, |
| {"value": 1011, "name": "dual source blending", "tags": ["dawn"]}, |
| {"value": 1012, "name": "D3D11 multithread protected", "tags": ["dawn", "native"]}, |
| {"value": 1013, "name": "ANGLE texture sharing", "tags": ["dawn", "native"]}, |
| {"value": 1014, "name": "chromium experimental subgroups", "tags": ["dawn"]}, |
| {"value": 1015, "name": "chromium experimental subgroup uniform control flow", "tags": ["dawn"]}, |
| {"value": 1017, "name": "pixel local storage coherent", "tags": ["dawn"]}, |
| {"value": 1018, "name": "pixel local storage non coherent", "tags": ["dawn"]}, |
| {"value": 1019, "name": "unorm16 texture formats", "tags": ["dawn"]}, |
| {"value": 1020, "name": "snorm16 texture formats", "tags": ["dawn"]}, |
| {"value": 1021, "name": "multi planar format extended usages", "tags": ["dawn"]}, |
| {"value": 1022, "name": "multi planar format p010", "tags": ["dawn"]}, |
| {"value": 1023, "name": "host mapped pointer", "tags": ["dawn"]}, |
| {"value": 1024, "name": "multi planar render targets", "tags": ["dawn"]}, |
| {"value": 1025, "name": "multi planar format nv12a", "tags": ["dawn"]}, |
| {"value": 1026, "name": "framebuffer fetch", "tags": ["dawn"]}, |
| {"value": 1027, "name": "buffer map extended usages", "tags": ["dawn"]}, |
| {"value": 1028, "name": "adapter properties memory heaps", "tags": ["dawn"]}, |
| {"value": 1029, "name": "adapter properties D3D", "tags": ["dawn"]}, |
| {"value": 1030, "name": "adapter properties vk", "tags": ["dawn"]}, |
| {"value": 1031, "name": "r8 unorm storage", "tags": ["dawn"]}, |
| {"value": 1032, "name": "format capabilities", "tags": ["dawn"]}, |
| {"value": 1033, "name": "drm format capabilities", "tags": ["dawn"]}, |
| {"value": 1034, "name": "norm16 texture formats", "tags": ["dawn"]}, |
| {"value": 1035, "name": "multi planar format nv16", "tags": ["dawn"]}, |
| {"value": 1036, "name": "multi planar format nv24", "tags": ["dawn"]}, |
| {"value": 1037, "name": "multi planar format p210", "tags": ["dawn"]}, |
| {"value": 1038, "name": "multi planar format p410", "tags": ["dawn"]}, |
| |
| {"value": 1100, "name": "shared texture memory vk dedicated allocation", "tags": ["dawn", "native"]}, |
| {"value": 1101, "name": "shared texture memory a hardware buffer", "tags": ["dawn", "native"]}, |
| {"value": 1102, "name": "shared texture memory dma buf", "tags": ["dawn", "native"]}, |
| {"value": 1103, "name": "shared texture memory opaque FD", "tags": ["dawn", "native"]}, |
| {"value": 1104, "name": "shared texture memory zircon handle", "tags": ["dawn", "native"]}, |
| {"value": 1105, "name": "shared texture memory DXGI shared handle", "tags": ["dawn", "native"]}, |
| {"value": 1106, "name": "shared texture memory D3D11 texture 2D", "tags": ["dawn", "native"]}, |
| {"value": 1107, "name": "shared texture memory IO surface", "tags": ["dawn", "native"]}, |
| {"value": 1108, "name": "shared texture memory EGL image", "tags": ["dawn", "native"]}, |
| {"value": 1200, "name": "shared fence vk semaphore opaque FD", "tags": ["dawn", "native"]}, |
| {"value": 1201, "name": "shared fence vk semaphore sync FD", "tags": ["dawn", "native"]}, |
| {"value": 1202, "name": "shared fence vk semaphore zircon handle", "tags": ["dawn", "native"]}, |
| {"value": 1203, "name": "shared fence DXGI shared handle", "tags": ["dawn", "native"]}, |
| {"value": 1204, "name": "shared fence MTL shared event", "tags": ["dawn", "native"]}, |
| {"value": 1205, "name": "shared buffer memory D3D12 resource", "tags": ["dawn", "native"]}, |
| {"value": 1206, "name": "static samplers", "tags": ["dawn"]}, |
| {"value": 1207, "name": "y cb cr vulkan samplers", "tags": ["dawn"]}, |
| {"value": 1208, "name": "shader module compilation options", "tags": ["dawn"]}, |
| |
| {"value": 1209, "name": "dawn load resolve texture", "tags": ["dawn"]} |
| ] |
| }, |
| "filter mode": { |
| "category": "enum", |
| "values": [ |
| {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| {"value": 1, "name": "nearest"}, |
| {"value": 2, "name": "linear"} |
| ] |
| }, | <