summaryrefslogtreecommitdiffhomepage
path: root/json/vkpcc.json
blob: 3e4c8b5b46807a11ec5a072cfc4015ede8ce9f9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://schema.khronos.org/vulkan/vkpcc.json#",
"title": "JSON schema for Vulkan pipeline state",
"description": "Schema for representing Vulkan pipeline state for use with the offline Pipeline Cache Compiler.",
"type": "object",
"additionalProperties": true,

"definitions": {
    "ShaderInfo" : {
        "stage" : {"type": "string", "format": "uri"},
        "filename" : {"type": "string", "format": "uri"}
    },

    "GraphicsPipelineState": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
            "Renderpass": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkRenderPassCreateInfo"},
            "Renderpass2": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkRenderPassCreateInfo2"},
            "YcbcrSamplers": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkSamplerYcbcrConversionCreateInfo"}}}},
            "ImmutableSamplers": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkSamplerCreateInfo"}}}},
            "DescriptorSetLayouts": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkDescriptorSetLayoutCreateInfo"}}}},
            "PipelineLayout": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkPipelineLayoutCreateInfo"},
            "GraphicsPipeline": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkGraphicsPipelineCreateInfo"},
            "ShaderFileNames": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"$ref": "#/definitions/ShaderInfo"}},
            "PhysicalDeviceFeatures": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkPhysicalDeviceFeatures2"}
        },
        "oneOf" : [{"required" : ["Renderpass"]}, {"required" : ["Renderpass2"]}],
        "required" : ["PipelineLayout", "GraphicsPipeline", "ShaderFileNames"]
    },

    "ComputePipelineState": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
            "YcbcrSamplers": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkSamplerYcbcrConversionCreateInfo"}}}},
            "ImmutableSamplers": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkSamplerCreateInfo"}}}},
            "DescriptorSetLayouts": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkDescriptorSetLayoutCreateInfo"}}}},
            "PipelineLayout": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkPipelineLayoutCreateInfo"},
            "ComputePipeline": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkComputePipelineCreateInfo"},
            "ShaderFileNames": {"$ref": "#/definitions/ShaderInfo"},
            "PhysicalDeviceFeatures": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkPhysicalDeviceFeatures2"}
        },
        "required" : ["PipelineLayout", "ComputePipeline", "ShaderFileNames"]
    }
},

"properties": {
    "GraphicsPipelineState"  : {"$ref": "#/definitions/GraphicsPipelineState"},
    "ComputePipelineState"   : {"$ref": "#/definitions/ComputePipelineState"},
    "PipelineUUID"           : {"type": "array", "minItems": 16, "maxItems": 16, "items": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/uint8_t"}},
    "DeviceExtensions"       : {"type": "array", "items": {"type": "string", "format": "uri"}}
},

"anyOf": [
    {"required": ["GraphicsPipelineState"]},
    {"required": ["ComputePipelineState"]}
]
}