dawn-cmake/dawn.json

1944 lines
72 KiB
JSON
Raw Normal View History

2017-05-31 00:03:44 +00:00
{
"_comment": [
"Copyright 2017 The Dawn Authors",
2017-05-31 00:03:44 +00:00
"",
"Licensed under the Apache License, Version 2.0 (the \"License\");",
"you may not use this file except in compliance with the License.",
"You may obtain a copy of the License at",
"",
" http://www.apache.org/licenses/LICENSE-2.0",
"",
"Unless required by applicable law or agreed to in writing, software",
"distributed under the License is distributed on an \"AS IS\" BASIS,",
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
"See the License for the specific language governing permissions and",
"limitations under the License."
],
"adapter properties": {
"category": "structure",
"extensible": true,
"members": [
{"name": "device ID", "type": "uint32_t"},
{"name": "vendor ID", "type": "uint32_t"},
{"name": "name", "type": "char", "annotation": "const*"},
{"name": "driver description", "type": "char", "annotation": "const*"},
{"name": "adapter type", "type": "adapter type"},
{"name": "backend type", "type": "backend type"}
]
},
"adapter type": {
"category": "enum",
"javascript": false,
"values": [
{"value": 0, "name": "discrete GPU"},
{"value": 1, "name": "integrated GPU"},
{"value": 2, "name": "CPU"},
{"value": 3, "name": "unknown"}
]
},
"address mode": {
"category": "enum",
"values": [
{"value": 0, "name": "repeat"},
{"value": 1, "name": "mirror repeat"},
{"value": 2, "name": "clamp to edge"}
]
},
"backend type": {
"category": "enum",
"javascript": false,
"values": [
{"value": 0, "name": "null"},
{"value": 1, "name": "D3D11"},
{"value": 2, "name": "D3D12"},
{"value": 3, "name": "metal"},
{"value": 4, "name": "vulkan"},
{"value": 5, "name": "openGL"},
{"value": 6, "name": "openGLES"}
]
},
2017-05-31 00:03:44 +00:00
"bind group": {
"category": "object"
},
"bind group entry": {
"category": "structure",
"extensible": false,
"members": [
{"name": "binding", "type": "uint32_t"},
{"name": "buffer", "type": "buffer", "optional": true},
{"name": "offset", "type": "uint64_t", "default": "0"},
{"name": "size", "type": "uint64_t"},
{"name": "sampler", "type": "sampler", "optional": true},
{"name": "texture view", "type": "texture view", "optional": true}
]
},
"bind group descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "layout", "type": "bind group layout"},
{"name": "entry count", "type": "uint32_t"},
{"name": "entries", "type": "bind group entry", "annotation": "const*", "length": "entry count"}
2017-05-31 00:03:44 +00:00
]
},
"bind group layout": {
"category": "object"
},
"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", "jsrepr": "readonly-storage"}
]
},
"buffer binding layout": {
"category": "structure",
"extensible": true,
"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": true,
"members": [
{"name": "type", "type": "sampler binding type", "default": "undefined"}
]
},
"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": true,
"members": [
{"name": "sample type", "type": "texture sample type", "default": "undefined"},
{"name": "view dimension", "type": "texture view dimension", "default": "undefined"},
{"name": "multisampled", "type": "bool", "default": "false"}
]
},
"storage texture access": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "read only", "jsrepr": "readonly"},
{"value": 2, "name": "write only", "jsrepr": "writeonly"}
]
},
"storage texture binding layout": {
"category": "structure",
"extensible": true,
"members": [
{"name": "access", "type": "storage texture access", "default": "undefined"},
{"name": "format", "type": "texture format", "default": "undefined"},
{"name": "view dimension", "type": "texture view dimension", "default": "undefined"}
]
},
"bind group layout entry": {
"category": "structure",
"extensible": false,
"members": [
{"name": "binding", "type": "uint32_t"},
{"name": "visibility", "type": "shader stage"},
{"name": "type", "type": "binding type", "default": "undefined"},
{"name": "has dynamic offset", "type": "bool", "default": "false"},
{"name": "min buffer binding size", "type": "uint64_t", "default": "0"},
{"name": "view dimension", "type": "texture view dimension", "default": "undefined"},
{"name": "texture component type", "type": "texture component type", "default": "float"},
{"name": "storage texture format", "type": "texture format", "default": "undefined"},
{"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": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "entry count", "type": "uint32_t"},
{"name": "entries", "type": "bind group layout entry", "annotation": "const*", "length": "entry count"}
2017-05-31 00:03:44 +00:00
]
},
"binding type": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
{"value": 1, "name": "uniform buffer"},
{"value": 2, "name": "storage buffer"},
{"value": 3, "name": "readonly storage buffer"},
{"value": 4, "name": "sampler"},
{"value": 5, "name": "comparison sampler"},
{"value": 6, "name": "sampled texture"},
{"value": 7, "name": "multisampled texture"},
{"value": 8, "name": "readonly storage texture"},
{"value": 9, "name": "writeonly storage texture"}
2017-05-31 00:03:44 +00:00
]
},
"blend descriptor": {
"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"}
]
},
2017-07-26 20:59:53 +00:00
"blend factor": {
"category": "enum",
"values": [
{"value": 0, "name": "zero"},
{"value": 1, "name": "one"},
{"value": 2, "name": "src color"},
{"value": 3, "name": "one minus src color"},
{"value": 4, "name": "src alpha"},
{"value": 5, "name": "one minus src alpha"},
{"value": 6, "name": "dst color"},
{"value": 7, "name": "one minus dst color"},
{"value": 8, "name": "dst alpha"},
{"value": 9, "name": "one minus dst alpha"},
{"value": 10, "name": "src alpha saturated"},
{"value": 11, "name": "blend color"},
{"value": 12, "name": "one minus blend color"}
2017-07-26 20:59:53 +00:00
]
},
"blend operation": {
"category": "enum",
"values": [
{"value": 0, "name": "add"},
{"value": 1, "name": "subtract"},
{"value": 2, "name": "reverse subtract"},
{"value": 3, "name": "min"},
{"value": 4, "name": "max"}
]
},
"color state descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "format", "type": "texture format"},
{"name": "alpha blend", "type": "blend descriptor"},
{"name": "color blend", "type": "blend descriptor"},
{"name": "write mask", "type": "color write mask", "default": "all"}
2017-07-26 20:59:53 +00:00
]
},
"bool": {
"category": "native"
},
2017-05-31 00:03:44 +00:00
"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", "annotation": "*"}
]
},
{
"name": "get mapped range",
"returns": "void *",
"args": [
{"name": "offset", "type": "size_t", "default": 0},
{"name": "size", "type": "size_t", "default": 0}
]
},
{
"name": "get const mapped range",
"returns": "void const *",
"args": [
{"name": "offset", "type": "size_t", "default": 0},
{"name": "size", "type": "size_t", "default": 0}
]
},
{
"name": "unmap"
},
{
"name": "destroy"
2017-05-31 00:03:44 +00:00
}
]
},
"buffer copy view": {
"category": "structure",
"extensible": true,
"members": [
{"name": "layout", "type": "texture data layout"},
{"name": "buffer", "type": "buffer"}
]
},
"buffer descriptor": {
"category": "structure",
"extensible": true,
"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 map callback": {
"category": "callback",
"args": [
{"name": "status", "type": "buffer map async status"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"buffer map async status": {
"category": "enum",
"values": [
{"value": 0, "name": "success"},
{"value": 1, "name": "error"},
{"value": 2, "name": "unknown"},
{"value": 3, "name": "device lost"},
{"value": 4, "name": "destroyed before callback"},
{"value": 5, "name": "unmapped before callback"}
]
},
"buffer usage": {
2017-05-31 00:03:44 +00:00
"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"}
2017-05-31 00:03:44 +00:00
]
},
"char": {
"category": "native"
},
"color": {
"category": "structure",
"members": [
{"name": "r", "type": "double"},
{"name": "g", "type": "double"},
{"name": "b", "type": "double"},
{"name": "a", "type": "double"}
]
},
2017-07-26 20:59:53 +00:00
"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"}
]
},
2017-05-31 00:03:44 +00:00
"command buffer": {
"category": "object"
},
"command buffer descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
]
},
"command encoder": {
"category": "object",
"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"}
],
"TODO": [
"Restrictions on the alignment of the copy? Cf Metal on OSX"
]
},
{
"name": "copy buffer to texture",
"args": [
{"name": "source", "type": "buffer copy view", "annotation": "const*"},
{"name": "destination", "type": "texture copy view", "annotation": "const*"},
{"name": "copy size", "type": "extent 3D", "annotation": "const*"}
]
},
{
"name": "copy texture to buffer",
"args": [
{"name": "source", "type": "texture copy view", "annotation": "const*"},
{"name": "destination", "type": "buffer copy view", "annotation": "const*"},
{"name": "copy size", "type": "extent 3D", "annotation": "const*"}
]
},
{
"name": "copy texture to texture",
"args": [
{"name": "source", "type": "texture copy view", "annotation": "const*"},
{"name": "destination", "type": "texture copy view", "annotation": "const*"},
{"name": "copy size", "type": "extent 3D", "annotation": "const*"}
]
},
{
"name": "inject validation error",
"args": [
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
],
"TODO": "enga@: Make this a Dawn extension"
},
{
"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 timestamp",
"args": [
{"name": "query set", "type": "query set"},
{"name": "query index", "type": "uint32_t"}
]
}
]
},
"command encoder descriptor": {
"category": "structure",
"extensible": true,
"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": "less equal"},
{"value": 4, "name": "greater"},
{"value": 5, "name": "greater equal"},
{"value": 6, "name": "equal"},
{"value": 7, "name": "not equal"},
{"value": 8, "name": "always"}
]
},
"compute pass descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
]
},
"compute pass encoder": {
"category": "object",
"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"}
]
},
2017-05-31 00:03:44 +00:00
{
"name": "set pipeline",
2017-05-31 00:03:44 +00:00
"args": [
{"name": "pipeline", "type": "compute pipeline"}
2017-05-31 00:03:44 +00:00
]
},
{
"name": "set bind group",
"args": [
{"name": "group index", "type": "uint32_t"},
{"name": "group", "type": "bind group"},
{"name": "dynamic offset count", "type": "uint32_t", "default": "0"},
{"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "optional": true}
2017-05-31 00:03:44 +00:00
]
},
{
"name": "write timestamp",
"args": [
{"name": "query set", "type": "query set"},
{"name": "query index", "type": "uint32_t"}
]
},
{
"name": "dispatch",
"args": [
{"name": "x", "type": "uint32_t"},
{"name": "y", "type": "uint32_t", "default": "1"},
{"name": "z", "type": "uint32_t", "default": "1"}
]
},
{
"name": "dispatch indirect",
"args": [
{"name": "indirect buffer", "type": "buffer"},
{"name": "indirect offset", "type": "uint64_t"}
]
},
2017-05-31 00:03:44 +00:00
{
"name": "end pass"
2017-05-31 00:03:44 +00:00
}
]
},
"compute pipeline": {
"category": "object",
"methods": [
{
"name": "get bind group layout",
"returns": "bind group layout",
"args": [
{"name": "group index", "type": "uint32_t"}
]
}
]
},
"compute pipeline descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "layout", "type": "pipeline layout", "optional": true},
{"name": "compute stage", "type": "programmable stage descriptor"}
]
},
"copy texture for browser options": {
"category": "structure",
"extensible": true,
"members": [
{"name": "flipY", "type": "bool", "default": "false"}
]
},
"create ready compute pipeline callback": {
"category": "callback",
"args": [
{"name": "status", "type": "create ready pipeline status"},
{"name": "pipeline", "type": "compute pipeline"},
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"create ready pipeline status": {
"category": "enum",
"values": [
{"value": 0, "name": "success"},
{"value": 1, "name": "error"},
{"value": 2, "name": "device lost"},
{"value": 3, "name": "device destroyed"},
{"value": 4, "name": "unknown"}
]
},
"create ready render pipeline callback": {
"category": "callback",
"args": [
{"name": "status", "type": "create ready pipeline status"},
{"name": "pipeline", "type": "render pipeline"},
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"cull mode": {
"category": "enum",
"values": [
{"value": 0, "name": "none"},
{"value": 1, "name": "front"},
{"value": 2, "name": "back"}
]
},
2017-05-31 00:03:44 +00:00
"device": {
"category": "object",
"methods": [
{
"name": "create bind group",
"returns": "bind group",
"args": [
{"name": "descriptor", "type": "bind group descriptor", "annotation": "const*"}
]
2017-05-31 00:03:44 +00:00
},
{
"name": "create bind group layout",
"returns": "bind group layout",
"args": [
{"name": "descriptor", "type": "bind group layout descriptor", "annotation": "const*"}
]
2017-05-31 00:03:44 +00:00
},
{
"name": "create buffer",
"returns": "buffer",
"args": [
{"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"}
]
},
{
"name": "create error buffer",
"returns": "buffer",
"TODO": "enga@: Make this part of a dawn_wire extension"
},
{
"name": "create command encoder",
"returns": "command encoder",
"args": [
{"name": "descriptor", "type": "command encoder descriptor", "annotation": "const*", "optional": true}
]
},
2017-05-31 00:03:44 +00:00
{
"name": "create compute pipeline",
"returns": "compute pipeline",
"args": [
{"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}
]
},
{
"name": "create ready compute pipeline",
"returns": "void",
"args": [
{"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"},
{"name": "callback", "type": "create ready compute pipeline callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
{
"name": "create pipeline layout",
"returns": "pipeline layout",
"args": [
{"name": "descriptor", "type": "pipeline layout descriptor", "annotation": "const*"}
]
2017-05-31 00:03:44 +00:00
},
{
"name": "create query set",
"returns": "query set",
"args": [
{"name": "descriptor", "type": "query set descriptor", "annotation": "const*"}
]
2017-05-31 00:03:44 +00:00
},
{
"name": "create ready render pipeline",
"returns": "void",
"args": [
{"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"},
{"name": "callback", "type": "create ready render pipeline callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
{
"name": "create render bundle encoder",
"returns": "render bundle encoder",
"args": [
{"name": "descriptor", "type": "render bundle encoder descriptor", "annotation": "const*"}
]
},
{
"name": "create render pipeline",
"returns": "render pipeline",
"args": [
{"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}
]
},
2017-05-31 00:03:44 +00:00
{
"name": "create sampler",
"returns": "sampler",
"args": [
{"name": "descriptor", "type": "sampler descriptor", "annotation": "const*"}
]
2017-05-31 00:03:44 +00:00
},
{
"name": "create shader module",
"returns": "shader module",
"args": [
{"name": "descriptor", "type": "shader module descriptor", "annotation": "const*"}
]
2017-05-31 00:03:44 +00:00
},
2017-07-28 01:30:57 +00:00
{
"name": "create swap chain",
"returns": "swap chain",
"args": [
{"name": "surface", "type": "surface", "optional": true},
{"name": "descriptor", "type": "swap chain descriptor", "annotation": "const*"}
]
2017-07-28 01:30:57 +00:00
},
2017-05-31 00:03:44 +00:00
{
"name": "create texture",
"returns": "texture",
"args": [
{"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
]
2017-05-31 00:03:44 +00:00
},
{
"name": "get default queue",
"returns": "queue"
},
{
"name": "inject error",
"args": [
{"name": "type", "type": "error type"},
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
],
"TODO": "enga@: Make this a Dawn extension"
},
{
"name": "lose for testing"
},
2017-06-14 17:33:45 +00:00
{
"name": "tick"
},
2017-05-31 00:03:44 +00:00
{
"name": "set uncaptured error callback",
2017-05-31 00:03:44 +00:00
"args": [
{"name": "callback", "type": "error callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
2017-05-31 00:03:44 +00:00
]
},
{
"name": "set device lost callback",
"args": [
{"name": "callback", "type": "device lost callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
{
"name": "push error scope",
"args": [
{"name": "filter", "type": "error filter"}
]
},
{
"name": "pop error scope",
"returns": "bool",
"args": [
{"name": "callback", "type": "error callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
2017-05-31 00:03:44 +00:00
}
]
},
"device lost callback": {
"category": "callback",
"args": [
{"name": "message", "type": "char", "annotation": "const*"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"device properties": {
"category": "structure",
"extensible": false,
"members": [
{"name": "texture compression BC", "type": "bool", "default": "false"},
{"name": "shader float16", "type": "bool", "default": "false"},
{"name": "pipeline statistics query", "type": "bool", "default": "false"},
{"name": "timestamp query", "type": "bool", "default": "false"}
]
},
"depth stencil state descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "format", "type": "texture format"},
{"name": "depth write enabled", "type": "bool", "default": "false"},
{"name": "depth compare", "type": "compare function", "default": "always"},
{"name": "stencil front", "type": "stencil state face descriptor"},
{"name": "stencil back", "type": "stencil state face descriptor"},
{"name": "stencil read mask", "type": "uint32_t", "default": "0xFFFFFFFF"},
{"name": "stencil write mask", "type": "uint32_t", "default": "0xFFFFFFFF"}
2017-05-31 00:03:44 +00:00
]
},
"double": {
"category": "native"
},
"error callback": {
"category": "callback",
"args": [
{"name": "type", "type": "error type"},
{"name": "message", "type": "char", "annotation": "const*"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
2017-05-31 00:03:44 +00:00
},
"error filter": {
"category": "enum",
"values": [
{"value": 0, "name": "none"},
{"value": 1, "name": "validation"},
{"value": 2, "name": "out of memory"}
]
},
"error type": {
"category": "enum",
"values": [
{"value": 0, "name": "no error"},
{"value": 1, "name": "validation"},
{"value": 2, "name": "out of memory"},
{"value": 3, "name": "unknown"},
{"value": 4, "name": "device lost"}
]
},
"extent 3D": {
"category": "structure",
"members": [
{"name": "width", "type": "uint32_t", "default": 1},
{"name": "height", "type": "uint32_t", "default": 1},
{"name": "depth", "type": "uint32_t", "default": 1}
]
},
"fence": {
"category": "object",
"methods": [
{
"name": "get completed value",
"returns": "uint64_t"
},
{
"name": "on completion",
"args": [
{"name": "value", "type": "uint64_t"},
{"name": "callback", "type": "fence on completion callback"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
}
]
},
"fence on completion callback": {
"category": "callback",
"args": [
{"name": "status", "type": "fence completion status"},
{"name": "userdata", "type": "void", "annotation": "*"}
]
},
"fence completion status": {
"category": "enum",
"values": [
{"value": 0, "name": "success"},
{"value": 1, "name": "error"},
{"value": 2, "name": "unknown"},
{"value": 3, "name": "device lost"}
]
},
"fence descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "initial value", "type": "uint64_t", "default": "0"}
]
},
2017-05-31 00:03:44 +00:00
"filter mode": {
"category": "enum",
"values": [
{"value": 0, "name": "nearest"},
{"value": 1, "name": "linear"}
2017-05-31 00:03:44 +00:00
]
},
2017-08-01 18:22:52 +00:00
"float": {
"category": "native"
},
"front face": {
"category": "enum",
"values": [
{"value": 0, "name": "CCW"},
{"value": 1, "name": "CW"}
]
},
2017-05-31 00:03:44 +00:00
"index format": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "jsrepr": "undefined"},
{"value": 1, "name": "uint16"},
{"value": 2, "name": "uint32"}
2017-05-31 00:03:44 +00:00
]
},
"instance": {
"category": "object",
"methods": [
{
"name": "create surface",
"returns": "surface",
"args": [
{"name": "descriptor", "type": "surface descriptor", "annotation": "const*"}
]
}
]
},
"instance descriptor": {
"category": "structure",
"extensible": true,
"members": []
},
"vertex attribute descriptor": {
"category": "structure",
"extensible": false,
"members": [
{"name": "format", "type": "vertex format"},
{"name": "offset", "type": "uint64_t"},
{"name": "shader location", "type": "uint32_t"}
]
},
"vertex buffer layout descriptor": {
"category": "structure",
"extensible": false,
"members": [
{"name": "array stride", "type": "uint64_t"},
{"name": "step mode", "type": "input step mode", "default": "vertex"},
{"name": "attribute count", "type": "uint32_t"},
{"name": "attributes", "type": "vertex attribute descriptor", "annotation": "const*", "length": "attribute count"}
]
},
"vertex state descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "index format", "type": "index format", "default": "undefined"},
{"name": "vertex buffer count", "type": "uint32_t", "default": 0},
{"name": "vertex buffers", "type": "vertex buffer layout descriptor", "annotation": "const*", "length": "vertex buffer count"}
2017-05-31 00:03:44 +00:00
]
},
"input step mode": {
"category": "enum",
"values": [
{"value": 0, "name": "vertex"},
{"value": 1, "name": "instance"}
]
},
"load op": {
"category": "enum",
"values": [
{"value": 0, "name": "clear"},
{"value": 1, "name": "load"}
]
},
"map mode": {
"category": "bitmask",
"values": [
{"value": 0, "name": "none"},
{"value": 1, "name": "read"},
{"value": 2, "name": "write"}
]
},
"store op": {
"category": "enum",
"values": [
{"value": 0, "name": "store"},
{"value": 1, "name": "clear"}
]
},
"origin 3D": {
"category": "structure",
"members": [
{"name": "x", "type": "uint32_t", "default": "0"},
{"name": "y", "type": "uint32_t", "default": "0"},
{"name": "z", "type": "uint32_t", "default": "0"}
]
},
2017-05-31 00:03:44 +00:00
"pipeline layout": {
"category": "object"
},
"pipeline layout descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "bind group layout count", "type": "uint32_t"},
{"name": "bind group layouts", "type": "bind group layout", "annotation": "const*", "length": "bind group layout count"}
2017-05-31 00:03:44 +00:00
]
},
"pipeline statistic name": {
"category": "enum",
"values": [
{"value": 0, "name": "vertex shader invocations"},
{"value": 1, "name": "clipper invocations"},
{"value": 2, "name": "clipper primitives out"},
{"value": 3, "name": "fragment shader invocations"},
{"value": 4, "name": "compute shader invocations"}
]
},
"present mode": {
"category": "enum",
"values": [
{"value": 0, "name": "immediate"},
{"value": 1, "name": "mailbox"},
{"value": 2, "name": "fifo"}
]
},
"programmable stage descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "module", "type": "shader module"},
{"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
2017-07-24 17:54:19 +00:00
"primitive topology": {
"category": "enum",
"values": [
{"value": 0, "name": "point list"},
{"value": 1, "name": "line list"},
2017-07-24 17:54:19 +00:00
{"value": 2, "name": "line strip"},
{"value": 3, "name": "triangle list"},
2017-07-24 17:54:19 +00:00
{"value": 4, "name": "triangle strip"}
]
},
"query set": {
"category": "object",
"methods": [
{
"name": "destroy"
}
]
},
"query set descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "type", "type": "query type"},
{"name": "count", "type": "uint32_t"},
{"name": "pipeline statistics", "type": "pipeline statistic name", "annotation": "const*", "length": "pipeline statistics count"},
{"name": "pipeline statistics count", "type": "uint32_t", "default": "0"}
]
},
"query type": {
"category": "enum",
"values": [
{"value": 0, "name": "occlusion"},
{"value": 1, "name": "pipeline statistics"},
{"value": 2, "name": "timestamp"}
]
},
2017-05-31 00:03:44 +00:00
"queue": {
"category": "object",
"methods": [
{
"name": "submit",
"args": [
{"name": "command count", "type": "uint32_t"},
{"name": "commands", "type": "command buffer", "annotation": "const*", "length": "command count"}
2017-05-31 00:03:44 +00:00
]
},
{
"name": "signal",
"args": [
{"name": "fence", "type": "fence"},
{"name": "signal value", "type": "uint64_t"}
]
},
{
"name": "create fence",
"returns": "fence",
"args": [
{"name": "descriptor", "type": "fence descriptor", "annotation": "const*", "optional": true}
]
},
{
"name": "write buffer",
"args": [
{"name": "buffer", "type": "buffer"},
{"name": "buffer offset", "type": "uint64_t"},
{"name": "data", "type": "void", "annotation": "const*", "length": "size"},
{"name": "size", "type": "size_t"}
]
},
{
"name": "write texture",
"args": [
{"name": "destination", "type": "texture copy view", "annotation": "const*"},
{"name": "data", "type": "void", "annotation": "const*", "length": "data size"},
{"name": "data size", "type": "size_t"},
{"name": "data layout", "type": "texture data layout", "annotation": "const*"},
{"name": "write size", "type": "extent 3D", "annotation": "const*"}
]
},
{
"name": "copy texture for browser",
"extensible": true,
"args": [
{"name": "source", "type": "texture copy view", "annotation": "const*"},
{"name": "destination", "type": "texture copy view", "annotation": "const*"},
{"name": "copy size", "type": "extent 3D", "annotation": "const*"},
{"name": "options", "type": "copy texture for browser options", "annotation": "const*"}
]
2017-05-31 00:03:44 +00:00
}
]
},
"rasterization state descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "front face", "type": "front face", "default": "CCW"},
{"name": "cull mode", "type": "cull mode", "default": "none"},
{"name": "depth bias", "type": "int32_t", "default": "0"},
{"name": "depth bias slope scale", "type": "float", "default": "0.0f"},
{"name": "depth bias clamp", "type": "float", "default": "0.0f"}
]
},
"render bundle": {
"category": "object"
},
"render bundle encoder": {
"category": "object",
"methods": [
{
"name": "set pipeline",
"args": [
{"name": "pipeline", "type": "render pipeline"}
]
},
{
"name": "set bind group",
"args": [
{"name": "group index", "type": "uint32_t"},
{"name": "group", "type": "bind group"},
{"name": "dynamic offset count", "type": "uint32_t", "default": "0"},
{"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "optional": true}
]
},
{
"name": "draw",
"args": [
{"name": "vertex count", "type": "uint32_t"},
{"name": "instance count", "type": "uint32_t", "default": "1"},
{"name": "first vertex", "type": "uint32_t", "default": "0"},
{"name": "first instance", "type": "uint32_t", "default": "0"}
]
},
{
"name": "draw indexed",
"args": [
{"name": "index count", "type": "uint32_t"},
{"name": "instance count", "type": "uint32_t", "default": "1"},
{"name": "first index", "type": "uint32_t", "default": "0"},
{"name": "base vertex", "type": "int32_t", "default": "0"},
{"name": "first instance", "type": "uint32_t", "default": "0"}
]
},
{
"name": "draw indirect",
"args": [
{"name": "indirect buffer", "type": "buffer"},
{"name": "indirect offset", "type": "uint64_t"}
]
},
{
"name": "draw indexed indirect",
"args": [
{"name": "indirect buffer", "type": "buffer"},
{"name": "indirect offset", "type": "uint64_t"}
]
},
{
"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 vertex buffer",
"args": [
{"name": "slot", "type": "uint32_t"},
{"name": "buffer", "type": "buffer"},
{"name": "offset", "type": "uint64_t", "default": "0"},
{"name": "size", "type": "uint64_t", "default": "0"}
]
},
{
"name": "set index buffer",
"args": [
{"name": "buffer", "type": "buffer"},
{"name": "format", "type": "index format"},
{"name": "offset", "type": "uint64_t", "default": "0"},
{"name": "size", "type": "uint64_t", "default": "0"}
]
},
{
"name": "set index buffer with format",
"args": [
{"name": "buffer", "type": "buffer"},
{"name": "format", "type": "index format"},
{"name": "offset", "type": "uint64_t", "default": "0"},
{"name": "size", "type": "uint64_t", "default": "0"}
]
},
{
"name": "finish",
"returns": "render bundle",
"args": [
{"name": "descriptor", "type": "render bundle descriptor", "annotation": "const*", "optional": true}
]
}
]
},
"render bundle descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
]
},
"render bundle encoder descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "color formats count", "type": "uint32_t"},
{"name": "color formats", "type": "texture format", "annotation": "const*", "length": "color formats count"},
{"name": "depth stencil format", "type": "texture format", "default": "undefined"},
{"name": "sample count", "type": "uint32_t", "default": "1"}
]
},
"render pass color attachment descriptor": {
"category": "structure",
"members": [
{"name": "attachment", "type": "texture view"},
{"name": "resolve target", "type": "texture view", "optional": true},
{"name": "load op", "type": "load op"},
{"name": "store op", "type": "store op"},
{"name": "clear color", "type": "color"}
]
},
"render pass depth stencil attachment descriptor": {
"category": "structure",
"members": [
{"name": "attachment", "type": "texture view"},
{"name": "depth load op", "type": "load op"},
{"name": "depth store op", "type": "store op"},
{"name": "clear depth", "type": "float"},
{"name": "depth read only", "type": "bool", "default": "false"},
{"name": "stencil load op", "type": "load op"},
{"name": "stencil store op", "type": "store op"},
{"name": "clear stencil", "type": "uint32_t", "default": "0"},
{"name": "stencil read only", "type": "bool", "default": "false"}
]
},
"render pass descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "color attachment count", "type": "uint32_t"},
{"name": "color attachments", "type": "render pass color attachment descriptor", "annotation": "const*", "length": "color attachment count"},
{"name": "depth stencil attachment", "type": "render pass depth stencil attachment descriptor", "annotation": "const*", "optional": true},
{"name": "occlusion query set", "type": "query set", "optional": true}
]
2017-05-31 00:03:44 +00:00
},
"render pass encoder": {
"category": "object",
"methods": [
{
"name": "set pipeline",
"args": [
{"name": "pipeline", "type": "render pipeline"}
]
},
{
"name": "set bind group",
"args": [
{"name": "group index", "type": "uint32_t"},
{"name": "group", "type": "bind group"},
{"name": "dynamic offset count", "type": "uint32_t", "default": "0"},
{"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "optional": true}
]
},
{
"name": "draw",
"args": [
{"name": "vertex count", "type": "uint32_t"},
{"name": "instance count", "type": "uint32_t", "default": "1"},
{"name": "first vertex", "type": "uint32_t", "default": "0"},
{"name": "first instance", "type": "uint32_t", "default": "0"}
]
},
{
"name": "draw indexed",
"args": [
{"name": "index count", "type": "uint32_t"},
{"name": "instance count", "type": "uint32_t", "default": "1"},
{"name": "first index", "type": "uint32_t", "default": "0"},
{"name": "base vertex", "type": "int32_t", "default": "0"},
{"name": "first instance", "type": "uint32_t", "default": "0"}
]
},
{
"name": "draw indirect",
"args": [
{"name": "indirect buffer", "type": "buffer"},
{"name": "indirect offset", "type": "uint64_t"}
]
},
{
"name": "draw indexed indirect",
"args": [
{"name": "indirect buffer", "type": "buffer"},
{"name": "indirect offset", "type": "uint64_t"}
]
},
{
"name": "execute bundles",
"args": [
{"name": "bundles count", "type": "uint32_t"},
{"name": "bundles", "type": "render bundle", "annotation": "const*", "length": "bundles count"}
]
},
{
"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 stencil reference",
"args": [
{"name": "reference", "type": "uint32_t"}
]
},
{
"name": "set blend color",
"args": [
{"name": "color", "type": "color", "annotation": "const*"}
]
},
{
"name": "set viewport",
"args": [
{"name": "x", "type": "float"},
{"name": "y", "type": "float"},
{"name": "width", "type": "float"},
{"name": "height", "type": "float"},
{"name": "min depth", "type": "float"},
{"name": "max depth", "type": "float"}
]
},
{
"name": "set scissor rect",
"args": [
{"name": "x", "type": "uint32_t"},
{"name": "y", "type": "uint32_t"},
{"name": "width", "type": "uint32_t"},
{"name": "height", "type": "uint32_t"}
]
},
{
"name": "set vertex buffer",
"args": [
{"name": "slot", "type": "uint32_t"},
{"name": "buffer", "type": "buffer"},
{"name": "offset", "type": "uint64_t", "default": "0"},
{"name": "size", "type": "uint64_t", "default": "0"}
]
},
{
"name": "set index buffer",
"args": [
{"name": "buffer", "type": "buffer"},
{"name": "format", "type": "index format"},
{"name": "offset", "type": "uint64_t", "default": "0"},
{"name": "size", "type": "uint64_t", "default": "0"}
]
},
{
"name": "set index buffer with format",
"args": [
{"name": "buffer", "type": "buffer"},
{"name": "format", "type": "index format"},
{"name": "offset", "type": "uint64_t", "default": "0"},
{"name": "size", "type": "uint64_t", "default": "0"}
]
},
{
"name": "begin occlusion query",
"args": [
{"name": "query index", "type": "uint32_t"}
]
},
{
"name": "end occlusion query"
},
{
"name": "write timestamp",
"args": [
{"name": "query set", "type": "query set"},
{"name": "query index", "type": "uint32_t"}
]
},
{
"name": "end pass"
}
]
},
"render pipeline": {
"category": "object",
"methods": [
{
"name": "get bind group layout",
"returns": "bind group layout",
"args": [
{"name": "group index", "type": "uint32_t"}
]
}
]
},
"render pipeline descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "layout", "type": "pipeline layout", "optional": true},
{"name": "vertex stage", "type": "programmable stage descriptor"},
{"name": "fragment stage", "type": "programmable stage descriptor", "annotation": "const*", "optional": true},
{"name": "vertex state", "type": "vertex state descriptor", "annotation": "const*", "optional": true},
{"name": "primitive topology", "type": "primitive topology"},
{"name": "rasterization state", "type": "rasterization state descriptor", "annotation": "const*", "optional": true},
{"name": "sample count", "type": "uint32_t", "default": "1"},
{"name": "depth stencil state", "type": "depth stencil state descriptor", "annotation": "const*", "optional": true},
{"name": "color state count", "type": "uint32_t"},
{"name": "color states", "type": "color state descriptor", "annotation": "const*", "length": "color state count"},
{"name": "sample mask", "type": "uint32_t", "default": "0xFFFFFFFF"},
{"name": "alpha to coverage enabled", "type": "bool", "default": "false"}
]
},
"render pipeline descriptor dummy extension": {
"category": "structure",
"chained": true,
"members": [
{"name": "dummy stage", "type": "programmable stage descriptor"}
]
},
2017-05-31 00:03:44 +00:00
"sampler": {
"category": "object"
},
"sampler descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "address mode u", "type": "address mode", "default": "clamp to edge"},
{"name": "address mode v", "type": "address mode", "default": "clamp to edge"},
{"name": "address mode w", "type": "address mode", "default": "clamp to edge"},
{"name": "mag filter", "type": "filter mode", "default": "nearest"},
{"name": "min filter", "type": "filter mode", "default": "nearest"},
{"name": "mipmap filter", "type": "filter mode", "default": "nearest"},
{"name": "lod min clamp", "type": "float", "default": "0.0f"},
{"name": "lod max clamp", "type": "float", "default": "1000.0f"},
{"name": "compare", "type": "compare function", "default": "undefined"}
2017-05-31 00:03:44 +00:00
]
},
"sampler descriptor dummy anisotropic filtering": {
"category": "structure",
"chained": true,
"members": [
{"name": "max anisotropy", "type": "float"}
]
},
2017-05-31 00:03:44 +00:00
"shader module": {
"category": "object"
},
"shader module descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
]
},
"shader module SPIRV descriptor": {
"category": "structure",
"chained": true,
"members": [
{"name": "code size", "type": "uint32_t"},
{"name": "code", "type": "uint32_t", "annotation": "const*", "length": "code size"}
2017-05-31 00:03:44 +00:00
]
},
"shader module WGSL descriptor": {
"category": "structure",
"chained": true,
"members": [
{"name": "source", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
"shader stage": {
2017-05-31 00:03:44 +00:00
"category": "bitmask",
"values": [
2017-07-20 15:00:39 +00:00
{"value": 0, "name": "none"},
2017-05-31 00:03:44 +00:00
{"value": 1, "name": "vertex"},
{"value": 2, "name": "fragment"},
{"value": 4, "name": "compute"}
]
},
"stencil operation": {
"category": "enum",
"values": [
{"value": 0, "name": "keep"},
{"value": 1, "name": "zero"},
{"value": 2, "name": "replace"},
{"value": 3, "name": "invert"},
{"value": 4, "name": "increment clamp"},
{"value": 5, "name": "decrement clamp"},
{"value": 6, "name": "increment wrap"},
{"value": 7, "name": "decrement wrap"}
]
2017-05-31 00:03:44 +00:00
},
"stencil state face descriptor": {
"category": "structure",
"extensible": false,
"members": [
{"name": "compare", "type": "compare function", "default": "always"},
{"name": "fail op", "type": "stencil operation", "default": "keep"},
{"name": "depth fail op", "type": "stencil operation", "default": "keep"},
{"name": "pass op", "type": "stencil operation", "default": "keep"}
]
},
"surface": {
"category": "object"
},
"surface descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
]
},
"surface descriptor from canvas HTML selector": {
"category": "structure",
"chained": true,
"members": [
{"name": "selector", "type": "char", "annotation": "const*", "length": "strlen"}
]
},
"surface descriptor from metal layer": {
"category": "structure",
"chained": true,
"javascript": false,
"members": [
{"name": "layer", "type": "void", "annotation": "*"}
]
},
"surface descriptor from windows HWND": {
"category": "structure",
"chained": true,
"javascript": false,
"members": [
{"name": "hinstance", "type": "void", "annotation": "*"},
{"name": "hwnd", "type": "void", "annotation": "*"}
]
},
"surface descriptor from xlib": {
"category": "structure",
"chained": true,
"javascript": false,
"members": [
{"name": "display", "type": "void", "annotation": "*"},
{"name": "window", "type": "uint32_t"}
]
},
"swap chain": {
"category": "object",
"methods": [
{
"name": "configure",
"args": [
{"name": "format", "type": "texture format"},
{"name": "allowed usage", "type": "texture usage"},
{"name": "width", "type": "uint32_t"},
{"name": "height", "type": "uint32_t"}
]
},
{"name": "get current texture view", "returns": "texture view"},
{"name": "present"}
]
},
"swap chain descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "usage", "type": "texture usage"},
{"name": "format", "type": "texture format"},
{"name": "width", "type": "uint32_t"},
{"name": "height", "type": "uint32_t"},
{"name": "present mode", "type": "present mode"},
{"name": "implementation", "type": "uint64_t", "default": 0}
]
},
"s type": {
"category": "enum",
"javascript": false,
"values": [
{"value": 0, "name": "invalid", "valid": false},
{"value": 1, "name": "surface descriptor from metal layer"},
{"value": 2, "name": "surface descriptor from windows HWND"},
{"value": 3, "name": "surface descriptor from xlib"},
{"value": 4, "name": "surface descriptor from canvas HTML selector"},
{"value": 5, "name": "shader module SPIRV descriptor"},
{"value": 6, "name": "shader module WGSL descriptor"},
{"value": 7, "name": "sampler descriptor dummy anisotropic filtering"},
{"value": 8, "name": "render pipeline descriptor dummy extension"}
]
},
2017-05-31 00:03:44 +00:00
"texture": {
"category": "object",
"methods": [
{
"name": "create view",
"returns": "texture view",
"args": [
{"name": "descriptor", "type": "texture view descriptor", "annotation": "const*", "optional": true}
]
},
{
"name": "destroy"
2017-05-31 00:03:44 +00:00
}
]
},
"texture aspect": {
"category": "enum",
"values": [
{"value": 0, "name": "all"},
{"value": 1, "name": "stencil only"},
{"value": 2, "name": "depth only"}
]
},
"texture component type": {
"category": "enum",
"values": [
{"value": 0, "name": "float"},
{"value": 1, "name": "sint"},
{"value": 2, "name": "uint"},
{"value": 3, "name": "depth comparison"}
]
},
"texture copy view": {
"category": "structure",
"extensible": true,
"members": [
{"name": "texture", "type": "texture"},
{"name": "mip level", "type": "uint32_t", "default": "0"},
{"name": "origin", "type": "origin 3D"},
{"name": "aspect", "type": "texture aspect", "default": "all"}
]
},
"texture data layout": {
"category": "structure",
"extensible": true,
"members": [
{"name": "offset", "type": "uint64_t", "default": 0},
{"name": "bytes per row", "type": "uint32_t", "default": "WGPU_COPY_STRIDE_UNDEFINED"},
{"name": "rows per image", "type": "uint32_t", "default": "WGPU_COPY_STRIDE_UNDEFINED"}
]
},
"texture descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "usage", "type": "texture usage"},
{"name": "dimension", "type": "texture dimension", "default": "2D"},
{"name": "size", "type": "extent 3D"},
{"name": "format", "type": "texture format"},
{"name": "mip level count", "type": "uint32_t", "default": 1},
{"name": "sample count", "type": "uint32_t", "default": 1}
2017-05-31 00:03:44 +00:00
]
},
"texture dimension": {
"category": "enum",
"values": [
{"value": 0, "name": "1D"},
{"value": 1, "name": "2D"},
{"value": 2, "name": "3D"}
2017-05-31 00:03:44 +00:00
]
},
"texture format": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"},
{"value": 1, "name": "R8 unorm"},
{"value": 2, "name": "R8 snorm"},
{"value": 3, "name": "R8 uint"},
{"value": 4, "name": "R8 sint"},
2019-07-01 09:58:07 +00:00
{"value": 5, "name": "R16 uint"},
{"value": 6, "name": "R16 sint"},
{"value": 7, "name": "R16 float"},
{"value": 8, "name": "RG8 unorm"},
{"value": 9, "name": "RG8 snorm"},
{"value": 10, "name": "RG8 uint"},
{"value": 11, "name": "RG8 sint"},
2019-07-01 09:58:07 +00:00
{"value": 12, "name": "R32 float"},
{"value": 13, "name": "R32 uint"},
{"value": 14, "name": "R32 sint"},
{"value": 15, "name": "RG16 uint"},
{"value": 16, "name": "RG16 sint"},
{"value": 17, "name": "RG16 float"},
{"value": 18, "name": "RGBA8 unorm"},
{"value": 19, "name": "RGBA8 unorm srgb"},
{"value": 20, "name": "RGBA8 snorm"},
{"value": 21, "name": "RGBA8 uint"},
{"value": 22, "name": "RGBA8 sint"},
{"value": 23, "name": "BGRA8 unorm"},
{"value": 24, "name": "BGRA8 unorm srgb"},
{"value": 25, "name": "RGB10 A2 unorm"},
{"value": 26, "name": "RG11 B10 ufloat"},
{"value": 27, "name": "RGB9 E5 ufloat"},
2019-07-01 09:58:07 +00:00
{"value": 28, "name": "RG32 float"},
{"value": 29, "name": "RG32 uint"},
{"value": 30, "name": "RG32 sint"},
{"value": 31, "name": "RGBA16 uint"},
{"value": 32, "name": "RGBA16 sint"},
{"value": 33, "name": "RGBA16 float"},
2019-07-01 09:58:07 +00:00
{"value": 34, "name": "RGBA32 float"},
{"value": 35, "name": "RGBA32 uint"},
{"value": 36, "name": "RGBA32 sint"},
2019-07-01 09:58:07 +00:00
{"value": 37, "name": "depth32 float"},
{"value": 38, "name": "depth24 plus"},
{"value": 39, "name": "depth24 plus stencil8"},
2019-07-01 09:58:07 +00:00
{"value": 40, "name": "BC1 RGBA unorm"},
{"value": 41, "name": "BC1 RGBA unorm srgb"},
{"value": 42, "name": "BC2 RGBA unorm"},
{"value": 43, "name": "BC2 RGBA unorm srgb"},
{"value": 44, "name": "BC3 RGBA unorm"},
{"value": 45, "name": "BC3 RGBA unorm srgb"},
{"value": 46, "name": "BC4 R unorm"},
{"value": 47, "name": "BC4 R snorm"},
{"value": 48, "name": "BC5 RG unorm"},
{"value": 49, "name": "BC5 RG snorm"},
{"value": 50, "name": "BC6H RGB ufloat"},
{"value": 51, "name": "BC6H RGB float"},
{"value": 52, "name": "BC7 RGBA unorm"},
{"value": 53, "name": "BC7 RGBA unorm srgb"}
]
},
"texture usage": {
2017-05-31 00:03:44 +00:00
"category": "bitmask",
"values": [
{"value": 0, "name": "none"},
{"value": 1, "name": "copy src"},
{"value": 2, "name": "copy dst"},
2017-05-31 00:03:44 +00:00
{"value": 4, "name": "sampled"},
{"value": 8, "name": "storage"},
{"value": 16, "name": "output attachment"},
{"value": 16, "name": "render attachment"},
{"value": 32, "name": "present"}
2017-05-31 00:03:44 +00:00
]
},
"texture view descriptor": {
"category": "structure",
"extensible": true,
"members": [
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
{"name": "format", "type": "texture format", "default": "undefined"},
{"name": "dimension", "type": "texture view dimension", "default": "undefined"},
{"name": "base mip level", "type": "uint32_t", "default": "0"},
{"name": "mip level count", "type": "uint32_t", "default": "0"},
{"name": "base array layer", "type": "uint32_t", "default": "0"},
{"name": "array layer count", "type": "uint32_t", "default": "0"},
{"name": "aspect", "type": "texture aspect", "default": "all"}
],
"TODO": [
"jiawei.shao@intel.com: Allow choosing the aspect (depth vs. stencil)"
]
},
2017-05-31 00:03:44 +00:00
"texture view": {
"category": "object"
},
"texture view dimension": {
"category": "enum",
"values": [
{"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"},
{"value": 1, "name": "1D"},
{"value": 2, "name": "2D"},
{"value": 3, "name": "2D array"},
{"value": 4, "name": "cube"},
{"value": 5, "name": "cube array"},
{"value": 6, "name": "3D"}
],
"TODO": [
"jiawei.shao@intel.com: support 1D and 3D texture views"
]
},
2017-05-31 00:03:44 +00:00
"vertex format": {
"category": "enum",
"values": [
{"value": 0, "name": "uChar2"},
{"value": 1, "name": "uChar4"},
{"value": 2, "name": "char2"},
{"value": 3, "name": "char4"},
{"value": 4, "name": "uChar2 norm"},
{"value": 5, "name": "uChar4 norm"},
{"value": 6, "name": "char2 norm"},
{"value": 7, "name": "char4 norm"},
{"value": 8, "name": "uShort2"},
{"value": 9, "name": "uShort4"},
{"value": 10, "name": "short2"},
{"value": 11, "name": "short4"},
{"value": 12, "name": "uShort2 norm"},
{"value": 13, "name": "uShort4 norm"},
{"value": 14, "name": "short2 norm"},
{"value": 15, "name": "short4 norm"},
{"value": 16, "name": "half2"},
{"value": 17, "name": "half4"},
{"value": 18, "name": "float"},
{"value": 19, "name": "float2"},
{"value": 20, "name": "float3"},
{"value": 21, "name": "float4"},
{"value": 22, "name": "uInt"},
{"value": 23, "name": "uInt2"},
{"value": 24, "name": "uInt3"},
{"value": 25, "name": "uInt4"},
{"value": 26, "name": "int"},
{"value": 27, "name": "int2"},
{"value": 28, "name": "int3"},
{"value": 29, "name": "int4"}
2017-05-31 00:03:44 +00:00
]
},
"ObjectType": {
"_comment": "Only used for the wire",
"category": "native"
},
"ObjectId": {
"_comment": "Only used for the wire",
"category": "native"
},
"ObjectHandle": {
"_comment": "Only used for the wire",
"category": "native"
},
2017-05-31 00:03:44 +00:00
"void": {
"category": "native"
},
"void *": {
"category": "native"
},
"void const *": {
"category": "native"
},
2017-05-31 00:03:44 +00:00
"uint32_t": {
"category": "native"
},
"int32_t": {
"category": "native"
},
"size_t": {
"category": "native"
},
"uint64_t": {
"category": "native"
},
"uint8_t": {
"category": "native"
2017-05-31 00:03:44 +00:00
}
}