Unnamed: 0
int64 0
0
| repo_id
stringlengths 5
186
| file_path
stringlengths 15
223
| content
stringlengths 1
32.8M
⌀ |
---|---|---|---|
0 | repos/MiniPixel | repos/MiniPixel/.vscode/c_cpp_properties.json | {
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/include/SDL2",
"/usr/local/include/SDL2"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++14",
"intelliSenseMode": "clang-x64"
},
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${vcpkgRoot}/x64-windows/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "${default}"
},
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/"
],
"defines": [],
"macFrameworkPath": [
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++98",
"intelliSenseMode": "macos-clang-arm64"
}
],
"version": 4
} |
0 | repos | repos/zig_aoc/README.md | # Advent of Code
Personal solutions for [Advent of Code](https://adventofcode.com/) in [Zig](https://ziglang.org/).
## How to run
`zig build -- <year> <day> <a|b>`
`zig build run -- <year> <day> <a|b>`
`zig build test -- <year> <day> <a|b>`
`zig test <path_to_file.zig>`
## TODO
- Add build to run tests for shared code.
- Add hints and errors for build
## About
Advent of Code is an annual event created by [Eric Wastl](https://github.com/topaz) and free for anyone to join. You can read more about it [here](https://adventofcode.com/2021/about).
|
0 | repos | repos/zig_aoc/build.zig | const std = @import("std");
pub fn build(b: *std.Build) !void {
if (b.args) |args| {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
var exe_buf = [_]u8{undefined} ** 9;
var src_buf = [_]u8{undefined} ** 22;
const exe_name = try std.fmt.bufPrint(&exe_buf, "{s:0<4}_{s:0>2}_{s}", .{ args[0], args[1], args[2] });
const src_path = try std.fmt.bufPrint(&src_buf, "{s:0<4}/{s:0>2}/solution_{s}.zig", .{ args[0], args[1], args[2] });
const exe = b.addExecutable(.{
.name = exe_name,
.root_source_file = .{ .path = src_path },
.target = target,
.optimize = optimize,
});
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
run_cmd.addArgs(args);
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
const unit_tests = b.addTest(.{
.root_source_file = .{ .path = src_path },
.target = target,
.optimize = optimize,
});
const run_unit_tests = b.addRunArtifact(unit_tests);
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_unit_tests.step);
}
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/03/input.txt | v>v<vvv<<vv^v<v>vv>v<<<^^^^^<<^<vv>^>v^>^>^>^>^><vvvv<^>^<<^><<<^vvvv>^>^><^v^><^<>^^>^vvv^<vv>>^>^^<>><>^>vvv>>^vv>^<><>^<v^>^>^><vv^vv^>><<^><<v>><>^<^>>vvv>v>>>v<<^<><^<v<>v>^^v^^^<^v^^>>><^>^>v<>^<>>^>^^v^><v<v>>><>v<v^v>^v<>>^><v>^<>v^>^<>^v^^^v^^>>vv<<^^><^<vvv>^>^^<^>>^^^^^v^<v>vv<>>v^v<^v^^<><^<^vv^><>><><>v>vvv^vv^^<<><<vvv><<^v^><v<>vvv^<^>vvvv^>^>>^v^<v^vv<^^v<>v>vv^<>><v<<<^v^<<><v<^<^<><^^^>^>>v>^>v^<>v><^<^<v^>^^vv<^^<>v^v^vv<>>>>v^v<>><^^v>vv^^>v^v>v<vv>>v>><v^v^v>vv>^^>^v><<vv^v^^vv<^v><^<<v<v^>vv^^^<v^>v>v^^^>><^^<v^<^>>v><vv<v^^>^^v>>v^^^<^^v>^v>><^<^<>>v<<^^vv>^^^v<^<^<v<v^^vv>^vv^>>v^><v>><<<>^vv^<^<>v^^<<<v<^>^><><v^^>>^^^<^vv<^^^>><^^v>^^v^<v^v^>^^<v>^<^v<^<<<<^<v^>v^<^^<>^^>^><<>>^v><>><^<v><^^^>>vv>^><vv>^^^^^v^vvv><><^<^>v>v^v^>^><><^<^><>v<<vv<^>><>^v^^v>^<<<>^v^>^<<v^vv<>v^<v^^vv><<v^<>>>^<v>vv>v>>>^<^>><vv<>>>>v<v>>>^v>v><>>vvv<^^><<^>^>v<^vvvv<v><vv<><^^^v^^^>v^v<>v<^^v>>><>v<v^>>v><v^>>^^<v<<<^<v<><^^v><<v^><<<<^vv<^<>^><vv<<<<^>>>^v>^v>vv>^v<>v>v<v><^>>v>>^>^><^<v^v^>^v<><><^^>^<vvvv^^<>^^^>vv^v^v>^v^^v^^v><v^<^<>><^<v>v>>vv<<v>>vvvv<vv><>>^v^>^>>v^v^<<<vv<><v<<>>>^v<<v>^^vv^><>v>^>v><<<<<<<^>^^v^<<^^>>vvv^<><>><>^^v<<vv><^^v<^^><vv>v^>>>v^v><v^v<^>v^><>v<<>v>^^v><<<<><^v^v>>^<>^<<>^<v<<>>v<<>><^<<<<^v>^<^v>v>vv<v<v<<>^>v<^<<>v^<vvvv^>v>><<v><v<>v>v>>v^vvv^^>>>v^<^<<^^<<<><v>v^<<v<<<>v<^^<><v<v^^<v>^>v>>v<>^>^^>>^v<<>v^^^>>>^vv<^v<v>^>v>^><>v^^<>^^v^^vv^<^>^<<>><<^>^v>>><<<vvvv><<><v<^v^v<vvv^<><<^<vv><v^v^v^>v>v^<vvv^><^><^<vv><>>v^>^^^<>><v^<^^^<>v<<v<^v>>>^>>v^><<>vvv><^>>v><v><>v>>^>v><<><<>^<>^^^vv><v^>v^^>>^>^<^v<v<^^<^vvvv>v<v>^>v^>^><^<vvvv><^><><<v<>v<v^><^<v^>^v^^<<<<^><^^<^><>>^v<<^<<^vv>v>>v<^<^vv>><v<vv>v<v<v>^v<>^>v<>^v<<<v>>^^v>>><vvv>v^>^v^v>^^^v<vvvv>><^>vvv^<vv^^vv><<<>v<>v>^<vvv^<^<v<v<^vv^^>>vv^<^^v^><^^^^^v<^<v<^>>>vv^v^>^<v>^<><v^<^v>>><^v^<<v<<v<>v>^v<v^v>>^^v<<v<v<<>>>vv>>^v>>^<<<<^><<<><^^>>v<>^vvvv>v^^^>^^^>^<vvvv><^^v<v<>v<^v^v<<v^^^v^<v<^v>v^^<>^>^<^v>vv<v^vv<^<<>v><<^><><^^v<<><^^><>^v>^<><<^<^^<<>vv<>^^<<^>><<<>>vvv>^>v^^v^><<^>v>^>^<^<<>v<^>vv^v^v<>vv<<v>vv<vv><^>v^<>^vv^v^<v<^>>>>v^v><^<><<>vv^<vvv^>>vvv^>v>>><^^vv<vvvv>v<^<^>>^^>^^vv>>><^v<>^v^<<>v^^^<v>^>>^<^<v>>^v<^^^<v>^v>^>>v<vv>>^<v^<<>>^>>><v>v^<<^<v>>^<<^^<>v<^v<^<>v^v>^^v<vvvv>^vv>vvv>v^<^>><v^^vv<<<^>vvvv<>>^^<>v^<><>v<^<>v<>^>v<>vv<v^v>>v<v<^<v^^v^vv^vvv><^^>v>><>>^<^^<>>^>^<v^>>vvv^v><v>>^>^>v><><<><vv^v>v<>^v<^vv^^^<>^^<<^^^v<>><v<^<^<^<^^><v^v<^>v^>vvvv>^^v^>^<v<^^^>>^<<vv^<><><^^^^<<>^<><v>vv^<><^>^^<>v^<>>>v><>vvvvv>v>v^^>^<<vvvv<>vv>>v<<^<>^^^v^<><>>^<<<v<v<>>>><><v>v<v<>>^>^^^^vv^^<<><^^<<vv<^<>v>vv<v<><<<^<<v<<<<>v<>>^<^>^>><v>v>><^^<>><<<><<><v^^v<<><^<^v<v^><^^v<<>><<<<^>v^<v>><v^><v<vvv>v^v^<v><<>>v<><<v>^<>><>>^><>v^v>v<<>v<>v^^><<>>>v<<>>>>^>v>><v<<>>>vv>v>^<^^^<>v<v>^<^^v^vvv^>vv>^<v><vvvv>^<<>vvv<<<vv>^^<^>^>>v>v<<<<<>^^vv^>>v>^<^<v^v^>^v>>v>^v<><>^<^>v>v<<<^^^v>^<<<>vvv^v^^>^>>^>v>v<>^^><>>v>^>v<<<^^^v^<v^vv>><><^<^<><vvv<v^>>^v>vv<^v<<^vv>v^<<v>v>v>^v^>^v<<^v^vv>v<v>^<<><v^>>v<>><v<<<^v<<>vvv^<vv<vvv<<>^vv^^v><^>v^vv<<v^<<^^^<^<>^^<<>v<><<v>^><>^<><<v<v^^>vv<>^<v<^<vvv>vv>v><^^v<>><^v^v><><>><v<v>vv<>>><v^^v<>><<^>>><^^^vvv<<<vv<<^v<<<>><<vv>>>>v<<<<<vv><><v>v^^<<^vv^<vv<>>vv>^<>^v^^<>^^^vv>v^^<v<><v>v<v>>^v<v<>>^<v^^><>v^^^>v^^v<vv><^>v^v^<>v>v<v<^^>>v<^^vv^v<^^^^vv<<><<^>>^^<<v^^<<^>v^>>^^^><^^>^v^v>^<<v<vv<<<v<^^^>^>>^v<>^<^>v>^>^v^<^^^<^vv<v><^^>>v<v>^>^v^>>>>^v>^^<<^<v^v<^<<v<<^><^^<v^<><v>v^<<v^^<><<>>><vv<<><>^<>>>v<<v^^^v^^<<<vv<<^<^<^vv^<><><<^^<^^>v^>^<v<>>v^v<><<v>^^v>^<^<vvv<v>v^v>>>^^<^<v^>^vv<<<v<<>^><><^<>v>>>v<v^<>v>><^^^v^^^v<^^<vv^^^>v>v<>>^^<><>v>^<v<>^>>>><>v>^v>^vv^v<vv<<^^>><v<>^>^^<v<^>^<vvv>><>^<<>>><<<><>^^<<<v<>v^>v>v<v>^^^>^>^v<<>v>vv>><<<v>^^<v><vv<<v^^>^>>^><^>v<^<^v>><^^>v<vv^^><><>^><<><>v^>v<><^^>><>^<^^v<^<<v>><v><<<^^<<v<^vv^v<>><>>>^>v<vvv^>^<><v^><^<<^vv<^v^v^v<>v^^v>v^<^>^vv^>>><<>v^vv^<>^v^><<v^v<v>v^<><>>v^v^><>v^vvv^^^<<^<<v<<v<^vv^>>v^v>^^<v<>><>v>>v^<>^>v>^>><<>v^v><^v>v>>><v<v><^<^^>vv<v><^>^<^>^^v><><v<^^v<<><^<<v^<v<<><^^vvv^v>^>^<>>vv>v^^v^^vv<^^>><v^^vv><^v>v^<<v<^v>vvv<>>^v><<>^v<<<>^><^vv><<^^<v^>v<<v>^vv<>^v>>>><<<<^^<^v>^<^^<^<^^>>^^v>^^^^v^^^<<>^^vv<<v^^><v>><^<<><>^>v<>>v^^^>^v^^v^<v^v>v>>>>>^v>^>^^<vvv^^<v^<<<v<<>v>><^^^v<<^^<v>>^<^<^><^<<v^v><<vv<^<>>v>v>^v<><<v>^>vv^v<v>v><^<v>><>^<vv<v^^^^v<^^>><<^^>v>v>^^^<>v>^v^^>vv^vv<^^>><>^>^<>v>><>^v<<v>v>^><^^^v^<vv><<^v^>v^>vv>v^<>v><vv><^v>v<><v^v^v<^v<>^v<v^<<><<v>>^v><v>^^<>vvv^>^<<v^>><^>><^<>^v<v<v<^vvv<><<^v^<v>><<<v>^<^<v>v>^vv^v>v<^^vv<<vvv^<v>><>vv^>v<<>v<vvvv>>v>^^>>><<<^>^vv>><v>^^^>v<^vv<>v<<<v<<<<v>>>>^<^^^^>v<^^<><v>v>v<v^>vv^>v>v<^>^v^<>v>>vvv>^^><^vvv>><>>>^<<^<v<>>>v^^><v<v>>^><>v<^^v^<<v><>^<>>><^v^v>>>^vvvv^<><<<v<^>>v>^v^<v<v<<^<<v^vv^v>v<v<>>v<v^<<<><v^>><^<<^>^^><v>v<^v^<^>v>^<<v>v^<>v^<>vv^<>^>^>v^>^vv<>^^<<>>v<>^v<><v^><><<<vv>v>v^>vv^><<<<v>^v<><>^^<vv>v^^v^^^<v<^^><v^v<>><v<vv>^<>>><vv<^v<<>>^><>>v<v^v^>>>v<<>v<<<<<<<^v<<^^^v<^v<>v^^<<<^<>>v^vv<v>^<^^<^^<<^>vv><^<^^v<<<^><^v<^><>v<vv^>^v^^>>><<vv^^v><^<<^<>>^>>^<<<<v^vv<>>>v>^v>><>v>>v>><>v>><^^><v>^^vv<^^<^>vv><<^>><<><v>^vvv><^v^>vvv^>>^<><^>^<<>>v^v>v<<>^>>^>v<^^<^<<>^^v<vvvvv^^^<^<>^^v>v<>^<^^<<v>v^^vvv^^v>^vv<v^>^<>v<^v^>^<v><v<<<^v<v<v^^<vvv>vv<<vv>v^<<v<^<vv><^>^><^^<^^<<v^^<v^v<v^^^^>^>vv^<>^<>^>^^<^v><<<^>vv^vv>v^v<>^^v^<^^^vvv^><v^<v^^<v<>v^<><>v>vv<^v^>>^v<^^vv>vv>^>><<<<v^^<^><>^><>>v<>>v>^v<^vv>^^>^<^<<v^>>v^v<^^v<vv<^<><^^>^^<>^^^<vv<v<<^^>^>^vv<^>><^<vvv^<>>vv^><v>v^>^vv>^>v^^<>>^v<>>v<^>^v>vv^<vv<^^>>^<v>>>>vvv>vv>^><^v<<<>^^v>v^v<^^^v^^>^><<^^>^<v>><^^^^^<v<vv<v<^<>^^<^v<^>>vv>>^v^vv<>><>^>>>^<v>^^^^><^<<<v<>^v<><vvv^<^^>vv^>>v<vvvv><v^v><^vv<^v<><vvv<vv>v<>^v^<<>>>>v^^>^vv<<vvv<^^><v><><<>v^v<^<^>><vv>^^><^>^><<><v<^v^><^<><>vv>>>>^><<^^^<^v^>^>^^>^<^><v><^^<^^<>><><v>><<<>^>^^v<>^<<<v>>vv>^>>^>^<>>vv<^^vv<>v<>^^>^v<v^^^^v<>^<v>v^v>^^^<v>v<<<^vv^><>^<v>>^^vv>v^<<^><>>vv^^^^^>v>>v<<<>^<vvv<<><><^v<^v<^>^<>^vvv>^>v><<<vv<>v>vv<v<<v>^<^^>v^v>^<^v^<<vvv^^<>^v<<^>^<><>^^<>>^^<^v^<^<v<><<^><v<>v^^>v^v^^^<^v<<^v>^>>^^^^^><<<vv^>>v^><v^^vv><>v^^<^v<^<v^^><<v>v^^^><^^^><<<<<>^<<^<>>v<<v^v^^v<<>^<vv>>><^^^<>>>>vvv>v<>>>v^v^v<^<<^>^<<>v>>^>^^><^><<^v^^<^<>v^v>vv<>>>>>>v<<><v^<v<>>^^>v<<<>^<<v><^><<^v>vv>>>><><>v^<^v><v^<<<<^v><^>v>>^^^v<^>>^>>v<<^<<>vvv>>^v<>>^v><<<^v^v<><v>^vvv<v<v>^^^<><vv^<<>vvv<v<^^v^^><v<^v<^v^<v<^>^^^>>v>^<v^>>^<><<><vv<>vv>^v^>>^<<v<^^v>v<v<vvv>><><<><vvvvv<^v<^>^^><>^<<>^v<<>>v^vv<<>^^v^v^v><^>v>v<^<<^<^>vv>^v<<^>^>>v^<<v^>v^^v^^<v^v>>><vv><<<>^v>><><v<vv<^>v<>><^v>^^v<<<<^v^vv<<<<><><^<^<^v><<^^v^<<<<<^^><^^>vv<v<^<v>v<^><><v<>vvv^<vv>v^>^>^^^v<<^<^^>vv<v^v^v>^vv^><^v^<<>v<^^>^vv<<>^<<><^>v^<<^<>v><><>v<<^^><^^^v>>v>^vv<v^>>^v^^<><<<<<^>^v^<^<^^>^vv<^>v^^v^<>v<><v>v^v>vvv><><<><>vv<vvv^v>^^>^^^<><^>^^^>v<vvvv<>vv<v<v^^>><>v<>>v^>v^^vv^>v>>><v<<<<v<^v>><^^>^v^v<v^v^^^vvv>>>vv<^>><<<^>><^<^>^<^>^>>v^<^<>^<^^<><vvv^^<>^<>>><<v>^<^<v<<><^<<^><^^>vv<>^^><v^v<vv<^<vvv<<^>v^>>v>>>v<<^vv^<><>>>^^<^v^>>^>>><<v<<^<vv><^<>^>>^v>>><^^^<<<vv<<v<v>^vv><><<>^^^<>^<vv^<^<<v>^^><vv>><>>>^>vv>^<^<>>^<^^><v>v^><v>vv><><>>><><<^^v<<^v<v>vv<><><<^v>^v<>^<^^^v^>^<^><^v>v>^v<>><^^v^^^^^<><v<>>vvv<v^^<>v>>>>^<<><^v>vv>>^^><<><><^^^<^<^<<^v>^^^><v>>>>><<v<v>v^^^<>>v<vv<^<>v^^^v<><^>v>><<><>v<^><<>>><>v>^<>>^>v^v<<<<>^<v^vv^>vv<<><v^vv<v<v<<>>>>>vv<><>^<^v>vv^<<v<^v^^<<^<<^^v^>>><<>^<>><^>>><v<>><<>^^>><<<^^^^^v>>^<<>>vvvv<^v<v^^<^>^vv<vv<>v<<<^><>>>>vv^<^v>v<^<>^v>>^<^^v^>>><>^^<^v>>v<<>vv<vvvv<>vv>^><>v^<>^<<^vv<v^^v<vvvv><^>>^v^>^^<<<^>>^^>^<^^<^<<<v^<^^v<<vv^<<^^^vv><v<vv^>v^^v<v>^^<^v<^>>><<>vv<<^><<v^v^^^v<vv>^>vv<^>>^<v<>vv>>>^>>><<v<^<>^<<<>>^<<>><^<<^^^>>v^^>v<<<>v>v>v<v<^>^<>>>^vvv><<^^<<><v<><^<v<vvv>v>>>>vv^^v<v<^<^><v>^v<<v<vv>>v>v<<<<><<>vv<><^^^<>>v<v<vvv><v^<vv^>>><v^^<>>>^^<><^<^v^><vv>>^^v>^<<v^>v>^^>^v^<v<^<v^v><>>v^^<^v^^<<>^^>v^^>><<<<^<^^v>^^v>v<<vv^^vv>^>v^<v<v><>vv>>^<v^v^<v<^>^v>v^^>vvvvv<v><<>vv>vvvvvv>>v>>^^^<v>vv^^><<v>>v^^^^v>vv>v<^v>>>>^>^><v^>^<v<vv>v>^>><v>><<>>^vv<vv^^<^^>>>>><><<^<v<><<v>^><^vv^v>>>>>v>^>^<vv>^v^>v<^v^<^<<vv<<>v<>>^vv<<>^v^v>><><<>>v^^<<>^^<v><>v<<^^<^^>^^>^<^><>>v<>>^^<^>><<<v<>>>^v^>v>v<<^^<<^>v<v^>>v^^v^^<<>^v>v><v^>v<^^>^<vv><vv^<>v<><^<<<vv<<v>v<^<<<<^^>v^v^^><<><^^^<v>v^^>>>vvv><>vv<>>^^v^v<<^>v^^v^>vv>^<<v<^<v^>^^<<v<^^>^v^^<^^v<<>>vv<^>>^><><>v>>v<>^<v^^><<>>> |
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/03/solution_a.zig | const std = @import("std");
const input = @embedFile("./input.txt");
const expect = std.testing.expect;
const House = struct {
x: i32,
y: i32,
visit_count: u32,
pub fn init(x: i32, y: i32) House {
return House{ .x = x, .y = y, .visit_count = 1 };
}
};
fn getHousesCount(comptime length: usize, content: *const [length]u8) usize {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
var houses = std.ArrayList(House).init(gpa.allocator());
var x: i32 = 0;
var y: i32 = 0;
// start location is always x=0 y=0
houses.append(House.init(x, y)) catch unreachable;
for (content) |byte| {
switch (byte) {
'<' => x -= 1,
'>' => x += 1,
'^' => y -= 1,
'v' => y += 1,
else => unreachable,
}
var house_found = false;
for (houses.items) |*house| {
if (house.x == x and house.y == y) {
house.visit_count += 1;
house_found = true;
}
}
if (!house_found) {
houses.append(House.init(x, y)) catch unreachable;
}
}
return houses.items.len;
}
pub fn main() void {
const houses_count = getHousesCount(input.len, input);
std.log.debug("Visited houses: {d}", .{houses_count});
}
test "`>` delivers presents to `2` houses" {
var a: *const [1]u8 = ">";
try expect(getHousesCount(a.len, a) == 2);
}
test "`^>v<` delivers presents to `4` houses" {
var a: *const [4]u8 = "^>v<";
try expect(getHousesCount(a.len, a) == 4);
}
test "`^v^v^v^v^v` delivers a bunch of presents to `2` houses" {
var a: *const [10]u8 = "^v^v^v^v^v";
try expect(getHousesCount(a.len, a) == 2);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/03/solution_b.zig | const std = @import("std");
const input = @embedFile("./input.txt");
const expect = std.testing.expect;
const House = struct {
x: i32,
y: i32,
visit_count: u32,
pub fn init(x: i32, y: i32, visit_count: u32) House {
return House{ .x = x, .y = y, .visit_count = visit_count };
}
};
fn getHousesCount(comptime length: usize, content: *const [length]u8) usize {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
var houses = std.ArrayList(House).init(gpa.allocator());
var x: i32 = 0;
var y: i32 = 0;
var x_robot: i32 = 0;
var y_robot: i32 = 0;
// start location is always x=0 y=0
houses.append(House.init(x, y, 2)) catch unreachable;
var i: i32 = 0;
for (content) |byte| {
var x_mod: i32 = 0;
var y_mod: i32 = 0;
const is_robot = @rem(i, 2) == 0;
if (!is_robot) {
x_mod = x;
y_mod = y;
} else {
x_mod = x_robot;
y_mod = y_robot;
}
switch (byte) {
'<' => x_mod -= 1,
'>' => x_mod += 1,
'^' => y_mod -= 1,
'v' => y_mod += 1,
else => unreachable,
}
// the santas take turns in moving, so every 2nd move is santa
var house_found = false;
for (houses.items) |*house| {
if (house.x == x_mod and house.y == y_mod) {
house.visit_count += 1;
house_found = true;
}
}
if (!house_found) {
houses.append(House.init(x_mod, y_mod, 1)) catch unreachable;
}
if (!is_robot) {
x = x_mod;
y = y_mod;
} else {
x_robot = x_mod;
y_robot = y_mod;
}
i += 1;
}
return houses.items.len;
}
pub fn main() void {
const houses_count = getHousesCount(input.len, input);
std.log.debug("Visited houses: {d}", .{houses_count});
}
test "`^v` delivers presents to `3` houses" {
var a: *const [2]u8 = "^v";
try expect(getHousesCount(a.len, a) == 3);
}
test "`^>v<` now delivers presents to `3` houses" {
var a: *const [4]u8 = "^>v<";
try expect(getHousesCount(a.len, a) == 3);
}
test "`^v^v^v^v^v` now delivers presents to `11` houses" {
var a: *const [10]u8 = "^v^v^v^v^v";
try expect(getHousesCount(a.len, a) == 11);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/03/README.md | # 2015 Day 03
*Puzzle Source: [Advent of Code 2015](https://adventofcode.com/2015/day/3) by [Eric Wastl](https://github.com/topaz) - ♥️ Thank you!*
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/04/solution_a.zig | const std = @import("std");
const shared = @import("shared.zig");
pub fn main() !void {
const input = "yzbqklnj";
std.debug.print("Solution a: {!d}\n", .{shared.getSecretAnswer(input, 5)});
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/04/shared.zig | const std = @import("std");
const Md5 = std.crypto.hash.Md5;
const mem = std.mem;
const fmt = std.fmt;
const heap = std.heap;
pub fn getSecretAnswer(comptime input: []const u8, comptime num_zeroes: usize) !usize {
var hashed = [_]u8{1} ** Md5.digest_length;
var arena = heap.ArenaAllocator.init(heap.page_allocator);
defer arena.deinit();
const allocator = arena.allocator();
var i: usize = 1;
while (true) : (i += 1) {
const concat = try fmt.allocPrint(allocator, "{s}{d}", .{ input, i });
Md5.hash(concat, &hashed, .{});
if (mem.eql(u8, fmt.bytesToHex(hashed, fmt.Case.lower)[0..num_zeroes], "0" ** num_zeroes)) {
break;
}
}
return i;
}
test "getSecretAnswer for abcdef" {
const secret = try getSecretAnswer("abcdef", 5);
try std.testing.expect(secret == 609043);
}
test "getSecretAnswer for pqrstuv" {
const secret = try getSecretAnswer("pqrstuv", 5);
try std.testing.expect(secret == 1048970);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/04/solution_b.zig | const std = @import("std");
const shared = @import("shared.zig");
pub fn main() !void {
const input = "yzbqklnj";
std.debug.print("Solution b: {!d}", .{shared.getSecretAnswer(input, 6)});
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/04/README.md | # 2015 Day 04
*Puzzle Source: [Advent of Code 2015](https://adventofcode.com/2015/day/4) by [Eric Wastl](https://github.com/topaz) - ♥️ Thank you!*
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/06/input.txt | turn off 660,55 through 986,197
turn off 341,304 through 638,850
turn off 199,133 through 461,193
toggle 322,558 through 977,958
toggle 537,781 through 687,941
turn on 226,196 through 599,390
turn on 240,129 through 703,297
turn on 317,329 through 451,798
turn on 957,736 through 977,890
turn on 263,530 through 559,664
turn on 158,270 through 243,802
toggle 223,39 through 454,511
toggle 544,218 through 979,872
turn on 313,306 through 363,621
toggle 173,401 through 496,407
toggle 333,60 through 748,159
turn off 87,577 through 484,608
turn on 809,648 through 826,999
toggle 352,432 through 628,550
turn off 197,408 through 579,569
turn off 1,629 through 802,633
turn off 61,44 through 567,111
toggle 880,25 through 903,973
turn on 347,123 through 864,746
toggle 728,877 through 996,975
turn on 121,895 through 349,906
turn on 888,547 through 931,628
toggle 398,782 through 834,882
turn on 966,850 through 989,953
turn off 891,543 through 914,991
toggle 908,77 through 916,117
turn on 576,900 through 943,934
turn off 580,170 through 963,206
turn on 184,638 through 192,944
toggle 940,147 through 978,730
turn off 854,56 through 965,591
toggle 717,172 through 947,995
toggle 426,987 through 705,998
turn on 987,157 through 992,278
toggle 995,774 through 997,784
turn off 796,96 through 845,182
turn off 451,87 through 711,655
turn off 380,93 through 968,676
turn on 263,468 through 343,534
turn on 917,936 through 928,959
toggle 478,7 through 573,148
turn off 428,339 through 603,624
turn off 400,880 through 914,953
toggle 679,428 through 752,779
turn off 697,981 through 709,986
toggle 482,566 through 505,725
turn off 956,368 through 993,516
toggle 735,823 through 783,883
turn off 48,487 through 892,496
turn off 116,680 through 564,819
turn on 633,865 through 729,930
turn off 314,618 through 571,922
toggle 138,166 through 936,266
turn on 444,732 through 664,960
turn off 109,337 through 972,497
turn off 51,432 through 77,996
turn off 259,297 through 366,744
toggle 801,130 through 917,544
toggle 767,982 through 847,996
turn on 216,507 through 863,885
turn off 61,441 through 465,731
turn on 849,970 through 944,987
toggle 845,76 through 852,951
toggle 732,615 through 851,936
toggle 251,128 through 454,778
turn on 324,429 through 352,539
toggle 52,450 through 932,863
turn off 449,379 through 789,490
turn on 317,319 through 936,449
toggle 887,670 through 957,838
toggle 671,613 through 856,664
turn off 186,648 through 985,991
turn off 471,689 through 731,717
toggle 91,331 through 750,758
toggle 201,73 through 956,524
toggle 82,614 through 520,686
toggle 84,287 through 467,734
turn off 132,367 through 208,838
toggle 558,684 through 663,920
turn on 237,952 through 265,997
turn on 694,713 through 714,754
turn on 632,523 through 862,827
turn on 918,780 through 948,916
turn on 349,586 through 663,976
toggle 231,29 through 257,589
toggle 886,428 through 902,993
turn on 106,353 through 236,374
turn on 734,577 through 759,684
turn off 347,843 through 696,912
turn on 286,699 through 964,883
turn on 605,875 through 960,987
turn off 328,286 through 869,461
turn off 472,569 through 980,848
toggle 673,573 through 702,884
turn off 398,284 through 738,332
turn on 158,50 through 284,411
turn off 390,284 through 585,663
turn on 156,579 through 646,581
turn on 875,493 through 989,980
toggle 486,391 through 924,539
turn on 236,722 through 272,964
toggle 228,282 through 470,581
toggle 584,389 through 750,761
turn off 899,516 through 900,925
turn on 105,229 through 822,846
turn off 253,77 through 371,877
turn on 826,987 through 906,992
turn off 13,152 through 615,931
turn on 835,320 through 942,399
turn on 463,504 through 536,720
toggle 746,942 through 786,998
turn off 867,333 through 965,403
turn on 591,477 through 743,692
turn off 403,437 through 508,908
turn on 26,723 through 368,814
turn on 409,485 through 799,809
turn on 115,630 through 704,705
turn off 228,183 through 317,220
toggle 300,649 through 382,842
turn off 495,365 through 745,562
turn on 698,346 through 744,873
turn on 822,932 through 951,934
toggle 805,30 through 925,421
toggle 441,152 through 653,274
toggle 160,81 through 257,587
turn off 350,781 through 532,917
toggle 40,583 through 348,636
turn on 280,306 through 483,395
toggle 392,936 through 880,955
toggle 496,591 through 851,934
turn off 780,887 through 946,994
turn off 205,735 through 281,863
toggle 100,876 through 937,915
turn on 392,393 through 702,878
turn on 956,374 through 976,636
toggle 478,262 through 894,775
turn off 279,65 through 451,677
turn on 397,541 through 809,847
turn on 444,291 through 451,586
toggle 721,408 through 861,598
turn on 275,365 through 609,382
turn on 736,24 through 839,72
turn off 86,492 through 582,712
turn on 676,676 through 709,703
turn off 105,710 through 374,817
toggle 328,748 through 845,757
toggle 335,79 through 394,326
toggle 193,157 through 633,885
turn on 227,48 through 769,743
toggle 148,333 through 614,568
toggle 22,30 through 436,263
toggle 547,447 through 688,969
toggle 576,621 through 987,740
turn on 711,334 through 799,515
turn on 541,448 through 654,951
toggle 792,199 through 798,990
turn on 89,956 through 609,960
toggle 724,433 through 929,630
toggle 144,895 through 201,916
toggle 226,730 through 632,871
turn off 760,819 through 828,974
toggle 887,180 through 940,310
toggle 222,327 through 805,590
turn off 630,824 through 885,963
turn on 940,740 through 954,946
turn on 193,373 through 779,515
toggle 304,955 through 469,975
turn off 405,480 through 546,960
turn on 662,123 through 690,669
turn off 615,238 through 750,714
turn on 423,220 through 930,353
turn on 329,769 through 358,970
toggle 590,151 through 704,722
turn off 884,539 through 894,671
toggle 449,241 through 984,549
toggle 449,260 through 496,464
turn off 306,448 through 602,924
turn on 286,805 through 555,901
toggle 722,177 through 922,298
toggle 491,554 through 723,753
turn on 80,849 through 174,996
turn off 296,561 through 530,856
toggle 653,10 through 972,284
toggle 529,236 through 672,614
toggle 791,598 through 989,695
turn on 19,45 through 575,757
toggle 111,55 through 880,871
turn off 197,897 through 943,982
turn on 912,336 through 977,605
toggle 101,221 through 537,450
turn on 101,104 through 969,447
toggle 71,527 through 587,717
toggle 336,445 through 593,889
toggle 214,179 through 575,699
turn on 86,313 through 96,674
toggle 566,427 through 906,888
turn off 641,597 through 850,845
turn on 606,524 through 883,704
turn on 835,775 through 867,887
toggle 547,301 through 897,515
toggle 289,930 through 413,979
turn on 361,122 through 457,226
turn on 162,187 through 374,746
turn on 348,461 through 454,675
turn off 966,532 through 985,537
turn on 172,354 through 630,606
turn off 501,880 through 680,993
turn off 8,70 through 566,592
toggle 433,73 through 690,651
toggle 840,798 through 902,971
toggle 822,204 through 893,760
turn off 453,496 through 649,795
turn off 969,549 through 990,942
turn off 789,28 through 930,267
toggle 880,98 through 932,434
toggle 568,674 through 669,753
turn on 686,228 through 903,271
turn on 263,995 through 478,999
toggle 534,675 through 687,955
turn off 342,434 through 592,986
toggle 404,768 through 677,867
toggle 126,723 through 978,987
toggle 749,675 through 978,959
turn off 445,330 through 446,885
turn off 463,205 through 924,815
turn off 417,430 through 915,472
turn on 544,990 through 912,999
turn off 201,255 through 834,789
turn off 261,142 through 537,862
turn off 562,934 through 832,984
turn off 459,978 through 691,980
turn off 73,911 through 971,972
turn on 560,448 through 723,810
turn on 204,630 through 217,854
turn off 91,259 through 611,607
turn on 877,32 through 978,815
turn off 950,438 through 974,746
toggle 426,30 through 609,917
toggle 696,37 through 859,201
toggle 242,417 through 682,572
turn off 388,401 through 979,528
turn off 79,345 through 848,685
turn off 98,91 through 800,434
toggle 650,700 through 972,843
turn off 530,450 through 538,926
turn on 428,559 through 962,909
turn on 78,138 through 92,940
toggle 194,117 through 867,157
toggle 785,355 through 860,617
turn off 379,441 through 935,708
turn off 605,133 through 644,911
toggle 10,963 through 484,975
turn off 359,988 through 525,991
turn off 509,138 through 787,411
toggle 556,467 through 562,773
turn on 119,486 through 246,900
turn on 445,561 through 794,673
turn off 598,681 through 978,921
turn off 974,230 through 995,641
turn off 760,75 through 800,275
toggle 441,215 through 528,680
turn off 701,636 through 928,877
turn on 165,753 through 202,780
toggle 501,412 through 998,516
toggle 161,105 through 657,395
turn on 113,340 through 472,972
toggle 384,994 through 663,999
turn on 969,994 through 983,997
turn on 519,600 through 750,615
turn off 363,899 through 948,935
turn on 271,845 through 454,882
turn off 376,528 through 779,640
toggle 767,98 through 854,853
toggle 107,322 through 378,688
turn off 235,899 through 818,932
turn on 445,611 through 532,705
toggle 629,387 through 814,577
toggle 112,414 through 387,421
toggle 319,184 through 382,203
turn on 627,796 through 973,940
toggle 602,45 through 763,151
turn off 441,375 through 974,545
toggle 871,952 through 989,998
turn on 717,272 through 850,817
toggle 475,711 through 921,882
toggle 66,191 through 757,481
turn off 50,197 through 733,656
toggle 83,575 through 915,728
turn on 777,812 through 837,912
turn on 20,984 through 571,994
turn off 446,432 through 458,648
turn on 715,871 through 722,890
toggle 424,675 through 740,862
toggle 580,592 through 671,900
toggle 296,687 through 906,775
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/06/solution_a.zig | const std = @import("std");
const fmt = std.fmt;
const mem = std.mem;
const input = @embedFile("./input.txt");
const Instruction = struct {
x_start: u32,
y_start: u32,
x_end: u32,
y_end: u32,
operation: []const u8,
action: ?[]const u8,
};
pub fn main() !void {
var lights = [_][1000]bool{[_]bool{false} ** 1000} ** 1000;
var input_tokenizer = mem.tokenize(u8, input, "\n");
while (input_tokenizer.next()) |line| {
var instruction: Instruction = try parseInstruction(line);
applyInstruction(instruction, &lights);
}
std.debug.print("Solution: {d}\n", .{countLights(lights)});
}
fn parseInstruction(line: []const u8) !Instruction {
var instruction: Instruction = undefined;
var line_tokenizer = mem.tokenize(u8, line, " ");
instruction.operation = line_tokenizer.next().?;
instruction.action = if (mem.eql(u8, instruction.operation, "turn")) line_tokenizer.next().? else null;
var coord_start = mem.tokenize(u8, line_tokenizer.next().?, ",");
instruction.x_start = try fmt.parseInt(u16, coord_start.next().?, 10);
instruction.y_start = try fmt.parseInt(u16, coord_start.next().?, 10);
_ = line_tokenizer.next();
var coord_end = mem.tokenize(u8, line_tokenizer.next().?, ",");
instruction.x_end = try fmt.parseInt(u16, coord_end.next().?, 10);
instruction.y_end = try fmt.parseInt(u16, coord_end.next().?, 10);
return instruction;
}
fn applyInstruction(instruction: Instruction, lights: *[1000][1000]bool) void {
var x = instruction.x_start;
while (x <= instruction.x_end) : (x += 1) {
var y = instruction.y_start;
while (y <= instruction.y_end) : (y += 1) {
if (mem.eql(u8, instruction.operation, "toggle")) {
lights[x][y] = !lights[x][y];
} else {
lights[x][y] = mem.eql(u8, instruction.action.?, "on");
}
}
}
}
fn countLights(lights: [1000][1000]bool) u32 {
var lights_count: u32 = 0;
var x: usize = 0;
while (x < 1000) : (x += 1) {
var y: usize = 0;
while (y < 1000) : (y += 1) {
if (lights[x][y]) {
lights_count += 1;
}
}
}
return lights_count;
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/06/README.md | # 2015 Day 06
*Puzzle Source: [Advent of Code 2015](https://adventofcode.com/2015/day/6) by [Eric Wastl](https://github.com/topaz) - ♥️ Thank you!*
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/02/input.txt | 20x3x11
15x27x5
6x29x7
30x15x9
19x29x21
10x4x15
1x26x4
1x5x18
10x15x23
10x14x20
3x5x18
29x23x30
7x4x10
22x24x29
30x1x2
19x2x5
11x9x22
23x15x10
11x11x10
30x28x5
22x5x4
6x26x20
16x12x30
10x20x5
25x14x24
16x17x22
11x28x26
1x11x10
1x24x15
13x17x21
30x3x13
20x25x17
22x12x5
22x20x24
9x2x14
6x18x8
27x28x24
11x17x1
1x4x12
5x20x13
24x23x23
22x1x25
18x19x5
5x23x13
8x16x4
20x21x9
1x7x11
8x30x17
3x30x9
6x16x18
22x25x27
9x20x26
16x21x23
5x24x17
15x17x15
26x15x10
22x16x3
20x24x24
8x18x10
23x19x16
1x21x24
23x23x9
14x20x6
25x5x5
16x3x1
29x29x20
11x4x26
10x23x24
29x25x16
27x27x22
9x7x22
6x21x18
25x11x19
14x13x3
15x28x17
14x3x12
29x8x19
30x14x20
20x23x4
8x16x5
4x11x18
20x8x24
21x13x21
14x26x29
27x4x17
27x4x25
5x28x6
23x24x11
29x22x5
30x20x6
23x2x10
11x4x7
27x23x6
10x20x19
8x20x22
5x29x22
16x13x2
2x11x14
6x12x4
3x13x6
16x5x18
25x3x28
21x1x5
20x16x19
28x30x27
26x7x18
25x27x24
11x19x7
21x19x17
2x12x27
20x5x14
8x5x8
6x24x8
7x28x20
3x20x28
5x20x30
13x29x1
26x29x5
19x28x25
5x19x11
11x20x22
4x23x1
19x25x12
3x10x6
3x14x10
28x16x12
23x12x2
23x12x19
20x28x10
9x10x25
16x21x16
1x18x20
9x4x26
3x25x8
17x16x28
9x28x16
27x3x12
17x24x12
13x21x10
7x17x13
6x10x9
7x29x25
11x19x30
1x24x5
20x16x23
24x28x21
6x29x19
25x2x19
12x5x26
25x29x12
16x28x22
26x26x15
9x13x5
10x29x7
1x24x16
22x2x2
6x16x13
3x12x28
4x12x13
14x27x21
14x23x26
7x5x18
8x30x27
15x9x18
26x16x5
3x29x17
19x7x18
16x18x1
26x15x30
24x30x21
13x20x7
4x12x10
27x20x11
28x29x21
20x14x30
28x12x3
19x1x8
4x8x6
21x14x2
27x19x21
17x24x14
15x18x11
18x7x26
25x28x29
27x26x9
18x12x17
24x28x25
13x24x14
26x9x28
9x3x30
9x2x9
8x1x29
18x30x10
18x14x5
26x8x30
12x1x1
30x5x28
26x17x21
10x10x10
20x7x27
13x17x6
21x13x17
2x16x8
7x9x9
15x26x4
11x28x25
10x6x19
21x6x29
15x5x6
28x9x16
14x3x10
12x29x5
22x19x19
25x15x22
30x6x28
11x23x13
20x25x14
26x1x13
6x14x15
16x25x17
28x4x13
10x24x25
4x13x10
9x15x16
15x24x6
22x9x19
11x11x8
4x19x12
24x5x4
27x12x13
7x27x16
2x6x9
29x27x15
18x26x23
19x16x15
14x5x25
9x16x30
4x6x4
13x10x10
1x8x29
23x5x17
19x20x20
11x27x24
27x15x5
15x11x12
21x11x3
1x13x22
17x8x8
13x14x14
17x22x7
9x5x8
2x6x3
25x9x15
11x8x13
9x25x12
3x16x12
12x16x8
16x24x17
4x6x26
22x29x11
14x17x19
28x2x27
24x22x19
22x20x30
23x28x4
16x12x14
22x24x22
29x1x28
26x29x16
3x25x30
27x3x13
22x24x26
25x3x2
7x24x2
10x5x3
28x8x29
25x6x4
12x17x14
24x3x5
23x27x7
26x23x30
11x10x19
23x7x11
26x14x15
14x3x25
12x24x14
2x14x12
9x12x16
9x2x28
3x8x2
22x6x9
2x30x2
25x1x9
20x11x2
14x11x12
7x14x12
24x8x26
13x21x23
18x17x23
13x6x17
20x20x19
13x17x29
7x24x24
23x8x6
19x10x28
3x8x21
15x20x18
11x27x1
11x24x28
13x20x11
18x19x22
27x22x12
28x3x2
13x4x29
26x5x6
14x29x25
7x4x7
5x17x7
2x8x1
22x30x24
22x21x28
1x28x13
11x20x4
25x29x19
9x23x4
30x6x11
25x18x10
28x10x24
3x5x20
19x28x10
27x19x2
26x20x4
19x21x6
2x12x30
8x26x27
11x27x10
14x13x17
4x3x21
2x20x21
22x30x3
2x23x2
3x16x12
22x28x22
3x23x29
8x25x15
9x30x4
10x11x1
24x8x20
10x7x27
7x22x4
27x13x17
5x28x5
30x15x13
10x8x17
8x21x5
8x17x26
25x16x4
9x7x25
13x11x20
6x30x9
15x14x12
30x1x23
5x20x24
22x7x6
26x11x23
29x7x5
13x24x28
22x20x10
18x3x1
15x19x23
28x28x20
7x26x2
9x12x20
15x4x6
1x17x21
3x22x17
9x4x20
25x19x5
9x11x22
14x1x17
14x5x16
30x5x18
19x6x12
28x16x22
13x4x25
29x23x18
1x27x3
12x14x4
10x25x19
15x19x30
11x30x4
11x22x26
13x25x2
17x13x27
11x30x24
15x1x14
17x18x4
26x11x3
16x22x28
13x20x9
1x18x3
25x11x12
20x21x1
22x27x4
8x28x23
7x13x27
17x9x26
27x27x20
11x20x12
26x21x11
29x14x12
27x25x1
28x29x25
21x23x28
5x18x18
19x5x4
7x6x30
27x8x11
12x24x12
16x25x22
26x11x29
25x22x17
15x23x23
17x9x6
30x10x16
21x3x5
18x27x2
28x21x14
16x18x17
4x18x2
9x1x14
9x1x9
5x27x12
8x16x30
3x19x19
16x26x24
1x6x9
15x14x3
11x7x19
8x19x3
17x26x26
6x18x11
19x12x4
29x20x16
20x17x23
6x6x5
20x30x19
18x25x18
2x26x2
3x1x1
14x25x18
3x1x6
11x14x18
17x23x27
25x29x9
6x25x20
20x10x9
17x5x18
29x14x8
14x25x26
10x15x29
23x19x11
22x2x2
4x5x5
13x23x25
19x13x19
20x18x6
30x7x28
26x18x17
29x18x10
30x29x1
12x26x24
18x17x26
29x28x15
3x12x20
24x10x8
30x15x6
28x23x15
14x28x11
10x27x19
14x8x21
24x1x23
1x3x27
6x15x6
8x25x26
13x10x25
6x9x8
10x29x29
26x23x5
14x24x1
25x6x22
17x11x18
1x27x26
18x25x23
20x15x6
2x21x28
2x10x13
12x25x14
2x14x23
30x5x23
29x19x21
29x10x25
14x22x16
17x11x26
12x17x30
8x17x7
20x25x28
20x11x30
15x1x12
13x3x24
16x23x23
27x3x3
26x3x27
18x5x12
12x26x7
19x27x12
20x10x28
30x12x25
3x14x10
21x26x1
24x26x26
7x21x30
3x29x12
29x28x5
5x20x7
27x11x2
15x20x4
16x15x15
19x13x7
7x17x15
27x24x15
9x17x28
20x21x14
14x29x29
23x26x13
27x23x21
18x13x6
26x16x21
18x26x27
9x3x12
30x18x24
12x11x29
5x15x1
1x16x3
14x28x11
2x18x1
19x18x19
18x28x21
2x3x14
22x16x5
28x18x28
24x16x18
7x4x10
19x26x19
24x17x7
25x9x6
25x17x7
20x22x20
3x3x7
23x19x15
21x27x21
1x23x11
9x19x4
22x4x18
6x15x5
15x25x2
23x11x20
27x16x6
27x8x5
10x10x19
22x14x1
7x1x29
8x11x17
27x9x27
28x9x24
17x7x3
26x23x8
7x6x30
25x28x2
1x30x25
3x18x18
28x27x15
14x14x1
10x25x29
18x12x9
20x28x16
26x27x22
8x26x1
21x2x12
25x16x14
21x19x5
12x9x22
16x5x4
5x4x16
25x29x3
4x29x13
15x16x29
8x11x24
30x11x20
17x21x14
12x24x10
10x12x6
3x26x30
15x14x25
20x12x21
13x11x16
15x13x3
5x17x29
6x3x23
9x26x11
30x1x8
14x10x30
18x30x10
13x19x19
16x19x17
28x7x10
28x29x4
3x21x10
4x28x24
7x28x9
2x4x9
25x27x13
6x12x15
4x18x20
20x1x16
5x13x24
11x11x10
12x9x23
1x9x30
17x28x24
9x5x27
21x15x16
17x4x14
8x14x4
13x10x7
17x12x14
9x19x19
2x7x21
8x24x23
19x5x12
11x23x21
13x3x1
5x27x15
12x25x25
13x21x16
9x17x11
1x15x21
4x26x17
11x5x15
23x10x15
12x17x21
27x15x1
4x29x14
5x24x25
10x10x12
18x12x9
11x24x23
24x23x3
28x12x15
29x9x14
11x25x8
5x12x2
26x26x29
9x21x2
8x8x25
1x16x30
17x29x20
9x22x13
7x18x16
3x3x23
26x25x30
15x23x24
20x23x5
20x16x10
23x7x8
20x18x26
8x27x6
30x23x23
7x7x24
21x11x15
1x30x25
26x27x22
30x28x13
20x13x13
3x1x15
16x7x1
7x25x15
12x7x18
16x9x23
16x12x18
29x5x2
17x7x7
21x17x5
9x9x17
26x16x10
29x29x23
17x26x10
5x19x17
1x10x1
14x21x20
13x6x4
13x13x3
23x4x18
4x16x3
16x30x11
2x11x2
15x30x15
20x30x22
18x12x16
23x5x16
6x14x15
9x4x11
30x23x21
20x7x12
7x18x6
15x6x5
18x22x19
16x10x22
26x20x25
9x25x25
29x21x10
9x21x24
7x18x21
14x3x15
18x19x19
4x29x17
14x10x9
2x26x14
13x3x24
4x4x17
6x27x24
2x18x3
14x25x2
30x14x17
11x6x14
4x10x18
15x4x2
27x7x10
13x24x1
7x12x6
25x22x26
19x2x18
23x29x2
2x15x4
12x6x9
16x14x29
9x17x3
21x9x12
23x18x22
10x8x4
29x2x7
19x27x15
4x24x27
25x20x14
8x23x19
1x24x19
6x20x10
15x8x5
18x28x5
17x23x22
9x16x13
30x24x4
26x3x13
12x22x18
29x17x29
26x4x16
15x7x20
9x15x30
12x7x18
28x19x18
11x23x23
24x20x1
20x3x24
1x26x1
14x10x6
5x27x24
13x21x12
20x20x5
6x28x9
11x26x11
26x29x12
21x4x11
20x11x17
22x27x20
19x11x21
2x11x11
13x5x7
12x10x25
21x28x1
15x30x17
28x19x1
4x19x12
11x4x12
4x10x30
11x18x5
22x20x12
3x7x27
20x26x4
13x27x26
23x14x13
4x19x7
26x27x16
20x5x20
18x5x8
19x21x1
22x8x1
29x4x1
24x10x15
24x9x20
10x3x8
29x30x3
2x8x24
16x7x18
2x11x23
23x15x16
21x12x6
24x28x9
6x1x13
14x29x20
27x24x13
16x26x8
5x6x17
21x8x1
28x19x21
1x14x16
18x2x9
29x28x10
22x26x27
18x26x23
22x24x2
28x26x1
27x29x12
30x13x11
1x25x5
13x30x18
3x13x22
22x10x11
2x7x7
18x17x8
9x22x26
30x18x16
10x2x3
7x27x13
3x20x16
9x21x16
1x18x15
21x30x30
4x25x23
3x11x7
5x6x12
27x1x20
13x15x24
23x29x2
13x5x24
22x16x15
28x14x3
29x24x9
2x20x4
30x10x4
23x7x20
22x12x21
3x19x11
4x28x28
5x4x7
28x12x25
2x16x26
23x20x7
5x21x29
9x21x16
9x6x10
9x6x4
24x14x29
28x11x6
10x22x1
21x30x20
13x17x8
2x25x24
19x21x3
28x8x14
6x29x28
27x10x28
30x11x12
17x2x10
14x19x17
2x11x4
26x1x2
13x4x4
23x20x18
2x17x21
28x7x15
3x3x27
24x17x30
28x28x20
21x5x29
13x12x19
24x29x29
19x10x6
19x12x14
21x4x17
27x16x1
4x17x30
23x23x18
23x15x27
26x2x11
12x8x8
15x23x26
30x17x15
17x17x15
24x4x30
9x9x10
14x25x20
25x11x19
20x7x1
9x21x3
7x19x9
10x6x19
26x12x30
21x9x20
15x11x6
30x21x9
10x18x17
22x9x8
8x30x26
28x12x27
17x17x7
11x13x8
5x3x21
24x1x29
1x28x2
18x28x10
8x29x14
26x26x27
17x10x25
22x30x3
27x9x13
21x21x4
30x29x16
22x7x20
24x10x2
16x29x17
28x15x17
19x19x22
9x8x6
26x23x24
25x4x27
16x12x2
11x6x18
19x14x8
9x29x13
23x30x19
10x16x1
4x21x28
23x25x25
19x9x16
30x11x12
24x3x9
28x19x4
18x12x9
7x1x25
28x7x1
24x3x12
30x24x22
27x24x26
9x30x30
29x10x8
4x6x18
10x1x15
10x4x26
23x20x16
6x3x14
30x8x16
25x14x20
11x9x3
15x23x25
8x30x22
22x19x18
25x1x12
27x25x7
25x23x3
13x20x8
5x30x7
18x19x27
20x23x3
1x17x21
21x21x27
13x1x24
7x30x20
21x9x18
23x26x6
22x9x29
17x6x21
28x28x29
19x25x26
9x27x21
5x26x8
11x19x1
10x1x18
29x4x8
21x2x22
14x12x8 |
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/02/solution_a.zig | const std = @import("std");
const input = @embedFile("./input.txt");
const expect = std.testing.expect;
fn calculateSquareFeet(length: i32, width: i32, height: i32) i32 {
const sides: [3]i32 = .{ length * width, width * height, height * length };
var smallest: i32 = std.math.maxInt(i32);
for (sides) |side| {
if (side < smallest) {
smallest = side;
}
}
return 2 * sides[0] + 2 * sides[1] + 2 * sides[2] + smallest;
}
fn getTotalSquareFeet(comptime length: usize, content: *const [length]u8) i32 {
var squareFeet: i32 = 0;
var lines = std.mem.tokenize(u8, content, "\r\n");
while (lines.next()) |line| {
var numbers = std.mem.tokenize(u8, line, "x");
var measurements: [3]i32 = undefined;
var i: usize = 0;
while (numbers.next()) |number| {
const num = std.fmt.parseInt(i32, number, 10) catch continue;
measurements[i] = num;
i += 1;
}
squareFeet += calculateSquareFeet(measurements[0], measurements[1], measurements[2]);
}
return squareFeet;
}
pub fn main() void {
const squareFeet = getTotalSquareFeet(input.len, input);
std.log.debug("Square feet: {d}", .{squareFeet});
}
test "A present with dimensions `2x3x4` requires a total of `58` square feet" {
try expect(calculateSquareFeet(2, 3, 4) == 58);
}
test "A present with dimensions `1x1x10` requires a total of `43` square feet" {
try expect(calculateSquareFeet(1, 1, 10) == 43);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/02/solution_b.zig | const std = @import("std");
const input = @embedFile("./input.txt");
const expect = std.testing.expect;
fn calculateFeet(length: i32, width: i32, height: i32) i32 {
var sides = [_]i32{ length, width, height };
std.sort.sort(i32, sides[0..], {}, comptime std.sort.asc(i32));
return sides[0] * 2 + sides[1] * 2 + sides[0] * sides[1] * sides[2];
}
fn getTotalFeet(comptime length: usize, content: *const [length]u8) i32 {
var feet: i32 = 0;
var lines = std.mem.tokenize(u8, content, "\r\n");
while (lines.next()) |line| {
var numbers = std.mem.tokenize(u8, line, "x");
var measurements: [3]i32 = undefined;
var i: usize = 0;
while (numbers.next()) |number| {
const num = std.fmt.parseInt(i32, number, 10) catch continue;
measurements[i] = num;
i += 1;
}
feet += calculateFeet(measurements[0], measurements[1], measurements[2]);
}
return feet;
}
pub fn main() void {
std.log.debug("Feet: {d}", .{getTotalFeet(input.len, input)});
}
test "A present with dimensions `2x3x4` requires a total of `34` feet" {
try expect(calculateFeet(2, 3, 4) == 34);
}
test "A present with dimensions `1x1x10` requires a total of `14` feet" {
try expect(calculateFeet(1, 1, 10) == 14);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/02/README.md | # 2015 Day 02
*Puzzle Source: [Advent of Code 2015](https://adventofcode.com/2015/day/2) by [Eric Wastl](https://github.com/topaz) - ♥️ Thank you!*
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/05/input.txt | sszojmmrrkwuftyv
isaljhemltsdzlum
fujcyucsrxgatisb
qiqqlmcgnhzparyg
oijbmduquhfactbc
jqzuvtggpdqcekgk
zwqadogmpjmmxijf
uilzxjythsqhwndh
gtssqejjknzkkpvw
wrggegukhhatygfi
vhtcgqzerxonhsye
tedlwzdjfppbmtdx
iuvrelxiapllaxbg
feybgiimfthtplui
qxmmcnirvkzfrjwd
vfarmltinsriqxpu
oanqfyqirkraesfq
xilodxfuxphuiiii
yukhnchvjkfwcbiq
bdaibcbzeuxqplop
ivegnnpbiyxqsion
ybahkbzpditgwdgt
dmebdomwabxgtctu
ibtvimgfaeonknoh
jsqraroxudetmfyw
dqdbcwtpintfcvuz
tiyphjunlxddenpj
fgqwjgntxagidhah
nwenhxmakxqkeehg
zdoheaxqpcnlhnen
tfetfqojqcdzlpbm
qpnxkuldeiituggg
xwttlbdwxohahwar
hjkwzadmtrkegzye
koksqrqcfwcaxeof
wulwmrptktliyxeq
gyufbedqhhyqgqzj
txpunzodohikzlmj
jloqfuejfkemcrvu
amnflshcheuddqtc
pdvcsduggcogbiia
yrioavgfmeafjpcz
uyhbtmbutozzqfvq
mwhgfwsgyuwcdzik
auqylgxhmullxpaa
lgelzivplaeoivzh
uyvcepielfcmswoa
qhirixgwkkccuzlp
zoonniyosmkeejfg
iayfetpixkedyana
ictqeyzyqswdskiy
ejsgqteafvmorwxe
lhaiqrlqqwfbrqdx
ydjyboqwhfpqfydc
dwhttezyanrnbybv
edgzkqeqkyojowvr
rmjfdwsqamjqehdq
ozminkgnkwqctrxz
bztjhxpjthchhfcd
vrtioawyxkivrpiq
dpbcsznkpkaaclyy
vpoypksymdwttpvz
hhdlruwclartkyap
bqkrcbrksbzcggbo
jerbbbnxlwfvlaiw
dwkasufidwjrjfbf
kkfxtjhbnmqbmfwf
vmnfziwqxmioukmj
rqxvcultipkecdtu
fhmfdibhtjzkiqsd
hdpjbuzzbyafqrpd
emszboysjuvwwvts
msyigmwcuybfiooq
druyksfnbluvnwoh
fvgstvynnfbvxhsx
bmzalvducnqtuune
lzwkzfzttsvpllei
olmplpvjamynfyfd
padcwfkhystsvyfb
wjhbvxkwtbfqdilb
hruaqjwphonnterf
bufjobjtvxtzjpmj
oiedrjvmlbtwyyuy
sgiemafwfztwsyju
nsoqqfudrtwszyqf
vonbxquiiwxnazyl
yvnmjxtptujwqudn
rrnybqhvrcgwvrkq
taktoxzgotzxntfu
quffzywzpxyaepxa
rfvjebfiddcfgmwv
iaeozntougqwnzoh
scdqyrhoqmljhoil
bfmqticltmfhxwld
brbuktbyqlyfpsdl
oidnyhjkeqenjlhd
kujsaiqojopvrygg
vebzobmdbzvjnjtk
uunoygzqjopwgmbg
piljqxgicjzgifso
ikgptwcjzywswqnw
pujqsixoisvhdvwi
trtuxbgigogfsbbk
mplstsqclhhdyaqk
gzcwflvmstogdpvo
tfjywbkmimyyqcjd
gijutvhruqcsiznq
ibxkhjvzzxgavkha
btnxeqvznkxjsgmq
tjgofgauxaelmjoq
sokshvyhlkxerjrv
ltogbivktqmtezta
uduwytzvqvfluyuf
msuckpthtgzhdxan
fqmcglidvhvpirzr
gwztkqpcwnutvfga
bsjfgsrntdhlpqbx
xloczbqybxmiopwt
orvevzyjliomkkgu
mzjbhmfjjvaziget
tlsdxuhwdmghdyjb
atoecyjhwmznaewi
pyxpyvvipbqibiox
ajbfmpqqobfsmesj
siknbzefjblnohgd
eqfhgewbblwdfkmc
opylbscrotckkrbk
lbwxbofgjkzdxkle
ceixfjstaptdomvm
hnkrqxifjmmjktie
aqykzeuzvvetoygd
fouahjimfcisxima
prkzhutbqsyrhjzx
qqwliakathnsbzne
sayhgqtlcqqidqhj
ygduolbysehdudra
zricvxhdzznuxuce
ucvzakslykpgsixd
udirhgcttmyspgsb
yuwzppjzfsjhhdzi
gtqergjiuwookwre
xvxexbjyjkxovvwf
mlpaqhnnkqxrmwmm
ezuqbrjozwuqafhb
mcarusdthcbsonoq
weeguqeheeiigrue
pngtfugozxofaqxv
copphvbjcmfspenv
jiyahihykjjkdaya
gdqnmesvptuyrfwp
vbdscfywqmfxbohh
crtrfuxyjypzubrg
seihvevtxywxhflp
fvvpmgttnapklwou
qmqaqsajmqwhetpk
zetxvrgjmblxvakr
kpvwblrizaabmnhz
mwpvvzaaicntrkcp
clqyjiegtdsswqfm
ymrcnqgcpldgfwtm
nzyqpdenetncgnwq
cmkzevgacnmdkqro
kzfdsnamjqbeirhi
kpxrvgvvxapqlued
rzskbnfobevzrtqu
vjoahbfwtydugzap
ykbbldkoijlvicbl
mfdmroiztsgjlasb
quoigfyxwtwprmdr
ekxjqafwudgwfqjm
obtvyjkiycxfcdpb
lhoihfnbuqelthof
eydwzitgxryktddt
rxsihfybacnpoyny
bsncccxlplqgygtw
rvmlaudsifnzhcqh
huxwsyjyebckcsnn
gtuqzyihwhqvjtes
zreeyomtngvztveq
nwddzjingsarhkxb
nuqxqtctpoldrlsh
wkvnrwqgjooovhpf
kwgueyiyffudtbyg
tpkzapnjxefqnmew
ludwccvkihagvxal
lfdtzhfadvabghna
njqmlsnrkcfhtvbb
cajzbqleghhnlgap
vmitdcozzvqvzatp
eelzefwqwjiywbcz
uyztcuptfqvymjpi
aorhnrpkjqqtgnfo
lfrxfdrduoeqmwwp
vszpjvbctblplinh
zexhadgpqfifcqrz
ueirfnshekpemqua
qfremlntihbwabtb
nwznunammfexltjc
zkyieokaaogjehwt
vlrxgkpclzeslqkq
xrqrwfsuacywczhs
olghlnfjdiwgdbqc
difnlxnedpqcsrdf
dgpuhiisybjpidsj
vlwmwrikmitmoxbt
sazpcmcnviynoktm
pratafauetiknhln
ilgteekhzwlsfwcn
ywvwhrwhkaubvkbl
qlaxivzwxyhvrxcf
hbtlwjdriizqvjfb
nrmsononytuwslsa
mpxqgdthpoipyhjc
mcdiwmiqeidwcglk
vfbaeavmjjemfrmo
qzcbzmisnynzibrc
shzmpgxhehhcejhb
wirtjadsqzydtyxd
qjlrnjfokkqvnpue
dxawdvjntlbxtuqc
wttfmnrievfestog
eamjfvsjhvzzaobg
pbvfcwzjgxahlrag
omvmjkqqnobvnzkn
lcwmeibxhhlxnkzv
uiaeroqfbvlazegs
twniyldyuonfyzqw
wgjkmsbwgfotdabi
hnomamxoxvrzvtew
ycrcfavikkrxxfgw
isieyodknagzhaxy
mgzdqwikzullzyco
mumezgtxjrrejtrs
nwmwjcgrqiwgfqel
wjgxmebfmyjnxyyp
durpspyljdykvzxf
zuslbrpooyetgafh
kuzrhcjwbdouhyme
wyxuvbciodscbvfm
kbnpvuqwmxwfqtqe
zddzercqogdpxmft
sigrdchxtgavzzjh
lznjolnorbuddgcs
ycnqabxlcajagwbt
bnaudeaexahdgxsj
rlnykxvoctfwanms
jngyetkoplrstfzt
tdpxknwacksotdub
yutqgssfoptvizgr
lzmqnxeqjfnsxmsa
iqpgfsfmukovsdgu
qywreehbidowtjyz
iozamtgusdctvnkw
ielmujhtmynlwcfd
hzxnhtbnmmejlkyf
ftbslbzmiqkzebtd
bcwdqgiiizmohack
dqhfkzeddjzbdlxu
mxopokqffisxosci
vciatxhtuechbylk
khtkhcvelidjdena
blatarwzfqcapkdt
elamngegnczctcck
xeicefdbwrxhuxuf
sawvdhjoeahlgcdr
kmdcimzsfkdfpnir
axjayzqlosrduajb
mfhzreuzzumvoggr
iqlbkbhrkptquldb
xcvztvlshiefuhgb
pkvwyqmyoazocrio
ajsxkdnerbmhyxaj
tudibgsbnpnizvsi
cxuiydkgdccrqvkh
cyztpjesdzmbcpot
nnazphxpanegwitx
uphymczbmjalmsct
yyxiwnlrogyzwqmg
gmqwnahjvvdyhnfa
utolskxpuoheugyl
mseszdhyzoyavepd
ycqknvbuvcjfgmlc
sknrxhxbfpvpeorn
zqxqjetooqcodwml
sesylkpvbndrdhsy
fryuxvjnsvnjrxlw
mfxusewqurscujnu
mbitdjjtgzchvkfv
ozwlyxtaalxofovd
wdqcduaykxbunpie
rlnhykxiraileysk
wgoqfrygttlamobg
kflxzgxvcblkpsbz
tmkisflhativzhde
owsdrfgkaamogjzd
gaupjkvkzavhfnes
wknkurddcknbdleg
lltviwincmbtduap
qwzvspgbcksyzzmb
ydzzkumecryfjgnk
jzvmwgjutxoysaam
icrwpyhxllbardkr
jdopyntshmvltrve
afgkigxcuvmdbqou
mfzzudntmvuyhjzt
duxhgtwafcgrpihc
tsnhrkvponudumeb
sqtvnbeiigdzbjgv
eczmkqwvnsrracuo
mhehsgqwiczaiaxv
kaudmfvifovrimpd
lupikgivechdbwfr
mwaaysrndiutuiqx
aacuiiwgaannunmm
tjqjbftaqitukwzp
lrcqyskykbjpaekn
lirrvofbcqpjzxmr
jurorvzpplyelfml
qonbllojmloykjqe
sllkzqujfnbauuqp
auexjwsvphvikali
usuelbssqmbrkxyc
wyuokkfjexikptvv
wmfedauwjgbrgytl
sfwvtlzzebxzmuvw
rdhqxuechjsjcvaf
kpavhqkukugocsxu
ovnjtumxowbxduts
zgerpjufauptxgat
pevvnzjfwhjxdoxq
pmmfwxajgfziszcs
difmeqvaghuitjhs
icpwjbzcmlcterwm
ngqpvhajttxuegyh
mosjlqswdngwqsmi
frlvgpxrjolgodlu
eazwgrpcxjgoszeg
bbtsthgkjrpkiiyk
tjonoglufuvsvabe
xhkbcrofytmbzrtk
kqftfzdmpbxjynps
kmeqpocbnikdtfyv
qjjymgqxhnjwxxhp
dmgicrhgbngdtmjt
zdxrhdhbdutlawnc
afvoekuhdboxghvx
hiipezngkqcnihty
bbmqgheidenweeov
suprgwxgxwfsgjnx
adeagikyamgqphrj
zzifqinoeqaorjxg
adhgppljizpaxzld
lvxyieypvvuqjiyc
nljoakatwwwoovzn
fcrkfxclcacshhmx
ownnxqtdhqbgthch
lmfylrcdmdkgpwnj
hlwjfbvlswbzpbjr
mkofhdtljdetcyvp
synyxhifbetzarpo
agnggugngadrcxoc
uhttadmdmhidpyjw
ohfwjfhunalbubpr
pzkkkkwrlvxiuysn
kmidbxmyzkjrwjhu
egtitdydwjxmajnw
civoeoiuwtwgbqqs
dfptsguzfinqoslk
tdfvkreormspprer
zvnvbrmthatzztwi
ffkyddccrrfikjde
hrrmraevdnztiwff
qaeygykcpbtjwjbr
purwhitkmrtybslh
qzziznlswjaussel
dfcxkvdpqccdqqxj
tuotforulrrytgyn
gmtgfofgucjywkev
wkyoxudvdkbgpwhd
qbvktvfvipftztnn
otckgmojziezmojb
inxhvzbtgkjxflay
qvxapbiatuudseno
krpvqosbesnjntut
oqeukkgjsfuqkjbb
prcjnyymnqwqksiz
vuortvjxgckresko
orqlyobvkuwgathr
qnpyxlnazyfuijox
zwlblfkoklqmqzkw
hmwurwtpwnrcsanl
jzvxohuakopuzgpf
sfcpnxrviphhvxmx
qtwdeadudtqhbely
dbmkmloasqphnlgj
olylnjtkxgrubmtk
nxsdbqjuvwrrdbpq
wbabpirnpcsmpipw
hjnkyiuxpqrlvims
enzpntcjnxdpuqch
vvvqhlstzcizyimn
triozhqndbttglhv
fukvgteitwaagpzx
uhcvukfbmrvskpen
tizcyupztftzxdmt
vtkpnbpdzsaluczz
wodfoyhoekidxttm
otqocljrmwfqbxzu
linfbsnfvixlwykn
vxsluutrwskslnye
zbshygtwugixjvsi
zdcqwxvwytmzhvoo
wrseozkkcyctrmei
fblgtvogvkpqzxiy
opueqnuyngegbtnf
qxbovietpacqqxok
zacrdrrkohfygddn
gbnnvjqmkdupwzpq
qgrgmsxeotozvcak
hnppukzvzfmlokid
dzbheurndscrrtcl
wbgdkadtszebbrcw
fdmzppzphhpzyuiz
bukomunhrjrypohj
ohodhelegxootqbj
rsplgzarlrknqjyh
punjjwpsxnhpzgvu
djdfahypfjvpvibm
mlgrqsmhaozatsvy
xwktrgyuhqiquxgn
wvfaoolwtkbrisvf
plttjdmguxjwmeqr
zlvvbwvlhauyjykw
cigwkbyjhmepikej
masmylenrusgtyxs
hviqzufwyetyznze
nzqfuhrooswxxhus
pdbdetaqcrqzzwxf
oehmvziiqwkzhzib
icgpyrukiokmytoy
ooixfvwtiafnwkce
rvnmgqggpjopkihs
wywualssrmaqigqk
pdbvflnwfswsrirl
jeaezptokkccpbuj
mbdwjntysntsaaby
ldlgcawkzcwuxzpz
lwktbgrzswbsweht
ecspepmzarzmgpjm
qmfyvulkmkxjncai
izftypvwngiukrns
zgmnyjfeqffbooww
nyrkhggnprhedows
yykzzrjmlevgffah
mavaemfxhlfejfki
cmegmfjbkvpncqwf
zxidlodrezztcrij
fseasudpgvgnysjv
fupcimjupywzpqzp
iqhgokavirrcvyys
wjmkcareucnmfhui
nftflsqnkgjaexhq
mgklahzlcbapntgw
kfbmeavfxtppnrxn
nuhyvhknlufdynvn
nviogjxbluwrcoec
tyozixxxaqiuvoys
kgwlvmvgtsvxojpr
moeektyhyonfdhrb
kahvevmmfsmiiqex
xcywnqzcdqtvhiwd
fnievhiyltbvtvem
jlmndqufirwgtdxd
muypbfttoeelsnbs
rypxzbnujitfwkou
ubmmjbznskildeoj
ofnmizdeicrmkjxp
rekvectjbmdnfcib
yohrojuvdexbctdh
gwfnfdeibynzjmhz
jfznhfcqdwlpjull
scrinzycfhwkmmso
mskutzossrwoqqsi
rygoebkzgyzushhr
jpjqiycflqkexemx
arbufysjqmgaapnl
dbjerflevtgweeoj
snybnnjlmwjvhois
fszuzplntraprmbj
mkvaatolvuggikvg
zpuzuqygoxesnuyc
wnpxvmxvllxalulm
eivuuafkvudeouwy
rvzckdyixetfuehr
qgmnicdoqhveahyx
miawwngyymshjmpj
pvckyoncpqeqkbmx
llninfenrfjqxurv
kzbjnlgsqjfuzqtp
rveqcmxomvpjcwte
bzotkawzbopkosnx
ktqvpiribpypaymu
wvlzkivbukhnvram
uohntlcoguvjqqdo
ajlsiksjrcnzepkt
xsqatbldqcykwusd
ihbivgzrwpmowkop
vfayesfojmibkjpb
uaqbnijtrhvqxjtb
hhovshsfmvkvymba
jerwmyxrfeyvxcgg
hncafjwrlvdcupma
qyvigggxfylbbrzt
hiiixcyohmvnkpgk
mmitpwopgxuftdfu
iaxderqpceboixoa
zodfmjhuzhnsqfcb
sthtcbadrclrazsi
bkkkkcwegvypbrio
wmpcofuvzemunlhj
gqwebiifvqoeynro
juupusqdsvxcpsgv
rbhdfhthxelolyse
kjimpwnjfrqlqhhz
rcuigrjzarzpjgfq
htxcejfyzhydinks
sxucpdxhvqjxxjwf
omsznfcimbcwaxal
gufmtdlhgrsvcosb
bssshaqujtmluerz
uukotwjkstgwijtr
kbqkneobbrdogrxk
ljqopjcjmelgrakz
rwtfnvnzryujwkfb
dedjjbrndqnilbeh
nzinsxnpptzagwlb
lwqanydfirhnhkxy
hrjuzfumbvfccxno
okismsadkbseumnp
sfkmiaiwlktxqvwa
hauwpjjwowbunbjj
nowkofejwvutcnui
bqzzppwoslaeixro
urpfgufwbtzenkpj
xgeszvuqwxeykhef
yxoldvkyuikwqyeq
onbbhxrnmohzskgg
qcikuxakrqeugpoa
lnudcqbtyzhlpers
nxduvwfrgzaailgl
xniuwvxufzxjjrwz
ljwithcqmgvntjdj
awkftfagrfzywkhs
uedtpzxyubeveuek
bhcqdwidbjkqqhzl
iyneqjdmlhowwzxx
kvshzltcrrururty
zgfpiwajegwezupo
tkrvyanujjwmyyri
ercsefuihcmoaiep
ienjrxpmetinvbos
jnwfutjbgenlipzq
bgohjmrptfuamzbz
rtsyamajrhxbcncw
tfjdssnmztvbnscs
bgaychdlmchngqlp
kfjljiobynhwfkjo
owtdxzcpqleftbvn
ltjtimxwstvzwzjj
wbrvjjjajuombokf
zblpbpuaqbkvsxye
gwgdtbpnlhyqspdi
abipqjihjqfofmkx
nlqymnuvjpvvgova
avngotmhodpoufzn
qmdyivtzitnrjuae
xfwjmqtqdljuerxi
csuellnlcyqaaamq
slqyrcurcyuoxquo
dcjmxyzbzpohzprl
uqfnmjwniyqgsowb
rbmxpqoblyxdocqc
ebjclrdbqjhladem
ainnfhxnsgwqnmyo
eyytjjwhvodtzquf
iabjgmbbhilrcyyp
pqfnehkivuelyccc
xgjbyhfgmtseiimt
jwxyqhdbjiqqqeyy
gxsbrncqkmvaryln
vhjisxjkinaejytk
seexagcdmaedpcvh
lvudfgrcpjxzdpvd
fxtegyrqjzhmqean
dnoiseraqcoossmc
nwrhmwwbykvwmgep
udmzskejvizmtlce
hbzvqhvudfdlegaa
cghmlfqejbxewskv
bntcmjqfwomtbwsb
qezhowyopjdyhzng
todzsocdkgfxanbz
zgjkssrjlwxuhwbk
eibzljqsieriyrzr
wamxvzqyycrxotjp
epzvfkispwqynadu
dwlpfhtrafrxlyie
qhgzujhgdruowoug
girstvkahaemmxvh
baitcrqmxhazyhbl
xyanqcchbhkajdmc
gfvjmmcgfhvgnfdq
tdfdbslwncbnkzyz
jojuselkpmnnbcbb
hatdslkgxtqpmavj
dvelfeddvgjcyxkj
gnsofhkfepgwltse
mdngnobasfpewlno
qssnbcyjgmkyuoga
glvcmmjytmprqwvn
gwrixumjbcdffsdl
lozravlzvfqtsuiq
sicaflbqdxbmdlch
inwfjkyyqbwpmqlq
cuvszfotxywuzhzi
igfxyoaacoarlvay
ucjfhgdmnjvgvuni
rvvkzjsytqgiposh
jduinhjjntrmqroz
yparkxbgsfnueyll
lyeqqeisxzfsqzuj
woncskbibjnumydm
lltucklragtjmxtl
ubiyvmyhlesfxotj
uecjseeicldqrqww
xxlxkbcthufnjbnm
lhqijovvhlffpxga
fzdgqpzijitlogjz
efzzjqvwphomxdpd
jvgzvuyzobeazssc
hejfycgxywfjgbfw
yhjjmvkqfbnbliks
sffvfyywtlntsdsz
dwmxqudvxqdenrur
asnukgppdemxrzaz
nwqfnumblwvdpphx
kqsmkkspqvxzuket
cpnraovljzqiquaz
qrzgrdlyyzbyykhg
opoahcbiydyhsmqe
hjknnfdauidjeydr
hczdjjlygoezadow
rtflowzqycimllfv
sfsrgrerzlnychhq
bpahuvlblcolpjmj
albgnjkgmcrlaicl
pijyqdhfxpaxzdex
eeymiddvcwkpbpux
rqwkqoabywgggnln
vckbollyhgbgmgwh
ylzlgvnuvpynybkm
hpmbxtpfosbsjixt
ocebeihnhvkhjfqz
tvctyxoujdgwayze
efvhwxtuhapqxjen
rusksgefyidldmpo
nkmtjvddfmhirmzz
whvtsuadwofzmvrt
iiwjqvsdxudhdzzk
gucirgxaxgcassyo
rmhfasfzexeykwmr
hynlxcvsbgosjbis
huregszrcaocueen
pifezpoolrnbdqtv
unatnixzvdbqeyox
xtawlpduxgacchfe
bdvdbflqfphndduf
xtdsnjnmzccfptyt
nkhsdkhqtzqbphhg
aqcubmfkczlaxiyb
moziflxpsfubucmv
srdgnnjtfehiimqx
pwfalehdfyykrohf
sysxssmvewyfjrve
brsemdzosgqvvlxe
bimbjoshuvflkiat
hkgjasmljkpkwwku
sbnmwjvodygobpqc
bbbqycejueruihhd
corawswvlvneipyc
gcyhknmwsczcxedh
kppakbffdhntmcqp
ynulzwkfaemkcefp
pyroowjekeurlbii
iwksighrswdcnmxf
glokrdmugreygnsg
xkmvvumnfzckryop
aesviofpufygschi
csloawlirnegsssq
fkqdqqmlzuxbkzbc
uzlhzcfenxdfjdzp
poaaidrktteusvyf
zrlyfzmjzfvivcfr
qwjulskbniitgqtx
gjeszjksbfsuejki
vczdejdbfixbduaq
knjdrjthitjxluth
jweydeginrnicirl
bottrfgccqhyycsl
eiquffofoadmbuhk
lbqfutmzoksscswf
xfmdvnvfcnzjprba
uvugkjbkhlaoxmyx
wadlgtpczgvcaqqv
inzrszbtossflsxk
dbzbtashaartczrj
qbjiqpccefcfkvod
hluujmokjywotvzy
thwlliksfztcmwzh
arahybspdaqdexrq
nuojrmsgyipdvwyx
hnajdwjwmzattvst
sulcgaxezkprjbgu
rjowuugwdpkjtypw
oeugzwuhnrgiaqga
wvxnyymwftfoswij
pqxklzkjpcqscvde
tuymjzknntekglqj
odteewktugcwlhln
exsptotlfecmgehc
eeswfcijtvzgrqel
vjhrkiwmunuiwqau
zhlixepkeijoemne
pavfsmwesuvebzdd
jzovbklnngfdmyws
nbajyohtzfeoiixz
ciozmhrsjzrwxvhz
gwucrxieqbaqfjuv
uayrxrltnohexawc
flmrbhwsfbcquffm
gjyabmngkitawlxc
rwwtggvaygfbovhg
xquiegaisynictjq
oudzwuhexrwwdbyy
lengxmguyrwhrebb
uklxpglldbgqsjls
dbmvlfeyguydfsxq
zspdwdqcrmtmdtsc
mqfnzwbfqlauvrgc
amcrkzptgacywvhv
ndxmskrwrqysrndf
mwjyhsufeqhwisju
srlrukoaenyevykt
tnpjtpwawrxbikct
geczalxmgxejulcv
tvkcbqdhmuwcxqci
tiovluvwezwwgaox
zrjhtbgajkjqzmfo
vcrywduwsklepirs
lofequdigsszuioy
wxsdzomkjqymlzat
iabaczqtrfbmypuy
ibdlmudbajikcncr
rqcvkzsbwmavdwnv
ypxoyjelhllhbeog
fdnszbkezyjbttbg
uxnhrldastpdjkdz
xfrjbehtxnlyzcka
omjyfhbibqwgcpbv
eguucnoxaoprszmp
xfpypldgcmcllyzz
aypnmgqjxjqceelv
mgzharymejlafvgf
tzowgwsubbaigdok
ilsehjqpcjwmylxc
pfmouwntfhfnmrwk
csgokybgdqwnduwp
eaxwvxvvwbrovypz
nmluqvobbbmdiwwb
lnkminvfjjzqbmio
mjiiqzycqdhfietz
towlrzriicyraevq
obiloewdvbrsfwjo
lmeooaajlthsfltw
ichygipzpykkesrw
gfysloxmqdsfskvt
saqzntehjldvwtsx
pqddoemaufpfcaew
mjrxvbvwcreaybwe
ngfbrwfqnxqosoai
nesyewxreiqvhald
kqhqdlquywotcyfy
liliptyoqujensfi
nsahsaxvaepzneqq
zaickulfjajhctye
gxjzahtgbgbabtht
koxbuopaqhlsyhrp
jhzejdjidqqtjnwe
dekrkdvprfqpcqki
linwlombdqtdeyop
dvckqqbnigdcmwmx
yaxygbjpzkvnnebv
rlzkdkgaagmcpxah
cfzuyxivtknirqvt
obivkajhsjnrxxhn
lmjhayymgpseuynn
bbjyewkwadaipyju
lmzyhwomfypoftuu
gtzhqlgltvatxack
jfflcfaqqkrrltgq
txoummmnzfrlrmcg
ohemsbfuqqpucups
imsfvowcbieotlok
tcnsnccdszxfcyde
qkcdtkwuaquajazz
arcfnhmdjezdbqku
srnocgyqrlcvlhkb
mppbzvfmcdirbyfw
xiuarktilpldwgwd
ypufwmhrvzqmexpc
itpdnsfkwgrdujmj
cmpxnodtsswkyxkr
wayyxtjklfrmvbfp
mfaxphcnjczhbbwy
sjxhgwdnqcofbdra
pnxmujuylqccjvjm
ivamtjbvairwjqwl
deijtmzgpfxrclss
bzkqcaqagsynlaer
tycefobvxcvwaulz
ctbhnywezxkdsswf
urrxxebxrthtjvib
fpfelcigwqwdjucv
ngfcyyqpqulwcphb
rltkzsiipkpzlgpw
qfdsymzwhqqdkykc
balrhhxipoqzmihj
rnwalxgigswxomga
ghqnxeogckshphgr
lyyaentdizaumnla
exriodwfzosbeoib
speswfggibijfejk
yxmxgfhvmshqszrq
hcqhngvahzgawjga
qmhlsrfpesmeksur
eviafjejygakodla
kvcfeiqhynqadbzv
fusvyhowslfzqttg
girqmvwmcvntrwau
yuavizroykfkdekz
jmcwohvmzvowrhxf
kzimlcpavapynfue
wjudcdtrewfabppq
yqpteuxqgbmqfgxh
xdgiszbuhdognniu
jsguxfwhpftlcjoh
whakkvspssgjzxre
ggvnvjurlyhhijgm
krvbhjybnpemeptr
pqedgfojyjybfbzr
jzhcrsgmnkwwtpdo
yyscxoxwofslncmp
gzjhnxytmyntzths
iteigbnqbtpvqumi
zjevfzusnjukqpfw
xippcyhkfuounxqk
mcnhrcfonfdgpkyh
pinkcyuhjkexbmzj
lotxrswlxbxlxufs
fmqajrtoabpckbnu
wfkwsgmcffdgaqxg
qfrsiwnohoyfbidr
czfqbsbmiuyusaqs
ieknnjeecucghpoo
cevdgqnugupvmsge
gjkajcyjnxdrtuvr
udzhrargnujxiclq
zqqrhhmjwermjssg
ggdivtmgoqajydzz
wnpfsgtxowkjiivl
afbhqawjbotxnqpd
xjpkifkhfjeqifdn
oyfggzsstfhvticp
kercaetahymeawxy
khphblhcgmbupmzt
iggoqtqpvaebtiol
ofknifysuasshoya
qxuewroccsbogrbv
apsbnbkiopopytgu
zyahfroovfjlythh
bxhjwfgeuxlviydq
uvbhdtvaypasaswa
qamcjzrmesqgqdiz
hjnjyzrxntiycyel
wkcrwqwniczwdxgq
hibxlvkqakusswkx
mzjyuenepwdgrkty
tvywsoqslfsulses
jqwcwuuisrclircv
xanwaoebfrzhurct
ykriratovsvxxasf
qyebvtqqxbjuuwuo
telrvlwvriylnder
acksrrptgnhkeiaa
yemwfjhiqlzsvdxf
banrornfkcymmkcc
ytbhxvaeiigjpcgm
crepyazgxquposkn
xlqwdrytzwnxzwzv
xtrbfbwopxscftps
kwbytzukgseeyjla
qtfdvavvjogybxjg
ytbmvmrcxwfkgvzw
nbscbdskdeocnfzr
sqquwjbdxsxhcseg
ewqxhigqcgszfsuw
cvkyfcyfmubzwsee
dcoawetekigxgygd
ohgqnqhfimyuqhvi
otisopzzpvnhctte
bauieohjejamzien
ewnnopzkujbvhwce
aeyqlskpaehagdiv
pncudvivwnnqspxy
ytugesilgveokxcg
zoidxeelqdjesxpr
ducjccsuaygfchzj
smhgllqqqcjfubfc
nlbyyywergronmir
prdawpbjhrzsbsvj
nmgzhnjhlpcplmui
eflaogtjghdjmxxz
qolvpngucbkprrdc
ixywxcienveltgho
mwnpqtocagenkxut
iskrfbwxonkguywx
ouhtbvcaczqzmpua
srewprgddfgmdbao
dyufrltacelchlvu
czmzcbrkecixuwzz
dtbeojcztzauofuk
prrgoehpqhngfgmw
baolzvfrrevxsyke
zqadgxshwiarkzwh
vsackherluvurqqj
surbpxdulvcvgjbd
wqxytarcxzgxhvtx
vbcubqvejcfsgrac
zqnjfeapshjowzja
hekvbhtainkvbynx
knnugxoktxpvoxnh
knoaalcefpgtvlwm
qoakaunowmsuvkus
ypkvlzcduzlezqcb
ujhcagawtyepyogh
wsilcrxncnffaxjf
gbbycjuscquaycrk
aduojapeaqwivnly
ceafyxrakviagcjy
nntajnghicgnrlst
vdodpeherjmmvbje
wyyhrnegblwvdobn
xlfurpghkpbzhhif
xyppnjiljvirmqjo
kglzqahipnddanpi
omjateouxikwxowr
ocifnoopfglmndcx
emudcukfbadyijev
ooktviixetfddfmh
wtvrhloyjewdeycg
cgjncqykgutfjhvb
nkwvpswppeffmwad
hqbcmfhzkxmnrivg
mdskbvzguxvieilr
anjcvqpavhdloaqh
erksespdevjylenq
fadxwbmisazyegup
iyuiffjmcaahowhj
ygkdezmynmltodbv
fytneukxqkjattvh
woerxfadbfrvdcnz
iwsljvkyfastccoa
movylhjranlorofe
drdmicdaiwukemep
knfgtsmuhfcvvshg
ibstpbevqmdlhajn
tstwsswswrxlzrqs
estyydmzothggudf
jezogwvymvikszwa
izmqcwdyggibliet
nzpxbegurwnwrnca
kzkojelnvkwfublh
xqcssgozuxfqtiwi
tcdoigumjrgvczfv
ikcjyubjmylkwlwq
kqfivwystpqzvhan
bzukgvyoqewniivj
iduapzclhhyfladn
fbpyzxdfmkrtfaeg
yzsmlbnftftgwadz
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/05/solution_a.zig | const std = @import("std");
const mem = std.mem;
const input = @embedFile("./input.txt");
pub fn main() void {
const line_length = 17;
var count_nice_strings: usize = 0;
var i: usize = 0;
while (i < input.len) : (i += line_length) {
if (isNiceString(input[i .. i + line_length - 1])) {
count_nice_strings += 1;
}
}
std.debug.print("Solution: {d}\n", .{count_nice_strings});
}
fn isNiceString(line: []const u8) bool {
return hasVowels(line, 3) and hasDouble(line) and !hasIllegal(line);
}
fn hasVowels(line: []const u8, required: usize) bool {
var total_count: usize = 0;
const vowels = [_][]const u8{ "a", "e", "i", "o", "u" };
for (vowels) |vowel| {
const vowel_count = mem.count(u8, line, vowel);
if (vowel_count > 0) {
total_count += vowel_count;
if (total_count >= required) return true;
}
}
return false;
}
fn hasDouble(line: []const u8) bool {
for (line[1..], 1..) |c, i| {
if (c == line[i - 1]) return true;
}
return false;
}
fn hasIllegal(line: []const u8) bool {
const illegals = [_][]const u8{ "ab", "cd", "pq", "xy" };
for (illegals) |illegal| {
if (mem.indexOf(u8, line, illegal) != null) return true;
}
return false;
}
test "hasVowels" {
try std.testing.expect(hasVowels("aei", 3) == true);
try std.testing.expect(hasVowels("xazegov", 3) == true);
try std.testing.expect(hasVowels("aeiouaeiouaeiou", 4) == true);
try std.testing.expect(hasVowels("gggg", 1) == false);
try std.testing.expect(hasVowels("gaag", 3) == false);
}
test "hasDouble" {
try std.testing.expect(hasDouble("xx") == true);
try std.testing.expect(hasDouble("abcdde") == true);
try std.testing.expect(hasDouble("aabbccdd") == true);
try std.testing.expect(hasDouble("fafafafa") == false);
}
test "hasIllegal" {
try std.testing.expect(hasIllegal("baab") == true);
try std.testing.expect(hasIllegal("cdjlkma") == true);
try std.testing.expect(hasIllegal("aaaaa") == false);
}
test "isNiceString" {
try std.testing.expect(isNiceString("ugknbfddgicrmopn") == true);
try std.testing.expect(isNiceString("ugknbfddgicrmopn") == true);
try std.testing.expect(isNiceString("jchzalrnumimnmhp") == false);
try std.testing.expect(isNiceString("haegwjzuvuyypxyu") == false);
try std.testing.expect(isNiceString("dvszwmarrgswjxmb") == false);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/05/solution_b.zig | const std = @import("std");
const mem = std.mem;
const input = @embedFile("./input.txt");
pub fn main() void {
const line_length = 17;
var count_nice_strings: usize = 0;
var i: usize = 0;
while (i < input.len) : (i += line_length) {
if (isNiceString(input[i .. i + line_length - 1])) {
count_nice_strings += 1;
}
}
std.debug.print("Solution: {d}\n", .{count_nice_strings});
}
fn isNiceString(line: []const u8) bool {
return hasPair(line) and hasSameCharWithOtherBetween(line);
}
fn hasPair(line: []const u8) bool {
const len = line.len;
var i: usize = 0;
while (i < len - 2) : (i += 1) {
const a = line[i];
const b = line[i + 1];
var j: usize = i + 2;
while (j < len - 1) : (j += 1) {
const c = line[j];
const d = line[j + 1];
if (a == c and b == d) return true;
}
}
return false;
}
fn hasSameCharWithOtherBetween(line: []const u8) bool {
const len = line.len;
var i: usize = 0;
while (i < len - 2) : (i += 1) {
const a = line[i];
const c = line[i + 2];
if (a == c) return true;
}
return false;
}
test "isNiceString" {
try std.testing.expect(isNiceString("qjhvhtzxzqqjkmpb") == true);
try std.testing.expect(isNiceString("xxyxx") == true);
try std.testing.expect(isNiceString("uurcxstgmygtbstg") == false);
try std.testing.expect(isNiceString("ieodomkazucvgmuy") == false);
}
test "hasPair" {
try std.testing.expect(hasPair("xyxy") == true);
try std.testing.expect(hasPair("aabcdefgaa") == true);
try std.testing.expect(hasPair("aaa") == false);
}
test "hasSameCharWithOtherBetween" {
try std.testing.expect(hasSameCharWithOtherBetween("xyx") == true);
try std.testing.expect(hasSameCharWithOtherBetween("abcdefeghi") == true);
try std.testing.expect(hasSameCharWithOtherBetween("aaa") == true);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/05/README.md | # 2015 Day 05
*Puzzle Source: [Advent of Code 2015](https://adventofcode.com/2015/day/5) by [Eric Wastl](https://github.com/topaz) - ♥️ Thank you!*
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/01/input.txt | ()(((()))(()()()((((()(((())(()(()((((((()(()(((())))((()(((()))((())(()((()()()()(((())(((((((())))()()(()(()(())(((((()()()((())(((((()()))))()(())(((())(())((((((())())))(()())))()))))()())()())((()()((()()()()(()((((((((()()())((()()(((((()(((())((())(()))()((((()((((((((())()((()())(())((()))())((((()())(((((((((((()()(((((()(()))())(((()(()))())((()(()())())())(()(((())(())())()()(()(()((()))((()))))((((()(((()))))((((()(()(()())())()(((()((((())((((()(((()()(())()()()())((()((((((()((()()))()((()))()(()()((())))(((()(((()))((()((()(()))(((()()(()(()()()))))()()(((()(((())())))))((()(((())()(()(())((()())))((((())))(()(()(()())()((()())))(((()((()(())()()((()((())(()()((())(())()))()))((()(())()))())(((((((()(()()(()(())())))))))(()((((((())((((())((())())(()()))))()(())(()())()())((())(()))))(()))(()((()))()(()((((((()()()()((((((((()(()(())((()()(()()))(())()())()((())))()))()())(((()))(())()(())()))()((()((()(()()())(())()()()((())())))((()()(()()((()(())()()())(((()(()()))))(())))(()(()())()))()()))))))()))))((((((())))())))(()(())())(()())))))(()))()))))))()((()))))()))))(()(()((()())())(()()))))(((())()))())())())(((()(()()))(())()(())(())((((((()()))))((()(()))))))(()))())(((()()(()))()())()()()())))))))))))))(())(()))(()))((()(())(()())(())())(()())(())()()(()())))()()()))(())())()))())())(())((())))))))(())))(())))))()))))((())(()(((()))))(()))()((()(())))(()())(((((()))()())()()))))()))))()))())(()(()()()))()))))))((()))))))))))()((()))((()(())((())()()(()()))()(()))))()()(()))()))(((())))(())()((())(())(()())()())())))))))())))()((())))()))(()))()()))(((((((()))())(()()))(()()(()))()(()((()())()))))))(((()()()())))(())()))()())(()()))()()))))))))(())))()))()()))))))()))()())))()(())(())))))()(())()()(()()))))())((()))))()))))(()(((((()))))))))())))())()(())()()))))(())))())()()())()()())()(()))))()))()))))))))())))((()))()))()))())))()())()()())))())))(()((())()((()))())))))())()(())((())))))))))))())()())(())())())(()))(()))()))())(()(())())()())()()(()))))(()(())))))))(())))())(())))))))())()()(())())())))(())))))()))()(()())()(()))())())))))()()(()))()))))())))))))))()))))()))))))())()())()()))))()())))())))))))))))()()))))()()(((()))()()(())()))))((()))))(()))(())())))(())()))))))(()))()))))(())())))))()))(()())))))))))))))())))))))))()((()())(()())))))))((()))))(())(())))()(()())())))())())(()()()())))()))))))())))))())()()())))))))))))()()(()))))()())()))((()())(()))))()(()))))))))))()())())(((())(()))))())()))()))()))))))()))))))(()))))()))))()(())))(())))(()))())()()(()()))()))(()()))))))))()))(()))())(()()(()(()())()()))()))))))))(())))))((()()(()))())())))))()))())(()())()()))())))()(()()()()))((())())))())()(()()))()))))))))(()))(())))()))))(()(()())(()))))()())())()))()()))())))))))))))())()))))))()))))))))())))))()))))())(()())))(())()))())())))))()()(()()())(()())))()()))(((()))(()()()))))()))))()))))((())))()((((((()()))))))())))))))))))(((()))))))))))))(())())))))())(()))))))(()))((()))())))()(()((()))()))()))))))))))())()))()(()()))))())))())(())()(()))()))())(()))()))))(()()))()()(())))))()))(())(()(()()))(()()())))))(((()))))))()))))))))))))(())(()))))()())())()()((()()))())))))(()))))())))))))()()()))))))))())))()(((()()))(())))))(((())())))))((()))()(()))(()))))(()())))(()))())))))()))))(())(())))()((()))(())())))()()))()))))))))()))(()()()(()()()(()))())(())()())(((()))(())))))))))(((()())))()()))))))))()(())(()))()((((())(())(()())))()))(((())()()()))((()))(()))())())))())))(()))())()())())(()(())())()()()(())))())(())))(())))(())()))()))(()((()))))))))())(()))))))())(()()))()()))()(()(()())))()()(()((()((((((()))(())))()()()))())()))((()()(()))())((()(()(()))(()()))))()())))()))()())))))))()()((()())(())))()))(()))(())(()))())(()(())))()()))))))(((()(((()()))()(()(())())((()()))()))()))()))()(()()()(()))((()())()(())))()()))(((())()()())(())()((()()()()(()(())(()()))()(((((()())))((())))))(()()()))))(((()(())))()))((()((()(())()(()((())))((()())()(()))(((()())()()(()))(())(((()((()())()((())()())(((()()))((()((())(()))(()())(()()()))((()))(())(()((()()())((()))(())))(())(())(())))(()())))(((((()(()(((((()())((((()(()())(())(()()(((())((()(((()()(((()()((((((())))())(()((((((()(()))()))()()((()((()))))()(()()(()((()()))))))(((((()(((((())()()()(())())))))))()))((()()(())))(())(()()()())))))(()((((())))))))()()(((()(()(()(()(()())()()()(((((((((()()())()(()))((()()()()()(((((((()())()((())()))((((((()(()(()(()())(((()(((((((()(((())(((((((((())(())())()))((()(()))(((()()())(())(()(()()(((()(())()))())))(())((((((())(()()())()()(((()(((())(()(((())(((((((()(((((((((()))(())(()(()(()))))((()))()(())())())((()(()((()()))((()()((()(())(())(()((())(((())(((()()()((((((()()(())((((())()))))(())((()(()((())))(((((()(()()())())((())())))((())((()((()()((((((())(((()()(()())())(()(()))(()(()))())())()(((((((()(((()(())()()((())((()(()()((()(()()(((((((((((())((())((((((())((()((((()(()((((()(((((((())()((()))))())()((()((((()(()(((()((()())))(())())(((()(((())((((((()(((((((((()()(())))(()(((((()((((()())))((()((()((()(()()(((())((((((((((((()(((())(()(((((()))(()()(()()()()()()((())(((((((())(((((())))))())()(()()(()(()(((()()(((((())(()((()((()(((()()((()((((())()))()((((())(())))()())(((())(())(()()((()(((()()((((((((((()()(()())())(((((((((())((((()))()()((((())(()((((()(((())())(((((((((((()((((())))(())(()(((()(((()((())(((((()((()()(()(()()((((((()((((()((()(()((()(()((((((()))))()()(((((()((()(()(())()))(())(((((((()((((()())(()((()((()(()))())))(())((()))))(((((((()()()())(()))(()()((()())()((()((()()()(()(()()))(()())(())(((((()(((((((((((()((()(((()(((((((()()((((((()(((((()(()((()(((((())((((((()))((((())((()()((())(((())()(((((()()(((((()((()(()(((((((()(((((()((()((()((())(())((())(()))()()))(()()(()(()()(((((((()(((()(((())()(((((()((((((()())((((())()((()((()(()()())(()))((((()()((((((()((()(()(()((((()((()((())((((((()(()(())((((((()((((((((((()((())()))()(()(()(((((()()()))((())))()(()((((((((((((((()(((()((((()((())((()((()(((()()(()(((()((())(()()())))()(()(()(((((()()(()(()((((()(((((())()(()(()))(((((()()(((()()(())((((((((((((((())((())(((((((((((())()()()(())()(()(()(((((((((())(((()))(()()())(()((((()(())(((((()())(())((((((((())()((((()((((((())(()((()(())(((()((((()))(((((((((()()))((((()(())()()()(())(()((())((()()))()(((())(((((())((((((()()))(((((((((()((((((())))(((((((()((()(()(())))())(()(()))()(((((()())(()))()(()(())(((()))))())()())))(((((()))())()((()(()))))((()()()((((((()))()()((((((((())((()(()(((()(()((())((()())(()((((())(()(((()()()(()(()()))())())((((((((((())())((()))()((())(())(())))())()(()()(())))())(()))(((()(()()(((()(((())))()(((()(())()((((((())()))()))()((((((()(()(((((()())))()))))())()()(((()(((((())((()()(()((()((()(()(()(())))(()()()()((()(())(((()((()))((((()))())(())))())(()))()()()())()))(((()()())()((())))(())(()()()()(()())((()(()()((((())))((()((()(())((()(()((())()(()()(((()())()()())((()))((())(((()()(())))()()))(((()((())()(((((()())(())((())()())())((((((()(()(((((()))(()( |
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/01/solution_a.zig | const std = @import("std");
const input = @embedFile("./input.txt");
const expect = std.testing.expect;
fn getFloor(comptime length: usize, instruction: *const [length]u8) i32 {
// start at floor 0
var floor: i32 = 0;
for (instruction) |byte| {
switch (byte) {
// floor up on (
'(' => floor += 1,
// floor down on )
')' => floor -= 1,
else => unreachable,
}
}
return floor;
}
pub fn main() void {
std.log.debug("Floor: {d}", .{getFloor(input.len, input)});
}
test "`(())` and `()()` both result in floor `0`" {
var a: *const [4]u8 = "(())";
var b: *const [4]u8 = "()()";
try expect(getFloor(a.len, a) == 0);
try expect(getFloor(b.len, b) == 0);
}
test "`(((` and `(()(()(` both result in floor `3`" {
var a: *const [3]u8 = "(((";
var b: *const [7]u8 = "(()(()(";
try expect(getFloor(a.len, a) == 3);
try expect(getFloor(b.len, b) == 3);
}
test "`))(((((` also results in floor `3`" {
var a: *const [7]u8 = "))(((((";
try expect(getFloor(a.len, a) == 3);
}
test "`())` and `))(` both result in floor `-1`" {
var a: *const [3]u8 = "())";
var b: *const [3]u8 = "))(";
try expect(getFloor(a.len, a) == -1);
try expect(getFloor(b.len, b) == -1);
}
test "`)))` and `)())())` both result in floor `-3`" {
var a: *const [3]u8 = ")))";
var b: *const [7]u8 = ")())())";
try expect(getFloor(a.len, a) == -3);
try expect(getFloor(b.len, b) == -3);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/01/solution_b.zig | const std = @import("std");
const input = @embedFile("./input.txt");
const expect = std.testing.expect;
fn getBasementPosition(comptime length: usize, instruction: *const [length]u8) i32 {
// start at floor 0
var floor: i32 = 0;
var position: i32 = 0;
for (instruction) |byte| {
switch (byte) {
// floor up on (
'(' => floor += 1,
// floor down on )
')' => floor -= 1,
else => unreachable,
}
position += 1;
if (floor == -1) {
break;
}
}
return position;
}
pub fn main() void {
std.log.debug("Basement position: {d}", .{getBasementPosition(input.len, input)});
}
test "`)` causes him to enter the basement at character position `1`" {
var a: *const [1]u8 = ")";
try expect(getBasementPosition(a.len, a) == 1);
}
test "`()())` causes him to enter the basement at character position `5`" {
var a: *const [5]u8 = "()())";
try expect(getBasementPosition(a.len, a) == 5);
}
|
0 | repos/zig_aoc/2015 | repos/zig_aoc/2015/01/README.md | # 2015 Day 01
*Puzzle Source: [Advent of Code 2015](https://adventofcode.com/2015/day/1) by [Eric Wastl](https://github.com/topaz) - ♥️ Thank you!*
|
0 | repos | repos/zig-plugin/rust-toolchain.toml | [toolchain]
profile = "default"
channel = "1.80.0"
|
0 | repos | repos/zig-plugin/Cargo.lock | # This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "addr2line"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
dependencies = [
"gimli",
]
[[package]]
name = "adler"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "ahash"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01"
dependencies = [
"cfg-if",
"once_cell",
"version_check",
"zerocopy",
]
[[package]]
name = "aho-corasick"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
dependencies = [
"memchr",
]
[[package]]
name = "ambient-authority"
version = "0.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anstyle"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
[[package]]
name = "anyhow"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "arbitrary"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
dependencies = [
"derive_arbitrary",
]
[[package]]
name = "assert_cmd"
version = "2.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d"
dependencies = [
"anstyle",
"bstr",
"doc-comment",
"libc",
"predicates",
"predicates-core",
"predicates-tree",
"wait-timeout",
]
[[package]]
name = "assert_fs"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7efdb1fdb47602827a342857666feb372712cbc64b414172bd6b167a02927674"
dependencies = [
"anstyle",
"doc-comment",
"globwalk",
"predicates",
"predicates-core",
"predicates-tree",
"tempfile",
]
[[package]]
name = "async-trait"
version = "0.1.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "atomic-waker"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "backtrace"
version = "0.3.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
dependencies = [
"addr2line",
"cc",
"cfg-if",
"libc",
"miniz_oxide",
"object",
"rustc-demangle",
]
[[package]]
name = "base64"
version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "base64"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "binstall-tar"
version = "0.4.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3620d72763b5d8df3384f3b2ec47dc5885441c2abbd94dd32197167d08b014a"
dependencies = [
"filetime",
"libc",
"xattr",
]
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "bstr"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc"
dependencies = [
"memchr",
"regex-automata 0.4.4",
"serde",
]
[[package]]
name = "bumpalo"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "bytemuck"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
[[package]]
name = "cap-fs-ext"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88e341d15ac1029aadce600be764a1a1edafe40e03cde23285bc1d261b3a4866"
dependencies = [
"cap-primitives",
"cap-std",
"io-lifetimes",
"windows-sys 0.52.0",
]
[[package]]
name = "cap-net-ext"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9"
dependencies = [
"cap-primitives",
"cap-std",
"rustix",
"smallvec",
]
[[package]]
name = "cap-primitives"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe16767ed8eee6d3f1f00d6a7576b81c226ab917eb54b96e5f77a5216ef67abb"
dependencies = [
"ambient-authority",
"fs-set-times",
"io-extras",
"io-lifetimes",
"ipnet",
"maybe-owned",
"rustix",
"windows-sys 0.52.0",
"winx",
]
[[package]]
name = "cap-rand"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20e5695565f0cd7106bc3c7170323597540e772bb73e0be2cd2c662a0f8fa4ca"
dependencies = [
"ambient-authority",
"rand",
]
[[package]]
name = "cap-std"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "593db20e4c51f62d3284bae7ee718849c3214f93a3b94ea1899ad85ba119d330"
dependencies = [
"cap-primitives",
"io-extras",
"io-lifetimes",
"rustix",
]
[[package]]
name = "cap-time-ext"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03261630f291f425430a36f38c847828265bc928f517cdd2004c56f4b02f002b"
dependencies = [
"ambient-authority",
"cap-primitives",
"iana-time-zone",
"once_cell",
"rustix",
"winx",
]
[[package]]
name = "castaway"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a17ed5635fc8536268e5d4de1e22e81ac34419e5f052d4d51f4e01dcc263fcc"
dependencies = [
"rustversion",
]
[[package]]
name = "cbindgen"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da6bc11b07529f16944307272d5bd9b22530bc7d05751717c9d416586cedab49"
dependencies = [
"heck",
"indexmap 1.9.3",
"log",
"proc-macro2",
"quote",
"serde",
"serde_json",
"syn 1.0.109",
"tempfile",
"toml 0.5.11",
]
[[package]]
name = "cc"
version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
"jobserver",
"libc",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clean-path"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaa6b4b263a5d737e9bf6b7c09b72c41a5480aec4d7219af827f6564e950b6a5"
[[package]]
name = "command-group"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a68fa787550392a9d58f44c21a3022cfb3ea3e2458b7f85d3b399d0ceeccf409"
dependencies = [
"nix",
"winapi",
]
[[package]]
name = "compact_str"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f86b9c4c00838774a6d902ef931eff7470720c51d90c2e32cfe15dc304737b3f"
dependencies = [
"castaway",
"cfg-if",
"itoa",
"ryu",
"static_assertions",
]
[[package]]
name = "console"
version = "0.15.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
dependencies = [
"encode_unicode",
"lazy_static",
"libc",
"windows-sys 0.52.0",
]
[[package]]
name = "const_format"
version = "0.2.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673"
dependencies = [
"const_format_proc_macros",
]
[[package]]
name = "const_format_proc_macros"
version = "0.2.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500"
dependencies = [
"proc-macro2",
"quote",
"unicode-xid",
]
[[package]]
name = "convert_case"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
dependencies = [
"unicode-segmentation",
]
[[package]]
name = "core-foundation"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
[[package]]
name = "cpp_demangle"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f"
dependencies = [
"cfg-if",
]
[[package]]
name = "cpufeatures"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
dependencies = [
"libc",
]
[[package]]
name = "cranelift-bforest"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c22542c0b95bd3302f7ed6839869c561f2324bac2fd5e7e99f5cfa65fdc8b92"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b3db903ef2e9c8a4de2ea6db5db052c7857282952f9df604aa55d169e6000d8"
dependencies = [
"bumpalo",
"cranelift-bforest",
"cranelift-codegen-meta",
"cranelift-codegen-shared",
"cranelift-control",
"cranelift-entity",
"cranelift-isle",
"gimli",
"hashbrown 0.14.3",
"log",
"regalloc2",
"smallvec",
"target-lexicon",
]
[[package]]
name = "cranelift-codegen-meta"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6590feb5a1d6438f974bf6a5ac4dddf69fca14e1f07f3265d880f69e61a94463"
dependencies = [
"cranelift-codegen-shared",
]
[[package]]
name = "cranelift-codegen-shared"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7239038c56fafe77fddc8788fc8533dd6c474dc5bdc5637216404f41ba807330"
[[package]]
name = "cranelift-control"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7dc9c595341404d381d27a3d950160856b35b402275f0c3990cd1ad683c8053"
dependencies = [
"arbitrary",
]
[[package]]
name = "cranelift-entity"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44e3ee532fc4776c69bcedf7e62f9632cbb3f35776fa9a525cdade3195baa3f7"
dependencies = [
"serde",
"serde_derive",
]
[[package]]
name = "cranelift-frontend"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a612c94d09e653662ec37681dc2d6fd2b9856e6df7147be0afc9aabb0abf19df"
dependencies = [
"cranelift-codegen",
"log",
"smallvec",
"target-lexicon",
]
[[package]]
name = "cranelift-isle"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85db9830abeb1170b7d29b536ffd55af1d4d26ac8a77570b5d1aca003bf225cc"
[[package]]
name = "cranelift-native"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "301ef0edafeaeda5771a5d2db64ac53e1818ae3111220a185677025fe91db4a1"
dependencies = [
"cranelift-codegen",
"libc",
"target-lexicon",
]
[[package]]
name = "cranelift-wasm"
version = "0.103.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "380f0abe8264e4570ac615fc31cef32a3b90a77f7eb97b08331f9dd357b1f500"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
"itertools 0.10.5",
"log",
"smallvec",
"wasmparser 0.118.1",
"wasmtime-types",
]
[[package]]
name = "crc32fast"
version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
"typenum",
]
[[package]]
name = "darling"
version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
dependencies = [
"darling_core",
"darling_macro",
]
[[package]]
name = "darling_core"
version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
"syn 2.0.75",
]
[[package]]
name = "darling_macro"
version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
"syn 2.0.75",
]
[[package]]
name = "debugid"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d"
dependencies = [
"uuid",
]
[[package]]
name = "derive_arbitrary"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "diff"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
[[package]]
name = "difflib"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
]
[[package]]
name = "directories-next"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc"
dependencies = [
"cfg-if",
"dirs-sys-next",
]
[[package]]
name = "dirs"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
"dirs-sys 0.3.7",
]
[[package]]
name = "dirs"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
dependencies = [
"dirs-sys 0.4.1",
]
[[package]]
name = "dirs-sys"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
dependencies = [
"libc",
"redox_users",
"winapi",
]
[[package]]
name = "dirs-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [
"libc",
"option-ext",
"redox_users",
"windows-sys 0.48.0",
]
[[package]]
name = "dirs-sys-next"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
"redox_users",
"winapi",
]
[[package]]
name = "displaydoc"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "doc-comment"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]]
name = "either"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "encode_unicode"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
[[package]]
name = "encoding_rs"
version = "0.8.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
dependencies = [
"cfg-if",
]
[[package]]
name = "equivalent"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "errno"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
dependencies = [
"libc",
"windows-sys 0.52.0",
]
[[package]]
name = "extism"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d04edf6dcef24f6b28de8d709c73fabf3577323a8774e30cd03a1a00f35240e1"
dependencies = [
"anyhow",
"cbindgen",
"extism-convert",
"extism-manifest",
"glob",
"libc",
"serde",
"serde_json",
"sha2",
"toml 0.8.19",
"tracing",
"tracing-subscriber",
"ureq",
"url",
"uuid",
"wasmtime",
"wasmtime-wasi",
]
[[package]]
name = "extism-convert"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b96dda334f4d05d02504c7c6fd8b2a5fb9caf77aea956fd5a25e467d6df4e813"
dependencies = [
"anyhow",
"base64 0.22.1",
"bytemuck",
"extism-convert-macros",
"prost",
"rmp-serde",
"serde",
"serde_json",
]
[[package]]
name = "extism-convert-macros"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f542da6bda406e348633328bf13b71c15b08dc14a92b62fb724ac17f0081fe1"
dependencies = [
"manyhow",
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "extism-manifest"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97da8e6e2803cc3ac8cde2529e027da013413555c421edfabddbf8a637f52548"
dependencies = [
"base64 0.22.1",
"serde",
"serde_json",
]
[[package]]
name = "extism-pdk"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0334e38735348bd085e518bfc284395fcb5c198ba65ce36f9712bd25ff9e7be0"
dependencies = [
"anyhow",
"base64 0.22.1",
"extism-convert",
"extism-manifest",
"extism-pdk-derive",
"serde",
"serde_json",
]
[[package]]
name = "extism-pdk-derive"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc4b8ea80a1b89cf8b053bdc5df2385125bcb9110d19be289c2030c61c7c6ad9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "fallible-iterator"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
[[package]]
name = "fastrand"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
[[package]]
name = "fd-lock"
version = "4.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947"
dependencies = [
"cfg-if",
"rustix",
"windows-sys 0.52.0",
]
[[package]]
name = "filetime"
version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"windows-sys 0.52.0",
]
[[package]]
name = "flate2"
version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae"
dependencies = [
"crc32fast",
"miniz_oxide",
]
[[package]]
name = "float-cmp"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
dependencies = [
"num-traits",
]
[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "form_urlencoded"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
dependencies = [
"percent-encoding",
]
[[package]]
name = "fs-set-times"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb"
dependencies = [
"io-lifetimes",
"rustix",
"windows-sys 0.52.0",
]
[[package]]
name = "fs4"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8c6b3bd49c37d2aa3f3f2220233b29a7cd23f79d1fe70e5337d25fb390793de"
dependencies = [
"rustix",
"windows-sys 0.52.0",
]
[[package]]
name = "futures"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"
dependencies = [
"futures-channel",
"futures-core",
"futures-io",
"futures-sink",
"futures-task",
"futures-util",
]
[[package]]
name = "futures-channel"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
dependencies = [
"futures-core",
"futures-sink",
]
[[package]]
name = "futures-core"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
[[package]]
name = "futures-io"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
[[package]]
name = "futures-sink"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
[[package]]
name = "futures-task"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
[[package]]
name = "futures-util"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
dependencies = [
"futures-core",
"futures-sink",
"futures-task",
"pin-project-lite",
"pin-utils",
]
[[package]]
name = "fxhash"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
"byteorder",
]
[[package]]
name = "fxprof-processed-profile"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd"
dependencies = [
"bitflags 2.4.1",
"debugid",
"fxhash",
"serde",
"serde_json",
]
[[package]]
name = "garde"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a3233677ea1554a48235d81bb59d2a41654969a8e29a1316c48105fd1701693"
dependencies = [
"compact_str",
"garde_derive",
"once_cell",
"regex",
"smallvec",
]
[[package]]
name = "garde_derive"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8796f322e43105351a7ec35148807b32b5b6058a539656dafe4a5b456d5ca41f"
dependencies = [
"proc-macro2",
"quote",
"regex",
"syn 2.0.75",
]
[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
]
[[package]]
name = "getrandom"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
dependencies = [
"cfg-if",
"libc",
"wasi",
]
[[package]]
name = "gimli"
version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
dependencies = [
"fallible-iterator",
"indexmap 2.4.0",
"stable_deref_trait",
]
[[package]]
name = "glob"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "globset"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1"
dependencies = [
"aho-corasick",
"bstr",
"log",
"regex-automata 0.4.4",
"regex-syntax 0.8.2",
]
[[package]]
name = "globwalk"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757"
dependencies = [
"bitflags 2.4.1",
"ignore",
"walkdir",
]
[[package]]
name = "h2"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
dependencies = [
"atomic-waker",
"bytes",
"fnv",
"futures-core",
"futures-sink",
"http",
"indexmap 2.4.0",
"slab",
"tokio",
"tokio-util",
"tracing",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "hashbrown"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
dependencies = [
"ahash",
]
[[package]]
name = "hashbrown"
version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
dependencies = [
"ahash",
]
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "http"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
dependencies = [
"bytes",
"fnv",
"itoa",
]
[[package]]
name = "http-body"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"
dependencies = [
"bytes",
"http",
]
[[package]]
name = "http-body-util"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d"
dependencies = [
"bytes",
"futures-core",
"http",
"http-body",
"pin-project-lite",
]
[[package]]
name = "httparse"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "human-sort"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "140a09c9305e6d5e557e2ed7cbc68e05765a7d4213975b87cb04920689cc6219"
[[package]]
name = "hyper"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d"
dependencies = [
"bytes",
"futures-channel",
"futures-util",
"h2",
"http",
"http-body",
"httparse",
"itoa",
"pin-project-lite",
"smallvec",
"tokio",
"want",
]
[[package]]
name = "hyper-rustls"
version = "0.27.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155"
dependencies = [
"futures-util",
"http",
"hyper",
"hyper-util",
"rustls",
"rustls-native-certs",
"rustls-pki-types",
"tokio",
"tokio-rustls",
"tower-service",
]
[[package]]
name = "hyper-util"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d8d52be92d09acc2e01dddb7fde3ad983fc6489c7db4837e605bc3fca4cb63e"
dependencies = [
"bytes",
"futures-channel",
"futures-util",
"http",
"http-body",
"hyper",
"pin-project-lite",
"socket2",
"tokio",
"tower",
"tower-service",
"tracing",
]
[[package]]
name = "iana-time-zone"
version = "0.1.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "id-arena"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005"
[[package]]
name = "ident_case"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
dependencies = [
"unicode-bidi",
"unicode-normalization",
]
[[package]]
name = "ignore"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1"
dependencies = [
"crossbeam-deque",
"globset",
"log",
"memchr",
"regex-automata 0.4.4",
"same-file",
"walkdir",
"winapi-util",
]
[[package]]
name = "indexmap"
version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [
"autocfg",
"hashbrown 0.12.3",
]
[[package]]
name = "indexmap"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c"
dependencies = [
"equivalent",
"hashbrown 0.14.3",
"serde",
]
[[package]]
name = "insta"
version = "1.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5"
dependencies = [
"console",
"lazy_static",
"linked-hash-map",
"similar",
]
[[package]]
name = "io-extras"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c301e73fb90e8a29e600a9f402d095765f74310d582916a952f618836a1bd1ed"
dependencies = [
"io-lifetimes",
"windows-sys 0.52.0",
]
[[package]]
name = "io-lifetimes"
version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c"
[[package]]
name = "ipnet"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
[[package]]
name = "is_ci"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45"
[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
dependencies = [
"either",
]
[[package]]
name = "itoa"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "ittapi"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1"
dependencies = [
"anyhow",
"ittapi-sys",
"log",
]
[[package]]
name = "ittapi-sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc"
dependencies = [
"cc",
]
[[package]]
name = "jobserver"
version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d"
dependencies = [
"libc",
]
[[package]]
name = "js-sys"
version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1"
dependencies = [
"wasm-bindgen",
]
[[package]]
name = "json-strip-comments"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b271732a960335e715b6b2ae66a086f115c74eb97360e996d2bd809bfc063bba"
dependencies = [
"memchr",
]
[[package]]
name = "lazy_static"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "leb128"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]]
name = "libc"
version = "0.2.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7"
[[package]]
name = "libredox"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8"
dependencies = [
"bitflags 2.4.1",
"libc",
"redox_syscall",
]
[[package]]
name = "linked-hash-map"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]]
name = "linux-raw-sys"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456"
[[package]]
name = "lock_api"
version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
dependencies = [
"autocfg",
"scopeguard",
]
[[package]]
name = "lockfree-object-pool"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e"
[[package]]
name = "log"
version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
[[package]]
name = "lzma-sys"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27"
dependencies = [
"cc",
"libc",
"pkg-config",
]
[[package]]
name = "mach"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
dependencies = [
"libc",
]
[[package]]
name = "manyhow"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8cd8783b626890c6e8124a894135b3bebca18af66a00f8e246dc378084d56e8"
dependencies = [
"manyhow-macros",
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "manyhow-macros"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "532aa12d5846b38a524b3acd99fb74dc8a5f193b33e65dac142ef92bd60f9416"
dependencies = [
"proc-macro-utils",
"proc-macro2",
"quote",
]
[[package]]
name = "matchers"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
dependencies = [
"regex-automata 0.1.10",
]
[[package]]
name = "maybe-owned"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4"
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "memfd"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64"
dependencies = [
"rustix",
]
[[package]]
name = "memoffset"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
dependencies = [
"autocfg",
]
[[package]]
name = "miette"
version = "7.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1"
dependencies = [
"cfg-if",
"miette-derive",
"thiserror",
"unicode-width",
]
[[package]]
name = "miette-derive"
version = "7.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "mime"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "minisign-verify"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881"
[[package]]
name = "miniz_oxide"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
dependencies = [
"adler",
]
[[package]]
name = "mio"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [
"hermit-abi",
"libc",
"wasi",
"windows-sys 0.52.0",
]
[[package]]
name = "nix"
version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
dependencies = [
"bitflags 2.4.1",
"cfg-if",
"libc",
]
[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
[[package]]
name = "normalize-line-endings"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
dependencies = [
"overload",
"winapi",
]
[[package]]
name = "num-traits"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
dependencies = [
"autocfg",
]
[[package]]
name = "object"
version = "0.32.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
dependencies = [
"crc32fast",
"hashbrown 0.14.3",
"indexmap 2.4.0",
"memchr",
]
[[package]]
name = "once_cell"
version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "openssl-probe"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "option-ext"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "overload"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "owo-colors"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f"
[[package]]
name = "parking_lot"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
dependencies = [
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-targets 0.48.5",
]
[[package]]
name = "paste"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
[[package]]
name = "percent-encoding"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "pin-project"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "pin-project-lite"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
[[package]]
name = "pin-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkg-config"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a"
[[package]]
name = "pori"
version = "0.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a63d338dec139f56dacc692ca63ad35a6be6a797442479b55acd611d79e906"
dependencies = [
"nom",
]
[[package]]
name = "ppv-lite86"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "predicates"
version = "3.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97"
dependencies = [
"anstyle",
"difflib",
"float-cmp",
"normalize-line-endings",
"predicates-core",
"regex",
]
[[package]]
name = "predicates-core"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
[[package]]
name = "predicates-tree"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
dependencies = [
"predicates-core",
"termtree",
]
[[package]]
name = "pretty_assertions"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66"
dependencies = [
"diff",
"yansi",
]
[[package]]
name = "proc-macro-crate"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
dependencies = [
"toml_edit 0.21.0",
]
[[package]]
name = "proc-macro-utils"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f59e109e2f795a5070e69578c4dc101068139f74616778025ae1011d4cd41a8"
dependencies = [
"proc-macro2",
"quote",
"smallvec",
]
[[package]]
name = "proc-macro2"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
[[package]]
name = "prost"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a"
dependencies = [
"bytes",
"prost-derive",
]
[[package]]
name = "prost-derive"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
dependencies = [
"anyhow",
"itertools 0.11.0",
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "proto_core"
version = "0.40.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de7bcbe6695616b9e27299ccdfe964095a8a3dba0e5240b959febbd8deeb1263"
dependencies = [
"indexmap 2.4.0",
"miette",
"minisign-verify",
"once_cell",
"proto_pdk_api",
"proto_shim",
"regex",
"reqwest",
"rustc-hash 2.0.0",
"schematic",
"semver",
"serde",
"serde_json",
"sha2",
"shell-words",
"starbase_archive",
"starbase_styles",
"starbase_utils",
"thiserror",
"tracing",
"url",
"uuid",
"version_spec",
"warpgate",
]
[[package]]
name = "proto_pdk"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fcfbe38dc71e9ae4975bd651f460afb0a58ccd06af035573294383715afeb28"
dependencies = [
"extism-pdk",
"proto_pdk_api",
"rustc-hash 2.0.0",
"serde",
"warpgate_pdk",
]
[[package]]
name = "proto_pdk_api"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7707a07768c2d4a0e8c28e7a24aa7651c88f0aab0197332cd05e2a3f8eda0b2c"
dependencies = [
"rustc-hash 2.0.0",
"schematic",
"semver",
"serde",
"serde_json",
"system_env",
"thiserror",
"version_spec",
"warpgate_api",
]
[[package]]
name = "proto_pdk_test_utils"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e708f034d8c7dee4401087263c1395830c753f8c7f10452b5a73671cfb66733b"
dependencies = [
"proto_core",
"proto_pdk_api",
"serde",
"serde_json",
"starbase_sandbox",
"warpgate",
]
[[package]]
name = "proto_shim"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d5eba553bde4d4d934bd8755167c7ef20bfed088e87ca28759f01a0aa5a3b26"
dependencies = [
"command-group",
"dirs 5.0.1",
]
[[package]]
name = "psm"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874"
dependencies = [
"cc",
]
[[package]]
name = "quinn"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b22d8e7369034b9a7132bc2008cac12f2013c8132b45e0554e6e20e2617f2156"
dependencies = [
"bytes",
"pin-project-lite",
"quinn-proto",
"quinn-udp",
"rustc-hash 2.0.0",
"rustls",
"socket2",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "quinn-proto"
version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd"
dependencies = [
"bytes",
"rand",
"ring",
"rustc-hash 2.0.0",
"rustls",
"slab",
"thiserror",
"tinyvec",
"tracing",
]
[[package]]
name = "quinn-udp"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285"
dependencies = [
"libc",
"once_cell",
"socket2",
"tracing",
"windows-sys 0.52.0",
]
[[package]]
name = "quote"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]]
name = "rayon"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "redox_syscall"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
dependencies = [
"bitflags 1.3.2",
]
[[package]]
name = "redox_users"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4"
dependencies = [
"getrandom",
"libredox",
"thiserror",
]
[[package]]
name = "regalloc2"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6"
dependencies = [
"hashbrown 0.13.2",
"log",
"rustc-hash 1.1.0",
"slice-group-by",
"smallvec",
]
[[package]]
name = "regex"
version = "1.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata 0.4.4",
"regex-syntax 0.8.2",
]
[[package]]
name = "regex-automata"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
dependencies = [
"regex-syntax 0.6.29",
]
[[package]]
name = "regex-automata"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax 0.8.2",
]
[[package]]
name = "regex-syntax"
version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "reqwest"
version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37"
dependencies = [
"base64 0.22.1",
"bytes",
"encoding_rs",
"futures-core",
"futures-util",
"h2",
"http",
"http-body",
"http-body-util",
"hyper",
"hyper-rustls",
"hyper-util",
"ipnet",
"js-sys",
"log",
"mime",
"once_cell",
"percent-encoding",
"pin-project-lite",
"quinn",
"rustls",
"rustls-native-certs",
"rustls-pemfile",
"rustls-pki-types",
"serde",
"serde_json",
"serde_urlencoded",
"sync_wrapper",
"system-configuration",
"tokio",
"tokio-rustls",
"tower-service",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"winreg",
]
[[package]]
name = "ring"
version = "0.17.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74"
dependencies = [
"cc",
"getrandom",
"libc",
"spin",
"untrusted",
"windows-sys 0.48.0",
]
[[package]]
name = "rmp"
version = "0.8.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20"
dependencies = [
"byteorder",
"num-traits",
"paste",
]
[[package]]
name = "rmp-serde"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a"
dependencies = [
"byteorder",
"rmp",
"serde",
]
[[package]]
name = "rustc-demangle"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc-hash"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
[[package]]
name = "rustix"
version = "0.38.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca"
dependencies = [
"bitflags 2.4.1",
"errno",
"itoa",
"libc",
"linux-raw-sys",
"once_cell",
"windows-sys 0.52.0",
]
[[package]]
name = "rustls"
version = "0.23.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044"
dependencies = [
"log",
"once_cell",
"ring",
"rustls-pki-types",
"rustls-webpki",
"subtle",
"zeroize",
]
[[package]]
name = "rustls-native-certs"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792"
dependencies = [
"openssl-probe",
"rustls-pemfile",
"rustls-pki-types",
"schannel",
"security-framework",
]
[[package]]
name = "rustls-pemfile"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d"
dependencies = [
"base64 0.22.1",
"rustls-pki-types",
]
[[package]]
name = "rustls-pki-types"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
[[package]]
name = "rustls-webpki"
version = "0.102.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e"
dependencies = [
"ring",
"rustls-pki-types",
"untrusted",
]
[[package]]
name = "rustversion"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
[[package]]
name = "ryu"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"
[[package]]
name = "same-file"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
dependencies = [
"winapi-util",
]
[[package]]
name = "scc"
version = "2.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aeb7ac86243095b70a7920639507b71d51a63390d1ba26c4f60a552fbb914a37"
dependencies = [
"sdd",
]
[[package]]
name = "schannel"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "schematic"
version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14bf79931c9c99d9bcdc29a448836dbcea9ad5991285cc83dd4c9f46cf771ac2"
dependencies = [
"garde",
"indexmap 2.4.0",
"miette",
"schematic_macros",
"schematic_types",
"serde",
"serde_json",
"serde_path_to_error",
"starbase_styles",
"thiserror",
"toml 0.8.19",
"tracing",
]
[[package]]
name = "schematic_macros"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea2f037e36d93185ba8e25049754095e4aabb985ed5a8157da369d40be60d9fa"
dependencies = [
"convert_case",
"darling",
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "schematic_types"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ce97b2ad673e2183ec94cce86b039e692ecdf1b3b8a1195c90ad31f8adbbd0d"
dependencies = [
"indexmap 2.4.0",
"semver",
"serde",
"serde_json",
"toml 0.8.19",
"url",
]
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "sdd"
version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0495e4577c672de8254beb68d01a9b62d0e8a13c099edecdbedccce3223cd29f"
[[package]]
name = "security-framework"
version = "2.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"
dependencies = [
"bitflags 1.3.2",
"core-foundation",
"core-foundation-sys",
"libc",
"security-framework-sys",
]
[[package]]
name = "security-framework-sys"
version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "semver"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
dependencies = [
"serde",
]
[[package]]
name = "serde"
version = "1.0.208"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.208"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "serde_json"
version = "1.0.125"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed"
dependencies = [
"indexmap 2.4.0",
"itoa",
"memchr",
"ryu",
"serde",
]
[[package]]
name = "serde_path_to_error"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6"
dependencies = [
"itoa",
"serde",
]
[[package]]
name = "serde_spanned"
version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d"
dependencies = [
"serde",
]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
"itoa",
"ryu",
"serde",
]
[[package]]
name = "sha2"
version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
"cfg-if",
"cpufeatures",
"digest",
]
[[package]]
name = "sharded-slab"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
dependencies = [
"lazy_static",
]
[[package]]
name = "shell-words"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
[[package]]
name = "shellexpand"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4"
dependencies = [
"dirs 4.0.0",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
dependencies = [
"libc",
]
[[package]]
name = "simd-adler32"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
name = "similar"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21"
[[package]]
name = "slab"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
dependencies = [
"autocfg",
]
[[package]]
name = "slice-group-by"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7"
[[package]]
name = "smallvec"
version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "socket2"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
dependencies = [
"libc",
"windows-sys 0.48.0",
]
[[package]]
name = "spin"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "sptr"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a"
[[package]]
name = "stable_deref_trait"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "starbase_archive"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6b412349652a360e5141521688d97c739fbe025e49ada64354550a1193e1edb"
dependencies = [
"binstall-tar",
"flate2",
"miette",
"rustc-hash 2.0.0",
"starbase_styles",
"starbase_utils",
"thiserror",
"tracing",
"xz2",
"zip",
"zstd 0.13.2",
]
[[package]]
name = "starbase_sandbox"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66fc04e95ede168033c1c1825d1cb266c706ca35e955b0e4b337fbf5cc5d5bbc"
dependencies = [
"assert_cmd",
"assert_fs",
"clean-path",
"insta",
"predicates",
"pretty_assertions",
"starbase_utils",
]
[[package]]
name = "starbase_styles"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44854a14e28e3b1d602d802576162380504df73efae50d4b901934d25579524b"
dependencies = [
"dirs 5.0.1",
"owo-colors",
"supports-color",
]
[[package]]
name = "starbase_utils"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f21ce2ab027c71bdee539effc654b529f4016c62f65d9687dcaf08b856232fc"
dependencies = [
"dirs 5.0.1",
"fs4",
"json-strip-comments",
"miette",
"reqwest",
"serde",
"serde_json",
"starbase_styles",
"thiserror",
"tokio",
"toml 0.8.19",
"tracing",
"url",
"wax",
]
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "subtle"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
[[package]]
name = "supports-color"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9829b314621dfc575df4e409e79f9d6a66a3bd707ab73f23cb4aa3a854ac854f"
dependencies = [
"is_ci",
]
[[package]]
name = "syn"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "syn"
version = "2.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "sync_wrapper"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
[[package]]
name = "system-configuration"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
dependencies = [
"bitflags 1.3.2",
"core-foundation",
"system-configuration-sys",
]
[[package]]
name = "system-configuration-sys"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "system-interface"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58"
dependencies = [
"bitflags 2.4.1",
"cap-fs-ext",
"cap-std",
"fd-lock",
"io-lifetimes",
"rustix",
"windows-sys 0.52.0",
"winx",
]
[[package]]
name = "system_env"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce619f78837291fe16f40f216ba2493b66b34e3f8c37201f96cd5833ae95b44f"
dependencies = [
"schematic",
"serde",
"serde_json",
"shell-words",
"thiserror",
]
[[package]]
name = "target-lexicon"
version = "0.12.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae"
[[package]]
name = "tempfile"
version = "3.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa"
dependencies = [
"cfg-if",
"fastrand",
"redox_syscall",
"rustix",
"windows-sys 0.52.0",
]
[[package]]
name = "termtree"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
[[package]]
name = "thiserror"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "thread_local"
version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
dependencies = [
"cfg-if",
"once_cell",
]
[[package]]
name = "tinyvec"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
dependencies = [
"tinyvec_macros",
]
[[package]]
name = "tinyvec_macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.39.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5"
dependencies = [
"backtrace",
"bytes",
"libc",
"mio",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
"tracing",
"windows-sys 0.52.0",
]
[[package]]
name = "tokio-macros"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "tokio-rustls"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
dependencies = [
"rustls",
"rustls-pki-types",
"tokio",
]
[[package]]
name = "tokio-util"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
dependencies = [
"bytes",
"futures-core",
"futures-sink",
"pin-project-lite",
"tokio",
"tracing",
]
[[package]]
name = "toml"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
dependencies = [
"serde",
]
[[package]]
name = "toml"
version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit 0.22.20",
]
[[package]]
name = "toml_datetime"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
dependencies = [
"indexmap 2.4.0",
"toml_datetime",
"winnow 0.5.34",
]
[[package]]
name = "toml_edit"
version = "0.22.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d"
dependencies = [
"indexmap 2.4.0",
"serde",
"serde_spanned",
"toml_datetime",
"winnow 0.6.18",
]
[[package]]
name = "tower"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
dependencies = [
"futures-core",
"futures-util",
"pin-project",
"pin-project-lite",
"tokio",
"tower-layer",
"tower-service",
]
[[package]]
name = "tower-layer"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
[[package]]
name = "tower-service"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
[[package]]
name = "tracing"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
dependencies = [
"log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
]
[[package]]
name = "tracing-attributes"
version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "tracing-core"
version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
dependencies = [
"once_cell",
"valuable",
]
[[package]]
name = "tracing-log"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
dependencies = [
"log",
"once_cell",
"tracing-core",
]
[[package]]
name = "tracing-subscriber"
version = "0.3.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
dependencies = [
"matchers",
"nu-ansi-term",
"once_cell",
"regex",
"sharded-slab",
"smallvec",
"thread_local",
"tracing",
"tracing-core",
"tracing-log",
]
[[package]]
name = "try-lock"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "typenum"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "unicode-bidi"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416"
[[package]]
name = "unicode-ident"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-normalization"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
dependencies = [
"tinyvec",
]
[[package]]
name = "unicode-segmentation"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
[[package]]
name = "unicode-width"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
[[package]]
name = "unicode-xid"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
name = "untrusted"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "ureq"
version = "2.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a"
dependencies = [
"base64 0.22.1",
"flate2",
"log",
"once_cell",
"rustls",
"rustls-native-certs",
"rustls-pki-types",
"url",
"webpki-roots",
]
[[package]]
name = "url"
version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
dependencies = [
"form_urlencoded",
"idna",
"percent-encoding",
"serde",
]
[[package]]
name = "uuid"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
dependencies = [
"getrandom",
]
[[package]]
name = "valuable"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
name = "version_check"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "version_spec"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a8115efd6e9e71ef4f9b71169432fe99b042d435cd80e41314d3d869dab2d33"
dependencies = [
"human-sort",
"regex",
"schematic",
"semver",
"serde",
"thiserror",
]
[[package]]
name = "wait-timeout"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
dependencies = [
"libc",
]
[[package]]
name = "walkdir"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
dependencies = [
"same-file",
"winapi-util",
]
[[package]]
name = "want"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
dependencies = [
"try-lock",
]
[[package]]
name = "warpgate"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fb9948cc8854946cd87aa6a1ee8e99fc4fde22c8f13c9facb0f229abd169185"
dependencies = [
"extism",
"miette",
"once_cell",
"regex",
"reqwest",
"scc",
"schematic",
"serde",
"serde_json",
"sha2",
"starbase_archive",
"starbase_styles",
"starbase_utils",
"system_env",
"thiserror",
"tokio",
"tracing",
"ureq",
"warpgate_api",
]
[[package]]
name = "warpgate_api"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d4fb1a48a03154125e71b7dd3b26887cbc78732d5598859795c6475fdabba6b"
dependencies = [
"anyhow",
"rustc-hash 2.0.0",
"schematic",
"serde",
"serde_json",
"system_env",
"thiserror",
]
[[package]]
name = "warpgate_pdk"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b23ffd7947eb4886375e93104849ec7aec35ff8c4aefeae2d31cab4d0ff46e5"
dependencies = [
"extism-pdk",
"serde",
"warpgate_api",
]
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi-cap-std-sync"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "154528979a211aa28d969846e883df75705809ed9bcc70aba61460683ea7355b"
dependencies = [
"anyhow",
"async-trait",
"cap-fs-ext",
"cap-rand",
"cap-std",
"cap-time-ext",
"fs-set-times",
"io-extras",
"io-lifetimes",
"once_cell",
"rustix",
"system-interface",
"tracing",
"wasi-common",
"windows-sys 0.48.0",
]
[[package]]
name = "wasi-common"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d888b611fee7d273dd057dc009d2dd3132736f36710ffd65657ac83628d1e3b"
dependencies = [
"anyhow",
"bitflags 2.4.1",
"cap-rand",
"cap-std",
"io-extras",
"log",
"rustix",
"thiserror",
"tracing",
"wasmtime",
"wiggle",
"windows-sys 0.48.0",
]
[[package]]
name = "wasm-bindgen"
version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.75",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461"
dependencies = [
"cfg-if",
"js-sys",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"
[[package]]
name = "wasm-encoder"
version = "0.38.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f"
dependencies = [
"leb128",
]
[[package]]
name = "wasm-encoder"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "111495d6204760238512f57a9af162f45086504da332af210f2f75dd80b34f1d"
dependencies = [
"leb128",
]
[[package]]
name = "wasmparser"
version = "0.118.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9"
dependencies = [
"indexmap 2.4.0",
"semver",
]
[[package]]
name = "wasmparser"
version = "0.119.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c35daf77afb4f9b14016625144a391085ec2ca99ca9cc53ed291bb53ab5278d"
dependencies = [
"bitflags 2.4.1",
"indexmap 2.4.0",
"semver",
]
[[package]]
name = "wasmprinter"
version = "0.2.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cac2a7745372074e5573e365e17100f5a26058740576313784ef03fb900ea8d2"
dependencies = [
"anyhow",
"wasmparser 0.119.0",
]
[[package]]
name = "wasmtime"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8e539fded2495422ea3c4dfa7beeddba45904eece182cf315294009e1a323bf"
dependencies = [
"anyhow",
"async-trait",
"bincode",
"bumpalo",
"cfg-if",
"encoding_rs",
"fxprof-processed-profile",
"indexmap 2.4.0",
"libc",
"log",
"object",
"once_cell",
"paste",
"rayon",
"serde",
"serde_derive",
"serde_json",
"target-lexicon",
"wasm-encoder 0.38.1",
"wasmparser 0.118.1",
"wasmtime-cache",
"wasmtime-component-macro",
"wasmtime-component-util",
"wasmtime-cranelift",
"wasmtime-environ",
"wasmtime-fiber",
"wasmtime-jit",
"wasmtime-runtime",
"wasmtime-winch",
"wat",
"windows-sys 0.48.0",
]
[[package]]
name = "wasmtime-asm-macros"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "660ba9143e15a2acd921820df221b73aee256bd3ca2d208d73d8adc9587ccbb9"
dependencies = [
"cfg-if",
]
[[package]]
name = "wasmtime-cache"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3ce373743892002f9391c6741ef0cb0335b55ec899d874f311222b7e36f4594"
dependencies = [
"anyhow",
"base64 0.21.7",
"bincode",
"directories-next",
"log",
"rustix",
"serde",
"serde_derive",
"sha2",
"toml 0.5.11",
"windows-sys 0.48.0",
"zstd 0.11.2+zstd.1.5.2",
]
[[package]]
name = "wasmtime-component-macro"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12ef32643324e564e1c359e9044daa06cbf90d7e2d6c99a738d17a12959f01a5"
dependencies = [
"anyhow",
"proc-macro2",
"quote",
"syn 2.0.75",
"wasmtime-component-util",
"wasmtime-wit-bindgen",
"wit-parser",
]
[[package]]
name = "wasmtime-component-util"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c87d06c18d21a4818f354c00a85f4ebc62b2270961cd022968452b0e4dbed9d"
[[package]]
name = "wasmtime-cranelift"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d648c8b4064a7911093b02237cd5569f71ca171d3a0a486bf80600b19e1cba2"
dependencies = [
"anyhow",
"cfg-if",
"cranelift-codegen",
"cranelift-control",
"cranelift-entity",
"cranelift-frontend",
"cranelift-native",
"cranelift-wasm",
"gimli",
"log",
"object",
"target-lexicon",
"thiserror",
"wasmparser 0.118.1",
"wasmtime-cranelift-shared",
"wasmtime-environ",
"wasmtime-versioned-export-macros",
]
[[package]]
name = "wasmtime-cranelift-shared"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290a89027688782da8ff60b12bb95695494b1874e0d0ba2ba387d23dace6d70c"
dependencies = [
"anyhow",
"cranelift-codegen",
"cranelift-control",
"cranelift-native",
"gimli",
"object",
"target-lexicon",
"wasmtime-environ",
]
[[package]]
name = "wasmtime-environ"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61eb64fb3e0da883e2df4a13a81d6282e072336e6cb6295021d0f7ab2e352754"
dependencies = [
"anyhow",
"cranelift-entity",
"gimli",
"indexmap 2.4.0",
"log",
"object",
"serde",
"serde_derive",
"target-lexicon",
"thiserror",
"wasm-encoder 0.38.1",
"wasmparser 0.118.1",
"wasmprinter",
"wasmtime-component-util",
"wasmtime-types",
]
[[package]]
name = "wasmtime-fiber"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ecf1d3a838b0956b71ad3f8cb80069a228339775bf02dd35d86a5a68bbe443"
dependencies = [
"anyhow",
"cc",
"cfg-if",
"rustix",
"wasmtime-asm-macros",
"wasmtime-versioned-export-macros",
"windows-sys 0.48.0",
]
[[package]]
name = "wasmtime-jit"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f485336add49267d8859e8f8084d2d4b9a4b1564496b6f30ba5b168d50c10ceb"
dependencies = [
"addr2line",
"anyhow",
"bincode",
"cfg-if",
"cpp_demangle",
"gimli",
"ittapi",
"log",
"object",
"rustc-demangle",
"rustix",
"serde",
"serde_derive",
"target-lexicon",
"wasmtime-environ",
"wasmtime-jit-debug",
"wasmtime-jit-icache-coherence",
"wasmtime-runtime",
"windows-sys 0.48.0",
]
[[package]]
name = "wasmtime-jit-debug"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65e119affec40edb2fab9044f188759a00c2df9c3017278d047012a2de1efb4f"
dependencies = [
"object",
"once_cell",
"rustix",
"wasmtime-versioned-export-macros",
]
[[package]]
name = "wasmtime-jit-icache-coherence"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b6d197fcc34ad32ed440e1f9552fd57d1f377d9699d31dee1b5b457322c1f8a"
dependencies = [
"cfg-if",
"libc",
"windows-sys 0.48.0",
]
[[package]]
name = "wasmtime-runtime"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "794b2bb19b99ef8322ff0dd9fe1ba7e19c41036dfb260b3f99ecce128c42ff92"
dependencies = [
"anyhow",
"cc",
"cfg-if",
"encoding_rs",
"indexmap 2.4.0",
"libc",
"log",
"mach",
"memfd",
"memoffset",
"paste",
"psm",
"rustix",
"sptr",
"wasm-encoder 0.38.1",
"wasmtime-asm-macros",
"wasmtime-environ",
"wasmtime-fiber",
"wasmtime-jit-debug",
"wasmtime-versioned-export-macros",
"wasmtime-wmemcheck",
"windows-sys 0.48.0",
]
[[package]]
name = "wasmtime-types"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d995db8bb56f2cd8d2dc0ed5ffab94ffb435283b0fe6747f80f7aab40b2d06a1"
dependencies = [
"cranelift-entity",
"serde",
"serde_derive",
"thiserror",
"wasmparser 0.118.1",
]
[[package]]
name = "wasmtime-versioned-export-macros"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f55c5565959287c21dd0f4277ae3518dd2ae62679f655ee2dbc4396e19d210db"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "wasmtime-wasi"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccd8370078149d49a3a47e93741553fd79b700421464b6a27ca32718192ab130"
dependencies = [
"anyhow",
"async-trait",
"bitflags 2.4.1",
"bytes",
"cap-fs-ext",
"cap-net-ext",
"cap-rand",
"cap-std",
"cap-time-ext",
"fs-set-times",
"futures",
"io-extras",
"io-lifetimes",
"libc",
"log",
"once_cell",
"rustix",
"system-interface",
"thiserror",
"tokio",
"tracing",
"url",
"wasi-cap-std-sync",
"wasi-common",
"wasmtime",
"wiggle",
"windows-sys 0.48.0",
]
[[package]]
name = "wasmtime-winch"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c6f945ff9bad96e0a69973d74f193c19f627c8adbf250e7cb73ae7564b6cc8a"
dependencies = [
"anyhow",
"cranelift-codegen",
"gimli",
"object",
"target-lexicon",
"wasmparser 0.118.1",
"wasmtime-cranelift-shared",
"wasmtime-environ",
"winch-codegen",
]
[[package]]
name = "wasmtime-wit-bindgen"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f328b2d4a690270324756e886ed5be3a4da4c00be0eea48253f4595ad068062b"
dependencies = [
"anyhow",
"heck",
"indexmap 2.4.0",
"wit-parser",
]
[[package]]
name = "wasmtime-wmemcheck"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67761d8f8c0b3c13a5d34356274b10a40baba67fe9cfabbfc379a8b414e45de2"
[[package]]
name = "wast"
version = "35.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68"
dependencies = [
"leb128",
]
[[package]]
name = "wast"
version = "70.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ee4bc54bbe1c6924160b9f75e374a1d07532e7580eb632c0ee6cdd109bb217e"
dependencies = [
"leb128",
"memchr",
"unicode-width",
"wasm-encoder 0.39.0",
]
[[package]]
name = "wat"
version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f0dce8cdc288c717cf01e461a1e451a7b8445d53451123536ba576e423a101a"
dependencies = [
"wast 70.0.0",
]
[[package]]
name = "wax"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d12a78aa0bab22d2f26ed1a96df7ab58e8a93506a3e20adb47c51a93b4e1357"
dependencies = [
"const_format",
"itertools 0.11.0",
"nom",
"pori",
"regex",
"thiserror",
"walkdir",
]
[[package]]
name = "web-sys"
version = "0.3.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "webpki-roots"
version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd"
dependencies = [
"rustls-pki-types",
]
[[package]]
name = "wiggle"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0afb26cd3269289bb314a361ff0a6685e5ce793b62181a9fe3f81ace15051697"
dependencies = [
"anyhow",
"async-trait",
"bitflags 2.4.1",
"thiserror",
"tracing",
"wasmtime",
"wiggle-macro",
]
[[package]]
name = "wiggle-generate"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cef2868fed7584d2b552fa317104858ded80021d23b073b2d682d3c932a027bd"
dependencies = [
"anyhow",
"heck",
"proc-macro2",
"quote",
"shellexpand",
"syn 2.0.75",
"witx",
]
[[package]]
name = "wiggle-macro"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31ae1ec11a17ea481539ee9a5719a278c9790d974060fbf71db4b2c05378780b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
"wiggle-generate",
]
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
dependencies = [
"winapi",
]
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "winch-codegen"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58e58c236a6abdd9ab454552b4f29e16cfa837a86897c1503313b2e62e7609ec"
dependencies = [
"anyhow",
"cranelift-codegen",
"gimli",
"regalloc2",
"smallvec",
"target-lexicon",
"wasmparser 0.118.1",
"wasmtime-environ",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets 0.52.0",
]
[[package]]
name = "windows-sys"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets 0.48.5",
]
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.0",
]
[[package]]
name = "windows-targets"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
"windows_aarch64_gnullvm 0.48.5",
"windows_aarch64_msvc 0.48.5",
"windows_i686_gnu 0.48.5",
"windows_i686_msvc 0.48.5",
"windows_x86_64_gnu 0.48.5",
"windows_x86_64_gnullvm 0.48.5",
"windows_x86_64_msvc 0.48.5",
]
[[package]]
name = "windows-targets"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
dependencies = [
"windows_aarch64_gnullvm 0.52.0",
"windows_aarch64_msvc 0.52.0",
"windows_i686_gnu 0.52.0",
"windows_i686_msvc 0.52.0",
"windows_x86_64_gnu 0.52.0",
"windows_x86_64_gnullvm 0.52.0",
"windows_x86_64_msvc 0.52.0",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
[[package]]
name = "winnow"
version = "0.5.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16"
dependencies = [
"memchr",
]
[[package]]
name = "winnow"
version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f"
dependencies = [
"memchr",
]
[[package]]
name = "winreg"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
dependencies = [
"cfg-if",
"windows-sys 0.48.0",
]
[[package]]
name = "winx"
version = "0.36.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346"
dependencies = [
"bitflags 2.4.1",
"windows-sys 0.52.0",
]
[[package]]
name = "wit-parser"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df4913a2219096373fd6512adead1fb77ecdaa59d7fc517972a7d30b12f625be"
dependencies = [
"anyhow",
"id-arena",
"indexmap 2.4.0",
"log",
"semver",
"serde",
"serde_derive",
"serde_json",
"unicode-xid",
]
[[package]]
name = "witx"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b"
dependencies = [
"anyhow",
"log",
"thiserror",
"wast 35.0.2",
]
[[package]]
name = "xattr"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f"
dependencies = [
"libc",
"linux-raw-sys",
"rustix",
]
[[package]]
name = "xz2"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2"
dependencies = [
"lzma-sys",
]
[[package]]
name = "yansi"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
[[package]]
name = "zerocopy"
version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.75",
]
[[package]]
name = "zeroize"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
[[package]]
name = "zig_tool"
version = "0.6.0"
dependencies = [
"extism-pdk",
"proto_pdk",
"proto_pdk_test_utils",
"serde",
"starbase_sandbox",
"tokio",
]
[[package]]
name = "zip"
version = "2.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e"
dependencies = [
"arbitrary",
"crc32fast",
"crossbeam-utils",
"displaydoc",
"flate2",
"indexmap 2.4.0",
"memchr",
"thiserror",
"zopfli",
]
[[package]]
name = "zopfli"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946"
dependencies = [
"bumpalo",
"crc32fast",
"lockfree-object-pool",
"log",
"once_cell",
"simd-adler32",
]
[[package]]
name = "zstd"
version = "0.11.2+zstd.1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
dependencies = [
"zstd-safe 5.0.2+zstd.1.5.2",
]
[[package]]
name = "zstd"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9"
dependencies = [
"zstd-safe 7.1.0",
]
[[package]]
name = "zstd-safe"
version = "5.0.2+zstd.1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
dependencies = [
"libc",
"zstd-sys",
]
[[package]]
name = "zstd-safe"
version = "7.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "2.0.10+zstd.1.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa"
dependencies = [
"cc",
"pkg-config",
]
|
0 | repos | repos/zig-plugin/README.md | # Zig plugin
[Zig](https://ziglang.org/) WASM plugin for [proto](https://github.com/moonrepo/proto).
## Installation
Add the following to `.prototools`.
```toml
[plugins]
zig = "github://konomae/zig-plugin"
```
## Configuration
Zig plugin does not support configuration.
## Hooks
Zig plugin does not support hooks.
## Contributing
Build the plugin:
```shell
cargo build --target wasm32-wasi
```
Test the plugin by running `proto` commands.
```shell
proto install zig-test
proto list-remote zig-test
```
|
0 | repos | repos/zig-plugin/Cargo.toml | [package]
name = "zig_tool"
version = "0.6.0"
edition = "2021"
license = "MIT"
publish = false
[lib]
crate-type = ['cdylib']
[dependencies]
extism-pdk = "1.2.1"
proto_pdk = "0.23.0"
serde = "1.0.208"
[dev-dependencies]
proto_pdk_test_utils = "0.27.0"
starbase_sandbox = "0.7.2"
tokio = { version = "1.39.3", features = ["full"] }
[features]
default = ["wasm"]
wasm = []
[profile.release]
codegen-units = 1
debug = false
lto = true
opt-level = "s"
panic = "abort"
|
0 | repos/zig-plugin | repos/zig-plugin/tests/download_test.rs | use proto_pdk_test_utils::*;
generate_download_install_tests!("zig-test", "0.11.0");
mod canary {
use super::*;
generate_download_install_tests!("zig-test", "canary");
}
#[tokio::test(flavor = "multi_thread")]
async fn supports_linux_arm64() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::Linux, HostArch::Arm64);
})
.await;
assert_eq!(
plugin
.download_prebuilt(DownloadPrebuiltInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
..Default::default()
})
.await,
DownloadPrebuiltOutput {
archive_prefix: Some("zig-linux-aarch64-0.11.0".into()),
checksum_url: Some(
"https://ziglang.org/download/0.11.0/zig-linux-aarch64-0.11.0.tar.xz.minisig"
.into()
),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into()
),
download_name: Some("zig-linux-aarch64-0.11.0.tar.xz".into()),
download_url: "https://ziglang.org/download/0.11.0/zig-linux-aarch64-0.11.0.tar.xz"
.into(),
..Default::default()
}
);
}
#[tokio::test(flavor = "multi_thread")]
async fn supports_linux_x64() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::Linux, HostArch::X64);
})
.await;
assert_eq!(
plugin
.download_prebuilt(DownloadPrebuiltInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
..Default::default()
})
.await,
DownloadPrebuiltOutput {
archive_prefix: Some("zig-linux-x86_64-0.11.0".into()),
checksum_url: Some(
"https://ziglang.org/download/0.11.0/zig-linux-x86_64-0.11.0.tar.xz.minisig".into()
),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into()
),
download_name: Some("zig-linux-x86_64-0.11.0.tar.xz".into()),
download_url: "https://ziglang.org/download/0.11.0/zig-linux-x86_64-0.11.0.tar.xz"
.into(),
..Default::default()
}
);
}
#[tokio::test(flavor = "multi_thread")]
async fn supports_linux_x86() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::Linux, HostArch::X86);
})
.await;
assert_eq!(
plugin
.download_prebuilt(DownloadPrebuiltInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
..Default::default()
})
.await,
DownloadPrebuiltOutput {
archive_prefix: Some("zig-linux-x86-0.11.0".into()),
checksum_url: Some(
"https://ziglang.org/download/0.11.0/zig-linux-x86-0.11.0.tar.xz.minisig".into()
),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into()
),
download_name: Some("zig-linux-x86-0.11.0.tar.xz".into()),
download_url: "https://ziglang.org/download/0.11.0/zig-linux-x86-0.11.0.tar.xz".into(),
..Default::default()
}
);
}
#[tokio::test(flavor = "multi_thread")]
async fn supports_macos_arm64() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::MacOS, HostArch::Arm64);
})
.await;
assert_eq!(
plugin
.download_prebuilt(DownloadPrebuiltInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
..Default::default()
})
.await,
DownloadPrebuiltOutput {
archive_prefix: Some("zig-macos-aarch64-0.11.0".into()),
checksum_url: Some(
"https://ziglang.org/download/0.11.0/zig-macos-aarch64-0.11.0.tar.xz.minisig"
.into()
),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into()
),
download_name: Some("zig-macos-aarch64-0.11.0.tar.xz".into()),
download_url: "https://ziglang.org/download/0.11.0/zig-macos-aarch64-0.11.0.tar.xz"
.into(),
..Default::default()
}
);
}
#[tokio::test(flavor = "multi_thread")]
async fn supports_macos_x64() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::MacOS, HostArch::X64);
})
.await;
assert_eq!(
plugin
.download_prebuilt(DownloadPrebuiltInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
..Default::default()
})
.await,
DownloadPrebuiltOutput {
archive_prefix: Some("zig-macos-x86_64-0.11.0".into()),
checksum_url: Some(
"https://ziglang.org/download/0.11.0/zig-macos-x86_64-0.11.0.tar.xz.minisig".into()
),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into()
),
download_name: Some("zig-macos-x86_64-0.11.0.tar.xz".into()),
download_url: "https://ziglang.org/download/0.11.0/zig-macos-x86_64-0.11.0.tar.xz"
.into(),
..Default::default()
}
);
}
#[tokio::test(flavor = "multi_thread")]
async fn supports_windows_arm64() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::Windows, HostArch::Arm64);
})
.await;
assert_eq!(
plugin
.download_prebuilt(DownloadPrebuiltInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
..Default::default()
})
.await,
DownloadPrebuiltOutput {
archive_prefix: Some("zig-windows-aarch64-0.11.0".into()),
checksum_url: Some(
"https://ziglang.org/download/0.11.0/zig-windows-aarch64-0.11.0.zip.minisig".into()
),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into()
),
download_name: Some("zig-windows-aarch64-0.11.0.zip".into()),
download_url: "https://ziglang.org/download/0.11.0/zig-windows-aarch64-0.11.0.zip"
.into(),
..Default::default()
}
);
}
#[tokio::test(flavor = "multi_thread")]
async fn supports_windows_x64() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::Windows, HostArch::X64);
})
.await;
assert_eq!(
plugin
.download_prebuilt(DownloadPrebuiltInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
..Default::default()
})
.await,
DownloadPrebuiltOutput {
archive_prefix: Some("zig-windows-x86_64-0.11.0".into()),
checksum_url: Some(
"https://ziglang.org/download/0.11.0/zig-windows-x86_64-0.11.0.zip.minisig".into()
),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into()
),
download_name: Some("zig-windows-x86_64-0.11.0.zip".into()),
download_url: "https://ziglang.org/download/0.11.0/zig-windows-x86_64-0.11.0.zip"
.into(),
..Default::default()
}
);
}
#[tokio::test(flavor = "multi_thread")]
async fn supports_windows_x86() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::Windows, HostArch::X86);
})
.await;
assert_eq!(
plugin
.download_prebuilt(DownloadPrebuiltInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
..Default::default()
})
.await,
DownloadPrebuiltOutput {
archive_prefix: Some("zig-windows-x86-0.11.0".into()),
checksum_url: Some(
"https://ziglang.org/download/0.11.0/zig-windows-x86-0.11.0.zip.minisig".into()
),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into()
),
download_name: Some("zig-windows-x86-0.11.0.zip".into()),
download_url: "https://ziglang.org/download/0.11.0/zig-windows-x86-0.11.0.zip".into(),
..Default::default()
}
);
}
#[tokio::test(flavor = "multi_thread")]
async fn locates_unix_bin() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::Linux, HostArch::Arm64);
})
.await;
assert_eq!(
plugin
.locate_executables(LocateExecutablesInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
})
.await
.primary
.unwrap()
.exe_path,
Some("zig".into())
);
}
#[tokio::test(flavor = "multi_thread")]
async fn locates_windows_bin() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox
.create_plugin_with_config("zig-test", |config| {
config.host(HostOS::Windows, HostArch::X64);
})
.await;
assert_eq!(
plugin
.locate_executables(LocateExecutablesInput {
context: ToolContext {
version: VersionSpec::parse("0.11.0").unwrap(),
..Default::default()
},
})
.await
.primary
.unwrap()
.exe_path,
Some("zig.exe".into())
);
}
|
0 | repos/zig-plugin | repos/zig-plugin/tests/metadata_test.rs | use proto_pdk_test_utils::*;
#[tokio::test(flavor = "multi_thread")]
async fn registers_metadata() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox.create_plugin("zig-test").await;
let metadata = plugin.register_tool(ToolMetadataInput::default()).await;
assert_eq!(metadata.name, "Zig");
assert_eq!(metadata.plugin_version.unwrap(), env!("CARGO_PKG_VERSION"));
}
|
0 | repos/zig-plugin | repos/zig-plugin/tests/versions_test.rs | use proto_pdk_test_utils::*;
generate_resolve_versions_tests!("zig-test", {
"0.10" => "0.10.1",
"0.11.0" => "0.11.0",
"0" => "0.13.0",
});
#[tokio::test(flavor = "multi_thread")]
async fn loads_versions_from_dist_url() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox.create_plugin("zig-test").await;
let output = plugin.load_versions(LoadVersionsInput::default()).await;
assert!(!output.versions.is_empty());
}
#[tokio::test(flavor = "multi_thread")]
async fn sets_latest_alias() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox.create_plugin("zig-test").await;
let output = plugin.load_versions(LoadVersionsInput::default()).await;
assert!(output.latest.is_some());
assert!(output.aliases.contains_key("latest"));
assert_eq!(output.aliases.get("latest"), output.latest.as_ref());
}
#[tokio::test(flavor = "multi_thread")]
async fn sets_master_alias() {
let sandbox = create_empty_proto_sandbox();
let plugin = sandbox.create_plugin("zig-test").await;
let output = plugin.load_versions(LoadVersionsInput::default()).await;
assert!(output.aliases.contains_key("latest"));
assert!(!output
.aliases
.get("master")
.unwrap()
.to_resolved_spec()
.as_version()
.unwrap()
.build
.is_empty());
}
|
0 | repos/zig-plugin | repos/zig-plugin/src/proto.rs | use crate::zig_dist::ZigDist;
use extism_pdk::*;
use proto_pdk::*;
static NAME: &str = "Zig";
static BIN: &str = "zig";
#[plugin_fn]
pub fn register_tool(Json(_): Json<ToolMetadataInput>) -> FnResult<Json<ToolMetadataOutput>> {
Ok(Json(ToolMetadataOutput {
name: NAME.into(),
type_of: PluginType::Language,
plugin_version: Some(env!("CARGO_PKG_VERSION").into()),
..ToolMetadataOutput::default()
}))
}
#[plugin_fn]
pub fn download_prebuilt(
Json(input): Json<DownloadPrebuiltInput>,
) -> FnResult<Json<DownloadPrebuiltOutput>> {
let env = get_host_environment()?;
check_supported_os_and_arch(
NAME,
&env,
permutations![
HostOS::Linux => [HostArch::X86, HostArch::X64, HostArch::Arm64],
HostOS::MacOS => [HostArch::X64, HostArch::Arm64],
HostOS::Windows => [HostArch::X86, HostArch::X64, HostArch::Arm64],
],
)?;
let mut version = input.context.version;
if version.is_canary() {
let response: ZigDist = fetch_json("https://ziglang.org/download/index.json")?;
version = VersionSpec::parse(response.master.version)?;
}
let arch = match env.arch {
HostArch::X86 => "x86",
HostArch::X64 => "x86_64",
HostArch::Arm64 => "aarch64",
_ => unreachable!(),
};
let os = env.os;
let prefix = match os {
HostOS::Linux => format!("zig-linux-{arch}-{version}"),
HostOS::MacOS => format!("zig-macos-{arch}-{version}"),
HostOS::Windows => format!("zig-windows-{arch}-{version}"),
_ => unreachable!(),
};
let filename = if os == HostOS::Windows {
format!("{prefix}.zip")
} else {
format!("{prefix}.tar.xz")
};
let directory = match &version {
VersionSpec::Semantic(v) if !v.build.is_empty() => "builds".to_string(),
_ => format!("download/{version}"),
};
Ok(Json(DownloadPrebuiltOutput {
archive_prefix: Some(prefix),
checksum_url: Some(format!(
"https://ziglang.org/{directory}/{filename}.minisig"
)),
checksum_public_key: Some(
"RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U".into(),
),
download_url: format!("https://ziglang.org/{directory}/{filename}"),
download_name: Some(filename),
..DownloadPrebuiltOutput::default()
}))
}
#[plugin_fn]
pub fn locate_executables(
Json(_): Json<LocateExecutablesInput>,
) -> FnResult<Json<LocateExecutablesOutput>> {
let env = get_host_environment()?;
Ok(Json(LocateExecutablesOutput {
primary: Some(ExecutableConfig::new(env.os.get_file_name(BIN, "exe"))),
..LocateExecutablesOutput::default()
}))
}
#[plugin_fn]
pub fn load_versions(Json(_): Json<LoadVersionsInput>) -> FnResult<Json<LoadVersionsOutput>> {
let response: ZigDist = fetch_json("https://ziglang.org/download/index.json")?;
let mut versions: Vec<String> = response.versions.keys().map(|t| t.to_owned()).collect();
versions.push(response.master.version.clone());
let mut output = LoadVersionsOutput::from(versions)?;
output.aliases.insert(
"master".into(),
UnresolvedVersionSpec::parse(&response.master.version)?,
);
Ok(Json(output))
}
|
0 | repos/zig-plugin | repos/zig-plugin/src/zig_dist.rs | use serde::Deserialize;
use std::collections::HashMap;
#[derive(Deserialize)]
pub struct ZigDist {
pub master: Master,
#[serde(flatten)]
pub versions: HashMap<String, Empty>,
}
#[derive(Deserialize)]
pub struct Master {
pub version: String,
}
#[derive(Deserialize)]
pub struct Empty {}
|
0 | repos/zig-plugin | repos/zig-plugin/src/lib.rs | #[cfg(feature = "wasm")]
mod proto;
mod zig_dist;
#[cfg(feature = "wasm")]
pub use proto::*;
|
0 | repos | repos/zig-raytrace/raytrace.zig | // Based on https://github.com/ssloy/tinyraytracer.
const std = @import("std");
const jpeg = @import("jpeg_writer.zig");
const multi_threaded = true;
const width = 1024;
const height = 768;
const fov: f32 = std.math.pi / 3.0;
const out_filename = "out.jpg";
const out_quality = 100;
fn vec3(x: f32, y: f32, z: f32) Vec3f {
return Vec3f{ .x = x, .y = y, .z = z };
}
const Vec3f = Vec3(f32);
fn Vec3(comptime T: type) type {
return struct {
const Self = @This();
x: T,
y: T,
z: T,
fn mul(u: Self, v: Self) T {
return u.x * v.x + u.y * v.y + u.z * v.z;
}
fn mulScalar(u: Self, k: T) Self {
return vec3(u.x * k, u.y * k, u.z * k);
}
fn add(u: Self, v: Self) Self {
return vec3(u.x + v.x, u.y + v.y, u.z + v.z);
}
fn sub(u: Self, v: Self) Self {
return vec3(u.x - v.x, u.y - v.y, u.z - v.z);
}
fn negate(u: Self) Self {
return vec3(-u.x, -u.y, -u.z);
}
fn norm(u: Self) T {
return std.math.sqrt(u.x * u.x + u.y * u.y + u.z * u.z);
}
fn normalize(u: Self) Self {
return u.mulScalar(1 / u.norm());
}
fn cross(u: Vec3f, v: Vec3f) Vec3f {
return vec3(
u.y * v.z - u.z * v.y,
u.z * v.x - u.x * v.z,
u.x * v.y - u.y * v.x,
);
}
};
}
const Light = struct {
position: Vec3f,
intensity: f32,
};
const Material = struct {
refractive_index: f32,
albedo: [4]f32,
diffuse_color: Vec3f,
specular_exponent: f32,
pub fn default() Material {
return Material{
.refractive_index = 1,
.albedo = [_]f32{ 1, 0, 0, 0 },
.diffuse_color = vec3(0, 0, 0),
.specular_exponent = 0,
};
}
};
const Sphere = struct {
center: Vec3f,
radius: f32,
material: Material,
fn rayIntersect(self: Sphere, origin: Vec3f, direction: Vec3f, t0: *f32) bool {
const l = self.center.sub(origin);
const tca = l.mul(direction);
const d2 = l.mul(l) - tca * tca;
if (d2 > self.radius * self.radius) {
return false;
}
const thc = std.math.sqrt(self.radius * self.radius - d2);
t0.* = tca - thc;
const t1 = tca + thc;
if (t0.* < 0) t0.* = t1;
return t0.* >= 0;
}
};
fn reflect(i: Vec3f, normal: Vec3f) Vec3f {
return i.sub(normal.mulScalar(2).mulScalar(i.mul(normal)));
}
fn refract(i: Vec3f, normal: Vec3f, refractive_index: f32) Vec3f {
var cosi = -std.math.max(-1, std.math.min(1, i.mul(normal)));
var etai: f32 = 1;
var etat = refractive_index;
var n = normal;
if (cosi < 0) {
cosi = -cosi;
std.mem.swap(f32, &etai, &etat);
n = normal.negate();
}
const eta = etai / etat;
const k = 1 - eta * eta * (1 - cosi * cosi);
return if (k < 0) vec3(0, 0, 0) else i.mulScalar(eta).add(n.mulScalar(eta * cosi - std.math.sqrt(k)));
}
fn sceneIntersect(origin: Vec3f, direction: Vec3f, spheres: []const Sphere, hit: *Vec3f, normal: *Vec3f, material: *Material) bool {
var spheres_dist: f32 = std.math.f32_max;
for (spheres) |s| {
var dist_i: f32 = undefined;
if (s.rayIntersect(origin, direction, &dist_i) and dist_i < spheres_dist) {
spheres_dist = dist_i;
hit.* = origin.add(direction.mulScalar(dist_i));
normal.* = hit.sub(s.center).normalize();
material.* = s.material;
}
}
// Floor plane
var checkerboard_dist: f32 = std.math.f32_max;
if (std.math.fabs(direction.y) > 1e-3) {
const d = -(origin.y + 4) / direction.y;
const pt = origin.add(direction.mulScalar(d));
if (d > 0 and std.math.fabs(pt.x) < 10 and pt.z < -10 and pt.z > -30 and d < spheres_dist) {
checkerboard_dist = d;
hit.* = pt;
normal.* = vec3(0, 1, 0);
const diffuse = @floatToInt(i32, 0.5 * hit.x + 1000) + @floatToInt(i32, 0.5 * hit.z);
const diffuse_color = if (@mod(diffuse, 2) == 1) vec3(1, 1, 1) else vec3(1, 0.7, 0.3);
material.diffuse_color = diffuse_color.mulScalar(0.3);
}
}
return std.math.min(spheres_dist, checkerboard_dist) < 1000;
}
fn castRay(origin: Vec3f, direction: Vec3f, spheres: []const Sphere, lights: []const Light, depth: i32) Vec3f {
var point: Vec3f = undefined;
var normal: Vec3f = undefined;
var material = Material.default();
if (depth > 4 or !sceneIntersect(origin, direction, spheres, &point, &normal, &material)) {
return vec3(0.2, 0.7, 0.8); // Background color
}
const reflect_dir = reflect(direction, normal).normalize();
const refract_dir = refract(direction, normal, material.refractive_index).normalize();
const nn = normal.mulScalar(1e-3);
const reflect_origin = if (reflect_dir.mul(normal) < 0) point.sub(nn) else point.add(nn);
const refract_origin = if (refract_dir.mul(normal) < 0) point.sub(nn) else point.add(nn);
const reflect_color = castRay(reflect_origin, reflect_dir, spheres, lights, depth + 1);
const refract_color = castRay(refract_origin, refract_dir, spheres, lights, depth + 1);
var diffuse_light_intensity: f32 = 0;
var specular_light_intensity: f32 = 0;
for (lights) |l| {
const light_dir = l.position.sub(point).normalize();
const light_distance = l.position.sub(point).norm();
const shadow_origin = if (light_dir.mul(normal) < 0) point.sub(nn) else point.add(nn);
var shadow_pt: Vec3f = undefined;
var shadow_n: Vec3f = undefined;
var _unused: Material = undefined;
if (sceneIntersect(shadow_origin, light_dir, spheres, &shadow_pt, &shadow_n, &_unused) and shadow_pt.sub(shadow_origin).norm() < light_distance) {
continue;
}
diffuse_light_intensity += l.intensity * std.math.max(0, light_dir.mul(normal));
specular_light_intensity += std.math.pow(f32, std.math.max(0, -reflect(light_dir.negate(), normal).mul(direction)), material.specular_exponent) * l.intensity;
}
const p1 = material.diffuse_color.mulScalar(diffuse_light_intensity * material.albedo[0]);
const p2 = vec3(1, 1, 1).mulScalar(specular_light_intensity).mulScalar(material.albedo[1]);
const p3 = reflect_color.mulScalar(material.albedo[2]);
const p4 = refract_color.mulScalar(material.albedo[3]);
return p1.add(p2.add(p3.add(p4)));
}
const RenderContext = struct {
pixmap: []u8,
start: usize,
end: usize,
spheres: []const Sphere,
lights: []const Light,
};
fn renderFramebufferSegment(context: RenderContext) void {
var j: usize = context.start;
while (j < context.end) : (j += 1) {
var i: usize = 0;
while (i < width) : (i += 1) {
const x = (2 * (@intToFloat(f32, i) + 0.5) / width - 1) * std.math.tan(fov / 2.0) * width / height;
const y = -(2 * (@intToFloat(f32, j) + 0.5) / height - 1) * std.math.tan(fov / 2.0);
const direction = vec3(x, y, -1).normalize();
var c = castRay(vec3(0, 0, 0), direction, context.spheres, context.lights, 0);
var max = std.math.max(c.x, std.math.max(c.y, c.z));
if (max > 1) c = c.mulScalar(1 / max);
const T = @typeInfo(Vec3f).Struct;
inline for (T.fields) |field, k| {
const pixel = @floatToInt(u8, 255 * std.math.max(0, std.math.min(1, @field(c, field.name))));
context.pixmap[3 * (i + j * width) + k] = pixel;
}
}
}
}
fn renderMulti(allocator: *std.mem.Allocator, spheres: []const Sphere, lights: []const Light) !void {
var pixmap = std.ArrayList(u8).init(allocator);
defer pixmap.deinit();
try pixmap.resize(3 * width * height);
const cpu_count = try std.Thread.cpuCount();
const batch_size = height / cpu_count;
var threads = std.ArrayList(*std.Thread).init(allocator);
defer threads.deinit();
var j: usize = 0;
while (j < height) : (j += batch_size) {
const context = RenderContext{
.pixmap = pixmap.toSlice(),
.start = j,
.end = j + batch_size,
.spheres = spheres,
.lights = lights,
};
try threads.append(try std.Thread.spawn(context, renderFramebufferSegment));
}
for (threads.toSliceConst()) |thread| {
thread.wait();
}
try jpeg.writeToFile(out_filename, width, height, 3, pixmap.toSliceConst(), out_quality);
}
fn render(allocator: *std.mem.Allocator, spheres: []const Sphere, lights: []const Light) !void {
var pixmap = std.ArrayList(u8).init(allocator);
defer pixmap.deinit();
try pixmap.resize(3 * width * height);
var j: usize = 0;
while (j < height) : (j += 1) {
var i: usize = 0;
while (i < width) : (i += 1) {
const x = (2 * (@intToFloat(f32, i) + 0.5) / width - 1) * std.math.tan(fov / 2.0) * width / height;
const y = -(2 * (@intToFloat(f32, j) + 0.5) / height - 1) * std.math.tan(fov / 2.0);
const direction = vec3(x, y, -1).normalize();
var c = castRay(vec3(0, 0, 0), direction, spheres, lights, 0);
var max = std.math.max(c.x, std.math.max(c.y, c.z));
if (max > 1) c = c.mulScalar(1 / max);
const T = @typeInfo(Vec3f).Struct;
inline for (T.fields) |field, k| {
const pixel = @floatToInt(u8, 255 * std.math.max(0, std.math.min(1, @field(c, field.name))));
pixmap.set(3 * (i + j * width) + k, pixel);
}
}
}
try jpeg.writeToFile(out_filename, width, height, 3, pixmap.toSliceConst(), out_quality);
}
pub fn main() !void {
const ivory = Material{
.refractive_index = 1.0,
.albedo = [_]f32{ 0.6, 0.3, 0.1, 0.0 },
.diffuse_color = vec3(0.4, 0.4, 0.3),
.specular_exponent = 50,
};
const glass = Material{
.refractive_index = 1.5,
.albedo = [_]f32{ 0.0, 0.5, 0.1, 0.8 },
.diffuse_color = vec3(0.6, 0.7, 0.8),
.specular_exponent = 125,
};
const red_rubber = Material{
.refractive_index = 1.0,
.albedo = [_]f32{ 0.9, 0.1, 0.0, 0.0 },
.diffuse_color = vec3(0.3, 0.1, 0.1),
.specular_exponent = 10,
};
const mirror = Material{
.refractive_index = 1.0,
.albedo = [_]f32{ 0.0, 10.0, 0.8, 0.0 },
.diffuse_color = vec3(1.0, 1.0, 1.0),
.specular_exponent = 1425,
};
const spheres = [_]Sphere{
Sphere{
.center = vec3(-3, 0, -16),
.radius = 1.3,
.material = ivory,
},
Sphere{
.center = vec3(3, -1.5, -12),
.radius = 2,
.material = glass,
},
Sphere{
.center = vec3(1.5, -0.5, -18),
.radius = 3,
.material = red_rubber,
},
Sphere{
.center = vec3(9, 5, -18),
.radius = 3.7,
.material = mirror,
},
};
const lights = [_]Light{
Light{
.position = vec3(-10, 23, 20),
.intensity = 1.1,
},
Light{
.position = vec3(17, 50, -25),
.intensity = 1.8,
},
Light{
.position = vec3(30, 20, 30),
.intensity = 1.7,
},
};
var direct = std.heap.DirectAllocator.init();
if (multi_threaded) {
try renderMulti(&direct.allocator, spheres, lights);
} else {
try render(&direct.allocator, spheres, lights);
}
}
|
0 | repos | repos/zig-raytrace/jpeg_writer.zig | // Based on stb_image_write.h
//
// https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h
const std = @import("std");
const flip_vertically_on_write = false;
// Expects a writer which implements std.io.OutStream.
pub fn writeToStream(writer: var, w: usize, h: usize, comp: usize, data: []const u8, quality: i32) !void {
try writeToStreamCore(writer, w, h, comp, data, quality);
}
pub fn writeToFile(filename: []const u8, w: usize, h: usize, comp: usize, data: []const u8, quality: i32) !void {
var file = try std.fs.File.openWrite(filename);
defer file.close();
var file_stream = file.outStream();
var buffered_writer = std.io.BufferedOutStream(std.fs.File.WriteError).init(&file_stream.stream);
try writeToStream(&buffered_writer.stream, w, h, comp, data, quality);
try buffered_writer.flush();
}
const zig_zag_table = [_]u8{
0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18,
24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56,
59, 61, 35, 36, 48, 49, 57, 58, 62, 63,
};
fn writeBits(writer: var, bitBufP: *u32, bitCntP: *u32, bs: [2]u16) !void {
var bitBuf = bitBufP.*;
var bitCnt = bitCntP.*;
bitCnt += bs[1];
bitBuf |= std.math.shl(u32, bs[0], 24 - bitCnt);
while (bitCnt >= 8) : ({
bitBuf <<= 8;
bitCnt -= 8;
}) {
const c = @truncate(u8, bitBuf >> 16);
try writer.write(([_]u8{c})[0..]);
if (c == 255) {
try writer.write(([_]u8{0})[0..]);
}
}
bitBufP.* = bitBuf;
bitCntP.* = bitCnt;
}
fn computeDCT(
d0p: *f32,
d1p: *f32,
d2p: *f32,
d3p: *f32,
d4p: *f32,
d5p: *f32,
d6p: *f32,
d7p: *f32,
) void {
var d0 = d0p.*;
var d1 = d1p.*;
var d2 = d2p.*;
var d3 = d3p.*;
var d4 = d4p.*;
var d5 = d5p.*;
var d6 = d6p.*;
var d7 = d7p.*;
const tmp0 = d0 + d7;
const tmp7 = d0 - d7;
const tmp1 = d1 + d6;
const tmp6 = d1 - d6;
const tmp2 = d2 + d5;
const tmp5 = d2 - d5;
const tmp3 = d3 + d4;
const tmp4 = d3 - d4;
// Even part
var tmp10 = tmp0 + tmp3; // phase 2
var tmp13 = tmp0 - tmp3;
var tmp11 = tmp1 + tmp2;
var tmp12 = tmp1 - tmp2;
d0 = tmp10 + tmp11; // phase 3
d4 = tmp10 - tmp11;
const z1 = (tmp12 + tmp13) * 0.707106781; // c4
d2 = tmp13 + z1; // phase 5
d6 = tmp13 - z1;
// Odd part
tmp10 = tmp4 + tmp5; // phase 2
tmp11 = tmp5 + tmp6;
tmp12 = tmp6 + tmp7;
// The rotator is modified from fig 4-8 to avoid extra negations.
const z5 = (tmp10 - tmp12) * 0.382683433; // c6
const z2 = tmp10 * 0.541196100 + z5; // c2-c6
const z4 = tmp12 * 1.306562965 + z5; // c2+c6
const z3 = tmp11 * 0.707106781; // c4
const z11 = tmp7 + z3; // phase 5
const z13 = tmp7 - z3;
d5p.* = z13 + z2; // phase 6
d3p.* = z13 - z2;
d1p.* = z11 + z4;
d7p.* = z11 - z4;
d0p.* = d0;
d2p.* = d2;
d4p.* = d4;
d6p.* = d6;
}
fn calcBits(_val: i32, bits: []u16) void {
std.debug.assert(bits.len == 2);
var val = _val;
var tmp1 = if (val < 0) -val else val;
val = if (val < 0) val - 1 else val;
bits[1] = 1;
while (true) {
tmp1 >>= 1;
if (tmp1 == 0) break;
bits[1] += 1;
}
bits[0] = @truncate(u16, @bitCast(u32, val) & (std.math.shl(c_uint, 1, bits[1]) - 1));
}
fn processDU(writer: var, bitBuf: *u32, bitCnt: *u32, CDU: []f32, fdtbl: []f32, DC: i32, HTDC: [256][2]u16, HTAC: [256][2]u16) !i32 {
std.debug.assert(CDU.len == 64);
std.debug.assert(fdtbl.len == 64);
const EOB = [_]u16{ HTAC[0x00][0], HTAC[0x00][1] };
const M16zeroes = [_]u16{ HTAC[0xF0][0], HTAC[0xF0][1] };
var DU: [64]i32 = undefined;
// DCT rows
{
var i: usize = 0;
while (i < 64) : (i += 8) {
computeDCT(&CDU[i], &CDU[i + 1], &CDU[i + 2], &CDU[i + 3], &CDU[i + 4], &CDU[i + 5], &CDU[i + 6], &CDU[i + 7]);
}
}
// DCT columns
{
var i: usize = 0;
while (i < 8) : (i += 1) {
computeDCT(&CDU[i], &CDU[i + 8], &CDU[i + 16], &CDU[i + 24], &CDU[i + 32], &CDU[i + 40], &CDU[i + 48], &CDU[i + 56]);
}
}
// Quantize/descale/zigzag the coefficients
{
var i: usize = 0;
while (i < 64) : (i += 1) {
const v = CDU[i] * fdtbl[i];
// DU[zig_zag_table[i]] = (int)(v < 0 ? ceilf(v - 0.5f) : floorf(v + 0.5f));
// ceilf() and floorf() are C99, not C89, but I /think/ they're not needed here anyway?
DU[zig_zag_table[i]] = @floatToInt(i32, if (v < 0) v - 0.5 else v + 0.5);
}
}
// Encode DC
const diff = DU[0] - DC;
if (diff == 0) {
try writeBits(writer, bitBuf, bitCnt, HTDC[0]);
} else {
var bits: [2]u16 = undefined;
calcBits(diff, bits[0..]);
try writeBits(writer, bitBuf, bitCnt, HTDC[bits[1]]);
try writeBits(writer, bitBuf, bitCnt, bits);
}
// Encode ACs
var end0pos: usize = 63;
while (end0pos > 0 and DU[end0pos] == 0) {
end0pos -= 1;
}
// end0pos = first element in reverse order !=0
if (end0pos == 0) {
try writeBits(writer, bitBuf, bitCnt, EOB);
return DU[0];
}
var i: usize = 1;
while (i <= end0pos) : (i += 1) {
const startpos = i;
var bits: [2]u16 = undefined;
while (DU[i] == 0 and i <= end0pos) {
i += 1;
}
var nrzeroes = i - startpos;
if (nrzeroes >= 16) {
const lng = nrzeroes >> 4;
var nrmarker: usize = 1;
while (nrmarker <= lng) : (nrmarker += 1) {
try writeBits(writer, bitBuf, bitCnt, M16zeroes);
}
nrzeroes &= 15;
}
calcBits(DU[i], bits[0..]);
try writeBits(writer, bitBuf, bitCnt, HTAC[(nrzeroes << 4) + bits[1]]);
try writeBits(writer, bitBuf, bitCnt, bits);
}
if (end0pos != 63) {
try writeBits(writer, bitBuf, bitCnt, EOB);
}
return DU[0];
}
const std_dc_luminance_nrcodes = [_]u8{ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
const std_dc_luminance_values = [_]u8{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
const std_ac_luminance_nrcodes = [_]u8{ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
const std_ac_luminance_values = [_]u8{
0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa,
};
const std_dc_chrominance_nrcodes = [_]u8{ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
const std_dc_chrominance_values = [_]u8{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
const std_ac_chrominance_nrcodes = [_]u8{ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
const std_ac_chrominance_values = [_]u8{
0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa,
};
// Huffman tables
const YDC_HT = [_][2]u16{
[_]u16{ 0, 2 }, [_]u16{ 2, 3 }, [_]u16{ 3, 3 }, [_]u16{ 4, 3 }, [_]u16{ 5, 3 }, [_]u16{ 6, 3 },
[_]u16{ 14, 4 }, [_]u16{ 30, 5 }, [_]u16{ 62, 6 }, [_]u16{ 126, 7 }, [_]u16{ 254, 8 }, [_]u16{ 510, 9 },
} ++ ([_][2]u16{[_]u16{ 0, 0 }}) ** 244;
const UVDC_HT = [12][2]u16{
[_]u16{ 0, 2 }, [_]u16{ 1, 2 }, [_]u16{ 2, 2 }, [_]u16{ 6, 3 }, [_]u16{ 14, 4 }, [_]u16{ 30, 5 },
[_]u16{ 62, 6 }, [_]u16{ 126, 7 }, [_]u16{ 254, 8 }, [_]u16{ 510, 9 }, [_]u16{ 1022, 10 }, [_]u16{ 2046, 11 },
} ++ ([_][2]u16{[_]u16{ 0, 0 }}) ** 244;
const YAC_HT = [256][2]u16{
[_]u16{ 10, 4 }, [_]u16{ 0, 2 }, [_]u16{ 1, 2 }, [_]u16{ 4, 3 },
[_]u16{ 11, 4 }, [_]u16{ 26, 5 }, [_]u16{ 120, 7 }, [_]u16{ 248, 8 },
[_]u16{ 1014, 10 }, [_]u16{ 65410, 16 }, [_]u16{ 65411, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 12, 4 }, [_]u16{ 27, 5 }, [_]u16{ 121, 7 },
[_]u16{ 502, 9 }, [_]u16{ 2038, 11 }, [_]u16{ 65412, 16 }, [_]u16{ 65413, 16 },
[_]u16{ 65414, 16 }, [_]u16{ 65415, 16 }, [_]u16{ 65416, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 28, 5 }, [_]u16{ 249, 8 }, [_]u16{ 1015, 10 },
[_]u16{ 4084, 12 }, [_]u16{ 65417, 16 }, [_]u16{ 65418, 16 }, [_]u16{ 65419, 16 },
[_]u16{ 65420, 16 }, [_]u16{ 65421, 16 }, [_]u16{ 65422, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 58, 6 }, [_]u16{ 503, 9 }, [_]u16{ 4085, 12 },
[_]u16{ 65423, 16 }, [_]u16{ 65424, 16 }, [_]u16{ 65425, 16 }, [_]u16{ 65426, 16 },
[_]u16{ 65427, 16 }, [_]u16{ 65428, 16 }, [_]u16{ 65429, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 59, 6 }, [_]u16{ 1016, 10 }, [_]u16{ 65430, 16 },
[_]u16{ 65431, 16 }, [_]u16{ 65432, 16 }, [_]u16{ 65433, 16 }, [_]u16{ 65434, 16 },
[_]u16{ 65435, 16 }, [_]u16{ 65436, 16 }, [_]u16{ 65437, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 122, 7 }, [_]u16{ 2039, 11 }, [_]u16{ 65438, 16 },
[_]u16{ 65439, 16 }, [_]u16{ 65440, 16 }, [_]u16{ 65441, 16 }, [_]u16{ 65442, 16 },
[_]u16{ 65443, 16 }, [_]u16{ 65444, 16 }, [_]u16{ 65445, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 123, 7 }, [_]u16{ 4086, 12 }, [_]u16{ 65446, 16 },
[_]u16{ 65447, 16 }, [_]u16{ 65448, 16 }, [_]u16{ 65449, 16 }, [_]u16{ 65450, 16 },
[_]u16{ 65451, 16 }, [_]u16{ 65452, 16 }, [_]u16{ 65453, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 250, 8 }, [_]u16{ 4087, 12 }, [_]u16{ 65454, 16 },
[_]u16{ 65455, 16 }, [_]u16{ 65456, 16 }, [_]u16{ 65457, 16 }, [_]u16{ 65458, 16 },
[_]u16{ 65459, 16 }, [_]u16{ 65460, 16 }, [_]u16{ 65461, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 504, 9 }, [_]u16{ 32704, 15 }, [_]u16{ 65462, 16 },
[_]u16{ 65463, 16 }, [_]u16{ 65464, 16 }, [_]u16{ 65465, 16 }, [_]u16{ 65466, 16 },
[_]u16{ 65467, 16 }, [_]u16{ 65468, 16 }, [_]u16{ 65469, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 505, 9 }, [_]u16{ 65470, 16 }, [_]u16{ 65471, 16 },
[_]u16{ 65472, 16 }, [_]u16{ 65473, 16 }, [_]u16{ 65474, 16 }, [_]u16{ 65475, 16 },
[_]u16{ 65476, 16 }, [_]u16{ 65477, 16 }, [_]u16{ 65478, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 506, 9 }, [_]u16{ 65479, 16 }, [_]u16{ 65480, 16 },
[_]u16{ 65481, 16 }, [_]u16{ 65482, 16 }, [_]u16{ 65483, 16 }, [_]u16{ 65484, 16 },
[_]u16{ 65485, 16 }, [_]u16{ 65486, 16 }, [_]u16{ 65487, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 1017, 10 }, [_]u16{ 65488, 16 }, [_]u16{ 65489, 16 },
[_]u16{ 65490, 16 }, [_]u16{ 65491, 16 }, [_]u16{ 65492, 16 }, [_]u16{ 65493, 16 },
[_]u16{ 65494, 16 }, [_]u16{ 65495, 16 }, [_]u16{ 65496, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 1018, 10 }, [_]u16{ 65497, 16 }, [_]u16{ 65498, 16 },
[_]u16{ 65499, 16 }, [_]u16{ 65500, 16 }, [_]u16{ 65501, 16 }, [_]u16{ 65502, 16 },
[_]u16{ 65503, 16 }, [_]u16{ 65504, 16 }, [_]u16{ 65505, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 2040, 11 }, [_]u16{ 65506, 16 }, [_]u16{ 65507, 16 },
[_]u16{ 65508, 16 }, [_]u16{ 65509, 16 }, [_]u16{ 65510, 16 }, [_]u16{ 65511, 16 },
[_]u16{ 65512, 16 }, [_]u16{ 65513, 16 }, [_]u16{ 65514, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 65515, 16 }, [_]u16{ 65516, 16 }, [_]u16{ 65517, 16 },
[_]u16{ 65518, 16 }, [_]u16{ 65519, 16 }, [_]u16{ 65520, 16 }, [_]u16{ 65521, 16 },
[_]u16{ 65522, 16 }, [_]u16{ 65523, 16 }, [_]u16{ 65524, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 2041, 11 }, [_]u16{ 65525, 16 }, [_]u16{ 65526, 16 }, [_]u16{ 65527, 16 },
[_]u16{ 65528, 16 }, [_]u16{ 65529, 16 }, [_]u16{ 65530, 16 }, [_]u16{ 65531, 16 },
[_]u16{ 65532, 16 }, [_]u16{ 65533, 16 }, [_]u16{ 65534, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
};
const UVAC_HT = [256][2]u16{
[_]u16{ 0, 2 }, [_]u16{ 1, 2 }, [_]u16{ 4, 3 }, [_]u16{ 10, 4 },
[_]u16{ 24, 5 }, [_]u16{ 25, 5 }, [_]u16{ 56, 6 }, [_]u16{ 120, 7 },
[_]u16{ 500, 9 }, [_]u16{ 1014, 10 }, [_]u16{ 4084, 12 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 11, 4 }, [_]u16{ 57, 6 }, [_]u16{ 246, 8 },
[_]u16{ 501, 9 }, [_]u16{ 2038, 11 }, [_]u16{ 4085, 12 }, [_]u16{ 65416, 16 },
[_]u16{ 65417, 16 }, [_]u16{ 65418, 16 }, [_]u16{ 65419, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 26, 5 }, [_]u16{ 247, 8 }, [_]u16{ 1015, 10 },
[_]u16{ 4086, 12 }, [_]u16{ 32706, 15 }, [_]u16{ 65420, 16 }, [_]u16{ 65421, 16 },
[_]u16{ 65422, 16 }, [_]u16{ 65423, 16 }, [_]u16{ 65424, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 27, 5 }, [_]u16{ 248, 8 }, [_]u16{ 1016, 10 },
[_]u16{ 4087, 12 }, [_]u16{ 65425, 16 }, [_]u16{ 65426, 16 }, [_]u16{ 65427, 16 },
[_]u16{ 65428, 16 }, [_]u16{ 65429, 16 }, [_]u16{ 65430, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 58, 6 }, [_]u16{ 502, 9 }, [_]u16{ 65431, 16 },
[_]u16{ 65432, 16 }, [_]u16{ 65433, 16 }, [_]u16{ 65434, 16 }, [_]u16{ 65435, 16 },
[_]u16{ 65436, 16 }, [_]u16{ 65437, 16 }, [_]u16{ 65438, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 59, 6 }, [_]u16{ 1017, 10 }, [_]u16{ 65439, 16 },
[_]u16{ 65440, 16 }, [_]u16{ 65441, 16 }, [_]u16{ 65442, 16 }, [_]u16{ 65443, 16 },
[_]u16{ 65444, 16 }, [_]u16{ 65445, 16 }, [_]u16{ 65446, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 121, 7 }, [_]u16{ 2039, 11 }, [_]u16{ 65447, 16 },
[_]u16{ 65448, 16 }, [_]u16{ 65449, 16 }, [_]u16{ 65450, 16 }, [_]u16{ 65451, 16 },
[_]u16{ 65452, 16 }, [_]u16{ 65453, 16 }, [_]u16{ 65454, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 122, 7 }, [_]u16{ 2040, 11 }, [_]u16{ 65455, 16 },
[_]u16{ 65456, 16 }, [_]u16{ 65457, 16 }, [_]u16{ 65458, 16 }, [_]u16{ 65459, 16 },
[_]u16{ 65460, 16 }, [_]u16{ 65461, 16 }, [_]u16{ 65462, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 249, 8 }, [_]u16{ 65463, 16 }, [_]u16{ 65464, 16 },
[_]u16{ 65465, 16 }, [_]u16{ 65466, 16 }, [_]u16{ 65467, 16 }, [_]u16{ 65468, 16 },
[_]u16{ 65469, 16 }, [_]u16{ 65470, 16 }, [_]u16{ 65471, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 503, 9 }, [_]u16{ 65472, 16 }, [_]u16{ 65473, 16 },
[_]u16{ 65474, 16 }, [_]u16{ 65475, 16 }, [_]u16{ 65476, 16 }, [_]u16{ 65477, 16 },
[_]u16{ 65478, 16 }, [_]u16{ 65479, 16 }, [_]u16{ 65480, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 504, 9 }, [_]u16{ 65481, 16 }, [_]u16{ 65482, 16 },
[_]u16{ 65483, 16 }, [_]u16{ 65484, 16 }, [_]u16{ 65485, 16 }, [_]u16{ 65486, 16 },
[_]u16{ 65487, 16 }, [_]u16{ 65488, 16 }, [_]u16{ 65489, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 505, 9 }, [_]u16{ 65490, 16 }, [_]u16{ 65491, 16 },
[_]u16{ 65492, 16 }, [_]u16{ 65493, 16 }, [_]u16{ 65494, 16 }, [_]u16{ 65495, 16 },
[_]u16{ 65496, 16 }, [_]u16{ 65497, 16 }, [_]u16{ 65498, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 506, 9 }, [_]u16{ 65499, 16 }, [_]u16{ 65500, 16 },
[_]u16{ 65501, 16 }, [_]u16{ 65502, 16 }, [_]u16{ 65503, 16 }, [_]u16{ 65504, 16 },
[_]u16{ 65505, 16 }, [_]u16{ 65506, 16 }, [_]u16{ 65507, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 2041, 11 }, [_]u16{ 65508, 16 }, [_]u16{ 65509, 16 },
[_]u16{ 65510, 16 }, [_]u16{ 65511, 16 }, [_]u16{ 65512, 16 }, [_]u16{ 65513, 16 },
[_]u16{ 65514, 16 }, [_]u16{ 65515, 16 }, [_]u16{ 65516, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 16352, 14 }, [_]u16{ 65517, 16 }, [_]u16{ 65518, 16 },
[_]u16{ 65519, 16 }, [_]u16{ 65520, 16 }, [_]u16{ 65521, 16 }, [_]u16{ 65522, 16 },
[_]u16{ 65523, 16 }, [_]u16{ 65524, 16 }, [_]u16{ 65525, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
[_]u16{ 1018, 10 }, [_]u16{ 32707, 15 }, [_]u16{ 65526, 16 }, [_]u16{ 65527, 16 },
[_]u16{ 65528, 16 }, [_]u16{ 65529, 16 }, [_]u16{ 65530, 16 }, [_]u16{ 65531, 16 },
[_]u16{ 65532, 16 }, [_]u16{ 65533, 16 }, [_]u16{ 65534, 16 }, [_]u16{ 0, 0 },
[_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 }, [_]u16{ 0, 0 },
};
const YQT = [_]i32{
16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22,
37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99,
};
const UVQT = [_]i32{
17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
};
const aasf = [_]f32{
1.0 * 2.828427125, 1.387039845 * 2.828427125, 1.306562965 * 2.828427125, 1.175875602 * 2.828427125,
1.0 * 2.828427125, 0.785694958 * 2.828427125, 0.541196100 * 2.828427125, 0.275899379 * 2.828427125,
};
fn writeToStreamCore(writer: var, width: usize, height: usize, comp: usize, data: []const u8, _quality: i32) !void {
if (width == 0 or height == 0 or comp > 4 or comp < 1) {
return error.InvalidArguments;
}
var fdtbl_Y: [64]f32 = undefined;
var fdtbl_UV: [64]f32 = undefined;
var YTable: [64]u8 = undefined;
var UVTable: [64]u8 = undefined;
var quality = if (_quality != 0) _quality else 90;
quality = if (quality < 1) 1 else (if (quality > 100) 100 else quality);
quality = if (quality < 50) @divFloor(5000, quality) else 200 - quality * 2;
{
var i: usize = 0;
while (i < 64) : (i += 1) {
const yti = @divFloor(YQT[i] * quality + 50, 100);
YTable[zig_zag_table[i]] = @intCast(u8, if (yti < 1) 1 else (if (yti > 255) 255 else yti));
const uvti = @divFloor(UVQT[i] * quality + 50, 100);
UVTable[zig_zag_table[i]] = @intCast(u8, if (uvti < 1) 1 else (if (uvti > 255) 255 else uvti));
}
}
{
var row: usize = 0;
var k: usize = 0;
while (row < 8) : (row += 1) {
var col: usize = 0;
while (col < 8) : ({
col += 1;
k += 1;
}) {
fdtbl_Y[k] = 1 / (@intToFloat(f32, YTable[zig_zag_table[k]]) * aasf[row] * aasf[col]);
fdtbl_UV[k] = 1 / (@intToFloat(f32, UVTable[zig_zag_table[k]]) * aasf[row] * aasf[col]);
}
}
}
// Write Headers
{
const head0 = [_]u8{ 0xFF, 0xD8, 0xFF, 0xE0, 0, 0x10, 'J', 'F', 'I', 'F', 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0xFF, 0xDB, 0, 0x84, 0 };
const head2 = [_]u8{ 0xFF, 0xDA, 0, 0xC, 3, 1, 0, 2, 0x11, 3, 0x11, 0, 0x3F, 0 };
const head1 = [_]u8{
0xFF, 0xC0, 0, 0x11, 8, @truncate(u8, height >> 8), @truncate(u8, height), @truncate(u8, width >> 8), @truncate(u8, width),
3, 1, 0x11, 0, 2, 0x11, 1, 3, 0x11,
1, 0xFF, 0xC4, 0x01, 0xA2, 0,
};
try writer.write(head0);
try writer.write(YTable);
try writer.write([_]u8{1});
try writer.write(UVTable);
try writer.write(head1);
try writer.write(std_dc_luminance_nrcodes[1..]);
try writer.write(std_dc_luminance_values);
try writer.write(([_]u8{0x10})[0..]); // HTYACinfo
try writer.write(std_ac_luminance_nrcodes[1..]);
try writer.write(std_ac_luminance_values);
try writer.write(([_]u8{1})[0..]); //HTUDCinfo
try writer.write(std_dc_chrominance_nrcodes[1..]);
try writer.write(std_dc_chrominance_values);
try writer.write(([_]u8{0x11})[0..]); // HTUACinfo
try writer.write(std_ac_chrominance_nrcodes[1..]);
try writer.write(std_ac_chrominance_values);
try writer.write(head2);
}
// Encode 8x8 macroblocks
{
const fillBits = [_]u16{ 0x7F, 7 };
var DCY: i32 = 0;
var DCU: i32 = 0;
var DCV: i32 = 0;
var bitBuf: u32 = 0;
var bitCnt: u32 = 0;
// comp == 2 is grey+alpha (alpha is ignored)
const ofsG = if (comp > 2) usize(1) else 0;
const ofsB = if (comp > 2) usize(2) else 0;
var y: usize = 0;
while (y < height) : (y += 8) {
var x: usize = 0;
while (x < width) : (x += 8) {
var YDU: [64]f32 = undefined;
var UDU: [64]f32 = undefined;
var VDU: [64]f32 = undefined;
var row = y;
var pos: usize = 0;
while (row < y + 8) : (row += 1) {
var col = x;
while (col < x + 8) : ({
col += 1;
pos += 1;
}) {
var p = (if (flip_vertically_on_write) height - 1 - row else row) * width * comp + col * comp;
if (row >= height) {
p -= width * comp * (row + 1 - height);
}
if (col >= width) {
p -= comp * (col + 1 - width);
}
const r = @intToFloat(f32, data[p + 0]);
const g = @intToFloat(f32, data[p + ofsG]);
const b = @intToFloat(f32, data[p + ofsB]);
YDU[pos] = 0.29900 * r + 0.58700 * g + 0.11400 * b - 128;
UDU[pos] = -0.16874 * r - 0.33126 * g + 0.50000 * b;
VDU[pos] = 0.50000 * r - 0.41869 * g - 0.08131 * b;
}
}
DCY = try processDU(writer, &bitBuf, &bitCnt, YDU[0..], fdtbl_Y[0..], DCY, YDC_HT, YAC_HT);
DCU = try processDU(writer, &bitBuf, &bitCnt, UDU[0..], fdtbl_UV[0..], DCU, UVDC_HT, UVAC_HT);
DCV = try processDU(writer, &bitBuf, &bitCnt, VDU[0..], fdtbl_UV[0..], DCV, UVDC_HT, UVAC_HT);
}
}
// Do the bit alignment of the EOI marker
try writeBits(writer, &bitBuf, &bitCnt, fillBits);
}
// EOI
try writer.write(([_]u8{0xFF})[0..]);
try writer.write(([_]u8{0xD9})[0..]);
}
|
0 | repos | repos/zig-raytrace/README.md | A simple raytracer and jpeg image writer in Zig.
Rewritten based on https://github.com/ssloy/tinyraytracer.
# Dependencies
- [Zig](https://ziglang.org)
# Example

|
0 | repos | repos/zbor/README.md | # zbor - Zig CBOR



The Concise Binary Object Representation (CBOR) is a data format whose design
goals include the possibility of extremely small code size, fairly small
message size, and extensibility without the need for version negotiation
([RFC8949](https://www.rfc-editor.org/rfc/rfc8949.html#abstract)). It is used
in different protocols like the Client to Authenticator Protocol
[CTAP2](https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.html#ctap2-canonical-cbor-encoding-form)
which is a essential part of FIDO2 authenticators/ Passkeys.
I have utilized this library in several projects throughout the previous year, primarily in conjunction with my [FIDO2 library](https://github.com/r4gus/fido2). I'd consider it stable.
With the introduction of [Zig version `0.11.0`](https://ziglang.org/download/), this library will remain aligned with the most recent stable release. If you have any problems or want
to share some ideas feel free to open an issue or write me a mail, but please be kind.
## Getting started
First add this library as a dependency to your `build.zig.zon` file:
```zig
.{
.name = "your-project",
.version = 0.0.1,
.dependencies = .{
.zbor = .{
// For a specific release use:
// .url = "https://github.com/r4gus/zbor/archive/refs/tags/0.13.1.tar.gz",
// For the current master use:
.url = "https://github.com/r4gus/zbor/archive/master.tar.gz",
.hash = <hash>,
}
},
.paths = .{
// Your paths...
},
}
```
then within you `build.zig` add the following code:
```zig
// First fetch the dependency...
const zbor_dep = b.dependency("zbor", .{
.target = target,
.optimize = optimize,
});
const zbor_module = zbor_dep.module("zbor");
// If you have a module that has zbor as a dependency...
const your_module = b.addModule("your-module", .{
.root_source_file = .{ .path = "src/main.zig" },
.imports = &.{
.{ .name = "zbor", .module = zbor_module },
},
});
// Or as a dependency for a executable...
exe.root_module.addImport("zbor", zbor_module);
```
> The easiest way to get the required __hash__ is to use a wrong one and then copy the correct one
> from the error message.
## Usage
This library lets you inspect and parse CBOR data without having to allocate
additional memory.
### Inspect CBOR data
To inspect CBOR data you must first create a new `DataItem`.
```zig
const cbor = @import("zbor");
const di = DataItem.new("\x1b\xff\xff\xff\xff\xff\xff\xff\xff") catch {
// handle the case that the given data is malformed
};
```
`DataItem.new()` will check if the given data is well-formed before returning a `DataItem`. The data is well formed if it's syntactically correct.
To check the type of the given `DataItem` use the `getType()` function.
```zig
std.debug.assert(di.getType() == .Int);
```
Possible types include `Int` (major type 0 and 1) `ByteString` (major type 2), `TextString` (major type 3), `Array` (major type 4), `Map` (major type 5), `Tagged` (major type 6) and `Float` (major type 7).
Based on the given type you can the access the underlying value.
```zig
std.debug.assert(di.int().? == 18446744073709551615);
```
All getter functions return either a value or `null`. You can use a pattern like `if (di.int()) |v| v else return error.Oops;` to access the value in a safe way. If you've used `DataItem.new()` and know the type of the data item, you should be safe to just do `di.int().?`.
The following getter functions are supported:
* `int` - returns `?i65`
* `string` - returns `?[]const u8`
* `array` - returns `?ArrayIterator`
* `map` - returns `?MapIterator`
* `simple` - returns `?u8`
* `float` - returns `?f64`
* `tagged` - returns `?Tag`
* `boolean` - returns `?bool`
#### Iterators
The functions `array` and `map` will return an iterator. Every time you
call `next()` you will either get a `DataItem`/ `Pair` or `null`.
```zig
const di = DataItem.new("\x98\x19\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x18\x18\x19");
var iter = di.array().?;
while (iter.next()) |value| {
_ = value;
// doe something
}
```
### Encoding and decoding
#### Serialization
You can serialize Zig objects into CBOR using the `stringify()` function.
```zig
const allocator = std.testing.allocator;
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
const Info = struct {
versions: []const []const u8,
};
const i = Info{
.versions = &.{"FIDO_2_0"},
};
try stringify(i, .{}, str.writer());
```
> Note: Compile time floats are always encoded as single precision floats (f32). Please use `@floatCast`
> before passing a float to `stringify()`.
The `stringify()` function is convenient but also adds extra overhead. If you want full control
over the serialization process you can use the following functions defined in `zbor.build`: `writeInt`,
`writeByteString`, `writeTextString`, `writeTag`, `writeSimple`, `writeArray`, `writeMap`. For more
details check out the [manual serialization example](examples/manual_serialization.zig) and the
corresponding [source code](src/build.zig).
##### Stringify Options
You can pass options to the `stringify` function to influence its behavior. Without passing any
options, `stringify` will behave as follows:
* Enums will be serialized to their textual representation
* `u8` slices will be serialized to byte strings
* For structs and unions:
* `null` fields are skipped by default
* fields of type `std.mem.Allocator` are always skipped.
* the names of fields are serialized to text strings
You can modify that behavior by changing the default options, e.g.:
```zig
const EcdsaP256Key = struct {
/// kty:
kty: u8 = 2,
/// alg:
alg: i8 = -7,
/// crv:
crv: u8 = 1,
/// x-coordinate
x: [32]u8,
/// y-coordinate
y: [32]u8,
pub fn new(k: EcdsaP256.PublicKey) @This() {
const xy = k.toUncompressedSec1();
return .{
.x = xy[1..33].*,
.y = xy[33..65].*,
};
}
};
//...
try stringify(k, .{ .field_settings = &.{
.{ .name = "kty", .field_options = .{ .alias = "1", .serialization_type = .Integer } },
.{ .name = "alg", .field_options = .{ .alias = "3", .serialization_type = .Integer } },
.{ .name = "crv", .field_options = .{ .alias = "-1", .serialization_type = .Integer } },
.{ .name = "x", .field_options = .{ .alias = "-2", .serialization_type = .Integer } },
.{ .name = "y", .field_options = .{ .alias = "-3", .serialization_type = .Integer } },
} }, str.writer());
```
Here we define a alias for every field of the struct and tell `serialize` that it should treat
those aliases as integers instead of text strings.
__See `Options` and `FieldSettings` in `src/parse.zig` for all available options!__
#### Deserialization
You can deserialize CBOR data into Zig objects using the `parse()` function.
```zig
const e = [5]u8{ 1, 2, 3, 4, 5 };
const di = DataItem.new("\x85\x01\x02\x03\x04\x05");
const x = try parse([5]u8, di, .{});
try std.testing.expectEqualSlices(u8, e[0..], x[0..]);
```
##### Parse Options
You can pass options to the `parse` function to influence its behaviour.
This includes:
* `allocator` - The allocator to be used. This is required if your data type has any pointers, slices, etc.
* `duplicate_field_behavior` - How to handle duplicate fields (`.UseFirst`, `.Error`)
* `ignore_unknown_fields` - Ignore unknown fields (default is `true`)
* `field_settings` - Lets you specify aliases for struct fields
* `from_cborParse` - Flag to break infinity loops (see Overriding parse)
#### Builder
You can also dynamically create CBOR data using the `Builder`.
```zig
const allocator = std.testing.allocator;
var b = try Builder.withType(allocator, .Map);
try b.pushTextString("a");
try b.pushInt(1);
try b.pushTextString("b");
try b.enter(.Array);
try b.pushInt(2);
try b.pushInt(3);
//try b.leave(); <-- you can leave out the return at the end
const x = try b.finish();
defer allocator.free(x);
// { "a": 1, "b": [2, 3] }
try std.testing.expectEqualSlices(u8, "\xa2\x61\x61\x01\x61\x62\x82\x02\x03", x);
```
##### Commands
- The `push*` functions append a data item
- The `enter` function takes a container type and pushes it on the builder stack
- The `leave` function leaves the current container. The container is appended to the wrapping container
- The `finish` function returns the CBOR data as owned slice
#### Overriding stringify
You can override the `stringify` function for structs and tagged unions by implementing `cborStringify`.
```zig
const Foo = struct {
x: u32 = 1234,
y: struct {
a: []const u8 = "public-key",
b: u64 = 0x1122334455667788,
},
pub fn cborStringify(self: *const @This(), options: Options, out: anytype) !void {
// First stringify the 'y' struct
const allocator = std.testing.allocator;
var o = std.ArrayList(u8).init(allocator);
defer o.deinit();
try stringify(self.y, options, o.writer());
// Then use the Builder to alter the CBOR output
var b = try build.Builder.withType(allocator, .Map);
try b.pushTextString("x");
try b.pushInt(self.x);
try b.pushTextString("y");
try b.pushByteString(o.items);
const x = try b.finish();
defer allocator.free(x);
try out.writeAll(x);
}
};
```
The `StringifyOptions` can be used to indirectly pass an `Allocator` to the function.
Please make sure to set `from_cborStringify` to `true` when calling recursively into `stringify(self)` to prevent infinite loops.
#### Overriding parse
You can override the `parse` function for structs and tagged unions by implementing `cborParse`. This is helpful if you have aliases for your struct members.
```zig
const EcdsaP256Key = struct {
/// kty:
kty: u8 = 2,
/// alg:
alg: i8 = -7,
/// crv:
crv: u8 = 1,
/// x-coordinate
x: [32]u8,
/// y-coordinate
y: [32]u8,
pub fn cborParse(item: DataItem, options: Options) !@This() {
_ = options;
return try parse(@This(), item, .{
.from_callback = true, // prevent infinite loops
.field_settings = &.{
.{ .name = "kty", .field_options = .{ .alias = "1" } },
.{ .name = "alg", .field_options = .{ .alias = "3" } },
.{ .name = "crv", .field_options = .{ .alias = "-1" } },
.{ .name = "x", .field_options = .{ .alias = "-2" } },
.{ .name = "y", .field_options = .{ .alias = "-3" } },
},
});
}
};
```
The `Options` can be used to indirectly pass an `Allocator` to the function.
Please make sure to set `from_callback` to `true` when calling recursively into `parse(self)` to prevent infinite loops.
#### Structs with fields of type `std.mem.Allocator`
If you have a struct with a field of type `std.mem.Allocator` you have to override the `stringify`
funcation for that struct, e.g.:
```zig
pub fn cborStringify(self: *const @This(), options: cbor.StringifyOptions, out: anytype) !void {
_ = options;
try cbor.stringify(self, .{
.from_cborStringify = true,
.field_settings = &.{
.{ .name = "allocator", .options = .{ .skip = true } },
},
}, out);
}
```
When using `parse` make sure you pass a allocator to the function. The passed allocator will be assigned
to the field of type `std.mem.Allocator`.
### ArrayBackedSlice
This library offers a convenient function named ArrayBackedSlice, which enables you to create a wrapper for an array of any size and type. This wrapper implements the cborStringify and cborParse methods, allowing it to seamlessly replace slices (e.g., []const u8) with an array.
```zig
test "ArrayBackedSlice test" {
const allocator = std.testing.allocator;
const S64B = ArrayBackedSlice(64, u8, .Byte);
var x = S64B{};
try x.set("\x01\x02\x03\x04");
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try stringify(x, .{}, str.writer());
try std.testing.expectEqualSlices(u8, "\x44\x01\x02\x03\x04", str.items);
const di = try DataItem.new(str.items);
const y = try parse(S64B, di, .{});
try std.testing.expectEqualSlices(u8, "\x01\x02\x03\x04", y.get());
}
```
|
0 | repos | repos/zbor/build.zig.zon | .{
.name = "zbor",
// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
.version = "0.15.0",
// This field is optional.
// This is currently advisory only; Zig does not yet do anything
// with this value.
.minimum_zig_version = "0.13.0",
// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
// Once all dependencies are fetched, `zig build` no longer requires
// internet connectivity.
.dependencies = .{
// See `zig fetch --save <url>` for a command-line interface for adding dependencies.
//.example = .{
// // When updating this field to a new URL, be sure to delete the corresponding
// // `hash`, otherwise you are communicating that you expect to find the old hash at
// // the new URL.
// .url = "https://example.com/foo.tar.gz",
//
// // This is computed from the file contents of the directory of files that is
// // obtained after fetching `url` and applying the inclusion rules given by
// // `paths`.
// //
// // This field is the source of truth; packages do not come from a `url`; they
// // come from a `hash`. `url` is just one of many possible mirrors for how to
// // obtain a package matching this `hash`.
// //
// // Uses the [multihash](https://multiformats.io/multihash/) format.
// .hash = "...",
//
// // When this is provided, the package is found in a directory relative to the
// // build root. In this case the package's hash is irrelevant and therefore not
// // computed. This field and `url` are mutually exclusive.
// .path = "foo",
// // When this is set to `true`, a package is declared to be lazily
// // fetched. This makes the dependency only get fetched if it is
// // actually used.
// .lazy = false,
//},
},
// Specifies the set of files and directories that are included in this package.
// Only files and directories listed here are included in the `hash` that
// is computed for this package.
// Paths are relative to the build root. Use the empty string (`""`) to refer to
// the build root itself.
// A directory listed here means that all files within, recursively, are included.
.paths = .{
"build.zig",
"build.zig.zon",
"src",
"license",
"README.md",
"data",
},
}
|
0 | repos | repos/zbor/build.zig | const std = @import("std");
pub fn build(b: *std.Build) !void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});
// Standard optimization options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
//const lib = b.addStaticLibrary(.{
// .name = "zbor",
// .root_source_file = .{ .path = "src/main.zig" },
// .target = target,
// .optimize = optimize,
//});
//// This declares intent for the library to be installed into the
//// standard location when the user invokes the "install" step (the default
//// step when running `zig build`).
//lib.install();
const zbor_module = b.addModule("zbor", .{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
try b.modules.put(b.dupe("zbor"), zbor_module);
// Creates a step for unit testing.
const lib_tests = b.addTest(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&b.addRunArtifact(lib_tests).step);
// Creates a step for fuzz testing.
const fuzz_tests = b.addTest(.{
.root_source_file = b.path("src/fuzz.zig"),
.target = target,
.optimize = optimize,
});
const fuzz_test_step = b.step("fuzz", "Run fuzz tests");
fuzz_test_step.dependOn(&b.addRunArtifact(fuzz_tests).step);
// Examples
// ---------------------------------------------------
const examples: [3][2][]const u8 = .{
.{ "examples/manual_serialization.zig", "manual_serialization" },
.{ "examples/automatic_serialization.zig", "automatic_serialization" },
.{ "examples/automatic_serialization2.zig", "automatic_serialization2" },
};
for (examples) |entry| {
const path, const name = entry;
const example = b.addExecutable(.{
.name = name,
.root_source_file = b.path(path),
.target = target,
.optimize = optimize,
});
example.root_module.addImport("zbor", zbor_module);
//example.addModule("zbor", zbor_module);
b.installArtifact(example);
}
}
|
0 | repos/zbor | repos/zbor/src/parse.zig | const std = @import("std");
const Allocator = std.mem.Allocator;
const cbor = @import("cbor.zig");
const Type = cbor.Type;
const DataItem = cbor.DataItem;
const Tag = cbor.Tag;
const Pair = cbor.Pair;
const MapIterator = cbor.MapIterator;
const ArrayIterator = cbor.ArrayIterator;
const unsigned_16 = cbor.unsigned_16;
const unsigned_32 = cbor.unsigned_32;
const unsigned_64 = cbor.unsigned_64;
const encode_2 = cbor.encode_2;
const encode_4 = cbor.encode_4;
const encode_8 = cbor.encode_8;
pub const ArrayBackedSliceType = enum {
Byte,
Text,
Other,
};
/// Wrapper for a array with an arbitrary type `U`.
pub fn ArrayBackedSlice(
comptime size: usize,
comptime U: type,
comptime t: ArrayBackedSliceType,
) type {
const T = [size]U;
return struct {
buffer: T = undefined,
len: usize = 0,
pub const ByteWriter = struct {
raw: []u8,
i: *usize,
pub fn writeAll(self: *const @This(), in: []const u8) !void {
if (self.raw.len - self.i.* < in.len) {
return error.OutOfMemory;
}
@memcpy(self.raw[self.i.* .. self.i.* + in.len], in);
self.i.* += in.len;
}
pub fn writeByte(self: *const @This(), in: u8) !void {
if (self.i.* >= self.raw.len) {
return error.OutOfMemory;
}
self.raw[self.i.*] = in;
self.i.* += 1;
}
};
pub fn byteWriter(self: *@This()) !ByteWriter {
if (U != u8) return error.WrongType;
return .{
.raw = &self.buffer,
.i = &self.len,
};
}
pub fn fromSlice(s: ?[]const U) !?@This() {
if (s == null) return null;
if (s.?.len > size) return error.BufferTooSmall;
var x = @This(){};
@memcpy(x.buffer[0..s.?.len], s.?);
x.len = s.?.len;
return x;
}
pub fn get(self: *const @This()) []const U {
return self.buffer[0..self.len];
}
pub fn getMut(self: *@This()) []U {
return self.buffer[0..self.len];
}
pub fn set(self: *@This(), v: []const u8) !void {
if (v.len > self.buffer.len) return error.BufferTooSmall;
@memcpy(self.buffer[0..v.len], v);
self.len = v.len;
}
pub fn cborStringify(self: *const @This(), options: Options, out: anytype) !void {
switch (t) {
.Byte => try build.writeByteString(out, self.get()),
.Text => try build.writeTextString(out, self.get()),
.Other => {
// Make sure this is set to false otherwise, nested cborStringify calls
// are prevented.
//
// TODO: This will backfire for nested ArrayBackedSlices, maybe its
// time to switch to a unique identifier based to the given cborStringify
// function.
var o = options;
o.from_callback = false;
try stringify(self.get(), o, out);
},
}
}
pub fn cborParse(item: DataItem, options: Options) !@This() {
if (item.array()) |*v_| {
var v = v_.*;
var r: T = undefined;
var i: usize = 0;
while (i < r.len) : (i += 1) {
r[i] = try parse(
U,
if (v.next()) |x| x else break,
options,
);
}
return .{
.buffer = r,
.len = i,
};
} else if (item.string()) |v| {
if (U != u8) return ParseError.UnexpectedItem;
var r: T = undefined;
if (v.len > r[0..].len) return ParseError.Overflow;
std.mem.copyForwards(u8, r[0..v.len], v);
return .{
.buffer = r,
.len = v.len,
};
} else return ParseError.UnexpectedItem;
}
};
}
pub const ParseError = error{
UnsupportedType,
UnexpectedItem,
UnexpectedItemValue,
InvalidKeyType,
InvalidEnumTag,
DuplicateCborField,
UnknownField,
MissingField,
AllocatorRequired,
Overflow,
OutOfMemory,
Malformed,
NoUnionMemberMatched,
};
pub const StringifyError = error{
UnsupportedItem,
OutOfMemory,
InvalidPairCount,
};
/// Deserialize a CBOR data item into a Zig data structure
pub fn parse(
/// The type to deserialize to
comptime T: type,
/// The data item to deserialize
item: DataItem,
/// Options to effect the behaviour of this function
options: Options,
) ParseError!T {
switch (@typeInfo(T)) {
.Bool => {
return switch (item.getType()) {
.False => false,
.True => true,
else => ParseError.UnexpectedItem,
};
},
.Float, .ComptimeFloat => {
return switch (item.getType()) {
.Float => if (item.float()) |x| @as(T, @floatCast(x)) else return ParseError.Malformed,
else => ParseError.UnexpectedItem,
};
},
.Int, .ComptimeInt => {
switch (item.getType()) {
.Int => {
const v = if (item.int()) |x| x else return ParseError.Malformed;
if (v > std.math.maxInt(T) or v < std.math.minInt(T))
return ParseError.Overflow;
return @as(T, @intCast(v));
},
else => return ParseError.UnexpectedItem,
}
},
.Optional => |optionalInfo| {
return switch (item.getType()) {
.Null, .Undefined => null,
else => try parse(optionalInfo.child, item, options),
};
},
.Enum => |enumInfo| {
switch (item.getType()) {
.Int => {
const v = if (item.int()) |x| x else return ParseError.Malformed;
return try std.meta.intToEnum(T, v);
},
.TextString => {
const v = if (item.string()) |x| x else return ParseError.Malformed;
inline for (enumInfo.fields) |field| {
if (cmp(field.name, v)) {
return @field(T, field.name);
}
}
return ParseError.InvalidEnumTag;
},
else => return ParseError.UnexpectedItem,
}
},
.Struct => |structInfo| {
// Custom parse function overrides default behaviour
const has_parse = comptime std.meta.hasFn(T, "cborParse");
if (has_parse and !options.from_callback) {
var o = options;
o.from_callback = true;
return T.cborParse(item, o);
}
switch (item.getType()) {
.Map => {
var r: T = undefined;
var fields_seen = [_]bool{false} ** structInfo.fields.len;
var v = if (item.map()) |x| x else return ParseError.Malformed;
while (v.next()) |kv| {
var found = false;
if (kv.key.getType() != .TextString and kv.key.getType() != .Int) continue;
inline for (structInfo.fields, 0..) |field, i| {
var match: bool = false;
var name: []const u8 = field.name;
// std.mem.Allocator contains anyopaque which isn't
// possible to parse.
if (field.type == std.mem.Allocator) continue;
// Is there an alias specified?
for (options.field_settings) |fs| {
if (std.mem.eql(u8, field.name, fs.name)) {
if (fs.field_options.alias) |alias| {
name = alias;
}
}
}
switch (kv.key.getType()) {
.Int => {
const x = if (kv.key.int()) |y| y else return ParseError.Malformed;
const y = s2n(name);
match = x == y;
},
else => {
match = std.mem.eql(u8, name, if (kv.key.string()) |x| x else return ParseError.Malformed);
},
}
if (match) {
if (fields_seen[i]) {
switch (options.duplicate_field_behavior) {
.UseFirst => {
found = true;
break;
},
.Error => return ParseError.DuplicateCborField,
}
}
var child_options = options;
child_options.from_callback = false;
@field(r, field.name) = try parse(
field.type,
kv.value,
child_options,
);
errdefer {
// TODO: add error defer to free memory
const I = @typeInfo(@TypeOf(@field(r, field.name)));
switch (I) {
.Pointer => |ptrInfo| {
_ = ptrInfo;
},
else => {},
}
}
fields_seen[i] = true;
found = true;
break;
}
}
if (!found and !options.ignore_unknown_fields) {
return ParseError.UnknownField;
}
}
inline for (structInfo.fields, 0..) |field, i| {
if (!fields_seen[i]) {
switch (@typeInfo(field.type)) {
.Optional => @field(r, field.name) = null,
else => {
if (field.type == std.mem.Allocator and options.allocator != null) {
// Assign the allocator that was provided by the caller
@field(r, field.name) = options.allocator.?;
} else if (field.default_value) |default_ptr| {
if (!field.is_comptime) {
const default = @as(*align(1) const field.type, @ptrCast(default_ptr)).*;
@field(r, field.name) = default;
}
} else {
return ParseError.MissingField;
}
},
}
}
}
return r;
},
else => return ParseError.UnexpectedItem,
}
},
.Array => |arrayInfo| {
switch (item.getType()) {
.Array => {
var v = if (item.array()) |x| x else return ParseError.Malformed;
var r: T = undefined;
var i: usize = 0;
while (i < r.len) : (i += 1) {
r[i] = try parse(arrayInfo.child, if (v.next()) |x| x else return ParseError.Malformed, options);
}
return r;
},
.ByteString, .TextString => {
if (arrayInfo.child != u8) return ParseError.UnexpectedItem;
const v = if (item.string()) |x| x else return ParseError.Malformed;
var r: T = undefined;
if (v.len > r[0..].len) return ParseError.Overflow;
std.mem.copyForwards(u8, r[0..v.len], v);
return r;
},
else => {
return ParseError.UnexpectedItem;
},
}
},
.Pointer => |ptrInfo| {
const allocator = options.allocator orelse return ParseError.AllocatorRequired;
switch (ptrInfo.size) {
.One => {
// We use *ptrInfo.child instead of T to allow const and non-const types
const r: *ptrInfo.child = try allocator.create(ptrInfo.child);
errdefer allocator.destroy(r);
r.* = try parse(ptrInfo.child, item, options);
return r;
},
.Slice => {
switch (item.getType()) {
.ByteString, .TextString => {
const v = if (item.string()) |x| x else return ParseError.Malformed;
if (ptrInfo.child != u8) {
return ParseError.UnexpectedItem;
}
var sentinel: usize = 0;
if (ptrInfo.sentinel != null) {
sentinel += 1;
}
var r: []ptrInfo.child = try allocator.alloc(ptrInfo.child, v.len + sentinel);
errdefer allocator.free(r);
std.mem.copyForwards(ptrInfo.child, r[0..], v[0..]);
if (ptrInfo.sentinel) |some| {
const sentinel_value = @as(*align(1) const ptrInfo.child, @ptrCast(some)).*;
r[r.len - 1] = sentinel_value;
return r[0 .. r.len - 1 :sentinel_value];
}
return r;
},
.Array => {
var v = if (item.array()) |x| x else return ParseError.Malformed;
var arraylist = std.ArrayList(ptrInfo.child).init(allocator);
errdefer {
// TODO: take care of children
arraylist.deinit();
}
while (v.next()) |elem| {
try arraylist.ensureUnusedCapacity(1);
const x = try parse(ptrInfo.child, elem, options);
arraylist.appendAssumeCapacity(x);
}
if (ptrInfo.sentinel) |some| {
const sentinel_value = @as(*align(1) const ptrInfo.child, @ptrCast(some)).*;
try arraylist.append(sentinel_value);
const output = try arraylist.toOwnedSlice();
return output[0 .. output.len - 1 :sentinel_value];
}
return arraylist.toOwnedSlice();
},
else => return ParseError.UnexpectedItem,
}
},
else => return ParseError.UnsupportedType,
}
},
.Union => |unionInfo| {
// Custom parse function overrides default behaviour
const has_parse = comptime std.meta.hasFn(T, "cborParse");
if (has_parse and !options.from_callback) {
var o = options;
o.from_callback = true;
return T.cborParse(item, o);
}
if (unionInfo.tag_type) |_| {
// try each union field until we find one that matches
inline for (unionInfo.fields) |u_field| {
if (parse(u_field.type, item, options)) |value| {
return @unionInit(T, u_field.name, value);
} else |err| {
// Bubble up error.OutOfMemory
// Parsing some types won't have OutOfMemory in their
// error-sets, for the condition to be valid, merge it in.
if (@as(@TypeOf(err) || error{OutOfMemory}, err) == error.OutOfMemory) return err;
// Bubble up AllocatorRequired, as it indicates missing option
if (@as(@TypeOf(err) || error{AllocatorRequired}, err) == error.AllocatorRequired) return err;
// otherwise continue through the `inline for`
}
}
return ParseError.NoUnionMemberMatched;
} else {
@compileError("Unable to parse into untagged union '" ++ @typeName(T) ++ "'");
}
},
else => return ParseError.UnsupportedType,
}
}
/// Options to influence the behavior of the stringify function
pub const Options = struct {
/// What a enum value should be serialized to
enum_serialization_type: SerializationType = .TextString,
/// What a slice value should be serialized to
slice_serialization_type: SerializationType = .ByteString,
/// Pass an optional allocator. This might be useful when implementing
/// a own cborStringify method for a struct or union.
allocator: ?std.mem.Allocator = null,
/// Settings for specific fields that override the default options
field_settings: []const FieldSettings = &.{},
/// Stringfiy called from cborStringify. This falg is used to prevent infinite recursion:
/// stringify -> cborStringify -> stringify -> cborStringify -> stringify ...
from_callback: bool = false,
/// How to behave if a CBOR map has two or more keys with
/// the same value
duplicate_field_behavior: enum {
/// Use the first one
UseFirst,
/// Don't allow duplicates
Error,
} = .Error,
/// Ignore CBOR map keys that were not expected
ignore_unknown_fields: bool = true,
};
pub const SerializationType = enum {
ByteString,
TextString,
Integer,
};
pub const SkipBehavior = enum {
/// Don't skip (default)
None,
/// Skip only if the field is null
SkipIfNull,
/// Always skip (e.g. fields of type std.mem.Allocator)
Skip,
};
/// Options for a specific field specified by `name`
pub const FieldSettings = struct {
/// The name of the field
name: []const u8,
/// Options for the field name
field_options: struct {
/// The alternative name of the field
alias: ?[]const u8 = null,
/// What the field name should be serialized to
///
/// Please note that ByteString and TextString will always succeed
/// while Integer might fail if the string can't be interpreted as
/// a number.
serialization_type: SerializationType = .TextString,
skip: SkipBehavior = .SkipIfNull,
} = .{},
/// Options specific for the given field
value_options: Options = .{},
};
/// Serialize the given value to CBOR
pub fn stringify(
/// The value to serialize
value: anytype,
/// Options to influence the functions behaviour
options: Options,
/// A writer
out: anytype,
) StringifyError!void {
const T = @TypeOf(value);
const TInf = @typeInfo(T);
var head: u8 = 0;
var v: u64 = 0;
// I don't know if this is a good solution but it's
// the easiest way to work around all the anyopaque
// compiler errors. Makes no sense to serialize a
// allocator but this allows storing a allocator
// in a struct and then just skipping the field.
if (T == std.mem.Allocator) return;
switch (TInf) {
.Int, .ComptimeInt => {
head = if (value < 0) 0x20 else 0;
v = @as(u64, @intCast(if (value < 0) -(value + 1) else value));
try encode(out, head, v);
return;
},
.Float, .ComptimeFloat => {
head = 0xe0;
switch (TInf) {
.Float => |float| {
switch (float.bits) {
16 => try encode_2(out, head, @as(u64, @intCast(@as(u16, @bitCast(value))))),
32 => try encode_4(out, head, @as(u64, @intCast(@as(u32, @bitCast(value))))),
64 => try encode_8(out, head, @as(u64, @intCast(@as(u64, @bitCast(value))))),
else => @compileError("Float must be 16, 32 or 64 Bits wide"),
}
return;
},
.ComptimeFloat => {
// Comptime floats are always encoded as single precision floats
try encode_4(out, head, @as(u64, @intCast(@as(u32, @bitCast(@as(f32, @floatCast(value)))))));
return;
},
else => unreachable,
}
},
.Bool, .Null => {
head = 0xe0;
v = switch (TInf) {
.Bool => if (value) 21 else 20,
.Null => 22,
else => unreachable,
};
try encode(out, head, v);
return;
},
.Array => |arrayInfo| {
if (arrayInfo.child == u8) {
head = switch (options.slice_serialization_type) {
.TextString => blk: {
break :blk if (std.unicode.utf8ValidateSlice(value[0..])) 0x60 else 0x40;
},
// Otherwise it can only be ByteString or Integer (and Integer doesn't make sense in this context).
else => 0x40,
};
} else {
head = 0x80;
}
v = @as(u64, @intCast(value.len));
try encode(out, head, v);
if (arrayInfo.child == u8) {
try out.writeAll(value[0..]);
} else {
for (value) |x| {
try stringify(x, options, out);
}
}
return;
},
.Struct => |S| {
// Custom stringify function overrides default behaviour
const has_stringify = comptime std.meta.hasFn(T, "cborStringify");
if (has_stringify and !options.from_callback) {
// its probably better its set here otherwise people might forget
// to set it which leads to infinite loops.
var o = options;
o.from_callback = true;
return value.cborStringify(o, out);
}
head = 0xa0; // Struct becomes a Map.
// Count the number of fields that should be serialized
inline for (S.fields) |Field| {
// don't include void fields
if (Field.type == void) continue;
var emit_field = true;
var field_setting: ?FieldSettings = null;
for (options.field_settings) |fs| {
if (std.mem.eql(u8, Field.name, fs.name)) {
field_setting = fs;
}
}
if (field_setting != null and field_setting.?.field_options.skip == .Skip) {
emit_field = false;
}
// dont't include (optional) null fields
if (emit_field and @typeInfo(Field.type) == .Optional) {
if (((field_setting != null and field_setting.?.field_options.skip == .SkipIfNull) or field_setting == null) and @field(value, Field.name) == null) {
emit_field = false;
}
}
if (emit_field) {
v += 1;
}
}
try encode(out, head, v);
// Now serialize the actual fields
inline for (S.fields) |Field| {
// don't include void fields
if (Field.type == void) continue;
var emit_field = true;
var child_options = options;
var name: []const u8 = Field.name[0..];
var name_st: SerializationType = .TextString;
var field_setting: ?FieldSettings = null;
for (options.field_settings) |fs| {
if (std.mem.eql(u8, Field.name, fs.name)) {
field_setting = fs;
break;
}
}
if (field_setting != null and field_setting.?.field_options.skip == .Skip) {
emit_field = false;
}
// dont't include (optional) null fields
if (emit_field and @typeInfo(Field.type) == .Optional) {
if (((field_setting != null and field_setting.?.field_options.skip == .SkipIfNull) or field_setting == null) and @field(value, Field.name) == null) {
emit_field = false;
}
}
if (field_setting != null) {
child_options = field_setting.?.value_options;
if (field_setting.?.field_options.alias) |alias| {
name = alias;
}
name_st = field_setting.?.field_options.serialization_type;
}
if (emit_field) {
child_options.from_callback = false;
const nr = s2n(name);
if (name_st == .Integer and nr != null) { // int key
try stringify(nr.?, Options{}, out); // key
} else { // str key
try stringify(name, Options{
.slice_serialization_type = name_st,
}, out); // key
}
try stringify(@field(value, Field.name), child_options, out); // value
}
}
return;
},
.Optional => {
if (value) |payload| {
try stringify(payload, options, out);
return;
} else {
try stringify(null, options, out);
return;
}
},
.Pointer => |ptr_info| switch (ptr_info.size) {
.Slice => {
if (ptr_info.child == u8) {
head = switch (options.slice_serialization_type) {
.TextString => blk: {
break :blk if (std.unicode.utf8ValidateSlice(value[0..])) 0x60 else 0x40;
},
// Otherwise it can only be ByteString or Integer (and Integer doesn't make sense in this context).
else => 0x40,
};
} else {
head = 0x80;
}
v = @as(u64, @intCast(value.len));
try encode(out, head, v);
if (ptr_info.child == u8) {
try out.writeAll(value);
} else {
for (value) |x| {
try stringify(x, options, out);
}
}
return;
},
.One => {
try stringify(value.*, options, out);
return;
},
else => @compileError("Unable to stringify type '" ++ @typeName(T) ++ "'"),
},
.Enum => |enumInfo| {
if (options.enum_serialization_type == .TextString) {
const tmp = @intFromEnum(value);
inline for (enumInfo.fields) |field| {
if (field.value == tmp) {
v = @as(u64, @intCast(field.name.len));
try encode(out, 0x60, v);
try out.writeAll(field.name);
return;
}
}
} else {
const tmp = @intFromEnum(value);
head = if (tmp < 0) 0x20 else 0;
v = @as(u64, @intCast(if (tmp < 0) -(tmp + 1) else tmp));
try encode(out, head, v);
return;
}
},
.Union => {
const has_stringify = comptime std.meta.hasFn(T, "cborStringify");
if (has_stringify and !options.from_callback) {
var o = options;
o.from_callback = true;
return value.cborStringify(options, out);
}
const info = @typeInfo(T).Union;
if (info.tag_type) |UnionTagType| {
inline for (info.fields) |u_field| {
if (value == @field(UnionTagType, u_field.name)) {
try stringify(@field(value, u_field.name), options, out);
break;
}
}
return;
} else {
@compileError("Unable to stringify untagged union '" ++ @typeName(T) ++ "'");
}
},
else => {
return .UnsupportedItem;
}, // TODO: add remaining options
}
}
fn s2n(s: []const u8) ?i65 {
if (s.len < 1) return null;
const start: usize = if (s[0] == '-') 1 else 0;
var x: i64 = 0;
for (s[start..]) |c| {
if (c > 57 or c < 48) return null;
x *= 10;
x += @as(i64, @intCast(c - 48));
}
return if (start == 1) -x else x;
}
fn cmp(l: []const u8, r: []const u8) bool {
if (l.len != r.len) return false;
var i: usize = 0;
while (i < l.len) : (i += 1) {
if (l[i] != r[i]) return false;
}
return true;
}
fn encode(out: anytype, head: u8, v: u64) !void {
switch (v) {
0x00...0x17 => {
try out.writeByte(head | @as(u8, @intCast(v)));
},
0x18...0xff => {
try out.writeByte(head | 24);
try out.writeByte(@as(u8, @intCast(v)));
},
0x0100...0xffff => try cbor.encode_2(out, head, v),
0x00010000...0xffffffff => try cbor.encode_4(out, head, v),
0x0000000100000000...0xffffffffffffffff => try cbor.encode_8(out, head, v),
}
}
fn testStringify(e: []const u8, v: anytype, o: Options) !void {
const allocator = std.testing.allocator;
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try stringify(v, o, str.writer());
try std.testing.expectEqualSlices(u8, e, str.items);
}
test "parse boolean" {
const t = try DataItem.new("\xf5");
const f = try DataItem.new("\xf4");
const u = try DataItem.new("\xf7");
const i = try DataItem.new("\x0b");
try std.testing.expectEqual(true, try parse(bool, t, .{}));
try std.testing.expectEqual(false, try parse(bool, f, .{}));
try std.testing.expectError(ParseError.UnexpectedItem, parse(bool, u, .{}));
try std.testing.expectError(ParseError.UnexpectedItem, parse(bool, i, .{}));
}
test "parse float" {
const f1 = try DataItem.new("\xfb\x3f\xf1\x99\x99\x99\x99\x99\x9a");
const f2 = try DataItem.new("\xFB\x40\x1D\x67\x86\xC2\x26\x80\x9D");
const f3 = try DataItem.new("\xFB\xC0\x28\x1E\xB8\x51\xEB\x85\x1F");
try std.testing.expectApproxEqRel(try parse(f16, f1, .{}), 1.1, 0.01);
try std.testing.expectApproxEqRel(try parse(f16, f2, .{}), 7.3511, 0.01);
try std.testing.expectApproxEqRel(try parse(f32, f2, .{}), 7.3511, 0.01);
try std.testing.expectApproxEqRel(try parse(f32, f3, .{}), -12.06, 0.01);
try std.testing.expectApproxEqRel(try parse(f64, f3, .{}), -12.06, 0.01);
}
test "stringify float" {
try testStringify("\xf9\x00\x00", @as(f16, @floatCast(0.0)), .{});
try testStringify("\xf9\x80\x00", @as(f16, @floatCast(-0.0)), .{});
try testStringify("\xf9\x3c\x00", @as(f16, @floatCast(1.0)), .{});
try testStringify("\xf9\x3e\x00", @as(f16, @floatCast(1.5)), .{});
try testStringify("\xf9\x7b\xff", @as(f16, @floatCast(65504.0)), .{});
try testStringify("\xfa\x47\xc3\x50\x00", @as(f32, @floatCast(100000.0)), .{});
try testStringify("\xfa\x7f\x7f\xff\xff", @as(f32, @floatCast(3.4028234663852886e+38)), .{});
try testStringify("\xfb\x7e\x37\xe4\x3c\x88\x00\x75\x9c", @as(f64, @floatCast(1.0e+300)), .{});
try testStringify("\xfb\xc0\x10\x66\x66\x66\x66\x66\x66", @as(f64, @floatCast(-4.1)), .{});
try testStringify("\xfa\x47\xc3\x50\x00", 100000.0, .{});
}
test "parse int" {
const i_1 = try DataItem.new("\x18\xff");
const i_2 = try DataItem.new("\x19\x01\x00");
try std.testing.expectEqual(try parse(u8, i_1, .{}), 255);
try std.testing.expectError(ParseError.Overflow, parse(u8, i_2, .{}));
}
test "stringify int" {
try testStringify("\x00", 0, .{});
try testStringify("\x01", 1, .{});
try testStringify("\x0a", 10, .{});
try testStringify("\x17", 23, .{});
try testStringify("\x18\x18", 24, .{});
try testStringify("\x18\x19", 25, .{});
try testStringify("\x18\x64", 100, .{});
try testStringify("\x18\x7b", 123, .{});
try testStringify("\x19\x03\xe8", 1000, .{});
try testStringify("\x19\x04\xd2", 1234, .{});
try testStringify("\x1a\x00\x01\xe2\x40", 123456, .{});
try testStringify("\x1a\x00\x0f\x42\x40", 1000000, .{});
try testStringify("\x1b\x00\x00\x00\x02\xdf\xdc\x1c\x34", 12345678900, .{});
try testStringify("\x1b\x00\x00\x00\xe8\xd4\xa5\x10\x00", 1000000000000, .{});
try testStringify("\x1b\xff\xff\xff\xff\xff\xff\xff\xff", 18446744073709551615, .{});
try testStringify("\x20", -1, .{});
try testStringify("\x22", -3, .{});
try testStringify("\x38\x63", -100, .{});
try testStringify("\x39\x01\xf3", -500, .{});
try testStringify("\x39\x03\xe7", -1000, .{});
try testStringify("\x3a\x00\x0f\x3d\xdc", -998877, .{});
try testStringify("\x3b\x00\x00\x00\x02\x53\x60\xa2\xce", -9988776655, .{});
try testStringify("\x3b\xff\xff\xff\xff\xff\xff\xff\xff", -18446744073709551616, .{});
}
test "parse struct: 1" {
const Config = struct {
vals: struct { testing: u8, production: u8 },
uptime: u64,
};
const di = try DataItem.new("\xa2\x64\x76\x61\x6c\x73\xa2\x67\x74\x65\x73\x74\x69\x6e\x67\x01\x6a\x70\x72\x6f\x64\x75\x63\x74\x69\x6f\x6e\x18\x2a\x66\x75\x70\x74\x69\x6d\x65\x19\x27\x0f");
const c = try parse(Config, di, .{});
try std.testing.expectEqual(c.uptime, 9999);
try std.testing.expectEqual(c.vals.testing, 1);
try std.testing.expectEqual(c.vals.production, 42);
}
test "parse struct: 2 (optional missing field)" {
const Config = struct {
vals: struct { testing: u8, production: ?u8 },
uptime: u64,
};
const di = try DataItem.new("\xa2\x64\x76\x61\x6c\x73\xa1\x67\x74\x65\x73\x74\x69\x6e\x67\x01\x66\x75\x70\x74\x69\x6d\x65\x19\x27\x0f");
const c = try parse(Config, di, .{});
try std.testing.expectEqual(c.vals.production, null);
}
test "parse struct: 3 (missing field)" {
const Config = struct {
vals: struct { testing: u8, production: u8 },
uptime: u64,
};
const di = try DataItem.new("\xa2\x64\x76\x61\x6c\x73\xa1\x67\x74\x65\x73\x74\x69\x6e\x67\x01\x66\x75\x70\x74\x69\x6d\x65\x19\x27\x0f");
try std.testing.expectError(ParseError.MissingField, parse(Config, di, .{}));
}
test "parse struct: 4 (unknown field)" {
const Config = struct {
vals: struct { testing: u8 },
uptime: u64,
};
const di = try DataItem.new("\xa2\x64\x76\x61\x6c\x73\xa2\x67\x74\x65\x73\x74\x69\x6e\x67\x01\x6a\x70\x72\x6f\x64\x75\x63\x74\x69\x6f\x6e\x18\x2a\x66\x75\x70\x74\x69\x6d\x65\x19\x27\x0f");
try std.testing.expectError(ParseError.UnknownField, parse(Config, di, .{ .ignore_unknown_fields = false }));
}
test "parse struct: 7" {
const allocator = std.testing.allocator;
const Config = struct {
@"1": struct { @"1": u8, @"2": u8 },
@"2": u64,
};
const di = try DataItem.new("\xA2\x01\xA2\x01\x01\x02\x18\x2A\x02\x19\x27\x0F");
const c = try parse(Config, di, .{ .allocator = allocator });
try std.testing.expectEqual(c.@"2", 9999);
try std.testing.expectEqual(c.@"1".@"1", 1);
try std.testing.expectEqual(c.@"1".@"2", 42);
}
test "parse optional value" {
const e1: ?u32 = 1234;
const e2: ?u32 = null;
try std.testing.expectEqual(e1, try parse(?u32, try DataItem.new("\x19\x04\xD2"), .{}));
try std.testing.expectEqual(e2, try parse(?u32, try DataItem.new("\xf6"), .{}));
try std.testing.expectEqual(e2, try parse(?u32, try DataItem.new("\xf7"), .{}));
}
test "stringify optional value" {
const e1: ?u32 = 1234;
const e2: ?u32 = null;
try testStringify("\xf6", e2, .{});
try testStringify("\x19\x04\xd2", e1, .{});
}
test "parse array: 1" {
const e = [5]u8{ 1, 2, 3, 4, 5 };
const di = try DataItem.new("\x85\x01\x02\x03\x04\x05");
const x = try parse([5]u8, di, .{});
try std.testing.expectEqualSlices(u8, e[0..], x[0..]);
}
test "parse array: 2" {
const e = [5]?u8{ 1, null, 3, null, 5 };
const di = try DataItem.new("\x85\x01\xF6\x03\xF6\x05");
const x = try parse([5]?u8, di, .{});
try std.testing.expectEqualSlices(?u8, e[0..], x[0..]);
}
test "parse pointer" {
const allocator = std.testing.allocator;
const e1_1: u32 = 1234;
const e1: *const u32 = &e1_1;
const di1 = try DataItem.new("\x19\x04\xD2");
const c1 = try parse(*const u32, di1, .{ .allocator = allocator });
defer allocator.destroy(c1);
try std.testing.expectEqual(e1.*, c1.*);
var e2_1: u32 = 1234;
const e2: *u32 = &e2_1;
const di2 = try DataItem.new("\x19\x04\xD2");
const c2 = try parse(*u32, di2, .{ .allocator = allocator });
defer allocator.destroy(c2);
try std.testing.expectEqual(e2.*, c2.*);
}
test "parse slice" {
const allocator = std.testing.allocator;
const e1: []const u8 = &.{ 1, 2, 3, 4, 5 };
const di1 = try DataItem.new("\x45\x01\x02\x03\x04\x05");
const c1 = try parse([]const u8, di1, .{ .allocator = allocator });
defer allocator.free(c1);
try std.testing.expectEqualSlices(u8, e1, c1);
var e2 = [5]u8{ 1, 2, 3, 4, 5 };
const di2 = try DataItem.new("\x45\x01\x02\x03\x04\x05");
const c2 = try parse([]u8, di2, .{ .allocator = allocator });
defer allocator.free(c2);
try std.testing.expectEqualSlices(u8, e2[0..], c2);
}
test "stringify simple value" {
try testStringify("\xf4", false, .{});
try testStringify("\xf5", true, .{});
try testStringify("\xf6", null, .{});
}
test "stringify pointer" {
const x1: u32 = 1234;
const x1p: *const u32 = &x1;
const x2 = -18446744073709551616;
const x2p = &x2;
try testStringify("\x19\x04\xd2", x1p, .{});
try testStringify("\x3b\xff\xff\xff\xff\xff\xff\xff\xff", x2p, .{});
}
test "stringify slice" {
const s1: []const u8 = "a";
try testStringify("\x61\x61", s1, .{ .slice_serialization_type = .TextString });
const s2: []const u8 = "IETF";
try testStringify("\x64\x49\x45\x54\x46", s2, .{ .slice_serialization_type = .TextString });
const s3: []const u8 = "\"\\";
try testStringify("\x62\x22\x5c", s3, .{ .slice_serialization_type = .TextString });
const b1: []const u8 = &.{ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19 };
try testStringify(&.{ 0x58, 0x19, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19 }, b1, .{ .slice_serialization_type = .ByteString });
const b2: []const u8 = "\x10\x11\x12\x13\x14";
try testStringify("\x45\x10\x11\x12\x13\x14", b2, .{ .slice_serialization_type = .ByteString });
}
test "stringify struct: 1" {
const Info = struct {
versions: []const []const u8,
};
const i = Info{
.versions = &.{"FIDO_2_0"},
};
try testStringify("\xa1\x68\x76\x65\x72\x73\x69\x6f\x6e\x73\x81\x68\x46\x49\x44\x4f\x5f\x32\x5f\x30", i, .{ .field_settings = &.{.{ .name = "versions", .value_options = .{ .slice_serialization_type = .TextString } }} });
}
test "stringify struct: 2" {
const Info = struct {
@"1": []const []const u8,
};
const i = Info{
.@"1" = &.{"FIDO_2_0"},
};
try testStringify("\xa1\x01\x81\x68\x46\x49\x44\x4f\x5f\x32\x5f\x30", i, .{ .field_settings = &.{.{ .name = "1", .field_options = .{ .serialization_type = .Integer }, .value_options = .{ .slice_serialization_type = .TextString } }} });
}
test "stringify struct: 3" {
const Info = struct {
@"1": []const []const u8,
@"2": []const []const u8,
@"3": []const u8,
};
const i = Info{
.@"1" = &.{"FIDO_2_0"},
.@"2" = &.{},
.@"3" = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
};
try testStringify("\xa3\x01\x81\x68\x46\x49\x44\x4f\x5f\x32\x5f\x30\x02\x80\x03\x50\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", i, .{ .field_settings = &.{
.{ .name = "1", .field_options = .{ .serialization_type = .Integer }, .value_options = .{ .slice_serialization_type = .TextString } },
.{ .name = "2", .field_options = .{ .serialization_type = .Integer }, .value_options = .{ .slice_serialization_type = .TextString } },
.{ .name = "3", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
} });
}
test "stringify struct: 4" {
const Info = struct {
@"1": []const []const u8,
@"2": []const []const u8,
@"3": []const u8,
@"4": struct {
plat: bool,
rk: bool,
clientPin: ?bool,
up: bool,
uv: ?bool,
},
@"5": ?u64,
@"6": ?[]const u64,
};
const i = Info{
.@"1" = &.{"FIDO_2_0"},
.@"2" = &.{},
.@"3" = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
.@"4" = .{
.plat = true,
.rk = true,
.clientPin = null,
.up = true,
.uv = false,
},
.@"5" = null,
.@"6" = null,
};
try testStringify("\xa4\x01\x81\x68\x46\x49\x44\x4f\x5f\x32\x5f\x30\x02\x80\x03\x50\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x04\xa4\x64\x70\x6c\x61\x74\xf5\x62\x72\x6b\xf5\x62\x75\x70\xf5\x62\x75\x76\xf4", i, .{ .field_settings = &.{
.{ .name = "1", .field_options = .{ .serialization_type = .Integer }, .value_options = .{ .slice_serialization_type = .TextString } },
.{ .name = "2", .field_options = .{ .serialization_type = .Integer }, .value_options = .{ .slice_serialization_type = .TextString } },
.{ .name = "3", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
.{ .name = "4", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
.{ .name = "5", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
.{ .name = "6", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
} });
}
test "stringify struct: 5" {
const Level = enum(u8) {
high = 7,
low = 11,
};
const Info = struct {
x: Level,
y: Level,
};
const x = Info{
.x = Level.high,
.y = Level.low,
};
try testStringify("\xA2\x61\x78\x64\x68\x69\x67\x68\x61\x79\x0B", x, .{ .field_settings = &.{.{ .name = "y", .value_options = .{ .enum_serialization_type = .Integer } }} });
}
test "parse struct: 5" {
const allocator = std.testing.allocator;
const di = try DataItem.new("\xa4\x01\x81\x68\x46\x49\x44\x4f\x5f\x32\x5f\x30\x02\x80\x03\x50\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x04\xa4\x64\x70\x6c\x61\x74\xf5\x62\x72\x6b\xf5\x62\x75\x70\xf5\x62\x75\x76\xf4");
const Info = struct {
@"1": []const []const u8,
@"2": []const []const u8,
@"3": []const u8,
@"4": struct {
plat: bool,
rk: bool,
clientPin: ?bool,
up: bool,
uv: ?bool,
},
@"5": ?u64,
@"6": ?[]const u64,
};
const i = try parse(Info, di, .{ .allocator = allocator });
defer {
allocator.free(i.@"1"[0]);
allocator.free(i.@"1");
allocator.free(i.@"2");
allocator.free(i.@"3");
}
try std.testing.expectEqualStrings("FIDO_2_0", i.@"1"[0]);
}
test "parse struct: 8" {
const Level = enum(u8) {
high = 7,
low = 11,
};
const Info = struct {
x: Level,
y: Level,
};
const di = try DataItem.new("\xA2\x61\x78\x64\x68\x69\x67\x68\x61\x79\x0B");
const x = try parse(Info, di, .{});
try std.testing.expectEqual(x.x, Level.high);
try std.testing.expectEqual(x.y, Level.low);
}
test "stringify enum: 1" {
const Level = enum(u8) {
high = 7,
low = 11,
};
const allocator = std.testing.allocator;
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
const high = Level.high;
const low = Level.low;
try testStringify("\x07", high, .{ .enum_serialization_type = .Integer });
try testStringify("\x0b", low, .{ .enum_serialization_type = .Integer });
}
test "stringify enum: 2" {
const Level = enum(u8) {
high = 7,
low = 11,
};
const allocator = std.testing.allocator;
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try testStringify("\x64\x68\x69\x67\x68", Level.high, .{});
try testStringify("\x63\x6C\x6F\x77", Level.low, .{});
}
test "stringify enum: 4" {
const Level = enum(i8) {
high = -7,
low = -11,
};
try testStringify("\x26", Level.high, .{ .enum_serialization_type = .Integer });
try testStringify("\x2a", Level.low, .{ .enum_serialization_type = .Integer });
}
test "parse enum: 1" {
const Level = enum(u8) {
high = 7,
low = 11,
};
const di1 = try DataItem.new("\x64\x68\x69\x67\x68");
const di2 = try DataItem.new("\x63\x6C\x6F\x77");
const x1 = try parse(Level, di1, .{});
const x2 = try parse(Level, di2, .{});
try std.testing.expectEqual(Level.high, x1);
try std.testing.expectEqual(Level.low, x2);
}
test "parse enum: 2" {
const Level = enum(u8) {
high = 7,
low = 11,
};
const di1 = try DataItem.new("\x07");
const di2 = try DataItem.new("\x0b");
const x1 = try parse(Level, di1, .{});
const x2 = try parse(Level, di2, .{});
try std.testing.expectEqual(Level.high, x1);
try std.testing.expectEqual(Level.low, x2);
}
test "parse enum: 3" {
const Level = enum(i8) {
high = -7,
low = -11,
};
const di1 = try DataItem.new("\x26");
const di2 = try DataItem.new("\x2a");
const x1 = try parse(Level, di1, .{});
const x2 = try parse(Level, di2, .{});
try std.testing.expectEqual(Level.high, x1);
try std.testing.expectEqual(Level.low, x2);
}
test "serialize EcdsaP256Key" {
const EcdsaP256 = std.crypto.sign.ecdsa.EcdsaP256Sha256;
const EcdsaP256Key = struct {
/// kty:
@"1": u8 = 2,
/// alg:
@"3": i8 = -7,
/// crv:
@"-1": u8 = 1,
/// x-coordinate
@"-2": [32]u8,
/// y-coordinate
@"-3": [32]u8,
pub fn new(k: EcdsaP256.PublicKey) @This() {
const xy = k.toUncompressedSec1();
return .{
.@"-2" = xy[1..33].*,
.@"-3" = xy[33..65].*,
};
}
};
const k = EcdsaP256Key.new(try EcdsaP256.PublicKey.fromSec1("\x04\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52"));
const allocator = std.testing.allocator;
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try stringify(k, .{
.field_settings = &.{
.{ .name = "1", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
.{ .name = "3", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
.{ .name = "-1", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
.{ .name = "-2", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
.{ .name = "-3", .field_options = .{ .serialization_type = .Integer }, .value_options = .{} },
},
}, str.writer());
try std.testing.expectEqualSlices(u8, "\xa5\x01\x02\x03\x26\x20\x01\x21\x58\x20\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\x22\x58\x20\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52", str.items);
}
test "serialize EcdsP256Key using alias" {
const EcdsaP256 = std.crypto.sign.ecdsa.EcdsaP256Sha256;
const EcdsaP256Key = struct {
/// kty:
kty: u8 = 2,
/// alg:
alg: i8 = -7,
/// crv:
crv: u8 = 1,
/// x-coordinate
x: [32]u8,
/// y-coordinate
y: [32]u8,
pub fn new(k: EcdsaP256.PublicKey) @This() {
const xy = k.toUncompressedSec1();
return .{
.x = xy[1..33].*,
.y = xy[33..65].*,
};
}
};
const k = EcdsaP256Key.new(try EcdsaP256.PublicKey.fromSec1("\x04\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52"));
const allocator = std.testing.allocator;
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try stringify(k, .{ .field_settings = &.{
.{ .name = "kty", .field_options = .{ .alias = "1", .serialization_type = .Integer } },
.{ .name = "alg", .field_options = .{ .alias = "3", .serialization_type = .Integer } },
.{ .name = "crv", .field_options = .{ .alias = "-1", .serialization_type = .Integer } },
.{ .name = "x", .field_options = .{ .alias = "-2", .serialization_type = .Integer } },
.{ .name = "y", .field_options = .{ .alias = "-3", .serialization_type = .Integer } },
} }, str.writer());
try std.testing.expectEqualSlices(u8, "\xa5\x01\x02\x03\x26\x20\x01\x21\x58\x20\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\x22\x58\x20\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52", str.items);
}
test "deserialize EcdsP256Key using alias" {
const EcdsaP256Key = struct {
/// kty:
kty: u8 = 2,
/// alg:
alg: i8 = -7,
/// crv:
crv: u8 = 1,
/// x-coordinate
x: [32]u8,
/// y-coordinate
y: [32]u8,
};
const di = try DataItem.new("\xa5\x01\x02\x03\x26\x20\x01\x21\x58\x20\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\x22\x58\x20\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52");
const x = try parse(EcdsaP256Key, di, .{ .field_settings = &.{
.{ .name = "kty", .field_options = .{ .alias = "1", .serialization_type = .Integer } },
.{ .name = "alg", .field_options = .{ .alias = "3", .serialization_type = .Integer } },
.{ .name = "crv", .field_options = .{ .alias = "-1", .serialization_type = .Integer } },
.{ .name = "x", .field_options = .{ .alias = "-2", .serialization_type = .Integer } },
.{ .name = "y", .field_options = .{ .alias = "-3", .serialization_type = .Integer } },
} });
try std.testing.expectEqual(@as(u8, @intCast(2)), x.kty);
try std.testing.expectEqual(@as(i8, @intCast(-7)), x.alg);
try std.testing.expectEqual(@as(u8, @intCast(1)), x.crv);
try std.testing.expectEqualSlices(u8, "\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e", &x.x);
try std.testing.expectEqualSlices(u8, "\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52", &x.y);
}
test "deserialize EcdsP256Key using alias 2" {
const EcdsaP256Key = struct {
/// kty:
kty: u8 = 2,
/// alg:
alg: i8 = -7,
/// crv:
crv: u8 = 1,
/// x-coordinate
x: [32]u8,
/// y-coordinate
y: [32]u8,
pub fn cborParse(item: DataItem, options: Options) !@This() {
_ = options;
return try parse(@This(), item, .{
.from_callback = true, // prevent infinite loops
.field_settings = &.{
.{ .name = "kty", .field_options = .{ .alias = "1", .serialization_type = .Integer } },
.{ .name = "alg", .field_options = .{ .alias = "3", .serialization_type = .Integer } },
.{ .name = "crv", .field_options = .{ .alias = "-1", .serialization_type = .Integer } },
.{ .name = "x", .field_options = .{ .alias = "-2", .serialization_type = .Integer } },
.{ .name = "y", .field_options = .{ .alias = "-3", .serialization_type = .Integer } },
},
});
}
};
const di = try DataItem.new("\xa5\x01\x02\x03\x26\x20\x01\x21\x58\x20\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\x22\x58\x20\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52");
const x = try parse(EcdsaP256Key, di, .{});
try std.testing.expectEqual(@as(u8, @intCast(2)), x.kty);
try std.testing.expectEqual(@as(i8, @intCast(-7)), x.alg);
try std.testing.expectEqual(@as(u8, @intCast(1)), x.crv);
try std.testing.expectEqualSlices(u8, "\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e", &x.x);
try std.testing.expectEqualSlices(u8, "\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52", &x.y);
}
test "serialize tagged union: 1" {
const AttStmtTag = enum { none };
const AttStmt = union(AttStmtTag) {
none: struct {},
};
const a = AttStmt{ .none = .{} };
try testStringify("\xa0", a, .{});
}
const build = @import("build.zig");
test "overload struct 1" {
const Foo = struct {
x: u32 = 1234,
y: struct {
a: []const u8 = "public-key",
b: u64 = 0x1122334455667788,
},
pub fn cborStringify(self: *const @This(), options: Options, out: anytype) !void {
// We could also pass the given options to stringify if we expect
// specific settings.
_ = options;
// First stringify the 'y' struct
const allocator = std.testing.allocator;
var o = std.ArrayList(u8).init(allocator);
defer o.deinit();
try stringify(self.y, .{ .field_settings = &.{
.{ .name = "a", .value_options = .{ .slice_serialization_type = .TextString } },
} }, o.writer());
// Then use the Builder to alter the CBOR output
var b = try build.Builder.withType(allocator, .Map);
try b.pushTextString("x");
try b.pushInt(self.x);
try b.pushTextString("y");
try b.pushByteString(o.items);
const x = try b.finish();
defer allocator.free(x);
try out.writeAll(x);
}
};
const x = Foo{ .y = .{} };
try testStringify("\xa2\x61\x78\x19\x04\xd2\x61\x79\x58\x19\xa2\x61\x61\x6a\x70\x75\x62\x6c\x69\x63\x2d\x6b\x65\x79\x61\x62\x1b\x11\x22\x33\x44\x55\x66\x77\x88", x, .{});
}
test "parse get assertion request 1" {
const GetAssertionParam = struct {
rpId: [:0]const u8,
clientDataHash: []const u8,
allowList: ?[]const struct {
id: []const u8,
type: [:0]const u8,
transports: ?[]const [:0]const u8 = null,
} = null,
options: ?struct {
up: bool = true,
rk: bool = true,
uv: bool = false,
} = null,
pinUvAuthParam: ?[32]u8 = null,
pinUvAuthProtocol: ?u8 = null,
pub fn deinit(self: *const @This(), allocator: std.mem.Allocator) void {
allocator.free(self.rpId);
allocator.free(self.clientDataHash);
if (self.allowList) |pkcds| {
for (pkcds) |pkcd| {
allocator.free(pkcd.id);
allocator.free(pkcd.type);
if (pkcd.transports) |trans| {
for (trans) |t| {
allocator.free(t);
}
allocator.free(trans);
}
}
allocator.free(pkcds);
}
}
};
const allocator = std.testing.allocator;
const payload = "\xa6\x01\x6b\x77\x65\x62\x61\x75\x74\x68\x6e\x2e\x69\x6f\x02\x58\x20\x6e\x0c\xb5\xf9\x7c\xae\xb8\xbf\x79\x7a\x62\x14\xc7\x19\x1c\x80\x8f\xe5\xa5\x50\x21\xf9\xfb\x76\x6e\x81\x83\xcd\x8a\x0d\x55\x0b\x03\x81\xa2\x62\x69\x64\x58\x40\xf9\xff\xff\xff\x95\xea\x72\x74\x2f\xa6\x03\xc3\x51\x9f\x9c\x17\xc0\xff\x81\xc4\x5d\xbb\x46\xe2\x3c\xff\x6f\xc1\xd0\xd5\xb3\x64\x6d\x49\x5c\xb1\x1b\x80\xe5\x78\x88\xbf\xba\xe3\x89\x8d\x69\x85\xfc\x19\x6c\x43\xfd\xfc\x2e\x80\x18\xac\x2d\x5b\xb3\x79\xa1\xf0\x64\x74\x79\x70\x65\x6a\x70\x75\x62\x6c\x69\x63\x2d\x6b\x65\x79\x05\xa1\x62\x75\x70\xf4\x06\x58\x20\x30\x5b\x38\x2d\x1c\xd9\xb9\x71\x4d\x51\x98\x30\xe5\xb0\x02\xcb\x6c\x38\x25\xbc\x05\xf8\x7e\xf1\xbc\xda\x36\x4d\x2d\x4d\xb9\x10\x07\x02";
const di = try DataItem.new(payload);
const get_assertion_param = try parse(
GetAssertionParam,
di,
.{
.allocator = allocator,
.field_settings = &.{
.{ .name = "rpId", .field_options = .{ .alias = "1", .serialization_type = .Integer } },
.{ .name = "clientDataHash", .field_options = .{ .alias = "2", .serialization_type = .Integer } },
.{ .name = "allowList", .field_options = .{ .alias = "3", .serialization_type = .Integer } },
.{ .name = "options", .field_options = .{ .alias = "5", .serialization_type = .Integer } },
.{ .name = "pinUvAuthParam", .field_options = .{ .alias = "6", .serialization_type = .Integer } },
.{ .name = "pinUvAuthProtocol", .field_options = .{ .alias = "7", .serialization_type = .Integer } },
},
},
);
defer get_assertion_param.deinit(allocator);
try std.testing.expectEqual(false, get_assertion_param.options.?.up);
}
test "skip serializing field #1" {
const allocator = std.testing.allocator;
const S = struct {
a: i32,
b: bool,
c: [5]u8,
};
const s = S{
.a = 32,
.b = true,
.c = "abcde".*,
};
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try stringify(s, .{ .field_settings = &.{
.{ .name = "b", .field_options = .{ .skip = .Skip } },
.{ .name = "c", .value_options = .{ .slice_serialization_type = .TextString } },
} }, str.writer());
try std.testing.expectEqualSlices(u8, "\xa2\x61\x61\x18\x20\x61\x63\x65\x61\x62\x63\x64\x65", str.items);
}
test "skip serializing field #2" {
const allocator = std.testing.allocator;
const S = struct {
a: []u8,
b: std.mem.Allocator,
};
const s = S{
.a = try allocator.alloc(u8, 5),
.b = allocator,
};
@memcpy(s.a, "abcde");
defer allocator.free(s.a);
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try stringify(s, .{ .field_settings = &.{
.{ .name = "a", .value_options = .{ .slice_serialization_type = .TextString } },
.{ .name = "b", .field_options = .{ .skip = .Skip } },
} }, str.writer());
try std.testing.expectEqualSlices(u8, "\xa1\x61\x61\x65\x61\x62\x63\x64\x65", str.items);
}
test "assign allocator to allocator fields #1" {
const allocator = std.testing.allocator;
const S = struct {
a: []u8,
b: std.mem.Allocator,
};
const di = try DataItem.new("\xa1\x61\x61\x65\x61\x62\x63\x64\x65");
const x = try parse(S, di, .{ .allocator = allocator });
defer allocator.free(x.a);
try std.testing.expectEqualSlices(u8, "abcde", x.a);
}
test "ArrayBackedSlice test #1" {
const allocator = std.testing.allocator;
const S64B = ArrayBackedSlice(64, u8, .Byte);
var x = S64B{};
try x.set("\x01\x02\x03\x04");
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try stringify(x, .{}, str.writer());
try std.testing.expectEqualSlices(u8, "\x44\x01\x02\x03\x04", str.items);
const di = try DataItem.new(str.items);
const y = try parse(S64B, di, .{});
try std.testing.expectEqualSlices(u8, "\x01\x02\x03\x04", y.get());
}
|
0 | repos/zbor | repos/zbor/src/main.zig | const std = @import("std");
const Allocator = std.mem.Allocator;
const testing = std.testing;
const cbor = @import("cbor.zig");
const parser = @import("parse.zig");
pub const cose = @import("cose.zig");
pub const build = @import("build.zig");
pub const Type = cbor.Type;
pub const DataItem = cbor.DataItem;
pub const Tag = cbor.Tag;
pub const Pair = cbor.Pair;
pub const MapIterator = cbor.MapIterator;
pub const ArrayIterator = cbor.ArrayIterator;
pub const ParseError = parser.ParseError;
pub const StringifyError = parser.StringifyError;
pub const Options = parser.Options;
pub const SerializationType = parser.SerializationType;
pub const SkipBehavior = parser.SkipBehavior;
pub const FieldSettings = parser.FieldSettings;
pub const parse = parser.parse;
pub const stringify = parser.stringify;
pub const Builder = build.Builder;
pub const ContainerType = build.ContainerType;
pub const ArrayBackedSlice = parser.ArrayBackedSlice;
pub const ArrayBackedSliceType = parser.ArrayBackedSliceType;
// TODO: can we somehow read this from build.zig.zon???
pub const VERSION: []const u8 = "0.15.0";
test "main tests" {
_ = cbor;
_ = parser;
_ = cose;
_ = build;
}
|
0 | repos/zbor | repos/zbor/src/tests.zig | const std = @import("std");
const Allocator = std.mem.Allocator;
const testing = std.testing;
const core = @import("core.zig");
const CborError = core.CborError;
const Pair = core.Pair;
const Tag = core.Tag;
const FloatTag = core.FloatTag;
const Float = core.Float;
const SimpleValue = core.SimpleValue;
const DataItemTag = core.DataItemTag;
const DataItem = core.DataItem;
const encode = @import("encoder.zig").encode;
const encodeAlloc = @import("encoder.zig").encodeAlloc;
const decode = @import("decoder.zig").decode;
const TestError = CborError || error{ TestExpectedEqual, TestUnexpectedResult };
fn test_data_item(data: []const u8, expected: DataItem) TestError!void {
const allocator = std.testing.allocator;
const dip = try decode(allocator, data);
defer dip.deinit(allocator);
try std.testing.expectEqual(expected, dip);
}
fn test_data_item_eql(data: []const u8, expected: *const DataItem) TestError!void {
const allocator = std.testing.allocator;
const dip = try decode(allocator, data);
defer dip.deinit(allocator);
try std.testing.expect(expected.*.equal(&dip));
}
test "DataItem.equal test" {
const di1 = DataItem{ .int = 10 };
const di2 = DataItem{ .int = 23 };
const di3 = DataItem{ .int = 23 };
const di4 = DataItem{ .int = -9988776655 };
try std.testing.expect(!di1.equal(&di2));
try std.testing.expect(di2.equal(&di3));
try std.testing.expect(!di1.equal(&di4));
try std.testing.expect(!di2.equal(&di4));
try std.testing.expect(!di3.equal(&di4));
var allocator = std.testing.allocator;
var di5 = try DataItem.bytes(&.{10}, .{ .allocator = allocator });
defer di5.deinit(allocator);
try std.testing.expect(!di5.equal(&di1));
try std.testing.expect(!di1.equal(&di5));
try std.testing.expect(di5.equal(&di5));
var di6 = try DataItem.bytes(&.{10}, .{ .allocator = allocator });
defer di6.deinit(allocator);
try std.testing.expect(di5.equal(&di6));
}
test "MT0: decode cbor unsigned integer value" {
try test_data_item(&.{0x00}, DataItem{ .int = 0 });
try test_data_item(&.{0x01}, DataItem{ .int = 1 });
try test_data_item(&.{0x0a}, DataItem{ .int = 10 });
try test_data_item(&.{0x17}, DataItem{ .int = 23 });
try test_data_item(&.{ 0x18, 0x18 }, DataItem{ .int = 24 });
try test_data_item(&.{ 0x18, 0x19 }, DataItem{ .int = 25 });
try test_data_item(&.{ 0x18, 0x64 }, DataItem{ .int = 100 });
try test_data_item(&.{ 0x18, 0x7b }, DataItem{ .int = 123 });
try test_data_item(&.{ 0x19, 0x03, 0xe8 }, DataItem{ .int = 1000 });
try test_data_item(&.{ 0x19, 0x04, 0xd2 }, DataItem{ .int = 1234 });
try test_data_item(&.{ 0x1a, 0x00, 0x01, 0xe2, 0x40 }, DataItem{ .int = 123456 });
try test_data_item(&.{ 0x1a, 0x00, 0x0f, 0x42, 0x40 }, DataItem{ .int = 1000000 });
try test_data_item(&.{ 0x1b, 0x00, 0x00, 0x00, 0x02, 0xdf, 0xdc, 0x1c, 0x34 }, DataItem{ .int = 12345678900 });
try test_data_item(&.{ 0x1b, 0x00, 0x00, 0x00, 0xe8, 0xd4, 0xa5, 0x10, 0x00 }, DataItem{ .int = 1000000000000 });
try test_data_item(&.{ 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, DataItem{ .int = 18446744073709551615 });
}
test "MT1: decode cbor signed integer value" {
try test_data_item(&.{0x20}, DataItem{ .int = -1 });
try test_data_item(&.{0x22}, DataItem{ .int = -3 });
try test_data_item(&.{ 0x38, 0x63 }, DataItem{ .int = -100 });
try test_data_item(&.{ 0x39, 0x01, 0xf3 }, DataItem{ .int = -500 });
try test_data_item(&.{ 0x39, 0x03, 0xe7 }, DataItem{ .int = -1000 });
try test_data_item(&.{ 0x3a, 0x00, 0x0f, 0x3d, 0xdc }, DataItem{ .int = -998877 });
try test_data_item(&.{ 0x3b, 0x00, 0x00, 0x00, 0x02, 0x53, 0x60, 0xa2, 0xce }, DataItem{ .int = -9988776655 });
try test_data_item(&.{ 0x3b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, DataItem{ .int = -18446744073709551616 });
}
test "MT2: decode cbor byte string" {
const allocator = std.testing.allocator;
try test_data_item_eql(&.{0b01000000}, &DataItem{ .bytes = &.{} });
var di1 = try DataItem.bytes(&.{10}, .{ .allocator = allocator });
defer di1.deinit(allocator);
try test_data_item_eql(&.{ 0b01000001, 0x0a }, &di1);
var di2 = try DataItem.bytes(&.{ 10, 11, 12, 13, 14 }, .{ .allocator = allocator });
defer di2.deinit(allocator);
try test_data_item_eql(&.{ 0b01000101, 0x0a, 0xb, 0xc, 0xd, 0xe }, &di2);
try std.testing.expectError(CborError.Malformed, decode(allocator, &.{ 0b01000011, 0x0a }));
try std.testing.expectError(CborError.Malformed, decode(allocator, &.{ 0b01000101, 0x0a, 0xb, 0xc }));
}
test "MT3: decode cbor text string" {
const allocator = std.testing.allocator;
try test_data_item(&.{0x60}, try DataItem.text(&.{}, .{ .allocator = allocator }));
const exp1 = try DataItem.text("a", .{ .allocator = allocator });
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{ 0x61, 0x61 });
defer di1.deinit(allocator);
try std.testing.expectEqualSlices(u8, exp1.text, di1.text);
try std.testing.expect(exp1.equal(&di1));
const exp2 = try DataItem.text("IETF", .{ .allocator = allocator });
defer exp2.deinit(allocator);
const di2 = try decode(allocator, &.{ 0x64, 0x49, 0x45, 0x54, 0x46 });
defer di2.deinit(allocator);
try std.testing.expectEqualSlices(u8, exp2.text, di2.text);
try std.testing.expect(exp2.equal(&di2));
const exp3 = try DataItem.text("\"\\", .{ .allocator = allocator });
defer exp3.deinit(allocator);
const di3 = try decode(allocator, &.{ 0x62, 0x22, 0x5c });
defer di3.deinit(allocator);
try std.testing.expectEqualSlices(u8, exp3.text, di3.text);
try std.testing.expect(exp3.equal(&di3));
try std.testing.expect(!exp1.equal(&di2));
try std.testing.expect(!exp1.equal(&di3));
try std.testing.expect(!exp2.equal(&di3));
// TODO: test unicode https://www.rfc-editor.org/rfc/rfc8949.html#name-examples-of-encoded-cbor-da
}
test "MT4: decode cbor array" {
const allocator = std.testing.allocator;
const exp1 = try DataItem.array(&.{}, .{ .allocator = allocator });
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{0x80});
defer di1.deinit(allocator);
try std.testing.expect(exp1.equal(&di1));
const exp2 = try DataItem.array(&.{ DataItem.int(1), DataItem.int(2), DataItem.int(3) }, .{ .allocator = allocator });
defer exp2.deinit(allocator);
const di2 = try decode(allocator, &.{ 0x83, 0x01, 0x02, 0x03 });
defer di2.deinit(allocator);
try std.testing.expect(exp2.equal(&di2));
const exp3 = try DataItem.array(&.{ DataItem.int(1), try DataItem.array(&.{ DataItem.int(2), DataItem.int(3) }, .{ .allocator = allocator }), try DataItem.array(&.{ DataItem.int(4), DataItem.int(5) }, .{ .allocator = allocator }) }, .{ .allocator = allocator });
defer exp3.deinit(allocator);
const di3 = try decode(allocator, &.{ 0x83, 0x01, 0x82, 0x02, 0x03, 0x82, 0x04, 0x05 });
defer di3.deinit(allocator);
try std.testing.expect(exp3.equal(&di3));
const exp4 = try DataItem.array(&.{ DataItem.int(1), DataItem.int(2), DataItem.int(3), DataItem.int(4), DataItem.int(5), DataItem.int(6), DataItem.int(7), DataItem.int(8), DataItem.int(9), DataItem.int(10), DataItem.int(11), DataItem.int(12), DataItem.int(13), DataItem.int(14), DataItem.int(15), DataItem.int(16), DataItem.int(17), DataItem.int(18), DataItem.int(19), DataItem.int(20), DataItem.int(21), DataItem.int(22), DataItem.int(23), DataItem.int(24), DataItem.int(25) }, .{ .allocator = allocator });
defer exp4.deinit(allocator);
const di4 = try decode(allocator, &.{ 0x98, 0x19, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x18, 0x18, 0x19 });
defer di4.deinit(allocator);
try std.testing.expect(exp4.equal(&di4));
try std.testing.expect(!exp1.equal(&di2));
try std.testing.expect(!exp1.equal(&di3));
try std.testing.expect(!exp1.equal(&di4));
try std.testing.expect(!exp2.equal(&di3));
try std.testing.expect(!exp2.equal(&di4));
try std.testing.expect(!exp3.equal(&di4));
}
test "MT5: decode empty cbor map" {
const allocator = std.testing.allocator;
const exp1 = try DataItem.map(&.{}, .{ .allocator = allocator });
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{0xa0});
defer di1.deinit(allocator);
try std.testing.expect(exp1.equal(&di1));
}
test "MT5: decode cbor map {1:2,3:4}" {
const allocator = std.testing.allocator;
const exp1 = try DataItem.map(&.{ Pair.new(DataItem.int(1), DataItem.int(2)), Pair.new(DataItem.int(3), DataItem.int(4)) }, .{ .allocator = allocator });
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{ 0xa2, 0x01, 0x02, 0x03, 0x04 });
defer di1.deinit(allocator);
try std.testing.expect(exp1.equal(&di1));
}
test "MT5: decode cbor map {\"a\":1,\"b\":[2,3]}" {
const allocator = std.testing.allocator;
const exp1 = try DataItem.map(&.{ Pair.new(try DataItem.text("a", .{ .allocator = allocator }), DataItem.int(1)), Pair.new(try DataItem.text("b", .{ .allocator = allocator }), try DataItem.array(&.{ DataItem.int(2), DataItem.int(3) }, .{ .allocator = allocator })) }, .{ .allocator = allocator });
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{ 0xa2, 0x61, 0x61, 0x01, 0x61, 0x62, 0x82, 0x02, 0x03 });
defer di1.deinit(allocator);
try std.testing.expect(exp1.equal(&di1));
}
test "MT5: decode cbor map within array [\"a\",{\"b\":\"c\"}]" {
const allocator = std.testing.allocator;
const exp1 = try DataItem.array(&.{ try DataItem.text("a", .{ .allocator = allocator }), try DataItem.map(&.{Pair.new(try DataItem.text("b", .{ .allocator = allocator }), try DataItem.text("c", .{ .allocator = allocator }))}, .{ .allocator = allocator }) }, .{ .allocator = allocator });
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{ 0x82, 0x61, 0x61, 0xa1, 0x61, 0x62, 0x61, 0x63 });
defer di1.deinit(allocator);
try std.testing.expect(exp1.equal(&di1));
}
test "MT5: decode cbor map of text pairs" {
const allocator = std.testing.allocator;
const exp1 = try DataItem.map(&.{ Pair.new(try DataItem.text("a", .{ .allocator = allocator }), try DataItem.text("A", .{ .allocator = allocator })), Pair.new(try DataItem.text("b", .{ .allocator = allocator }), try DataItem.text("B", .{ .allocator = allocator })), Pair.new(try DataItem.text("c", .{ .allocator = allocator }), try DataItem.text("C", .{ .allocator = allocator })), Pair.new(try DataItem.text("d", .{ .allocator = allocator }), try DataItem.text("D", .{ .allocator = allocator })), Pair.new(try DataItem.text("e", .{ .allocator = allocator }), try DataItem.text("E", .{ .allocator = allocator })) }, .{ .allocator = allocator });
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{ 0xa5, 0x61, 0x61, 0x61, 0x41, 0x61, 0x62, 0x61, 0x42, 0x61, 0x63, 0x61, 0x43, 0x61, 0x64, 0x61, 0x44, 0x61, 0x65, 0x61, 0x45 });
defer di1.deinit(allocator);
try std.testing.expect(exp1.equal(&di1));
}
test "MT6: decode cbor tagged data item 1(1363896240)" {
const allocator = std.testing.allocator;
const exp1 = try DataItem.tagged(allocator, 1, DataItem.int(1363896240));
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{ 0xc1, 0x1a, 0x51, 0x4b, 0x67, 0xb0 });
defer di1.deinit(allocator);
try std.testing.expect(exp1.equal(&di1));
}
test "MT6: decode cbor tagged data item 32(\"http://www.example.com\")" {
const allocator = std.testing.allocator;
const exp1 = try DataItem.tagged(allocator, 32, try DataItem.text("http://www.example.com", .{ .allocator = allocator }));
defer exp1.deinit(allocator);
const di1 = try decode(allocator, &.{ 0xd8, 0x20, 0x76, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d });
defer di1.deinit(allocator);
try std.testing.expect(exp1.equal(&di1));
try std.testing.expectEqualStrings(exp1.tag.content.text, di1.tag.content.text);
}
test "MT7: decode f16 0.0" {
const allocator = std.testing.allocator;
var expected = DataItem.float16(0.0);
var ne1 = DataItem.float16(0.1);
var ne2 = DataItem.float16(-0.1);
var ne3 = DataItem.float32(0.0);
var ne4 = DataItem.float64(0.0);
var di = try decode(allocator, &.{ 0xf9, 0x00, 0x00 });
try std.testing.expect(di.equal(&expected));
try std.testing.expect(!di.equal(&ne1));
try std.testing.expect(!di.equal(&ne2));
try std.testing.expect(!di.equal(&ne3));
try std.testing.expect(!di.equal(&ne4));
}
test "MT7: decode f16 -0.0" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float16 = -0.0 } };
var di = try decode(allocator, &.{ 0xf9, 0x80, 0x00 });
try std.testing.expectEqual(expected.float.float16, di.float.float16);
//try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f16 1.0" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float16 = 1.0 } };
var di = try decode(allocator, &.{ 0xf9, 0x3c, 0x00 });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f16 1.5" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float16 = 1.5 } };
var di = try decode(allocator, &.{ 0xf9, 0x3e, 0x00 });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f16 5.960464477539063e-8" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float16 = 5.960464477539063e-8 } };
var di = try decode(allocator, &.{ 0xf9, 0x00, 0x01 });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f16 0.00006103515625" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float16 = 0.00006103515625 } };
var di = try decode(allocator, &.{ 0xf9, 0x04, 0x00 });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f16 -4.0" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float16 = -4.0 } };
var di = try decode(allocator, &.{ 0xf9, 0xc4, 0x00 });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f32 100000.0" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float32 = 100000.0 } };
var di = try decode(allocator, &.{ 0xfa, 0x47, 0xc3, 0x50, 0x00 });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f32 3.4028234663852886e+38" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float32 = 3.4028234663852886e+38 } };
var di = try decode(allocator, &.{ 0xfa, 0x7f, 0x7f, 0xff, 0xff });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f64 1.1" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float64 = 1.1 } };
var di = try decode(allocator, &.{ 0xfb, 0x3f, 0xf1, 0x99, 0x99, 0x99, 0x99, 0x99, 0x9a });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f64 1.0e+300" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float64 = 1.0e+300 } };
var di = try decode(allocator, &.{ 0xfb, 0x7e, 0x37, 0xe4, 0x3c, 0x88, 0x00, 0x75, 0x9c });
try std.testing.expect(di.equal(&expected));
}
test "MT7: decode f64 -4.1" {
const allocator = std.testing.allocator;
var expected = DataItem{ .float = Float{ .float64 = -4.1 } };
var di = try decode(allocator, &.{ 0xfb, 0xc0, 0x10, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66 });
try std.testing.expect(di.equal(&expected));
}
test "MT7: simple value" {
const allocator = std.testing.allocator;
var expected1 = DataItem.False();
var di1 = try decode(allocator, &.{0xf4});
try std.testing.expect(di1.equal(&expected1));
var expected2 = DataItem.True();
var di2 = try decode(allocator, &.{0xf5});
try std.testing.expect(di2.equal(&expected2));
var expected3 = DataItem.Null();
var di3 = try decode(allocator, &.{0xf6});
try std.testing.expect(di3.equal(&expected3));
var expected4 = DataItem.Undefined();
var di4 = try decode(allocator, &.{0xf7});
try std.testing.expect(di4.equal(&expected4));
}
test "decode WebAuthn attestationObject" {
const allocator = std.testing.allocator;
const attestationObject = try std.fs.cwd().openFile("data/WebAuthnCreate.dat", .{ .mode = .read_only });
defer attestationObject.close();
const bytes = try attestationObject.readToEndAlloc(allocator, 4096);
defer allocator.free(bytes);
var di = try decode(allocator, bytes);
defer di.deinit(allocator);
try std.testing.expect(di.isMap());
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
const fmt = di.getValueByString("fmt");
try std.testing.expect(fmt.?.isText());
try std.testing.expectEqualStrings("fido-u2f", fmt.?.text);
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
const attStmt = di.getValueByString("attStmt");
try std.testing.expect(attStmt.?.isMap());
const authData = di.getValueByString("authData");
try std.testing.expect(authData.?.isBytes());
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
try std.testing.expectEqual(@as(usize, 196), authData.?.bytes.len);
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
const sig = attStmt.?.getValueByString("sig");
try std.testing.expect(sig.?.isBytes());
try std.testing.expectEqual(@as(usize, 71), sig.?.bytes.len);
const x5c = attStmt.?.getValueByString("x5c");
try std.testing.expect(x5c.?.isArray());
try std.testing.expectEqual(@as(usize, 1), x5c.?.array.len);
const x5c_stmt = x5c.?.get(0);
try std.testing.expect(x5c_stmt.?.isBytes());
try std.testing.expectEqual(@as(usize, 704), x5c_stmt.?.bytes.len);
}
test "MT0: encode cbor unsigned integer value" {
const allocator = std.testing.allocator;
const di1 = DataItem{ .int = 0 };
const cbor1 = try encodeAlloc(allocator, &di1);
defer allocator.free(cbor1);
try std.testing.expectEqualSlices(u8, &.{0x00}, cbor1);
const di2 = DataItem{ .int = 23 };
const cbor2 = try encodeAlloc(allocator, &di2);
defer allocator.free(cbor2);
try std.testing.expectEqualSlices(u8, &.{0x17}, cbor2);
const di3 = DataItem{ .int = 24 };
const cbor3 = try encodeAlloc(allocator, &di3);
defer allocator.free(cbor3);
try std.testing.expectEqualSlices(u8, &.{ 0x18, 0x18 }, cbor3);
const di4 = DataItem{ .int = 255 };
const cbor4 = try encodeAlloc(allocator, &di4);
defer allocator.free(cbor4);
try std.testing.expectEqualSlices(u8, &.{ 0x18, 0xff }, cbor4);
const di5 = DataItem{ .int = 256 };
const cbor5 = try encodeAlloc(allocator, &di5);
defer allocator.free(cbor5);
try std.testing.expectEqualSlices(u8, &.{ 0x19, 0x01, 0x00 }, cbor5);
const di6 = DataItem{ .int = 1000 };
const cbor6 = try encodeAlloc(allocator, &di6);
defer allocator.free(cbor6);
try std.testing.expectEqualSlices(u8, &.{ 0x19, 0x03, 0xe8 }, cbor6);
const di7 = DataItem{ .int = 65535 };
const cbor7 = try encodeAlloc(allocator, &di7);
defer allocator.free(cbor7);
try std.testing.expectEqualSlices(u8, &.{ 0x19, 0xff, 0xff }, cbor7);
const di8 = DataItem{ .int = 65536 };
const cbor8 = try encodeAlloc(allocator, &di8);
defer allocator.free(cbor8);
try std.testing.expectEqualSlices(u8, &.{ 0x1a, 0x00, 0x01, 0x00, 0x00 }, cbor8);
const di9 = DataItem{ .int = 4294967295 };
const cbor9 = try encodeAlloc(allocator, &di9);
defer allocator.free(cbor9);
try std.testing.expectEqualSlices(u8, &.{ 0x1a, 0xff, 0xff, 0xff, 0xff }, cbor9);
const di10 = DataItem{ .int = 12345678900 };
const cbor10 = try encodeAlloc(allocator, &di10);
defer allocator.free(cbor10);
try std.testing.expectEqualSlices(u8, &.{ 0x1b, 0x00, 0x00, 0x00, 0x02, 0xdf, 0xdc, 0x1c, 0x34 }, cbor10);
const di11 = DataItem{ .int = 18446744073709551615 };
const cbor11 = try encodeAlloc(allocator, &di11);
defer allocator.free(cbor11);
try std.testing.expectEqualSlices(u8, &.{ 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, cbor11);
}
test "MT1: encode cbor signed integer value" {
const allocator = std.testing.allocator;
const di1 = DataItem{ .int = -1 };
const cbor1 = try encodeAlloc(allocator, &di1);
defer allocator.free(cbor1);
try std.testing.expectEqualSlices(u8, &.{0x20}, cbor1);
const di2 = DataItem{ .int = -3 };
const cbor2 = try encodeAlloc(allocator, &di2);
defer allocator.free(cbor2);
try std.testing.expectEqualSlices(u8, &.{0x22}, cbor2);
const di3 = DataItem{ .int = -100 };
const cbor3 = try encodeAlloc(allocator, &di3);
defer allocator.free(cbor3);
try std.testing.expectEqualSlices(u8, &.{ 0x38, 0x63 }, cbor3);
const di4 = DataItem{ .int = -1000 };
const cbor4 = try encodeAlloc(allocator, &di4);
defer allocator.free(cbor4);
try std.testing.expectEqualSlices(u8, &.{ 0x39, 0x03, 0xe7 }, cbor4);
const di5 = DataItem{ .int = -998877 };
const cbor5 = try encodeAlloc(allocator, &di5);
defer allocator.free(cbor5);
try std.testing.expectEqualSlices(u8, &.{ 0x3a, 0x00, 0x0f, 0x3d, 0xdc }, cbor5);
const di6 = DataItem{ .int = -18446744073709551616 };
const cbor6 = try encodeAlloc(allocator, &di6);
defer allocator.free(cbor6);
try std.testing.expectEqualSlices(u8, &.{ 0x3b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, cbor6);
}
test "MT2: encode cbor byte string" {
const allocator = std.testing.allocator;
var di1 = try DataItem.bytes(&.{}, .{ .allocator = allocator });
defer di1.deinit(allocator);
const cbor1 = try encodeAlloc(allocator, &di1);
defer allocator.free(cbor1);
try std.testing.expectEqualSlices(u8, &.{0b01000000}, cbor1);
var di2 = try DataItem.bytes(&.{10}, .{ .allocator = allocator });
defer di2.deinit(allocator);
const cbor2 = try encodeAlloc(allocator, &di2);
defer allocator.free(cbor2);
try std.testing.expectEqualSlices(u8, &.{ 0x41, 0x0a }, cbor2);
var di3 = try DataItem.bytes(&.{ 10, 11, 12, 13, 14 }, .{ .allocator = allocator });
defer di3.deinit(allocator);
const cbor3 = try encodeAlloc(allocator, &di3);
defer allocator.free(cbor3);
try std.testing.expectEqualSlices(u8, &.{ 0x45, 0x0a, 0xb, 0xc, 0xd, 0xe }, cbor3);
var di4 = try DataItem.bytes(&.{ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19 }, .{ .allocator = allocator });
defer di4.deinit(allocator);
const cbor4 = try encodeAlloc(allocator, &di4);
defer allocator.free(cbor4);
try std.testing.expectEqualSlices(u8, &.{ 0x58, 0x19, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19 }, cbor4);
}
test "MT3: encode cbor text string" {
const allocator = std.testing.allocator;
var di1 = try DataItem.text(&.{}, .{ .allocator = allocator });
defer di1.deinit(allocator);
const cbor1 = try encodeAlloc(allocator, &di1);
defer allocator.free(cbor1);
try std.testing.expectEqualSlices(u8, &.{0x60}, cbor1);
var di2 = try DataItem.text("a", .{ .allocator = allocator });
defer di2.deinit(allocator);
const cbor2 = try encodeAlloc(allocator, &di2);
defer allocator.free(cbor2);
try std.testing.expectEqualSlices(u8, &.{ 0x61, 0x61 }, cbor2);
var di3 = try DataItem.text("IETF", .{ .allocator = allocator });
defer di3.deinit(allocator);
const cbor3 = try encodeAlloc(allocator, &di3);
defer allocator.free(cbor3);
try std.testing.expectEqualSlices(u8, &.{ 0x64, 0x49, 0x45, 0x54, 0x46 }, cbor3);
var di4 = try DataItem.text("\"\\", .{ .allocator = allocator });
defer di4.deinit(allocator);
const cbor4 = try encodeAlloc(allocator, &di4);
defer allocator.free(cbor4);
try std.testing.expectEqualSlices(u8, &.{ 0x62, 0x22, 0x5c }, cbor4);
// TODO: test unicode https://www.rfc-editor.org/rfc/rfc8949.html#name-examples-of-encoded-cbor-da
}
test "MT4: encode cbor array" {
const allocator = std.testing.allocator;
var di1 = try DataItem.array(&.{}, .{ .allocator = allocator });
defer di1.deinit(allocator);
const cbor1 = try encodeAlloc(allocator, &di1);
defer allocator.free(cbor1);
try std.testing.expectEqualSlices(u8, &.{0x80}, cbor1);
var di2 = try DataItem.array(&.{ DataItem.int(1), DataItem.int(2), DataItem.int(3) }, .{ .allocator = allocator });
defer di2.deinit(allocator);
const cbor2 = try encodeAlloc(allocator, &di2);
defer allocator.free(cbor2);
try std.testing.expectEqualSlices(u8, &.{ 0x83, 0x01, 0x02, 0x03 }, cbor2);
const di3 = try DataItem.array(&.{ DataItem.int(1), try DataItem.array(&.{ DataItem.int(2), DataItem.int(3) }, .{ .allocator = allocator }), try DataItem.array(&.{ DataItem.int(4), DataItem.int(5) }, .{ .allocator = allocator }) }, .{ .allocator = allocator });
defer di3.deinit(allocator);
const cbor3 = try encodeAlloc(allocator, &di3);
defer allocator.free(cbor3);
try std.testing.expectEqualSlices(u8, &.{ 0x83, 0x01, 0x82, 0x02, 0x03, 0x82, 0x04, 0x05 }, cbor3);
const di4 = try DataItem.array(&.{ DataItem.int(1), DataItem.int(2), DataItem.int(3), DataItem.int(4), DataItem.int(5), DataItem.int(6), DataItem.int(7), DataItem.int(8), DataItem.int(9), DataItem.int(10), DataItem.int(11), DataItem.int(12), DataItem.int(13), DataItem.int(14), DataItem.int(15), DataItem.int(16), DataItem.int(17), DataItem.int(18), DataItem.int(19), DataItem.int(20), DataItem.int(21), DataItem.int(22), DataItem.int(23), DataItem.int(24), DataItem.int(25) }, .{ .allocator = allocator });
defer di4.deinit(allocator);
const cbor4 = try encodeAlloc(allocator, &di4);
defer allocator.free(cbor4);
try std.testing.expectEqualSlices(u8, &.{ 0x98, 0x19, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x18, 0x18, 0x19 }, cbor4);
}
test "MT5: encode empty cbor map" {
const allocator = std.testing.allocator;
var di = try DataItem.map(&.{}, .{ .allocator = allocator });
defer di.deinit(allocator);
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{0xa0}, cbor);
}
test "MT5: encode cbor map {1:2,3:4}" {
const allocator = std.testing.allocator;
var di = try DataItem.map(&.{ Pair.new(DataItem.int(1), DataItem.int(2)), Pair.new(DataItem.int(3), DataItem.int(4)) }, .{ .allocator = allocator });
defer di.deinit(allocator);
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xa2, 0x01, 0x02, 0x03, 0x04 }, cbor);
// Keys should be sorted in asc order.
// TODO: sorting currently disabled (see issues)
// var di2 = try DataItem.map(allocator, &.{ Pair.new(DataItem.int(3), DataItem.int(4)), Pair.new(DataItem.int(1), DataItem.int(2)) });
// defer di2.deinit(allocator);
// const cbor2 = try encodeAlloc(allocator, &di2);
// defer allocator.free(cbor2);
// try std.testing.expectEqualSlices(u8, &.{ 0xa2, 0x01, 0x02, 0x03, 0x04 }, cbor2);
}
test "MT6: encode cbor tagged data item 1(1363896240)" {
const allocator = std.testing.allocator;
var di = try DataItem.tagged(allocator, 1, DataItem.int(1363896240));
defer di.deinit(allocator);
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xc1, 0x1a, 0x51, 0x4b, 0x67, 0xb0 }, cbor);
}
test "MT6: encode cbor tagged data item 32(\"http://www.example.com\")" {
const allocator = std.testing.allocator;
var di = try DataItem.tagged(allocator, 32, try DataItem.text("http://www.example.com", .{ .allocator = allocator }));
defer di.deinit(allocator);
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xd8, 0x20, 0x76, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d }, cbor);
}
test "MT7: encode f16 0.0" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float16 = 0.0 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xf9, 0x00, 0x00 }, cbor);
}
test "MT7: encode f16 -0.0" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float16 = -0.0 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xf9, 0x80, 0x00 }, cbor);
}
test "MT7: encode f16 1.0" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float16 = 1.0 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xf9, 0x3c, 0x00 }, cbor);
}
test "MT7: encode f16 1.5" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float16 = 1.5 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xf9, 0x3e, 0x00 }, cbor);
}
test "MT7: encode f16 5.960464477539063e-8" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float16 = 5.960464477539063e-8 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xf9, 0x00, 0x01 }, cbor);
}
test "MT7: encode f16 0.00006103515625" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float16 = 0.00006103515625 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xf9, 0x04, 0x00 }, cbor);
}
test "MT7: encode f16 -4.0" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float16 = -4.0 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xf9, 0xc4, 0x00 }, cbor);
}
test "MT7: encode f32 100000.0" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float32 = 100000.0 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xfa, 0x47, 0xc3, 0x50, 0x00 }, cbor);
}
test "MT7: encode f32 3.4028234663852886e+38" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float32 = 3.4028234663852886e+38 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xfa, 0x7f, 0x7f, 0xff, 0xff }, cbor);
}
test "MT7: encode f64 1.1" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float64 = 1.1 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xfb, 0x3f, 0xf1, 0x99, 0x99, 0x99, 0x99, 0x99, 0x9a }, cbor);
}
test "MT7: encode f64 1.0e+300" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float64 = 1.0e+300 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xfb, 0x7e, 0x37, 0xe4, 0x3c, 0x88, 0x00, 0x75, 0x9c }, cbor);
}
test "MT7: encode f64 -4.1" {
const allocator = std.testing.allocator;
var di = DataItem{ .float = Float{ .float64 = -4.1 } };
const cbor = try encodeAlloc(allocator, &di);
defer allocator.free(cbor);
try std.testing.expectEqualSlices(u8, &.{ 0xfb, 0xc0, 0x10, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66 }, cbor);
}
test "MT7: encode simple values" {
const allocator = std.testing.allocator;
var di1 = DataItem.True();
const cbor1 = try encodeAlloc(allocator, &di1);
defer allocator.free(cbor1);
try std.testing.expectEqualSlices(u8, &.{0xf5}, cbor1);
var di2 = DataItem.False();
const cbor2 = try encodeAlloc(allocator, &di2);
defer allocator.free(cbor2);
try std.testing.expectEqualSlices(u8, &.{0xf4}, cbor2);
var di3 = DataItem.Null();
const cbor3 = try encodeAlloc(allocator, &di3);
defer allocator.free(cbor3);
try std.testing.expectEqualSlices(u8, &.{0xf6}, cbor3);
var di4 = DataItem.Undefined();
const cbor4 = try encodeAlloc(allocator, &di4);
defer allocator.free(cbor4);
try std.testing.expectEqualSlices(u8, &.{0xf7}, cbor4);
}
test "MT0,1: DataItem{ .int = 30 } to json" {
const allocator = std.testing.allocator;
const di = DataItem{ .int = 30 };
var string = std.ArrayList(u8).init(allocator);
defer string.deinit();
try std.json.stringify(di, .{}, string.writer());
try std.testing.expectEqualStrings("30", string.items);
}
test "MT2: DataItem to json" {
const allocator = std.testing.allocator;
const di = try DataItem.bytes(&.{ 0x95, 0x28, 0xe0, 0x8f, 0x32, 0xda, 0x3d, 0x36, 0x83, 0xc4, 0x6a, 0x1c, 0x36, 0x58, 0xb4, 0x86, 0x47, 0x2b }, .{ .allocator = allocator });
defer di.deinit(allocator);
var string = std.ArrayList(u8).init(allocator);
defer string.deinit();
try std.json.stringify(di, .{}, string.writer());
try std.testing.expectEqualStrings("\"lSjgjzLaPTaDxGocNli0hkcr\"", string.items);
}
test "MT3: DataItem to json" {
const allocator = std.testing.allocator;
const di = try DataItem.text("fido-u2f", .{ .allocator = allocator });
defer di.deinit(allocator);
var string = std.ArrayList(u8).init(allocator);
defer string.deinit();
try std.json.stringify(di, .{}, string.writer());
try std.testing.expectEqualStrings("\"fido-u2f\"", string.items);
}
test "MT4: DataItem to json" {
const allocator = std.testing.allocator;
const di = try DataItem.array(&.{ DataItem.int(1), DataItem.int(2), DataItem.int(3) }, .{ .allocator = allocator });
defer di.deinit(allocator);
var string = std.ArrayList(u8).init(allocator);
defer string.deinit();
try std.json.stringify(di, .{}, string.writer());
try std.testing.expectEqualStrings("[1,2,3]", string.items);
}
test "MT5: DataItem to json" {
const allocator = std.testing.allocator;
const di = try DataItem.map(&.{ Pair.new(try DataItem.text("a", .{ .allocator = allocator }), DataItem.int(1)), Pair.new(try DataItem.text("b", .{ .allocator = allocator }), try DataItem.array(&.{ DataItem.int(2), DataItem.int(3) }, .{ .allocator = allocator })) }, .{ .allocator = allocator });
defer di.deinit(allocator);
var string = std.ArrayList(u8).init(allocator);
defer string.deinit();
try std.json.stringify(di, .{}, string.writer());
try std.testing.expectEqualStrings("{\"a\":1,\"b\":[2,3]}", string.items);
}
test "MT6: BigNum and other tagged values to json" {
const allocator = std.testing.allocator;
const di1 = try DataItem.unsignedBignum(allocator, &.{ 0xf6, 0x53, 0xd8, 0xf5, 0x55, 0x8b, 0xf2, 0x49, 0x1d, 0x90, 0x96, 0x13, 0x44, 0x8d, 0xd1, 0xd3 });
defer di1.deinit(allocator);
const di2 = try DataItem.signedBignum(allocator, &.{ 0xf6, 0x53, 0xd8, 0xf5, 0x55, 0x8b, 0xf2, 0x49, 0x1d, 0x90, 0x96, 0x13, 0x44, 0x8d, 0xd1, 0xd3 });
defer di2.deinit(allocator);
const di3 = try DataItem.tagged(allocator, 22, try DataItem.bytes(&.{ 0xf6, 0x53, 0xd8, 0xf5, 0x55, 0x8b, 0xf2, 0x49, 0x1d, 0x90, 0x96, 0x13, 0x44, 0x8d, 0xd1, 0xd3 }, .{ .allocator = allocator }));
defer di3.deinit(allocator);
const di4 = try DataItem.tagged(allocator, 23, try DataItem.bytes("abcd", .{ .allocator = allocator }));
defer di4.deinit(allocator);
const json1 = try di1.toJson(allocator);
defer json1.deinit();
const json2 = try di2.toJson(allocator);
defer json2.deinit();
const json3 = try di3.toJson(allocator);
defer json3.deinit();
const json4 = try di4.toJson(allocator);
defer json4.deinit();
try std.testing.expectEqualStrings("\"9lPY9VWL8kkdkJYTRI3R0w\"", json1.items);
try std.testing.expectEqualStrings("\"~9lPY9VWL8kkdkJYTRI3R0w\"", json2.items);
try std.testing.expectEqualStrings("\"9lPY9VWL8kkdkJYTRI3R0w==\"", json3.items);
try std.testing.expectEqualStrings("\"61626364\"", json4.items);
}
test "MT7: DataItem to json (false, true, null)" {
const allocator = std.testing.allocator;
const di1 = DataItem.False();
const di2 = DataItem.True();
const di3 = DataItem.Null();
const di4 = DataItem.Undefined();
const json1 = try di1.toJson(allocator);
defer json1.deinit();
const json2 = try di2.toJson(allocator);
defer json2.deinit();
const json3 = try di3.toJson(allocator);
defer json3.deinit();
const json4 = try di4.toJson(allocator);
defer json4.deinit();
try std.testing.expectEqualStrings("false", json1.items);
try std.testing.expectEqualStrings("true", json2.items);
try std.testing.expectEqualStrings("null", json3.items);
// Any other simple value is represented as the substitue value (null).
try std.testing.expectEqualStrings("null", json4.items);
}
test "MT7: DataItem to json (float)" {
const allocator = std.testing.allocator;
const di1 = DataItem.float64(-4.1);
//const di2 = DataItem.float32(3.4028234663852886e+38);
const json1 = try di1.toJson(allocator);
defer json1.deinit();
//const json2 = try di2.toJson(allocator);
//defer json2.deinit();
try std.testing.expectEqualStrings("-4.1e+00", json1.items);
//try std.testing.expectEqualStrings("3.4028234663852886e+38", json2.items);
}
test "serialize WebAuthn attestationObject to json" {
const allocator = std.testing.allocator;
const attestationObject = try std.fs.cwd().openFile("data/WebAuthnCreate.dat", .{ .mode = .read_only });
defer attestationObject.close();
const bytes = try attestationObject.readToEndAlloc(allocator, 4096);
defer allocator.free(bytes);
var di = try decode(allocator, bytes);
defer di.deinit(allocator);
var json = std.ArrayList(u8).init(allocator);
defer json.deinit();
try std.json.stringify(di, .{}, json.writer());
const expected = "{\"fmt\":\"fido-u2f\",\"attStmt\":{\"sig\":\"MEUCIQDxiq8pf_27Z2osKh-3EnKViLVnMvh5oSuUhhC1AtBb1wIgT-C4h13JDnutnjn1mR9JVfRlE0rXXoknYH5eI3jAqWc\",\"x5c\":[\"MIICvDCCAaSgAwIBAgIEA63wEjANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNZdWJpY28gVTJGIFJvb3QgQ0EgU2VyaWFsIDQ1NzIwMDYzMTAgFw0xNDA4MDEwMDAwMDBaGA8yMDUwMDkwNDAwMDAwMFowbTELMAkGA1UEBhMCU0UxEjAQBgNVBAoMCVl1YmljbyBBQjEiMCAGA1UECwwZQXV0aGVudGljYXRvciBBdHRlc3RhdGlvbjEmMCQGA1UEAwwdWXViaWNvIFUyRiBFRSBTZXJpYWwgNjE3MzA4MzQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQZnoecFi233DnuSkKgRhalswn-ygkvdr4JSPltbpXK5MxlzVSgWc-9x8mzGysdbBhEecLAYfQYqpVLWWosHPoXo2wwajAiBgkrBgEEAYLECgIEFTEuMy42LjEuNC4xLjQxNDgyLjEuNzATBgsrBgEEAYLlHAIBAQQEAwIEMDAhBgsrBgEEAYLlHAEBBAQSBBD6K5ncnjlCV4-SSjDSPEEYMAwGA1UdEwEB_wQCMAAwDQYJKoZIhvcNAQELBQADggEBACjrs2f-0djw4onryp_22AdXxg6a5XyxcoybHDjKu72E2SN9qDGsIZSfDy38DDFr_bF1s25joiu7WA6tylKA0HmEDloeJXJiWjv7h2Az2_siqWnJOLic4XE1lAChJS2XAqkSk9VFGelg3SLOiifrBet-ebdQwAL-2QFrcR7JrXRQG9kUy76O2VcSgbdPROsHfOYeywarhalyVSZ-6OOYK_Q_DLIaOC0jXrnkzm2ymMQFQlBAIysrYeEM1wxiFbwDt-lAcbcOEtHEf5ZlWi75nUzlWn8bSx_5FO4TbZ5hIEcUiGRpiIBEMRZlOIm4ZIbZycn_vJOFRTVps0V0S4ygtDc\"]},\"authData\":\"IQkYX2k6AeoaJkH4LVL7ru4KT0fjN03--HCDjeSbDpdBAAAAAAAAAAAAAAAAAAAAAAAAAAAAQLP4zbGAIJF2-iAaUW0bQvgCqA2vSNA3iCGm-91S3ha37_YiJXJDjeWFfnD57wWA6TfjAK7Q3_E_tqM-w4uBytClAQIDJiABIVgg2fTCo1ITbxnJqV2ogkq1zcTVYx68_VvbsL__JTYJEp4iWCDvQEuIB2VXYAeIij7Wq_-0JXtxI1UzJdRQYTy1vJo6Ug\"}";
try std.testing.expectEqualStrings(expected, json.items);
}
test "MT0,1: json to DataItem{ .int = 30 }" {
const allocator = std.testing.allocator;
const j = "30";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem{ .int = 30 };
try std.testing.expectEqual(e, d);
}
test "MT0,1: json to DataItem{ .int = 0 }" {
const allocator = std.testing.allocator;
const j = "0";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem{ .int = 0 };
try std.testing.expectEqual(e, d);
}
test "MT0,1: json to DataItem{ .int = 18446744073709551615 }" {
const allocator = std.testing.allocator;
const j = "18446744073709551615";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem{ .int = 18446744073709551615 };
try std.testing.expectEqual(e, d);
}
test "MT0,1: json to DataItem{ .int = -18446744073709551616 }" {
const allocator = std.testing.allocator;
const j = "-18446744073709551616";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem{ .int = -18446744073709551616 };
try std.testing.expectEqual(e, d);
}
test "MT3: json to text string 1" {
const allocator = std.testing.allocator;
const j = "\"IETF\"";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
defer d.deinit(allocator);
const e = try DataItem.text("IETF", .{ .allocator = allocator });
defer e.deinit(allocator);
try std.testing.expectEqualStrings(e.text, d.text);
try std.testing.expect(e.equal(&d));
}
test "MT3: json to text string 2" {
const allocator = std.testing.allocator;
const j = "\"\"";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
defer d.deinit(allocator);
const e = try DataItem.text(&.{}, .{ .allocator = allocator });
defer e.deinit(allocator);
try std.testing.expectEqualStrings(e.text, d.text);
try std.testing.expect(e.equal(&d));
}
test "MT3: json to text string 3" {
const allocator = std.testing.allocator;
const j = "\"a\"";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
defer d.deinit(allocator);
const e = try DataItem.text("a", .{ .allocator = allocator });
defer e.deinit(allocator);
try std.testing.expectEqualStrings(e.text, d.text);
try std.testing.expect(e.equal(&d));
}
test "MT6: bignum 2^64" {
const allocator = std.testing.allocator;
const j = "18446744073709551616";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
defer d.deinit(allocator);
const e = try DataItem.tagged(allocator, 2, try DataItem.bytes(&.{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, .{ .allocator = allocator }));
defer e.deinit(allocator);
//try std.testing.expectEqual(e, d);
try std.testing.expect(d.isTagged());
try std.testing.expectEqual(@as(u64, 2), d.tag.number);
try std.testing.expectEqualSlices(u8, &.{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, d.tag.content.bytes);
try std.testing.expect(e.equal(&d));
}
test "MT6: bignum 147573952589680980818" {
const allocator = std.testing.allocator;
const j = "147573952589680980818";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
defer d.deinit(allocator);
const e = try DataItem.tagged(allocator, 2, try DataItem.bytes(&.{ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xB3, 0x52 }, .{ .allocator = allocator }));
defer e.deinit(allocator);
try std.testing.expect(e.equal(&d));
}
test "MT6: bignum -147573952589680980818" {
const allocator = std.testing.allocator;
const j = "-147573952589680980818";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
defer d.deinit(allocator);
const e = try DataItem.tagged(allocator, 3, try DataItem.bytes(&.{ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xB3, 0x51 }, .{ .allocator = allocator }));
defer e.deinit(allocator);
try std.testing.expect(e.equal(&d));
}
test "MT7: json to f64 0.0" {
const allocator = std.testing.allocator;
const j = "0.0";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem.float64(0.0);
try std.testing.expectEqual(e, d);
}
test "MT7: json to f64 100000.0" {
const allocator = std.testing.allocator;
const j = "100000.0";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem.float64(100000.0);
try std.testing.expectEqual(e, d);
}
test "MT7: json to true" {
const allocator = std.testing.allocator;
const j = "true";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem.True();
try std.testing.expectEqual(e, d);
}
test "MT7: json to false" {
const allocator = std.testing.allocator;
const j = "false";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem.False();
try std.testing.expectEqual(e, d);
}
test "MT7: json to null" {
const allocator = std.testing.allocator;
const j = "null";
var s = std.json.TokenStream.init(j);
const d = try DataItem.parseJson(allocator, &s);
const e = DataItem.Null();
try std.testing.expectEqual(e, d);
}
|
0 | repos/zbor | repos/zbor/src/fuzz.zig | const zbor = @import("main.zig");
const std = @import("std");
const ROUNDS = 10_000;
test "fuzz DataItem.new" {
const allocator = std.testing.allocator;
//const Config = struct {
// vals: struct { testing: u8, production: u8 },
// uptime: u64,
//};
var i: usize = 0;
while (i < ROUNDS) : (i += 1) {
const bytes_to_allocate = std.crypto.random.intRangeAtMost(usize, 1, 128);
const mem = try allocator.alloc(u8, bytes_to_allocate);
defer allocator.free(mem);
std.crypto.random.bytes(mem);
_ = zbor.DataItem.new(mem) catch {
continue;
};
}
}
test "fuzz parse(Config, ...)" {
const allocator = std.testing.allocator;
const Config = struct {
vals: struct { testing: u8, production: u8 },
uptime: u64,
};
var i: usize = 0;
while (i < ROUNDS) : (i += 1) {
const bytes_to_allocate = std.crypto.random.intRangeAtMost(usize, 1, 128);
const mem = try allocator.alloc(u8, bytes_to_allocate);
defer allocator.free(mem);
std.crypto.random.bytes(mem);
const di = zbor.DataItem{ .data = mem };
_ = zbor.parse(Config, di, .{}) catch {
continue;
};
}
}
|
0 | repos/zbor | repos/zbor/src/cbor.zig | const std = @import("std");
/// CBOR type (see RFC 8949)
pub const Type = enum {
/// Integer in the range -2^64..2^64 - 1 (MT 0/1)
Int,
/// Byte string (MT 2)
ByteString,
/// UTF-8 text string (MT 3)
TextString,
/// Array of data items (MT 4)
Array,
/// Map of pairs of data items (MT 5)
Map,
/// False (MT 7)
False,
/// True (MT 7)
True,
/// Null (MT 7)
Null,
/// Undefined (MT 7)
Undefined,
/// Simple value (MT 7)
Simple,
/// Tagged data item whose tag number is an integer in the range 0..2^64 - 1 (MT 6)
Tagged,
/// Floating point value (MT 7)
Float,
/// Unknown data item
Unknown,
/// Detect the data item type encoded within a raw byte
pub fn fromByte(b: u8) @This() {
return switch (b) {
0x00...0x3b => .Int,
0x40...0x5b => .ByteString,
0x60...0x7b => .TextString,
0x80...0x9b => .Array,
0xa0...0xbb => .Map,
0xf4 => .False,
0xf5 => .True,
0xf6 => .Null,
0xf7 => .Undefined,
0xe0...0xf3, 0xf8 => .Simple,
0xc0...0xdb => .Tagged,
0xf9...0xfb => .Float,
else => .Unknown,
};
}
};
/// DataItem is a wrapper around raw CBOR data
pub const DataItem = struct {
/// Raw CBOR data
data: []const u8,
/// Create a new DataItem from raw CBOR data
///
/// This function will run a check to verify that the data is not malfromed as defined by RFC 8949
/// before returning a DataItem. Returns an error if the data is malformed.
pub fn new(data: []const u8) !@This() {
var i: usize = 0;
if (!validate(data, &i, false)) return error.Malformed;
return .{ .data = data };
}
/// Get the Type of the given DataItem
pub fn getType(self: @This()) Type {
return Type.fromByte(self.data[0]);
}
/// Decode the given DataItem into an integer
///
/// The function will return null if the given DataItems doesn't have the
/// type Type.Int.
pub fn int(self: @This()) ?i65 {
if (self.data[0] <= 0x1b and self.data[0] >= 0x00) {
return @as(i65, @intCast(if (additionalInfo(self.data, null)) |v| v else return null));
} else if (self.data[0] <= 0x3b and self.data[0] >= 0x20) {
return -@as(i65, @intCast(if (additionalInfo(self.data, null)) |v| v else return null)) - 1;
} else {
return null;
}
}
/// Decode the given DataItem into a string
///
/// The function will return null if the given DataItems doesn't have the
/// type Type.ByteString or Type.TextString.
pub fn string(self: @This()) ?[]const u8 {
const T = Type.fromByte(self.data[0]);
if (T != Type.ByteString and T != Type.TextString) return null;
var begin: usize = 0;
const len = if (additionalInfo(self.data, &begin)) |v| @as(usize, @intCast(v)) else return null;
return self.data[begin .. begin + len];
}
/// Decode the given DataItem into a array
///
/// This function will return an ArrayIterator on success and null if
/// the given DataItem doesn't have the type Type.Array.
pub fn array(self: @This()) ?ArrayIterator {
const T = Type.fromByte(self.data[0]);
if (T != Type.Array) return null;
var begin: usize = 0;
const len = if (additionalInfo(self.data, &begin)) |v| @as(usize, @intCast(v)) else return null;
// Get to the end of the array
var end: usize = 0;
if (burn(self.data, &end) == null) return null;
return ArrayIterator{
.data = self.data[begin..end],
.len = len,
.count = 0,
.i = 0,
};
}
/// Decode the given DataItem into a map
///
/// This function will return an MapIterator on success and null if
/// the given DataItem doesn't have the type Type.Map.
pub fn map(self: @This()) ?MapIterator {
const T = Type.fromByte(self.data[0]);
if (T != Type.Map) return null;
var begin: usize = 0;
const len = if (additionalInfo(self.data, &begin)) |v| @as(usize, @intCast(v)) else return null;
// Get to the end of the map
var end: usize = 0;
if (burn(self.data, &end) == null) return null;
return MapIterator{
.data = self.data[begin..end],
.len = len,
.count = 0,
.i = 0,
};
}
/// Decode the given DataItem into a simple value
///
/// This function will return null if the DataItems type
/// is not Type.Simple, Type.False, Type.True, Type.Null
/// or Type.Undefined.
pub fn simple(self: @This()) ?u8 {
return switch (self.data[0]) {
0xe0...0xf7 => self.data[0] & 0x1f,
0xf8 => self.data[1],
else => null,
};
}
/// Decode the given DataItem into a boolean
///
/// Returns null if the DataItem's type is not
/// Type.False or Type.True.
pub fn boolean(self: @This()) ?bool {
return switch (self.data[0]) {
0xf4 => false,
0xf5 => true,
else => null,
};
}
/// Decode the given DataItem into a float
///
/// This function will return null if the DataItem
/// isn't a half-, single-, or double precision
/// floating point value.
pub fn float(self: @This()) ?f64 {
const T = Type.fromByte(self.data[0]);
if (T != Type.Float) return null;
if (additionalInfo(self.data, null)) |v| {
return switch (self.data[0]) {
0xf9 => @as(f64, @floatCast(@as(f16, @bitCast(@as(u16, @intCast(v)))))),
0xfa => @as(f64, @floatCast(@as(f32, @bitCast(@as(u32, @intCast(v)))))),
0xfb => @as(f64, @bitCast(v)),
else => unreachable,
};
} else {
return null;
}
}
pub fn isFloat16(self: @This()) bool {
if (self.data.len < 3) return false;
return self.data[0] == 0xf9;
}
pub fn getFloat16(self: @This()) ?f16 {
if (!self.isFloat16()) return null;
if (additionalInfo(self.data, null)) |v| {
return @floatCast(@as(f16, @bitCast(@as(u16, @intCast(v)))));
}
return null;
}
pub fn isFloat32(self: @This()) bool {
if (self.data.len < 5) return false;
return self.data[0] == 0xfa;
}
pub fn getFloat32(self: @This()) ?f32 {
if (!self.isFloat32()) return null;
if (additionalInfo(self.data, null)) |v| {
return @floatCast(@as(f32, @bitCast(@as(u32, @intCast(v)))));
}
return null;
}
pub fn isFloat64(self: @This()) bool {
if (self.data.len < 9) return false;
return self.data[0] == 0xfb;
}
pub fn getFloat64(self: @This()) ?f64 {
if (!self.isFloat64()) return null;
if (additionalInfo(self.data, null)) |v| {
return @floatCast(@as(f64, @bitCast(@as(u64, @intCast(v)))));
}
return null;
}
/// Decode the given DataItem into a Tag
///
/// This function will return null if the DataItem
/// isn't of type Type.Tagged.
pub fn tagged(self: @This()) ?Tag {
const T = Type.fromByte(self.data[0]);
if (T != Type.Tagged) return null;
var begin: usize = 0;
const nr = if (additionalInfo(self.data, &begin)) |v| v else return null;
return Tag{
.nr = nr,
.content = DataItem.new(self.data[begin..]) catch {
unreachable; // this can only be if DataItem hasn't been instantiated with new()
},
};
}
};
/// Representaion of a tagged data item
pub const Tag = struct {
/// The tag of the data item
nr: u64,
/// The data item being tagged
content: DataItem,
};
/// The key-value pair of a map
pub const Pair = struct {
key: DataItem,
value: DataItem,
};
/// Iterator for iterating over a map, returned by DataItem.map()
pub const MapIterator = struct {
data: []const u8,
len: usize,
count: usize,
i: usize,
/// Get the next key Pair
///
/// Returns null after the last element.
pub fn next(self: *@This()) ?Pair {
if (self.count >= self.len) return null;
var new_i: usize = self.i;
if (burn(self.data, &new_i) == null) return null;
const k = DataItem.new(self.data[self.i..new_i]) catch {
unreachable; // this can only be if DataItem hasn't been instantiated with new()
};
self.i = new_i;
if (burn(self.data, &new_i) == null) return null;
const v = DataItem.new(self.data[self.i..new_i]) catch {
unreachable; // this can only be if DataItem hasn't been instantiated with new()
};
self.i = new_i;
self.count += 1;
return Pair{ .key = k, .value = v };
}
};
/// Iterator for iterating over an array, returned by DataItem.array()
pub const ArrayIterator = struct {
data: []const u8,
len: usize,
count: usize,
i: usize,
/// Get the next DataItem
///
/// Returns null after the last element.
pub fn next(self: *@This()) ?DataItem {
if (self.count >= self.len) return null;
var new_i: usize = self.i;
if (burn(self.data, &new_i) == null) return null;
const tmp = self.data[self.i..new_i];
self.i = new_i;
self.count += 1;
return DataItem.new(tmp) catch {
unreachable;
};
}
};
/// Move the index `i` to the beginning of the next data item.
fn burn(data: []const u8, i: *usize) ?void {
if (i.* >= data.len) return null;
var offset: usize = 0;
const len = if (additionalInfo(data[i.*..], &offset)) |v| @as(usize, @intCast(v)) else return null;
switch (data[i.*]) {
0x00...0x1b => i.* += offset,
0x20...0x3b => i.* += offset,
0x40...0x5b => i.* += offset + len,
0x60...0x7b => i.* += offset + len,
0x80...0x9b => {
i.* += offset;
var x: usize = 0;
while (x < len) : (x += 1) {
if (burn(data, i) == null) {
return null;
}
}
},
0xa0...0xbb => {
i.* += offset;
var x: usize = 0;
while (x < len) : (x += 1) {
// this is NOT redundant!!!
if (burn(data, i) == null or burn(data, i) == null) {
return null;
}
}
},
0xc0...0xdb => {
i.* += offset;
if (burn(data, i) == null) return null;
},
0xe0...0xfb => i.* += offset,
else => return null,
}
if (i.* > data.len) {
// this indicates an error
i.* = data.len;
return null;
}
}
/// Return the additional information of the given data item.
///
/// Pass a reference to `l` if you want to know where the
/// actual data begins (l := |head| + |additional information|).
fn additionalInfo(data: []const u8, l: ?*usize) ?u64 {
if (data.len < 1) return null;
switch (data[0] & 0x1f) {
0x00...0x17 => {
if (l != null) l.?.* = 1;
return @as(u64, @intCast(data[0] & 0x1f));
},
0x18 => {
if (data.len < 2) return null;
if (l != null) l.?.* = 2;
return @as(u64, @intCast(data[1]));
},
0x19 => {
if (data.len < 3) return null;
if (l != null) l.?.* = 3;
return @as(u64, @intCast(unsigned_16(data[1..3])));
},
0x1a => {
if (data.len < 5) return null;
if (l != null) l.?.* = 5;
return @as(u64, @intCast(unsigned_32(data[1..5])));
},
0x1b => {
if (data.len < 9) return null;
if (l != null) l.?.* = 9;
return @as(u64, @intCast(unsigned_64(data[1..9])));
},
else => return null,
}
}
/// Check if the given CBOR data is well formed
///
/// * `data` - Raw CBOR data
/// * `i` - Pointer to an index (must be initialized to 0)
/// * `check_len` - It's important that `data` doesn't contain any extra bytes at the end [Yes/no]
///
/// Returns true if the given data is well formed, false otherwise.
pub fn validate(data: []const u8, i: *usize, check_len: bool) bool {
if (i.* >= data.len) return false;
const ib: u8 = data[i.*];
i.* += 1;
const mt = ib >> 5;
const ai = ib & 0x1f;
var val: usize = @as(usize, @intCast(ai));
switch (ai) {
24, 25, 26, 27 => {
const bytes = @as(usize, @intCast(1)) << @intCast(ai - 24);
if (i.* + bytes > data.len) return false;
val = 0;
for (data[i.* .. i.* + bytes]) |byte| {
val <<= 8;
val += byte;
}
i.* += bytes;
},
28, 29, 30 => return false,
31 => return false, // we dont support indefinite length items for now
else => {},
}
switch (mt) {
2, 3 => i.* += val,
4 => {
var j: usize = 0;
while (j < val) : (j += 1) {
if (!validate(data, i, false)) return false;
}
},
5 => {
var j: usize = 0;
while (j < val) : (j += 1) {
if (!validate(data, i, false)) return false;
if (!validate(data, i, false)) return false;
}
},
6 => if (!validate(data, i, false)) return false,
7 => if (ai == 24 and val < 32) return false,
else => {},
}
// no bytes must be left in the input
if (check_len and i.* != data.len) return false;
return true;
}
pub inline fn unsigned_16(data: []const u8) u16 {
return @as(u16, @intCast(data[0])) << 8 | @as(u16, @intCast(data[1]));
}
pub inline fn unsigned_32(data: []const u8) u32 {
return @as(u32, @intCast(data[0])) << 24 | @as(u32, @intCast(data[1])) << 16 | @as(u32, @intCast(data[2])) << 8 | @as(u32, @intCast(data[3]));
}
pub inline fn unsigned_64(data: []const u8) u64 {
return @as(u64, @intCast(data[0])) << 56 | @as(u64, @intCast(data[1])) << 48 | @as(u64, @intCast(data[2])) << 40 | @as(u64, @intCast(data[3])) << 32 | @as(u64, @intCast(data[4])) << 24 | @as(u64, @intCast(data[5])) << 16 | @as(u64, @intCast(data[6])) << 8 | @as(u64, @intCast(data[7]));
}
pub inline fn encode_2(cbor: anytype, head: u8, v: u64) !void {
try cbor.writeByte(head | 25);
try cbor.writeByte(@as(u8, @intCast((v >> 8) & 0xff)));
try cbor.writeByte(@as(u8, @intCast(v & 0xff)));
}
pub inline fn encode_4(cbor: anytype, head: u8, v: u64) !void {
try cbor.writeByte(head | 26);
try cbor.writeByte(@as(u8, @intCast((v >> 24) & 0xff)));
try cbor.writeByte(@as(u8, @intCast((v >> 16) & 0xff)));
try cbor.writeByte(@as(u8, @intCast((v >> 8) & 0xff)));
try cbor.writeByte(@as(u8, @intCast(v & 0xff)));
}
pub inline fn encode_8(cbor: anytype, head: u8, v: u64) !void {
try cbor.writeByte(head | 27);
try cbor.writeByte(@as(u8, @intCast((v >> 56) & 0xff)));
try cbor.writeByte(@as(u8, @intCast((v >> 48) & 0xff)));
try cbor.writeByte(@as(u8, @intCast((v >> 40) & 0xff)));
try cbor.writeByte(@as(u8, @intCast((v >> 32) & 0xff)));
try cbor.writeByte(@as(u8, @intCast((v >> 24) & 0xff)));
try cbor.writeByte(@as(u8, @intCast((v >> 16) & 0xff)));
try cbor.writeByte(@as(u8, @intCast((v >> 8) & 0xff)));
try cbor.writeByte(@as(u8, @intCast(v & 0xff)));
}
test "deserialize unsigned" {
const di1 = try DataItem.new("\x00");
try std.testing.expectEqual(Type.Int, di1.getType());
try std.testing.expectEqual(di1.int().?, 0);
const di2 = try DataItem.new("\x01");
try std.testing.expectEqual(Type.Int, di2.getType());
try std.testing.expectEqual(di2.int().?, 1);
const di3 = try DataItem.new("\x17");
try std.testing.expectEqual(Type.Int, di3.getType());
try std.testing.expectEqual(di3.int().?, 23);
const di4 = try DataItem.new("\x18\x18");
try std.testing.expectEqual(Type.Int, di4.getType());
try std.testing.expectEqual(di4.int().?, 24);
const di5 = try DataItem.new("\x18\x64");
try std.testing.expectEqual(Type.Int, di5.getType());
try std.testing.expectEqual(di5.int().?, 100);
const di6 = try DataItem.new("\x19\x03\xe8");
try std.testing.expectEqual(Type.Int, di6.getType());
try std.testing.expectEqual(di6.int().?, 1000);
const di7 = try DataItem.new("\x1a\x00\x0f\x42\x40");
try std.testing.expectEqual(Type.Int, di7.getType());
try std.testing.expectEqual(di7.int().?, 1000000);
const di8 = try DataItem.new("\x1b\x00\x00\x00\xe8\xd4\xa5\x10\x00");
try std.testing.expectEqual(Type.Int, di8.getType());
try std.testing.expectEqual(di8.int().?, 1000000000000);
const di9 = try DataItem.new("\x1b\xff\xff\xff\xff\xff\xff\xff\xff");
try std.testing.expectEqual(Type.Int, di9.getType());
try std.testing.expectEqual(di9.int().?, 18446744073709551615);
}
test "deserialize negative" {
const di1 = try DataItem.new("\x20");
try std.testing.expectEqual(Type.Int, di1.getType());
try std.testing.expectEqual(di1.int().?, -1);
const di2 = try DataItem.new("\x29");
try std.testing.expectEqual(Type.Int, di2.getType());
try std.testing.expectEqual(di2.int().?, -10);
const di3 = try DataItem.new("\x38\x63");
try std.testing.expectEqual(Type.Int, di3.getType());
try std.testing.expectEqual(di3.int().?, -100);
const di6 = try DataItem.new("\x39\x03\xe7");
try std.testing.expectEqual(Type.Int, di6.getType());
try std.testing.expectEqual(di6.int().?, -1000);
const di9 = try DataItem.new("\x3b\xff\xff\xff\xff\xff\xff\xff\xff");
try std.testing.expectEqual(Type.Int, di9.getType());
try std.testing.expectEqual(di9.int().?, -18446744073709551616);
}
test "deserialize byte string" {
const di1 = try DataItem.new("\x40");
try std.testing.expectEqual(Type.ByteString, di1.getType());
try std.testing.expectEqualSlices(u8, di1.string().?, "");
const di2 = try DataItem.new("\x44\x01\x02\x03\x04");
try std.testing.expectEqual(Type.ByteString, di2.getType());
try std.testing.expectEqualSlices(u8, di2.string().?, "\x01\x02\x03\x04");
}
test "deserialize text string" {
const di1 = try DataItem.new("\x60");
try std.testing.expectEqual(Type.TextString, di1.getType());
try std.testing.expectEqualStrings(di1.string().?, "");
const di2 = try DataItem.new("\x61\x61");
try std.testing.expectEqual(Type.TextString, di2.getType());
try std.testing.expectEqualStrings(di2.string().?, "a");
const di3 = try DataItem.new("\x64\x49\x45\x54\x46");
try std.testing.expectEqual(Type.TextString, di3.getType());
try std.testing.expectEqualStrings(di3.string().?, "IETF");
const di4 = try DataItem.new("\x62\x22\x5c");
try std.testing.expectEqual(Type.TextString, di4.getType());
try std.testing.expectEqualStrings(di4.string().?, "\"\\");
const di5 = try DataItem.new("\x62\xc3\xbc");
try std.testing.expectEqual(Type.TextString, di5.getType());
try std.testing.expectEqualStrings(di5.string().?, "ü");
const di6 = try DataItem.new("\x63\xe6\xb0\xb4");
try std.testing.expectEqual(Type.TextString, di6.getType());
try std.testing.expectEqualStrings(di6.string().?, "水");
}
test "deserialize array" {
const di1 = try DataItem.new("\x80");
try std.testing.expectEqual(Type.Array, di1.getType());
var ai1 = di1.array().?;
try std.testing.expectEqual(ai1.next(), null);
try std.testing.expectEqual(ai1.next(), null);
const di2 = try DataItem.new("\x83\x01\x02\x03");
try std.testing.expectEqual(Type.Array, di2.getType());
var ai2 = di2.array().?;
try std.testing.expectEqual(ai2.next().?.int().?, 1);
try std.testing.expectEqual(ai2.next().?.int().?, 2);
try std.testing.expectEqual(ai2.next().?.int().?, 3);
try std.testing.expectEqual(ai2.next(), null);
const di3 = try DataItem.new("\x98\x19\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x18\x18\x19");
try std.testing.expectEqual(Type.Array, di3.getType());
var ai3 = di3.array().?;
var i: u64 = 1;
while (i <= 25) : (i += 1) {
try std.testing.expectEqual(ai3.next().?.int().?, i);
}
try std.testing.expectEqual(ai3.next(), null);
const di4 = try DataItem.new("\x83\x01\x82\x02\x03\x82\x04\x05");
try std.testing.expectEqual(Type.Array, di4.getType());
var ai4 = di4.array().?;
try std.testing.expectEqual(ai4.next().?.int().?, 1);
var ai4_1 = ai4.next().?.array().?;
try std.testing.expectEqual(ai4_1.next().?.int().?, 2);
try std.testing.expectEqual(ai4_1.next().?.int().?, 3);
try std.testing.expectEqual(ai4_1.next(), null);
var ai4_2 = ai4.next().?.array().?;
try std.testing.expectEqual(ai4_2.next().?.int().?, 4);
try std.testing.expectEqual(ai4_2.next().?.int().?, 5);
try std.testing.expectEqual(ai4_2.next(), null);
try std.testing.expectEqual(ai4.next(), null);
}
test "deserialize map" {
const di1 = try DataItem.new("\xa0");
try std.testing.expectEqual(Type.Map, di1.getType());
var ai1 = di1.map().?;
try std.testing.expectEqual(ai1.next(), null);
try std.testing.expectEqual(ai1.next(), null);
const di2 = try DataItem.new("\xa2\x01\x02\x03\x04");
try std.testing.expectEqual(Type.Map, di2.getType());
var ai2 = di2.map().?;
const kv1 = ai2.next().?;
try std.testing.expectEqual(kv1.key.int().?, 1);
try std.testing.expectEqual(kv1.value.int().?, 2);
const kv2 = ai2.next().?;
try std.testing.expectEqual(kv2.key.int().?, 3);
try std.testing.expectEqual(kv2.value.int().?, 4);
try std.testing.expectEqual(ai2.next(), null);
const di3 = try DataItem.new("\xa2\x61\x61\x01\x61\x62\x82\x02\x03");
try std.testing.expectEqual(Type.Map, di3.getType());
var ai3 = di3.map().?;
const kv1_2 = ai3.next().?;
try std.testing.expectEqualStrings("a", kv1_2.key.string().?);
try std.testing.expectEqual(kv1_2.value.int().?, 1);
const kv2_2 = ai3.next().?;
try std.testing.expectEqualStrings("b", kv2_2.key.string().?);
var ai3_1 = kv2_2.value.array().?;
try std.testing.expectEqual(ai3_1.next().?.int().?, 2);
try std.testing.expectEqual(ai3_1.next().?.int().?, 3);
try std.testing.expectEqual(ai3_1.next(), null);
try std.testing.expectEqual(ai3.next(), null);
}
test "deserialize other" {
const di1 = try DataItem.new("\x82\x61\x61\xa1\x61\x62\x61\x63");
try std.testing.expectEqual(Type.Array, di1.getType());
var ai1 = di1.array().?;
try std.testing.expectEqualStrings("a", ai1.next().?.string().?);
var m1 = ai1.next().?.map().?;
var kv1 = m1.next().?;
try std.testing.expectEqualStrings("b", kv1.key.string().?);
try std.testing.expectEqualStrings("c", kv1.value.string().?);
}
test "deserialize simple" {
const di1 = try DataItem.new("\xf4");
try std.testing.expectEqual(Type.False, di1.getType());
try std.testing.expectEqual(di1.boolean().?, false);
const di2 = try DataItem.new("\xf5");
try std.testing.expectEqual(Type.True, di2.getType());
try std.testing.expectEqual(di2.boolean().?, true);
const di3 = try DataItem.new("\xf6");
try std.testing.expectEqual(Type.Null, di3.getType());
const di4 = try DataItem.new("\xf7");
try std.testing.expectEqual(Type.Undefined, di4.getType());
const di5 = try DataItem.new("\xf0");
try std.testing.expectEqual(Type.Simple, di5.getType());
try std.testing.expectEqual(di5.simple().?, 16);
const di6 = try DataItem.new("\xf8\xff");
try std.testing.expectEqual(Type.Simple, di6.getType());
try std.testing.expectEqual(di6.simple().?, 255);
}
test "deserialize float" {
const di1 = try DataItem.new("\xfb\x3f\xf1\x99\x99\x99\x99\x99\x9a");
try std.testing.expectEqual(Type.Float, di1.getType());
try std.testing.expectApproxEqAbs(di1.float().?, 1.1, 0.000000001);
const di2 = try DataItem.new("\xf9\x3e\x00");
try std.testing.expectEqual(Type.Float, di2.getType());
try std.testing.expectApproxEqAbs(di2.float().?, 1.5, 0.000000001);
const di3 = try DataItem.new("\xf9\x80\x00");
try std.testing.expectEqual(Type.Float, di3.getType());
try std.testing.expectApproxEqAbs(di3.float().?, -0.0, 0.000000001);
const di4 = try DataItem.new("\xfb\x7e\x37\xe4\x3c\x88\x00\x75\x9c");
try std.testing.expectEqual(Type.Float, di4.getType());
try std.testing.expectApproxEqAbs(di4.float().?, 1.0e+300, 0.000000001);
try std.testing.expectEqual(@as(f16, 0.0), (try DataItem.new("\xf9\x00\x00")).getFloat16().?);
try std.testing.expectEqual(@as(f16, -0.0), (try DataItem.new("\xf9\x80\x00")).getFloat16().?);
try std.testing.expectEqual(@as(f16, 65504.0), (try DataItem.new("\xf9\x7b\xff")).getFloat16().?);
try std.testing.expectEqual(@as(f32, 3.4028234663852886e+38), (try DataItem.new("\xfa\x7f\x7f\xff\xff")).getFloat32().?);
try std.testing.expectEqual(@as(f64, -4.1), (try DataItem.new("\xfb\xc0\x10\x66\x66\x66\x66\x66\x66")).getFloat64().?);
}
test "deserialize tagged" {
const di1 = try DataItem.new("\xc0\x74\x32\x30\x31\x33\x2d\x30\x33\x2d\x32\x31\x54\x32\x30\x3a\x30\x34\x3a\x30\x30\x5a");
try std.testing.expectEqual(Type.Tagged, di1.getType());
const t1 = di1.tagged().?;
try std.testing.expectEqual(t1.nr, 0);
}
fn validateTest(data: []const u8, expected: bool) !void {
var i: usize = 0;
try std.testing.expectEqual(expected, validate(data, &i, true));
}
test "well formed" {
try validateTest("\x00", true);
try validateTest("\x01", true);
try validateTest("\x0a", true);
try validateTest("\x17", true);
try validateTest("\x18\x18", true);
try validateTest("\x18\x19", true);
try validateTest("\x18\x64", true);
try validateTest("\x19\x03\xe8", true);
}
test "malformed" {
// Empty
try validateTest("", false);
// End of input in a head
try validateTest("\x18", false);
try validateTest("\x19", false);
try validateTest("\x1a", false);
try validateTest("\x1b", false);
try validateTest("\x19\x01", false);
try validateTest("\x1a\x01\x02", false);
try validateTest("\x1b\x01\x02\x03\x04\x05\x06\x07", false);
try validateTest("\x38", false);
try validateTest("\x58", false);
try validateTest("\x78", false);
try validateTest("\x98", false);
try validateTest("\x9a\x01\xff\x00", false);
try validateTest("\xb8", false);
try validateTest("\xd8", false);
try validateTest("\xf8", false);
try validateTest("\xf9\x00", false);
try validateTest("\xfa\x00\x00", false);
try validateTest("\xfb\x00\x00\x00", false);
// Definite-length strings with short data
try validateTest("\x41", false);
try validateTest("\x61", false);
try validateTest("\x5a\xff\xff\xff\xff\x00", false);
//try validateTest("\x5b\xff\xff\xff\xff\xff\xff\xff\xff\x01\x02\x03", false); TODO: crashes
try validateTest("\x7a\xff\xff\xff\xff\x00", false);
try validateTest("\x7b\x7f\xff\xff\xff\xff\xff\xff\xff\x01\x02\x03", false);
// Definite-length maps and arrays not closed with enough items
try validateTest("\x81", false);
try validateTest("\x81\x81\x81\x81\x81\x81\x81\x81\x81", false);
try validateTest("\x82\x00", false);
try validateTest("\xa1", false);
try validateTest("\xa2\x01\x02", false);
try validateTest("\xa1\x00", false);
try validateTest("\xa2\x00\x00\x00", false);
// Tag number not followed by tag content
try validateTest("\xc0", false);
// Reserved additional information values
try validateTest("\x1c", false);
try validateTest("\x1d", false);
try validateTest("\x1e", false);
try validateTest("\x3c", false);
try validateTest("\x3d", false);
try validateTest("\x3e", false);
try validateTest("\x5c", false);
try validateTest("\x5d", false);
try validateTest("\x5e", false);
try validateTest("\x7c", false);
try validateTest("\x7d", false);
try validateTest("\x7e", false);
try validateTest("\x9c", false);
try validateTest("\x9d", false);
try validateTest("\x9e", false);
try validateTest("\xbc", false);
try validateTest("\xbd", false);
try validateTest("\xbe", false);
try validateTest("\xdc", false);
try validateTest("\xdd", false);
try validateTest("\xde", false);
try validateTest("\xfc", false);
try validateTest("\xfd", false);
try validateTest("\xfe", false);
// Reserved two-byte encodings of simple values
try validateTest("\xf8\x00", false);
try validateTest("\xf8\x01", false);
try validateTest("\xf8\x18", false);
try validateTest("\xf8\x1f", false);
// Break occuring on its own outside of an indifinite-length item
try validateTest("\xff", false);
// Break occuring in a definite-length array or map or a tag
try validateTest("\x81\xff", false);
try validateTest("\x82\x00\xff", false);
try validateTest("\xa1\xff", false);
try validateTest("\xa1\xff\x00", false);
try validateTest("\xa1\x00\xff", false);
try validateTest("\xa2\x00\x00\xff", false);
try validateTest("\x9f\x81\xff", false);
try validateTest("\x9f\x82\x9f\x81\x9f\x9f\xff\xff\xff\xff", false);
}
|
0 | repos/zbor | repos/zbor/src/build.zig | const std = @import("std");
const cbor = @import("cbor.zig");
/// Serialize an integer into a CBOR integer (major type 0 or 1).
pub fn writeInt(writer: anytype, value: i65) !void {
const h: u8 = if (value < 0) 0x20 else 0;
const v: u64 = @as(u64, @intCast(if (value < 0) -(value + 1) else value));
try encode(writer, h, v);
}
/// Serialize a slice to a CBOR byte string (major type 2).
pub fn writeByteString(writer: anytype, value: []const u8) !void {
const h: u8 = 0x40;
const v: u64 = @as(u64, @intCast(value.len));
try encode(writer, h, v);
try writer.writeAll(value);
}
/// Serialize a slice to a CBOR text string (major type 3).
pub fn writeTextString(writer: anytype, value: []const u8) !void {
const h: u8 = 0x60;
const v: u64 = @as(u64, @intCast(value.len));
try encode(writer, h, v);
try writer.writeAll(value);
}
/// Serialize a tag.
///
/// You MUST serialize another data item right after calling this function.
pub fn writeTag(writer: anytype, tag: u64) !void {
const h: u8 = 0xc0;
const v: u64 = tag;
try encode(writer, h, v);
}
/// Serialize a simple value.
pub fn writeSimple(writer: anytype, simple: u8) !void {
if (24 <= simple and simple <= 31) return error.ReservedValue;
const h: u8 = 0xe0;
const v: u64 = @as(u64, @intCast(simple));
try encode(writer, h, v);
}
pub fn writeTrue(writer: anytype) !void {
try writeSimple(writer, 21);
}
pub fn writeFalse(writer: anytype) !void {
try writeSimple(writer, 20);
}
pub fn writeFloat(writer: anytype, f: anytype) !void {
const T = @TypeOf(f);
const TInf = @typeInfo(T);
switch (TInf) {
.Float => |float| {
switch (float.bits) {
16 => try cbor.encode_2(writer, 0xe0, @as(u64, @intCast(@as(u16, @bitCast(f))))),
32 => try cbor.encode_4(writer, 0xe0, @as(u64, @intCast(@as(u32, @bitCast(f))))),
64 => try cbor.encode_8(writer, 0xe0, @as(u64, @intCast(@as(u64, @bitCast(f))))),
else => @compileError("Float must be 16, 32 or 64 Bits wide"),
}
},
else => return error.NotAFloat,
}
}
/// Write the header of an array to `writer`.
///
/// You must write exactly `len` data items to `writer` afterwards.
pub inline fn writeArray(writer: anytype, len: u64) !void {
try encode(writer, 0x80, len);
}
/// Write the header of a map to `writer`.
///
/// You must write exactly `len` key-value pairs (data items) to `writer` afterwards.
pub inline fn writeMap(writer: anytype, len: u64) !void {
try encode(writer, 0xa0, len);
}
/// Type of a Builder container
pub const ContainerType = enum {
Root,
Array,
Map,
};
const Entry = struct {
t: ContainerType = .Root,
cnt: u64 = 0,
raw: std.ArrayList(u8),
pub fn new(allocator: std.mem.Allocator, t: ContainerType) @This() {
return .{
.t = t,
.cnt = 0,
.raw = std.ArrayList(u8).init(allocator),
};
}
};
/// A Builder lets you dynamically generate CBOR data.
pub const Builder = struct {
stack: std.ArrayList(Entry),
allocator: std.mem.Allocator,
/// Create a new builder.
///
/// On error all allocated memory is freed.
pub fn new(allocator: std.mem.Allocator) !@This() {
return withType(allocator, .Root);
}
/// Create a new builder with the given container type.
///
/// On error all allocated memory is freed.
pub fn withType(allocator: std.mem.Allocator, t: ContainerType) !@This() {
var b = @This(){
.stack = std.ArrayList(Entry).init(allocator),
.allocator = allocator,
};
// The stack has at least one element on it: the Root
b.stack.append(Entry.new(allocator, .Root)) catch |e| {
b.unwind();
return e;
};
// If we want to use a container type just push another
// entry onto the stack. The container will later be
// merged into the root
if (t != .Root) {
b.stack.append(Entry.new(allocator, t)) catch |e| {
b.unwind();
return e;
};
}
return b;
}
/// Serialize an integer.
///
/// On error all allocated memory is freed. After this
/// point one MUST NOT access the builder!
pub fn pushInt(self: *@This(), value: i65) !void {
writeInt(self.top().raw.writer(), value) catch |e| {
self.unwind();
return e;
};
self.top().cnt += 1;
}
/// Serialize a slice as byte string.
///
/// On error all allocated memory is freed. After this
/// point one MUST NOT access the builder!
pub fn pushByteString(self: *@This(), value: []const u8) !void {
writeByteString(self.top().raw.writer(), value) catch |e| {
self.unwind();
return e;
};
self.top().cnt += 1;
}
/// Serialize a slice as text string.
///
/// On error all allocated memory is freed. After this
/// point one MUST NOT access the builder!
pub fn pushTextString(self: *@This(), value: []const u8) !void {
writeTextString(self.top().raw.writer(), value) catch |e| {
self.unwind();
return e;
};
self.top().cnt += 1;
}
/// Serialize a tag.
///
/// You MUST serialize another data item right after calling this function.
///
/// On error all allocated memory is freed. After this
/// point one MUST NOT access the builder!
pub fn pushTag(self: *@This(), tag: u64) !void {
writeTag(self.top().raw.writer(), tag) catch |e| {
self.unwind();
return e;
};
}
/// Serialize a simple value.
///
/// On error (except for ReservedValue) all allocated memory is freed.
/// After this point one MUST NOT access the builder!
pub fn pushSimple(self: *@This(), simple: u8) !void {
writeSimple(self.top().raw.writer(), simple) catch |e| {
self.unwind();
return e;
};
}
/// Add a chunk of CBOR.
///
/// The given CBOR data is only added if its well formed.
///
/// On error (except for MalformedCbor) all allocated memory is freed.
/// After this point one MUST NOT access the builder!
pub fn pushCbor(self: *@This(), input: []const u8) !void {
// First check that the given cbor is well formed
var i: usize = 0;
if (!cbor.validate(input, &i, true)) return error.MalformedCbor;
// Append the cbor data
self.top().raw.appendSlice(input) catch |e| {
self.unwind();
return e;
};
self.top().cnt += 1;
}
/// Enter a data structure (Array or Map)
///
/// On error (except for InvalidContainerType) all allocated memory is freed.
/// After this point one MUST NOT access the builder!
pub fn enter(self: *@This(), t: ContainerType) !void {
if (t == .Root) return error.InvalidContainerType;
self.stack.append(Entry.new(self.allocator, t)) catch |e| {
self.unwind();
return e;
};
}
/// Leave the current data structure
///
/// On error (except for EmptyStack and InvalidPairCount) all allocated
/// memory is freed. After this point one MUST NOT access the builder!
pub fn leave(self: *@This()) !void {
if (self.stack.items.len < 2) return error.EmptyStack;
if (self.top().t == .Map and self.top().cnt & 0x01 != 0)
return error.InvalidPairCount;
try self.moveUp();
}
/// Return the serialized data.
///
/// The caller is responsible for freeing the data.
///
/// On error (except for InvalidPairCount) all allocated
/// memory is freed. After this point one MUST NOT access the builder!
pub fn finish(self: *@This()) ![]u8 {
if (self.top().t == .Map and self.top().cnt & 0x01 != 0)
return error.InvalidPairCount;
// unwind the stack if neccessary
while (self.stack.items.len > 1) {
try self.moveUp();
}
const s = self.stack.items[0].raw.toOwnedSlice();
self.stack.deinit();
return s;
}
fn moveUp(self: *@This()) !void {
const e = self.stack.pop();
defer e.raw.deinit();
switch (e.t) {
.Array => writeArray(self.top().raw.writer(), e.cnt) catch |err| {
self.unwind();
return err;
},
.Map => writeMap(self.top().raw.writer(), e.cnt / 2) catch |err| {
self.unwind();
return err;
},
.Root => unreachable,
}
self.top().raw.appendSlice(e.raw.items) catch |err| {
self.unwind();
return err;
};
self.top().cnt += 1;
}
/// Return a mutable reference to the element at the top of the stack.
fn top(self: *@This()) *Entry {
return &self.stack.items[self.stack.items.len - 1];
}
/// Free all allocated memory on error. This is meant
/// to prevent memory leaks if the builder throws an error.
fn unwind(self: *@This()) void {
while (self.stack.items.len > 0) {
const e = self.stack.pop();
e.raw.deinit();
}
self.stack.deinit();
}
};
fn encode(out: anytype, head: u8, v: u64) !void {
switch (v) {
0x00...0x17 => {
try out.writeByte(head | @as(u8, @intCast(v)));
},
0x18...0xff => {
try out.writeByte(head | 24);
try out.writeByte(@as(u8, @intCast(v)));
},
0x0100...0xffff => try cbor.encode_2(out, head, v),
0x00010000...0xffffffff => try cbor.encode_4(out, head, v),
0x0000000100000000...0xffffffffffffffff => try cbor.encode_8(out, head, v),
}
}
fn testInt(expected: []const u8, i: i65) !void {
const allocator = std.testing.allocator;
var b = try Builder.new(allocator);
try b.pushInt(i);
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, expected, x);
}
fn testByteString(expected: []const u8, i: []const u8) !void {
const allocator = std.testing.allocator;
var b = try Builder.new(allocator);
try b.pushByteString(i);
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, expected, x);
}
fn testTextString(expected: []const u8, i: []const u8) !void {
const allocator = std.testing.allocator;
var b = try Builder.new(allocator);
try b.pushTextString(i);
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, expected, x);
}
test "stringify int with builder" {
try testInt("\x1b\x00\x00\x00\x02\xdf\xdc\x1c\x34", 12345678900);
try testInt("\x18\x7b", 123);
try testInt("\x3a\x00\x0f\x3d\xdc", -998877);
try testInt("\x3b\xff\xff\xff\xff\xff\xff\xff\xff", -18446744073709551616);
}
test "stringify string with builder" {
try testByteString("\x45\x10\x11\x12\x13\x14", "\x10\x11\x12\x13\x14");
try testTextString("\x64\x49\x45\x54\x46", "IETF");
try testTextString("\x62\x22\x5c", "\"\\");
}
test "stringify array using builder 1" {
const allocator = std.testing.allocator;
var b = try Builder.withType(allocator, .Array);
try b.pushInt(1);
try b.enter(.Array); // array 1 start
try b.pushInt(2);
try b.pushInt(3);
try b.leave(); // array 1 end
try b.enter(.Array); // array 2 start
try b.pushInt(4);
try b.pushInt(5);
try b.leave(); // array 2 end
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, "\x83\x01\x82\x02\x03\x82\x04\x05", x);
}
test "stringify array using builder 2" {
const allocator = std.testing.allocator;
var b = try Builder.withType(allocator, .Array);
var i: i65 = 1;
while (i < 26) : (i += 1) {
try b.pushInt(i);
}
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, "\x98\x19\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x18\x18\x19", x);
}
test "stringify map using builder 1" {
const allocator = std.testing.allocator;
var b = try Builder.withType(allocator, .Map);
try b.pushInt(1);
try b.pushInt(2);
try b.pushInt(3);
try b.pushInt(4);
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, "\xa2\x01\x02\x03\x04", x);
}
test "stringify nested map using builder 1" {
const allocator = std.testing.allocator;
var b = try Builder.withType(allocator, .Map);
try b.pushTextString("a");
try b.pushInt(1);
try b.pushTextString("b");
try b.enter(.Array);
try b.pushInt(2);
try b.pushInt(3);
//try b.leave(); <-- you can leave out the return at the end
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, "\xa2\x61\x61\x01\x61\x62\x82\x02\x03", x);
}
test "stringify nested array using builder 1" {
const allocator = std.testing.allocator;
var b = try Builder.withType(allocator, .Array);
try b.pushTextString("a");
try b.enter(.Map);
try b.pushTextString("b");
try b.pushTextString("c");
try b.leave();
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, "\x82\x61\x61\xa1\x61\x62\x61\x63", x);
}
test "stringify tag using builder 1" {
const allocator = std.testing.allocator;
var b = try Builder.new(allocator);
try b.pushTag(0);
try b.pushTextString("2013-03-21T20:04:00Z");
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, "\xc0\x74\x32\x30\x31\x33\x2d\x30\x33\x2d\x32\x31\x54\x32\x30\x3a\x30\x34\x3a\x30\x30\x5a", x);
}
test "stringify simple using builder 1" {
const allocator = std.testing.allocator;
var b = try Builder.new(allocator);
try b.pushSimple(255);
const x = try b.finish();
defer allocator.free(x);
try std.testing.expectEqualSlices(u8, "\xf8\xff", x);
}
test "write true false" {
const allocator = std.testing.allocator;
var arr = std.ArrayList(u8).init(allocator);
defer arr.deinit();
try writeTrue(arr.writer());
try writeFalse(arr.writer());
try std.testing.expectEqual(@as(u8, 0xf5), arr.items[0]);
try std.testing.expectEqual(@as(u8, 0xf4), arr.items[1]);
}
test "write float #1" {
const allocator = std.testing.allocator;
var arr = std.ArrayList(u8).init(allocator);
defer arr.deinit();
try writeFloat(arr.writer(), @as(f16, @floatCast(0.0)));
try std.testing.expectEqualSlices(u8, "\xf9\x00\x00", arr.items);
}
test "write float #2" {
const allocator = std.testing.allocator;
var arr = std.ArrayList(u8).init(allocator);
defer arr.deinit();
try writeFloat(arr.writer(), @as(f16, @floatCast(-0.0)));
try std.testing.expectEqualSlices(u8, "\xf9\x80\x00", arr.items);
}
test "write float #3" {
const allocator = std.testing.allocator;
var arr = std.ArrayList(u8).init(allocator);
defer arr.deinit();
try writeFloat(arr.writer(), @as(f32, @floatCast(3.4028234663852886e+38)));
try std.testing.expectEqualSlices(u8, "\xfa\x7f\x7f\xff\xff", arr.items);
}
test "write float #4" {
const allocator = std.testing.allocator;
var arr = std.ArrayList(u8).init(allocator);
defer arr.deinit();
try writeFloat(arr.writer(), @as(f64, @floatCast(-4.1)));
try std.testing.expectEqualSlices(u8, "\xfb\xc0\x10\x66\x66\x66\x66\x66\x66", arr.items);
}
|
0 | repos/zbor | repos/zbor/src/cose.zig | const std = @import("std");
const cbor = @import("cbor.zig");
const Type = cbor.Type;
const DataItem = cbor.DataItem;
const Tag = cbor.Tag;
const Pair = cbor.Pair;
const MapIterator = cbor.MapIterator;
const ArrayIterator = cbor.ArrayIterator;
const parse_ = @import("parse.zig");
const stringify = parse_.stringify;
const parse = parse_.parse;
const Options = parse_.Options;
const EcdsaP256Sha256 = std.crypto.sign.ecdsa.EcdsaP256Sha256;
/// COSE algorithm identifiers
pub const Algorithm = enum(i32) {
/// RSASSA-PKCS1-v1_5 using SHA-1
Rs1 = -65535,
/// WalnutDSA signature
WalnutDSA = -260,
/// RSASSA-PKCS1-v1_5 using SHA-512
Rs512 = -259,
/// RSASSA-PKCS1-v1_5 using SHA-384
Rs384 = -258,
/// RSASSA-PKCS1-v1_5 using SHA-256
Rs256 = -257,
/// ECDSA using secp256k1 curve and SHA-256
ES256K = -47,
/// HSS/LMS hash-based digital signature
HssLms = -46,
/// SHAKE-256 512-bit Hash Value
Shake256 = -45,
/// SHA-2 512-bit Hash
Sha512 = -44,
/// SHA-2 384-bit Hash
Sha384 = -43,
/// RSAES-OAEP w/ SHA-512
RsaesOaepSha512 = -42,
/// RSAES-OAEP w/ SHA-256
RsaesOaepSha256 = -41,
/// RSAES-OAEP w/ SHA-1
RsaesOaepDefault = -40,
/// RSASSA-PSS w/ SHA-512
Ps512 = -39,
/// RSASSA-PSS w/ SHA-384
Ps384 = -38,
/// RSASSA-PSS w/ SHA-256
Ps256 = -37,
/// ECDSA w/ SHA-512
Es512 = -36,
/// ECDSA w/ SHA-384
Es384 = -35,
/// ECDH SS w/ Concat KDF and AES Key Wrap w/ 256-bit key
EcdhSsA256Kw = -34,
/// ECDH SS w/ Concat KDF and AES Key Wrap w/ 192-bit key
EcdhSsA192Kw = -33,
/// ECDH SS w/ Concat KDF and AES Key Wrap w/ 128-bit key
EcdhSsA128Kw = -32,
/// ECDH ES w/ Concat KDF and AES Key Wrap w/ 256-bit key
EcdhEsA256Kw = -31,
/// ECDH ES w/ Concat KDF and AES Key Wrap w/ 192-bit key
EcdhEsA192Kw = -30,
/// ECDH ES w/ Concat KDF and AES Key Wrap w/ 128-bit key
EcdhEsA128Kw = -29,
/// ECDH SS w/ HKDF - generate key directly
EcdhSsHkdf512 = -28,
/// ECDH SS w/ HKDF - generate key directly
EcdhSsHkdf256 = -27,
/// ECDH ES w/ HKDF - generate key directly
EcdhEsHkdf512 = -26,
/// ECDH ES w/ HKDF - generate key directly
EcdhEsHkdf256 = -25,
/// SHAKE-128 256-bit Hash Value
Shake128 = -18,
/// SHA-2 512-bit Hash truncated to 256-bits
Sha512_256 = -17,
/// SHA-2 256-bit Hash
Sha256 = -16,
/// SHA-2 256-bit Hash truncated to 64-bits
Sha256_64 = -15,
/// SHA-1 Hash
Sha1 = -14,
/// Shared secret w/ AES-MAC 256-bit key
DirectHkdfAes256 = -13,
/// Shared secret w/ AES-MAC 128-bit key
DirectHkdfAes128 = -12,
/// Shared secret w/ HKDF and SHA-512
DirectHkdfSha512 = -11,
/// Shared secret w/ HKDF and SHA-256
DirectHkdfSha256 = -10,
/// EdDSA
EdDsa = -8,
/// ECDSA w/ SHA-256
Es256 = -7,
/// Direct use of CEK
Direct = -6,
/// AES Key Wrap w/ 256-bit key
A256Kw = -5,
/// AES Key Wrap w/ 192-bit key
A192Kw = -4,
/// AES Key Wrap w/ 128-bit key
A128Kw = -3,
/// AES-GCM mode w/ 128-bit key, 128-bit tag
A128Gcm = 1,
/// AES-GCM mode w/ 192-bit key, 128-bit tag
A192Gcm = 2,
/// AES-GCM mode w/ 256-bit key, 128-bit tag
A256Gcm = 3,
pub fn to_raw(self: @This()) [4]u8 {
const i = @intFromEnum(self);
return std.mem.asBytes(&i).*;
}
pub fn from_raw(raw: [4]u8) @This() {
return @as(@This(), @enumFromInt(std.mem.bytesToValue(i32, &raw)));
}
};
/// COSE key types
pub const KeyType = enum(u8) {
/// Octet Key Pair
Okp = 1,
/// Elliptic Curve Keys w/ x- and y-coordinate pair
Ec2 = 2,
/// RSA Key
Rsa = 3,
/// Symmetric Keys
Symmetric = 4,
/// Public key for HSS/LMS hash-based digital signature
HssLms = 5,
/// WalnutDSA public key
WalnutDsa = 6,
};
/// COSE elliptic curves
pub const Curve = enum(i16) {
/// NIST P-256 also known as secp256r1 (EC2)
P256 = 1,
/// NIST P-384 also known as secp384r1 (EC2)
P384 = 2,
/// NIST P-521 also known as secp521r1 (EC2)
P521 = 3,
/// X25519 for use w/ ECDH only (OKP)
X25519 = 4,
/// X448 for use w/ ECDH only (OKP)
X448 = 5,
/// Ed25519 for use w/ EdDSA only (OKP)
Ed25519 = 6,
/// Ed448 for use w/ EdDSA only (OKP)
Ed448 = 7,
/// SECG secp256k1 curve (EC2)
secp256k1 = 8,
/// Return the `KeyType` of the given elliptic curve
pub fn keyType(self: @This()) KeyType {
return switch (self) {
.P256, .P384, .P521, .secp256k1 => .Ec2,
else => .Okp,
};
}
};
pub const KeyTag = enum { P256 };
pub const Key = union(KeyTag) {
P256: struct {
/// kty: Identification of the key type
kty: KeyType = .Ec2,
/// alg: Key usage restriction to this algorithm
alg: Algorithm,
/// crv: EC identifier -- Taken from the "COSE Elliptic Curves" registry
crv: Curve = .P256,
/// x: x-coordinate
x: [32]u8,
/// y: y-coordinate
y: [32]u8,
/// Private key
d: ?[32]u8 = null,
},
pub fn getAlg(self: *const @This()) Algorithm {
switch (self.*) {
.P256 => |k| return k.alg,
}
}
pub fn getPrivKey(self: *const @This()) []const u8 {
switch (self.*) {
.P256 => |k| {
return if (k.d) |d| d[0..] else null;
},
}
}
pub fn copySecure(self: *const @This()) @This() {
switch (self.*) {
.P256 => |k| {
return .{ .P256 = .{
.kty = k.kty,
.alg = k.alg,
.crv = k.crv,
.x = k.x,
.y = k.y,
.d = null,
} };
},
}
}
pub fn fromP256Pub(alg: Algorithm, pk: anytype) @This() {
const sec1 = pk.toUncompressedSec1();
return .{ .P256 = .{
.alg = alg,
.x = sec1[1..33].*,
.y = sec1[33..65].*,
} };
}
pub fn fromP256PrivPub(alg: Algorithm, privk: anytype, pubk: anytype) @This() {
const sec1 = pubk.toUncompressedSec1();
const pk = privk.toBytes();
return .{ .P256 = .{
.alg = alg,
.x = sec1[1..33].*,
.y = sec1[33..65].*,
.d = pk,
} };
}
/// Creates a new ECDSA P-256 (secp256r1) key pair for the ES256 algorithm.
///
/// - `seed`: Optional seed to derive the key pair from. If `null`, a random seed will be used.
///
/// Returns the newly created key pair as a structure containing the algorithm identifier,
/// public key coordinates, and the secret key.
///
/// # Examples
///
/// ```zig
/// const cbor = @import("zbor");
/// const keyPair = try cbor.cose.Key.es256(null);
///
/// // Use the key pair...
/// ```
pub fn es256(seed: ?[32]u8) !@This() {
const kp = try EcdsaP256Sha256.KeyPair.create(seed);
const sec1 = kp.public_key.toUncompressedSec1();
const pk = kp.secret_key.toBytes();
return .{ .P256 = .{
.alg = .Es256,
.x = sec1[1..33].*,
.y = sec1[33..65].*,
.d = pk,
} };
}
/// Signs the provided data using the specified algorithm and key.
///
/// - `data_seq`: A sequence of data slices to be signed together.
/// - `allocator`: Allocator to allocate memory for the signature.
///
/// Returns the DER-encoded signature as a dynamically allocated byte slice,
/// or an error if the algorithm or key is unsupported.
///
/// The user is responsible for freeing the allocated memory.
///
/// # Errors
///
/// - `error.UnsupportedAlgorithm`: If the algorithm is not supported.
///
/// # Examples
///
/// ```zig
/// const result = try key.sign(&.{data}, allocator);
///
/// // Use the signature...
/// ```
pub fn sign(
self: *const @This(),
data_seq: []const []const u8,
allocator: std.mem.Allocator,
) ![]const u8 {
switch (self.*) {
.P256 => |k| {
if (k.d == null) return error.MissingPrivateKey;
switch (k.alg) {
.Es256 => {
var kp = try EcdsaP256Sha256.KeyPair.fromSecretKey(
try EcdsaP256Sha256.SecretKey.fromBytes(k.d.?),
);
var signer = try kp.signer(null);
// Append data that should be signed together
for (data_seq) |data| {
signer.update(data);
}
// Sign the data
const sig = try signer.finalize();
var buffer: [EcdsaP256Sha256.Signature.der_encoded_length_max]u8 = undefined;
const der = sig.toDer(&buffer);
const mem = try allocator.alloc(u8, der.len);
@memcpy(mem, der);
return mem;
},
else => return error.UnsupportedAlgorithm,
}
},
}
}
/// Verifies a signature using the provided public key and a data sequence.
///
/// - `signature`: signature to be verified.
/// - `data_seq`: Array of data slices that were signed together.
///
/// Returns `true` if the signature is valid, `false` otherwise.
///
/// # Examples
///
/// ```zig
/// const signatureValid = try key.verify(signature, &.{data});
/// if (signatureValid) {
/// // Signature is valid
/// } else {
/// // Signature is not valid
/// }
/// ```
pub fn verify(
self: *const @This(),
signature: []const u8,
data_seq: []const []const u8,
) !bool {
switch (self.*) {
.P256 => |k| {
switch (k.alg) {
.Es256 => {
// Get public key struct
var usec1: [65]u8 = undefined;
usec1[0] = 4;
@memcpy(usec1[1..33], &k.x);
@memcpy(usec1[33..65], &k.y);
const pk = try EcdsaP256Sha256.PublicKey.fromSec1(&usec1);
// Get signature struct
const sig = try EcdsaP256Sha256.Signature.fromDer(signature);
// Get verifier
var verifier = try sig.verifier(pk);
for (data_seq) |data| {
verifier.update(data);
}
verifier.verify() catch {
// Verification failed
return false;
};
return true;
},
else => return error.UnsupportedAlgorithm,
}
},
}
}
pub fn cborStringify(self: *const @This(), options: Options, out: anytype) !void {
_ = options;
return stringify(self, .{
.from_callback = true,
.field_settings = &.{
.{
.name = "kty",
.field_options = .{
.alias = "1",
.serialization_type = .Integer,
},
.value_options = .{ .enum_serialization_type = .Integer },
},
.{
.name = "alg",
.field_options = .{
.alias = "3",
.serialization_type = .Integer,
},
.value_options = .{ .enum_serialization_type = .Integer },
},
.{
.name = "crv",
.field_options = .{
.alias = "-1",
.serialization_type = .Integer,
},
.value_options = .{ .enum_serialization_type = .Integer },
},
.{ .name = "x", .field_options = .{
.alias = "-2",
.serialization_type = .Integer,
} },
.{ .name = "y", .field_options = .{
.alias = "-3",
.serialization_type = .Integer,
} },
.{ .name = "d", .field_options = .{
.alias = "-4",
.serialization_type = .Integer,
} },
},
}, out);
}
pub fn cborParse(item: cbor.DataItem, options: Options) !@This() {
return try parse(@This(), item, .{
.allocator = options.allocator,
.from_callback = true, // prevent infinite loops
.field_settings = &.{
.{
.name = "kty",
.field_options = .{
.alias = "1",
.serialization_type = .Integer,
},
},
.{
.name = "alg",
.field_options = .{
.alias = "3",
.serialization_type = .Integer,
},
},
.{
.name = "crv",
.field_options = .{
.alias = "-1",
.serialization_type = .Integer,
},
},
.{ .name = "x", .field_options = .{
.alias = "-2",
.serialization_type = .Integer,
} },
.{ .name = "y", .field_options = .{
.alias = "-3",
.serialization_type = .Integer,
} },
.{ .name = "d", .field_options = .{
.alias = "-4",
.serialization_type = .Integer,
} },
},
});
}
};
test "cose Key p256 stringify #1" {
const x = try EcdsaP256Sha256.PublicKey.fromSec1("\x04\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52");
const k = Key.fromP256Pub(.Es256, x);
const allocator = std.testing.allocator;
var str = std.ArrayList(u8).init(allocator);
defer str.deinit();
try stringify(k, .{}, str.writer());
try std.testing.expectEqualSlices(u8, "\xa5\x01\x02\x03\x26\x20\x01\x21\x58\x20\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\x22\x58\x20\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52", str.items);
}
test "cose Key p256 parse #1" {
const payload = "\xa5\x01\x02\x03\x26\x20\x01\x21\x58\x20\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e\x22\x58\x20\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52";
const di = try DataItem.new(payload);
const key = try parse(Key, di, .{});
try std.testing.expectEqual(Algorithm.Es256, key.P256.alg);
try std.testing.expectEqual(KeyType.Ec2, key.P256.kty);
try std.testing.expectEqual(Curve.P256, key.P256.crv);
try std.testing.expectEqualSlices(u8, "\xd9\xf4\xc2\xa3\x52\x13\x6f\x19\xc9\xa9\x5d\xa8\x82\x4a\xb5\xcd\xc4\xd5\x63\x1e\xbc\xfd\x5b\xdb\xb0\xbf\xff\x25\x36\x09\x12\x9e", &key.P256.x);
try std.testing.expectEqualSlices(u8, "\xef\x40\x4b\x88\x07\x65\x57\x60\x07\x88\x8a\x3e\xd6\xab\xff\xb4\x25\x7b\x71\x23\x55\x33\x25\xd4\x50\x61\x3c\xb5\xbc\x9a\x3a\x52", &key.P256.y);
}
test "alg to raw" {
const es256 = Algorithm.Es256;
const x: [4]u8 = es256.to_raw();
try std.testing.expectEqualSlices(u8, "\xF9\xFF\xFF\xFF", &x);
}
test "raw to alg" {
const x: [4]u8 = "\xF9\xFF\xFF\xFF".*;
try std.testing.expectEqual(Algorithm.Es256, Algorithm.from_raw(x));
}
test "es256 sign verify 1" {
const allocator = std.testing.allocator;
const msg = "Hello, World!";
const kp1 = try EcdsaP256Sha256.KeyPair.create(null);
// Create a signature via cose key struct
var cosep256 = Key.fromP256PrivPub(.Es256, kp1.secret_key, kp1.public_key);
const sig_der_1 = try cosep256.sign(&.{msg}, allocator);
defer allocator.free(sig_der_1);
// Verify the created signature
const sig1 = try EcdsaP256Sha256.Signature.fromDer(sig_der_1);
sig1.verify(msg, kp1.public_key) catch {
try std.testing.expect(false); // expected void but got error
};
// Verify the created signature again
try std.testing.expectEqual(true, try cosep256.verify(sig_der_1, &.{msg}));
// Create another key-pair
var kp2 = try Key.es256(null);
// Trying to verfiy the first signature using the new key-pair should fail
try std.testing.expectEqual(false, try kp2.verify(sig_der_1, &.{msg}));
}
test "copy secure #1" {
const kp1 = try EcdsaP256Sha256.KeyPair.create(null);
var cosep256 = Key.fromP256PrivPub(.Es256, kp1.secret_key, kp1.public_key);
const cpy = cosep256.copySecure();
try std.testing.expectEqual(cpy.P256.d, null);
}
|
0 | repos/zbor/src/.zig-cache/o | repos/zbor/src/.zig-cache/o/a32fcfc0e475f08356ed8aef4020640b/dependencies.zig | pub const packages = struct {};
pub const root_deps: []const struct { []const u8, []const u8 } = &.{};
|
0 | repos/zbor | repos/zbor/examples/manual_serialization.zig | const std = @import("std");
const zbor = @import("zbor");
const User = struct {
id: []const u8,
name: []const u8,
displayName: []const u8,
};
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var stdout = std.io.getStdOut();
pub fn main() !void {
const user = User{
.id = "\x01\x23\x45\x67",
.name = "[email protected]",
.displayName = "Bob",
};
const expected = "\xa3\x62\x69\x64\x44\x01\x23\x45\x67\x64\x6e\x61\x6d\x65\x6f\x62\x6f\x62\x40\x65\x78\x61\x6d\x70\x6c\x65\x2e\x63\x6f\x6d\x6b\x64\x69\x73\x70\x6c\x61\x79\x4e\x61\x6d\x65\x63\x42\x6f\x62";
var di = std.ArrayList(u8).init(allocator);
defer di.deinit();
const writer = di.writer();
try zbor.build.writeMap(writer, 3);
try zbor.build.writeTextString(writer, "id");
try zbor.build.writeByteString(writer, user.id);
try zbor.build.writeTextString(writer, "name");
try zbor.build.writeTextString(writer, user.name);
try zbor.build.writeTextString(writer, "displayName");
try zbor.build.writeTextString(writer, user.displayName);
try stdout.writer().print("expected: {s}\ngot: {s}\nmatches: {any}\n", .{
std.fmt.fmtSliceHexLower(expected),
std.fmt.fmtSliceHexLower(di.items),
std.mem.eql(u8, expected, di.items),
});
}
|
0 | repos/zbor | repos/zbor/examples/automatic_serialization2.zig | const std = @import("std");
const cbor = @import("zbor");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var original_msg = Message.new("stack_id", "hello", "there");
// serialize the message
var bytes = std.ArrayList(u8).init(allocator);
defer bytes.deinit();
original_msg.headers.token = "my cool client token that totally is awesome";
try original_msg.cborStringify(.{}, bytes.writer());
const expected = "\xa5\x00\x68\x73\x74\x61\x63\x6b\x5f\x69\x64\x01\x00\x02\x65\x68\x65\x6c\x6c\x6f\x03\x65\x74\x68\x65\x72\x65\x05\xa1\x00\x78\x2c\x6d\x79\x20\x63\x6f\x6f\x6c\x20\x63\x6c\x69\x65\x6e\x74\x20\x74\x6f\x6b\x65\x6e\x20\x74\x68\x61\x74\x20\x74\x6f\x74\x61\x6c\x6c\x79\x20\x69\x73\x20\x61\x77\x65\x73\x6f\x6d\x65";
if (!std.mem.eql(u8, expected, bytes.items)) {
std.log.err("serialization failure! expected '{s}' but got '{s}'", .{
std.fmt.fmtSliceHexLower(expected),
std.fmt.fmtSliceHexLower(bytes.items),
});
}
const di: cbor.DataItem = try cbor.DataItem.new(bytes.items);
const parsed_msg = try Message.cborParse(di, .{ .allocator = allocator });
std.debug.print("msg {any}\n", .{parsed_msg});
}
pub const MessageType = enum(u8) {
Undefined,
};
pub const Message = struct {
const Self = @This();
id: []const u8,
message_type: u8,
topic: []const u8,
content: ?[]const u8 = null,
tx_id: ?[]const u8 = null,
headers: Headers,
// return a stack Message
pub fn new(id: []const u8, topic: []const u8, content: []const u8) Message {
return Message{
.id = id,
.topic = topic,
.message_type = @intFromEnum(MessageType.Undefined),
.content = content,
.tx_id = null,
.headers = Headers.new(null),
};
}
// return a heap Message
pub fn create(allocator: std.mem.Allocator, id: []const u8, topic: []const u8, content: []const u8) !*Message {
const ptr = try allocator.create(Message);
ptr.* = Message.new(id, topic, content);
return ptr;
}
pub fn cborStringify(self: Self, o: cbor.Options, out: anytype) !void {
try cbor.stringify(self, .{
.from_callback = true,
.field_settings = &.{
.{
.name = "id", // the name of the affected struct field
.field_options = .{ .alias = "0", .serialization_type = .Integer }, // replace "id" with "0" and treat "0" as an integer
.value_options = .{ .slice_serialization_type = .TextString }, // serialize the value of "id" as text string (major type 3)
},
.{
.name = "message_type",
.field_options = .{ .alias = "1", .serialization_type = .Integer },
},
.{
.name = "topic",
.field_options = .{ .alias = "2", .serialization_type = .Integer },
.value_options = .{ .slice_serialization_type = .TextString },
},
.{
.name = "content",
.field_options = .{ .alias = "3", .serialization_type = .Integer },
.value_options = .{ .slice_serialization_type = .TextString },
},
.{
.name = "tx_id",
.field_options = .{ .alias = "4", .serialization_type = .Integer },
.value_options = .{ .slice_serialization_type = .TextString },
},
.{
.name = "headers",
.field_options = .{ .alias = "5", .serialization_type = .Integer },
},
},
.allocator = o.allocator,
}, out);
}
pub fn cborParse(item: cbor.DataItem, o: cbor.Options) !Self {
return try cbor.parse(Self, item, .{
.from_callback = true, // prevent infinite loops
.field_settings = &.{
.{
.name = "id", // the name of the affected struct field
.field_options = .{ .alias = "0", .serialization_type = .Integer }, // replace "id" with "0" and treat "0" as an integer
.value_options = .{ .slice_serialization_type = .TextString }, // serialize the value of "id" as text string (major type 3)
},
.{
.name = "message_type",
.field_options = .{ .alias = "1", .serialization_type = .Integer },
},
.{
.name = "topic",
.field_options = .{ .alias = "2", .serialization_type = .Integer },
.value_options = .{ .slice_serialization_type = .TextString },
},
.{
.name = "content",
.field_options = .{ .alias = "3", .serialization_type = .Integer },
.value_options = .{ .slice_serialization_type = .TextString },
},
.{
.name = "tx_id",
.field_options = .{ .alias = "4", .serialization_type = .Integer },
.value_options = .{ .slice_serialization_type = .TextString },
},
.{
.name = "headers",
.field_options = .{ .alias = "5", .serialization_type = .Integer },
},
},
.allocator = o.allocator,
});
}
};
pub const Headers = struct {
const Self = @This();
token: ?[]const u8,
pub fn new(token: ?[]const u8) Self {
return Headers{
.token = token,
};
}
pub fn create(allocator: std.mem.Allocator, token: ?[]const u8) !*Self {
const ptr = try allocator.create(Headers);
ptr.* = Headers.new(token);
return ptr;
}
pub fn cborStringify(self: Self, o: cbor.Options, out: anytype) !void {
try cbor.stringify(self, .{
.from_callback = true,
.field_settings = &.{
.{
.name = "token",
.field_options = .{ .alias = "0", .serialization_type = .Integer },
.value_options = .{ .slice_serialization_type = .TextString },
},
},
.allocator = o.allocator,
}, out);
}
pub fn cborParse(item: cbor.DataItem, o: cbor.Options) !Self {
return try cbor.parse(Self, item, .{
.from_callback = true, // prevent infinite loops
.field_settings = &.{
.{
.name = "token",
.field_options = .{ .alias = "0", .serialization_type = .Integer },
.value_options = .{ .slice_serialization_type = .TextString },
},
},
.allocator = o.allocator,
});
}
};
|
0 | repos/zbor | repos/zbor/examples/automatic_serialization.zig | const std = @import("std");
const zbor = @import("zbor");
const User = struct {
id: []const u8,
name: []const u8,
displayName: []const u8,
pub fn cborStringify(self: *const @This(), options: zbor.Options, out: anytype) !void {
return zbor.stringify(self, .{
.allocator = options.allocator,
.from_callback = true,
.field_settings = &.{
.{ .name = "id", .value_options = .{ .slice_serialization_type = .ByteString } },
.{ .name = "name", .value_options = .{ .slice_serialization_type = .TextString } },
.{ .name = "displayName", .value_options = .{ .slice_serialization_type = .TextString } },
},
}, out);
}
};
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var stdout = std.io.getStdOut();
pub fn main() !void {
const user = User{
.id = "\x01\x23\x45\x67",
.name = "[email protected]",
.displayName = "Bob",
};
const expected = "\xa3\x62\x69\x64\x44\x01\x23\x45\x67\x64\x6e\x61\x6d\x65\x6f\x62\x6f\x62\x40\x65\x78\x61\x6d\x70\x6c\x65\x2e\x63\x6f\x6d\x6b\x64\x69\x73\x70\x6c\x61\x79\x4e\x61\x6d\x65\x63\x42\x6f\x62";
var di = std.ArrayList(u8).init(allocator);
defer di.deinit();
const writer = di.writer();
try zbor.stringify(user, .{}, writer);
try stdout.writer().print("expected: {s}\ngot: {s}\nmatches: {any}\n", .{
std.fmt.fmtSliceHexLower(expected),
std.fmt.fmtSliceHexLower(di.items),
std.mem.eql(u8, expected, di.items),
});
}
|
0 | repos | repos/learning-zig/05-pointers.md | > 原文地址:<https://www.openmymind.net/learning_zig/pointers>
# 指针
Zig 不包含垃圾回收器。管理内存的重任由开发者负责。这是一项重大责任,因为它直接影响到应用程序的性能、稳定性和安全性。
我们将从指针开始讨论,这本身就是一个重要的话题,同时也是训练我们从面向内存的角度来看待程序数据的开始。如果你已经对指针、堆分配和悬挂指针了如指掌,那么可以跳过本小节和下一小节,直接阅读[堆内存和分配器](07-heap-memory-and-allocator.md),这部分内容与 Zig 更为相关。
---
下面的代码创建了一个 `power` 为 100 的用户,然后调用 `levelUp` 函数将用户的 `power` 加一。你能猜到它的输出结果吗?
```zig
const std = @import("std");
pub fn main() void {
var user = User{
.id = 1,
.power = 100,
};
// this line has been added
levelUp(user);
std.debug.print("User {d} has power of {d}\n", .{user.id, user.power});
}
fn levelUp(user: User) void {
user.power += 1;
}
pub const User = struct {
id: u64,
power: i32,
};
```
这里我设置了一个陷阱,此段代码将无法编译:_局部变量从未被修改_。这是指 `main` 函数中的 `user` 变量。一个从未被修改的变量必须声明为 const。你可能会想:但在 `levelUp` 函数中我们确实修改了 `user`,这怎么回事?让我们假设 Zig 编译器弄错了,并试着糊弄它。我们将强制让编译器看到 `user` 确实被修改了:
```zig
const std = @import("std");
pub fn main() void {
var user = User{
.id = 1,
.power = 100,
};
user.power += 0;
// 代码的其余部分保持不变。
```
现在我们在 `levelUp` 中遇到了一个错误:**不能赋值给常量**。我们在第一部分中看到函数参数是常量,因此 `user.power += 1` 是无效的。为了解决这个错误,我们可以将 `levelUp` 函数改为
```zig
fn levelUp(user: User) void {
var u = user;
u.power += 1;
}
```
虽然编译成功了,但输出结果却是`User 1 has power of 100`,而我们代码的目的显然是让 `levelUp` 将用户的 `power` 提升到 101。这是怎么回事?
要理解这一点,我们可以将数据与内存联系起来,而变量只是将类型与特定内存位置关联起来的标签。例如,在 `main` 中,我们创建了一个`User`。内存中数据的简单可视化表示如下
```text
user -> ------------ (id)
| 1 |
------------ (power)
| 100 |
------------
```
有两点需要注意:
1. 我们的`user`变量指向结构的起点
2. 字段是按顺序排列的
请记住,我们的`user`也有一个类型。该类型告诉我们 `id` 是一个 64 位整数,`power` 是一个 32 位整数。有了对数据起始位置的引用和类型,编译器就可以将 `user.power` 转换为:访问位置在结构体第 64 位上的一个 32 位整数。这就是变量的威力,它们可以引用内存,并包含以有意义的方式理解和操作内存所需的类型信息。
> 默认情况下,Zig 不保证结构的内存布局。它可以按字母顺序、大小升序或插入填充(padding)某些字段。只要它能正确翻译我们的代码,它就可以为所欲为。这种自由度可以实现某些优化。只有在声明 `packed struct`时,我们才能获得内存布局的有力保证。我们还可以创建一个 `extern struct`,这样可以保证内存布局与 C 应用程序二进制接口 (ABI) 匹配。尽管如此,我们对`user`的可视化还是合理而有用的。
下面是一个稍有不同的可视化效果,其中包括内存地址。这些数据的起始内存地址是我想出来的一个随机地址。这是`user`变量引用的内存地址,也是第一个字段 `id` 的值所在的位置。由于 `id` 是一个 64 位整数,需要 8 字节内存。因此,`power` 必须位于 `$start_address + 8` 上:
```text
user -> ------------ (id: 1043368d0)
| 1 |
------------ (power: 1043368d8)
| 100 |
------------
```
为了验证这一点,我想介绍一下取地址符运算符:`&`。顾名思义,取地址运算符返回一个变量的地址(它也可以返回一个函数的地址,是不是很神奇?)保留现有的 `User` 定义,试试下面的代码:
```zig
pub fn main() void {
const user = User{
.id = 1,
.power = 100,
};
std.debug.print("{*}\n{*}\n{*}\n", .{&user, &user.id, &user.power});
}
```
这段代码输出了`user`、`user.id`、和`user.power`的地址。根据平台等差异,可能会得到不同的输出结果,但都会看到`user`和`user.id`的地址相同,而`user.power`的地址偏移量了 8 个字节。输出的结果如下:
```text
learning.User@1043368d0
u64@1043368d0
i32@1043368d8
```
取地址运算符返回一个指向值的指针。指向值的指针是一种特殊的类型。类型`T`的值的地址是`*T`。因此,如果我们获取 `user` 的地址,就会得到一个 `*User`,即一个指向 `User` 的指针:
```zig
pub fn main() void {
var user = User{
.id = 1,
.power = 100,
};
user.power += 0;
const user_p = &user;
std.debug.print("{any}\n", .{@TypeOf(user_p)});
}
```
我们最初的目标是通过`levelUp`函数将用户的`power`值增加 1 。我们已经让代码编译通过,但当我们打印`power`时,它仍然是原始值。虽然有点跳跃,但让我们修改代码,在 `main` 和 `levelUp` 中打印 `user`的地址:
```zig
pub fn main() void {
var user = User{
.id = 1,
.power = 100,
};
user.power += 0;
// added this
std.debug.print("main: {*}\n", .{&user});
levelUp(user);
std.debug.print("User {d} has power of {d}\n", .{user.id, user.power});
}
fn levelUp(user: User) void {
// add this
std.debug.print("levelUp: {*}\n", .{&user});
var u = user;
u.power += 1;
}
```
如果运行这个程序,会得到两个不同的地址。这意味着在 `levelUp` 中被修改的 `user`与 `main` 中的`user`是不同的。这是因为 Zig 传递了一个值的副本。这似乎是一个奇怪的默认行为,但它的好处之一是,函数的调用者可以确保函数不会修改参数(因为它不能)。在很多情况下,有这样的保证是件好事。当然,有时我们希望函数能修改参数,比如 `levelUp`。为此,我们需要 `levelUp` 作用于 `main` 中 `user`,而不是其副本。我们可以通过向函数传递 `user`的地址来实现这一点:
```zig
const std = @import("std");
pub fn main() void {
var user = User{
.id = 1,
.power = 100,
};
// no longer needed
// user.power += 1;
// user -> &user
levelUp(&user);
std.debug.print("User {d} has power of {d}\n", .{user.id, user.power});
}
// User -> *User
fn levelUp(user: *User) void {
user.power += 1;
}
pub const User = struct {
id: u64,
power: i32,
};
```
我们必须做两处改动。首先是用 `user` 的地址(即 `&user` )来调用 `levelUp`,而不是 `user`。这意味着我们的函数参数不再是 `User`,取而代之的是一个 `*User`,这是我们的第二处改动。
我们不再需要通过 `user.power += 0;` 来强制修改 user 的那个丑陋的技巧了。最初,我们因为 user 是 var 类型而无法让代码编译,编译器告诉我们它从未被修改。我们以为编译器错了,于是通过强制修改来“糊弄”它。但正如我们现在所知道的,在 levelUp 中被修改的 user 是不同的;编译器是正确的。
现在,代码已按预期运行。虽然在函数参数和内存模型方面仍有许多微妙之处,但我们正在取得进展。现在也许是一个好时机来说明一下,除了特定的语法之外,这些都不是 Zig 所独有的。我们在这里探索的模型是最常见的,有些语言可能只是向开发者隐藏了很多细节,因此也就隐藏了灵活性。
## 方法
一般来说,我们会把 `levelUp` 写成 `User`结构的一个方法:
```zig
pub const User = struct {
id: u64,
power: i32,
fn levelUp(user: *User) void {
user.power += 1;
}
};
```
这就引出了一个问题:我们如何调用带有指针参数的方法?也许我们必须这样做:`&user.levelUp()`?实际上,只需正常调用即可,即 user.levelUp()。Zig 知道该方法需要一个指针,因此会正确地传递值(通过引用传递)。
我最初选择函数是因为它很明确,因此更容易学习。
## 常量函数参数
我不止一次暗示过,在默认情况下,Zig 会传递一个值的副本(称为 "按值传递")。很快我们就会发现,实际情况要更微妙一些(提示:嵌套对象的复杂值怎么办?)
即使坚持使用简单类型,事实也是 Zig 可以随心所欲地传递参数,只要它能保证代码的意图不受影响。在我们最初的 `levelUp` 中,参数是一个`User`,Zig 可以传递用户的副本或对 `main.user` 的引用,只要它能保证函数不会对其进行更改即可。(我知道我们最终确实希望它被改变,但通过采用 `User` 类型,我们告诉编译器我们不希望它被改变)。
这种自由度允许 Zig 根据参数类型使用最优策略。像 User 这样的小类型可以通过值传递(即复制),成本较低。较大的类型通过引用传递可能更便宜。只要代码的意图得以保留,Zig 可以使用任何方法。在某种程度上,使用常量函数参数可以做到这一点。
现在你知道函数参数是常量的原因之一了吧。
> 也许你会想,即使与复制一个非常小的结构相比,通过引用传递怎么会更慢呢?我们接下来会更清楚地看到这一点,但要点是,当 `user` 是指针时,执行 `user.power` 会增加一点点开销。编译器必须权衡复制的代价和通过指针间接访问字段的代价。
## 指向指针的指针
我们之前查看了`main`函数中 `user` 的内存结构。现在我们改变了 `levelUp`,那么它的内存会是什么样的呢?
```text
main:
user -> ------------ (id: 1043368d0) <---
| 1 | |
------------ (power: 1043368d8) |
| 100 | |
------------ |
|
............. empty space |
............. or other data |
|
levelUp: |
user -> ------------- (*User) |
| 1043368d0 |----------------------
-------------
```
在 `levelUp` 中,`user` 是指向 `User` 的指针。它的值是一个地址。当然不是任何地址,而是 `main.user` 的地址。值得明确的是,`levelUp` 中的 `user` 变量代表一个具体的值。这个值恰好是一个地址。而且,它不仅仅是一个地址,还是一个类型,即 `*User`。这一切都非常一致,不管我们讨论的是不是指针:变量将类型信息与地址联系在一起。指针的唯一特殊之处在于,当我们使用点语法时,例如 `user.power`,Zig 知道 `user` 是一个指针,就会自动跟随地址。
> 通过指针访问字段时,有些语言可能会使用不同的运算符。
重要的是要理解,`levelUp`函数中的`user`变量本身存在于内存中的某个地址。就像之前所做的一样,我们可以亲自验证这一点:
```zig
fn levelUp(user: *User) void {
std.debug.print("{*}\n{*}\n", .{&user, user});
user.power += 1;
}
```
上面打印了`user`变量引用的地址及其值,这个值就是`main`函数中的`user`的地址。
如果`user`的类型是`*User`,那么`&user`呢?它的类型是`**User`, 或者说是一个指向`User`指针的指针。我可以一直这样做,直到内存溢出!
我们可以使用多级间接指针,但这并不是我们现在所需要的。本节的目的是说明指针并不特殊,它只是一个值,即一个地址和一种类型。
## 嵌套指针
到目前为止,`User` 一直很简单,只包含两个整数。很容易就能想象出它的内存,而且当我们谈论『复制』 时,也不会有任何歧义。但是,如果 User 变得更加复杂并包含一个指针,会发生什么情况呢?
```zig
pub const User = struct {
id: u64,
power: i32,
name: []const u8,
};
```
我们已经添加了`name`,它是一个切片。回想一下,切片由长度和指针组成。如果我们使用名字`Goku`初始化`user`,它在内存中会是什么样子?
```text
user -> ------------- (id: 1043368d0)
| 1 |
------------- (power: 1043368d8)
| 100 |
------------- (name.len: 1043368dc)
| 4 |
------------- (name.ptr: 1043368e4)
------| 1182145c0 |
| -------------
|
| ............. empty space
| ............. or other data
|
---> ------------- (1182145c0)
| 'G' |
-------------
| 'o' |
-------------
| 'k' |
-------------
| 'u' |
-------------
```
新的`name`字段是一个切片,由`len`和`ptr`字段组成。它们与所有其他字段一起按顺序排放。在 64 位平台上,`len`和`ptr`都将是 64 位,即 8 字节。有趣的是`name.ptr`的值:它是指向内存中其他位置的地址。
> 由于我们使用了字符串字面形式,`user.name.ptr` 将指向二进制文件中存储所有常量的区域内的一个特定位置。
通过多层嵌套,类型可以变得比这复杂得多。但无论简单还是复杂,它们的行为都是一样的。具体来说,如果我们回到原来的代码,`levelUp` 接收一个普通的 `User`,Zig 提供一个副本,那么现在有了嵌套指针后,情况会怎样呢?
答案是只会进行浅拷贝。或者像有些人说的那样,只拷贝了变量可立即寻址的内存。这样看来,`levelUp` 可能只会得到一个 `user` 残缺副本,`name` 字段可能是无效的。但请记住,像 `user.name.ptr` 这样的指针是一个值,而这个值是一个地址。它的副本仍然是相同的地址:
```text
main: user -> ------------- (id: 1043368d0)
| 1 |
------------- (power: 1043368d8)
| 100 |
------------- (name.len: 1043368dc)
| 4 |
------------- (name.ptr: 1043368e4)
| 1182145c0 |-------------------------
levelUp: user -> ------------- (id: 1043368ec) |
| 1 | |
------------- (power: 1043368f4) |
| 100 | |
------------- (name.len: 1043368f8) |
| 4 | |
------------- (name.ptr: 104336900) |
| 1182145c0 |-------------------------
------------- |
|
............. empty space |
............. or other data |
|
------------- (1182145c0) <---
| 'G' |
-------------
| 'o' |
-------------
| 'k' |
-------------
| 'u' |
-------------
```
从上面可以看出,浅拷贝是可行的。由于指针的值是一个地址,复制该值意味着我们得到的是相同的地址。这对可变性有重要影响。我们的函数不能更改 `main.user` 中的字段,因为它得到了一个副本,但它可以访问同一个`name`,那么它能更改 `name` 吗?在这种特殊情况下,不行,因为 `name` 是常量。另外,`Goku`是一个字符串字面量,它总是不可变的。不过,只要花点功夫,我们就能明白浅拷贝的含义:
```zig
const std = @import("std");
pub fn main() void {
var name = [4]u8{'G', 'o', 'k', 'u'};
const user = User{
.id = 1,
.power = 100,
// slice it, [4]u8 -> []u8
.name = name[0..],
};
levelUp(user);
std.debug.print("{s}\n", .{user.name});
}
fn levelUp(user: User) void {
user.name[2] = '!';
}
pub const User = struct {
id: u64,
power: i32,
// []const u8 -> []u8
name: []u8
};
```
上面的代码会打印出`Go!u`。我们不得不将`name`的类型从`[]const u8`更改为`[]u8`,并且不再使用字符串字面量(它们总是不可变的),而是创建一个数组并对其进行切片。有些人可能会认为这前后不一致。通过值传递可以防止函数改变直接字段,但不能改变指针后面有值的字段。如果我们确实希望 `name` 不可变,就应该将其声明为 `[]const u8` 而不是 `[]u8`。
不同编程语言有不同的实现方式,但许多语言的工作方式与此完全相同(或非常接近)。虽然所有这些看似深奥,但却是日常编程的基础。好消息是,你可以通过简单的示例和片段来掌握这一点;它不会随着系统其他部分复杂性的增加而变得更加复杂。
## 递归结构
有时你需要一个递归结构。在保留现有代码的基础上,我们为 `User` 添加一个可选的 `manager` 字段,类型为 `?User`。同时,我们将创建两个`User`,并将其中一个指定为另一个的管理者:
```zig
const std = @import("std");
pub fn main() void {
const leto = User{
.id = 1,
.power = 9001,
.manager = null,
};
const duncan = User{
.id = 1,
.power = 9001,
.manager = leto,
};
std.debug.print("{any}\n{any}", .{leto, duncan});
}
pub const User = struct {
id: u64,
power: i32,
manager: ?User,
};
```
这段代码无法编译:`struct 'learning.User' depends on itself`。这个问题的根本原因是每种类型都必须在编译时确定大小,而这里的递归结构体大小是无法确定的。
我们在添加 `name` 时没有遇到这个问题,尽管 `name`可以有不同的长度。问题不在于值的大小,而在于类型本身的大小。name 是一个切片,即 `[]const u8`,它有一个已知的大小:16 字节,其中 `len` 8 字节,`ptr` 8 字节。
你可能会认为这对任何 `Optional`或 `union` 来说都是个问题。但对于它们来说,最大字段的大小是已知的,这样 Zig 就可以使用它。递归结构没有这样的上限,该结构可以递归一次、两次或数百万次。这个次数会因`User`而异,在编译时是不知道的。
我们通过 `name` 看到了答案:使用指针。指针总是占用 `usize` 字节。在 64 位平台上,指针占用 8 个字节。就像`Goku`并没有与 `user`一起存储一样,使用指针意味着我们的`manager`不再与`user`的内存布局绑定。
```zig
const std = @import("std");
pub fn main() void {
const leto = User{
.id = 1,
.power = 9001,
.manager = null,
};
const duncan = User{
.id = 1,
.power = 9001,
// changed from leto -> &leto
.manager = &leto,
};
std.debug.print("{any}\n{any}", .{leto, duncan});
}
pub const User = struct {
id: u64,
power: i32,
// changed from ?const User -> ?*const User
manager: ?*const User,
};
```
你可能永远不需要递归结构,但这里并不是介绍数据建模的教程,因此不过多进行介绍。这里主要是想讨论指针和内存模型,以及更好地理解编译器的意图。
---
很多开发人员都在为指针而苦恼,因为指针总是难以捉摸。它们给人的感觉不像整数、字符串或`User`那样具体。虽然你现在不必完全理解这些概念,但掌握它们是值得的,而且不仅仅是为了 Zig。这些细节可能隐藏在 Ruby、Python 和 JavaScript 等语言中,其次是 C#、Java 和 Go。它影响着你如何编写代码以及代码如何运行。因此,请慢慢来,多看示例,添加调试打印语句来查看变量及其地址。你探索得越多,就会越清楚。
|
0 | repos | repos/learning-zig/00-preface.md | # 前言
欢迎阅读 Zig 编程语言入门指南《学习 Zig》。本指南旨在让你轻松掌握 Zig。本指南假定你已有编程经验,语言不限。
Zig 目前正在紧锣密鼓地开发中,Zig 语言及其标准库都在不断发展。本指南以最新的 Zig 开发版本为目标。不过,部分代码有可能编译不通过。如果你下载了最新版本的 Zig,但在运行某些代码时遇到问题,请提 [issue](https://github.com/karlseguin/blog/issues)。
|
0 | repos | repos/learning-zig/02-language-overview-part1.md | > 原文地址:<https://www.openmymind.net/learning_zig/language_overview_1>
# 语言概述 - 第 1 部分
Zig 是一种强类型编译语言。它支持泛型,具有强大的编译时元编程功能,并且**不包含**垃圾收集器。许多人认为 Zig 是 C 的现代替代品。因此,该语言的语法与 C 类似,比较明显的就是以分号结尾的语句和以花括号分隔的块。
Zig 代码如下所示:
```zig
const std = @import("std");
// 如果 `main` 不是 `pub` (public),此代码将无法编译
pub fn main() void {
const user = User{
.power = 9001,
.name = "Goku",
};
std.debug.print("{s}'s power is {d}\n", .{user.name, user.power});
}
pub const User = struct {
power: u64,
name: []const u8,
};
```
如果将上述内容保存到 `learning.zig` 文件,并运行 `zig run learning.zig`,会得到以下输出:`Goku's power is 9001`。
这是一个简单的示例,即使你是第一次看到 Zig,大概率能够看懂这段代码。尽管如此,下面的内容我们还是来逐行分析它。
> 请参阅[安装 Zig 部分](01-installing-zig.md),以便快速启动并运行它。
## 模块引用
很少有程序是在没有标准库或外部库的情况下以单个文件编写的。我们的第一个程序也不例外,它使用 Zig 的标准库来进行打印输出。 Zig 的模块系统非常简单,只依赖于 `@import` 函数和 `pub` 关键字(使代码可以在当前文件外部访问)。
> 以 `@` 开头的函数是内置函数。它们是由编译器提供的,而不是标准库提供的。
我们通过指定模块名称来引用它。 Zig 的标准库以 `std` 作为模块名。要引用特定文件,需要使用相对路径。例如,将 `User` 结构移动到它自己的文件中,比如 `models/user.zig`:
```zig
// models/user.zig
pub const User = struct {
power: u64,
name: []const u8,
};
```
在这种情况下,可以用如下方式引用它:
```zig
// main.zig
const User = @import("models/user.zig").User;
```
> 如果我们的 `User` 结构未标记为 `pub` 我们会收到以下错误:`'User' is not marked 'pub'`。
`models/user.zig` 可以导出不止一项内容。例如,再导出一个常量:
```zig
// models/user.zig
pub const MAX_POWER = 100_000;
pub const User = struct {
power: u64,
name: []const u8,
};
```
这时,可以这样导入两者:
```zig
const user = @import("models/user.zig");
const User = user.User;
const MAX_POWER = user.MAX_POWER;
```
此时,你可能会有更多的困惑。在上面的代码片段中,`user` 是什么?我们还没有看到它,如果使用 `var` 来代替 `const` 会有什么不同呢?或者你可能想知道如何使用第三方库。这些都是好问题,但要回答这些问题,需要掌握更多 Zig 的知识点。因此,我们现在只需要掌握以下内容:
- 如何导入 Zig 标准库
- 如何导入其他文件
- 如何导出变量、函数定义
## 代码注释
下面这行 Zig 代码是一个注释:
```zig
// 如果 `main` 不是 `pub` (public),此代码将无法编译
```
Zig 没有像 C 语言中类似 `/* ... */` 的多行注释。
基于注释的文档自动生成功能正在试验中。如果你看过 Zig 的标准库文档,你就会看到它的实际应用。`//!` 被称为顶级文档注释,可以放在文件的顶部。三斜线注释 (`///`) 被称为文档注释,可以放在特定位置,如声明之前。如果在错误的地方使用这两种文档注释,编译器都会出错。
## 函数
下面这行 Zig 代码是程序的入口函数 `main`:
```zig
pub fn main() void
```
每个可执行文件都需要一个名为 `main` 的函数:它是程序的入口点。如果我们将 `main` 重命名为其他名字,例如 `doIt` ,并尝试运行 `zig run learning.zig` ,我们会得到下面的错误:`'learning' has no member named 'main'`。
忽略 `main` 作为程序入口的特殊作用,它只是一个非常基本的函数:不带参数,不返回任何东西(void)。下面的函数会稍微有趣一些:
```zig
const std = @import("std");
pub fn main() void {
const sum = add(8999, 2);
std.debug.print("8999 + 2 = {d}\n", .{sum});
}
fn add(a: i64, b: i64) i64 {
return a + b;
}
```
C 和 C++ 程序员会注意到 Zig 不需要提前声明,即在定义之前就可以调用 `add` 函数。
接下来要注意的是 `i64` 类型:64 位有符号整数。其他一些数字类型有: `u8` 、 `i8` 、 `u16` 、 `i16` 、 `u32` 、 `i32` 、 `u47` 、 `i47` 、 `u64` 、 `i64` 、 `f32` 和 `f64`。
包含 `u47` 和 `i47` 并不是为了测试你是否还清醒; Zig 支持任意位宽度的整数。虽然你可能不会经常使用这些,但它们可以派上用场。经常使用的一种类型是 `usize`,它是一个无符号指针大小的整数,通常是表示某事物长度、大小的类型。
> 除了 `f32` 和 `f64` 之外,Zig 还支持 `f16` 、 `f80` 和 `f128` 浮点类型。
虽然没有充分的理由这样做,但如果我们将 `add` 的实现更改为:
```zig
fn add(a: i64, b: i64) i64 {
a += b;
return a;
}
```
`a += b` 这一行会报下面的错误:`不能给常量赋值`。这是一个重要的教训,我们稍后将更详细地回顾:函数参数是常量。
为了提高可读性,Zig 中不支持函数重载(用不同的参数类型或参数个数定义的同名函数)。暂时来说,以上就是我们需要了解的有关函数的全部内容。
## 结构体
下面这行代码创建了一个 `User` 结构体:
```zig
pub const User = struct {
power: u64,
name: []const u8,
};
```
> 由于我们的程序是单个文件,因此 `User` 仅在定义它的文件中使用,因此我们不需要将其设为 `pub` 。但这样一来,我们就看不到如何将声明暴露给其他文件了。
结构字段以逗号终止,并且可以指定默认值:
```zig
pub const User = struct {
power: u64 = 0,
name: []const u8,
};
```
当我们创建一个结构体时,必须对每个字段赋值。例如,在一开始的定义中 `power` 没有默认值,因此下面这行代码将报错:`missing struct field: power`。
```zig
const user = User{.name = "Goku"};
```
但是,使用默认值定义后,上面的代码可以正常编译。
结构体可以有方法,也可以包含声明(包括其他结构),甚至可能包含零个字段,此时的作用更像是命名空间。
```zig
pub const User = struct {
power: u64 = 0,
name: []const u8,
pub const SUPER_POWER = 9000;
pub fn diagnose(user: User) void {
if (user.power >= SUPER_POWER) {
std.debug.print("it's over {d}!!!", .{SUPER_POWER});
}
}
};
```
方法只是普通函数,只是说可以用 `struct.method()` 方式调用。以下两种方法等价:
```zig
// 调用 user 的 diagnose
user.diagnose();
// 上面代码等价于:
User.diagnose(user);
```
大多数时候你将使用`struct.method()`语法,但方法作为普通函数的语法糖在某些场景下可以派上用场。
> `if` 语句是我们看到的第一个控制流。这很简单,对吧?我们将在下一部分中更详细地探讨这一点。
`diagnose` 在定义 `User` 类型中,接受 `User` 作为其第一个参数。因此,我们可以使用`struct.method()` 的语法来调用它。但结构内的函数不必遵循这种模式。一个常见的例子是用于结构体初始化的 `init` 函数:
```zig
pub const User = struct {
power: u64 = 0,
name: []const u8,
pub fn init(name: []const u8, power: u64) User {
return User{
.name = name,
.power = power,
};
}
}
```
`init` 的命名方式仅仅是一种约定,在某些情况下,`open` 或其他名称可能更有意义。如果你和我一样,不是 C++ 程序员,可能对 `.$field = $value,` 这种初始化字段的语法感到奇怪,但你很快就会习惯它。
当我们创建 `"Goku"` 时,我们将 `user` 变量声明为 `const` :
```zig
const user = User{
.power = 9001,
.name = "Goku",
};
```
这意味着我们无法修改 `user` 的值。如果要修改变量,应使用 `var` 声明它。另外,你可能已经注意到 `user` 的类型是根据赋值对象推导出来的。我们也可以这样明确地声明:
```zig
const user: User = User{
.power = 9001,
.name = "Goku",
};
```
在有些情况下我们必须显式声明变量类型,但大多数时候,去掉显式的类型会让代码可读性更好。类型推导也可以这么使用。下面这段代码和上面的两个片段是等价的:
```zig
const user: User = .{
.power = 9001,
.name = "Goku",
};
```
不过这种用法并不常见。比较常见的一种情况是从函数返回结构体时会用到。这里的类型可以从函数的返回类型中推断出来。我们的 `init` 函数可能会这样写:
```zig
pub fn init(name: []const u8, power: u64) User {
// instead of return User{...}
return .{
.name = name,
.power = power,
};
}
```
就像我们迄今为止已经探索过的大多数东西一样,今后在讨论 Zig 语言的其他部分时,我们会再次讨论结构体。不过,在大多数情况下,它们都是简单明了的。
## 数组和切片
我们可以略过代码的最后一行,但鉴于我们的代码片段包含两个字符串 `"Goku"` 和 `{s}'s power is {d}\n`,你可能会对 Zig 中的字符串感到好奇。为了更好地理解字符串,我们先来了解一下数组和切片。
数组的大小是固定的,其长度在编译时已知。长度是类型的一部分,因此 4 个有符号整数的数组 `[4]i32` 与 5 个有符号整数的数组 `[5]i32` 是不同的类型。
数组长度可以从初始化中推断出来。在以下代码中,所有三个变量的类型均为 `[5]i32` :
```zig
const a = [5]i32{1, 2, 3, 4, 5};
// 我们已经在结构体中使用过 .{...} 语法,
// 它也适用于数组
const b: [5]i32 = .{1, 2, 3, 4, 5};
// 使用 _ 让编译器推导长度
const c = [_]i32{1, 2, 3, 4, 5};
```
另一方面,切片是指向数组的指针,外加一个在运行时确定的长度。我们将在后面的部分中讨论指针,但你可以将切片视为数组的视图。
> 如果你熟悉 Go,你可能已经注意到 Zig 中的切片有点不同:没有容量,只有指针和长度。
```zig
const a = [_]i32{1, 2, 3, 4, 5};
const b = a[1..4];
```
在上述代码中, `b` 是一个长度为 3 的切片,并且是一个指向 `a` 的指针。但是因为我们使用编译时已知的值来对数组进行切片(即 `1` 和 `4`)所以长度 `3` 在编译时也是已知。 Zig 编译器能够分析出来这些信息,因此 `b` 不是一个切片,而是一个指向长度为 3 的整数数组的指针。具体来说,它的类型是 `*const [3]i32`。所以这个切片的示例被 Zig 编译器的强大推导能力挫败了。
在实际代码中,切片的使用可能会多于数组。无论好坏,程序的运行时信息往往多于编译时信息。不过,在下面这个例子中,我们必须欺骗 Zig 编译器才能得到我们想要的示例:
```zig
const a = [_]i32{1, 2, 3, 4, 5};
var end: usize = 3;
end += 1;
const b = a[1..end];
```
`b` 现在是一个切片了。具体来说,它的类型是 `[]const i32`。你可以看到,切片的长度并不是类型的一部分,因为长度是运行时属性,而类型总是在编译时就完全已知。在创建切片时,我们可以省略上界,创建一个到要切分的对象(数组或切片)末尾的切片,例如 `const c = b[2..]`。
> 如果我们将 `end` 声明为 `const` 那么它将成为编译时已知值,这将导致 `b` 是一个指向数组的指针,而不是切片。我觉得这有点令人困惑,但它并不是经常出现的东西,而且也不太难掌握。我很想在这一点上跳过它,但无法找到一种诚实的方法来避免这个细节。
学习 Zig 让我了解到,类型具有很强的描述性。它不仅仅是一个整数或布尔值,甚至是一个有符号的 32 位整数数组。类型还包含其他重要信息。我们已经讨论过长度是数组类型的一部分,许多示例也说明了可变性(const-ness)也是数组类型的一部分。例如,在上一个示例中,b 的类型是 `[]const i32`。你可以通过下面的代码来验证这一点:
```zig
const std = @import("std");
pub fn main() void {
const a = [_]i32{1, 2, 3, 4, 5};
var end: usize = 3;
end += 1;
const b = a[1..end];
std.debug.print("{any}", .{@TypeOf(b)});
}
```
如果我们尝试写入 `b` ,例如 `b[2] = 5` ,我们会收到编译时错误:`cannot assign to constant.`。这就是因为 `b` 类型是 `const` 导致。
为了解决这个问题,你可能会想要进行以下更改:
```zig
// 将 const 替换为 var
var b = a[1..end];
```
但你会得到同样的错误,为什么?作为提示,`b` 的类型是什么,或者更通俗地说,`b` 是什么?切片是指向数组(部分)的长度和指针。切片的类型总是从它所切分的对象派生出来的。无论 `b` 是否声明为 `const`,都是一个 `[5]const i32` 的切片,因此 b 必须是 `[]const i32` 类型。如果我们想写入 `b`,就需要将 `a` 从 `const` 变为 `var`。
```zig
const std = @import("std");
pub fn main() void {
var a = [_]i32{1, 2, 3, 4, 5};
var end: usize = 3;
end += 1;
const b = a[1..end];
b[2] = 99;
}
```
这是有效的,因为我们的切片不再是 `[]const i32` 而是 `[]i32` 。你可能想知道为什么当 `b` 仍然是 `const` 时,这段代码可以执行。这时因为 `b` 的可变性是指 `b` 本身,而不是 `b` 指向的数据。好吧,我不确定这是一个很好的解释,但对我来说,这段代码突出了差异:
```zig
const std = @import("std");
pub fn main() void {
var a = [_]i32{1, 2, 3, 4, 5};
var end: usize = 3;
end += 1;
const b = a[1..end];
b = b[1..];
}
```
上述代码不会编译;正如编译器告诉我们的,我们不能给常量赋值。但如果将代码改成 `var b = a[1..end]` ,那么代码就是正确的了,因为 `b` 本身不再是常量。
在了解 Zig 语言的其他方面(尤其是字符串)的同时,我们还将发现更多有关数组和切片的知识。
## 字符串
我希望我能说,Zig 里有字符串类型,而且非常棒。遗憾的是,它没有。最简单来说,字符串是字节(u8)的序列(即数组或切片)。实际上,我们可以从 `name` 字段的定义中看到这一点:`name: []const u8`.
按照惯例,这类字符串大多数都是用 UTF-8 编码,因为 Zig 源代码本身就是 UTF-8 编码的。但这并不是强制的,而且代表 ASCII 或 UTF-8 字符串的 `[]const u8` 与代表任意二进制数据的 `[]const u8` 实际上并没有什么区别。怎么可能有区别呢,它们是相同的类型。
根据我们所学的数组和切片知识,你可以正确地猜测 `[]const u8` 是对常量字节数组的切片(其中字节是一个无符号 8 位整数)。但我们的代码中没有任何地方对数组进行切分,甚至没有数组,对吧?我们所做的只是将 `"Goku"` 赋值给 `user.name`。这是怎么做到的呢?
你在源代码中看到的字符串字面量有一个编译时已知的长度。编译器知道 `"Goku"` 的长度是 4,所以你会认为 `"Goku"` 最好用数组来表示,比如 `[4]const u8`。但是字符串字面形式有几个特殊的属性。它们被存储在二进制文件的一个特殊位置,并且会去重。因此,指向字符串字面量的变量将是指向这个特殊位置的指针。也就是说,`"Goku"` 的类型更接近于 `*const [4]u8`,是一个指向 4 常量字节数组的指针。
还有更多。字符串字面量以空值结束。也就是说,它们的末尾总是有一个 `\0`。在内存中,`"Goku"` 实际上是这样的:`{'G', 'o', 'k', 'u', 0}`,所以你可能会认为它的类型是 `*const [5]u8`。但这样做充其量只是模棱两可,更糟糕的是会带来危险(你可能会覆盖空结束符)。相反,Zig 有一种独特的语法来表示以空结尾的数组。`"Goku"`的类型是 `*const[4:0]u8`,即 4 字节以空结尾的数组指针。当我们讨论字符串时,我们关注的是以空结尾的字节数组(因为在 C 语言中字符串通常就是这样表示的),语法更通用:`[LENGTH:SENTINEL]`,其中 `SENTINEL` 是数组末尾的特殊值。因此,虽然我想不出为什么需要它,但下面的语法是完全正确的:
```zig
const std = @import("std");
pub fn main() void {
// an array of 3 booleans with false as the sentinel value
const a = [3:false]bool{false, true, false};
// This line is more advanced, and is not going to get explained!
std.debug.print("{any}\n", .{std.mem.asBytes(&a).*});
}
```
上面代码会输出:`{ 0, 1, 0, 0}` 。
> 我一直在犹豫是否要加入这个示例,因为最后一行非常高级,我不打算解释它。从另一个角度看,如果你愿意的话,这也是一个可以运行的示例,你可以用它来更好地研究我们到目前为止讨论过的一些问题。
如果我的解释还可以接受,那么你可能还有一点不清楚。如果 `"Goku"` 是一个 `*const [4:0]u8` ,那么我们为什么能将它赋值给一个 `[]const u8` 值呢?答案很简单:Zig 会自动进行类型转化。它会在几种不同的类型之间进行类型转化,但最明显的是字符串。这意味着,如果函数有一个 `[]const u8` 参数,或者结构体有一个 `[]const u8` 字段,就可以使用字符串字面形式。由于以空结尾的字符串是数组,而且数组的长度是已知的,因此这种转化代价比较低,即不需要遍历字符串来查找空结束符。
因此,在谈论字符串时,我们通常指的是 `[]const u8`。必要时,我们会明确说明一个以空结尾的字符串,它可以被自动转化为一个 `[]const u8`。但请记住,`[]const u8` 也用于表示任意二进制数据,因此,Zig 并不像高级编程语言那样有字符串的概念。此外,Zig 的标准库只有一个非常基本的 unicode 模块。
当然,在实际程序中,大多数字符串(以及更通用的数组)在编译时都是未知的。最典型的例子就是用户输入,程序编译时并不知道用户输入。这一点我们将在讨论内存时再次讨论。但简而言之,对于这种在编译时不能确定值的数据(长度当然也就无从得知),我们将在运行时动态分配内存。我们的字符串变量(仍然是 `[]const u8` 类型)将是指向动态分配的内存的切片。
## comptime 和 anytype
在我们未解释的最后一行代码中,涉及的知识远比表面看到的多:
```zig
std.debug.print("{s}'s power is {d}\n", .{user.name, user.power});
```
我们只是略微浏览了一下,但它确实提供了一个机会来强调 Zig 的一些更强大的功能。即使你还没有掌握,至少也应该了解这些功能。
首先是 Zig 的编译时执行(compile-time execution)概念。编译时执行是 Zig 元编程功能的核心,顾名思义,就是在编译时而不是运行时运行代码。在本指南中,我们将对编译时可能实现的功能进行浅显介绍,更多高级功能读者可以参考其他资料。
你可能想知道上面这行代码中需要编译时执行的是什么。`print` 函数的定义要求我们的第一个参数(字符串格式)是编译时已知的:
```zig
// 注意变量"fmt"前的"comptime"
pub fn print(comptime fmt: []const u8, args: anytype) void {
```
原因是 `print` 会进行额外的编译时检查,而这在大多数其他语言中是不会出现的。什么样的检查呢?假设你把格式改为 `it's over {d}/n`,但保留了两个参数。你会得到一个编译时错误:`unused argument in 'it's over {d}'`。它还会进行类型检查:将格式字符串改为`{s}'s power is {s}\n`,你会这个错误`invalid format string 's' for type 'u64'`。如果在编译时不知道字符串的格式,就不可能在编译时进行这些检查。因此,需要一个编译时已知的值。
`comptime` 会对编码产生直接影响的地方是整数和浮点字面的默认类型,即特殊的 `comptime_int` 和 `comptime_float`。这行代码是无效的:`var i = 0`。`comptime`代码只能使用编译时已知的数据,对于整数和浮点数,这类数据由特殊的 `comptime_int` 和 `comptime_float` 类型标识。这种类型的值可以在编译时执行。但你可能不会把大部分时间花在编写用于编译时执行的代码上,因此它并不是一个特别有用的默认值。你需要做的是给变量一个显式类型:
```zig
var i: usize = 0;
var j: f64 = 0;
```
> 注意,如果我们使用`const`,就不会出现这个错误,因为错误的关键在于 `comptime_int` 必须是常量。
在以后的章节中,我们将在探索泛型时进一步研究 `comptime`。
我们这行代码的另一个特别之处在于奇怪的 `.{user.name, user.power}`,根据上述 `print` 的定义,我们知道它映射到 `anytype` 类型的变量。这种类型不应与 Java 的 Object 或 Go 的 any(又名 interface{})混淆。相反,在编译时,Zig 会为传递给它的所有类型专门创建一个单独的 `print` 函数。
这就引出了一个问题:我们传递给它的是什么?我们以前在让编译器推断结构类型时见过 `.{...}` 符号。这与此类似:它创建了一个匿名结构字面。请看这段代码
```zig
pub fn main() void {
std.debug.print("{any}\n", .{@TypeOf(.{.year = 2023, .month = 8})});
}
```
会输出:
```
struct{comptime year: comptime_int = 2023, comptime month: comptime_int = 8}
```
在这里,我们给匿名结构的字段取名为 `year` 和 `month`。在原始代码中,我们没有这样做。在这种情况下,字段名会自动生成 0、1、2 等。虽然它们都是匿名结构字面形式的示例,但没有字段名称的结构通常被称为“元组”(tuple)。`print` 函数希望接收一个元组,并使用字符串格式中的序号位置来获取适当的参数。
Zig 没有函数重载,也没有可变函数(vardiadic,具有任意数量参数的函数)。但它的编译器能根据传入的类型创建专门的函数,包括编译器自己推导和创建的类型。
|
0 | repos | repos/learning-zig/03-language-overview-part2.md | > 原文地址:<https://www.openmymind.net/learning_zig/language_overview_2>
# 语言概述 - 第二部分
本部分继续上一部分的内容:熟悉 Zig 语言。我们将探索 Zig 的控制流和结构以外的类型。通过这两部分的学习,我们将掌握 Zig 语言的大部分语法,这让我们可以继续深入 Zig 语言,同时也为如何使用 std 标准库打下了基础。
## 控制流
Zig 的控制流很可能是我们所熟悉的,但它与 Zig 语言的其他特性协同工作是我们还没有探索过。我们先简单概述控制流的基本使用,之后在讨论依赖控制流的相关特性时,再来重新回顾。
你会注意到,我们使用 `and` 和 `or` 来代替逻辑运算符 `&&` 和 `||`。与大多数语言一样,`and` 和 `or` 会短路执行,即如果左侧为假,`and` 的右侧运算符就不会执行;如果左侧为真,`or` 的右侧就不会执行。在 Zig 中,控制流是通过关键字完成的,因此要使用 `and` 和 `or`。
此外,比较运算符 `==` 在切片(如 `[]const u8`,即字符串)间不起作用。在大多数情况下,需要使用 `std.mem.eql(u8,str1,str2)`,它将比较两个片段的长度和字节数。
Zig 中,`if`、`else if` 和 `else` 也很常见:
```zig
// std.mem.eql 将逐字节进行比较,对于字符串来说它是大小写敏感的。
if (std.mem.eql(u8, method, "GET") or std.mem.eql(u8, method, "HEAD")) {
// 处理 GET 请求
} else if (std.mem.eql(u8, method, "POST")) {
// 处理 POST 请求
} else {
// ...
}
```
> `std.mem.eql` 的第一个参数是一个类型,这里是 `u8`。这是我们看到的第一个泛型函数。我们将在后面的部分进一步探讨。
上述示例比较的是 ASCII 字符串,不区分大小写可能更合适,这时 `std.ascii.eqlIgnoreCase(str1, str2)` 可能是更好的选择。
虽然没有三元运算符,但可以使用 if/else 来代替:
```zig
const super = if (power > 9000) true else false;
```
`switch` 语句类似于`if/else if/else`,但具有穷举的优点。也就是说,如果没有涵盖所有情况,编译时就会出错。下面这段代码将无法编译:
```zig
fn anniversaryName(years_married: u16) []const u8 {
switch (years_married) {
1 => return "paper",
2 => return "cotton",
3 => return "leather",
4 => return "flower",
5 => return "wood",
6 => return "sugar",
}
}
```
编译时会报错:`switch` 必须处理所有的可能性。由于我们的 `years_married` 是一个 16 位整数,这是否意味着我们需要处理所有 64K 中情况?是的,不过我们可以使用 `else` 来代替:
```zig
// ...
6 => return "sugar",
else => return "no more gifts for you",
```
在进行匹配时,我们可以合并多个 `case` 或使用范围;在进行处理时,可以使用代码块来处理复杂的情况:
```zig
fn arrivalTimeDesc(minutes: u16, is_late: bool) []const u8 {
switch (minutes) {
0 => return "arrived",
1, 2 => return "soon",
3...5 => return "no more than 5 minutes",
else => {
if (!is_late) {
return "sorry, it'll be a while";
}
// todo, something is very wrong
return "never";
},
}
}
```
虽然 `switch` 在很多情况下都很有用,但在处理枚举时,它穷举的性质才真正发挥了作用,我们很快就会谈到枚举。
Zig 的 `for` 循环用于遍历数组、切片和范围。例如,我们可以这样写:
```zig
fn contains(haystack: []const u32, needle: u32) bool {
for (haystack) |value| {
if (needle == value) {
return true;
}
}
return false;
}
```
`for` 循环也可以同时处理多个序列,只要这些序列的长度相同。上面我们使用了 `std.mem.eql` 函数,下面是其大致实现:
```zig
pub fn eql(comptime T: type, a: []const T, b: []const T) bool {
// if they aren't the same length, they can't be equal
if (a.len != b.len) return false;
for (a, b) |a_elem, b_elem| {
if (a_elem != b_elem) return false;
}
return true;
}
```
一开始的 `if` 检查不仅是一个很好的性能优化,还是一个必要的防护措施。如果我们去掉它,并传递不同长度的参数,就会出现运行时 `panic`。`for` 在作用于多个序列上时,要求其长度相等。
`for` 循环也可以遍历范围,例如:
```zig
for (0..10) |i| {
std.debug.print("{d}\n", .{i});
}
```
> 在 `switch` 中,范围使用了三个点,即 `3...6`,而这个示例中,范围使用了两个点,即 `0..10`。这是因为在 switch 中,范围的两端都是闭区间,而 for 则是左闭右开。
与一个(或多个)序列组合使用时,它的作用就真正体现出来了:
```zig
fn indexOf(haystack: []const u32, needle: u32) ?usize {
for (haystack, 0..) |value, i| {
if (needle == value) {
return i;
}
}
return null;
}
```
> 这是对可空类型的初步了解。
范围的末端由 `haystack` 的长度推断,不过我们也可以写出 `0..haystack.len`,但这没有必要。`for` 循环不支持常见的 `init; compare; step` 风格,对于这种情况,可以使用 `while`。
因为 `while` 比较简单,形式如下:`while (condition) { }`,这有利于更好地控制迭代。例如,在计算字符串中转义序列的数量时,我们需要将迭代器递增 2 以避免重复计算 `\\`:
```zig
var escape_count: usize = 0;
{
var i: usize = 0;
// 反斜杠用作转义字符,因此我们需要用一个反斜杠来转义它。
while (i < src.len) {
if (src[i] == '\\') {
i += 2;
escape_count += 1;
} else {
i += 1;
}
}
}
```
我们在临时变量 `i` 和 `while` 循环周围添加了一个显式的代码块。这缩小了 `i` 的作用范围。这样的代码块可能会很有用,尽管在这个例子中可能有些过度。不过,上述例子已经是 Zig 中最接近传统的 `for(init; compare; step)` 循环的写法了。
`while` 可以包含 `else` 子句,当条件为假时执行 `else` 子句。它还可以接受在每次迭代后要执行的语句。多个语句可以用 ; 分隔。在 `for` 支持遍历多个序列之前,这一功能很常用。上述语句可写成
```zig
var i: usize = 0;
var escape_count: usize = 0;
// 改写后的
while (i < src.len) : (i += 1) {
if (src[i] == '\\') {
// +1 here, and +1 above == +2
// 这里 +1,上面也 +1,相当于 +2
i += 1;
escape_count += 1;
}
}
```
Zig 也支持 `break` 和 `continue` 关键字,用于跳出最内层循环或跳转到下一次迭代。
代码块可以附带标签(label),`break` 和 `continue` 可以作用在特定标签上。举例说明:
```zig
outer: for (1..10) |i| {
for (i..10) |j| {
if (i * j > (i+i + j+j)) continue :outer;
std.debug.print("{d} + {d} >= {d} * {d}\n", .{i+i, j+j, i, j});
}
}
```
`break` 还有另一个有趣的行为,即从代码块中返回值:
```zig
const personality_analysis = blk: {
if (tea_vote > coffee_vote) break :blk "sane";
if (tea_vote == coffee_vote) break :blk "whatever";
if (tea_vote < coffee_vote) break :blk "dangerous";
};
```
像这样有返回值的的块,必须以分号结束。
稍后,当我们讨论带标签的联合(tagged union)、错误联合(error unions)和可选类型(Optional)时,我们将看到控制流如何与它们联合使用。
## 枚举
枚举是带有标签的整数常量。它们的定义很像结构体:
```zig
// 可以是 "pub" 的
const Status = enum {
ok,
bad,
unknown,
};
```
与结构体一样,枚举可以包含其他定义,包括函数,这些函数可以选择性地将枚举作为第一个参数:
```zig
const Stage = enum {
validate,
awaiting_confirmation,
confirmed,
err,
fn isComplete(self: Stage) bool {
return self == .confirmed or self == .err;
}
};
```
> 如果需要枚举的字符串表示,可以使用内置的 `@tagName(enum)` 函数。
回想一下,结构类型可以使用 `.{...}` 符号根据其赋值或返回类型来推断。在上面,我们看到枚举类型是根据与 `self` 的比较推导出来的,而 `self` 的类型是 `Stage`。我们本可以明确地写成:`return self == Stage.confirmed` 或 `self == Stage.err`。但是,在处理枚举时,你经常会看到通过 `.$value` 这种省略具体类型的情况。这被称为*枚举字面量*。
`switch` 的穷举性质使它能与枚举很好地搭配,因为它能确保你处理了所有可能的情况。不过在使用 `switch` 的 `else` 子句时要小心,因为它会匹配任何新添加的枚举值,而这可能不是我们想要的行为。
## 带标签的联合 Tagged Union
联合定义了一个值可以具有的一系列类型。例如,这个 `Number` 可以是整数、浮点数或 nan(非数字):
```zig
const std = @import("std");
pub fn main() void {
const n = Number{.int = 32};
std.debug.print("{d}\n", .{n.int});
}
const Number = union {
int: i64,
float: f64,
nan: void,
};
```
一个联合一次只能设置一个字段;试图访问一个未设置的字段是错误的。既然我们已经设置了 `int` 字段,如果我们试图访问 `n.float`,就会出错。我们的一个字段 `nan` 是 `void` 类型。我们该如何设置它的值呢?使用 `{}`:
```zig
const n = Number{.nan = {}};
```
使用联合的一个难题是要知道设置的是哪个字段。这就是带标签的联合发挥作用的地方。带标签的联合将枚举与联合定义在一起,可用于 `switch` 语句中。请看下面这个例子:
```zig
pub fn main() void {
const ts = Timestamp{.unix = 1693278411};
std.debug.print("{d}\n", .{ts.seconds()});
}
const TimestampType = enum {
unix,
datetime,
};
const Timestamp = union(TimestampType) {
unix: i32,
datetime: DateTime,
const DateTime = struct {
year: u16,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8,
};
fn seconds(self: Timestamp) u16 {
switch (self) {
.datetime => |dt| return dt.second,
.unix => |ts| {
const seconds_since_midnight: i32 = @rem(ts, 86400);
return @intCast(@rem(seconds_since_midnight, 60));
},
}
}
};
```
请注意, `switch` 中的每个分支捕获了字段的类型值。也就是说,`dt` 是 `Timestamp.DateTime` 类型,而 `ts` 是 `i32` 类型。这也是我们第一次看到嵌套在其他类型中的结构。`DateTime` 本可以在联合之外定义。我们还看到了两个新的内置函数:`@rem` 用于获取余数,`@intCast` 用于将结果转换为 `u16`(`@intCast` 从返回值类型中推断出我们需要 `u16`)。
从上面的示例中我们可以看出,带标签的联合的使用有点像接口,只要我们提前知道所有可能的实现,我们就能够将其转化带标签的联合这种形式。
最后,带标签的联合中的枚举类型可以自动推导出来。我们可以直接这样做:
```zig
const Timestamp = union(enum) {
unix: i32,
datetime: DateTime,
...
```
这里 Zig 会根据带标签的联合,自动创建一个隐式枚举。
## 可选类型 Optional
在类型前加上问号 `?`,任何值都可以声明为可选类型。可选类型既可以是 `null`,也可以是已定义类型的值:
```zig
var home: ?[]const u8 = null;
var name: ?[]const u8 = "Leto";
```
明确类型的必要性应该很清楚:如果我们只使用 const name = `"Leto"`,那么推导出的类型将是非可选的 `[]const u8`。
`.?`用于访问可选类型后面的值:
```zig
std.debug.print("{s}\n", .{name.?});
```
但如果在 `null` 上使用 `.?`,运行时就会 `panic`。`if` 语句可以安全地取出可选类型背后的值:
```zig
if (home) |h| {
// h is a []const u8
// we have a home value
} else {
// we don't have a home value
}
```
`orelse` 可用于提取可选类型的值或执行代码。这通常用于指定默认值或从函数中返回:
```zig
const h = home orelse "unknown"
// 或直接返回函数
const h = home orelse return;
```
不过,orelse 也可以带一个代码块,用于执行更复杂的逻辑。可选类型还可以与 `while` 整合,经常用于创建迭代器。我们这里忽略迭代器的细节,但希望这段伪代码能说明问题:
```zig
while (rows.next()) |row| {
// do something with our row
}
```
## 未定义的值 Undefined
到目前为止,我们看到的每一个变量都被初始化为一个合理的值。但有时我们在声明变量时并不知道它的值。可选类型是一种选择,但并不总是合理的。在这种情况下,我们可以将变量设置为未定义,让其保持未初始化状态。
通常这样做的一个地方是创建数组,其值将由某个函数来填充:
```zig
var pseudo_uuid: [16]u8 = undefined;
std.crypto.random.bytes(&pseudo_uuid);
```
上述代码仍然创建了一个 16 字节的数组,但它的每个元素都没有被赋值。
## 错误 Errors
Zig 中错误处理功能十分简单、实用。这一切都从错误集(error sets)开始,错误集的使用方式类似于枚举:
```zig
// 与第 1 部分中的结构一样,OpenError 也可以标记为 "pub"。
// 使其可以在其定义的文件之外访问
const OpenError = error {
AccessDenied,
NotFound,
};
```
任意函数(包括 `main`)都可以返回这个错误:
```zig
pub fn main() void {
return OpenError.AccessDenied;
}
const OpenError = error {
AccessDenied,
NotFound,
};
```
如果你尝试运行这个程序,你会得到一个错误:`expected type 'void', found 'error{AccessDenied,NotFound}'`。这是有道理的:我们定义了返回类型为 `void` 的 `main` 函数,但我们却返回了另一种东西(很明显,它是一个错误,而不是 `void`)。要解决这个问题,我们需要更改函数的返回类型。
```zig
pub fn main() OpenError!void {
return OpenError.AccessDenied;
}
```
这就是所谓的错误联合类型,它表示我们的函数既可以返回 `OpenError` 错误,也可以返回 `void`(也就是什么都没有)。到目前为止,我们已经非常明确:我们为函数可能返回的错误创建了一个错误集,并在函数的错误联合类型中使用了该错误集。但是,说到错误,Zig 有一些巧妙的技巧。首先,我们可以让 Zig 通过使用 `!return_type` 来推导错误集,而不是将 `error union` 指定为 `error_set!return_type`。因此,我们可以(也推荐)将我们 `main` 函数定义为:
```zig
pub fn main() !void
```
其次,Zig 能够为我们隐式创建错误集。我们可以这样做,而不需要提前声明:
```zig
pub fn main() !void {
return error.AccessDenied;
}
```
完全显式和隐式方法并不完全等同。例如,引用具有隐式错误集的函数时,需要使用特殊的 `anyerror` 类型。类库开发人员可能会发现显式的好处,比如可以达到代码即文档的效果。不过,我认为隐式错误集和推导错误联合类型都很实用;我在平时编程中,大量使用了这两种方法。
错误联合类型的真正价值在于 Zig 语言提供了 `catch` 和 `try` 来处理它们。返回错误联合类型的函数调用时,可以包含一个 `catch` 子句。例如,一个 http 服务器库的代码可能如下所示:
```zig
action(req, res) catch |err| {
if (err == error.BrokenPipe or err == error.ConnectionResetByPeer) {
return;
} else if (err == error.BodyTooBig) {
res.status = 431;
res.body = "Request body is too big";
} else {
res.status = 500;
res.body = "Internal Server Error";
// todo: log err
}
};
```
`switch` 的版本更符合惯用法:
```zig
action(req, res) catch |err| switch (err) {
error.BrokenPipe, error.ConnectionResetByPeer) => return,
error.BodyTooBig => {
res.status = 431;
res.body = "Request body is too big";
},
else => {
res.status = 500;
res.body = "Internal Server Error";
}
};
```
这看起来花哨,但老实说,你在 `catch` 中最有可能做的事情就是把错误信息给调用者:
```zig
action(req, res) catch |err| return err;
```
这种模式非常常见,因此 Zig 提供了 `try` 关键字用于处理这种情况。上述代码的另一种写法如下:
```zig
try action(req, res);
```
鉴于必须处理错误,这一点尤其有用。多数情况下的做法就是使用 `try` 或 `catch`。
> Go 开发人员会注意到,`try` 比 `if err != nil { return err }` 的按键次数更少。
大多数情况下,你都会使用 `try` 和 `catch`,但 `if` 和 `while` 也支持错误联合类型,这与可选类型很相似。在 `while` 的情况下,如果条件返回错误,则执行 `else` 子句。
有一种特殊的 `anyerror` 类型可以容纳任何错误。虽然我们可以将函数定义为返回 `anyerror!TYPE` 而不是 `!TYPE`,但两者并不等同。`anyerror` 是全局错误集,是程序中所有错误集的超集。因此,在函数签名中使用 `anyerror` 很可能表示这个函数虽然可以返回错误,而实际上它大概率不会返回错误。 `anyerror` 主要用在可以是任意错误类型的函数参数或结构体字段中(想象一下日志库)。
函数同时返回可选类型与错误联合类型的情况并不少见。在推导错误集的情况下,形式如下:
```zig
// 载入上次保存的游戏
pub fn loadLast() !?Save {
// TODO
return null;
}
```
使用此类函数有多种方法,但最简洁的方法是使用 `try` 来解除错误,然后使用 `orelse` 来解除可选类型。下面是一个大致的模式:
```zig
const std = @import("std");
pub fn main() void {
// This is the line you want to focus on
const save = (try Save.loadLast()) orelse Save.blank();
std.debug.print("{any}\n", .{save});
}
pub const Save = struct {
lives: u8,
level: u16,
pub fn loadLast() !?Save {
//todo
return null;
}
pub fn blank() Save {
return .{
.lives = 3,
.level = 1,
};
}
};
```
---
虽然我们还未涉及 Zig 语言中更高级的功能,但我们在前两部分中看到的是 Zig 语言重要组成部分。它们将作为一个基础,让我们能够探索更复杂的话题,而不用被语法所困扰。
|
0 | repos | repos/learning-zig/04-style-guide.md | > 原文地址:<https://www.openmymind.net/learning_zig/style_guide>
# 代码风格和规范
本小节的主要内容是介绍 Zig 编译器强制遵守的 2 条规则,以及 Zig 标准库的命名惯例(naming convention)。
## 未使用变量 Unused Variable
Zig 编译器禁止`未使用变量`,例如以下代码会导致两处编译错误:
```zig
const std = @import("std");
pub fn main() void {
const sum = add(8999, 2);
}
fn add(a: i64, b: i64) i64 {
// notice this is a + a, not a + b
return a + a;
}
```
第一个编译错误,源自于`sum`是一个未使用的本地常量。第二个编译错误,在于在函数`add`的所有形参中,`b`是一个未使用的函数参数。对于这段代码来说,它们是比较明显的漏洞。但是在实际编程中,代码中包含未使用变量和函数形参并非完全不合理。在这种情况下,我们可以通过将未使用变量赋值给`_`(下划线)的方法,避免编译器报错:
```zig
const std = @import("std");
pub fn main() void {
_ = add(8999, 2);
// or
const sum = add(8999, 2);
_ = sum;
}
fn add(a: i64, b: i64) i64 {
_ = b;
return a + a;
}
```
除了使用`_ = b`之外,我们还可以直接用`_`来命名函数`add`的形参。但是,在我看来,这样做会牺牲代码的可读性,读者会猜测,这个未使用的形参到底是什么:
```zig
fn add(a: i64, _: i64) i64 {
```
值得注意的是,在上述例子中,`std`也是一个未使用的符号,但是当前这种用法并不会导致任何编译错误。可能在未来,Zig 编译器也将此视为错误。
## 变量覆盖 Variable Shadowing
Zig 不允许使用同名的变量。下面是一个读取 `socket` 的例子,这个例子包含了一个变量覆盖的编译错误:
```zig
fn read(stream: std.net.Stream) ![]const u8 {
var buf: [512]u8 = undefined;
const read = try stream.read(&buf);
if (read == 0) {
return error.Closed;
}
return buf[0..read];
}
```
上述例子中,`read`变量覆盖了`read`函数。我并不太认同这个规范,因为它会导致开发者为了避免覆盖而使用短且无意义的变量名。例如,为了让上述代码通过编译,需要将变量名`read`改成`n`。
我认为,这个规范并不能使代码可读性提高。在这个场景下,应该是开发者,而不是编译器,更有资格选择更有可读性的命名方案。
## 命名规范
除了遵守以上这些规则以外,开发者可以自由地选择他们喜欢的命名规范。但是,理解 Zig 自身的命名规范是有益的,因为大部分你需要打交道的代码,如 Zig 标准库,或者其他三方库,都采用了 Zig 的命名规范。
Zig 代码采用 4 个空格进行缩进。我个人会因为客观上更方便,使用`tab`键。
Zig 的函数名采用了驼峰命名法(camelCase),而变量名会采用小写加下划线(snake case)的命名方式。类型则采用的是 PascalCase 风格。除了这三条规则外,一个有趣的交叉规则是,如果一个变量表示一个类型,或者一个函数返回一个类型,那么这个变量或者函数遵循 PascalCase。在之前的章节中,其实已经见到了这个例子,不过,可能你没有注意到:
```zig
std.debug.print("{any}\n", .{@TypeOf(.{.year = 2023, .month = 8})});
```
我们已经看到过一些内置函数:`@import`,`@rem`和`@intCast`。因为这些都是函数,他们的命名遵循驼峰命名法。`@TypeOf`也是一个内置函数,但是他遵循 PascalCase,为何?因为他返回的是一个类型,因此它的命名采用了类型命名方法。当我们使用一个变量,去接收`@TypeOf`的返回值,这个变量也需要遵循类型命名规则(即 PascalCase):
```zig
const T = @TypeOf(3);
std.debug.print("{any}\n", .{T});
```
`zig` 命令包含一个 `fmt` 子命令,在给定一个文件或目录时,它会根据 Zig 的编码风格对文件进行格式化。但它并没有包含所有上述的规则,比如它能够调整缩排,以及花括号`{`的位置,但是它不会调整标识符的大小写。
|
0 | repos | repos/learning-zig/08-generics.md | > 原文地址:<https://www.openmymind.net/learning_zig/generics>
# 泛型 Generics
在上一小节中,我们创建了一个名为 `IntList` 的动态数组。该数据结构的目标是保存数目不定的数值。虽然我们使用的算法适用于任何类型的数据,但我们的实现与 i64 值绑定。这就需要使用泛型,其目的是从特定类型中抽象出算法和数据结构。
许多语言使用特殊的语法和特定的泛型规则来实现泛型。而在 Zig 中,泛型并不是一种特定的功能,而更多地体现了语言的能力。具体来说,泛型利用了 Zig 强大的编译时元编程功能。
我们先来看一个简单的例子,以了解我们的想法:
```zig
const std = @import("std");
pub fn main() !void {
var arr: IntArray(3) = undefined;
arr[0] = 1;
arr[1] = 10;
arr[2] = 100;
std.debug.print("{any}\n", .{arr});
}
fn IntArray(comptime length: usize) type {
return [length]i64;
}
```
上述代码会打印了 `{ 1, 10, 100 }`。有趣的是,我们有一个返回类型的函数(因此函数是 PascalCase)。这也不是普通的类型,而是由函数参数动态确定的类型。这段代码之所以能运行,是因为我们将 `length` 声明为 `comptime`。也就是说,我们要求任何调用 `IntArray` 的人传递一个编译时已知的长度参数。这是必要的,因为我们的函数返回一个类型,而类型必须始终是编译时已知的。
函数可以返回任何类型,而不仅仅是基本类型和数组。例如,只需稍作改动,我们就可以让函数返回一个结构体:
```zig
const std = @import("std");
pub fn main() !void {
var arr: IntArray(3) = undefined;
arr.items[0] = 1;
arr.items[1] = 10;
arr.items[2] = 100;
std.debug.print("{any}\n", .{arr.items});
}
fn IntArray(comptime length: usize) type {
return struct {
items: [length]i64,
};
}
```
也许看起来很奇怪,但 `arr` 的类型确实是 `IntArray(3)`。它和其他类型一样,是一个类型,而 `arr` 和其他值一样,是一个值。如果我们调用 `IntArray(7)`,那就是另一种类型了。也许我们可以让事情变得更简洁:
```zig
const std = @import("std");
pub fn main() !void {
var arr = IntArray(3).init();
arr.items[0] = 1;
arr.items[1] = 10;
arr.items[2] = 100;
std.debug.print("{any}\n", .{arr.items});
}
fn IntArray(comptime length: usize) type {
return struct {
items: [length]i64,
fn init() IntArray(length) {
return .{
.items = undefined,
};
}
};
}
```
乍一看,这可能并不整齐。但除了匿名和嵌套在一个函数中之外,我们的结构看起来就像我们目前看到的其他结构一样。它有字段,有函数。你知道人们常说『如果它看起来像一只鸭子,那么就就是一只鸭子』。那么,这个结构看起来、游起来和叫起来都像一个正常的结构,因为它本身就是一个结构体。
希望上面这个示例能让你熟悉返回类型的函数和相应的语法。为了得到一个更典型的范型,我们需要做最后一个改动:我们的函数必须接受一个类型。实际上,这只是一个很小的改动,但 `type` 会比 `usize` 更抽象,所以我们慢慢来。让我们进行一次飞跃,修改之前的 `IntList`,使其能与任何类型一起工作。我们先从基本结构开始:
```zig
fn List(comptime T: type) type {
return struct {
pos: usize,
items: []T,
allocator: Allocator,
fn init(allocator: Allocator) !List(T) {
return .{
.pos = 0,
.allocator = allocator,
.items = try allocator.alloc(T, 4),
};
}
};
}
```
上面的结构与 `IntList` 几乎完全相同,只是 `i64` 被替换成了 `T`。我们本可以叫它 `item_type`。不过,按照 Zig 的命名约定,`type` 类型的变量使用 `PascalCase` 风格。
> 无论好坏,使用单个字母表示类型参数的历史都比 Zig 要悠久得多。在大多数语言中,T 是常用的默认值,但你也会看到根据具体语境而变化的情况,例如哈希映射使用 K 和 V 来表示键和值参数类型。
如果你对上述代码还有疑问,可以着重看使用 T 的两个地方:`items:[]T` 和 `allocator.alloc(T, 4)`。当我们要使用这个通用类型时,我们将使用
```zig
var list = try List(u32).init(allocator);
```
编译代码时,编译器会通过查找每个 `T` 并将其替换为 `u32` 来创建一个新类型。如果我们再次使用 `List(u32)`,编译器将重新使用之前创建的类型。如果我们为 `T` 指定一个新值,例如 `List(bool)` 或 `List(User)`,就会创建与之对应的新类型。
为了完成通用的 List,我们可以复制并粘贴 `IntList` 代码的其余部分,然后用 `T` 替换 `i64`:
```zig
const std = @import("std");
const Allocator = std.mem.Allocator;
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var list = try List(u32).init(allocator);
defer list.deinit();
for (0..10) |i| {
try list.add(@intCast(i));
}
std.debug.print("{any}\n", .{list.items[0..list.pos]});
}
fn List(comptime T: type) type {
return struct {
pos: usize,
items: []T,
allocator: Allocator,
fn init(allocator: Allocator) !List(T) {
return .{
.pos = 0,
.allocator = allocator,
.items = try allocator.alloc(T, 4),
};
}
fn deinit(self: List(T)) void {
self.allocator.free(self.items);
}
fn add(self: *List(T), value: T) !void {
const pos = self.pos;
const len = self.items.len;
if (pos == len) {
// we've run out of space
// create a new slice that's twice as large
var larger = try self.allocator.alloc(T, len * 2);
// copy the items we previously added to our new space
@memcpy(larger[0..len], self.items);
self.allocator.free(self.items);
self.items = larger;
}
self.items[pos] = value;
self.pos = pos + 1;
}
};
}
```
我们的 `init` 函数返回一个 `List(T)`,我们的 `deinit` 和 `add` 函数使用 `List(T)` 和 `*List(T)` 作为参数。在我们的这个简单的示例中,这样做没有问题,但对于大型数据结构,编写完整的通用名称可能会变得有点繁琐,尤其是当我们有多个类型参数时(例如,散列映射的键和值需要使用不同的类型)。`@This()` 内置函数会返回它被调用时的最内层类型。一般来说,我们会这样定义 `List(T)`:
```zig
fn List(comptime T: type) type {
return struct {
pos: usize,
items: []T,
allocator: Allocator,
// Added
const Self = @This();
fn init(allocator: Allocator) !Self {
// ... same code
}
fn deinit(self: Self) void {
// .. same code
}
fn add(self: *Self, value: T) !void {
// .. same code
}
};
}
```
`Self` 并不是一个特殊的名称,它只是一个变量,而且是 `PascalCase` 风格,因为它的值是一种类型。我们可以在之前使用 `List(T)` 的地方用 `Self` 来替代。
---
我们可以创建更复杂的示例,使用多种类型参数和更先进的算法。但归根结底,泛型代码的关键点与上述简单示例相差无几。在下一部分,我们将在研究标准库中的 `ArrayList(T)` 和 `StringHashMap(V)` 时再次讨论泛型。
|
0 | repos | repos/learning-zig/06-stack-memory.md | > 原文地址:<https://www.openmymind.net/learning_zig/stack_memory>
# 栈内存
通过深入研究指针,我们了解了变量、数据和内存之间的关系。因此,我们对内存的分布有了一定的了解,但我们还没有讨论如何管理数据以及内存。对于运行时间短和简单的脚本来说,这可能并不重要。在 32GB 笔记本电脑时代,你可以启动程序,使用几百兆内存读取文件和解析 HTTP 响应,做一些了不起的事情,然后退出。程序退出时,操作系统会知道,它给程序分配的内存可以被回收,并用于其他用途了。
但对于运行数天、数月甚至数年的程序来说,内存就成了有限而宝贵的资源,很可能会被同一台机器上运行的其他进程抢占。根本不可能等到程序退出后再释放内存。这就是垃圾回收器的主要工作:了解哪些数据不再使用,并释放其内存。在 Zig 中,你就是垃圾回收器。
我们编写的大多数程序都会使用内存的三个区域。第一个是全局空间,也就是存储程序常量(包括字符串字面量)的地方。所有全局数据都被嵌入到二进制文件中,在编译时(也就是运行时)完全已知,并且不可更改。这些数据在程序的整个生命周期中都存在,从不需要增加或减少内存。除了会影响二进制文件的大小外,我们完全不必担心这个问题。
内存的第二个区域是调用栈,也是本小节的主题。第三个区域是堆,将在下一小节讨论。
> 三块内存区域实际上没有真正的物理差别。操作系统和可执行文件创造了“内存区域”这个概念。
## 栈帧
迄今为止,我们所见的所有数据都是常量,存储在二进制的全局数据部分或作为局部变量。局部表示该变量只在其声明的范围内有效。在 Zig 中,范围从花括号开始到结束。大多数变量的范围限定在一个函数内,包括函数参数,或一个控制流块,比如 if。但是,正如所见,你可以创建任意块,从而创建任意范围。
在上一部分中,我们可视化了 `main` 和 `levelUp` 函数的内存,每个函数都有一个 User:
```text
main: user -> ------------- (id: 1043368d0)
| 1 |
------------- (power: 1043368d8)
| 100 |
------------- (name.len: 1043368dc)
| 4 |
------------- (name.ptr: 1043368e4)
| 1182145c0 |-------------------------
levelUp: user -> ------------- (id: 1043368ec) |
| 1 | |
------------- (power: 1043368f4) |
| 100 | |
------------- (name.len: 1043368f8) |
| 4 | |
------------- (name.ptr: 104336900) |
| 1182145c0 |-------------------------
------------- |
|
............. empty space |
............. or other data |
|
------------- (1182145c0) <---
| 'G' |
-------------
| 'o' |
-------------
| 'k' |
-------------
| 'u' |
-------------
```
`levelUp` 紧接在 `main` 之后是有原因的:这是我们的简化版调用栈。当我们的程序启动时,`main` 及其局部变量被推入调用栈。当 `levelUp` 被调用时,它的参数和任何局部变量都会被添加到调用栈上。重要的是,当 `levelUp` 返回时,它会从栈中弹出。 在 `levelUp` 返回并且控制权回到 `main` 后,我们的调用栈如下所示:
```text
main: user -> ------------- (id: 1043368d0)
| 1 |
------------- (power: 1043368d8)
| 100 |
------------- (name.len: 1043368dc)
| 4 |
------------- (name.ptr: 1043368e4)
| 1182145c0 |-------------------------
------------- |
|
............. empty space |
............. or other data |
|
------------- (1182145c0) <---
| 'G' |
-------------
| 'o' |
-------------
| 'k' |
-------------
| 'u' |
-------------
```
当一个函数被调用时,其整个栈帧被推入调用栈——这就是我们需要知道每种类型大小的原因之一。尽管我们可能直到特定的代码行执行时,才能知道我们 `user` 的名字的长度(假设它不是一个常量字符串字面量),但我们知道我们的函数有一个 `User` 类型的变量,除了其他字段,只需要 8 字节来存储`name.len`和 8 字节来存储`name.ptr`。
当函数返回时,它的栈帧(最后推入调用栈的帧)会被弹出。令人惊讶的事情刚刚发生:`levelUp` 使用的内存已被自动释放!虽然从技术上讲,这些内存可以返回给操作系统,但据我所知,没有任何实现会真正缩小调用栈(不过,在必要时,实现会动态增加调用栈)。不过,用于存储 `levelUp` 堆栈帧的内存现在可以在我们的进程中用于另一个堆栈帧了。
> 在普通程序中,调用堆栈可能会变得很大。在一个典型程序所使用的所有框架代码和库之间,你最终会发现深层嵌套的函数。通常情况下,这并不是问题,但有时你可能会遇到堆栈溢出错误。当我们的调用栈空间耗尽时,就会发生这种情况。这种情况通常发生在递归函数中,即函数会调用自身。
与全局数据一样,调用栈也由操作系统和可执行文件管理。程序启动时,以及此后启动的每个线程,都会创建一个调用栈(其大小通常可在操作系统中配置)。调用栈在程序的整个生命周期中都存在,如果是线程,则在线程的整个生命周期中都存在。程序或线程退出时,调用栈将被释放。我们的全局数据包含所有程序的全局数据,而调用栈只包含当前执行的函数层次的栈帧。这样做既能有效利用内存,又能简化堆栈帧的管理。
## 悬空指针
栈帧的简洁和高效令人惊叹。但它也很危险:当函数返回时,它的任何本地数据都将无法访问。这听起来似乎很合理,毕竟这是本地数据,但却会带来严重的问题。请看这段代码:
```zig
const std = @import("std");
pub fn main() void {
const user1 = User.init(1, 10);
const user2 = User.init(2, 20);
std.debug.print("User {d} has power of {d}\n", .{user1.id, user1.power});
std.debug.print("User {d} has power of {d}\n", .{user2.id, user2.power});
}
pub const User = struct {
id: u64,
power: i32,
fn init(id: u64, power: i32) *User{
var user = User{
.id = id,
.power = power,
};
return &user;
}
};
```
粗瞥一眼,预期会有下面的输出:
```bash
User 1 has power of 10
User 2 has power of 20
```
但实际上:
```bash
User 2 has power of 20
User 9114745905793990681 has power of 0
```
你可能会得到不同的结果,但根据我的输出,`user1`继承了`user2`的值,而`user2`的值是无意义的。这段代码的关键问题是`User.init`返回局部`user`的地址`&user`。这被称为悬空指针,是指引用无效内存的指针。它是许多段错误(segfaults)的源头。
当一个栈帧从调用栈中弹出时,我们对该内存的任何引用都是无效的。尝试访问该内存的结果是未定义的。你可能会得到无意义的数据或段错误。我们可以试图理解我的输出,但这不是我们想要或甚至可以依赖的行为。
这类错误的一个挑战是,在有垃圾回收器的语言中,上述代码完全没有问题。例如,Go 会检测局部变量 `user` 超出了 init 函数的作用域,并在需要时确保其有效性(Go 如何做到这一点是一个实现细节,但它有几个选项,包括将数据移动到堆中,这就是下一部分要讨论的内容)。
而另一个问题,很遗憾地说,它是一个难以发现的错误。在我们上面的例子中,我们显然返回了一个局部地址。但这种行为可以隐藏在嵌套函数和复杂数据类型中。你是否看到了以下不完整代码的任何可能问题:
```zig
fn read() !void {
const input = try readUserInput();
return Parser.parse(input);
}
```
无论`Parser.parse`返回什么,它都将比变量`input`存在更久。如果`Parser`持有对 `input` 的引用,那将是一个悬空指针,等待着让我们的应用程序崩溃。理想情况下,如果 `Parser` 需要 `input` 生命周期尽可能长,它将复制 `input`,并且该复制将与它自己的生命周期绑定(更多内容在下一部分)。但此处没有执行这一步骤。`Parser` 的文档可能会对它对 `input` 的期望或它如何使用 `input` 提供一些说明。缺少这些信息,我们可能需要深入代码来弄清楚。
为了解决我们上面例子里的错误,有个简单的方法是改变 `init`,使它返回一个 `User` 而不是`*User`(指向 `User` 的指针)。我们可以使用 `return user` 而非 `return &user`。但这并不总是可能的。数据经常需要超越函数作用域的严格界限。为此,我们有了第三个内存区域--堆,这也是下一部分的主题。
在深入研究堆之前,我们要知道,在本指南结束之前,我们还将看到最后一个关于悬挂指针的示例。到那时,我们已经掌握了足够多的语言知识,可以给出一个不太复杂的示例。我之所以想重提这个话题,是因为对于来自垃圾回收语言的开发人员来说,这很可能会导致错误和挫败感。这一点你会掌握的。归根结底,就是要意识到数据的生命周期。
|
0 | repos | repos/learning-zig/README.md | # [Learning Zig](https://www.openmymind.net/learning_zig/) 中文翻译
[](https://discord.gg/57JR9u7M)
[](https://github.com/zigcc/learning-zig/stargazers)
> [!IMPORTANT]
> 迁移到 [zigcc.github.io](https://ziglang.cc/learn/) 仓库维护。
|
0 | repos | repos/learning-zig/10-conclusion.md | > 原文总结:<https://www.openmymind.net/learning_zig/conclusion>
# 总结
有些读者可能会认出我是各种『The Little $TECH Book』 的作者(译者注:原作者还写过 [The Little Go Book](https://github.com/karlseguin/the-little-go-book)、[The Little MongoDB Book](https://github.com/karlseguin/the-little-mongodb-book)),并想知道为什么这本书不叫『The Little Zig Book』。事实上,我不确定 Zig 是否适合『小』这个范畴。部分挑战在于,Zig 的复杂性和学习曲线会因个人背景和经验的不同而大相径庭。如果你是一个经验丰富的 C 或 C++ 程序员,那么简明扼要地总结一下这门语言可能就够了,这种情况下你可能会更需要[Zig 的官方文档](https://ziglang.org/documentation/master/)。
虽然我们在本指南中涉及了很多内容,但仍有大量内容我们尚未触及。我不希望这让你气馁或不知所措。所有语言的学习都是循序渐进的,通过本教程,你有了一个良好基础,也可以把它当作参考资料,可以开始学习 Zig 语言中更高级的功能。坦率地说,我没有涉及的部分我本身就理解有限,因此无法很好的解释。但这并不妨碍我使用 Zig 编写有意义的东西,比如一个流行的 [HTTP 服务器](https://github.com/karlseguin/http.zig)。
最后,我想强调一件完全被略过的事情,你之前可能有所耳闻,即 Zig 与 C 代码交互非常容易。因为 Zig 的生态还很年轻,标准库也很小,所以在某些情况下,使用 C 库可能是最好的选择。例如,Zig 标准库中没有正则表达式模块,使用 C 语言库就是一个合理的选择。我曾为 SQLite 和 DuckDB 编写过 Zig 库,这很简单。如果你基本遵循了本指南中的所有内容,应该不会有任何问题。
希望本资料对你有所帮助,也希望你能在编程过程中获得乐趣。
|
0 | repos | repos/learning-zig/SUMMARY.md | # 目录
[简介](README.md)
- [前言](00-preface.md)
- [安装 Zig](01-installing-zig.md)
- [语言概览 -- 第一部分](02-language-overview-part1.md)
- [语言概览 -- 第二部分](03-language-overview-part2.md)
- [编码风格](04-style-guide.md)
- [指针](05-pointers.md)
- [栈内存](06-stack-memory.md)
- [堆内核与分配器](07-heap-memory-and-allocator.md)
- [泛型](08-generics.md)
- [实战](09-coding-in-zig.md)
- [总结](10-conclusion.md)
|
0 | repos | repos/learning-zig/09-coding-in-zig.md | > 原文地址:<https://www.openmymind.net/learning_zig/coding_in_zig>
# 实战
在介绍了 Zig 语言的大部分内容之后,我们将对一些主题进行回顾,并展示几种使用 Zig 编程时一些实用的技巧。在此过程中,我们将介绍更多的标准库,并介绍一些稍复杂些的代码片段。
## 悬空指针 Dangling Pointers
我们首先来看看更多关于悬空指针的例子。这似乎是一个奇怪的问题,但如果你之前主要使用带垃圾回收的语言,这可能是你学习 Zig 最大的障碍。
你能猜到下面的输出是什么吗?
```zig
const std = @import("std");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var lookup = std.StringHashMap(User).init(allocator);
defer lookup.deinit();
const goku = User{.power = 9001};
try lookup.put("Goku", goku);
// returns an optional, .? would panic if "Goku"
// wasn't in our hashmap
const entry = lookup.getPtr("Goku").?;
std.debug.print("Goku's power is: {d}\n", .{entry.power});
// returns true/false depending on if the item was removed
_ = lookup.remove("Goku");
std.debug.print("Goku's power is: {d}\n", .{entry.power});
}
const User = struct {
power: i32,
};
```
当我运行这个程序时,我得到了
```bash
Goku's power is: 9001
Goku's power is: -1431655766
```
这段代码引入了 Zig 的 `std.StringHashMap`,它是 `std.AutoHashMap` 的特定版本,键类型设置为 `[]const u8`。即使你不能百分百确定发生了什么,也可以猜测我的输出与我们从 `lookup` 中删除条目后的第二次打印有关。注释掉删除的调用,输出就正常了。
理解上述代码的关键在于了解数据在内存的中位置,或者换句话说,了解数据的所有者。请记住,Zig 参数是按值传递的,也就是说,我们传递的是值的浅副本。我们 `lookup` 中的 `User` 与 `goku` 引用的内存不同。我们上面的代码有两个用户,每个用户都有自己的所有者。`goku` 的所有者是 `main`,而它的副本的所有者是 `lookup`。
`getPtr` 方法返回的是指向 `map` 中值的指针,在我们的例子中,它返回的是 `*User`。问题就在这里,删除会使我们的 `entry`指针失效。在这个示例中,`getPtr` 和 `remove` 的位置很近,因此问题也很明显。但不难想象,代码在调用 `remove` 时,并不知道 `entry` 的引用被保存在其他地方了。
> 在编写这个示例时,我并不确定会发生什么。删除有可能是通过设置内部标志来实现的,实际删除是惰性的。如果是这样的话,上面的示例在简单的情况下可能会 "奏效",但在更复杂的情况下就会失败。这听起来非常难以调试。
除了不调用 `remove` 之外,我们还可以用几种不同的方法来解决这个问题。首先,我们可以使用 `get` 而不是 `getPtr`。这样 `lookup` 将返回一个 `User` 的副本,而不再是 `*User`。这样我们就有了三个用户:
1. 定义在函数内部的 `goku`,`main` 函数是其所有者
2. 调用 `lookup.put` 时,形式参数会得到 `goku` 一个的副本,`lookup` 是其所有者
3. 使用 `get` 函数返回的 `entry`,`main` 函数是其所有者
由于 `entry` 现在是 `User` 的独立副本,因此将其从 `lookup` 中删除不会再使其失效。
另一种方法是将 `lookup` 的类型从 `StringHashMap(User)` 改为 `StringHashMap(*const User)`。这段代码可以工作:
```zig
const std = @import("std");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
// User -> *const User
var lookup = std.StringHashMap(*const User).init(allocator);
defer lookup.deinit();
const goku = User{.power = 9001};
// goku -> &goku
try lookup.put("Goku", &goku);
// getPtr -> get
const entry = lookup.get("Goku").?;
std.debug.print("Goku's power is: {d}\n", .{entry.power});
_ = lookup.remove("Goku");
std.debug.print("Goku's power is: {d}\n", .{entry.power});
}
const User = struct {
power: i32,
};
```
上述代码中有许多微妙之处。首先,我们现在只有一个用户 `goku`。`lookup` 和 `entry` 中的值都是对 `goku` 的引用。我们对 `remove` 的调用仍然会删除 `lookup` 中的值,但该值只是 `user` 的地址,而不是 `user` 本身。如果我们坚持使用 `getPtr`,那么被 `remove` 后,我们就会得到一个无效的 `**User`。在这两种解决方案中,我们都必须使用 `get` 而不是 `getPtr`,但在这种情况下,我们只是复制地址,而不是完整的 `User`。对于占用内存较多的对象来说,这可能是一个很大的区别。
如果把所有东西都放在一个函数中,再加上一个像 `User` 这样的小值,这仍然像是一个人为制造的问题。我们需要一个能让数据所有权成为当务之急的例子。
## 所有权 Ownership
我喜欢哈希表(HashMap),因为这是每个人都知道并且会经常使用的结构。它们有很多不同的用例,其中大部分你可能都用过。虽然哈希表可以用在一个短期查找的地方,但通常用于长期查找,因此插入其内的值需要同样长的生命周期。
这段代码将使用终端中输入的名称来填充我们的 `lookup`。如果名字为空,就会停止提示循环。最后,它会检测 `Leto` 是否出现在 `lookup` 中。
```zig
const std = @import("std");
const builtin = @import("builtin");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var lookup = std.StringHashMap(User).init(allocator);
defer lookup.deinit();
// stdin is an std.io.Reader
// the opposite of an std.io.Writer, which we already saw
const stdin = std.io.getStdIn().reader();
// stdout is an std.io.Writer
const stdout = std.io.getStdOut().writer();
var i: i32 = 0;
while (true) : (i += 1) {
var buf: [30]u8 = undefined;
try stdout.print("Please enter a name: ", .{});
if (try stdin.readUntilDelimiterOrEof(&buf, '\n')) |line| {
var name = line;
// Windows平台换行以`\r\n`结束
// 所以需要截取\r以获取控制台输入字符
if (builtin.os.tag == .windows) {
name = @constCast(std.mem.trimRight(u8, name, "\r"));
}
if (name.len == 0) {
break;
}
try lookup.put(name, .{.power = i});
}
}
const has_leto = lookup.contains("Leto");
std.debug.print("{any}\n", .{has_leto});
}
const User = struct {
power: i32,
};
```
上述代码虽然区分大小写,但无论我们如何完美地输入 `Leto`,`contains` 总是返回 `false`。让我们通过遍历 `lookup` 打印其值来调试一下:
```zig
// 将这段代码放在 while 循环之后
var it = lookup.iterator();
while (it.next()) |kv| {
std.debug.print("{s} == {any}\n", .{kv.key_ptr.*, kv.value_ptr.*});
}
```
这种迭代器模式在 Zig 中很常见,它依赖于 while 和可选类型(`Optional`)之间的协同作用。我们的迭代器返回指向键和值的指针,因此我们用 `.*` 对它们进行反引用,以访问实际值而不是地址。输出结果将取决于你输入的内容,但我得到的是
```bash
Please enter a name: Paul
Please enter a name: Teg
Please enter a name: Leto
Please enter a name:
�� == learning.User{ .power = 1 }
��� == learning.User{ .power = 0 }
��� == learning.User{ .power = 2 }
false
```
值看起来没问题,但键不一样。如果你不确定发生了什么,那可能是我的错。之前,我故意误导了你的注意力。我说哈希表通常声明周期会比较长,因此需要同等生命周期的值(value)。事实上,哈希表不仅需要长生命周期的值,还需要长生命周期的键(key)!请注意,`buf` 是在 `while` 循环中定义的。当我们调用 `put` 时,我们给了哈希表插入一个键值对,这个键的生命周期比哈希表本身短得多。将 `buf` 移到 `while` 循环之外可以解决生命周期问题,但每次迭代都会重复使用缓冲区。由于我们正在更改底层的键数据,因此它仍然无法工作。
对于上述代码,实际上只有一种解决方案:我们的 `lookup` 必须拥有键的所有权。我们需要添加一行并修改另一行:
```zig
// 用这两行替换现有的 lookup.put
const owned_name = try allocator.dupe(u8, name);
// name -> owned_name
try lookup.put(owned_name, .{.power = i});
```
`dupe` 是 `std.mem.Allocator` 中的一个方法,我们以前从未见过。它会分配给定值的副本。代码现在可以工作了,因为我们的键现在在堆上,比 `lookup`的生命周期更长。事实上,我们在延长这些字符串的生命周期方面做得太好了,以至于引入了内存泄漏。
你可能以为当我们调用 lookup.deinit 时,键和值就会被释放。但 StringHashMap 并没有放之四海而皆准的解决方案。首先,键可能是字符串文字,无法释放。其次,它们可能是用不同的分配器创建的。最后,虽然更先进,但在某些情况下,键可能不属于哈希表。
唯一的解决办法就是自己释放键值。在这一点上,创建我们自己的 `UserLookup` 类型并在 `deinit` 函数中封装这一清理逻辑可能会比较合理。一种简单的改法:
```zig
// 用以下的代码替换现有的 defer lookup.deinit();
defer {
var it = lookup.keyIterator();
while (it.next()) |key| {
allocator.free(key.*);
}
lookup.deinit();
}
```
这里的 `defer` 逻辑使用了一个代码快,它释放每个键,最后去释放 `lookup` 本身。我们使用的 `keyIterator` 只会遍历键。迭代器的值是指向哈希映射中键的指针,即 `*[]const u8`。我们希望释放实际的值,因为这是我们通过 `dupe` 分配的,所以我们使用 `key.*`.
我保证,关于悬挂指针和内存管理的讨论已经结束了。我们所讨论的内容可能还不够清晰或过于抽象。当你有更实际的问题需要解决时,再重新讨论这个问题也不迟。不过,如果你打算编写任何稍具规模(non-trivial)的程序,这几乎肯定是你需要掌握的内容。当你觉得可以的时候,我建议你参考上面这个示例,并自己动手实践一下。引入一个 `UserLookup` 类型来封装我们必须做的所有内存管理。尝试使用 `*User` 代替 `User`,在堆上创建用户,然后像处理键那样释放它们。编写覆盖新结构的测试,使用 `std.testing.allocator` 确保不会泄漏任何内存。
## ArrayList
现在你可以忘掉我们的 `IntList` 和我们创建的通用替代方案了。Zig 标准库中有一个动态数组实现:`std.ArrayList(T)`。
它是相当标准的东西,但由于它如此普遍需要和使用的数据结构,值得看看它的实际应用:
```zig
const std = @import("std");
const Allocator = std.mem.Allocator;
const builtin = @import("builtin");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var arr = std.ArrayList(User).init(allocator);
defer {
for (arr.items) |user| {
user.deinit(allocator);
}
arr.deinit();
}
// stdin is an std.io.Reader
// the opposite of an std.io.Writer, which we already saw
const stdin = std.io.getStdIn().reader();
// stdout is an std.io.Writer
const stdout = std.io.getStdOut().writer();
var i: i32 = 0;
while (true) : (i += 1) {
var buf: [30]u8 = undefined;
try stdout.print("Please enter a name: ", .{});
if (try stdin.readUntilDelimiterOrEof(&buf, '\n')) |line| {
var name = line;
if (builtin.os.tag == .windows) {
name = @constCast(std.mem.trimRight(u8, name, "\r"));
}
if (name.len == 0) {
break;
}
const owned_name = try allocator.dupe(u8, name);
try arr.append(.{.name = owned_name, .power = i});
}
}
var has_leto = false;
for (arr.items) |user| {
if (std.mem.eql(u8, "Leto", user.name)) {
has_leto = true;
break;
}
}
std.debug.print("{any}\n", .{has_leto});
}
const User = struct {
name: []const u8,
power: i32,
fn deinit(self: User, allocator: Allocator) void {
allocator.free(self.name);
}
};
```
以上是哈希表代码的基于 `ArrayList(User)` 的另一种实现。所有相同的生命周期和内存管理规则都适用。请注意,我们仍在创建 `name` 的副本,并且仍在删除 `ArrayList` 之前释放每个 `name`。
现在是指出 Zig 没有属性或私有字段的好时机。当我们访问 `arr.items` 来遍历值时,就可以看到这一点。没有属性的原因是为了消除阅读 Zig 代码中的歧义。在 Zig 中,如果看起来像字段访问,那就是字段访问。我个人认为,没有私有字段是一个错误,但我们可以解决这个问题。我已经习惯在字段前加上下划线,表示『仅供内部使用』。
由于字符串的类型是 `[]u8` 或 `[]const u8`,因此 `ArrayList(u8)` 是字符串构造器的合适类型,比如 .NET 的 `StringBuilder` 或 Go 的 `strings.Builder`。事实上,当一个函数的参数是 `Writer` 而你需要一个字符串时,就会用到 `ArrayList(u8)`。我们之前看过一个使用 `std.json.stringify` 将 JSON 输出到 `stdout` 的示例。下面是将 JSON 输出到 `ArrayList(u8)` 的示例:
```zig
const std = @import("std");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var out = std.ArrayList(u8).init(allocator);
defer out.deinit();
try std.json.stringify(.{
.this_is = "an anonymous struct",
.above = true,
.last_param = "are options",
}, .{.whitespace = .indent_2}, out.writer());
std.debug.print("{s}\n", .{out.items});
}
```
## Anytype
在[语言概述的第一部分](02-language-overview-part1.md)中,我们简要介绍了 `anytype`。这是一种非常有用的编译时 duck 类型。下面是一个简单的 logger:
```zig
pub const Logger = struct {
level: Level,
// "error" is reserved, names inside an @"..." are always
// treated as identifiers
const Level = enum {
debug,
info,
@"error",
fatal,
};
fn info(logger: Logger, msg: []const u8, out: anytype) !void {
if (@intFromEnum(logger.level) <= @intFromEnum(Level.info)) {
try out.writeAll(msg);
}
}
};
```
`info` 函数的 `out` 参数类型为 `anytype`。这意味着我们的 logger 可以将信息输出到任何具有 writeAll 方法的结构中,该方法接受一个 `[]const u8` 并返回一个 `!void`。这不是运行时特性。类型检查在编译时进行,每使用一种类型,就会创建一个类型正确的函数。如果我们试图调用 `info`,而该类型不具备所有必要的函数(本例中只有 `writeAll`),我们就会在编译时出错:
```zig
var l = Logger{.level = .info};
try l.info("sever started", true);
```
会得到如下错误:
```bash
no field or member function named 'writeAll' in 'bool'
```
使用 `ArrayList(u8)` 的 `writer` 就可以运行:
```zig
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var l = Logger{.level = .info};
var arr = std.ArrayList(u8).init(allocator);
defer arr.deinit();
try l.info("sever started", arr.writer());
std.debug.print("{s}\n", .{arr.items});
}
```
`anytype` 的一个最大缺点就是文档。下面是我们用过几次的 `std.json.stringify` 函数的签名:
```zig
// 我**讨厌**多行函数定义
// 不过,鉴于你可能在小屏幕上阅读这个指南,因此这里破一次例。
fn stringify(
value: anytype,
options: StringifyOptions,
out_stream: anytype
) @TypeOf(out_stream).Error!void
```
第一个参数 `value: anytype` 是显而易见的,它是要序列化的值,可以是任何类型(实际上,Zig 的 JSON 序列化器不能序列化某些类型,比如 HashMap)。我们可以猜测,`out_stream` 是写入 JSON 的地方,但至于它需要实现什么方法,你和我一样猜得到。唯一的办法就是阅读源代码,或者传递一个假值,然后使用编译器错误作为我们的文档。如果有更好的自动文档生成器,这一点可能会得到改善。不过,我希望 Zig 能提供接口,这已经不是第一次了。
## @TypeOf
在前面的部分中,我们使用 `@TypeOf` 来帮助我们检查各种变量的类型。从我们的用法来看,你可能会认为它返回的是字符串类型的名称。然而,鉴于它是一个 PascalCase 风格函数,你应该更清楚:它返回的是一个 `type`。
我最喜欢用 `anytype` 与 `@TypeOf` 和 `@hasField` 内置函数搭配使用,以编写测试帮助程序。虽然我们看到的每个 `User` 类型都非常简单,但我还是要请大家想象一下一个有很多字段的更复杂的结构。在许多测试中,我们需要一个 `User`,但我们只想指定与测试相关的字段。让我们创建一个 `userFactory`:
```zig
fn userFactory(data: anytype) User {
const T = @TypeOf(data);
return .{
.id = if (@hasField(T, "id")) data.id else 0,
.power = if (@hasField(T, "power")) data.power else 0,
.active = if (@hasField(T, "active")) data.active else true,
.name = if (@hasField(T, "name")) data.name else "",
};
}
pub const User = struct {
id: u64,
power: u64,
active: bool,
name: [] const u8,
};
```
我们可以通过调用 `userFactory(.{})` 创建默认用户,也可以通过 `userFactory(.{.id = 100, .active = false})` 来覆盖特定字段。这只是一个很小的模式,但我非常喜欢。这也是迈向元编程世界的第一步。
更常见的是 `@TypeOf` 与 `@typeInfo` 配对,后者返回一个 `std.builtin.Type`。这是一个功能强大的带标签的联合(tagged union),可以完整描述一个类型。`std.json.stringify` 函数会递归地调用它,以确定如何将提供的 `value` 序列化。
# 构建系统
如果你通读了整本指南,等待着深入了解如何建立更复杂的项目,包括多个依赖关系和各种目标,那你就要失望了。Zig 拥有强大的构建系统,以至于越来越多的非 Zig 项目都在使用它,比如 libsodium。不幸的是,所有这些强大的功能都意味着,对于简单的需求来说,它并不是最容易使用或理解的。
> 事实上,是我不太了解 Zig 的构建系统,所以无法解释清楚。
不过,我们至少可以获得一个简要的概述。为了运行 Zig 代码,我们使用了 `zig run learning.zig`。有一次,我们还用 `zig test learning.zig` 进行了一次测试。运行和测试命令用来玩玩还行,但如果要做更复杂的事情,就需要使用构建命令了。编译命令依赖于带有特殊编译入口的 `build.zig` 文件。下面是一个示例:
```zig
// build.zig
const std = @import("std");
pub fn build(b: *std.Build) !void {
_ = b;
}
```
每个构建程序都有一个默认的『安装』步骤,可以使用 `zig build install` 运行它,但由于我们的文件大部分是空的,你不会得到任何有意义的工件。我们需要告诉构建程序我们程序的入口是 `learning.zig`:
```zig
const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// setup executable
const exe = b.addExecutable(.{
.name = "learning",
.target = target,
.optimize = optimize,
.root_source_file = b.path("learning.zig"),
});
b.installArtifact(exe);
}
```
现在,如果运行 `zig build install`,就会在 `./zig-out/bin/learning` 中得到一个二进制文件。通过使用 `standardTargetOptions` 和 `standardOptimizeOption`,我们就能以命令行参数的形式覆盖默认值。例如,要为 `Windows` 构建一个大小优化的程序版本,我们可以这样做:
```bash
zig build install -Doptimize=ReleaseSmall -Dtarget=x86_64-windows-gnu
```
除了默认的『安装』步骤外,可执行文件通常还会增加两个步骤:『运行』和『测试』。一个库可能只有一个『测试』步骤。对于基本的无参数即可运行的程序来说,只需要在构建文件的最后添加四行:
```zig
// 在这行代码后添加下面的代码: b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Start learning!");
run_step.dependOn(&run_cmd.step);
```
这里通过 `dependOn` 的两次调用创建两个依赖关系。第一个依赖关系将我们的 `run_cmd` 与内置的安装步骤联系起来。第二个是将 `run_step` 与我们新创建的 `run_cmd` 绑定。你可能想知道为什么需要 `run_cmd` 和 `run_step`。我认为这种分离是为了支持更复杂的设置:依赖于多个命令的步骤,或者在多个步骤中使用的命令。如果运行 `zig build --help` 并滚动到顶部,你会看到新增的 `run` 步骤。现在你可以执行 `zig build run` 来运行程序了。
要添加『测试』步骤,你需要重复刚才添加的大部分运行代码,只是不再使用 `b.addExecutable`,而是使用 `b.addTest`:
```zig
const tests = b.addTest(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("learning.zig"),
});
const test_cmd = b.addRunArtifact(tests);
test_cmd.step.dependOn(b.getInstallStep());
const test_step = b.step("test", "Run the tests");
test_step.dependOn(&test_cmd.step);
```
我们将该步骤命名为 `test`。运行 `zig build --help` 会显示另一个可用步骤 `test`。由于我们没有进行任何测试,因此很难判断这一步是否有效。在 `learning.zig` 中,添加
```zig
test "dummy build test" {
try std.testing.expectEqual(false, true);
}
```
现在运行 `zig build test`时,应该会出现测试失败。如果你修复了测试,并再次运行 `zig build test`,你将不会得到任何输出。默认情况下,Zig 的测试运行程序只在失败时输出结果。如果你像我一样,无论成功还是失败,都想要一份总结,那就使用 `zig build test --summary all`。
这是启动和运行构建系统所需的最低配置。但是请放心,如果你需要构建你的程序,Zig 内置的功能大概率能覆盖你的需求。最后,你可以(也应该)在你的项目根目录下使用 `zig init`,让 Zig 为你创建一个文档齐全的 `build.zig` 文件。
## 第三方依赖
Zig 的内置软件包管理器相对较新,因此存在一些缺陷。虽然还有改进的余地,但它目前还是可用的。我们需要了解两个部分:创建软件包和使用软件包。我们将对其进行全面介绍。
首先,新建一个名为 `calc` 的文件夹并创建三个文件。第一个是 `add.zig`,内容如下:
```zig
// 哦,下面的函数定义中有语法之前没讲过,看看 b 的类型和返回类型!!
pub fn add(a: anytype, b: @TypeOf(a)) @TypeOf(a) {
return a + b;
}
const testing = @import("std").testing;
test "add" {
try testing.expectEqual(@as(i32, 32), add(30, 2));
}
```
这个例子可能看起来有点傻,一整个软件包只是为了加两个数值,但它能让我们专注于打包方面。接下来,我们将添加一个同样愚蠢的:`calc.zig`:
```zig
pub const add = @import("add.zig").add;
test {
// By default, only tests in the specified file
// are included. This magic line of code will
// cause a reference to all nested containers
// to be tested.
@import("std").testing.refAllDecls(@This());
}
```
我们将其分割为 `calc.zig` 和 `add.zig`,以证明 `zig build` 可以自动构建和打包所有项目文件。最后,我们可以添加 build.zig:
```zig
const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const tests = b.addTest(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("calc.zig"),
});
const test_cmd = b.addRunArtifact(tests);
test_cmd.step.dependOn(b.getInstallStep());
const test_step = b.step("test", "Run the tests");
test_step.dependOn(&test_cmd.step);
}
```
这些都是我们在上一节中看到的内容的重复。有了这些,你就可以运行 `zig build test --summary all`。
回到我们的 `learning`项目和之前创建的 `build.zig`。首先,我们将添加本地 `calc` 作为依赖项。我们需要添加三项内容。首先,我们将创建一个指向 `calc.zig`的模块:
```zig
// 你可以把这些代码放在构建函数的顶部,
// 即调用 addExecutable 之前。
const calc_module = b.addModule("calc", .{
.root_source_file = b.path("PATH_TO_CALC_PROJECT/calc.zig"),
});
```
你需要调整 `calc.zig` 的路径。现在,我们需要将这个模块添加到现有的 `exe` 和 `tests` 变量中。由于我们的 build.zig 变得越来越复杂,我们将尝试稍微组织一下:
```zig
const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const calc_module = b.addModule("calc", .{
.root_source_file = b.path("PATH_TO_CALC_PROJECT/calc.zig"),
});
{
// 设置我们的 "run" 命令。
const exe = b.addExecutable(.{
.name = "learning",
.target = target,
.optimize = optimize,
.root_source_file = b.path("learning.zig"),
});
// 添加这些代码
exe.root_module.addImport("calc", calc_module);
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Start learning!");
run_step.dependOn(&run_cmd.step);
}
{
// 设置我们的 "test" 命令。
const tests = b.addTest(.{
.target = target,
.optimize = optimize,
.root_source_file = b.path("learning.zig"),
});
// 添加这行代码
tests.root_module.addImport("calc", calc_module);
const test_cmd = b.addRunArtifact(tests);
test_cmd.step.dependOn(b.getInstallStep());
const test_step = b.step("test", "Run the tests");
test_step.dependOn(&test_cmd.step);
}
}
```
现在,可以在项目中 `@import("calc")`:
```zig
const calc = @import("calc");
...
calc.add(1, 2);
```
添加远程依赖关系需要花费更多精力。首先,我们需要回到 `calc` 项目并定义一个模块。你可能认为项目本身就是一个模块,但一个项目(project)可以暴露多个模块(module),所以我们需要明确地创建它。我们使用相同的 `addModule`,但舍弃了返回值。只需调用 `addModule` 就足以定义模块,然后其他项目就可以导入该模块。
```zig
_ = b.addModule("calc", .{
.root_source_file = b.path("calc.zig"),
});
```
这是我们需要对库进行的唯一改动。因为这是一个远程依赖的练习,所以我把这个 `calc` 项目推送到了 GitHub,这样我们就可以把它导入到我们的 `learning` 项目中。它可以在 https://github.com/karlseguin/calc.zig 上找到。
回到我们的 `learning`项目,我们需要一个新文件 `build.zig.zon`。ZON 是 Zig Object Notation 的缩写,它允许以人类可读格式表达 Zig 数据,并将人类可读格式转化为 Zig 代码。`build.zig.zon` 的内容包括:
```zig
.{
.name = "learning",
.paths = .{""},
.version = "0.0.0",
.dependencies = .{
.calc = .{
.url = "https://github.com/karlseguin/calc.zig/archive/d1881b689817264a5644b4d6928c73df8cf2b193.tar.gz",
.hash = "12ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
},
},
}
```
该文件中有两个可疑值,第一个是 url 中的 d1881b689817264a5644b4d6928c73df8cf2b193<。这只是 git 提交的哈希值。第二个是哈希值。据我所知,目前还没有很好的方法来告诉我们这个值应该是多少,所以我们暂时使用一个假值。
要使用这一依赖关系,我们需要对 `build.zig` 进行一处修改:
```zig
// 将这些代码:
const calc_module = b.addModule("calc", .{
.root_source_file = b.path("calc/calc.zig"),
});
// 替换成:
const calc_dep = b.dependency("calc", .{.target = target,.optimize = optimize});
const calc_module = calc_dep.module("calc");
```
在 `build.zig.zon` 中,我们将依赖关系命名为 `calc`,这就是我们要加载的依赖关系。在这个依赖关系中,我们将使用其中的 `calc` 模块,也就是我们在 `calc` 的 `build.zig.zon` 中命名的模块。
如果你尝试运行 `zig build test`,应该会看到一个错误:
```bash
hash mismatch: manifest declares
122053da05e0c9348d91218ef015c8307749ef39f8e90c208a186e5f444e818672da
but the fetched package has
122036b1948caa15c2c9054286b3057877f7b152a5102c9262511bf89554dc836ee5
```
将正确的哈希值复制并粘贴回 `build.zig.zon`,然后再次尝试运行 `zig build test`,现在一切应该都正常了。
听起来很多,我希望能精简一些。但这主要是你可以从其他项目中复制和粘贴的东西,一旦设置完成,你就可以继续了。
需要提醒的是,我发现 Zig 对依赖项的缓存偏激。如果你试图更新依赖项,但 Zig 似乎检测不到变化。这时,我会删除项目的 `zig-cache` 文件夹以及 `~/.cache/zig`。
---
我们已经涉猎了很多领域,探索了一些核心数据结构,并将之前的大块内容整合到了一起。我们的代码变得复杂了一些,不再那么注重特定的语法,看起来更像真正的代码。让我感到兴奋的是,尽管如此复杂,但代码大部分都是有意义的。如果暂时没有看懂,也不要放弃。选取一个示例并将其分解,添加打印语句,为其编写一些测试。亲自动手编写自己的代码,然后再回来阅读那些没有看懂的部分。
|
0 | repos | repos/learning-zig/07-heap-memory-and-allocator.md | > 原文地址:<https://www.openmymind.net/learning_zig/heap_memory>
# 堆和分配器 Heap & Allocator
迄今为止,我们所接触到的一切都有个限制,需要预先知道大小。数组总是有一个编译时已知的长度(事实上,长度是类型的一部分)。我们所有的字符串都是字符串字面量,其长度在编译时是已知的。
此外,我们所见过的两种内存管理策略,即**全局数据**和**调用栈**,虽然简单高效,但都有局限性。这两种策略都无法处理动态大小的数据,而且在数据生命周期方面都很固定。
本部分分为两个主题。第一个主题是第三个内存区域--堆的总体概述。另一个主题是 Zig 直接而独特的堆内存管理方法。即使你熟悉堆内存,比如使用过 C 语言的 `malloc`,你也会希望阅读第一部分,因为它是 Zig 特有的。
## 堆
堆是我们可以使用的第三个也是最后一个内存区域。与全局数据和调用栈相比,堆有点像蛮荒之地:什么都可以使用。具体来说,在堆中,我们可以在运行时创建大小已知的内存,并完全控制其生命周期。
调用堆栈之所以令人惊叹,是因为它管理数据的方式简单且可预测(通过压入和弹出堆栈帧)。这一优点同时也是缺点:数据的生命周期与它在调用堆栈中的位置息息相关。堆则恰恰相反。它没有内置的生命周期,因此我们的数据可长可短。这个优点也是它的缺点:它没有内置的生命周期,所以如果我们不释放数据,就没有人会释放。
让我们来看一个例子:
```zig
const std = @import("std");
pub fn main() !void {
// we'll be talking about allocators shortly
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
// ** The next two lines are the important ones **
var arr = try allocator.alloc(usize, try getRandomCount());
defer allocator.free(arr);
for (0..arr.len) |i| {
arr[i] = i;
}
std.debug.print("{any}\n", .{arr});
}
fn getRandomCount() !u8 {
var seed: u64 = undefined;
try std.posix.getrandom(std.mem.asBytes(&seed));
var random = std.Random.DefaultPrng.init(seed);
return random.random().uintAtMost(u8, 5) + 5;
}
```
我们稍后将讨论 Zig 的分配器,目前需要知道的是分配器是 `std.mem.Allocator` 类型。我们使用了它的两种方法:`alloc` 和 `free`。分配内存可能出错,故我们用 `try` 捕获调用 `allocator.alloc` 产生的错误。目前唯一可能的错误是 `OutOfMemory`。其参数主要告诉我们它是如何工作的:它需要一个类型(T)和一个计数,成功时返回一个类型为 `[]T` 的切片。它分配发生在运行时期间,必须如此,因为我们的计数只在运行时才可知。
一般来说,每次 `alloc` 都会有相应的 `free`。`alloc`分配内存,`free`释放内存。不要让这段简单的代码限制了你的想象力。这种 `try alloc` + `defer free` 的模式很常见,这是有原因的:在我们分配内存的地方附近释放相对来说是万无一失的。但同样常见的是在一个地方分配,而在另一个地方释放。正如我们之前所说,堆没有内置的生命周期管理。你可以在 HTTP 处理程序中分配内存,然后在后台线程中释放,这是代码中两个完全独立的部分。
## defer 和 errdefer
说句题外话,上面的代码介绍了一个新的语言特性:`defer`,它在退出作用域时执行给定的代码。『作用域退出』包括到达作用域的结尾或从作用域返回。严格来说, `defer` 与分配器或内存管理并无严格关系;你可以用它来执行任何代码。但上述用法很常见。
Zig 的 `defer` 类似于 Go 的 `defer`,但存在一个主要区别。在 Zig 中,`defer` 将在其包含作用域的末尾运行。在 Go 中,`defer` 是在包含函数的末尾运行。除非你是 Go 开发人员,否则 Zig 的做法可能更不令人惊讶。
与`defer` 相似的是 `errdefer`,它作用与之类似,是在退出作用域时执行给定的代码,但只在返回错误时执行。在进行更复杂的设置时,如果因为出错而不得不撤销之前的分配,这将非常有用。
以下示例在复杂性上有所增加。它展示了 `errdefer` 和一个常见的模式,即在 `init` 函数中分配内存,并在 `deinit` 中释放:
```zig
const std = @import("std");
const Allocator = std.mem.Allocator;
pub const Game = struct {
players: []Player,
history: []Move,
allocator: Allocator,
fn init(allocator: Allocator, player_count: usize) !Game {
var players = try allocator.alloc(Player, player_count);
errdefer allocator.free(players);
// store 10 most recent moves per player
var history = try allocator.alloc(Move, player_count * 10);
return .{
.players = players,
.history = history,
.allocator = allocator,
};
}
fn deinit(game: Game) void {
const allocator = game.allocator;
allocator.free(game.players);
allocator.free(game.history);
}
};
```
这段代码主要突显两件事:
1. `errdefer` 的作用。在正常情况下,`player` 在 `init` 分配,在 `deinit` 释放。但有一种边缘情况,即 `history` 初始化失败。在这种情况下,我们需要撤销 `players` 的分配。
2. 我们动态分配的两个切片(`players` 和 `history`)的生命周期是基于我们的应用程序逻辑的。没有任何规则规定何时必须调用 `deinit` 或由谁调用。这是件好事,因为它为我们提供了任意的生命周期,但也存在缺点,就是如果从未调用 `deinit` 或调用 `deinit` 超过一次,就会出现混乱和错误。
> `init` 和 `deinit` 的名字并不特殊。它们只是 Zig 标准库使用的,也是社区采纳的名称。在某些情况下,包括在标准库中,会使用 `open` 和 `close`,或其他更适当的名称。
## 双重释放和内存泄漏
上面提到过,没有规则规定什么时候必须释放什么东西。但事实并非如此,还是有一些重要规则,只是它们不是强制的,需要你自己格外小心。
第一条规则是不可释放同一内存两次。
```zig
const std = @import("std");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var arr = try allocator.alloc(usize, 4);
allocator.free(arr);
allocator.free(arr);
std.debug.print("This won't get printed\n", .{});
}
```
可以预见到,最后一行代码不会被打印出来。这是因为我们释放了相同的内存两次。这被称为双重释放,是无效的。要避免这种情况似乎很简单,但在具有复杂生命周期的大型项目中,却很难发现。
第二条规则是,无法释放没有引用的内存。这听起来似乎很明显,但谁负责释放内存并不总是很清楚。下面的代码声明了一个转小写的函数:
```zig
const std = @import("std");
const Allocator = std.mem.Allocator;
fn allocLower(allocator: Allocator, str: []const u8) ![]const u8 {
var dest = try allocator.alloc(u8, str.len);
for (str, 0..) |c, i| {
dest[i] = switch (c) {
'A'...'Z' => c + 32,
else => c,
};
}
return dest;
}
```
上面的代码没问题。但以下用法不是:
```zig
// 对于这个特定的代码,我们应该使用 std.ascii.eqlIgnoreCase
fn isSpecial(allocator: Allocator, name: [] const u8) !bool {
const lower = try allocLower(allocator, name);
return std.mem.eql(u8, lower, "admin");
}
```
这是内存泄漏。`allocLower` 中创建的内存永远不会被释放。不仅如此,一旦 `isSpecial` 返回,这块内存就永远无法释放。在有垃圾收集器的语言中,当数据变得无法访问时,垃圾收集器最终会释放无用的内存。
但在上面的代码中,一旦 `isSpecial` 返回,我们就失去了对已分配内存的唯一引用,即 `lower` 变量。而直到我们的进程退出后,这块内存块才会释放。我们的函数可能只会泄漏几个字节,但如果它是一个长时间运行的进程,并且重复调用该函数,未被释放的内存块就会逐渐累积起来,最终会耗尽所有内存。
至少在双重释放的情况下,我们的程序会遭遇严重崩溃。内存泄漏可能很隐蔽。不仅仅是根本原因难以确定。真正的小泄漏或不常执行的代码中的泄漏甚至很难被发现。这是一个很常见的问题,Zig 提供了帮助,我们将在讨论分配器时看到。
## 创建与销毁
`std.mem.Allocator`的`alloc`方法会返回一个切片,其长度为传递的第二个参数。如果想要单个值,可以使用 `create` 和 `destroy` 而不是 `alloc` 和 `free`。
前面几部分在学习指针时,我们创建了 `User` 并尝试增强它的功能。下面是基于堆的版本:
```zig
const std = @import("std");
pub fn main() !void {
// again, we'll talk about allocators soon!
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
// create a User on the heap
var user = try allocator.create(User);
// free the memory allocated for the user at the end of this scope
defer allocator.destroy(user);
user.id = 1;
user.power = 100;
// this line has been added
levelUp(user);
std.debug.print("User {d} has power of {d}\n", .{user.id, user.power});
}
fn levelUp(user: *User) void {
user.power += 1;
}
pub const User = struct {
id: u64,
power: i32,
};
```
`create` 方法接受一个参数,类型(T)。它返回指向该类型的指针或一个错误,即 `!*T`。也许你想知道,如果我们创建了`User`, 但没有设置 `id`, `power`时会发生什么。这就像将这些字段设置为未定义(undefined),其行为也是未定义的。意即,属性没有初始化时,在访问未初始化的变量,行为也是未定义,这意味着程序可能会出现不可预测的行为,比如返回错误的值、崩溃等问题。
当我们探索悬空指针时,函数错误地返回了本地`user`的地址:
```zig
pub const User = struct {
fn init(id: u64, power: i32) *User{
var user = User{
.id = id,
.power = power,
};
// this is a dangling pointer
return &user;
}
};
```
在这种情况下,返回一个 `User`可能更有意义。但有时你会希望函数返回一个指向它所创建的东西的指针。当你想让生命周期不受调用栈的限制时,你就会这样做。为了解决上面的悬空指针问题,我们可以使用`create` 方法:
```zig
// 我们的返回类型改变了,因为 init 现在可以失败了
// *User -> !*User
fn init(allocator: std.mem.Allocator, id: u64, power: i32) !*User{
const user = try allocator.create(User);
user.* = .{
.id = id,
.power = power,
};
return user;
}
```
我引入了新的语法,`user.* = .{...}`。这有点奇怪,我不是很喜欢它,但你会看到它。右侧是你已经见过的内容:它是一个带有类型推导的结构体初始化器。我们可以明确地使用 `user.* = User{...}`。左侧的 `user.*` 是我们如何去引用该指针所指向的变量。`&` 接受一个 T 类型并给我们一个 `*T` 类型。`.*` 是相反的操作,应用于一个 `*T` 类型的值时,它给我们一个 T 类型。即,`&`获取地址,`.*`获取值。
请记住,`create` 返回一个 `!*User`,所以我们的 `user` 是 `*User` 类型。
## 分配器 Allocator
Zig 的核心原则之一是无隐藏内存分配。根据你的背景,这听起来可能并不特别。但这与 C 语言中使用标准库的 malloc 函数分配内存的做法形成了鲜明的对比。在 C 语言中,如果你想知道一个函数是否分配内存,你需要阅读源代码并查找对 malloc 的调用。
Zig 没有默认的分配器。在上述所有示例中,分配内存的函数都使用了一个 `std.mem.Allocator` 参数。按照惯例,这通常是第一个参数。所有 Zig 标准库和大多数第三方库都要求调用者在分配内存时提供一个分配器。
这种显式性有两种形式。在简单的情况下,每次函数调用都会提供分配器。这样的例子很多,但 `std.fmt.allocPrint` 是你迟早会用到的一个。它类似于我们一直在使用的 std.debug.print,只是分配并返回一个字符串,而不是将其写入 `stderr`:
```zig
const say = std.fmt.allocPrint(allocator, "It's over {d}!!!", .{user.power});
defer allocator.free(say);
```
另一种形式是将 `Allocator` 传递给 `init` ,然后由对象**内部使用**。这种方法不那么明确,因为你已经给了对象一个分配器来使用,但你不知道哪些方法调用将实际分配。对于长寿命对象来说,这种方法更实用。
注入分配器的优势不仅在于显式,还在于灵活性。`std.mem.Allocator` 是一个接口,提供了 `alloc`、`free`、`create` 和 `destroy` 函数以及其他一些函数。到目前为止,我们只看到了 `std.heap.GeneralPurposeAllocator`,但标准库或第三方库中还有其他实现。
> Zig 没有用于创建接口的语法糖。一种类似于接口的模式是带标签的联合(tagged unions),不过与真正的接口相比,这种模式相对受限。整个标准库中也探索了一些其他模式,例如 `std.mem.Allocator`。本指南不探讨这些接口模式。
如果你正在构建一个库,那么最好接受一个 `std.mem.Allocator`,然后让库的用户决定使用哪种分配器实现。否则,你就需要选择正确的分配器,正如我们将看到的,这些分配器并不相互排斥。在你的程序中创建不同的分配器可能有很好的理由。
## 通用分配器 GeneralPurposeAllocator
顾名思义,`std.heap.GeneralPurposeAllocator` 是一种通用的、线程安全的分配器,可以作为应用程序的主分配器。对于许多程序来说,这是唯一需要的分配器。程序启动时,会创建一个分配器并传递给需要它的函数。我的 HTTP 服务器库中的示例代码就是一个很好的例子:
```zig
const std = @import("std");
const httpz = @import("httpz");
pub fn main() !void {
// create our general purpose allocator
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
// get an std.mem.Allocator from it
const allocator = gpa.allocator();
// pass our allocator to functions and libraries that require it
var server = try httpz.Server().init(allocator, .{.port = 5882});
var router = server.router();
router.get("/api/user/:id", getUser);
// blocks the current thread
try server.listen();
}
```
我们创建了 `GeneralPurposeAllocator`,从中获取一个 `std.mem.Allocator` 并将其传递给 HTTP 服务器的 `init` 函数。在一个更复杂的项目中,声明的变量`allocator` 可能会被传递给代码的多个部分,每个部分可能都会将其传递给自己的函数、对象和依赖。
你可能会注意到,创建 `gpa` 的语法有点奇怪。什么是`GeneralPurposeAllocator(.{}){}`?
我们之前见过这些东西,只是现在都混合了起来。`std.heap.GeneralPurposeAllocator` 是一个函数,由于它使用的是 `PascalCase`(帕斯卡命名法),我们知道它返回一个类型。(下一部分会更多讨论泛型)。也许这个更明确的版本会更容易解读:
```zig
const T = std.heap.GeneralPurposeAllocator(.{});
var gpa = T{};
// 等同于:
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
```
也许你仍然不太确信 `.{}` 的含义。我们之前也见过它:`.{}` 是一个具有隐式类型的结构体初始化器。
类型是什么,字段在哪里?类型其实是 `std.heap.general_purpose_allocator.Config`,但它并没有直接暴露出来,这也是我们没有显式给出类型的原因之一。没有设置字段是因为 Config 结构定义了默认值,我们将使用默认值。这是配置、选项的中常见的模式。事实上,我们在下面几行向 `init` 传递 `.{.port = 5882}` 时又看到了这种情况。在本例中,除了端口这一个字段外,我们都使用了默认值。
## std.testing.allocator
希望当我们谈到内存泄漏时,你已经足够烦恼,而当我提到 Zig 可以提供帮助时,你肯定渴望了解更多这方面内容。这种帮助来自 `std.testing.allocator`,它是一个 `std.mem.Allocator` 实现。目前,它基于通用分配器(GeneralPurposeAllocator)实现,并与 Zig 的测试运行器进行了集成,但这只是实现细节。重要的是,如果我们在测试中使用 `std.testing.allocator`,就能捕捉到大部分内存泄漏。
你可能已经熟悉了动态数组(通常称为 ArrayLists)。在许多动态编程语言中,所有数组都是动态的。动态数组支持可变数量的元素。Zig 有一个通用 ArrayList,但我们将创建一个专门用于保存整数的 ArrayList,并演示泄漏检测:
```zig
pub const IntList = struct {
pos: usize,
items: []i64,
allocator: Allocator,
fn init(allocator: Allocator) !IntList {
return .{
.pos = 0,
.allocator = allocator,
.items = try allocator.alloc(i64, 4),
};
}
fn deinit(self: IntList) void {
self.allocator.free(self.items);
}
fn add(self: *IntList, value: i64) !void {
const pos = self.pos;
const len = self.items.len;
if (pos == len) {
// we've run out of space
// create a new slice that's twice as large
var larger = try self.allocator.alloc(i64, len * 2);
// copy the items we previously added to our new space
@memcpy(larger[0..len], self.items);
self.items = larger;
}
self.items[pos] = value;
self.pos = pos + 1;
}
};
```
有趣的部分发生在 `add` 函数里,当 `pos == len`时,表明我们已经填满了当前数组,并且需要创建一个更大的数组。我们可以像这样使用`IntList`:
```zig
const std = @import("std");
const Allocator = std.mem.Allocator;
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var list = try IntList.init(allocator);
defer list.deinit();
for (0..10) |i| {
try list.add(@intCast(i));
}
std.debug.print("{any}\n", .{list.items[0..list.pos]});
}
```
代码运行并打印出正确的结果。不过,尽管我们在 `list` 上调用了 `deinit`,还是出现了内存泄漏。如果你没有发现也没关系,因为我们要写一个测试,并使用 `std.testing.allocator`:
```zig
const testing = std.testing;
test "IntList: add" {
// We're using testing.allocator here!
var list = try IntList.init(testing.allocator);
defer list.deinit();
for (0..5) |i| {
try list.add(@intCast(i+10));
}
try testing.expectEqual(@as(usize, 5), list.pos);
try testing.expectEqual(@as(i64, 10), list.items[0]);
try testing.expectEqual(@as(i64, 11), list.items[1]);
try testing.expectEqual(@as(i64, 12), list.items[2]);
try testing.expectEqual(@as(i64, 13), list.items[3]);
try testing.expectEqual(@as(i64, 14), list.items[4]);
}
```
> `@as` 是一个执行类型强制的内置函数。如果你好奇什么我们的测试要用到这么多,那么你不是唯一一个。从技术上讲,这是因为第二个参数,即 `actual`,被强制为第一个参数,即 `expected`。在上面的例子中,我们的期望值都是 `comptime_int`,这就造成了问题。包括我在内的许多人都认为这是一种奇怪而不幸的行为。
如果你按照步骤操作,把测试放在 `IntList` 和 `main` 的同一个文件中。Zig 的测试通常写在同一个文件中,经常在它们测试的代码附近。当使用 `zig test learning.zig` 运行测试时,我们会得到了一个令人惊喜的失败:
```bash
Test [1/1] test.IntList: add... [gpa] (err): memory address 0x101154000 leaked:
/code/zig/learning.zig:26:32: 0x100f707b7 in init (test)
.items = try allocator.alloc(i64, 2),
^
/code/zig/learning.zig:55:29: 0x100f711df in test.IntList: add (test)
var list = try IntList.init(testing.allocator);
... MORE STACK INFO ...
[gpa] (err): memory address 0x101184000 leaked:
/code/test/learning.zig:40:41: 0x100f70c73 in add (test)
var larger = try self.allocator.alloc(i64, len * 2);
^
/code/test/learning.zig:59:15: 0x100f7130f in test.IntList: add (test)
try list.add(@intCast(i+10));
```
此处有多个内存泄漏。幸运的是,测试分配器准确地告诉我们泄漏的内存是在哪里分配的。你现在能发现泄漏了吗?如果没有,请记住,通常情况下,每个 `alloc` 都应该有一个相应的 `free`。我们的代码在 `deinit` 中调用 `free` 一次。然而在 `init` 中 `alloc` 被调用一次,每次调用 `add` 并需要更多空间时也会调用 `alloc`。每次我们 `alloc` 更多空间时,都需要 `free` 之前的 `self.items`。
```zig
// 现有的代码
var larger = try self.allocator.alloc(i64, len * 2);
@memcpy(larger[0..len], self.items);
// 添加的代码
// 释放先前分配的内存
self.allocator.free(self.items);
```
将`items`复制到我们的 `larger` 切片中后, 添加最后一行`free`可以解决泄漏的问题。如果运行 `zig test learning.zig`,便不会再有错误。
## ArenaAllocator
通用分配器(GeneralPurposeAllocator)是一个合理的默认设置,因为它在所有可能的情况下都能很好地工作。但在程序中,你可能会遇到一些固定场景,使用更专业的分配器可能会更合适。其中一个例子就是需要在处理完成后丢弃的短期状态。解析器(Parser)通常就有这样的需求。一个 `parse` 函数的基本轮廓可能是这样的
```zig
fn parse(allocator: Allocator, input: []const u8) !Something {
const state = State{
.buf = try allocator.alloc(u8, 512),
.nesting = try allocator.alloc(NestType, 10),
};
defer allocator.free(state.buf);
defer allocator.free(state.nesting);
return parseInternal(allocator, state, input);
}
```
虽然这并不难管理,但 `parseInternal` 内可能还会申请临时内存,当然这些内存也需要释放。作为替代方案,我们可以创建一个 `ArenaAllocator`,一次性释放所有分配:
```zig
fn parse(allocator: Allocator, input: []const u8) !Something {
// create an ArenaAllocator from the supplied allocator
var arena = std.heap.ArenaAllocator.init(allocator);
// this will free anything created from this arena
defer arena.deinit();
// create an std.mem.Allocator from the arena, this will be
// the allocator we'll use internally
const aa = arena.allocator();
const state = State{
// we're using aa here!
.buf = try aa.alloc(u8, 512),
// we're using aa here!
.nesting = try aa.alloc(NestType, 10),
};
// we're passing aa here, so any we're guaranteed that
// any other allocation will be in our arena
return parseInternal(aa, state, input);
}
```
`ArenaAllocator` 接收一个子分配器(在本例中是传入 `init` 的分配器),然后创建一个新的 `std.mem.Allocator`。当使用这个新的分配器分配或创建内存时,我们不需要调用 free 或 destroy。当我们调用 `arena.deinit` 时,会一次性释放所有该分配器申请的内存。事实上,`ArenaAllocator` 的 `free` 和 `destroy` 什么也不做。
必须谨慎使用 `ArenaAllocator`。由于无法释放单个分配,因此需要确保 `ArenaAllocator` 的 `deinit` 会在合理的内存增长范围内被调用。有趣的是,这种知识可以是内部的,也可以是外部的。例如,在上述代码中,由于状态生命周期的细节属于内部事务,因此在解析器中利用 `ArenaAllocator` 是合理的。
> 像 `ArenaAllocator`这样的具有一次性释放所有申请内存的分配器,会破坏每一次 `alloc` 都应该有相应 `free` 的规则。不过,如果你收到的是一个 `std.mem.Allocator`,就不应对其底层实现做任何假设。
我们的 `IntList` 却不是这样。它可以用来存储 10 个或 1000 万个值。它的生命周期可以以毫秒为单位,也可以以周为单位。它无法决定使用哪种类型的分配器。使用 IntList 的代码才有这种知识。最初,我们是这样管理 `IntList` 的:
```zig
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var list = try IntList.init(allocator);
defer list.deinit();
```
我们可以选择 `ArenaAllocator` 替代:
```zig
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const allocator = gpa.allocator();
var arena = std.heap.ArenaAllocator.init(allocator);
defer arena.deinit();
const aa = arena.allocator();
var list = try IntList.init(aa);
// 说实话,我很纠结是否应该调用 list.deinit。
// 从技术上讲,我们不必这样做,因为我们在上面调用了 defer arena.deinit()。
defer list.deinit();
...
```
由于 `IntList` 接受的参数是 `std.mem.Allocator`, 因此我们不需要做什么改变。如果 `IntList`内部创建了自己的 `ArenaAllocator`,那也是可行的。允许在`ArenaAllocator`内部创建`ArenaAllocator`。
最后举个简单的例子,我上面提到的 HTTP 服务器在响应中暴露了一个 `ArenaAllocator`。一旦发送了响应,它就会被清空。由于`ArenaAllocator`的生命周期可以预测(从请求开始到请求结束),因此它是一种高效的选择。就性能和易用性而言,它都是高效的。
## 固定缓冲区分配器 FixedBufferAllocator
我们要讨论的最后一个分配器是 `std.heap.FixedBufferAllocator`,它可以从我们提供的缓冲区(即 `[]u8`)中分配内存。这种分配器有两大好处。首先,由于所有可能使用的内存都是预先创建的,因此速度很快。其次,它自然而然地限制了可分配内存的数量。这一硬性限制也可以看作是一个缺点。另一个缺点是,`free` 和 `destroy` 只对最后分配/创建的项目有效(想想堆栈)。调用释放非最后分配的内存是安全的,但不会有任何作用。
> 译者注:这不是覆盖的问题。`FixedBufferAllocator` 会按照栈的方式进行内存分配和释放。你可以分配新的内存块,但只能按照后进先出(LIFO)的顺序释放它们。
```zig
const std = @import("std");
pub fn main() !void {
var buf: [150]u8 = undefined;
var fa = std.heap.FixedBufferAllocator.init(&buf);
// this will free all memory allocate with this allocator
defer fa.reset();
const allocator = fa.allocator();
const json = try std.json.stringifyAlloc(allocator, .{
.this_is = "an anonymous struct",
.above = true,
.last_param = "are options",
}, .{.whitespace = .indent_2});
// We can free this allocation, but since we know that our allocator is
// a FixedBufferAllocator, we can rely on the above `defer fa.reset()`
defer allocator.free(json);
std.debug.print("{s}\n", .{json});
}
```
输出内容:
```zig
{
"this_is": "an anonymous struct",
"above": true,
"last_param": "are options"
}
```
但如果将 `buf` 更改为 `[120]u8`,将得到一个内存不足的错误。
固定缓冲区分配器(FixedBufferAllocators)的常见模式是 `reset` 并重复使用,竞技场分配器(ArenaAllocators)也是如此。这将释放所有先前的分配,并允许重新使用分配器。
---
由于没有默认的分配器,Zig 在分配方面既透明又灵活。`std.mem.Allocator`接口非常强大,它允许专门的分配器封装更通用的分配器,正如我们在`ArenaAllocator`中看到的那样。
更广泛地说,我们希望堆分配的强大功能和相关责任是显而易见的。对于大多数程序来说,分配任意大小、任意生命周期的内存的能力是必不可少的。
然而,由于动态内存带来的复杂性,你应该注意寻找替代方案。例如,上面我们使用了 `std.fmt.allocPrint`,但标准库中还有一个 `std.fmt.bufPrint`。后者使用的是缓冲区而不是分配器:
```zig
const std = @import("std");
pub fn main() !void {
const name = "Leto";
var buf: [100]u8 = undefined;
const greeting = try std.fmt.bufPrint(&buf, "Hello {s}", .{name});
std.debug.print("{s}\n", .{greeting});
}
```
该 API 将内存管理的负担转移给了调用者。如果名称较长或 `buf` 较小,`bufPrint` 可能会返回 `NoSpaceLeft` 的错误。但在很多情况下,应用程序都有已知的限制,例如名称的最大长度。在这种情况下,`bufPrint` 更安全、更快速。
动态分配的另一个可行替代方案是将数据流传输到 `std.io.Writer`。与我们的 `Allocator` 一样,`Writer` 也是被许多具体类型实现的接口。上面,我们使用 `stringifyAlloc` 将 JSON 序列化为动态分配的字符串。我们本可以使用 `stringify` 将其写入到一个 Writer 中:
```zig
const std = @import("std");
pub fn main() !void {
const out = std.io.getStdOut();
try std.json.stringify(.{
.this_is = "an anonymous struct",
.above = true,
.last_param = "are options",
}, .{.whitespace = .indent_2}, out.writer());
}
```
> `Allocator`通常是函数的第一个参数,而 `Writer`通常是最后一个参数。ಠ_ಠ
在很多情况下,用 `std.io.BufferedWriter` 封装我们的 `Writer` 会大大提高性能。
我们的目标并不是消除所有动态分配。这行不通,因为这些替代方案只有在特定情况下才有意义。但现在你有了很多选择。从堆栈到通用分配器,以及所有介于两者之间的东西,比如静态缓冲区、流式 `Writer` 和专用分配器。
|
0 | repos | repos/learning-zig/book.toml | [book]
title = "学习 Zig"
description = "Learning Zig 中文翻译"
authors = ["ZigCC"]
language = "zh-CN"
multilingual = false
src = "."
[output.html]
git-repository-url = "https://github.com/zigcc/learning-zig"
edit-url-template = "https://github.com/zigcc/learning-zig/edit/main/{path}"
additional-js = ["static/zig-hl.js"]
additional-css = ["static/last-changed.css"]
site-url = "/learning-zig/"
[output.html.print]
enable = true # include support for printable output
page-break = true # insert page-break after each chapter
[output.html.search]
enable = true
[preprocessor.last-changed]
command = "mdbook-last-changed"
renderer = ["html"] |
0 | repos | repos/learning-zig/01-installing-zig.md | > 原文地址:<https://www.openmymind.net/learning_zig/#install>
# 安装 Zig
Zig 官网的[下载页面](https://ziglang.org/download/)中包含常见平台的预编译二进制文件。在这个页面上,你可以找到最新开发版本和主要版本的二进制文件。本指南所跟踪的最新版本可在页面顶部找到。
对于我的电脑,我会下载 `zig-macos-aarch64-0.12.0-dev.161+6a5463951.tar.xz`。你使用的可能是不同的平台或更新的版本。展开压缩包,这里面会有一个名为 `zig` 的二进制文件,你可以按照自己喜欢的方式,为其设置别名(alias)或添加到你的路径(PATH)中。
现在,你可以运行 `zig zen` 和 `zig version` 来测试是否安装正确。
> 译者注:建议读者使用版本管理工具来安装 Zig,具体可参考:[《Zig 多版本管理》](https://zigcc.github.io/post/2023/10/14/zig-version-manager/)。
|
0 | repos/learning-zig | repos/learning-zig/static/index.html | <html>
<head>
<meta http-equiv="refresh" content="0; url=https://ziglang.cc/learn/" />
</head>
<body>
<p><a href="https://ziglang.cc/learn/">Redirect to https://ziglang.cc/learn/</a></p>
</body>
</html>
|
0 | repos/learning-zig | repos/learning-zig/static/zig-hl.js | const zigLanguageSupport = (hljs) => {
return {
name: "Zig",
aliases: ["zig"],
keywords: {
keyword:
"unreachable continue errdefer suspend return resume cancel break catch async await defer asm try " +
"threadlocal linksection allowzero stdcallcc volatile comptime noalias nakedcc inline export packed extern align const pub var " +
"struct union error enum while for switch orelse else and if or usingnamespace test fn",
type: "comptime_float comptime_int c_longdouble c_ulonglong c_longlong c_voidi8 noreturn c_ushort anyerror promise c_short c_ulong c_uint c_long isize c_int usize void f128 i128 type bool u128 u16 f64 f32 u64 i16 f16 i32 u32 i64 u8 i0 u0",
literal: "undefined false true null",
},
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
hljs.C_NUMBER_MODE,
{
className: "string",
begin: "@[a-zA-Z_]\\w*",
},
{
className: "meta",
begin: /@[a-zA-Z_]\w*/,
},
{
className: "symbol",
begin: /'[a-zA-Z_][a-zA-Z0-9_]*'/,
},
{
className: "literal",
begin: /\\[xuU][a-fA-F0-9]+/,
},
{
className: "number",
begin: /\b0x[0-9a-fA-F]+/,
},
{
className: "number",
begin: /\b0b[01]+/,
},
{
className: "number",
begin: /\b0o[0-7]+/,
},
{
className: "number",
begin: /\b[0-9]+\b/,
},
hljs.REGEXP_MODE,
{
// multiline string literals
className: "string",
begin: /\\/,
end: /$/,
relevance: 0,
contains: [
{
begin: /\\/,
end: /$/,
relevance: 0,
},
],
},
],
};
};
document.addEventListener("DOMContentLoaded", (event) => {
if (typeof hljs !== "undefined") {
console.log("register zig support");
hljs.registerLanguage("zig", zigLanguageSupport);
hljs.initHighlighting();
}
});
|
0 | repos/learning-zig | repos/learning-zig/static/last-changed.css | footer {
font-size: 0.8em;
text-align: center;
border-top: 1px solid black;
padding: 5px 0;
}
|
0 | repos | repos/zig_vulkan/README.md |

# Zig vulkan renderer
A toy renderer written in zig using vulkan and glfw
# Requirements
Zig build toolchain does most of the heavy lifting. The only systems
requirement is the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/).
Make sure you download Vulkan 1.2 or up
**This project also uses latest zig version**
# Run the project
Do the following steps
```bash
$ git clone --recurse-submodules -j4 <repo>
$ cd <folder>
$ zig build run
```
Or
```bash
$ git clone <repo>
$ cd <folder>
$ git submodule update --init --recursive
$ zig build run
```
# Run tests
Currently the code base is not really well tested, but you can run the few tests by doin ``zig build test``
# Sources:
* Vulkan fundementals:
* https://vkguide.dev/
* https://vulkan-tutorial.com
* Setup Zig for Gamedev: https://dev.to/fabioarnold/setup-zig-for-gamedev-2bmf
* Using vulkan-zig: https://github.com/Snektron/vulkan-zig/blob/master/examples
|
0 | repos | repos/zig_vulkan/build.zig | const std = @import("std");
const fs = std.fs;
const os = std.os;
const LibExeObjStep = std.build.LibExeObjStep;
const Builder = std.build.Builder;
const Step = std.build.Step;
const ArrayList = std.ArrayList;
const vkgen = @import("deps/vulkan-zig/generator/index.zig");
const glfw = @import("deps/mach-glfw/build.zig");
const stbi = @import("deps/stb_image/build.zig");
const ztracy = @import("deps/ztracy/build.zig");
const zgui = @import("deps/zgui/build.zig");
// TODO: this file could use a refactor pass or atleast some comments to make it more readable
const MoveDirError = error{NotFound};
/// Holds the path to a file where parent directory and file name is separated
const SplitPath = struct {
dir: []const u8,
file_name: []const u8,
};
inline fn pathAndFile(file_path: []const u8) MoveDirError!SplitPath {
var i = file_path.len - 1;
while (i > 0) : (i -= 1) {
if (file_path[i] == '/') {
return SplitPath{
.dir = file_path[0..i],
.file_name = file_path[i + 1 .. file_path.len],
};
}
}
return MoveDirError.NotFound;
}
const ShaderMoveStep = struct {
step: Step,
builder: *Builder,
abs_from: [20]?[]const u8 = [_]?[]const u8{null} ** 20,
abs_len: usize = 0,
fn init(b: *Builder, shader_step: *vkgen.ShaderCompileStep) !*ShaderMoveStep {
var step = Step.init(.{ .id = .custom, .name = "shader_resource", .owner = b, .makeFn = make });
step.dependOn(&shader_step.step);
const self = try b.allocator.create(ShaderMoveStep);
self.* = .{
.step = step,
.builder = b,
};
return self;
}
fn add_abs_resource(self: *ShaderMoveStep, new_abs: []const u8) !void {
if (self.abs_len >= self.abs_from.len) {
return error.MaxResources;
}
defer self.abs_len += 1;
self.abs_from[self.abs_len] = new_abs;
}
fn make(step: *Step, prog_node: *std.Progress.Node) anyerror!void {
const self: *ShaderMoveStep = @fieldParentPtr(ShaderMoveStep, "step", step);
try createFolder(self.builder.install_prefix);
for (self.abs_from) |from| {
if (from) |some| {
try self.moveShaderToOut(some);
} else {
break;
}
}
prog_node.completeOne();
}
/// moves a given resource to a given path relative to the output binary
fn moveShaderToOut(self: *ShaderMoveStep, abs_from: []const u8) anyerror!void {
const old_path = try pathAndFile(abs_from);
var old_dir = try fs.openDirAbsolute(old_path.dir, .{});
defer old_dir.close();
var new_dir = try fs.openDirAbsolute(self.builder.install_prefix, .{});
defer new_dir.close();
try fs.rename(old_dir, old_path.file_name, new_dir, old_path.file_name);
}
};
const AssetMoveStep = struct {
step: Step,
builder: *Builder,
fn init(b: *Builder) !*AssetMoveStep {
var step = Step.init(.{ .id = .custom, .name = "assets", .owner = b, .makeFn = make });
const self = try b.allocator.create(AssetMoveStep);
self.* = .{
.step = step,
.builder = b,
};
return self;
}
fn make(step: *Step, prog_node: *std.Progress.Node) anyerror!void {
const self: *AssetMoveStep = @fieldParentPtr(AssetMoveStep, "step", step);
try createFolder(self.builder.install_prefix);
const dst_asset_path = blk: {
const dst_asset_path_arr = [_][]const u8{ self.builder.install_prefix, "assets" };
break :blk try std.fs.path.join(self.builder.allocator, dst_asset_path_arr[0..]);
};
try createFolder(dst_asset_path);
var dst_assets_dir = try fs.openDirAbsolute(dst_asset_path, .{});
defer dst_assets_dir.close();
var src_assets_dir = try fs.cwd().openIterableDir("assets/", .{
.access_sub_paths = true,
});
defer src_assets_dir.close();
copyDir(self.builder, src_assets_dir, dst_assets_dir);
prog_node.completeOne();
}
};
// TODO: HACK: catch unreachable to avoid error hell from recursion
fn copyDir(b: *Builder, src_dir: fs.IterableDir, dst_parent_dir: fs.Dir) void {
const Kind = fs.File.Kind;
var walker = src_dir.walk(b.allocator) catch unreachable;
defer walker.deinit();
while (walker.next() catch unreachable) |asset| {
switch (asset.kind) {
Kind.Directory => {
var src_child_dir = src_dir.dir.openIterableDir(asset.path, .{
.access_sub_paths = true,
}) catch unreachable;
defer src_child_dir.close();
dst_parent_dir.makeDir(asset.path) catch |err| switch (err) {
std.os.MakeDirError.PathAlreadyExists => {}, // ok
else => unreachable,
};
var dst_child_dir = dst_parent_dir.openDir(asset.path, .{}) catch unreachable;
defer dst_child_dir.close();
},
Kind.File => {
if (std.mem.eql(u8, asset.path[0..7], "shaders")) {
continue; // skip shader folder which will be compiled by glslc before being moved
}
src_dir.dir.copyFile(asset.path, dst_parent_dir, asset.path, .{}) catch unreachable;
},
else => {}, // don't care
}
}
}
inline fn createFolder(path: []const u8) std.os.MakeDirError!void {
if (fs.makeDirAbsolute(path)) |_| {
// ok
} else |err| switch (err) {
std.os.MakeDirError.PathAlreadyExists => {
// ok
},
else => |e| return e,
}
}
pub fn build(b: *Builder) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardOptimizeOption(.{});
var exe = b.addExecutable(.{
.name = "zig_vulkan",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = mode,
});
exe.linkLibC();
// compile and link with glfw statically
const glfw_module = glfw.module(b);
exe.addModule("glfw", glfw_module);
glfw.link(b, exe, .{}) catch @panic("failed to link glfw");
exe.addModule("zalgebra", b.createModule(.{
.source_file = .{ .path = "deps/zalgebra/src/main.zig" },
}));
stbi.linkStep(b, exe);
const vk_xml_path = b.option([]const u8, "vulkan-registry", "Override to the Vulkan registry") orelse thisDir() ++ "/deps/vk.xml";
const gen = vkgen.VkGenerateStep.create(b, vk_xml_path);
// Add the generated file as package to the final executable
exe.addModule("vulkan", gen.getModule());
// TODO: -O (optimize), -I (includes)
// !always have -g as last entry! (see glslc_len definition)
const include_shader_debug = b.option(bool, "shader-debug-info", "include shader debug info, default is false") orelse false;
const glslc_flags = [_][]const u8{ "glslc", "--target-env=vulkan1.2", "-g" };
const glslc_len = if (include_shader_debug) glslc_flags.len else glslc_flags.len - 1;
const shader_comp = vkgen.ShaderCompileStep.create(
b,
glslc_flags[0..glslc_len],
"-o",
);
const shader_move_step = ShaderMoveStep.init(b, shader_comp) catch unreachable;
{
shader_comp.add("image_vert_spv", "assets/shaders/image.vert", .{});
shader_comp.add("image_frag_spv", "assets/shaders/image.frag", .{});
shader_comp.add("ui_vert_spv", "assets/shaders/ui.vert", .{});
shader_comp.add("ui_frag_spv", "assets/shaders/ui.frag", .{});
shader_comp.add("brick_raytracer_comp_spv", "assets/shaders/brick_raytracer.comp", .{});
shader_comp.add("height_map_gen_comp_spv", "assets/shaders/height_map_gen.comp", .{});
}
exe.step.dependOn(&shader_move_step.step);
shader_move_step.step.dependOn(&shader_comp.step);
exe.addModule("shaders", shader_comp.getModule());
// link tracy if in debug mode and nothing else is specified
const enable_tracy = b.option(bool, "tracy", "Enable tracy bindings and communication, default is false") orelse false;
var ztracy_package = ztracy.package(b, target, mode, .{ .options = .{ .enable_ztracy = enable_tracy } });
ztracy_package.link(exe);
exe.addModule("ztracy", ztracy_package.ztracy);
// link zgui
const zgui_pkg = zgui.package(b, target, mode, .{
.options = .{ .backend = .no_backend },
});
zgui_pkg.link(exe);
exe.addModule("zgui", zgui_pkg.zgui);
const asset_move = AssetMoveStep.init(b) catch unreachable;
exe.step.dependOn(&asset_move.step);
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
const tests = b.addTest(.{
.root_source_file = .{ .path = "src/test.zig" },
.optimize = mode,
});
tests.addModule("glfw", glfw_module);
glfw.link(b, tests, .{}) catch @panic("failed to link glfw");
tests.addModule("zalgebra", b.createModule(.{
.source_file = .{ .path = "deps/zalgebra/src/main.zig" },
}));
const test_step = b.step("test", "Run tests");
test_step.dependOn(&tests.step);
}
inline fn thisDir() []const u8 {
return comptime std.fs.path.dirname(@src().file) orelse ".";
}
|
0 | repos/zig_vulkan/assets | repos/zig_vulkan/assets/shaders/ui.frag | #version 450
layout (binding = 0) uniform sampler2D fontSampler;
layout (location = 0) in vec2 inUV;
layout (location = 1) in vec4 inColor;
layout (location = 0) out vec4 outColor;
void main()
{
outColor = inColor * texture(fontSampler, inUV);
}
|
0 | repos/zig_vulkan/assets | repos/zig_vulkan/assets/shaders/ui.vert | #version 450
layout (location = 0) in vec2 inPos;
layout (location = 1) in vec2 inUV;
layout (location = 2) in vec4 inColor;
layout (push_constant) uniform PushConstants {
vec2 scale;
vec2 translate;
} pushConstant;
layout (location = 0) out vec2 outUV;
layout (location = 1) out vec4 outColor;
out gl_PerVertex
{
vec4 gl_Position;
};
void main()
{
outUV = inUV;
outColor = inColor;
gl_Position = vec4(inPos * pushConstant.scale + pushConstant.translate, 0.0, 1.0);
}
|
0 | repos/zig_vulkan/assets | repos/zig_vulkan/assets/shaders/image.frag | #version 450
layout (binding = 0) uniform sampler2D imageSampler;
layout (location = 0) in vec2 inUV;
layout (location = 0) out vec4 outColor;
// void main()
// {
// outColor = texture(imageSampler, inUV);
// }
/*
Denoiser source: https://www.shadertoy.com/view/7d2SDD
*/
layout (push_constant) uniform PushConstant {
int samples;
float distributionBias;
float pixelMultiplier;
float inversHueTolerance;
} pushConstant;
#define GOLDEN_ANGLE 2.3999632 //3PI-sqrt(5)PI
#define pow(a,b) pow(max(a,0.),b) // @morimea
mat2 sample2D = mat2(cos(GOLDEN_ANGLE), sin(GOLDEN_ANGLE), -sin(GOLDEN_ANGLE), cos(GOLDEN_ANGLE));
vec3 sirBirdDenoise() {
ivec2 imageResolution = textureSize(imageSampler, 0);
vec3 denoisedColor = vec3(0.);
const float sampleRadius = sqrt(float(pushConstant.samples));
const float sampleTrueRadius = 0.5/(sampleRadius*sampleRadius);
vec2 samplePixel = vec2(1.0/imageResolution.x,1.0/imageResolution.y);
vec3 sampleCenter = texture(imageSampler, inUV).rgb;
vec3 sampleCenterNorm = normalize(sampleCenter);
float sampleCenterSat = length(sampleCenter);
float influenceSum = 0.0;
float brightnessSum = 0.0;
vec2 pixelRotated = vec2(0.,1.);
for (float x = 0.0; x <= float(pushConstant.samples); x++) {
pixelRotated *= sample2D;
vec2 pixelOffset = pushConstant.pixelMultiplier * pixelRotated * sqrt(x) * 0.5;
float pixelInfluence = 1.0 - sampleTrueRadius * pow(dot(pixelOffset, pixelOffset), pushConstant.distributionBias);
pixelOffset *= samplePixel;
vec3 thisDenoisedColor = texture(imageSampler, inUV + pixelOffset).rgb;
pixelInfluence *= pixelInfluence*pixelInfluence;
/*
HUE + SATURATION FILTER
*/
pixelInfluence *=
pow(0.5 + 0.5 * dot(sampleCenterNorm,normalize(thisDenoisedColor)), pushConstant.inversHueTolerance)
* pow(1.0 - abs(length(thisDenoisedColor)-length(sampleCenterSat)),8.);
influenceSum += pixelInfluence;
denoisedColor += thisDenoisedColor*pixelInfluence;
}
return denoisedColor/influenceSum;
}
void main()
{
vec3 col = sirBirdDenoise();
outColor = vec4(col, 1.0);
}
|
0 | repos/zig_vulkan/assets | repos/zig_vulkan/assets/shaders/image.vert | #version 450
layout (location = 0) in vec3 inPos;
layout (location = 1) in vec2 inUV;
layout (location = 0) out vec2 outUV;
out gl_PerVertex
{
vec4 gl_Position;
};
void main()
{
outUV = inUV;
gl_Position = vec4(inPos, 1.0);
}
|
0 | repos/zig_vulkan | repos/zig_vulkan/deps/vk.xml | <?xml version="1.0" encoding="UTF-8"?>
<registry>
<comment>
Copyright 2015-2021 The Khronos Group Inc.
SPDX-License-Identifier: Apache-2.0 OR MIT
</comment>
<comment>
This file, vk.xml, is the Vulkan API Registry. It is a critically important
and normative part of the Vulkan Specification, including a canonical
machine-readable definition of the API, parameter and member validation
language incorporated into the Specification and reference pages, and other
material which is registered by Khronos, such as tags used by extension and
layer authors. The authoritative public version of vk.xml is maintained in
the default branch (currently named main) of the Khronos Vulkan GitHub
project. The authoritative private version is maintained in the default
branch of the member gitlab server.
</comment>
<platforms comment="Vulkan platform names, reserved for use with platform- and window system-specific extensions">
<platform name="xlib" protect="VK_USE_PLATFORM_XLIB_KHR" comment="X Window System, Xlib client library"/>
<platform name="xlib_xrandr" protect="VK_USE_PLATFORM_XLIB_XRANDR_EXT" comment="X Window System, Xlib client library, XRandR extension"/>
<platform name="xcb" protect="VK_USE_PLATFORM_XCB_KHR" comment="X Window System, Xcb client library"/>
<platform name="wayland" protect="VK_USE_PLATFORM_WAYLAND_KHR" comment="Wayland display server protocol"/>
<platform name="directfb" protect="VK_USE_PLATFORM_DIRECTFB_EXT" comment="DirectFB library"/>
<platform name="android" protect="VK_USE_PLATFORM_ANDROID_KHR" comment="Android OS"/>
<platform name="win32" protect="VK_USE_PLATFORM_WIN32_KHR" comment="Microsoft Win32 API (also refers to Win64 apps)"/>
<platform name="vi" protect="VK_USE_PLATFORM_VI_NN" comment="Nintendo Vi"/>
<platform name="ios" protect="VK_USE_PLATFORM_IOS_MVK" comment="Apple IOS"/>
<platform name="macos" protect="VK_USE_PLATFORM_MACOS_MVK" comment="Apple MacOS"/>
<platform name="metal" protect="VK_USE_PLATFORM_METAL_EXT" comment="Metal on CoreAnimation on Apple platforms"/>
<platform name="fuchsia" protect="VK_USE_PLATFORM_FUCHSIA" comment="Fuchsia"/>
<platform name="ggp" protect="VK_USE_PLATFORM_GGP" comment="Google Games Platform"/>
<platform name="provisional" protect="VK_ENABLE_BETA_EXTENSIONS" comment="Enable declarations for beta/provisional extensions"/>
<platform name="screen" protect="VK_USE_PLATFORM_SCREEN_QNX" comment="QNX Screen Graphics Subsystem"/>
</platforms>
<tags comment="Vulkan vendor/author tags for extensions and layers">
<tag name="IMG" author="Imagination Technologies" contact="Michael Worcester @michaelworcester"/>
<tag name="AMD" author="Advanced Micro Devices, Inc." contact="Daniel Rakos @drakos-amd"/>
<tag name="AMDX" author="Advanced Micro Devices, Inc." contact="Daniel Rakos @drakos-amd"/>
<tag name="ARM" author="ARM Limited" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm"/>
<tag name="FSL" author="Freescale Semiconductor, Inc." contact="Norbert Nopper @FslNopper"/>
<tag name="BRCM" author="Broadcom Corporation" contact="Graeme Leese @gnl21"/>
<tag name="NXP" author="NXP Semiconductors N.V." contact="Norbert Nopper @FslNopper"/>
<tag name="NV" author="NVIDIA Corporation" contact="Daniel Koch @dgkoch"/>
<tag name="NVX" author="NVIDIA Corporation" contact="Daniel Koch @dgkoch"/>
<tag name="VIV" author="Vivante Corporation" contact="Yanjun Zhang gitlab:@yanjunzhang"/>
<tag name="VSI" author="VeriSilicon Holdings Co., Ltd." contact="Yanjun Zhang gitlab:@yanjunzhang"/>
<tag name="KDAB" author="KDAB" contact="Sean Harmer @seanharmer"/>
<tag name="ANDROID" author="Google LLC" contact="Jesse Hall @critsec"/>
<tag name="CHROMIUM" author="Google LLC" contact="Jesse Hall @critsec"/>
<tag name="FUCHSIA" author="Google LLC" contact="Craig Stout @cdotstout, Jesse Hall @critsec, John Rosasco @rosasco"/>
<tag name="GGP" author="Google, LLC" contact="Jean-Francois Roy @jfroy, Hai Nguyen @chaoticbob, Jesse Hall @critsec"/>
<tag name="GOOGLE" author="Google LLC" contact="Jesse Hall @critsec"/>
<tag name="QCOM" author="Qualcomm Technologies, Inc." contact="Jeff Leger @jackohounhd"/>
<tag name="LUNARG" author="LunarG, Inc." contact="Karen Ghavam @karenghavam-lunarg"/>
<tag name="SAMSUNG" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/>
<tag name="SEC" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/>
<tag name="TIZEN" author="Samsung Electronics Co., Ltd." contact="Alon Or-bach @alonorbach"/>
<tag name="RENDERDOC" author="RenderDoc (renderdoc.org)" contact="Baldur Karlsson @baldurk"/>
<tag name="NN" author="Nintendo Co., Ltd." contact="Yasuhiro Yoshioka gitlab:@yoshioka_yasuhiro"/>
<tag name="MVK" author="The Brenwill Workshop Ltd." contact="Bill Hollings @billhollings"/>
<tag name="KHR" author="Khronos" contact="Tom Olson @tomolson"/>
<tag name="KHX" author="Khronos" contact="Tom Olson @tomolson"/>
<tag name="EXT" author="Multivendor" contact="Jon Leech @oddhack"/>
<tag name="MESA" author="Mesa open source project" contact="Chad Versace @chadversary, Daniel Stone @fooishbar, David Airlie @airlied, Jason Ekstrand @jekstrand"/>
<tag name="INTEL" author="Intel Corporation" contact="Slawek Grajewski @sgrajewski"/>
<tag name="HUAWEI" author="Huawei Technologies Co. Ltd." contact="Hueilong Wang @wyvernathuawei"/>
<tag name="VALVE" author="Valve Corporation" contact="Pierre-Loup Griffais @plagman, Joshua Ashton @Joshua-Ashton, Hans-Kristian Arntzen @HansKristian-Work"/>
<tag name="QNX" author="BlackBerry Limited" contact="Mike Gorchak @mgorchak-blackberry"/>
</tags>
<types comment="Vulkan type definitions">
<type name="vk_platform" category="include">#include "vk_platform.h"</type>
<comment>WSI extensions</comment>
<type category="include" name="X11/Xlib.h"/>
<type category="include" name="X11/extensions/Xrandr.h"/>
<type category="include" name="wayland-client.h"/>
<type category="include" name="windows.h"/>
<type category="include" name="xcb/xcb.h"/>
<type category="include" name="directfb.h"/>
<type category="include" name="zircon/types.h"/>
<type category="include" name="ggp_c/vulkan_types.h"/>
<type category="include" name="screen/screen.h"/>
<comment>
In the current header structure, each platform's interfaces
are confined to a platform-specific header (vulkan_xlib.h,
vulkan_win32.h, etc.). These headers are not self-contained,
and should not include native headers (X11/Xlib.h,
windows.h, etc.). Code should either include vulkan.h after
defining the appropriate VK_USE_PLATFORM_platform
macros, or include the required native headers prior to
explicitly including the corresponding platform header.
To accomplish this, the dependencies of native types require
native headers, but the XML defines the content for those
native headers as empty. The actual native header includes
can be restored by modifying the native header tags above
to #include the header file in the 'name' attribute.
</comment>
<type requires="X11/Xlib.h" name="Display"/>
<type requires="X11/Xlib.h" name="VisualID"/>
<type requires="X11/Xlib.h" name="Window"/>
<type requires="X11/extensions/Xrandr.h" name="RROutput"/>
<type requires="wayland-client.h" name="wl_display"/>
<type requires="wayland-client.h" name="wl_surface"/>
<type requires="windows.h" name="HINSTANCE"/>
<type requires="windows.h" name="HWND"/>
<type requires="windows.h" name="HMONITOR"/>
<type requires="windows.h" name="HANDLE"/>
<type requires="windows.h" name="SECURITY_ATTRIBUTES"/>
<type requires="windows.h" name="DWORD"/>
<type requires="windows.h" name="LPCWSTR"/>
<type requires="xcb/xcb.h" name="xcb_connection_t"/>
<type requires="xcb/xcb.h" name="xcb_visualid_t"/>
<type requires="xcb/xcb.h" name="xcb_window_t"/>
<type requires="directfb.h" name="IDirectFB"/>
<type requires="directfb.h" name="IDirectFBSurface"/>
<type requires="zircon/types.h" name="zx_handle_t"/>
<type requires="ggp_c/vulkan_types.h" name="GgpStreamDescriptor"/>
<type requires="ggp_c/vulkan_types.h" name="GgpFrameToken"/>
<type requires="screen/screen.h" name="_screen_context"/>
<type requires="screen/screen.h" name="_screen_window"/>
<type category="define">// DEPRECATED: This define is deprecated. VK_MAKE_API_VERSION should be used instead.
#define <name>VK_MAKE_VERSION</name>(major, minor, patch) \
((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))</type>
<type category="define">// DEPRECATED: This define is deprecated. VK_API_VERSION_MAJOR should be used instead.
#define <name>VK_VERSION_MAJOR</name>(version) ((uint32_t)(version) >> 22)</type>
<type category="define">// DEPRECATED: This define is deprecated. VK_API_VERSION_MINOR should be used instead.
#define <name>VK_VERSION_MINOR</name>(version) (((uint32_t)(version) >> 12) & 0x3FFU)</type>
<type category="define">// DEPRECATED: This define is deprecated. VK_API_VERSION_PATCH should be used instead.
#define <name>VK_VERSION_PATCH</name>(version) ((uint32_t)(version) & 0xFFFU)</type>
<type category="define">#define <name>VK_MAKE_API_VERSION</name>(variant, major, minor, patch) \
((((uint32_t)(variant)) << 29) | (((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))</type>
<type category="define">#define <name>VK_API_VERSION_VARIANT</name>(version) ((uint32_t)(version) >> 29)</type>
<type category="define">#define <name>VK_API_VERSION_MAJOR</name>(version) (((uint32_t)(version) >> 22) & 0x7FU)</type>
<type category="define">#define <name>VK_API_VERSION_MINOR</name>(version) (((uint32_t)(version) >> 12) & 0x3FFU)</type>
<type category="define">#define <name>VK_API_VERSION_PATCH</name>(version) ((uint32_t)(version) & 0xFFFU)</type>
<type category="define">// DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead.
//#define <name>VK_API_VERSION</name> <type>VK_MAKE_VERSION</type>(1, 0, 0) // Patch version should always be set to 0</type>
<type category="define" requires="VK_MAKE_API_VERSION">// Vulkan 1.0 version number
#define <name>VK_API_VERSION_1_0</name> <type>VK_MAKE_API_VERSION</type>(0, 1, 0, 0)// Patch version should always be set to 0</type>
<type category="define" requires="VK_MAKE_API_VERSION">// Vulkan 1.1 version number
#define <name>VK_API_VERSION_1_1</name> <type>VK_MAKE_API_VERSION</type>(0, 1, 1, 0)// Patch version should always be set to 0</type>
<type category="define" requires="VK_MAKE_API_VERSION">// Vulkan 1.2 version number
#define <name>VK_API_VERSION_1_2</name> <type>VK_MAKE_API_VERSION</type>(0, 1, 2, 0)// Patch version should always be set to 0</type>
<type category="define">// Version of this file
#define <name>VK_HEADER_VERSION</name> 176</type>
<type category="define" requires="VK_HEADER_VERSION">// Complete version of this file
#define <name>VK_HEADER_VERSION_COMPLETE</name> <type>VK_MAKE_API_VERSION</type>(0, 1, 2, VK_HEADER_VERSION)</type>
<type category="define">
#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type>
<type category="define" name="VK_USE_64_BIT_PTR_DEFINES">
#ifndef VK_USE_64_BIT_PTR_DEFINES
#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define VK_USE_64_BIT_PTR_DEFINES 1
#else
#define VK_USE_64_BIT_PTR_DEFINES 0
#endif
#endif</type>
<type category="define" requires="VK_USE_64_BIT_PTR_DEFINES" name="VK_NULL_HANDLE">
#ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE
#if (VK_USE_64_BIT_PTR_DEFINES==1)
#if __cplusplus >= 201103L || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201103L))
#define VK_NULL_HANDLE nullptr
#else
#define VK_NULL_HANDLE ((void*)0)
#endif
#else
#define VK_NULL_HANDLE 0ULL
#endif
#endif
#ifndef VK_NULL_HANDLE
#define VK_NULL_HANDLE 0
#endif</type>
<type category="define" requires="VK_NULL_HANDLE" name="VK_DEFINE_NON_DISPATCHABLE_HANDLE">
#ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE
#if (VK_USE_64_BIT_PTR_DEFINES==1)
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
#else
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
#endif
#endif</type>
<type category="basetype">struct <name>ANativeWindow</name>;</type>
<type category="basetype">struct <name>AHardwareBuffer</name>;</type>
<type category="basetype">
#ifdef __OBJC__
@class CAMetalLayer;
#else
typedef void <name>CAMetalLayer</name>;
#endif</type>
<type category="basetype">typedef <type>uint32_t</type> <name>VkSampleMask</name>;</type>
<type category="basetype">typedef <type>uint32_t</type> <name>VkBool32</name>;</type>
<type category="basetype">typedef <type>uint32_t</type> <name>VkFlags</name>;</type>
<type category="basetype">typedef <type>uint64_t</type> <name>VkFlags64</name>;</type>
<type category="basetype">typedef <type>uint64_t</type> <name>VkDeviceSize</name>;</type>
<type category="basetype">typedef <type>uint64_t</type> <name>VkDeviceAddress</name>;</type>
<comment>Basic C types, pulled in via vk_platform.h</comment>
<type requires="vk_platform" name="void"/>
<type requires="vk_platform" name="char"/>
<type requires="vk_platform" name="float"/>
<type requires="vk_platform" name="double"/>
<type requires="vk_platform" name="int8_t"/>
<type requires="vk_platform" name="uint8_t"/>
<type requires="vk_platform" name="int16_t"/>
<type requires="vk_platform" name="uint16_t"/>
<type requires="vk_platform" name="uint32_t"/>
<type requires="vk_platform" name="uint64_t"/>
<type requires="vk_platform" name="int32_t"/>
<type requires="vk_platform" name="int64_t"/>
<type requires="vk_platform" name="size_t"/>
<type name="int"/>
<comment>Bitmask types</comment>
<type requires="VkFramebufferCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFramebufferCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkQueryPoolCreateFlags</name>;</type>
<type requires="VkRenderPassCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkRenderPassCreateFlags</name>;</type>
<type requires="VkSamplerCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSamplerCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineLayoutCreateFlags</name>;</type>
<type requires="VkPipelineCacheCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCacheCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDepthStencilStateCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDynamicStateCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineColorBlendStateCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineMultisampleStateCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineRasterizationStateCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineViewportStateCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineTessellationStateCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineInputAssemblyStateCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineVertexInputStateCreateFlags</name>;</type>
<type requires="VkPipelineShaderStageCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineShaderStageCreateFlags</name>;</type>
<type requires="VkDescriptorSetLayoutCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorSetLayoutCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkBufferViewCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkInstanceCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceCreateFlags</name>;</type>
<type requires="VkDeviceQueueCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceQueueCreateFlags</name>;</type>
<type requires="VkQueueFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueueFlags</name>;</type>
<type requires="VkMemoryPropertyFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryPropertyFlags</name>;</type>
<type requires="VkMemoryHeapFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryHeapFlags</name>;</type>
<type requires="VkAccessFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkAccessFlags</name>;</type>
<type requires="VkBufferUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkBufferUsageFlags</name>;</type>
<type requires="VkBufferCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkBufferCreateFlags</name>;</type>
<type requires="VkShaderStageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkShaderStageFlags</name>;</type>
<type requires="VkImageUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageUsageFlags</name>;</type>
<type requires="VkImageCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageCreateFlags</name>;</type>
<type requires="VkImageViewCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageViewCreateFlags</name>;</type>
<type requires="VkPipelineCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCreateFlags</name>;</type>
<type requires="VkColorComponentFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkColorComponentFlags</name>;</type>
<type requires="VkFenceCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFenceCreateFlags</name>;</type>
<comment>When VkSemaphoreCreateFlagBits is first extended, need to add a requires= attribute for it to VkSemaphoreCreateFlags</comment>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkSemaphoreCreateFlags</name>;</type>
<type requires="VkFormatFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFormatFeatureFlags</name>;</type>
<type requires="VkQueryControlFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryControlFlags</name>;</type>
<type requires="VkQueryResultFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryResultFlags</name>;</type>
<type requires="VkShaderModuleCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkShaderModuleCreateFlags</name>;</type>
<type requires="VkEventCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkEventCreateFlags</name>;</type>
<type requires="VkCommandPoolCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolCreateFlags</name>;</type>
<type requires="VkCommandPoolResetFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolResetFlags</name>;</type>
<type requires="VkCommandBufferResetFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandBufferResetFlags</name>;</type>
<type requires="VkCommandBufferUsageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCommandBufferUsageFlags</name>;</type>
<type requires="VkQueryPipelineStatisticFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkQueryPipelineStatisticFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryMapFlags</name>;</type>
<type requires="VkImageAspectFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkImageAspectFlags</name>;</type>
<type requires="VkSparseMemoryBindFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSparseMemoryBindFlags</name>;</type>
<type requires="VkSparseImageFormatFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSparseImageFormatFlags</name>;</type>
<type requires="VkSubpassDescriptionFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSubpassDescriptionFlags</name>;</type>
<type requires="VkPipelineStageFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineStageFlags</name>;</type>
<type requires="VkSampleCountFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSampleCountFlags</name>;</type>
<type requires="VkAttachmentDescriptionFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkAttachmentDescriptionFlags</name>;</type>
<type requires="VkStencilFaceFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkStencilFaceFlags</name>;</type>
<type requires="VkCullModeFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkCullModeFlags</name>;</type>
<type requires="VkDescriptorPoolCreateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorPoolCreateFlags</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorPoolResetFlags</name>;</type>
<type requires="VkDependencyFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDependencyFlags</name>;</type>
<type requires="VkSubgroupFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSubgroupFeatureFlags</name>;</type>
<type requires="VkIndirectCommandsLayoutUsageFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkIndirectCommandsLayoutUsageFlagsNV</name>;</type>
<type requires="VkIndirectStateFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkIndirectStateFlagsNV</name>;</type>
<type requires="VkGeometryFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkGeometryFlagsKHR</name>;</type>
<type category="bitmask" name="VkGeometryFlagsNV" alias="VkGeometryFlagsKHR"/>
<type requires="VkGeometryInstanceFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkGeometryInstanceFlagsKHR</name>;</type>
<type category="bitmask" name="VkGeometryInstanceFlagsNV" alias="VkGeometryInstanceFlagsKHR"/>
<type requires="VkBuildAccelerationStructureFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkBuildAccelerationStructureFlagsKHR</name>;</type>
<type category="bitmask" name="VkBuildAccelerationStructureFlagsNV" alias="VkBuildAccelerationStructureFlagsKHR"/>
<type requires="VkPrivateDataSlotCreateFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkPrivateDataSlotCreateFlagsEXT</name>;</type>
<type requires="VkAccelerationStructureCreateFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkAccelerationStructureCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorUpdateTemplateCreateFlags</name>;</type>
<type category="bitmask" name="VkDescriptorUpdateTemplateCreateFlagsKHR" alias="VkDescriptorUpdateTemplateCreateFlags"/>
<type requires="VkPipelineCreationFeedbackFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCreationFeedbackFlagsEXT</name>;</type>
<type requires="VkPerformanceCounterDescriptionFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkPerformanceCounterDescriptionFlagsKHR</name>;</type>
<type requires="VkAcquireProfilingLockFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkAcquireProfilingLockFlagsKHR</name>;</type>
<type requires="VkSemaphoreWaitFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSemaphoreWaitFlags</name>;</type>
<type category="bitmask" name="VkSemaphoreWaitFlagsKHR" alias="VkSemaphoreWaitFlags"/>
<type requires="VkPipelineCompilerControlFlagBitsAMD" category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCompilerControlFlagsAMD</name>;</type>
<type requires="VkShaderCorePropertiesFlagBitsAMD" category="bitmask">typedef <type>VkFlags</type> <name>VkShaderCorePropertiesFlagsAMD</name>;</type>
<type requires="VkDeviceDiagnosticsConfigFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceDiagnosticsConfigFlagsNV</name>;</type>
<type bitvalues="VkAccessFlagBits2KHR" category="bitmask">typedef <type>VkFlags64</type> <name>VkAccessFlags2KHR</name>;</type>
<type bitvalues="VkPipelineStageFlagBits2KHR" category="bitmask">typedef <type>VkFlags64</type> <name>VkPipelineStageFlags2KHR</name>;</type>
<comment>WSI extensions</comment>
<type requires="VkCompositeAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkCompositeAlphaFlagsKHR</name>;</type>
<type requires="VkDisplayPlaneAlphaFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkDisplayPlaneAlphaFlagsKHR</name>;</type>
<type requires="VkSurfaceTransformFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkSurfaceTransformFlagsKHR</name>;</type>
<type requires="VkSwapchainCreateFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkSwapchainCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDisplayModeCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDisplaySurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkAndroidSurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkViSurfaceCreateFlagsNN</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkWaylandSurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkWin32SurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkXlibSurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkXcbSurfaceCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDirectFBSurfaceCreateFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkIOSSurfaceCreateFlagsMVK</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMacOSSurfaceCreateFlagsMVK</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkMetalSurfaceCreateFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkImagePipeSurfaceCreateFlagsFUCHSIA</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkStreamDescriptorSurfaceCreateFlagsGGP</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkHeadlessSurfaceCreateFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkScreenSurfaceCreateFlagsQNX</name>;</type>
<type requires="VkPeerMemoryFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkPeerMemoryFeatureFlags</name>;</type>
<type category="bitmask" name="VkPeerMemoryFeatureFlagsKHR" alias="VkPeerMemoryFeatureFlags"/>
<type requires="VkMemoryAllocateFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkMemoryAllocateFlags</name>;</type>
<type category="bitmask" name="VkMemoryAllocateFlagsKHR" alias="VkMemoryAllocateFlags"/>
<type requires="VkDeviceGroupPresentModeFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceGroupPresentModeFlagsKHR</name>;</type>
<type requires="VkDebugReportFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkDebugReportFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkCommandPoolTrimFlags</name>;</type>
<type category="bitmask" name="VkCommandPoolTrimFlagsKHR" alias="VkCommandPoolTrimFlags"/>
<type requires="VkExternalMemoryHandleTypeFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryHandleTypeFlagsNV</name>;</type>
<type requires="VkExternalMemoryFeatureFlagBitsNV" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryFeatureFlagsNV</name>;</type>
<type requires="VkExternalMemoryHandleTypeFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryHandleTypeFlags</name>;</type>
<type category="bitmask" name="VkExternalMemoryHandleTypeFlagsKHR" alias="VkExternalMemoryHandleTypeFlags"/>
<type requires="VkExternalMemoryFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalMemoryFeatureFlags</name>;</type>
<type category="bitmask" name="VkExternalMemoryFeatureFlagsKHR" alias="VkExternalMemoryFeatureFlags"/>
<type requires="VkExternalSemaphoreHandleTypeFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalSemaphoreHandleTypeFlags</name>;</type>
<type category="bitmask" name="VkExternalSemaphoreHandleTypeFlagsKHR" alias="VkExternalSemaphoreHandleTypeFlags"/>
<type requires="VkExternalSemaphoreFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalSemaphoreFeatureFlags</name>;</type>
<type category="bitmask" name="VkExternalSemaphoreFeatureFlagsKHR" alias="VkExternalSemaphoreFeatureFlags"/>
<type requires="VkSemaphoreImportFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkSemaphoreImportFlags</name>;</type>
<type category="bitmask" name="VkSemaphoreImportFlagsKHR" alias="VkSemaphoreImportFlags"/>
<type requires="VkExternalFenceHandleTypeFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalFenceHandleTypeFlags</name>;</type>
<type category="bitmask" name="VkExternalFenceHandleTypeFlagsKHR" alias="VkExternalFenceHandleTypeFlags"/>
<type requires="VkExternalFenceFeatureFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkExternalFenceFeatureFlags</name>;</type>
<type category="bitmask" name="VkExternalFenceFeatureFlagsKHR" alias="VkExternalFenceFeatureFlags"/>
<type requires="VkFenceImportFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkFenceImportFlags</name>;</type>
<type category="bitmask" name="VkFenceImportFlagsKHR" alias="VkFenceImportFlags"/>
<type requires="VkSurfaceCounterFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkSurfaceCounterFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineViewportSwizzleStateCreateFlagsNV</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineDiscardRectangleStateCreateFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCoverageToColorStateCreateFlagsNV</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCoverageModulationStateCreateFlagsNV</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineCoverageReductionStateCreateFlagsNV</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkValidationCacheCreateFlagsEXT</name>;</type>
<type requires="VkDebugUtilsMessageSeverityFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkDebugUtilsMessageSeverityFlagsEXT</name>;</type>
<type requires="VkDebugUtilsMessageTypeFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkDebugUtilsMessageTypeFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDebugUtilsMessengerCreateFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDebugUtilsMessengerCallbackDataFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkDeviceMemoryReportFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineRasterizationConservativeStateCreateFlagsEXT</name>;</type>
<type requires="VkDescriptorBindingFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkDescriptorBindingFlags</name>;</type>
<type category="bitmask" name="VkDescriptorBindingFlagsEXT" alias="VkDescriptorBindingFlags"/>
<type requires="VkConditionalRenderingFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkConditionalRenderingFlagsEXT</name>;</type>
<type requires="VkResolveModeFlagBits" category="bitmask">typedef <type>VkFlags</type> <name>VkResolveModeFlags</name>;</type>
<type category="bitmask" name="VkResolveModeFlagsKHR" alias="VkResolveModeFlags"/>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineRasterizationStateStreamCreateFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkPipelineRasterizationDepthClipStateCreateFlagsEXT</name>;</type>
<type requires="VkSwapchainImageUsageFlagBitsANDROID" category="bitmask">typedef <type>VkFlags</type> <name>VkSwapchainImageUsageFlagsANDROID</name>;</type>
<type requires="VkToolPurposeFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkToolPurposeFlagsEXT</name>;</type>
<type requires="VkSubmitFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkSubmitFlagsKHR</name>;</type>
<comment>Video Core extension</comment>
<type requires="VkVideoCodecOperationFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoCodecOperationFlagsKHR</name>;</type>
<type requires="VkVideoCapabilitiesFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoCapabilitiesFlagsKHR</name>;</type>
<type requires="VkVideoSessionCreateFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoSessionCreateFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkVideoBeginCodingFlagsKHR</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkVideoEndCodingFlagsKHR</name>;</type>
<type requires="VkVideoCodingQualityPresetFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoCodingQualityPresetFlagsKHR</name>;</type>
<type requires="VkVideoCodingControlFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoCodingControlFlagsKHR</name>;</type>
<comment>Video Decode Core extension</comment>
<type requires="VkVideoDecodeFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoDecodeFlagsKHR</name>;</type>
<comment>Video Decode H.264 extension</comment>
<type requires="VkVideoDecodeH264FieldLayoutFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoDecodeH264FieldLayoutFlagsEXT</name>;</type>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkVideoDecodeH264CreateFlagsEXT</name>;</type>
<comment>Video Decode H.265 extension</comment>
<type category="bitmask">typedef <type>VkFlags</type> <name>VkVideoDecodeH265CreateFlagsEXT</name>;</type>
<comment>Video Encode Core extension</comment>
<type requires="VkVideoEncodeFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoEncodeFlagsKHR</name>;</type>
<type requires="VkVideoEncodeRateControlFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoEncodeRateControlFlagsKHR</name>;</type>
<type requires="VkVideoEncodeRateControlModeFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoEncodeRateControlModeFlagsKHR</name>;</type>
<type requires="VkVideoChromaSubsamplingFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoChromaSubsamplingFlagsKHR</name>;</type>
<type requires="VkVideoComponentBitDepthFlagBitsKHR" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoComponentBitDepthFlagsKHR</name>;</type>
<comment>Video Encode H.264 extension</comment>
<type requires="VkVideoEncodeH264CapabilitiesFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoEncodeH264CapabilitiesFlagsEXT</name>;</type>
<type requires="VkVideoEncodeH264InputModeFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoEncodeH264InputModeFlagsEXT</name>;</type>
<type requires="VkVideoEncodeH264OutputModeFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoEncodeH264OutputModeFlagsEXT</name>;</type>
<type requires="VkVideoEncodeH264CreateFlagBitsEXT" category="bitmask">typedef <type>VkFlags</type> <name>VkVideoEncodeH264CreateFlagsEXT</name>;</type>
<comment>Types which can be void pointers or class pointers, selected at compile time</comment>
<type category="handle" objtypeenum="VK_OBJECT_TYPE_INSTANCE"><type>VK_DEFINE_HANDLE</type>(<name>VkInstance</name>)</type>
<type category="handle" parent="VkInstance" objtypeenum="VK_OBJECT_TYPE_PHYSICAL_DEVICE"><type>VK_DEFINE_HANDLE</type>(<name>VkPhysicalDevice</name>)</type>
<type category="handle" parent="VkPhysicalDevice" objtypeenum="VK_OBJECT_TYPE_DEVICE"><type>VK_DEFINE_HANDLE</type>(<name>VkDevice</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_QUEUE"><type>VK_DEFINE_HANDLE</type>(<name>VkQueue</name>)</type>
<type category="handle" parent="VkCommandPool" objtypeenum="VK_OBJECT_TYPE_COMMAND_BUFFER"><type>VK_DEFINE_HANDLE</type>(<name>VkCommandBuffer</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_DEVICE_MEMORY"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDeviceMemory</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_COMMAND_POOL"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkCommandPool</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_BUFFER"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkBuffer</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_BUFFER_VIEW"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkBufferView</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_IMAGE"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkImage</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_IMAGE_VIEW"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkImageView</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_SHADER_MODULE"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkShaderModule</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_PIPELINE"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipeline</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_PIPELINE_LAYOUT"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipelineLayout</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_SAMPLER"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSampler</name>)</type>
<type category="handle" parent="VkDescriptorPool" objtypeenum="VK_OBJECT_TYPE_DESCRIPTOR_SET"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorSet</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorSetLayout</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_DESCRIPTOR_POOL"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorPool</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_FENCE"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkFence</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_SEMAPHORE"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSemaphore</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_EVENT"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkEvent</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_QUERY_POOL"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkQueryPool</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_FRAMEBUFFER"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkFramebuffer</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_RENDER_PASS"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkRenderPass</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_PIPELINE_CACHE"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPipelineCache</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkIndirectCommandsLayoutNV</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDescriptorUpdateTemplate</name>)</type>
<type category="handle" name="VkDescriptorUpdateTemplateKHR" alias="VkDescriptorUpdateTemplate"/>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSamplerYcbcrConversion</name>)</type>
<type category="handle" name="VkSamplerYcbcrConversionKHR" alias="VkSamplerYcbcrConversion"/>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_VALIDATION_CACHE_EXT"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkValidationCacheEXT</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkAccelerationStructureKHR</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkAccelerationStructureNV</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPerformanceConfigurationINTEL</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDeferredOperationKHR</name>)</type>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkPrivateDataSlotEXT</name>)</type>
<comment>WSI extensions</comment>
<type category="handle" parent="VkPhysicalDevice" objtypeenum="VK_OBJECT_TYPE_DISPLAY_KHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDisplayKHR</name>)</type>
<type category="handle" parent="VkDisplayKHR" objtypeenum="VK_OBJECT_TYPE_DISPLAY_MODE_KHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDisplayModeKHR</name>)</type>
<type category="handle" parent="VkInstance" objtypeenum="VK_OBJECT_TYPE_SURFACE_KHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSurfaceKHR</name>)</type>
<type category="handle" parent="VkSurfaceKHR" objtypeenum="VK_OBJECT_TYPE_SWAPCHAIN_KHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkSwapchainKHR</name>)</type>
<type category="handle" parent="VkInstance" objtypeenum="VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDebugReportCallbackEXT</name>)</type>
<type category="handle" parent="VkInstance" objtypeenum="VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkDebugUtilsMessengerEXT</name>)</type>
<comment>Video extensions</comment>
<type category="handle" parent="VkDevice" objtypeenum="VK_OBJECT_TYPE_VIDEO_SESSION_KHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkVideoSessionKHR</name>)</type>
<type category="handle" parent="VkVideoSessionKHR" objtypeenum="VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR"><type>VK_DEFINE_NON_DISPATCHABLE_HANDLE</type>(<name>VkVideoSessionParametersKHR</name>)</type>
<comment>Types generated from corresponding enums tags below</comment>
<type name="VkAttachmentLoadOp" category="enum"/>
<type name="VkAttachmentStoreOp" category="enum"/>
<type name="VkBlendFactor" category="enum"/>
<type name="VkBlendOp" category="enum"/>
<type name="VkBorderColor" category="enum"/>
<type name="VkFramebufferCreateFlagBits" category="enum"/>
<type name="VkQueryPoolCreateFlagBits" category="enum"/>
<type name="VkRenderPassCreateFlagBits" category="enum"/>
<type name="VkSamplerCreateFlagBits" category="enum"/>
<type name="VkPipelineCacheHeaderVersion" category="enum"/>
<type name="VkPipelineCacheCreateFlagBits" category="enum"/>
<type name="VkPipelineShaderStageCreateFlagBits" category="enum"/>
<type name="VkDescriptorSetLayoutCreateFlagBits" category="enum"/>
<type name="VkInstanceCreateFlagBits" category="enum"/>
<type name="VkDeviceQueueCreateFlagBits" category="enum"/>
<type name="VkBufferCreateFlagBits" category="enum"/>
<type name="VkBufferUsageFlagBits" category="enum"/>
<type name="VkColorComponentFlagBits" category="enum"/>
<type name="VkComponentSwizzle" category="enum"/>
<type name="VkCommandPoolCreateFlagBits" category="enum"/>
<type name="VkCommandPoolResetFlagBits" category="enum"/>
<type name="VkCommandBufferResetFlagBits" category="enum"/>
<type name="VkCommandBufferLevel" category="enum"/>
<type name="VkCommandBufferUsageFlagBits" category="enum"/>
<type name="VkCompareOp" category="enum"/>
<type name="VkCullModeFlagBits" category="enum"/>
<type name="VkDescriptorType" category="enum"/>
<type name="VkDeviceCreateFlagBits" category="enum"/>
<type name="VkDynamicState" category="enum"/>
<type name="VkFenceCreateFlagBits" category="enum"/>
<type name="VkPolygonMode" category="enum"/>
<type name="VkFormat" category="enum"/>
<type name="VkFormatFeatureFlagBits" category="enum"/>
<type name="VkFrontFace" category="enum"/>
<type name="VkImageAspectFlagBits" category="enum"/>
<type name="VkImageCreateFlagBits" category="enum"/>
<type name="VkImageLayout" category="enum"/>
<type name="VkImageTiling" category="enum"/>
<type name="VkImageType" category="enum"/>
<type name="VkImageUsageFlagBits" category="enum"/>
<type name="VkImageViewCreateFlagBits" category="enum"/>
<type name="VkImageViewType" category="enum"/>
<type name="VkSharingMode" category="enum"/>
<type name="VkIndexType" category="enum"/>
<type name="VkLogicOp" category="enum"/>
<type name="VkMemoryHeapFlagBits" category="enum"/>
<type name="VkAccessFlagBits" category="enum"/>
<type name="VkMemoryPropertyFlagBits" category="enum"/>
<type name="VkPhysicalDeviceType" category="enum"/>
<type name="VkPipelineBindPoint" category="enum"/>
<type name="VkPipelineCreateFlagBits" category="enum"/>
<type name="VkPrimitiveTopology" category="enum"/>
<type name="VkQueryControlFlagBits" category="enum"/>
<type name="VkQueryPipelineStatisticFlagBits" category="enum"/>
<type name="VkQueryResultFlagBits" category="enum"/>
<type name="VkQueryType" category="enum"/>
<type name="VkQueueFlagBits" category="enum"/>
<type name="VkSubpassContents" category="enum"/>
<type name="VkResult" category="enum"/>
<type name="VkShaderStageFlagBits" category="enum"/>
<type name="VkSparseMemoryBindFlagBits" category="enum"/>
<type name="VkStencilFaceFlagBits" category="enum"/>
<type name="VkStencilOp" category="enum"/>
<type name="VkStructureType" category="enum"/>
<type name="VkSystemAllocationScope" category="enum"/>
<type name="VkInternalAllocationType" category="enum"/>
<type name="VkSamplerAddressMode" category="enum"/>
<type name="VkFilter" category="enum"/>
<type name="VkSamplerMipmapMode" category="enum"/>
<type name="VkVertexInputRate" category="enum"/>
<type name="VkPipelineStageFlagBits" category="enum"/>
<type name="VkSparseImageFormatFlagBits" category="enum"/>
<type name="VkSampleCountFlagBits" category="enum"/>
<type name="VkAttachmentDescriptionFlagBits" category="enum"/>
<type name="VkDescriptorPoolCreateFlagBits" category="enum"/>
<type name="VkDependencyFlagBits" category="enum"/>
<type name="VkObjectType" category="enum"/>
<type name="VkEventCreateFlagBits" category="enum"/>
<comment>When VkSemaphoreCreateFlagBits is first extended, need to add a type enum tag for it here</comment>
<comment>Extensions</comment>
<type name="VkIndirectCommandsLayoutUsageFlagBitsNV" category="enum"/>
<type name="VkIndirectCommandsTokenTypeNV" category="enum"/>
<type name="VkIndirectStateFlagBitsNV" category="enum"/>
<type name="VkPrivateDataSlotCreateFlagBitsEXT" category="enum"/>
<type name="VkDescriptorUpdateTemplateType" category="enum"/>
<type category="enum" name="VkDescriptorUpdateTemplateTypeKHR" alias="VkDescriptorUpdateTemplateType"/>
<type name="VkViewportCoordinateSwizzleNV" category="enum"/>
<type name="VkDiscardRectangleModeEXT" category="enum"/>
<type name="VkSubpassDescriptionFlagBits" category="enum"/>
<type name="VkPointClippingBehavior" category="enum"/>
<type category="enum" name="VkPointClippingBehaviorKHR" alias="VkPointClippingBehavior"/>
<type name="VkCoverageModulationModeNV" category="enum"/>
<type name="VkCoverageReductionModeNV" category="enum"/>
<type name="VkValidationCacheHeaderVersionEXT" category="enum"/>
<type name="VkShaderInfoTypeAMD" category="enum"/>
<type name="VkQueueGlobalPriorityEXT" category="enum"/>
<type name="VkTimeDomainEXT" category="enum"/>
<type name="VkConservativeRasterizationModeEXT" category="enum"/>
<type name="VkResolveModeFlagBits" category="enum"/>
<type category="enum" name="VkResolveModeFlagBitsKHR" alias="VkResolveModeFlagBits"/>
<type name="VkDescriptorBindingFlagBits" category="enum"/>
<type category="enum" name="VkDescriptorBindingFlagBitsEXT" alias="VkDescriptorBindingFlagBits"/>
<type name="VkConditionalRenderingFlagBitsEXT" category="enum"/>
<type name="VkSemaphoreType" category="enum"/>
<type category="enum" name="VkSemaphoreTypeKHR" alias="VkSemaphoreType"/>
<type name="VkGeometryFlagBitsKHR" category="enum"/>
<type category="enum" name="VkGeometryFlagBitsNV" alias="VkGeometryFlagBitsKHR"/>
<type name="VkGeometryInstanceFlagBitsKHR" category="enum"/>
<type category="enum" name="VkGeometryInstanceFlagBitsNV" alias="VkGeometryInstanceFlagBitsKHR"/>
<type name="VkBuildAccelerationStructureFlagBitsKHR" category="enum"/>
<type category="enum" name="VkBuildAccelerationStructureFlagBitsNV" alias="VkBuildAccelerationStructureFlagBitsKHR"/>
<type name="VkAccelerationStructureCreateFlagBitsKHR" category="enum"/>
<type name="VkBuildAccelerationStructureModeKHR" category="enum"/>
<type name="VkCopyAccelerationStructureModeKHR" category="enum"/>
<type category="enum" name="VkCopyAccelerationStructureModeNV" alias="VkCopyAccelerationStructureModeKHR"/>
<type name="VkAccelerationStructureTypeKHR" category="enum"/>
<type category="enum" name="VkAccelerationStructureTypeNV" alias="VkAccelerationStructureTypeKHR"/>
<type name="VkGeometryTypeKHR" category="enum"/>
<type category="enum" name="VkGeometryTypeNV" alias="VkGeometryTypeKHR"/>
<type name="VkRayTracingShaderGroupTypeKHR" category="enum"/>
<type category="enum" name="VkRayTracingShaderGroupTypeNV" alias="VkRayTracingShaderGroupTypeKHR"/>
<type name="VkAccelerationStructureMemoryRequirementsTypeNV" category="enum"/>
<type name="VkAccelerationStructureBuildTypeKHR" category="enum"/>
<type name="VkAccelerationStructureCompatibilityKHR" category="enum"/>
<type name="VkShaderGroupShaderKHR" category="enum"/>
<type name="VkMemoryOverallocationBehaviorAMD" category="enum"/>
<type name="VkScopeNV" category="enum"/>
<type name="VkComponentTypeNV" category="enum"/>
<type name="VkDeviceDiagnosticsConfigFlagBitsNV" category="enum"/>
<type name="VkPipelineCreationFeedbackFlagBitsEXT" category="enum"/>
<type name="VkPerformanceCounterScopeKHR" category="enum"/>
<type name="VkPerformanceCounterUnitKHR" category="enum"/>
<type name="VkPerformanceCounterStorageKHR" category="enum"/>
<type name="VkPerformanceCounterDescriptionFlagBitsKHR" category="enum"/>
<type name="VkAcquireProfilingLockFlagBitsKHR" category="enum"/>
<type name="VkSemaphoreWaitFlagBits" category="enum"/>
<type category="enum" name="VkSemaphoreWaitFlagBitsKHR" alias="VkSemaphoreWaitFlagBits"/>
<type name="VkPerformanceConfigurationTypeINTEL" category="enum"/>
<type name="VkQueryPoolSamplingModeINTEL" category="enum"/>
<type name="VkPerformanceOverrideTypeINTEL" category="enum"/>
<type name="VkPerformanceParameterTypeINTEL" category="enum"/>
<type name="VkPerformanceValueTypeINTEL" category="enum"/>
<type name="VkLineRasterizationModeEXT" category="enum"/>
<type name="VkShaderModuleCreateFlagBits" category="enum"/>
<type name="VkPipelineCompilerControlFlagBitsAMD" category="enum"/>
<type name="VkShaderCorePropertiesFlagBitsAMD" category="enum"/>
<type name="VkToolPurposeFlagBitsEXT" category="enum"/>
<type name="VkFragmentShadingRateNV" category="enum"/>
<type name="VkFragmentShadingRateTypeNV" category="enum"/>
<type name="VkAccessFlagBits2KHR" category="enum"/>
<type name="VkPipelineStageFlagBits2KHR" category="enum"/>
<comment>WSI extensions</comment>
<type name="VkColorSpaceKHR" category="enum"/>
<type name="VkCompositeAlphaFlagBitsKHR" category="enum"/>
<type name="VkDisplayPlaneAlphaFlagBitsKHR" category="enum"/>
<type name="VkPresentModeKHR" category="enum"/>
<type name="VkSurfaceTransformFlagBitsKHR" category="enum"/>
<type name="VkDebugReportFlagBitsEXT" category="enum"/>
<type name="VkDebugReportObjectTypeEXT" category="enum"/>
<type name="VkDeviceMemoryReportEventTypeEXT" category="enum"/>
<type name="VkRasterizationOrderAMD" category="enum"/>
<type name="VkExternalMemoryHandleTypeFlagBitsNV" category="enum"/>
<type name="VkExternalMemoryFeatureFlagBitsNV" category="enum"/>
<type name="VkValidationCheckEXT" category="enum"/>
<type name="VkValidationFeatureEnableEXT" category="enum"/>
<type name="VkValidationFeatureDisableEXT" category="enum"/>
<type name="VkExternalMemoryHandleTypeFlagBits" category="enum"/>
<type category="enum" name="VkExternalMemoryHandleTypeFlagBitsKHR" alias="VkExternalMemoryHandleTypeFlagBits"/>
<type name="VkExternalMemoryFeatureFlagBits" category="enum"/>
<type category="enum" name="VkExternalMemoryFeatureFlagBitsKHR" alias="VkExternalMemoryFeatureFlagBits"/>
<type name="VkExternalSemaphoreHandleTypeFlagBits" category="enum"/>
<type category="enum" name="VkExternalSemaphoreHandleTypeFlagBitsKHR" alias="VkExternalSemaphoreHandleTypeFlagBits"/>
<type name="VkExternalSemaphoreFeatureFlagBits" category="enum"/>
<type category="enum" name="VkExternalSemaphoreFeatureFlagBitsKHR" alias="VkExternalSemaphoreFeatureFlagBits"/>
<type name="VkSemaphoreImportFlagBits" category="enum"/>
<type category="enum" name="VkSemaphoreImportFlagBitsKHR" alias="VkSemaphoreImportFlagBits"/>
<type name="VkExternalFenceHandleTypeFlagBits" category="enum"/>
<type category="enum" name="VkExternalFenceHandleTypeFlagBitsKHR" alias="VkExternalFenceHandleTypeFlagBits"/>
<type name="VkExternalFenceFeatureFlagBits" category="enum"/>
<type category="enum" name="VkExternalFenceFeatureFlagBitsKHR" alias="VkExternalFenceFeatureFlagBits"/>
<type name="VkFenceImportFlagBits" category="enum"/>
<type category="enum" name="VkFenceImportFlagBitsKHR" alias="VkFenceImportFlagBits"/>
<type name="VkSurfaceCounterFlagBitsEXT" category="enum"/>
<type name="VkDisplayPowerStateEXT" category="enum"/>
<type name="VkDeviceEventTypeEXT" category="enum"/>
<type name="VkDisplayEventTypeEXT" category="enum"/>
<type name="VkPeerMemoryFeatureFlagBits" category="enum"/>
<type category="enum" name="VkPeerMemoryFeatureFlagBitsKHR" alias="VkPeerMemoryFeatureFlagBits"/>
<type name="VkMemoryAllocateFlagBits" category="enum"/>
<type category="enum" name="VkMemoryAllocateFlagBitsKHR" alias="VkMemoryAllocateFlagBits"/>
<type name="VkDeviceGroupPresentModeFlagBitsKHR" category="enum"/>
<type name="VkSwapchainCreateFlagBitsKHR" category="enum"/>
<type name="VkSubgroupFeatureFlagBits" category="enum"/>
<type name="VkTessellationDomainOrigin" category="enum"/>
<type category="enum" name="VkTessellationDomainOriginKHR" alias="VkTessellationDomainOrigin"/>
<type name="VkSamplerYcbcrModelConversion" category="enum"/>
<type category="enum" name="VkSamplerYcbcrModelConversionKHR" alias="VkSamplerYcbcrModelConversion"/>
<type name="VkSamplerYcbcrRange" category="enum"/>
<type category="enum" name="VkSamplerYcbcrRangeKHR" alias="VkSamplerYcbcrRange"/>
<type name="VkChromaLocation" category="enum"/>
<type category="enum" name="VkChromaLocationKHR" alias="VkChromaLocation"/>
<type name="VkSamplerReductionMode" category="enum"/>
<type category="enum" name="VkSamplerReductionModeEXT" alias="VkSamplerReductionMode"/>
<type name="VkBlendOverlapEXT" category="enum"/>
<type name="VkDebugUtilsMessageSeverityFlagBitsEXT" category="enum"/>
<type name="VkDebugUtilsMessageTypeFlagBitsEXT" category="enum"/>
<type name="VkFullScreenExclusiveEXT" category="enum"/>
<type name="VkShaderFloatControlsIndependence" category="enum"/>
<type category="enum" name="VkShaderFloatControlsIndependenceKHR" alias="VkShaderFloatControlsIndependence"/>
<type name="VkSwapchainImageUsageFlagBitsANDROID" category="enum"/>
<type name="VkFragmentShadingRateCombinerOpKHR" category="enum"/>
<type name="VkSubmitFlagBitsKHR" category="enum"/>
<comment>Enumerated types in the header, but not used by the API</comment>
<type name="VkVendorId" category="enum"/>
<type name="VkDriverId" category="enum"/>
<type category="enum" name="VkDriverIdKHR" alias="VkDriverId"/>
<type name="VkShadingRatePaletteEntryNV" category="enum"/>
<type name="VkCoarseSampleOrderTypeNV" category="enum"/>
<type name="VkPipelineExecutableStatisticFormatKHR" category="enum"/>
<comment>Video Core extensions</comment>
<type name="VkVideoCodecOperationFlagBitsKHR" category="enum"/>
<type name="VkVideoChromaSubsamplingFlagBitsKHR" category="enum"/>
<type name="VkVideoComponentBitDepthFlagBitsKHR" category="enum"/>
<type name="VkVideoCapabilitiesFlagBitsKHR" category="enum"/>
<type name="VkVideoSessionCreateFlagBitsKHR" category="enum"/>
<type name="VkVideoCodingQualityPresetFlagBitsKHR" category="enum"/>
<type name="VkVideoCodingControlFlagBitsKHR" category="enum"/>
<type name="VkQueryResultStatusKHR" category="enum"/>
<comment>Video Decode extensions</comment>
<type name="VkVideoDecodeFlagBitsKHR" category="enum"/>
<comment>Video H.264 Decode extensions</comment>
<type name="VkVideoDecodeH264FieldLayoutFlagBitsEXT" category="enum"/>
<comment>Video H.265 Decode extensions</comment>
<comment>Video Encode extensions</comment>
<type name="VkVideoEncodeFlagBitsKHR" category="enum"/>
<type name="VkVideoEncodeRateControlFlagBitsKHR" category="enum"/>
<type name="VkVideoEncodeRateControlModeFlagBitsKHR" category="enum"/>
<comment>Video H.264 Encode extensions</comment>
<type name="VkVideoEncodeH264CapabilitiesFlagBitsEXT" category="enum"/>
<type name="VkVideoEncodeH264InputModeFlagBitsEXT" category="enum"/>
<type name="VkVideoEncodeH264OutputModeFlagBitsEXT" category="enum"/>
<type name="VkVideoEncodeH264CreateFlagBitsEXT" category="enum"/>
<comment>The PFN_vk*Function types are used by VkAllocationCallbacks below</comment>
<type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkInternalAllocationNotification</name>)(
<type>void</type>* pUserData,
<type>size_t</type> size,
<type>VkInternalAllocationType</type> allocationType,
<type>VkSystemAllocationScope</type> allocationScope);</type>
<type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkInternalFreeNotification</name>)(
<type>void</type>* pUserData,
<type>size_t</type> size,
<type>VkInternalAllocationType</type> allocationType,
<type>VkSystemAllocationScope</type> allocationScope);</type>
<type category="funcpointer">typedef void* (VKAPI_PTR *<name>PFN_vkReallocationFunction</name>)(
<type>void</type>* pUserData,
<type>void</type>* pOriginal,
<type>size_t</type> size,
<type>size_t</type> alignment,
<type>VkSystemAllocationScope</type> allocationScope);</type>
<type category="funcpointer">typedef void* (VKAPI_PTR *<name>PFN_vkAllocationFunction</name>)(
<type>void</type>* pUserData,
<type>size_t</type> size,
<type>size_t</type> alignment,
<type>VkSystemAllocationScope</type> allocationScope);</type>
<type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkFreeFunction</name>)(
<type>void</type>* pUserData,
<type>void</type>* pMemory);</type>
<comment>The PFN_vkVoidFunction type are used by VkGet*ProcAddr below</comment>
<type category="funcpointer">typedef void (VKAPI_PTR *<name>PFN_vkVoidFunction</name>)(void);</type>
<comment>The PFN_vkDebugReportCallbackEXT type are used by the DEBUG_REPORT extension</comment>
<type category="funcpointer">typedef VkBool32 (VKAPI_PTR *<name>PFN_vkDebugReportCallbackEXT</name>)(
<type>VkDebugReportFlagsEXT</type> flags,
<type>VkDebugReportObjectTypeEXT</type> objectType,
<type>uint64_t</type> object,
<type>size_t</type> location,
<type>int32_t</type> messageCode,
const <type>char</type>* pLayerPrefix,
const <type>char</type>* pMessage,
<type>void</type>* pUserData);</type>
<comment>The PFN_vkDebugUtilsMessengerCallbackEXT type are used by the VK_EXT_debug_utils extension</comment>
<type category="funcpointer" requires="VkDebugUtilsMessengerCallbackDataEXT">typedef VkBool32 (VKAPI_PTR *<name>PFN_vkDebugUtilsMessengerCallbackEXT</name>)(
<type>VkDebugUtilsMessageSeverityFlagBitsEXT</type> messageSeverity,
<type>VkDebugUtilsMessageTypeFlagsEXT</type> messageTypes,
const <type>VkDebugUtilsMessengerCallbackDataEXT</type>* pCallbackData,
<type>void</type>* pUserData);</type>
<comment>The PFN_vkDeviceMemoryReportCallbackEXT type is used by the VK_EXT_device_memory_report extension</comment>
<type category="funcpointer" requires="VkDeviceMemoryReportCallbackDataEXT">typedef void (VKAPI_PTR *<name>PFN_vkDeviceMemoryReportCallbackEXT</name>)(
const <type>VkDeviceMemoryReportCallbackDataEXT</type>* pCallbackData,
<type>void</type>* pUserData);</type>
<comment>Struct types</comment>
<type category="struct" name="VkBaseOutStructure">
<member><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">struct <type>VkBaseOutStructure</type>* <name>pNext</name></member>
</type>
<type category="struct" name="VkBaseInStructure">
<member><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const struct <type>VkBaseInStructure</type>* <name>pNext</name></member>
</type>
<type category="struct" name="VkOffset2D">
<member><type>int32_t</type> <name>x</name></member>
<member><type>int32_t</type> <name>y</name></member>
</type>
<type category="struct" name="VkOffset3D">
<member><type>int32_t</type> <name>x</name></member>
<member><type>int32_t</type> <name>y</name></member>
<member><type>int32_t</type> <name>z</name></member>
</type>
<type category="struct" name="VkExtent2D">
<member><type>uint32_t</type> <name>width</name></member>
<member><type>uint32_t</type> <name>height</name></member>
</type>
<type category="struct" name="VkExtent3D">
<member><type>uint32_t</type> <name>width</name></member>
<member><type>uint32_t</type> <name>height</name></member>
<member><type>uint32_t</type> <name>depth</name></member>
</type>
<type category="struct" name="VkViewport">
<member noautovalidity="true"><type>float</type> <name>x</name></member>
<member noautovalidity="true"><type>float</type> <name>y</name></member>
<member noautovalidity="true"><type>float</type> <name>width</name></member>
<member noautovalidity="true"><type>float</type> <name>height</name></member>
<member><type>float</type> <name>minDepth</name></member>
<member><type>float</type> <name>maxDepth</name></member>
</type>
<type category="struct" name="VkRect2D">
<member><type>VkOffset2D</type> <name>offset</name></member>
<member><type>VkExtent2D</type> <name>extent</name></member>
</type>
<type category="struct" name="VkClearRect">
<member><type>VkRect2D</type> <name>rect</name></member>
<member><type>uint32_t</type> <name>baseArrayLayer</name></member>
<member><type>uint32_t</type> <name>layerCount</name></member>
</type>
<type category="struct" name="VkComponentMapping">
<member><type>VkComponentSwizzle</type> <name>r</name></member>
<member><type>VkComponentSwizzle</type> <name>g</name></member>
<member><type>VkComponentSwizzle</type> <name>b</name></member>
<member><type>VkComponentSwizzle</type> <name>a</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceProperties" returnedonly="true">
<member limittype="noauto"><type>uint32_t</type> <name>apiVersion</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>driverVersion</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>vendorID</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>deviceID</name></member>
<member limittype="noauto"><type>VkPhysicalDeviceType</type> <name>deviceType</name></member>
<member limittype="noauto"><type>char</type> <name>deviceName</name>[<enum>VK_MAX_PHYSICAL_DEVICE_NAME_SIZE</enum>]</member>
<member limittype="noauto"><type>uint8_t</type> <name>pipelineCacheUUID</name>[<enum>VK_UUID_SIZE</enum>]</member>
<member limittype="struct"><type>VkPhysicalDeviceLimits</type> <name>limits</name></member>
<member limittype="struct"><type>VkPhysicalDeviceSparseProperties</type> <name>sparseProperties</name></member>
</type>
<type category="struct" name="VkExtensionProperties" returnedonly="true">
<member><type>char</type> <name>extensionName</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]<comment>extension name</comment></member>
<member><type>uint32_t</type> <name>specVersion</name><comment>version of the extension specification implemented</comment></member>
</type>
<type category="struct" name="VkLayerProperties" returnedonly="true">
<member><type>char</type> <name>layerName</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]<comment>layer name</comment></member>
<member><type>uint32_t</type> <name>specVersion</name><comment>version of the layer specification implemented</comment></member>
<member><type>uint32_t</type> <name>implementationVersion</name><comment>build or release version of the layer's library</comment></member>
<member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]<comment>Free-form description of the layer</comment></member>
</type>
<type category="struct" name="VkApplicationInfo">
<member values="VK_STRUCTURE_TYPE_APPLICATION_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true" len="null-terminated">const <type>char</type>* <name>pApplicationName</name></member>
<member><type>uint32_t</type> <name>applicationVersion</name></member>
<member optional="true" len="null-terminated">const <type>char</type>* <name>pEngineName</name></member>
<member><type>uint32_t</type> <name>engineVersion</name></member>
<member><type>uint32_t</type> <name>apiVersion</name></member>
</type>
<type category="struct" name="VkAllocationCallbacks">
<member optional="true"><type>void</type>* <name>pUserData</name></member>
<member noautovalidity="true"><type>PFN_vkAllocationFunction</type> <name>pfnAllocation</name></member>
<member noautovalidity="true"><type>PFN_vkReallocationFunction</type> <name>pfnReallocation</name></member>
<member noautovalidity="true"><type>PFN_vkFreeFunction</type> <name>pfnFree</name></member>
<member optional="true" noautovalidity="true"><type>PFN_vkInternalAllocationNotification</type> <name>pfnInternalAllocation</name></member>
<member optional="true" noautovalidity="true"><type>PFN_vkInternalFreeNotification</type> <name>pfnInternalFree</name></member>
</type>
<type category="struct" name="VkDeviceQueueCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDeviceQueueCreateFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>queueFamilyIndex</name></member>
<member><type>uint32_t</type> <name>queueCount</name></member>
<member len="queueCount">const <type>float</type>* <name>pQueuePriorities</name></member>
</type>
<type category="struct" name="VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDeviceCreateFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>queueCreateInfoCount</name></member>
<member len="queueCreateInfoCount">const <type>VkDeviceQueueCreateInfo</type>* <name>pQueueCreateInfos</name></member>
<member optional="true"><type>uint32_t</type> <name>enabledLayerCount</name></member>
<member len="enabledLayerCount,null-terminated">const <type>char</type>* const* <name>ppEnabledLayerNames</name><comment>Ordered list of layer names to be enabled</comment></member>
<member optional="true"><type>uint32_t</type> <name>enabledExtensionCount</name></member>
<member len="enabledExtensionCount,null-terminated">const <type>char</type>* const* <name>ppEnabledExtensionNames</name></member>
<member optional="true">const <type>VkPhysicalDeviceFeatures</type>* <name>pEnabledFeatures</name></member>
</type>
<type category="struct" name="VkInstanceCreateInfo">
<member values="VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkInstanceCreateFlags</type> <name>flags</name></member>
<member optional="true">const <type>VkApplicationInfo</type>* <name>pApplicationInfo</name></member>
<member optional="true"><type>uint32_t</type> <name>enabledLayerCount</name></member>
<member len="enabledLayerCount,null-terminated">const <type>char</type>* const* <name>ppEnabledLayerNames</name><comment>Ordered list of layer names to be enabled</comment></member>
<member optional="true"><type>uint32_t</type> <name>enabledExtensionCount</name></member>
<member len="enabledExtensionCount,null-terminated">const <type>char</type>* const* <name>ppEnabledExtensionNames</name><comment>Extension names to be enabled</comment></member>
</type>
<type category="struct" name="VkQueueFamilyProperties" returnedonly="true">
<member optional="true"><type>VkQueueFlags</type> <name>queueFlags</name><comment>Queue flags</comment></member>
<member><type>uint32_t</type> <name>queueCount</name></member>
<member><type>uint32_t</type> <name>timestampValidBits</name></member>
<member><type>VkExtent3D</type> <name>minImageTransferGranularity</name><comment>Minimum alignment requirement for image transfers</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceMemoryProperties" returnedonly="true">
<member><type>uint32_t</type> <name>memoryTypeCount</name></member>
<member><type>VkMemoryType</type> <name>memoryTypes</name>[<enum>VK_MAX_MEMORY_TYPES</enum>]</member>
<member><type>uint32_t</type> <name>memoryHeapCount</name></member>
<member><type>VkMemoryHeap</type> <name>memoryHeaps</name>[<enum>VK_MAX_MEMORY_HEAPS</enum>]</member>
</type>
<type category="struct" name="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceSize</type> <name>allocationSize</name><comment>Size of memory allocation</comment></member>
<member><type>uint32_t</type> <name>memoryTypeIndex</name><comment>Index of the of the memory type to allocate from</comment></member>
</type>
<type category="struct" name="VkMemoryRequirements" returnedonly="true">
<member><type>VkDeviceSize</type> <name>size</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>alignment</name><comment>Specified in bytes</comment></member>
<member><type>uint32_t</type> <name>memoryTypeBits</name><comment>Bitmask of the allowed memory type indices into memoryTypes[] for this object</comment></member>
</type>
<type category="struct" name="VkSparseImageFormatProperties" returnedonly="true">
<member optional="true"><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
<member><type>VkExtent3D</type> <name>imageGranularity</name></member>
<member optional="true"><type>VkSparseImageFormatFlags</type> <name>flags</name></member>
</type>
<type category="struct" name="VkSparseImageMemoryRequirements" returnedonly="true">
<member><type>VkSparseImageFormatProperties</type> <name>formatProperties</name></member>
<member><type>uint32_t</type> <name>imageMipTailFirstLod</name></member>
<member><type>VkDeviceSize</type> <name>imageMipTailSize</name><comment>Specified in bytes, must be a multiple of sparse block size in bytes / alignment</comment></member>
<member><type>VkDeviceSize</type> <name>imageMipTailOffset</name><comment>Specified in bytes, must be a multiple of sparse block size in bytes / alignment</comment></member>
<member><type>VkDeviceSize</type> <name>imageMipTailStride</name><comment>Specified in bytes, must be a multiple of sparse block size in bytes / alignment</comment></member>
</type>
<type category="struct" name="VkMemoryType" returnedonly="true">
<member optional="true"><type>VkMemoryPropertyFlags</type> <name>propertyFlags</name><comment>Memory properties of this memory type</comment></member>
<member><type>uint32_t</type> <name>heapIndex</name><comment>Index of the memory heap allocations of this memory type are taken from</comment></member>
</type>
<type category="struct" name="VkMemoryHeap" returnedonly="true">
<member><type>VkDeviceSize</type> <name>size</name><comment>Available memory in the heap</comment></member>
<member optional="true"><type>VkMemoryHeapFlags</type> <name>flags</name><comment>Flags for the heap</comment></member>
</type>
<type category="struct" name="VkMappedMemoryRange">
<member values="VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name><comment>Mapped memory object</comment></member>
<member><type>VkDeviceSize</type> <name>offset</name><comment>Offset within the memory object where the range starts</comment></member>
<member><type>VkDeviceSize</type> <name>size</name><comment>Size of the range within the memory object</comment></member>
</type>
<type category="struct" name="VkFormatProperties" returnedonly="true">
<member optional="true"><type>VkFormatFeatureFlags</type> <name>linearTilingFeatures</name><comment>Format features in case of linear tiling</comment></member>
<member optional="true"><type>VkFormatFeatureFlags</type> <name>optimalTilingFeatures</name><comment>Format features in case of optimal tiling</comment></member>
<member optional="true"><type>VkFormatFeatureFlags</type> <name>bufferFeatures</name><comment>Format features supported by buffers</comment></member>
</type>
<type category="struct" name="VkImageFormatProperties" returnedonly="true">
<member><type>VkExtent3D</type> <name>maxExtent</name><comment>max image dimensions for this resource type</comment></member>
<member><type>uint32_t</type> <name>maxMipLevels</name><comment>max number of mipmap levels for this resource type</comment></member>
<member><type>uint32_t</type> <name>maxArrayLayers</name><comment>max array size for this resource type</comment></member>
<member optional="true"><type>VkSampleCountFlags</type> <name>sampleCounts</name><comment>supported sample counts for this resource type</comment></member>
<member><type>VkDeviceSize</type> <name>maxResourceSize</name><comment>max size (in bytes) of this resource type</comment></member>
</type>
<type category="struct" name="VkDescriptorBufferInfo">
<member optional="true"><type>VkBuffer</type> <name>buffer</name><comment>Buffer used for this descriptor slot.</comment></member>
<member><type>VkDeviceSize</type> <name>offset</name><comment>Base offset from buffer start in bytes to update in the descriptor set.</comment></member>
<member><type>VkDeviceSize</type> <name>range</name><comment>Size in bytes of the buffer resource for this descriptor update.</comment></member>
</type>
<type category="struct" name="VkDescriptorImageInfo">
<member noautovalidity="true"><type>VkSampler</type> <name>sampler</name><comment>Sampler to write to the descriptor in case it is a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor. Ignored otherwise.</comment></member>
<member noautovalidity="true"><type>VkImageView</type> <name>imageView</name><comment>Image view to write to the descriptor in case it is a SAMPLED_IMAGE, STORAGE_IMAGE, COMBINED_IMAGE_SAMPLER, or INPUT_ATTACHMENT descriptor. Ignored otherwise.</comment></member>
<member noautovalidity="true"><type>VkImageLayout</type> <name>imageLayout</name><comment>Layout the image is expected to be in when accessed using this descriptor (only used if imageView is not VK_NULL_HANDLE).</comment></member>
</type>
<type category="struct" name="VkWriteDescriptorSet">
<member values="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkDescriptorSet</type> <name>dstSet</name><comment>Destination descriptor set</comment></member>
<member><type>uint32_t</type> <name>dstBinding</name><comment>Binding within the destination descriptor set to write</comment></member>
<member><type>uint32_t</type> <name>dstArrayElement</name><comment>Array element within the destination binding to write</comment></member>
<member><type>uint32_t</type> <name>descriptorCount</name><comment>Number of descriptors to write (determines the size of the array pointed by pDescriptors)</comment></member>
<member><type>VkDescriptorType</type> <name>descriptorType</name><comment>Descriptor type to write (determines which members of the array pointed by pDescriptors are going to be used)</comment></member>
<member noautovalidity="true" len="descriptorCount">const <type>VkDescriptorImageInfo</type>* <name>pImageInfo</name><comment>Sampler, image view, and layout for SAMPLER, COMBINED_IMAGE_SAMPLER, {SAMPLED,STORAGE}_IMAGE, and INPUT_ATTACHMENT descriptor types.</comment></member>
<member noautovalidity="true" len="descriptorCount">const <type>VkDescriptorBufferInfo</type>* <name>pBufferInfo</name><comment>Raw buffer, size, and offset for {UNIFORM,STORAGE}_BUFFER[_DYNAMIC] descriptor types.</comment></member>
<member noautovalidity="true" len="descriptorCount">const <type>VkBufferView</type>* <name>pTexelBufferView</name><comment>Buffer view to write to the descriptor for {UNIFORM,STORAGE}_TEXEL_BUFFER descriptor types.</comment></member>
</type>
<type category="struct" name="VkCopyDescriptorSet">
<member values="VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDescriptorSet</type> <name>srcSet</name><comment>Source descriptor set</comment></member>
<member><type>uint32_t</type> <name>srcBinding</name><comment>Binding within the source descriptor set to copy from</comment></member>
<member><type>uint32_t</type> <name>srcArrayElement</name><comment>Array element within the source binding to copy from</comment></member>
<member><type>VkDescriptorSet</type> <name>dstSet</name><comment>Destination descriptor set</comment></member>
<member><type>uint32_t</type> <name>dstBinding</name><comment>Binding within the destination descriptor set to copy to</comment></member>
<member><type>uint32_t</type> <name>dstArrayElement</name><comment>Array element within the destination binding to copy to</comment></member>
<member><type>uint32_t</type> <name>descriptorCount</name><comment>Number of descriptors to write (determines the size of the array pointed by pDescriptors)</comment></member>
</type>
<type category="struct" name="VkBufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkBufferCreateFlags</type> <name>flags</name><comment>Buffer creation flags</comment></member>
<member><type>VkDeviceSize</type> <name>size</name><comment>Specified in bytes</comment></member>
<member><type>VkBufferUsageFlags</type> <name>usage</name><comment>Buffer usage flags</comment></member>
<member><type>VkSharingMode</type> <name>sharingMode</name></member>
<member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member>
<member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member>
</type>
<type category="struct" name="VkBufferViewCreateInfo">
<member values="VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkBufferViewCreateFlags</type><name>flags</name></member>
<member><type>VkBuffer</type> <name>buffer</name></member>
<member><type>VkFormat</type> <name>format</name><comment>Optionally specifies format of elements</comment></member>
<member><type>VkDeviceSize</type> <name>offset</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>range</name><comment>View size specified in bytes</comment></member>
</type>
<type category="struct" name="VkImageSubresource">
<member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
<member><type>uint32_t</type> <name>mipLevel</name></member>
<member><type>uint32_t</type> <name>arrayLayer</name></member>
</type>
<type category="struct" name="VkImageSubresourceLayers">
<member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
<member><type>uint32_t</type> <name>mipLevel</name></member>
<member><type>uint32_t</type> <name>baseArrayLayer</name></member>
<member><type>uint32_t</type> <name>layerCount</name></member>
</type>
<type category="struct" name="VkImageSubresourceRange">
<member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
<member><type>uint32_t</type> <name>baseMipLevel</name></member>
<member><type>uint32_t</type> <name>levelCount</name></member>
<member><type>uint32_t</type> <name>baseArrayLayer</name></member>
<member><type>uint32_t</type> <name>layerCount</name></member>
</type>
<type category="struct" name="VkMemoryBarrier">
<member values="VK_STRUCTURE_TYPE_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name><comment>Memory accesses from the source of the dependency to synchronize</comment></member>
<member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name><comment>Memory accesses from the destination of the dependency to synchronize</comment></member>
</type>
<type category="struct" name="VkBufferMemoryBarrier">
<member values="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkAccessFlags</type> <name>srcAccessMask</name><comment>Memory accesses from the source of the dependency to synchronize</comment></member>
<member noautovalidity="true"><type>VkAccessFlags</type> <name>dstAccessMask</name><comment>Memory accesses from the destination of the dependency to synchronize</comment></member>
<member><type>uint32_t</type> <name>srcQueueFamilyIndex</name><comment>Queue family to transition ownership from</comment></member>
<member><type>uint32_t</type> <name>dstQueueFamilyIndex</name><comment>Queue family to transition ownership to</comment></member>
<member><type>VkBuffer</type> <name>buffer</name><comment>Buffer to sync</comment></member>
<member><type>VkDeviceSize</type> <name>offset</name><comment>Offset within the buffer to sync</comment></member>
<member><type>VkDeviceSize</type> <name>size</name><comment>Amount of bytes to sync</comment></member>
</type>
<type category="struct" name="VkImageMemoryBarrier">
<member values="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkAccessFlags</type> <name>srcAccessMask</name><comment>Memory accesses from the source of the dependency to synchronize</comment></member>
<member noautovalidity="true"><type>VkAccessFlags</type> <name>dstAccessMask</name><comment>Memory accesses from the destination of the dependency to synchronize</comment></member>
<member><type>VkImageLayout</type> <name>oldLayout</name><comment>Current layout of the image</comment></member>
<member><type>VkImageLayout</type> <name>newLayout</name><comment>New layout to transition the image to</comment></member>
<member><type>uint32_t</type> <name>srcQueueFamilyIndex</name><comment>Queue family to transition ownership from</comment></member>
<member><type>uint32_t</type> <name>dstQueueFamilyIndex</name><comment>Queue family to transition ownership to</comment></member>
<member><type>VkImage</type> <name>image</name><comment>Image to sync</comment></member>
<member><type>VkImageSubresourceRange</type> <name>subresourceRange</name><comment>Subresource range to sync</comment></member>
</type>
<type category="struct" name="VkImageCreateInfo">
<member values="VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkImageCreateFlags</type> <name>flags</name><comment>Image creation flags</comment></member>
<member><type>VkImageType</type> <name>imageType</name></member>
<member><type>VkFormat</type> <name>format</name></member>
<member><type>VkExtent3D</type> <name>extent</name></member>
<member><type>uint32_t</type> <name>mipLevels</name></member>
<member><type>uint32_t</type> <name>arrayLayers</name></member>
<member><type>VkSampleCountFlagBits</type> <name>samples</name></member>
<member><type>VkImageTiling</type> <name>tiling</name></member>
<member><type>VkImageUsageFlags</type> <name>usage</name><comment>Image usage flags</comment></member>
<member><type>VkSharingMode</type> <name>sharingMode</name><comment>Cross-queue-family sharing mode</comment></member>
<member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name><comment>Number of queue families to share across</comment></member>
<member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name><comment>Array of queue family indices to share across</comment></member>
<member><type>VkImageLayout</type> <name>initialLayout</name><comment>Initial image layout for all subresources</comment></member>
</type>
<type category="struct" name="VkSubresourceLayout" returnedonly="true">
<member><type>VkDeviceSize</type> <name>offset</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>size</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>rowPitch</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>arrayPitch</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>depthPitch</name><comment>Specified in bytes</comment></member>
</type>
<type category="struct" name="VkImageViewCreateInfo">
<member values="VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkImageViewCreateFlags</type> <name>flags</name></member>
<member><type>VkImage</type> <name>image</name></member>
<member><type>VkImageViewType</type> <name>viewType</name></member>
<member><type>VkFormat</type> <name>format</name></member>
<member><type>VkComponentMapping</type> <name>components</name></member>
<member><type>VkImageSubresourceRange</type> <name>subresourceRange</name></member>
</type>
<type category="struct" name="VkBufferCopy">
<member><type>VkDeviceSize</type> <name>srcOffset</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>dstOffset</name><comment>Specified in bytes</comment></member>
<member noautovalidity="true"><type>VkDeviceSize</type> <name>size</name><comment>Specified in bytes</comment></member>
</type>
<type category="struct" name="VkSparseMemoryBind">
<member><type>VkDeviceSize</type> <name>resourceOffset</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>size</name><comment>Specified in bytes</comment></member>
<member optional="true"><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkDeviceSize</type> <name>memoryOffset</name><comment>Specified in bytes</comment></member>
<member optional="true"><type>VkSparseMemoryBindFlags</type><name>flags</name></member>
</type>
<type category="struct" name="VkSparseImageMemoryBind">
<member><type>VkImageSubresource</type> <name>subresource</name></member>
<member><type>VkOffset3D</type> <name>offset</name></member>
<member><type>VkExtent3D</type> <name>extent</name></member>
<member optional="true"><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkDeviceSize</type> <name>memoryOffset</name><comment>Specified in bytes</comment></member>
<member optional="true"><type>VkSparseMemoryBindFlags</type><name>flags</name></member>
</type>
<type category="struct" name="VkSparseBufferMemoryBindInfo">
<member><type>VkBuffer</type> <name>buffer</name></member>
<member><type>uint32_t</type> <name>bindCount</name></member>
<member len="bindCount">const <type>VkSparseMemoryBind</type>* <name>pBinds</name></member>
</type>
<type category="struct" name="VkSparseImageOpaqueMemoryBindInfo">
<member><type>VkImage</type> <name>image</name></member>
<member><type>uint32_t</type> <name>bindCount</name></member>
<member len="bindCount">const <type>VkSparseMemoryBind</type>* <name>pBinds</name></member>
</type>
<type category="struct" name="VkSparseImageMemoryBindInfo">
<member><type>VkImage</type> <name>image</name></member>
<member><type>uint32_t</type> <name>bindCount</name></member>
<member len="bindCount">const <type>VkSparseImageMemoryBind</type>* <name>pBinds</name></member>
</type>
<type category="struct" name="VkBindSparseInfo">
<member values="VK_STRUCTURE_TYPE_BIND_SPARSE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member>
<member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member>
<member optional="true"><type>uint32_t</type> <name>bufferBindCount</name></member>
<member len="bufferBindCount">const <type>VkSparseBufferMemoryBindInfo</type>* <name>pBufferBinds</name></member>
<member optional="true"><type>uint32_t</type> <name>imageOpaqueBindCount</name></member>
<member len="imageOpaqueBindCount">const <type>VkSparseImageOpaqueMemoryBindInfo</type>* <name>pImageOpaqueBinds</name></member>
<member optional="true"><type>uint32_t</type> <name>imageBindCount</name></member>
<member len="imageBindCount">const <type>VkSparseImageMemoryBindInfo</type>* <name>pImageBinds</name></member>
<member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member>
<member len="signalSemaphoreCount">const <type>VkSemaphore</type>* <name>pSignalSemaphores</name></member>
</type>
<type category="struct" name="VkImageCopy">
<member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
<member><type>VkOffset3D</type> <name>srcOffset</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
<member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
<member><type>VkOffset3D</type> <name>dstOffset</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
<member><type>VkExtent3D</type> <name>extent</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
</type>
<type category="struct" name="VkImageBlit">
<member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
<member><type>VkOffset3D</type> <name>srcOffsets</name>[2]<comment>Specified in pixels for both compressed and uncompressed images</comment></member>
<member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
<member><type>VkOffset3D</type> <name>dstOffsets</name>[2]<comment>Specified in pixels for both compressed and uncompressed images</comment></member>
</type>
<type category="struct" name="VkBufferImageCopy">
<member><type>VkDeviceSize</type> <name>bufferOffset</name><comment>Specified in bytes</comment></member>
<member><type>uint32_t</type> <name>bufferRowLength</name><comment>Specified in texels</comment></member>
<member><type>uint32_t</type> <name>bufferImageHeight</name></member>
<member><type>VkImageSubresourceLayers</type> <name>imageSubresource</name></member>
<member><type>VkOffset3D</type> <name>imageOffset</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
<member><type>VkExtent3D</type> <name>imageExtent</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
</type>
<type category="struct" name="VkImageResolve">
<member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
<member><type>VkOffset3D</type> <name>srcOffset</name></member>
<member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
<member><type>VkOffset3D</type> <name>dstOffset</name></member>
<member><type>VkExtent3D</type> <name>extent</name></member>
</type>
<type category="struct" name="VkShaderModuleCreateInfo">
<member values="VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkShaderModuleCreateFlags</type> <name>flags</name></member>
<member><type>size_t</type> <name>codeSize</name><comment>Specified in bytes</comment></member>
<member len="latexmath:[\textrm{codeSize} \over 4]" altlen="codeSize / 4">const <type>uint32_t</type>* <name>pCode</name><comment>Binary code of size codeSize</comment></member>
</type>
<type category="struct" name="VkDescriptorSetLayoutBinding">
<member><type>uint32_t</type> <name>binding</name><comment>Binding number for this entry</comment></member>
<member><type>VkDescriptorType</type> <name>descriptorType</name><comment>Type of the descriptors in this binding</comment></member>
<member optional="true"><type>uint32_t</type> <name>descriptorCount</name><comment>Number of descriptors in this binding</comment></member>
<member noautovalidity="true"><type>VkShaderStageFlags</type> <name>stageFlags</name><comment>Shader stages this binding is visible to</comment></member>
<member noautovalidity="true" optional="true" len="descriptorCount">const <type>VkSampler</type>* <name>pImmutableSamplers</name><comment>Immutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains count number of elements)</comment></member>
</type>
<type category="struct" name="VkDescriptorSetLayoutCreateInfo">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDescriptorSetLayoutCreateFlags</type> <name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>bindingCount</name><comment>Number of bindings in the descriptor set layout</comment></member>
<member len="bindingCount">const <type>VkDescriptorSetLayoutBinding</type>* <name>pBindings</name><comment>Array of descriptor set layout bindings</comment></member>
</type>
<type category="struct" name="VkDescriptorPoolSize">
<member><type>VkDescriptorType</type> <name>type</name></member>
<member><type>uint32_t</type> <name>descriptorCount</name></member>
</type>
<type category="struct" name="VkDescriptorPoolCreateInfo">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDescriptorPoolCreateFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>maxSets</name></member>
<member><type>uint32_t</type> <name>poolSizeCount</name></member>
<member len="poolSizeCount">const <type>VkDescriptorPoolSize</type>* <name>pPoolSizes</name></member>
</type>
<type category="struct" name="VkDescriptorSetAllocateInfo">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDescriptorPool</type> <name>descriptorPool</name></member>
<member><type>uint32_t</type> <name>descriptorSetCount</name></member>
<member len="descriptorSetCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member>
</type>
<type category="struct" name="VkSpecializationMapEntry">
<member><type>uint32_t</type> <name>constantID</name><comment>The SpecConstant ID specified in the BIL</comment></member>
<member><type>uint32_t</type> <name>offset</name><comment>Offset of the value in the data block</comment></member>
<member noautovalidity="true"><type>size_t</type> <name>size</name><comment>Size in bytes of the SpecConstant</comment></member>
</type>
<type category="struct" name="VkSpecializationInfo">
<member optional="true"><type>uint32_t</type> <name>mapEntryCount</name><comment>Number of entries in the map</comment></member>
<member len="mapEntryCount">const <type>VkSpecializationMapEntry</type>* <name>pMapEntries</name><comment>Array of map entries</comment></member>
<member optional="true"><type>size_t</type> <name>dataSize</name><comment>Size in bytes of pData</comment></member>
<member len="dataSize">const <type>void</type>* <name>pData</name><comment>Pointer to SpecConstant data</comment></member>
</type>
<type category="struct" name="VkPipelineShaderStageCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineShaderStageCreateFlags</type> <name>flags</name></member>
<member><type>VkShaderStageFlagBits</type> <name>stage</name><comment>Shader stage</comment></member>
<member><type>VkShaderModule</type> <name>module</name><comment>Module containing entry point</comment></member>
<member len="null-terminated">const <type>char</type>* <name>pName</name><comment>Null-terminated entry point name</comment></member>
<member optional="true">const <type>VkSpecializationInfo</type>* <name>pSpecializationInfo</name></member>
</type>
<type category="struct" name="VkComputePipelineCreateInfo">
<member values="VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name><comment>Pipeline creation flags</comment></member>
<member><type>VkPipelineShaderStageCreateInfo</type> <name>stage</name></member>
<member><type>VkPipelineLayout</type> <name>layout</name><comment>Interface layout of the pipeline</comment></member>
<member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name><comment>If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of</comment></member>
<member><type>int32_t</type> <name>basePipelineIndex</name><comment>If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of</comment></member>
</type>
<type category="struct" name="VkVertexInputBindingDescription">
<member><type>uint32_t</type> <name>binding</name><comment>Vertex buffer binding id</comment></member>
<member><type>uint32_t</type> <name>stride</name><comment>Distance between vertices in bytes (0 = no advancement)</comment></member>
<member><type>VkVertexInputRate</type> <name>inputRate</name><comment>The rate at which the vertex data is consumed</comment></member>
</type>
<type category="struct" name="VkVertexInputAttributeDescription">
<member><type>uint32_t</type> <name>location</name><comment>location of the shader vertex attrib</comment></member>
<member><type>uint32_t</type> <name>binding</name><comment>Vertex buffer binding id</comment></member>
<member><type>VkFormat</type> <name>format</name><comment>format of source data</comment></member>
<member><type>uint32_t</type> <name>offset</name><comment>Offset of first element in bytes from base of vertex</comment></member>
</type>
<type category="struct" name="VkPipelineVertexInputStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineVertexInputStateCreateFlags</type> <name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>vertexBindingDescriptionCount</name><comment>number of bindings</comment></member>
<member len="vertexBindingDescriptionCount">const <type>VkVertexInputBindingDescription</type>* <name>pVertexBindingDescriptions</name></member>
<member optional="true"><type>uint32_t</type> <name>vertexAttributeDescriptionCount</name><comment>number of attributes</comment></member>
<member len="vertexAttributeDescriptionCount">const <type>VkVertexInputAttributeDescription</type>* <name>pVertexAttributeDescriptions</name></member>
</type>
<type category="struct" name="VkPipelineInputAssemblyStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineInputAssemblyStateCreateFlags</type> <name>flags</name></member>
<member><type>VkPrimitiveTopology</type> <name>topology</name></member>
<member><type>VkBool32</type> <name>primitiveRestartEnable</name></member>
</type>
<type category="struct" name="VkPipelineTessellationStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineTessellationStateCreateFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>patchControlPoints</name></member>
</type>
<type category="struct" name="VkPipelineViewportStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineViewportStateCreateFlags</type> <name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>viewportCount</name></member>
<member noautovalidity="true" optional="true" len="viewportCount">const <type>VkViewport</type>* <name>pViewports</name></member>
<member optional="true"><type>uint32_t</type> <name>scissorCount</name></member>
<member noautovalidity="true" optional="true" len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></member>
</type>
<type category="struct" name="VkPipelineRasterizationStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineRasterizationStateCreateFlags</type> <name>flags</name></member>
<member><type>VkBool32</type> <name>depthClampEnable</name></member>
<member><type>VkBool32</type> <name>rasterizerDiscardEnable</name></member>
<member><type>VkPolygonMode</type> <name>polygonMode</name><comment>optional (GL45)</comment></member>
<member optional="true"><type>VkCullModeFlags</type> <name>cullMode</name></member>
<member><type>VkFrontFace</type> <name>frontFace</name></member>
<member><type>VkBool32</type> <name>depthBiasEnable</name></member>
<member><type>float</type> <name>depthBiasConstantFactor</name></member>
<member><type>float</type> <name>depthBiasClamp</name></member>
<member><type>float</type> <name>depthBiasSlopeFactor</name></member>
<member><type>float</type> <name>lineWidth</name></member>
</type>
<type category="struct" name="VkPipelineMultisampleStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineMultisampleStateCreateFlags</type> <name>flags</name></member>
<member><type>VkSampleCountFlagBits</type> <name>rasterizationSamples</name><comment>Number of samples used for rasterization</comment></member>
<member><type>VkBool32</type> <name>sampleShadingEnable</name><comment>optional (GL45)</comment></member>
<member><type>float</type> <name>minSampleShading</name><comment>optional (GL45)</comment></member>
<member optional="true" len="latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil]" altlen="(rasterizationSamples + 31) / 32">const <type>VkSampleMask</type>* <name>pSampleMask</name><comment>Array of sampleMask words</comment></member>
<member><type>VkBool32</type> <name>alphaToCoverageEnable</name></member>
<member><type>VkBool32</type> <name>alphaToOneEnable</name></member>
</type>
<type category="struct" name="VkPipelineColorBlendAttachmentState">
<member><type>VkBool32</type> <name>blendEnable</name></member>
<member><type>VkBlendFactor</type> <name>srcColorBlendFactor</name></member>
<member><type>VkBlendFactor</type> <name>dstColorBlendFactor</name></member>
<member><type>VkBlendOp</type> <name>colorBlendOp</name></member>
<member><type>VkBlendFactor</type> <name>srcAlphaBlendFactor</name></member>
<member><type>VkBlendFactor</type> <name>dstAlphaBlendFactor</name></member>
<member><type>VkBlendOp</type> <name>alphaBlendOp</name></member>
<member optional="true"><type>VkColorComponentFlags</type> <name>colorWriteMask</name></member>
</type>
<type category="struct" name="VkPipelineColorBlendStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineColorBlendStateCreateFlags</type> <name>flags</name></member>
<member><type>VkBool32</type> <name>logicOpEnable</name></member>
<member noautovalidity="true"><type>VkLogicOp</type> <name>logicOp</name></member>
<member optional="true"><type>uint32_t</type> <name>attachmentCount</name><comment># of pAttachments</comment></member>
<member len="attachmentCount">const <type>VkPipelineColorBlendAttachmentState</type>* <name>pAttachments</name></member>
<member><type>float</type> <name>blendConstants</name>[4]</member>
</type>
<type category="struct" name="VkPipelineDynamicStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineDynamicStateCreateFlags</type> <name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>dynamicStateCount</name></member>
<member len="dynamicStateCount">const <type>VkDynamicState</type>* <name>pDynamicStates</name></member>
</type>
<type category="struct" name="VkStencilOpState">
<member><type>VkStencilOp</type> <name>failOp</name></member>
<member><type>VkStencilOp</type> <name>passOp</name></member>
<member><type>VkStencilOp</type> <name>depthFailOp</name></member>
<member><type>VkCompareOp</type> <name>compareOp</name></member>
<member><type>uint32_t</type> <name>compareMask</name></member>
<member><type>uint32_t</type> <name>writeMask</name></member>
<member><type>uint32_t</type> <name>reference</name></member>
</type>
<type category="struct" name="VkPipelineDepthStencilStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineDepthStencilStateCreateFlags</type> <name>flags</name></member>
<member><type>VkBool32</type> <name>depthTestEnable</name></member>
<member><type>VkBool32</type> <name>depthWriteEnable</name></member>
<member><type>VkCompareOp</type> <name>depthCompareOp</name></member>
<member><type>VkBool32</type> <name>depthBoundsTestEnable</name><comment>optional (depth_bounds_test)</comment></member>
<member><type>VkBool32</type> <name>stencilTestEnable</name></member>
<member><type>VkStencilOpState</type> <name>front</name></member>
<member><type>VkStencilOpState</type> <name>back</name></member>
<member><type>float</type> <name>minDepthBounds</name></member>
<member><type>float</type> <name>maxDepthBounds</name></member>
</type>
<type category="struct" name="VkGraphicsPipelineCreateInfo">
<member values="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name><comment>Pipeline creation flags</comment></member>
<member><type>uint32_t</type> <name>stageCount</name></member>
<member len="stageCount">const <type>VkPipelineShaderStageCreateInfo</type>* <name>pStages</name><comment>One entry for each active shader stage</comment></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineVertexInputStateCreateInfo</type>* <name>pVertexInputState</name></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineInputAssemblyStateCreateInfo</type>* <name>pInputAssemblyState</name></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineTessellationStateCreateInfo</type>* <name>pTessellationState</name></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineViewportStateCreateInfo</type>* <name>pViewportState</name></member>
<member>const <type>VkPipelineRasterizationStateCreateInfo</type>* <name>pRasterizationState</name></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineMultisampleStateCreateInfo</type>* <name>pMultisampleState</name></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineDepthStencilStateCreateInfo</type>* <name>pDepthStencilState</name></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineColorBlendStateCreateInfo</type>* <name>pColorBlendState</name></member>
<member optional="true">const <type>VkPipelineDynamicStateCreateInfo</type>* <name>pDynamicState</name></member>
<member><type>VkPipelineLayout</type> <name>layout</name><comment>Interface layout of the pipeline</comment></member>
<member><type>VkRenderPass</type> <name>renderPass</name></member>
<member><type>uint32_t</type> <name>subpass</name></member>
<member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name><comment>If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of</comment></member>
<member><type>int32_t</type> <name>basePipelineIndex</name><comment>If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of</comment></member>
</type>
<type category="struct" name="VkPipelineCacheCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCacheCreateFlags</type> <name>flags</name></member>
<member optional="true"><type>size_t</type> <name>initialDataSize</name><comment>Size of initial data to populate cache, in bytes</comment></member>
<member len="initialDataSize">const <type>void</type>* <name>pInitialData</name><comment>Initial data to populate cache</comment></member>
</type>
<type category="struct" name="VkPushConstantRange">
<member><type>VkShaderStageFlags</type> <name>stageFlags</name><comment>Which stages use the range</comment></member>
<member><type>uint32_t</type> <name>offset</name><comment>Start of the range, in bytes</comment></member>
<member><type>uint32_t</type> <name>size</name><comment>Size of the range, in bytes</comment></member>
</type>
<type category="struct" name="VkPipelineLayoutCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineLayoutCreateFlags</type> <name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>setLayoutCount</name><comment>Number of descriptor sets interfaced by the pipeline</comment></member>
<member len="setLayoutCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name><comment>Array of setCount number of descriptor set layout objects defining the layout of the</comment></member>
<member optional="true"><type>uint32_t</type> <name>pushConstantRangeCount</name><comment>Number of push-constant ranges used by the pipeline</comment></member>
<member len="pushConstantRangeCount">const <type>VkPushConstantRange</type>* <name>pPushConstantRanges</name><comment>Array of pushConstantRangeCount number of ranges used by various shader stages</comment></member>
</type>
<type category="struct" name="VkSamplerCreateInfo">
<member values="VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkSamplerCreateFlags</type> <name>flags</name></member>
<member><type>VkFilter</type> <name>magFilter</name><comment>Filter mode for magnification</comment></member>
<member><type>VkFilter</type> <name>minFilter</name><comment>Filter mode for minifiation</comment></member>
<member><type>VkSamplerMipmapMode</type> <name>mipmapMode</name><comment>Mipmap selection mode</comment></member>
<member><type>VkSamplerAddressMode</type> <name>addressModeU</name></member>
<member><type>VkSamplerAddressMode</type> <name>addressModeV</name></member>
<member><type>VkSamplerAddressMode</type> <name>addressModeW</name></member>
<member><type>float</type> <name>mipLodBias</name></member>
<member><type>VkBool32</type> <name>anisotropyEnable</name></member>
<member><type>float</type> <name>maxAnisotropy</name></member>
<member><type>VkBool32</type> <name>compareEnable</name></member>
<member noautovalidity="true"><type>VkCompareOp</type> <name>compareOp</name></member>
<member><type>float</type> <name>minLod</name></member>
<member><type>float</type> <name>maxLod</name></member>
<member noautovalidity="true"><type>VkBorderColor</type> <name>borderColor</name></member>
<member><type>VkBool32</type> <name>unnormalizedCoordinates</name></member>
</type>
<type category="struct" name="VkCommandPoolCreateInfo">
<member values="VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkCommandPoolCreateFlags</type> <name>flags</name><comment>Command pool creation flags</comment></member>
<member><type>uint32_t</type> <name>queueFamilyIndex</name></member>
</type>
<type category="struct" name="VkCommandBufferAllocateInfo">
<member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkCommandPool</type> <name>commandPool</name></member>
<member><type>VkCommandBufferLevel</type> <name>level</name></member>
<member><type>uint32_t</type> <name>commandBufferCount</name></member>
</type>
<type category="struct" name="VkCommandBufferInheritanceInfo">
<member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true" noautovalidity="true"><type>VkRenderPass</type> <name>renderPass</name><comment>Render pass for secondary command buffers</comment></member>
<member><type>uint32_t</type> <name>subpass</name></member>
<member optional="true" noautovalidity="true"><type>VkFramebuffer</type> <name>framebuffer</name><comment>Framebuffer for secondary command buffers</comment></member>
<member><type>VkBool32</type> <name>occlusionQueryEnable</name><comment>Whether this secondary command buffer may be executed during an occlusion query</comment></member>
<member optional="true" noautovalidity="true"><type>VkQueryControlFlags</type> <name>queryFlags</name><comment>Query flags used by this secondary command buffer, if executed during an occlusion query</comment></member>
<member optional="true" noautovalidity="true"><type>VkQueryPipelineStatisticFlags</type> <name>pipelineStatistics</name><comment>Pipeline statistics that may be counted for this secondary command buffer</comment></member>
</type>
<type category="struct" name="VkCommandBufferBeginInfo">
<member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkCommandBufferUsageFlags</type> <name>flags</name><comment>Command buffer usage flags</comment></member>
<member optional="true" noautovalidity="true">const <type>VkCommandBufferInheritanceInfo</type>* <name>pInheritanceInfo</name><comment>Pointer to inheritance info for secondary command buffers</comment></member>
</type>
<type category="struct" name="VkRenderPassBeginInfo">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkRenderPass</type> <name>renderPass</name></member>
<member><type>VkFramebuffer</type> <name>framebuffer</name></member>
<member><type>VkRect2D</type> <name>renderArea</name></member>
<member optional="true"><type>uint32_t</type> <name>clearValueCount</name></member>
<member len="clearValueCount" noautovalidity="true">const <type>VkClearValue</type>* <name>pClearValues</name></member>
</type>
<type category="union" name="VkClearColorValue" comment="// Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared.">
<member><type>float</type> <name>float32</name>[4]</member>
<member><type>int32_t</type> <name>int32</name>[4]</member>
<member><type>uint32_t</type> <name>uint32</name>[4]</member>
</type>
<type category="struct" name="VkClearDepthStencilValue">
<member><type>float</type> <name>depth</name></member>
<member><type>uint32_t</type> <name>stencil</name></member>
</type>
<type category="union" name="VkClearValue" comment="// Union allowing specification of color or depth and stencil values. Actual value selected is based on attachment being cleared.">
<member noautovalidity="true"><type>VkClearColorValue</type> <name>color</name></member>
<member><type>VkClearDepthStencilValue</type> <name>depthStencil</name></member>
</type>
<type category="struct" name="VkClearAttachment">
<member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
<member><type>uint32_t</type> <name>colorAttachment</name></member>
<member noautovalidity="true"><type>VkClearValue</type> <name>clearValue</name></member>
</type>
<type category="struct" name="VkAttachmentDescription">
<member optional="true"><type>VkAttachmentDescriptionFlags</type> <name>flags</name></member>
<member><type>VkFormat</type> <name>format</name></member>
<member><type>VkSampleCountFlagBits</type> <name>samples</name></member>
<member><type>VkAttachmentLoadOp</type> <name>loadOp</name><comment>Load operation for color or depth data</comment></member>
<member><type>VkAttachmentStoreOp</type> <name>storeOp</name><comment>Store operation for color or depth data</comment></member>
<member><type>VkAttachmentLoadOp</type> <name>stencilLoadOp</name><comment>Load operation for stencil data</comment></member>
<member><type>VkAttachmentStoreOp</type> <name>stencilStoreOp</name><comment>Store operation for stencil data</comment></member>
<member><type>VkImageLayout</type> <name>initialLayout</name></member>
<member><type>VkImageLayout</type> <name>finalLayout</name></member>
</type>
<type category="struct" name="VkAttachmentReference">
<member><type>uint32_t</type> <name>attachment</name></member>
<member><type>VkImageLayout</type> <name>layout</name></member>
</type>
<type category="struct" name="VkSubpassDescription">
<member optional="true"><type>VkSubpassDescriptionFlags</type> <name>flags</name></member>
<member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name><comment>Must be VK_PIPELINE_BIND_POINT_GRAPHICS for now</comment></member>
<member optional="true"><type>uint32_t</type> <name>inputAttachmentCount</name></member>
<member len="inputAttachmentCount">const <type>VkAttachmentReference</type>* <name>pInputAttachments</name></member>
<member optional="true"><type>uint32_t</type> <name>colorAttachmentCount</name></member>
<member len="colorAttachmentCount">const <type>VkAttachmentReference</type>* <name>pColorAttachments</name></member>
<member optional="true" len="colorAttachmentCount">const <type>VkAttachmentReference</type>* <name>pResolveAttachments</name></member>
<member optional="true">const <type>VkAttachmentReference</type>* <name>pDepthStencilAttachment</name></member>
<member optional="true"><type>uint32_t</type> <name>preserveAttachmentCount</name></member>
<member len="preserveAttachmentCount">const <type>uint32_t</type>* <name>pPreserveAttachments</name></member>
</type>
<type category="struct" name="VkSubpassDependency">
<member><type>uint32_t</type> <name>srcSubpass</name></member>
<member><type>uint32_t</type> <name>dstSubpass</name></member>
<member optional="true"><type>VkPipelineStageFlags</type> <name>srcStageMask</name></member>
<member optional="true"><type>VkPipelineStageFlags</type> <name>dstStageMask</name></member>
<member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name><comment>Memory accesses from the source of the dependency to synchronize</comment></member>
<member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name><comment>Memory accesses from the destination of the dependency to synchronize</comment></member>
<member optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></member>
</type>
<type category="struct" name="VkRenderPassCreateInfo">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkRenderPassCreateFlags</type> <name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member>
<member len="attachmentCount">const <type>VkAttachmentDescription</type>* <name>pAttachments</name></member>
<member><type>uint32_t</type> <name>subpassCount</name></member>
<member len="subpassCount">const <type>VkSubpassDescription</type>* <name>pSubpasses</name></member>
<member optional="true"><type>uint32_t</type> <name>dependencyCount</name></member>
<member len="dependencyCount">const <type>VkSubpassDependency</type>* <name>pDependencies</name></member>
</type>
<type category="struct" name="VkEventCreateInfo">
<member values="VK_STRUCTURE_TYPE_EVENT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkEventCreateFlags</type> <name>flags</name><comment>Event creation flags</comment></member>
</type>
<type category="struct" name="VkFenceCreateInfo">
<member values="VK_STRUCTURE_TYPE_FENCE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkFenceCreateFlags</type> <name>flags</name><comment>Fence creation flags</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceFeatures">
<member><type>VkBool32</type> <name>robustBufferAccess</name><comment>out of bounds buffer accesses are well defined</comment></member>
<member><type>VkBool32</type> <name>fullDrawIndexUint32</name><comment>full 32-bit range of indices for indexed draw calls</comment></member>
<member><type>VkBool32</type> <name>imageCubeArray</name><comment>image views which are arrays of cube maps</comment></member>
<member><type>VkBool32</type> <name>independentBlend</name><comment>blending operations are controlled per-attachment</comment></member>
<member><type>VkBool32</type> <name>geometryShader</name><comment>geometry stage</comment></member>
<member><type>VkBool32</type> <name>tessellationShader</name><comment>tessellation control and evaluation stage</comment></member>
<member><type>VkBool32</type> <name>sampleRateShading</name><comment>per-sample shading and interpolation</comment></member>
<member><type>VkBool32</type> <name>dualSrcBlend</name><comment>blend operations which take two sources</comment></member>
<member><type>VkBool32</type> <name>logicOp</name><comment>logic operations</comment></member>
<member><type>VkBool32</type> <name>multiDrawIndirect</name><comment>multi draw indirect</comment></member>
<member><type>VkBool32</type> <name>drawIndirectFirstInstance</name><comment>indirect draws can use non-zero firstInstance</comment></member>
<member><type>VkBool32</type> <name>depthClamp</name><comment>depth clamping</comment></member>
<member><type>VkBool32</type> <name>depthBiasClamp</name><comment>depth bias clamping</comment></member>
<member><type>VkBool32</type> <name>fillModeNonSolid</name><comment>point and wireframe fill modes</comment></member>
<member><type>VkBool32</type> <name>depthBounds</name><comment>depth bounds test</comment></member>
<member><type>VkBool32</type> <name>wideLines</name><comment>lines with width greater than 1</comment></member>
<member><type>VkBool32</type> <name>largePoints</name><comment>points with size greater than 1</comment></member>
<member><type>VkBool32</type> <name>alphaToOne</name><comment>the fragment alpha component can be forced to maximum representable alpha value</comment></member>
<member><type>VkBool32</type> <name>multiViewport</name><comment>viewport arrays</comment></member>
<member><type>VkBool32</type> <name>samplerAnisotropy</name><comment>anisotropic sampler filtering</comment></member>
<member><type>VkBool32</type> <name>textureCompressionETC2</name><comment>ETC texture compression formats</comment></member>
<member><type>VkBool32</type> <name>textureCompressionASTC_LDR</name><comment>ASTC LDR texture compression formats</comment></member>
<member><type>VkBool32</type> <name>textureCompressionBC</name><comment>BC1-7 texture compressed formats</comment></member>
<member><type>VkBool32</type> <name>occlusionQueryPrecise</name><comment>precise occlusion queries returning actual sample counts</comment></member>
<member><type>VkBool32</type> <name>pipelineStatisticsQuery</name><comment>pipeline statistics query</comment></member>
<member><type>VkBool32</type> <name>vertexPipelineStoresAndAtomics</name><comment>stores and atomic ops on storage buffers and images are supported in vertex, tessellation, and geometry stages</comment></member>
<member><type>VkBool32</type> <name>fragmentStoresAndAtomics</name><comment>stores and atomic ops on storage buffers and images are supported in the fragment stage</comment></member>
<member><type>VkBool32</type> <name>shaderTessellationAndGeometryPointSize</name><comment>tessellation and geometry stages can export point size</comment></member>
<member><type>VkBool32</type> <name>shaderImageGatherExtended</name><comment>image gather with run-time values and independent offsets</comment></member>
<member><type>VkBool32</type> <name>shaderStorageImageExtendedFormats</name><comment>the extended set of formats can be used for storage images</comment></member>
<member><type>VkBool32</type> <name>shaderStorageImageMultisample</name><comment>multisample images can be used for storage images</comment></member>
<member><type>VkBool32</type> <name>shaderStorageImageReadWithoutFormat</name><comment>read from storage image does not require format qualifier</comment></member>
<member><type>VkBool32</type> <name>shaderStorageImageWriteWithoutFormat</name><comment>write to storage image does not require format qualifier</comment></member>
<member><type>VkBool32</type> <name>shaderUniformBufferArrayDynamicIndexing</name><comment>arrays of uniform buffers can be accessed with dynamically uniform indices</comment></member>
<member><type>VkBool32</type> <name>shaderSampledImageArrayDynamicIndexing</name><comment>arrays of sampled images can be accessed with dynamically uniform indices</comment></member>
<member><type>VkBool32</type> <name>shaderStorageBufferArrayDynamicIndexing</name><comment>arrays of storage buffers can be accessed with dynamically uniform indices</comment></member>
<member><type>VkBool32</type> <name>shaderStorageImageArrayDynamicIndexing</name><comment>arrays of storage images can be accessed with dynamically uniform indices</comment></member>
<member><type>VkBool32</type> <name>shaderClipDistance</name><comment>clip distance in shaders</comment></member>
<member><type>VkBool32</type> <name>shaderCullDistance</name><comment>cull distance in shaders</comment></member>
<member><type>VkBool32</type> <name>shaderFloat64</name><comment>64-bit floats (doubles) in shaders</comment></member>
<member><type>VkBool32</type> <name>shaderInt64</name><comment>64-bit integers in shaders</comment></member>
<member><type>VkBool32</type> <name>shaderInt16</name><comment>16-bit integers in shaders</comment></member>
<member><type>VkBool32</type> <name>shaderResourceResidency</name><comment>shader can use texture operations that return resource residency information (requires sparseNonResident support)</comment></member>
<member><type>VkBool32</type> <name>shaderResourceMinLod</name><comment>shader can use texture operations that specify minimum resource LOD</comment></member>
<member><type>VkBool32</type> <name>sparseBinding</name><comment>Sparse resources support: Resource memory can be managed at opaque page level rather than object level</comment></member>
<member><type>VkBool32</type> <name>sparseResidencyBuffer</name><comment>Sparse resources support: GPU can access partially resident buffers </comment></member>
<member><type>VkBool32</type> <name>sparseResidencyImage2D</name><comment>Sparse resources support: GPU can access partially resident 2D (non-MSAA non-depth/stencil) images </comment></member>
<member><type>VkBool32</type> <name>sparseResidencyImage3D</name><comment>Sparse resources support: GPU can access partially resident 3D images </comment></member>
<member><type>VkBool32</type> <name>sparseResidency2Samples</name><comment>Sparse resources support: GPU can access partially resident MSAA 2D images with 2 samples</comment></member>
<member><type>VkBool32</type> <name>sparseResidency4Samples</name><comment>Sparse resources support: GPU can access partially resident MSAA 2D images with 4 samples</comment></member>
<member><type>VkBool32</type> <name>sparseResidency8Samples</name><comment>Sparse resources support: GPU can access partially resident MSAA 2D images with 8 samples</comment></member>
<member><type>VkBool32</type> <name>sparseResidency16Samples</name><comment>Sparse resources support: GPU can access partially resident MSAA 2D images with 16 samples</comment></member>
<member><type>VkBool32</type> <name>sparseResidencyAliased</name><comment>Sparse resources support: GPU can correctly access data aliased into multiple locations (opt-in)</comment></member>
<member><type>VkBool32</type> <name>variableMultisampleRate</name><comment>multisample rate must be the same for all pipelines in a subpass</comment></member>
<member><type>VkBool32</type> <name>inheritedQueries</name><comment>Queries may be inherited from primary to secondary command buffers</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceSparseProperties" returnedonly="true">
<member limittype="bitmask"><type>VkBool32</type> <name>residencyStandard2DBlockShape</name><comment>Sparse resources support: GPU will access all 2D (single sample) sparse resources using the standard sparse image block shapes (based on pixel format)</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>residencyStandard2DMultisampleBlockShape</name><comment>Sparse resources support: GPU will access all 2D (multisample) sparse resources using the standard sparse image block shapes (based on pixel format)</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>residencyStandard3DBlockShape</name><comment>Sparse resources support: GPU will access all 3D sparse resources using the standard sparse image block shapes (based on pixel format)</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>residencyAlignedMipSize</name><comment>Sparse resources support: Images with mip level dimensions that are NOT a multiple of the sparse image block dimensions will be placed in the mip tail</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>residencyNonResidentStrict</name><comment>Sparse resources support: GPU can consistently access non-resident regions of a resource, all reads return as if data is 0, writes are discarded</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceLimits" returnedonly="true">
<comment>resource maximum sizes</comment>
<member limittype="max"><type>uint32_t</type> <name>maxImageDimension1D</name><comment>max 1D image dimension</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxImageDimension2D</name><comment>max 2D image dimension</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxImageDimension3D</name><comment>max 3D image dimension</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxImageDimensionCube</name><comment>max cubemap image dimension</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxImageArrayLayers</name><comment>max layers for image arrays</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTexelBufferElements</name><comment>max texel buffer size (fstexels)</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxUniformBufferRange</name><comment>max uniform buffer range (bytes)</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxStorageBufferRange</name><comment>max storage buffer range (bytes)</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxPushConstantsSize</name><comment>max size of the push constants pool (bytes)</comment></member>
<comment>memory limits</comment>
<member limittype="max"><type>uint32_t</type> <name>maxMemoryAllocationCount</name><comment>max number of device memory allocations supported</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxSamplerAllocationCount</name><comment>max number of samplers that can be allocated on a device</comment></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>bufferImageGranularity</name><comment>Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage</comment></member>
<member limittype="max"><type>VkDeviceSize</type> <name>sparseAddressSpaceSize</name><comment>Total address space available for sparse allocations (bytes)</comment></member>
<comment>descriptor set limits</comment>
<member limittype="max"><type>uint32_t</type> <name>maxBoundDescriptorSets</name><comment>max number of descriptors sets that can be bound to a pipeline</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorSamplers</name><comment>max number of samplers allowed per-stage in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUniformBuffers</name><comment>max number of uniform buffers allowed per-stage in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorStorageBuffers</name><comment>max number of storage buffers allowed per-stage in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorSampledImages</name><comment>max number of sampled images allowed per-stage in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorStorageImages</name><comment>max number of storage images allowed per-stage in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorInputAttachments</name><comment>max number of input attachments allowed per-stage in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageResources</name><comment>max number of resources allowed by a single stage</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetSamplers</name><comment>max number of samplers allowed in all stages in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUniformBuffers</name><comment>max number of uniform buffers allowed in all stages in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUniformBuffersDynamic</name><comment>max number of dynamic uniform buffers allowed in all stages in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetStorageBuffers</name><comment>max number of storage buffers allowed in all stages in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetStorageBuffersDynamic</name><comment>max number of dynamic storage buffers allowed in all stages in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetSampledImages</name><comment>max number of sampled images allowed in all stages in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetStorageImages</name><comment>max number of storage images allowed in all stages in a descriptor set</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetInputAttachments</name><comment>max number of input attachments allowed in all stages in a descriptor set</comment></member>
<comment>vertex stage limits</comment>
<member limittype="max"><type>uint32_t</type> <name>maxVertexInputAttributes</name><comment>max number of vertex input attribute slots</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxVertexInputBindings</name><comment>max number of vertex input binding slots</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxVertexInputAttributeOffset</name><comment>max vertex input attribute offset added to vertex buffer offset</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxVertexInputBindingStride</name><comment>max vertex input binding stride</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxVertexOutputComponents</name><comment>max number of output components written by vertex shader</comment></member>
<comment>tessellation control stage limits</comment>
<member limittype="max"><type>uint32_t</type> <name>maxTessellationGenerationLevel</name><comment>max level supported by tessellation primitive generator</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTessellationPatchSize</name><comment>max patch size (vertices)</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTessellationControlPerVertexInputComponents</name><comment>max number of input components per-vertex in TCS</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTessellationControlPerVertexOutputComponents</name><comment>max number of output components per-vertex in TCS</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTessellationControlPerPatchOutputComponents</name><comment>max number of output components per-patch in TCS</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTessellationControlTotalOutputComponents</name><comment>max total number of per-vertex and per-patch output components in TCS</comment></member>
<comment>tessellation evaluation stage limits</comment>
<member limittype="max"><type>uint32_t</type> <name>maxTessellationEvaluationInputComponents</name><comment>max number of input components per vertex in TES</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTessellationEvaluationOutputComponents</name><comment>max number of output components per vertex in TES</comment></member>
<comment>geometry stage limits</comment>
<member limittype="max"><type>uint32_t</type> <name>maxGeometryShaderInvocations</name><comment>max invocation count supported in geometry shader</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxGeometryInputComponents</name><comment>max number of input components read in geometry stage</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxGeometryOutputComponents</name><comment>max number of output components written in geometry stage</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxGeometryOutputVertices</name><comment>max number of vertices that can be emitted in geometry stage</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxGeometryTotalOutputComponents</name><comment>max total number of components (all vertices) written in geometry stage</comment></member>
<comment>fragment stage limits</comment>
<member limittype="max"><type>uint32_t</type> <name>maxFragmentInputComponents</name><comment>max number of input components read in fragment stage</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxFragmentOutputAttachments</name><comment>max number of output attachments written in fragment stage</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxFragmentDualSrcAttachments</name><comment>max number of output attachments written when using dual source blending</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxFragmentCombinedOutputResources</name><comment>max total number of storage buffers, storage images and output buffers</comment></member>
<comment>compute stage limits</comment>
<member limittype="max"><type>uint32_t</type> <name>maxComputeSharedMemorySize</name><comment>max total storage size of work group local storage (bytes)</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxComputeWorkGroupCount</name>[3]<comment>max num of compute work groups that may be dispatched by a single command (x,y,z)</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxComputeWorkGroupInvocations</name><comment>max total compute invocations in a single local work group</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxComputeWorkGroupSize</name>[3]<comment>max local size of a compute work group (x,y,z)</comment></member>
<member limittype="noauto"><type>uint32_t</type> <name>subPixelPrecisionBits</name><comment>number bits of subpixel precision in screen x and y</comment></member>
<member limittype="noauto"><type>uint32_t</type> <name>subTexelPrecisionBits</name><comment>number bits of precision for selecting texel weights</comment></member>
<member limittype="noauto"><type>uint32_t</type> <name>mipmapPrecisionBits</name><comment>number bits of precision for selecting mipmap weights</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDrawIndexedIndexValue</name><comment>max index value for indexed draw calls (for 32-bit indices)</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxDrawIndirectCount</name><comment>max draw count for indirect draw calls</comment></member>
<member limittype="max"><type>float</type> <name>maxSamplerLodBias</name><comment>max absolute sampler LOD bias</comment></member>
<member limittype="max"><type>float</type> <name>maxSamplerAnisotropy</name><comment>max degree of sampler anisotropy</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxViewports</name><comment>max number of active viewports</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxViewportDimensions</name>[2]<comment>max viewport dimensions (x,y)</comment></member>
<member limittype="range"><type>float</type> <name>viewportBoundsRange</name>[2]<comment>viewport bounds range (min,max)</comment></member>
<member limittype="noauto"><type>uint32_t</type> <name>viewportSubPixelBits</name><comment>number bits of subpixel precision for viewport</comment></member>
<member limittype="noauto"><type>size_t</type> <name>minMemoryMapAlignment</name><comment>min required alignment of pointers returned by MapMemory (bytes)</comment></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>minTexelBufferOffsetAlignment</name><comment>min required alignment for texel buffer offsets (bytes) </comment></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>minUniformBufferOffsetAlignment</name><comment>min required alignment for uniform buffer sizes and offsets (bytes)</comment></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>minStorageBufferOffsetAlignment</name><comment>min required alignment for storage buffer offsets (bytes)</comment></member>
<member limittype="min"><type>int32_t</type> <name>minTexelOffset</name><comment>min texel offset for OpTextureSampleOffset</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTexelOffset</name><comment>max texel offset for OpTextureSampleOffset</comment></member>
<member limittype="min"><type>int32_t</type> <name>minTexelGatherOffset</name><comment>min texel offset for OpTextureGatherOffset</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxTexelGatherOffset</name><comment>max texel offset for OpTextureGatherOffset</comment></member>
<member limittype="min"><type>float</type> <name>minInterpolationOffset</name><comment>furthest negative offset for interpolateAtOffset</comment></member>
<member limittype="max"><type>float</type> <name>maxInterpolationOffset</name><comment>furthest positive offset for interpolateAtOffset</comment></member>
<member limittype="noauto"><type>uint32_t</type> <name>subPixelInterpolationOffsetBits</name><comment>number of subpixel bits for interpolateAtOffset</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxFramebufferWidth</name><comment>max width for a framebuffer</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxFramebufferHeight</name><comment>max height for a framebuffer</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxFramebufferLayers</name><comment>max layer count for a layered framebuffer</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>framebufferColorSampleCounts</name><comment>supported color sample counts for a framebuffer</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>framebufferDepthSampleCounts</name><comment>supported depth sample counts for a framebuffer</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>framebufferStencilSampleCounts</name><comment>supported stencil sample counts for a framebuffer</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>framebufferNoAttachmentsSampleCounts</name><comment>supported sample counts for a subpass which uses no attachments</comment></member>
<member limittype="bitmask"><type>uint32_t</type> <name>maxColorAttachments</name><comment>max number of color attachments per subpass</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>sampledImageColorSampleCounts</name><comment>supported color sample counts for a non-integer sampled image</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>sampledImageIntegerSampleCounts</name><comment>supported sample counts for an integer image</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>sampledImageDepthSampleCounts</name><comment>supported depth sample counts for a sampled image</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>sampledImageStencilSampleCounts</name><comment>supported stencil sample counts for a sampled image</comment></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>storageImageSampleCounts</name><comment>supported sample counts for a storage image</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxSampleMaskWords</name><comment>max number of sample mask words</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>timestampComputeAndGraphics</name><comment>timestamps on graphics and compute queues</comment></member>
<member limittype="noauto"><type>float</type> <name>timestampPeriod</name><comment>number of nanoseconds it takes for timestamp query value to increment by 1</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxClipDistances</name><comment>max number of clip distances</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxCullDistances</name><comment>max number of cull distances</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxCombinedClipAndCullDistances</name><comment>max combined number of user clipping</comment></member>
<member limittype="max"><type>uint32_t</type> <name>discreteQueuePriorities</name><comment>distinct queue priorities available </comment></member>
<member limittype="range"><type>float</type> <name>pointSizeRange</name>[2]<comment>range (min,max) of supported point sizes</comment></member>
<member limittype="range"><type>float</type> <name>lineWidthRange</name>[2]<comment>range (min,max) of supported line widths</comment></member>
<member limittype="max"><type>float</type> <name>pointSizeGranularity</name><comment>granularity of supported point sizes</comment></member>
<member limittype="max"><type>float</type> <name>lineWidthGranularity</name><comment>granularity of supported line widths</comment></member>
<member limittype="noauto"><type>VkBool32</type> <name>strictLines</name><comment>line rasterization follows preferred rules</comment></member>
<member limittype="noauto"><type>VkBool32</type> <name>standardSampleLocations</name><comment>supports standard sample locations for all supported sample counts</comment></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>optimalBufferCopyOffsetAlignment</name><comment>optimal offset of buffer copies</comment></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>optimalBufferCopyRowPitchAlignment</name><comment>optimal pitch of buffer copies</comment></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>nonCoherentAtomSize</name><comment>minimum size and alignment for non-coherent host-mapped device memory access</comment></member>
</type>
<type category="struct" name="VkSemaphoreCreateInfo">
<member values="VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkSemaphoreCreateFlags</type> <name>flags</name><comment>Semaphore creation flags</comment></member>
</type>
<type category="struct" name="VkQueryPoolCreateInfo">
<member values="VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkQueryPoolCreateFlags</type> <name>flags</name></member>
<member><type>VkQueryType</type> <name>queryType</name></member>
<member><type>uint32_t</type> <name>queryCount</name></member>
<member optional="true" noautovalidity="true"><type>VkQueryPipelineStatisticFlags</type> <name>pipelineStatistics</name><comment>Optional</comment></member>
</type>
<type category="struct" name="VkFramebufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkFramebufferCreateFlags</type> <name>flags</name></member>
<member><type>VkRenderPass</type> <name>renderPass</name></member>
<member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member>
<member noautovalidity="true" len="attachmentCount">const <type>VkImageView</type>* <name>pAttachments</name></member>
<member><type>uint32_t</type> <name>width</name></member>
<member><type>uint32_t</type> <name>height</name></member>
<member><type>uint32_t</type> <name>layers</name></member>
</type>
<type category="struct" name="VkDrawIndirectCommand">
<member><type>uint32_t</type> <name>vertexCount</name></member>
<member><type>uint32_t</type> <name>instanceCount</name></member>
<member><type>uint32_t</type> <name>firstVertex</name></member>
<member noautovalidity="true"><type>uint32_t</type> <name>firstInstance</name></member>
</type>
<type category="struct" name="VkDrawIndexedIndirectCommand">
<member><type>uint32_t</type> <name>indexCount</name></member>
<member><type>uint32_t</type> <name>instanceCount</name></member>
<member><type>uint32_t</type> <name>firstIndex</name></member>
<member><type>int32_t</type> <name>vertexOffset</name></member>
<member noautovalidity="true"><type>uint32_t</type> <name>firstInstance</name></member>
</type>
<type category="struct" name="VkDispatchIndirectCommand">
<member noautovalidity="true"><type>uint32_t</type> <name>x</name></member>
<member noautovalidity="true"><type>uint32_t</type> <name>y</name></member>
<member noautovalidity="true"><type>uint32_t</type> <name>z</name></member>
</type>
<type category="struct" name="VkSubmitInfo">
<member values="VK_STRUCTURE_TYPE_SUBMIT_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member>
<member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></member>
<member len="waitSemaphoreCount">const <type>VkPipelineStageFlags</type>* <name>pWaitDstStageMask</name></member>
<member optional="true"><type>uint32_t</type> <name>commandBufferCount</name></member>
<member len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></member>
<member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member>
<member len="signalSemaphoreCount">const <type>VkSemaphore</type>* <name>pSignalSemaphores</name></member>
</type>
<comment>WSI extensions</comment>
<type category="struct" name="VkDisplayPropertiesKHR" returnedonly="true">
<member><type>VkDisplayKHR</type> <name>display</name><comment>Handle of the display object</comment></member>
<member len="null-terminated">const <type>char</type>* <name>displayName</name><comment>Name of the display</comment></member>
<member><type>VkExtent2D</type> <name>physicalDimensions</name><comment>In millimeters?</comment></member>
<member><type>VkExtent2D</type> <name>physicalResolution</name><comment>Max resolution for CRT?</comment></member>
<member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name><comment>one or more bits from VkSurfaceTransformFlagsKHR</comment></member>
<member><type>VkBool32</type> <name>planeReorderPossible</name><comment>VK_TRUE if the overlay plane's z-order can be changed on this display.</comment></member>
<member><type>VkBool32</type> <name>persistentContent</name><comment>VK_TRUE if this is a "smart" display that supports self-refresh/internal buffering.</comment></member>
</type>
<type category="struct" name="VkDisplayPlanePropertiesKHR" returnedonly="true">
<member><type>VkDisplayKHR</type> <name>currentDisplay</name><comment>Display the plane is currently associated with. Will be VK_NULL_HANDLE if the plane is not in use.</comment></member>
<member><type>uint32_t</type> <name>currentStackIndex</name><comment>Current z-order of the plane.</comment></member>
</type>
<type category="struct" name="VkDisplayModeParametersKHR">
<member><type>VkExtent2D</type> <name>visibleRegion</name><comment>Visible scanout region.</comment></member>
<member noautovalidity="true"><type>uint32_t</type> <name>refreshRate</name><comment>Number of times per second the display is updated.</comment></member>
</type>
<type category="struct" name="VkDisplayModePropertiesKHR" returnedonly="true">
<member><type>VkDisplayModeKHR</type> <name>displayMode</name><comment>Handle of this display mode.</comment></member>
<member><type>VkDisplayModeParametersKHR</type> <name>parameters</name><comment>The parameters this mode uses.</comment></member>
</type>
<type category="struct" name="VkDisplayModeCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDisplayModeCreateFlagsKHR</type> <name>flags</name></member>
<member><type>VkDisplayModeParametersKHR</type> <name>parameters</name><comment>The parameters this mode uses.</comment></member>
</type>
<type category="struct" name="VkDisplayPlaneCapabilitiesKHR" returnedonly="true">
<member optional="true"><type>VkDisplayPlaneAlphaFlagsKHR</type> <name>supportedAlpha</name><comment>Types of alpha blending supported, if any.</comment></member>
<member><type>VkOffset2D</type> <name>minSrcPosition</name><comment>Does the plane have any position and extent restrictions?</comment></member>
<member><type>VkOffset2D</type> <name>maxSrcPosition</name></member>
<member><type>VkExtent2D</type> <name>minSrcExtent</name></member>
<member><type>VkExtent2D</type> <name>maxSrcExtent</name></member>
<member><type>VkOffset2D</type> <name>minDstPosition</name></member>
<member><type>VkOffset2D</type> <name>maxDstPosition</name></member>
<member><type>VkExtent2D</type> <name>minDstExtent</name></member>
<member><type>VkExtent2D</type> <name>maxDstExtent</name></member>
</type>
<type category="struct" name="VkDisplaySurfaceCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDisplaySurfaceCreateFlagsKHR</type> <name>flags</name></member>
<member><type>VkDisplayModeKHR</type> <name>displayMode</name><comment>The mode to use when displaying this surface</comment></member>
<member><type>uint32_t</type> <name>planeIndex</name><comment>The plane on which this surface appears. Must be between 0 and the value returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR() in pPropertyCount.</comment></member>
<member><type>uint32_t</type> <name>planeStackIndex</name><comment>The z-order of the plane.</comment></member>
<member><type>VkSurfaceTransformFlagBitsKHR</type> <name>transform</name><comment>Transform to apply to the images as part of the scanout operation</comment></member>
<member><type>float</type> <name>globalAlpha</name><comment>Global alpha value. Must be between 0 and 1, inclusive. Ignored if alphaMode is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR</comment></member>
<member><type>VkDisplayPlaneAlphaFlagBitsKHR</type> <name>alphaMode</name><comment>What type of alpha blending to use. Must be a bit from vkGetDisplayPlanePropertiesKHR::supportedAlpha.</comment></member>
<member><type>VkExtent2D</type> <name>imageExtent</name><comment>size of the images to use with this surface</comment></member>
</type>
<type category="struct" name="VkDisplayPresentInfoKHR" structextends="VkPresentInfoKHR">
<member values="VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkRect2D</type> <name>srcRect</name><comment>Rectangle within the presentable image to read pixel data from when presenting to the display.</comment></member>
<member><type>VkRect2D</type> <name>dstRect</name><comment>Rectangle within the current display mode's visible region to display srcRectangle in.</comment></member>
<member><type>VkBool32</type> <name>persistent</name><comment>For smart displays, use buffered mode. If the display properties member "persistentMode" is VK_FALSE, this member must always be VK_FALSE.</comment></member>
</type>
<type category="struct" name="VkSurfaceCapabilitiesKHR" returnedonly="true">
<member><type>uint32_t</type> <name>minImageCount</name><comment>Supported minimum number of images for the surface</comment></member>
<member><type>uint32_t</type> <name>maxImageCount</name><comment>Supported maximum number of images for the surface, 0 for unlimited</comment></member>
<member><type>VkExtent2D</type> <name>currentExtent</name><comment>Current image width and height for the surface, (0, 0) if undefined</comment></member>
<member><type>VkExtent2D</type> <name>minImageExtent</name><comment>Supported minimum image width and height for the surface</comment></member>
<member><type>VkExtent2D</type> <name>maxImageExtent</name><comment>Supported maximum image width and height for the surface</comment></member>
<member><type>uint32_t</type> <name>maxImageArrayLayers</name><comment>Supported maximum number of image layers for the surface</comment></member>
<member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name><comment>1 or more bits representing the transforms supported</comment></member>
<member><type>VkSurfaceTransformFlagBitsKHR</type> <name>currentTransform</name><comment>The surface's current transform relative to the device's natural orientation</comment></member>
<member optional="true"><type>VkCompositeAlphaFlagsKHR</type> <name>supportedCompositeAlpha</name><comment>1 or more bits representing the alpha compositing modes supported</comment></member>
<member optional="true"><type>VkImageUsageFlags</type> <name>supportedUsageFlags</name><comment>Supported image usage flags for the surface</comment></member>
</type>
<type category="struct" name="VkAndroidSurfaceCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkAndroidSurfaceCreateFlagsKHR</type> <name>flags</name></member>
<member noautovalidity="true">struct <type>ANativeWindow</type>* <name>window</name></member>
</type>
<type category="struct" name="VkViSurfaceCreateInfoNN">
<member values="VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkViSurfaceCreateFlagsNN</type> <name>flags</name></member>
<member noautovalidity="true"><type>void</type>* <name>window</name></member>
</type>
<type category="struct" name="VkWaylandSurfaceCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkWaylandSurfaceCreateFlagsKHR</type> <name>flags</name></member>
<member noautovalidity="true">struct <type>wl_display</type>* <name>display</name></member>
<member noautovalidity="true">struct <type>wl_surface</type>* <name>surface</name></member>
</type>
<type category="struct" name="VkWin32SurfaceCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkWin32SurfaceCreateFlagsKHR</type> <name>flags</name></member>
<member><type>HINSTANCE</type> <name>hinstance</name></member>
<member><type>HWND</type> <name>hwnd</name></member>
</type>
<type category="struct" name="VkXlibSurfaceCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkXlibSurfaceCreateFlagsKHR</type> <name>flags</name></member>
<member noautovalidity="true"><type>Display</type>* <name>dpy</name></member>
<member><type>Window</type> <name>window</name></member>
</type>
<type category="struct" name="VkXcbSurfaceCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkXcbSurfaceCreateFlagsKHR</type> <name>flags</name></member>
<member noautovalidity="true"><type>xcb_connection_t</type>* <name>connection</name></member>
<member><type>xcb_window_t</type> <name>window</name></member>
</type>
<type category="struct" name="VkDirectFBSurfaceCreateInfoEXT">
<member values="VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDirectFBSurfaceCreateFlagsEXT</type> <name>flags</name></member>
<member noautovalidity="true"><type>IDirectFB</type>* <name>dfb</name></member>
<member noautovalidity="true"><type>IDirectFBSurface</type>* <name>surface</name></member>
</type>
<type category="struct" name="VkImagePipeSurfaceCreateInfoFUCHSIA">
<member values="VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkImagePipeSurfaceCreateFlagsFUCHSIA</type> <name>flags</name></member>
<member><type>zx_handle_t</type> <name>imagePipeHandle</name></member>
</type>
<type category="struct" name="VkStreamDescriptorSurfaceCreateInfoGGP">
<member values="VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkStreamDescriptorSurfaceCreateFlagsGGP</type> <name>flags</name></member>
<member><type>GgpStreamDescriptor</type> <name>streamDescriptor</name></member>
</type>
<type category="struct" name="VkScreenSurfaceCreateInfoQNX">
<member values="VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkScreenSurfaceCreateFlagsQNX</type> <name>flags</name></member>
<member noautovalidity="true">struct <type>_screen_context</type>* <name>context</name></member>
<member noautovalidity="true">struct <type>_screen_window</type>* <name>window</name></member>
</type>
<type category="struct" name="VkSurfaceFormatKHR" returnedonly="true">
<member><type>VkFormat</type> <name>format</name><comment>Supported pair of rendering format</comment></member>
<member><type>VkColorSpaceKHR</type> <name>colorSpace</name><comment>and color space for the surface</comment></member>
</type>
<type category="struct" name="VkSwapchainCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkSwapchainCreateFlagsKHR</type> <name>flags</name></member>
<member><type>VkSurfaceKHR</type> <name>surface</name><comment>The swapchain's target surface</comment></member>
<member><type>uint32_t</type> <name>minImageCount</name><comment>Minimum number of presentation images the application needs</comment></member>
<member><type>VkFormat</type> <name>imageFormat</name><comment>Format of the presentation images</comment></member>
<member><type>VkColorSpaceKHR</type> <name>imageColorSpace</name><comment>Colorspace of the presentation images</comment></member>
<member><type>VkExtent2D</type> <name>imageExtent</name><comment>Dimensions of the presentation images</comment></member>
<member><type>uint32_t</type> <name>imageArrayLayers</name><comment>Determines the number of views for multiview/stereo presentation</comment></member>
<member><type>VkImageUsageFlags</type> <name>imageUsage</name><comment>Bits indicating how the presentation images will be used</comment></member>
<member><type>VkSharingMode</type> <name>imageSharingMode</name><comment>Sharing mode used for the presentation images</comment></member>
<member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name><comment>Number of queue families having access to the images in case of concurrent sharing mode</comment></member>
<member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name><comment>Array of queue family indices having access to the images in case of concurrent sharing mode</comment></member>
<member><type>VkSurfaceTransformFlagBitsKHR</type> <name>preTransform</name><comment>The transform, relative to the device's natural orientation, applied to the image content prior to presentation</comment></member>
<member><type>VkCompositeAlphaFlagBitsKHR</type> <name>compositeAlpha</name><comment>The alpha blending mode used when compositing this surface with other surfaces in the window system</comment></member>
<member><type>VkPresentModeKHR</type> <name>presentMode</name><comment>Which presentation mode to use for presents on this swap chain</comment></member>
<member><type>VkBool32</type> <name>clipped</name><comment>Specifies whether presentable images may be affected by window clip regions</comment></member>
<member optional="true"><type>VkSwapchainKHR</type> <name>oldSwapchain</name><comment>Existing swap chain to replace, if any</comment></member>
</type>
<type category="struct" name="VkPresentInfoKHR">
<member values="VK_STRUCTURE_TYPE_PRESENT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name><comment>Number of semaphores to wait for before presenting</comment></member>
<member len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name><comment>Semaphores to wait for before presenting</comment></member>
<member><type>uint32_t</type> <name>swapchainCount</name><comment>Number of swapchains to present in this call</comment></member>
<member len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name><comment>Swapchains to present an image from</comment></member>
<member len="swapchainCount">const <type>uint32_t</type>* <name>pImageIndices</name><comment>Indices of which presentable images to present</comment></member>
<member optional="true" len="swapchainCount"><type>VkResult</type>* <name>pResults</name><comment>Optional (i.e. if non-NULL) VkResult for each swapchain</comment></member>
</type>
<type category="struct" name="VkDebugReportCallbackCreateInfoEXT" structextends="VkInstanceCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDebugReportFlagsEXT</type> <name>flags</name><comment>Indicates which events call this callback</comment></member>
<member><type>PFN_vkDebugReportCallbackEXT</type> <name>pfnCallback</name><comment>Function pointer of a callback function</comment></member>
<member optional="true"><type>void</type>* <name>pUserData</name><comment>User data provided to callback function</comment></member>
</type>
<type category="struct" name="VkValidationFlagsEXT" structextends="VkInstanceCreateInfo">
<member values="VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT"><type>VkStructureType</type> <name>sType</name><comment>Must be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT</comment></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>disabledValidationCheckCount</name><comment>Number of validation checks to disable</comment></member>
<member len="disabledValidationCheckCount">const <type>VkValidationCheckEXT</type>* <name>pDisabledValidationChecks</name><comment>Validation checks to disable</comment></member>
</type>
<type category="struct" name="VkValidationFeaturesEXT" structextends="VkInstanceCreateInfo">
<member values="VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name><comment>Must be VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT</comment></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>enabledValidationFeatureCount</name><comment>Number of validation features to enable</comment></member>
<member len="enabledValidationFeatureCount">const <type>VkValidationFeatureEnableEXT</type>* <name>pEnabledValidationFeatures</name><comment>Validation features to enable</comment></member>
<member optional="true"><type>uint32_t</type> <name>disabledValidationFeatureCount</name><comment>Number of validation features to disable</comment></member>
<member len="disabledValidationFeatureCount">const <type>VkValidationFeatureDisableEXT</type>* <name>pDisabledValidationFeatures</name><comment>Validation features to disable</comment></member>
</type>
<type category="struct" name="VkPipelineRasterizationStateRasterizationOrderAMD" structextends="VkPipelineRasterizationStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkRasterizationOrderAMD</type> <name>rasterizationOrder</name><comment>Rasterization order to use for the pipeline</comment></member>
</type>
<type category="struct" name="VkDebugMarkerObjectNameInfoEXT">
<member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name><comment>The type of the object</comment></member>
<member><type>uint64_t</type> <name>object</name><comment>The handle of the object, cast to uint64_t</comment></member>
<member len="null-terminated">const <type>char</type>* <name>pObjectName</name><comment>Name to apply to the object</comment></member>
</type>
<type category="struct" name="VkDebugMarkerObjectTagInfoEXT">
<member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name><comment>The type of the object</comment></member>
<member><type>uint64_t</type> <name>object</name><comment>The handle of the object, cast to uint64_t</comment></member>
<member><type>uint64_t</type> <name>tagName</name><comment>The name of the tag to set on the object</comment></member>
<member><type>size_t</type> <name>tagSize</name><comment>The length in bytes of the tag data</comment></member>
<member len="tagSize">const <type>void</type>* <name>pTag</name><comment>Tag data to attach to the object</comment></member>
</type>
<type category="struct" name="VkDebugMarkerMarkerInfoEXT">
<member values="VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member len="null-terminated">const <type>char</type>* <name>pMarkerName</name><comment>Name of the debug marker</comment></member>
<member><type>float</type> <name>color</name>[4]<comment>Optional color for debug marker</comment></member>
</type>
<type category="struct" name="VkDedicatedAllocationImageCreateInfoNV" structextends="VkImageCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>dedicatedAllocation</name><comment>Whether this image uses a dedicated allocation</comment></member>
</type>
<type category="struct" name="VkDedicatedAllocationBufferCreateInfoNV" structextends="VkBufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>dedicatedAllocation</name><comment>Whether this buffer uses a dedicated allocation</comment></member>
</type>
<type category="struct" name="VkDedicatedAllocationMemoryAllocateInfoNV" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkImage</type> <name>image</name><comment>Image that this allocation will be bound to</comment></member>
<member optional="true"><type>VkBuffer</type> <name>buffer</name><comment>Buffer that this allocation will be bound to</comment></member>
</type>
<type category="struct" name="VkExternalImageFormatPropertiesNV" returnedonly="true">
<member><type>VkImageFormatProperties</type> <name>imageFormatProperties</name></member>
<member optional="true"><type>VkExternalMemoryFeatureFlagsNV</type> <name>externalMemoryFeatures</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>exportFromImportedHandleTypes</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>compatibleHandleTypes</name></member>
</type>
<type category="struct" name="VkExternalMemoryImageCreateInfoNV" structextends="VkImageCreateInfo">
<member values="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleTypes</name></member>
</type>
<type category="struct" name="VkExportMemoryAllocateInfoNV" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleTypes</name></member>
</type>
<type category="struct" name="VkImportMemoryWin32HandleInfoNV" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleType</name></member>
<member optional="true"><type>HANDLE</type> <name>handle</name></member>
</type>
<type category="struct" name="VkExportMemoryWin32HandleInfoNV" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true">const <type>SECURITY_ATTRIBUTES</type>* <name>pAttributes</name></member>
<member optional="true"><type>DWORD</type> <name>dwAccess</name></member>
</type>
<type category="struct" name="VkWin32KeyedMutexAcquireReleaseInfoNV" structextends="VkSubmitInfo,VkSubmitInfo2KHR">
<member values="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>acquireCount</name></member>
<member len="acquireCount">const <type>VkDeviceMemory</type>* <name>pAcquireSyncs</name></member>
<member len="acquireCount">const <type>uint64_t</type>* <name>pAcquireKeys</name></member>
<member len="acquireCount">const <type>uint32_t</type>* <name>pAcquireTimeoutMilliseconds</name></member>
<member optional="true"><type>uint32_t</type> <name>releaseCount</name></member>
<member len="releaseCount">const <type>VkDeviceMemory</type>* <name>pReleaseSyncs</name></member>
<member len="releaseCount">const <type>uint64_t</type>* <name>pReleaseKeys</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>deviceGeneratedCommands</name></member>
</type>
<type category="struct" name="VkDevicePrivateDataCreateInfoEXT" allowduplicate="true" structextends="VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>privateDataSlotRequestCount</name></member>
</type>
<type category="struct" name="VkPrivateDataSlotCreateInfoEXT">
<member values="VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPrivateDataSlotCreateFlagsEXT</type> <name>flags</name></member>
</type>
<type category="struct" name="VkPhysicalDevicePrivateDataFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>privateData</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxGraphicsShaderGroupCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxIndirectSequenceCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxIndirectCommandsTokenCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxIndirectCommandsStreamCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxIndirectCommandsTokenOffset</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxIndirectCommandsStreamStride</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>minSequencesCountBufferOffsetAlignment</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>minSequencesIndexBufferOffsetAlignment</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>minIndirectCommandsBufferOffsetAlignment</name></member>
</type>
<type category="struct" name="VkGraphicsShaderGroupCreateInfoNV">
<member values="VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>stageCount</name></member>
<member len="stageCount">const <type>VkPipelineShaderStageCreateInfo</type>* <name>pStages</name></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineVertexInputStateCreateInfo</type>* <name>pVertexInputState</name></member>
<member noautovalidity="true" optional="true">const <type>VkPipelineTessellationStateCreateInfo</type>* <name>pTessellationState</name></member>
</type>
<type category="struct" name="VkGraphicsPipelineShaderGroupsCreateInfoNV" structextends="VkGraphicsPipelineCreateInfo">
<member values="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>groupCount</name></member>
<member len="groupCount">const <type>VkGraphicsShaderGroupCreateInfoNV</type>* <name>pGroups</name></member>
<member optional="true"><type>uint32_t</type> <name>pipelineCount</name></member>
<member len="pipelineCount">const <type>VkPipeline</type>* <name>pPipelines</name></member>
</type>
<type category="struct" name="VkBindShaderGroupIndirectCommandNV">
<member><type>uint32_t</type> <name>groupIndex</name></member>
</type>
<type category="struct" name="VkBindIndexBufferIndirectCommandNV">
<member><type>VkDeviceAddress</type> <name>bufferAddress</name></member>
<member><type>uint32_t</type> <name>size</name></member>
<member><type>VkIndexType</type> <name>indexType</name></member>
</type>
<type category="struct" name="VkBindVertexBufferIndirectCommandNV">
<member><type>VkDeviceAddress</type> <name>bufferAddress</name></member>
<member><type>uint32_t</type> <name>size</name></member>
<member><type>uint32_t</type> <name>stride</name></member>
</type>
<type category="struct" name="VkSetStateFlagsIndirectCommandNV">
<member><type>uint32_t</type> <name>data</name></member>
</type>
<type category="struct" name="VkIndirectCommandsStreamNV">
<member><type>VkBuffer</type> <name>buffer</name></member>
<member><type>VkDeviceSize</type> <name>offset</name></member>
</type>
<type category="struct" name="VkIndirectCommandsLayoutTokenNV">
<member values="VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkIndirectCommandsTokenTypeNV</type> <name>tokenType</name></member>
<member><type>uint32_t</type> <name>stream</name></member>
<member><type>uint32_t</type> <name>offset</name></member>
<member><type>uint32_t</type> <name>vertexBindingUnit</name></member>
<member><type>VkBool32</type> <name>vertexDynamicStride</name></member>
<member optional="true"><type>VkPipelineLayout</type> <name>pushconstantPipelineLayout</name></member>
<member optional="true"><type>VkShaderStageFlags</type> <name>pushconstantShaderStageFlags</name></member>
<member><type>uint32_t</type> <name>pushconstantOffset</name></member>
<member><type>uint32_t</type> <name>pushconstantSize</name></member>
<member optional="true"><type>VkIndirectStateFlagsNV</type> <name>indirectStateFlags</name></member>
<member optional="true"><type>uint32_t</type> <name>indexTypeCount</name></member>
<member len="indexTypeCount">const <type>VkIndexType</type>* <name>pIndexTypes</name></member>
<member len="indexTypeCount">const <type>uint32_t</type>* <name>pIndexTypeValues</name></member>
</type>
<type category="struct" name="VkIndirectCommandsLayoutCreateInfoNV">
<member values="VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkIndirectCommandsLayoutUsageFlagsNV</type> <name>flags</name></member>
<member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member>
<member><type>uint32_t</type> <name>tokenCount</name></member>
<member len="tokenCount">const <type>VkIndirectCommandsLayoutTokenNV</type>* <name>pTokens</name></member>
<member><type>uint32_t</type> <name>streamCount</name></member>
<member len="streamCount">const <type>uint32_t</type>* <name>pStreamStrides</name></member>
</type>
<type category="struct" name="VkGeneratedCommandsInfoNV">
<member values="VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member>
<member><type>VkPipeline</type> <name>pipeline</name></member>
<member><type>VkIndirectCommandsLayoutNV</type> <name>indirectCommandsLayout</name></member>
<member><type>uint32_t</type> <name>streamCount</name></member>
<member len="streamCount">const <type>VkIndirectCommandsStreamNV</type>* <name>pStreams</name></member>
<member><type>uint32_t</type> <name>sequencesCount</name></member>
<member><type>VkBuffer</type> <name>preprocessBuffer</name></member>
<member><type>VkDeviceSize</type> <name>preprocessOffset</name></member>
<member><type>VkDeviceSize</type> <name>preprocessSize</name></member>
<member optional="true"><type>VkBuffer</type> <name>sequencesCountBuffer</name></member>
<member><type>VkDeviceSize</type> <name>sequencesCountOffset</name></member>
<member optional="true"><type>VkBuffer</type> <name>sequencesIndexBuffer</name></member>
<member><type>VkDeviceSize</type> <name>sequencesIndexOffset</name></member>
</type>
<type category="struct" name="VkGeneratedCommandsMemoryRequirementsInfoNV">
<member values="VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member>
<member><type>VkPipeline</type> <name>pipeline</name></member>
<member><type>VkIndirectCommandsLayoutNV</type> <name>indirectCommandsLayout</name></member>
<member><type>uint32_t</type> <name>maxSequencesCount</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFeatures2" structextends="VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkPhysicalDeviceFeatures</type> <name>features</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFeatures2KHR" alias="VkPhysicalDeviceFeatures2"/>
<type category="struct" name="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="struct"><type>VkPhysicalDeviceProperties</type> <name>properties</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceProperties2KHR" alias="VkPhysicalDeviceProperties2"/>
<type category="struct" name="VkFormatProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkFormatProperties</type> <name>formatProperties</name></member>
</type>
<type category="struct" name="VkFormatProperties2KHR" alias="VkFormatProperties2"/>
<type category="struct" name="VkImageFormatProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkImageFormatProperties</type> <name>imageFormatProperties</name></member>
</type>
<type category="struct" name="VkImageFormatProperties2KHR" alias="VkImageFormatProperties2"/>
<type category="struct" name="VkPhysicalDeviceImageFormatInfo2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkFormat</type> <name>format</name></member>
<member><type>VkImageType</type> <name>type</name></member>
<member><type>VkImageTiling</type> <name>tiling</name></member>
<member><type>VkImageUsageFlags</type> <name>usage</name></member>
<member optional="true"><type>VkImageCreateFlags</type> <name>flags</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceImageFormatInfo2KHR" alias="VkPhysicalDeviceImageFormatInfo2"/>
<type category="struct" name="VkQueueFamilyProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkQueueFamilyProperties</type> <name>queueFamilyProperties</name></member>
</type>
<type category="struct" name="VkQueueFamilyProperties2KHR" alias="VkQueueFamilyProperties2"/>
<type category="struct" name="VkPhysicalDeviceMemoryProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkPhysicalDeviceMemoryProperties</type> <name>memoryProperties</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMemoryProperties2KHR" alias="VkPhysicalDeviceMemoryProperties2"/>
<type category="struct" name="VkSparseImageFormatProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkSparseImageFormatProperties</type> <name>properties</name></member>
</type>
<type category="struct" name="VkSparseImageFormatProperties2KHR" alias="VkSparseImageFormatProperties2"/>
<type category="struct" name="VkPhysicalDeviceSparseImageFormatInfo2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkFormat</type> <name>format</name></member>
<member><type>VkImageType</type> <name>type</name></member>
<member><type>VkSampleCountFlagBits</type> <name>samples</name></member>
<member><type>VkImageUsageFlags</type> <name>usage</name></member>
<member><type>VkImageTiling</type> <name>tiling</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSparseImageFormatInfo2KHR" alias="VkPhysicalDeviceSparseImageFormatInfo2"/>
<type category="struct" name="VkPhysicalDevicePushDescriptorPropertiesKHR" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPushDescriptors</name></member>
</type>
<type category="struct" name="VkConformanceVersion">
<member><type>uint8_t</type> <name>major</name></member>
<member><type>uint8_t</type> <name>minor</name></member>
<member><type>uint8_t</type> <name>subminor</name></member>
<member><type>uint8_t</type> <name>patch</name></member>
</type>
<type category="struct" name="VkConformanceVersionKHR" alias="VkConformanceVersion"/>
<type category="struct" name="VkPhysicalDeviceDriverProperties" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkDriverId</type> <name>driverID</name></member>
<member limittype="noauto"><type>char</type> <name>driverName</name>[<enum>VK_MAX_DRIVER_NAME_SIZE</enum>]</member>
<member limittype="noauto"><type>char</type> <name>driverInfo</name>[<enum>VK_MAX_DRIVER_INFO_SIZE</enum>]</member>
<member limittype="noauto"><type>VkConformanceVersion</type> <name>conformanceVersion</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDriverPropertiesKHR" alias="VkPhysicalDeviceDriverProperties"/>
<type category="struct" name="VkPresentRegionsKHR" structextends="VkPresentInfoKHR">
<member values="VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>swapchainCount</name><comment>Copy of VkPresentInfoKHR::swapchainCount</comment></member>
<member len="swapchainCount" optional="true">const <type>VkPresentRegionKHR</type>* <name>pRegions</name><comment>The regions that have changed</comment></member>
</type>
<type category="struct" name="VkPresentRegionKHR">
<member optional="true"><type>uint32_t</type> <name>rectangleCount</name><comment>Number of rectangles in pRectangles</comment></member>
<member optional="true" len="rectangleCount">const <type>VkRectLayerKHR</type>* <name>pRectangles</name><comment>Array of rectangles that have changed in a swapchain's image(s)</comment></member>
</type>
<type category="struct" name="VkRectLayerKHR">
<member><type>VkOffset2D</type> <name>offset</name><comment>upper-left corner of a rectangle that has not changed, in pixels of a presentation images</comment></member>
<member noautovalidity="true"><type>VkExtent2D</type> <name>extent</name><comment>Dimensions of a rectangle that has not changed, in pixels of a presentation images</comment></member>
<member><type>uint32_t</type> <name>layer</name><comment>Layer of a swapchain's image(s), for stereoscopic-3D images</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceVariablePointersFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>variablePointersStorageBuffer</name></member>
<member><type>VkBool32</type> <name>variablePointers</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVariablePointersFeaturesKHR" alias="VkPhysicalDeviceVariablePointersFeatures"/>
<type category="struct" name="VkPhysicalDeviceVariablePointerFeaturesKHR" alias="VkPhysicalDeviceVariablePointersFeatures"/>
<type category="struct" name="VkPhysicalDeviceVariablePointerFeatures" alias="VkPhysicalDeviceVariablePointersFeatures"/>
<type category="struct" name="VkExternalMemoryProperties" returnedonly="true">
<member><type>VkExternalMemoryFeatureFlags</type> <name>externalMemoryFeatures</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlags</type> <name>exportFromImportedHandleTypes</name></member>
<member><type>VkExternalMemoryHandleTypeFlags</type> <name>compatibleHandleTypes</name></member>
</type>
<type category="struct" name="VkExternalMemoryPropertiesKHR" alias="VkExternalMemoryProperties"/>
<type category="struct" name="VkPhysicalDeviceExternalImageFormatInfo" structextends="VkPhysicalDeviceImageFormatInfo2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExternalImageFormatInfoKHR" alias="VkPhysicalDeviceExternalImageFormatInfo"/>
<type category="struct" name="VkExternalImageFormatProperties" returnedonly="true" structextends="VkImageFormatProperties2">
<member values="VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkExternalMemoryProperties</type> <name>externalMemoryProperties</name></member>
</type>
<type category="struct" name="VkExternalImageFormatPropertiesKHR" alias="VkExternalImageFormatProperties"/>
<type category="struct" name="VkPhysicalDeviceExternalBufferInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkBufferCreateFlags</type> <name>flags</name></member>
<member><type>VkBufferUsageFlags</type> <name>usage</name></member>
<member><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExternalBufferInfoKHR" alias="VkPhysicalDeviceExternalBufferInfo"/>
<type category="struct" name="VkExternalBufferProperties" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkExternalMemoryProperties</type> <name>externalMemoryProperties</name></member>
</type>
<type category="struct" name="VkExternalBufferPropertiesKHR" alias="VkExternalBufferProperties"/>
<type category="struct" name="VkPhysicalDeviceIDProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>uint8_t</type> <name>deviceUUID</name>[<enum>VK_UUID_SIZE</enum>]</member>
<member limittype="noauto"><type>uint8_t</type> <name>driverUUID</name>[<enum>VK_UUID_SIZE</enum>]</member>
<member limittype="noauto"><type>uint8_t</type> <name>deviceLUID</name>[<enum>VK_LUID_SIZE</enum>]</member>
<member limittype="noauto"><type>uint32_t</type> <name>deviceNodeMask</name></member>
<member limittype="noauto"><type>VkBool32</type> <name>deviceLUIDValid</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceIDPropertiesKHR" alias="VkPhysicalDeviceIDProperties"/>
<type category="struct" name="VkExternalMemoryImageCreateInfo" structextends="VkImageCreateInfo">
<member values="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlags</type> <name>handleTypes</name></member>
</type>
<type category="struct" name="VkExternalMemoryImageCreateInfoKHR" alias="VkExternalMemoryImageCreateInfo"/>
<type category="struct" name="VkExternalMemoryBufferCreateInfo" structextends="VkBufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlags</type> <name>handleTypes</name></member>
</type>
<type category="struct" name="VkExternalMemoryBufferCreateInfoKHR" alias="VkExternalMemoryBufferCreateInfo"/>
<type category="struct" name="VkExportMemoryAllocateInfo" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlags</type> <name>handleTypes</name></member>
</type>
<type category="struct" name="VkExportMemoryAllocateInfoKHR" alias="VkExportMemoryAllocateInfo"/>
<type category="struct" name="VkImportMemoryWin32HandleInfoKHR" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
<member optional="true"><type>HANDLE</type> <name>handle</name></member>
<member optional="true"><type>LPCWSTR</type> <name>name</name></member>
</type>
<type category="struct" name="VkExportMemoryWin32HandleInfoKHR" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true">const <type>SECURITY_ATTRIBUTES</type>* <name>pAttributes</name></member>
<member><type>DWORD</type> <name>dwAccess</name></member>
<member><type>LPCWSTR</type> <name>name</name></member>
</type>
<type category="struct" name="VkImportMemoryZirconHandleInfoFUCHSIA" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
<member optional="true"><type>zx_handle_t</type> <name>handle</name></member>
</type>
<type category="struct" name="VkMemoryZirconHandlePropertiesFUCHSIA" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>memoryTypeBits</name></member>
</type>
<type category="struct" name="VkMemoryGetZirconHandleInfoFUCHSIA">
<member values="VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkMemoryWin32HandlePropertiesKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>memoryTypeBits</name></member>
</type>
<type category="struct" name="VkMemoryGetWin32HandleInfoKHR">
<member values="VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkImportMemoryFdInfoKHR" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
<member><type>int</type> <name>fd</name></member>
</type>
<type category="struct" name="VkMemoryFdPropertiesKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>memoryTypeBits</name></member>
</type>
<type category="struct" name="VkMemoryGetFdInfoKHR">
<member values="VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkWin32KeyedMutexAcquireReleaseInfoKHR" structextends="VkSubmitInfo,VkSubmitInfo2KHR">
<member values="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>acquireCount</name></member>
<member len="acquireCount">const <type>VkDeviceMemory</type>* <name>pAcquireSyncs</name></member>
<member len="acquireCount">const <type>uint64_t</type>* <name>pAcquireKeys</name></member>
<member len="acquireCount">const <type>uint32_t</type>* <name>pAcquireTimeouts</name></member>
<member optional="true"><type>uint32_t</type> <name>releaseCount</name></member>
<member len="releaseCount">const <type>VkDeviceMemory</type>* <name>pReleaseSyncs</name></member>
<member len="releaseCount">const <type>uint64_t</type>* <name>pReleaseKeys</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExternalSemaphoreInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkExternalSemaphoreHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExternalSemaphoreInfoKHR" alias="VkPhysicalDeviceExternalSemaphoreInfo"/>
<type category="struct" name="VkExternalSemaphoreProperties" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkExternalSemaphoreHandleTypeFlags</type> <name>exportFromImportedHandleTypes</name></member>
<member><type>VkExternalSemaphoreHandleTypeFlags</type> <name>compatibleHandleTypes</name></member>
<member optional="true"><type>VkExternalSemaphoreFeatureFlags</type> <name>externalSemaphoreFeatures</name></member>
</type>
<type category="struct" name="VkExternalSemaphorePropertiesKHR" alias="VkExternalSemaphoreProperties"/>
<type category="struct" name="VkExportSemaphoreCreateInfo" structextends="VkSemaphoreCreateInfo">
<member values="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalSemaphoreHandleTypeFlags</type> <name>handleTypes</name></member>
</type>
<type category="struct" name="VkExportSemaphoreCreateInfoKHR" alias="VkExportSemaphoreCreateInfo"/>
<type category="struct" name="VkImportSemaphoreWin32HandleInfoKHR">
<member values="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member externsync="true"><type>VkSemaphore</type> <name>semaphore</name></member>
<member optional="true"><type>VkSemaphoreImportFlags</type> <name>flags</name></member>
<member noautovalidity="true"><type>VkExternalSemaphoreHandleTypeFlagBits</type> <name>handleType</name></member>
<member optional="true"><type>HANDLE</type> <name>handle</name></member>
<member optional="true"><type>LPCWSTR</type> <name>name</name></member>
</type>
<type category="struct" name="VkExportSemaphoreWin32HandleInfoKHR" structextends="VkSemaphoreCreateInfo">
<member values="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true">const <type>SECURITY_ATTRIBUTES</type>* <name>pAttributes</name></member>
<member><type>DWORD</type> <name>dwAccess</name></member>
<member><type>LPCWSTR</type> <name>name</name></member>
</type>
<type category="struct" name="VkD3D12FenceSubmitInfoKHR" structextends="VkSubmitInfo">
<member values="VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>waitSemaphoreValuesCount</name></member>
<member optional="true" len="waitSemaphoreValuesCount">const <type>uint64_t</type>* <name>pWaitSemaphoreValues</name></member>
<member optional="true"><type>uint32_t</type> <name>signalSemaphoreValuesCount</name></member>
<member optional="true" len="signalSemaphoreValuesCount">const <type>uint64_t</type>* <name>pSignalSemaphoreValues</name></member>
</type>
<type category="struct" name="VkSemaphoreGetWin32HandleInfoKHR">
<member values="VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSemaphore</type> <name>semaphore</name></member>
<member><type>VkExternalSemaphoreHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkImportSemaphoreFdInfoKHR">
<member values="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member externsync="true"><type>VkSemaphore</type> <name>semaphore</name></member>
<member optional="true"><type>VkSemaphoreImportFlags</type> <name>flags</name></member>
<member><type>VkExternalSemaphoreHandleTypeFlagBits</type> <name>handleType</name></member>
<member><type>int</type> <name>fd</name></member>
</type>
<type category="struct" name="VkSemaphoreGetFdInfoKHR">
<member values="VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSemaphore</type> <name>semaphore</name></member>
<member><type>VkExternalSemaphoreHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkImportSemaphoreZirconHandleInfoFUCHSIA">
<member values="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member externsync="true"><type>VkSemaphore</type> <name>semaphore</name></member>
<member optional="true"><type>VkSemaphoreImportFlags</type> <name>flags</name></member>
<member><type>VkExternalSemaphoreHandleTypeFlagBits</type> <name>handleType</name></member>
<member><type>zx_handle_t</type> <name>zirconHandle</name></member>
</type>
<type category="struct" name="VkSemaphoreGetZirconHandleInfoFUCHSIA">
<member values="VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSemaphore</type> <name>semaphore</name></member>
<member><type>VkExternalSemaphoreHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExternalFenceInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkExternalFenceHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExternalFenceInfoKHR" alias="VkPhysicalDeviceExternalFenceInfo"/>
<type category="struct" name="VkExternalFenceProperties" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkExternalFenceHandleTypeFlags</type> <name>exportFromImportedHandleTypes</name></member>
<member><type>VkExternalFenceHandleTypeFlags</type> <name>compatibleHandleTypes</name></member>
<member optional="true"><type>VkExternalFenceFeatureFlags</type> <name>externalFenceFeatures</name></member>
</type>
<type category="struct" name="VkExternalFencePropertiesKHR" alias="VkExternalFenceProperties"/>
<type category="struct" name="VkExportFenceCreateInfo" structextends="VkFenceCreateInfo">
<member values="VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkExternalFenceHandleTypeFlags</type> <name>handleTypes</name></member>
</type>
<type category="struct" name="VkExportFenceCreateInfoKHR" alias="VkExportFenceCreateInfo"/>
<type category="struct" name="VkImportFenceWin32HandleInfoKHR">
<member values="VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member externsync="true"><type>VkFence</type> <name>fence</name></member>
<member optional="true"><type>VkFenceImportFlags</type> <name>flags</name></member>
<member noautovalidity="true"><type>VkExternalFenceHandleTypeFlagBits</type> <name>handleType</name></member>
<member optional="true"><type>HANDLE</type> <name>handle</name></member>
<member optional="true"><type>LPCWSTR</type> <name>name</name></member>
</type>
<type category="struct" name="VkExportFenceWin32HandleInfoKHR" structextends="VkFenceCreateInfo">
<member values="VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true">const <type>SECURITY_ATTRIBUTES</type>* <name>pAttributes</name></member>
<member><type>DWORD</type> <name>dwAccess</name></member>
<member><type>LPCWSTR</type> <name>name</name></member>
</type>
<type category="struct" name="VkFenceGetWin32HandleInfoKHR">
<member values="VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkFence</type> <name>fence</name></member>
<member><type>VkExternalFenceHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkImportFenceFdInfoKHR">
<member values="VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member externsync="true"><type>VkFence</type> <name>fence</name></member>
<member optional="true"><type>VkFenceImportFlags</type> <name>flags</name></member>
<member><type>VkExternalFenceHandleTypeFlagBits</type> <name>handleType</name></member>
<member><type>int</type> <name>fd</name></member>
</type>
<type category="struct" name="VkFenceGetFdInfoKHR">
<member values="VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkFence</type> <name>fence</name></member>
<member><type>VkExternalFenceHandleTypeFlagBits</type> <name>handleType</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMultiviewFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>multiview</name><comment>Multiple views in a renderpass</comment></member>
<member><type>VkBool32</type> <name>multiviewGeometryShader</name><comment>Multiple views in a renderpass w/ geometry shader</comment></member>
<member><type>VkBool32</type> <name>multiviewTessellationShader</name><comment>Multiple views in a renderpass w/ tessellation shader</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceMultiviewFeaturesKHR" alias="VkPhysicalDeviceMultiviewFeatures"/>
<type category="struct" name="VkPhysicalDeviceMultiviewProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxMultiviewViewCount</name><comment>max number of views in a subpass</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxMultiviewInstanceIndex</name><comment>max instance index for a draw in a multiview subpass</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceMultiviewPropertiesKHR" alias="VkPhysicalDeviceMultiviewProperties"/>
<type category="struct" name="VkRenderPassMultiviewCreateInfo" structextends="VkRenderPassCreateInfo">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>subpassCount</name></member>
<member len="subpassCount">const <type>uint32_t</type>* <name>pViewMasks</name></member>
<member optional="true"><type>uint32_t</type> <name>dependencyCount</name></member>
<member len="dependencyCount">const <type>int32_t</type>* <name>pViewOffsets</name></member>
<member optional="true"><type>uint32_t</type> <name>correlationMaskCount</name></member>
<member len="correlationMaskCount">const <type>uint32_t</type>* <name>pCorrelationMasks</name></member>
</type>
<type category="struct" name="VkRenderPassMultiviewCreateInfoKHR" alias="VkRenderPassMultiviewCreateInfo"/>
<type category="struct" name="VkSurfaceCapabilities2EXT" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>minImageCount</name><comment>Supported minimum number of images for the surface</comment></member>
<member><type>uint32_t</type> <name>maxImageCount</name><comment>Supported maximum number of images for the surface, 0 for unlimited</comment></member>
<member><type>VkExtent2D</type> <name>currentExtent</name><comment>Current image width and height for the surface, (0, 0) if undefined</comment></member>
<member><type>VkExtent2D</type> <name>minImageExtent</name><comment>Supported minimum image width and height for the surface</comment></member>
<member><type>VkExtent2D</type> <name>maxImageExtent</name><comment>Supported maximum image width and height for the surface</comment></member>
<member><type>uint32_t</type> <name>maxImageArrayLayers</name><comment>Supported maximum number of image layers for the surface</comment></member>
<member optional="true"><type>VkSurfaceTransformFlagsKHR</type> <name>supportedTransforms</name><comment>1 or more bits representing the transforms supported</comment></member>
<member><type>VkSurfaceTransformFlagBitsKHR</type> <name>currentTransform</name><comment>The surface's current transform relative to the device's natural orientation</comment></member>
<member optional="true"><type>VkCompositeAlphaFlagsKHR</type> <name>supportedCompositeAlpha</name><comment>1 or more bits representing the alpha compositing modes supported</comment></member>
<member optional="true"><type>VkImageUsageFlags</type> <name>supportedUsageFlags</name><comment>Supported image usage flags for the surface</comment></member>
<member optional="true"><type>VkSurfaceCounterFlagsEXT</type> <name>supportedSurfaceCounters</name></member>
</type>
<type category="struct" name="VkDisplayPowerInfoEXT">
<member values="VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDisplayPowerStateEXT</type> <name>powerState</name></member>
</type>
<type category="struct" name="VkDeviceEventInfoEXT">
<member values="VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceEventTypeEXT</type> <name>deviceEvent</name></member>
</type>
<type category="struct" name="VkDisplayEventInfoEXT">
<member values="VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDisplayEventTypeEXT</type> <name>displayEvent</name></member>
</type>
<type category="struct" name="VkSwapchainCounterCreateInfoEXT" structextends="VkSwapchainCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkSurfaceCounterFlagsEXT</type> <name>surfaceCounters</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceGroupProperties" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>physicalDeviceCount</name></member>
<member><type>VkPhysicalDevice</type> <name>physicalDevices</name>[<enum>VK_MAX_DEVICE_GROUP_SIZE</enum>]</member>
<member><type>VkBool32</type> <name>subsetAllocation</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceGroupPropertiesKHR" alias="VkPhysicalDeviceGroupProperties"/>
<type category="struct" name="VkMemoryAllocateFlagsInfo" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkMemoryAllocateFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>deviceMask</name></member>
</type>
<type category="struct" name="VkMemoryAllocateFlagsInfoKHR" alias="VkMemoryAllocateFlagsInfo"/>
<type category="struct" name="VkBindBufferMemoryInfo">
<member values="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBuffer</type> <name>buffer</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkDeviceSize</type> <name>memoryOffset</name></member>
</type>
<type category="struct" name="VkBindBufferMemoryInfoKHR" alias="VkBindBufferMemoryInfo"/>
<type category="struct" name="VkBindBufferMemoryDeviceGroupInfo" structextends="VkBindBufferMemoryInfo">
<member values="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>deviceIndexCount</name></member>
<member len="deviceIndexCount">const <type>uint32_t</type>* <name>pDeviceIndices</name></member>
</type>
<type category="struct" name="VkBindBufferMemoryDeviceGroupInfoKHR" alias="VkBindBufferMemoryDeviceGroupInfo"/>
<type category="struct" name="VkBindImageMemoryInfo">
<member values="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImage</type> <name>image</name></member>
<member noautovalidity="true"><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkDeviceSize</type> <name>memoryOffset</name></member>
</type>
<type category="struct" name="VkBindImageMemoryInfoKHR" alias="VkBindImageMemoryInfo"/>
<type category="struct" name="VkBindImageMemoryDeviceGroupInfo" structextends="VkBindImageMemoryInfo">
<member values="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>deviceIndexCount</name></member>
<member len="deviceIndexCount">const <type>uint32_t</type>* <name>pDeviceIndices</name></member>
<member optional="true"><type>uint32_t</type> <name>splitInstanceBindRegionCount</name></member>
<member len="splitInstanceBindRegionCount">const <type>VkRect2D</type>* <name>pSplitInstanceBindRegions</name></member>
</type>
<type category="struct" name="VkBindImageMemoryDeviceGroupInfoKHR" alias="VkBindImageMemoryDeviceGroupInfo"/>
<type category="struct" name="VkDeviceGroupRenderPassBeginInfo" structextends="VkRenderPassBeginInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>deviceMask</name></member>
<member optional="true"><type>uint32_t</type> <name>deviceRenderAreaCount</name></member>
<member len="deviceRenderAreaCount">const <type>VkRect2D</type>* <name>pDeviceRenderAreas</name></member>
</type>
<type category="struct" name="VkDeviceGroupRenderPassBeginInfoKHR" alias="VkDeviceGroupRenderPassBeginInfo"/>
<type category="struct" name="VkDeviceGroupCommandBufferBeginInfo" structextends="VkCommandBufferBeginInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>deviceMask</name></member>
</type>
<type category="struct" name="VkDeviceGroupCommandBufferBeginInfoKHR" alias="VkDeviceGroupCommandBufferBeginInfo"/>
<type category="struct" name="VkDeviceGroupSubmitInfo" structextends="VkSubmitInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></member>
<member len="waitSemaphoreCount">const <type>uint32_t</type>* <name>pWaitSemaphoreDeviceIndices</name></member>
<member optional="true"><type>uint32_t</type> <name>commandBufferCount</name></member>
<member len="commandBufferCount">const <type>uint32_t</type>* <name>pCommandBufferDeviceMasks</name></member>
<member optional="true"><type>uint32_t</type> <name>signalSemaphoreCount</name></member>
<member len="signalSemaphoreCount">const <type>uint32_t</type>* <name>pSignalSemaphoreDeviceIndices</name></member>
</type>
<type category="struct" name="VkDeviceGroupSubmitInfoKHR" alias="VkDeviceGroupSubmitInfo"/>
<type category="struct" name="VkDeviceGroupBindSparseInfo" structextends="VkBindSparseInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>resourceDeviceIndex</name></member>
<member><type>uint32_t</type> <name>memoryDeviceIndex</name></member>
</type>
<type category="struct" name="VkDeviceGroupBindSparseInfoKHR" alias="VkDeviceGroupBindSparseInfo"/>
<type category="struct" name="VkDeviceGroupPresentCapabilitiesKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>presentMask</name>[<enum>VK_MAX_DEVICE_GROUP_SIZE</enum>]</member>
<member><type>VkDeviceGroupPresentModeFlagsKHR</type> <name>modes</name></member>
</type>
<type category="struct" name="VkImageSwapchainCreateInfoKHR" structextends="VkImageCreateInfo">
<member values="VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkSwapchainKHR</type> <name>swapchain</name></member>
</type>
<type category="struct" name="VkBindImageMemorySwapchainInfoKHR" structextends="VkBindImageMemoryInfo">
<member values="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></member>
<member><type>uint32_t</type> <name>imageIndex</name></member>
</type>
<type category="struct" name="VkAcquireNextImageInfoKHR">
<member values="VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></member>
<member><type>uint64_t</type> <name>timeout</name></member>
<member optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></member>
<member optional="true" externsync="true"><type>VkFence</type> <name>fence</name></member>
<member><type>uint32_t</type> <name>deviceMask</name></member>
</type>
<type category="struct" name="VkDeviceGroupPresentInfoKHR" structextends="VkPresentInfoKHR">
<member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>swapchainCount</name></member>
<member len="swapchainCount">const <type>uint32_t</type>* <name>pDeviceMasks</name></member>
<member><type>VkDeviceGroupPresentModeFlagBitsKHR</type> <name>mode</name></member>
</type>
<type category="struct" name="VkDeviceGroupDeviceCreateInfo" structextends="VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>physicalDeviceCount</name></member>
<member len="physicalDeviceCount">const <type>VkPhysicalDevice</type>* <name>pPhysicalDevices</name></member>
</type>
<type category="struct" name="VkDeviceGroupDeviceCreateInfoKHR" alias="VkDeviceGroupDeviceCreateInfo"/>
<type category="struct" name="VkDeviceGroupSwapchainCreateInfoKHR" structextends="VkSwapchainCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceGroupPresentModeFlagsKHR</type> <name>modes</name></member>
</type>
<type category="struct" name="VkDescriptorUpdateTemplateEntry">
<member><type>uint32_t</type> <name>dstBinding</name><comment>Binding within the destination descriptor set to write</comment></member>
<member><type>uint32_t</type> <name>dstArrayElement</name><comment>Array element within the destination binding to write</comment></member>
<member><type>uint32_t</type> <name>descriptorCount</name><comment>Number of descriptors to write</comment></member>
<member><type>VkDescriptorType</type> <name>descriptorType</name><comment>Descriptor type to write</comment></member>
<member><type>size_t</type> <name>offset</name><comment>Offset into pData where the descriptors to update are stored</comment></member>
<member><type>size_t</type> <name>stride</name><comment>Stride between two descriptors in pData when writing more than one descriptor</comment></member>
</type>
<type category="struct" name="VkDescriptorUpdateTemplateEntryKHR" alias="VkDescriptorUpdateTemplateEntry"/>
<type category="struct" name="VkDescriptorUpdateTemplateCreateInfo">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDescriptorUpdateTemplateCreateFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>descriptorUpdateEntryCount</name><comment>Number of descriptor update entries to use for the update template</comment></member>
<member len="descriptorUpdateEntryCount">const <type>VkDescriptorUpdateTemplateEntry</type>* <name>pDescriptorUpdateEntries</name><comment>Descriptor update entries for the template</comment></member>
<member><type>VkDescriptorUpdateTemplateType</type> <name>templateType</name></member>
<member noautovalidity="true"><type>VkDescriptorSetLayout</type> <name>descriptorSetLayout</name></member>
<member noautovalidity="true"><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member>
<member noautovalidity="true"><type>VkPipelineLayout</type><name>pipelineLayout</name><comment>If used for push descriptors, this is the only allowed layout</comment></member>
<member noautovalidity="true"><type>uint32_t</type> <name>set</name></member>
</type>
<type category="struct" name="VkDescriptorUpdateTemplateCreateInfoKHR" alias="VkDescriptorUpdateTemplateCreateInfo"/>
<type category="struct" name="VkXYColorEXT" comment="Chromaticity coordinate">
<member><type>float</type> <name>x</name></member>
<member><type>float</type> <name>y</name></member>
</type>
<type category="struct" name="VkHdrMetadataEXT">
<comment>Display primary in chromaticity coordinates</comment>
<member values="VK_STRUCTURE_TYPE_HDR_METADATA_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<comment> From SMPTE 2086</comment>
<member noautovalidity="true"><type>VkXYColorEXT</type> <name>displayPrimaryRed</name><comment>Display primary's Red</comment></member>
<member noautovalidity="true"><type>VkXYColorEXT</type> <name>displayPrimaryGreen</name><comment>Display primary's Green</comment></member>
<member noautovalidity="true"><type>VkXYColorEXT</type> <name>displayPrimaryBlue</name><comment>Display primary's Blue</comment></member>
<member noautovalidity="true"><type>VkXYColorEXT</type> <name>whitePoint</name><comment>Display primary's Blue</comment></member>
<member noautovalidity="true"><type>float</type> <name>maxLuminance</name><comment>Display maximum luminance</comment></member>
<member noautovalidity="true"><type>float</type> <name>minLuminance</name><comment>Display minimum luminance</comment></member>
<comment> From CTA 861.3</comment>
<member noautovalidity="true"><type>float</type> <name>maxContentLightLevel</name><comment>Content maximum luminance</comment></member>
<member noautovalidity="true"><type>float</type> <name>maxFrameAverageLightLevel</name></member>
</type>
<type category="struct" name="VkDisplayNativeHdrSurfaceCapabilitiesAMD" returnedonly="true" structextends="VkSurfaceCapabilities2KHR">
<member values="VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>localDimmingSupport</name></member>
</type>
<type category="struct" name="VkSwapchainDisplayNativeHdrCreateInfoAMD" structextends="VkSwapchainCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>localDimmingEnable</name></member>
</type>
<type category="struct" name="VkRefreshCycleDurationGOOGLE" returnedonly="true">
<member><type>uint64_t</type> <name>refreshDuration</name><comment>Number of nanoseconds from the start of one refresh cycle to the next</comment></member>
</type>
<type category="struct" name="VkPastPresentationTimingGOOGLE" returnedonly="true">
<member><type>uint32_t</type> <name>presentID</name><comment>Application-provided identifier, previously given to vkQueuePresentKHR</comment></member>
<member><type>uint64_t</type> <name>desiredPresentTime</name><comment>Earliest time an image should have been presented, previously given to vkQueuePresentKHR</comment></member>
<member><type>uint64_t</type> <name>actualPresentTime</name><comment>Time the image was actually displayed</comment></member>
<member><type>uint64_t</type> <name>earliestPresentTime</name><comment>Earliest time the image could have been displayed</comment></member>
<member><type>uint64_t</type> <name>presentMargin</name><comment>How early vkQueuePresentKHR was processed vs. how soon it needed to be and make earliestPresentTime</comment></member>
</type>
<type category="struct" name="VkPresentTimesInfoGOOGLE" structextends="VkPresentInfoKHR">
<member values="VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>swapchainCount</name><comment>Copy of VkPresentInfoKHR::swapchainCount</comment></member>
<member len="swapchainCount" optional="true">const <type>VkPresentTimeGOOGLE</type>* <name>pTimes</name><comment>The earliest times to present images</comment></member>
</type>
<type category="struct" name="VkPresentTimeGOOGLE">
<member><type>uint32_t</type> <name>presentID</name><comment>Application-provided identifier</comment></member>
<member><type>uint64_t</type> <name>desiredPresentTime</name><comment>Earliest time an image should be presented</comment></member>
</type>
<type category="struct" name="VkIOSSurfaceCreateInfoMVK">
<member values="VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkIOSSurfaceCreateFlagsMVK</type> <name>flags</name></member>
<member noautovalidity="true">const <type>void</type>* <name>pView</name></member>
</type>
<type category="struct" name="VkMacOSSurfaceCreateInfoMVK">
<member values="VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkMacOSSurfaceCreateFlagsMVK</type> <name>flags</name></member>
<member noautovalidity="true">const <type>void</type>* <name>pView</name></member>
</type>
<type category="struct" name="VkMetalSurfaceCreateInfoEXT">
<member values="VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkMetalSurfaceCreateFlagsEXT</type> <name>flags</name></member>
<member noautovalidity="true">const <type>CAMetalLayer</type>* <name>pLayer</name></member>
</type>
<type category="struct" name="VkViewportWScalingNV">
<member><type>float</type> <name>xcoeff</name></member>
<member><type>float</type> <name>ycoeff</name></member>
</type>
<type category="struct" name="VkPipelineViewportWScalingStateCreateInfoNV" structextends="VkPipelineViewportStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>viewportWScalingEnable</name></member>
<member><type>uint32_t</type> <name>viewportCount</name></member>
<member noautovalidity="true" optional="true" len="viewportCount">const <type>VkViewportWScalingNV</type>* <name>pViewportWScalings</name></member>
</type>
<type category="struct" name="VkViewportSwizzleNV">
<member><type>VkViewportCoordinateSwizzleNV</type> <name>x</name></member>
<member><type>VkViewportCoordinateSwizzleNV</type> <name>y</name></member>
<member><type>VkViewportCoordinateSwizzleNV</type> <name>z</name></member>
<member><type>VkViewportCoordinateSwizzleNV</type> <name>w</name></member>
</type>
<type category="struct" name="VkPipelineViewportSwizzleStateCreateInfoNV" structextends="VkPipelineViewportStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineViewportSwizzleStateCreateFlagsNV</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>viewportCount</name></member>
<member len="viewportCount">const <type>VkViewportSwizzleNV</type>* <name>pViewportSwizzles</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDiscardRectanglePropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDiscardRectangles</name><comment>max number of active discard rectangles</comment></member>
</type>
<type category="struct" name="VkPipelineDiscardRectangleStateCreateInfoEXT" structextends="VkGraphicsPipelineCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineDiscardRectangleStateCreateFlagsEXT</type> <name>flags</name></member>
<member><type>VkDiscardRectangleModeEXT</type> <name>discardRectangleMode</name></member>
<member optional="true"><type>uint32_t</type> <name>discardRectangleCount</name></member>
<member noautovalidity="true" len="discardRectangleCount">const <type>VkRect2D</type>* <name>pDiscardRectangles</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>perViewPositionAllComponents</name></member>
</type>
<type category="struct" name="VkInputAttachmentAspectReference">
<member><type>uint32_t</type> <name>subpass</name></member>
<member><type>uint32_t</type> <name>inputAttachmentIndex</name></member>
<member><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
</type>
<type category="struct" name="VkInputAttachmentAspectReferenceKHR" alias="VkInputAttachmentAspectReference"/>
<type category="struct" name="VkRenderPassInputAttachmentAspectCreateInfo" structextends="VkRenderPassCreateInfo">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>aspectReferenceCount</name></member>
<member len="aspectReferenceCount">const <type>VkInputAttachmentAspectReference</type>* <name>pAspectReferences</name></member>
</type>
<type category="struct" name="VkRenderPassInputAttachmentAspectCreateInfoKHR" alias="VkRenderPassInputAttachmentAspectCreateInfo"/>
<type category="struct" name="VkPhysicalDeviceSurfaceInfo2KHR">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSurfaceKHR</type> <name>surface</name></member>
</type>
<type category="struct" name="VkSurfaceCapabilities2KHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkSurfaceCapabilitiesKHR</type> <name>surfaceCapabilities</name></member>
</type>
<type category="struct" name="VkSurfaceFormat2KHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkSurfaceFormatKHR</type> <name>surfaceFormat</name></member>
</type>
<type category="struct" name="VkDisplayProperties2KHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkDisplayPropertiesKHR</type> <name>displayProperties</name></member>
</type>
<type category="struct" name="VkDisplayPlaneProperties2KHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkDisplayPlanePropertiesKHR</type> <name>displayPlaneProperties</name></member>
</type>
<type category="struct" name="VkDisplayModeProperties2KHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkDisplayModePropertiesKHR</type> <name>displayModeProperties</name></member>
</type>
<type category="struct" name="VkDisplayPlaneInfo2KHR">
<member values="VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member externsync="true"><type>VkDisplayModeKHR</type> <name>mode</name></member>
<member><type>uint32_t</type> <name>planeIndex</name></member>
</type>
<type category="struct" name="VkDisplayPlaneCapabilities2KHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkDisplayPlaneCapabilitiesKHR</type> <name>capabilities</name></member>
</type>
<type category="struct" name="VkSharedPresentSurfaceCapabilitiesKHR" returnedonly="true" structextends="VkSurfaceCapabilities2KHR">
<member values="VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkImageUsageFlags</type> <name>sharedPresentSupportedUsageFlags</name><comment>Supported image usage flags if swapchain created using a shared present mode</comment></member>
</type>
<type category="struct" name="VkPhysicalDevice16BitStorageFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>storageBuffer16BitAccess</name><comment>16-bit integer/floating-point variables supported in BufferBlock</comment></member>
<member><type>VkBool32</type> <name>uniformAndStorageBuffer16BitAccess</name><comment>16-bit integer/floating-point variables supported in BufferBlock and Block</comment></member>
<member><type>VkBool32</type> <name>storagePushConstant16</name><comment>16-bit integer/floating-point variables supported in PushConstant</comment></member>
<member><type>VkBool32</type> <name>storageInputOutput16</name><comment>16-bit integer/floating-point variables supported in shader inputs and outputs</comment></member>
</type>
<type category="struct" name="VkPhysicalDevice16BitStorageFeaturesKHR" alias="VkPhysicalDevice16BitStorageFeatures"/>
<type category="struct" name="VkPhysicalDeviceSubgroupProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto" noautovalidity="true"><type>uint32_t</type> <name>subgroupSize</name><comment>The size of a subgroup for this queue.</comment></member>
<member limittype="bitmask" noautovalidity="true"><type>VkShaderStageFlags</type> <name>supportedStages</name><comment>Bitfield of what shader stages support subgroup operations</comment></member>
<member limittype="bitmask" noautovalidity="true"><type>VkSubgroupFeatureFlags</type> <name>supportedOperations</name><comment>Bitfield of what subgroup operations are supported.</comment></member>
<member limittype="bitmask" noautovalidity="true"><type>VkBool32</type> <name>quadOperationsInAllStages</name><comment>Flag to specify whether quad operations are available in all stages.</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkBool32</type> <name>shaderSubgroupExtendedTypes</name><comment>Flag to specify whether subgroup operations with extended types are supported</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR" alias="VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures"/>
<type category="struct" name="VkBufferMemoryRequirementsInfo2">
<member values="VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBuffer</type> <name>buffer</name></member>
</type>
<type category="struct" name="VkBufferMemoryRequirementsInfo2KHR" alias="VkBufferMemoryRequirementsInfo2"/>
<type category="struct" name="VkImageMemoryRequirementsInfo2">
<member values="VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImage</type> <name>image</name></member>
</type>
<type category="struct" name="VkImageMemoryRequirementsInfo2KHR" alias="VkImageMemoryRequirementsInfo2"/>
<type category="struct" name="VkImageSparseMemoryRequirementsInfo2">
<member values="VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImage</type> <name>image</name></member>
</type>
<type category="struct" name="VkImageSparseMemoryRequirementsInfo2KHR" alias="VkImageSparseMemoryRequirementsInfo2"/>
<type category="struct" name="VkMemoryRequirements2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkMemoryRequirements</type> <name>memoryRequirements</name></member>
</type>
<type category="struct" name="VkMemoryRequirements2KHR" alias="VkMemoryRequirements2"/>
<type category="struct" name="VkSparseImageMemoryRequirements2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkSparseImageMemoryRequirements</type> <name>memoryRequirements</name></member>
</type>
<type category="struct" name="VkSparseImageMemoryRequirements2KHR" alias="VkSparseImageMemoryRequirements2"/>
<type category="struct" name="VkPhysicalDevicePointClippingProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkPointClippingBehavior</type> <name>pointClippingBehavior</name></member>
</type>
<type category="struct" name="VkPhysicalDevicePointClippingPropertiesKHR" alias="VkPhysicalDevicePointClippingProperties"/>
<type category="struct" name="VkMemoryDedicatedRequirements" returnedonly="true" structextends="VkMemoryRequirements2">
<member values="VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>prefersDedicatedAllocation</name></member>
<member><type>VkBool32</type> <name>requiresDedicatedAllocation</name></member>
</type>
<type category="struct" name="VkMemoryDedicatedRequirementsKHR" alias="VkMemoryDedicatedRequirements"/>
<type category="struct" name="VkMemoryDedicatedAllocateInfo" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkImage</type> <name>image</name><comment>Image that this allocation will be bound to</comment></member>
<member optional="true"><type>VkBuffer</type> <name>buffer</name><comment>Buffer that this allocation will be bound to</comment></member>
</type>
<type category="struct" name="VkMemoryDedicatedAllocateInfoKHR" alias="VkMemoryDedicatedAllocateInfo"/>
<type category="struct" name="VkImageViewUsageCreateInfo" structextends="VkImageViewCreateInfo">
<member values="VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageUsageFlags</type> <name>usage</name></member>
</type>
<type category="struct" name="VkImageViewUsageCreateInfoKHR" alias="VkImageViewUsageCreateInfo"/>
<type category="struct" name="VkPipelineTessellationDomainOriginStateCreateInfo" structextends="VkPipelineTessellationStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkTessellationDomainOrigin</type> <name>domainOrigin</name></member>
</type>
<type category="struct" name="VkPipelineTessellationDomainOriginStateCreateInfoKHR" alias="VkPipelineTessellationDomainOriginStateCreateInfo"/>
<type category="struct" name="VkSamplerYcbcrConversionInfo" structextends="VkSamplerCreateInfo,VkImageViewCreateInfo">
<member values="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSamplerYcbcrConversion</type> <name>conversion</name></member>
</type>
<type category="struct" name="VkSamplerYcbcrConversionInfoKHR" alias="VkSamplerYcbcrConversionInfo"/>
<type category="struct" name="VkSamplerYcbcrConversionCreateInfo">
<member values="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkFormat</type> <name>format</name></member>
<member><type>VkSamplerYcbcrModelConversion</type> <name>ycbcrModel</name></member>
<member><type>VkSamplerYcbcrRange</type> <name>ycbcrRange</name></member>
<member><type>VkComponentMapping</type> <name>components</name></member>
<member><type>VkChromaLocation</type> <name>xChromaOffset</name></member>
<member><type>VkChromaLocation</type> <name>yChromaOffset</name></member>
<member><type>VkFilter</type> <name>chromaFilter</name></member>
<member><type>VkBool32</type> <name>forceExplicitReconstruction</name></member>
</type>
<type category="struct" name="VkSamplerYcbcrConversionCreateInfoKHR" alias="VkSamplerYcbcrConversionCreateInfo"/>
<type category="struct" name="VkBindImagePlaneMemoryInfo" structextends="VkBindImageMemoryInfo">
<member values="VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageAspectFlagBits</type> <name>planeAspect</name></member>
</type>
<type category="struct" name="VkBindImagePlaneMemoryInfoKHR" alias="VkBindImagePlaneMemoryInfo"/>
<type category="struct" name="VkImagePlaneMemoryRequirementsInfo" structextends="VkImageMemoryRequirementsInfo2">
<member values="VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageAspectFlagBits</type> <name>planeAspect</name></member>
</type>
<type category="struct" name="VkImagePlaneMemoryRequirementsInfoKHR" alias="VkImagePlaneMemoryRequirementsInfo"/>
<type category="struct" name="VkPhysicalDeviceSamplerYcbcrConversionFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>samplerYcbcrConversion</name><comment>Sampler color conversion supported</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR" alias="VkPhysicalDeviceSamplerYcbcrConversionFeatures"/>
<type category="struct" name="VkSamplerYcbcrConversionImageFormatProperties" returnedonly="true" structextends="VkImageFormatProperties2">
<member values="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>combinedImageSamplerDescriptorCount</name></member>
</type>
<type category="struct" name="VkSamplerYcbcrConversionImageFormatPropertiesKHR" alias="VkSamplerYcbcrConversionImageFormatProperties"/>
<type category="struct" name="VkTextureLODGatherFormatPropertiesAMD" returnedonly="true" structextends="VkImageFormatProperties2">
<member values="VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>supportsTextureGatherLODBiasAMD</name></member>
</type>
<type category="struct" name="VkConditionalRenderingBeginInfoEXT">
<member values="VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBuffer</type> <name>buffer</name></member>
<member><type>VkDeviceSize</type> <name>offset</name></member>
<member optional="true"><type>VkConditionalRenderingFlagsEXT</type> <name>flags</name></member>
</type>
<type category="struct" name="VkProtectedSubmitInfo" structextends="VkSubmitInfo">
<member values="VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>protectedSubmit</name><comment>Submit protected command buffers</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceProtectedMemoryFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>protectedMemory</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceProtectedMemoryProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkBool32</type> <name>protectedNoFault</name></member>
</type>
<type category="struct" name="VkDeviceQueueInfo2">
<member values="VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDeviceQueueCreateFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>queueFamilyIndex</name></member>
<member><type>uint32_t</type> <name>queueIndex</name></member>
</type>
<type category="struct" name="VkPipelineCoverageToColorStateCreateInfoNV" structextends="VkPipelineMultisampleStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCoverageToColorStateCreateFlagsNV</type> <name>flags</name></member>
<member><type>VkBool32</type> <name>coverageToColorEnable</name></member>
<member optional="true"><type>uint32_t</type> <name>coverageToColorLocation</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSamplerFilterMinmaxProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>filterMinmaxSingleComponentFormats</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>filterMinmaxImageComponentMapping</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT" alias="VkPhysicalDeviceSamplerFilterMinmaxProperties"/>
<type category="struct" name="VkSampleLocationEXT">
<member><type>float</type> <name>x</name></member>
<member><type>float</type> <name>y</name></member>
</type>
<type category="struct" name="VkSampleLocationsInfoEXT" structextends="VkImageMemoryBarrier,VkImageMemoryBarrier2KHR">
<member values="VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkSampleCountFlagBits</type> <name>sampleLocationsPerPixel</name></member>
<member><type>VkExtent2D</type> <name>sampleLocationGridSize</name></member>
<member optional="true"><type>uint32_t</type> <name>sampleLocationsCount</name></member>
<member len="sampleLocationsCount">const <type>VkSampleLocationEXT</type>* <name>pSampleLocations</name></member>
</type>
<type category="struct" name="VkAttachmentSampleLocationsEXT">
<member><type>uint32_t</type> <name>attachmentIndex</name></member>
<member><type>VkSampleLocationsInfoEXT</type> <name>sampleLocationsInfo</name></member>
</type>
<type category="struct" name="VkSubpassSampleLocationsEXT">
<member><type>uint32_t</type> <name>subpassIndex</name></member>
<member><type>VkSampleLocationsInfoEXT</type> <name>sampleLocationsInfo</name></member>
</type>
<type category="struct" name="VkRenderPassSampleLocationsBeginInfoEXT" structextends="VkRenderPassBeginInfo">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>attachmentInitialSampleLocationsCount</name></member>
<member len="attachmentInitialSampleLocationsCount">const <type>VkAttachmentSampleLocationsEXT</type>* <name>pAttachmentInitialSampleLocations</name></member>
<member optional="true"><type>uint32_t</type> <name>postSubpassSampleLocationsCount</name></member>
<member len="postSubpassSampleLocationsCount">const <type>VkSubpassSampleLocationsEXT</type>* <name>pPostSubpassSampleLocations</name></member>
</type>
<type category="struct" name="VkPipelineSampleLocationsStateCreateInfoEXT" structextends="VkPipelineMultisampleStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>sampleLocationsEnable</name></member>
<member><type>VkSampleLocationsInfoEXT</type> <name>sampleLocationsInfo</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSampleLocationsPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="bitmask"><type>VkSampleCountFlags</type> <name>sampleLocationSampleCounts</name></member>
<member limittype="max"><type>VkExtent2D</type> <name>maxSampleLocationGridSize</name></member>
<member limittype="range"><type>float</type> <name>sampleLocationCoordinateRange</name>[2]</member>
<member limittype="noauto"><type>uint32_t</type> <name>sampleLocationSubPixelBits</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>variableSampleLocations</name></member>
</type>
<type category="struct" name="VkMultisamplePropertiesEXT" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkExtent2D</type> <name>maxSampleLocationGridSize</name></member>
</type>
<type category="struct" name="VkSamplerReductionModeCreateInfo" structextends="VkSamplerCreateInfo">
<member values="VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSamplerReductionMode</type> <name>reductionMode</name></member>
</type>
<type category="struct" name="VkSamplerReductionModeCreateInfoEXT" alias="VkSamplerReductionModeCreateInfo"/>
<type category="struct" name="VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>advancedBlendCoherentOperations</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>advancedBlendMaxColorAttachments</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>advancedBlendIndependentBlend</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>advancedBlendNonPremultipliedSrcColor</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>advancedBlendNonPremultipliedDstColor</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>advancedBlendCorrelatedOverlap</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>advancedBlendAllOperations</name></member>
</type>
<type category="struct" name="VkPipelineColorBlendAdvancedStateCreateInfoEXT" structextends="VkPipelineColorBlendStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>srcPremultiplied</name></member>
<member><type>VkBool32</type> <name>dstPremultiplied</name></member>
<member><type>VkBlendOverlapEXT</type> <name>blendOverlap</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceInlineUniformBlockFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>inlineUniformBlock</name></member>
<member><type>VkBool32</type> <name>descriptorBindingInlineUniformBlockUpdateAfterBind</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceInlineUniformBlockPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxInlineUniformBlockSize</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorInlineUniformBlocks</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetInlineUniformBlocks</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindInlineUniformBlocks</name></member>
</type>
<type category="struct" name="VkWriteDescriptorSetInlineUniformBlockEXT" structextends="VkWriteDescriptorSet">
<member values="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>dataSize</name></member>
<member len="dataSize">const <type>void</type>* <name>pData</name></member>
</type>
<type category="struct" name="VkDescriptorPoolInlineUniformBlockCreateInfoEXT" structextends="VkDescriptorPoolCreateInfo">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>maxInlineUniformBlockBindings</name></member>
</type>
<type category="struct" name="VkPipelineCoverageModulationStateCreateInfoNV" structextends="VkPipelineMultisampleStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCoverageModulationStateCreateFlagsNV</type> <name>flags</name></member>
<member><type>VkCoverageModulationModeNV</type> <name>coverageModulationMode</name></member>
<member><type>VkBool32</type> <name>coverageModulationTableEnable</name></member>
<member optional="true"><type>uint32_t</type> <name>coverageModulationTableCount</name></member>
<member noautovalidity="true" optional="true" len="coverageModulationTableCount">const <type>float</type>* <name>pCoverageModulationTable</name></member>
</type>
<type category="struct" name="VkImageFormatListCreateInfo" structextends="VkImageCreateInfo,VkSwapchainCreateInfoKHR,VkPhysicalDeviceImageFormatInfo2">
<member values="VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>viewFormatCount</name></member>
<member len="viewFormatCount">const <type>VkFormat</type>* <name>pViewFormats</name></member>
</type>
<type category="struct" name="VkImageFormatListCreateInfoKHR" alias="VkImageFormatListCreateInfo"/>
<type category="struct" name="VkValidationCacheCreateInfoEXT">
<member values="VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkValidationCacheCreateFlagsEXT</type> <name>flags</name></member>
<member optional="true"><type>size_t</type> <name>initialDataSize</name></member>
<member len="initialDataSize">const <type>void</type>* <name>pInitialData</name></member>
</type>
<type category="struct" name="VkShaderModuleValidationCacheCreateInfoEXT" structextends="VkShaderModuleCreateInfo">
<member values="VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkValidationCacheEXT</type> <name>validationCache</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMaintenance3Properties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerSetDescriptors</name></member>
<member limittype="max"><type>VkDeviceSize</type> <name>maxMemoryAllocationSize</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMaintenance3PropertiesKHR" alias="VkPhysicalDeviceMaintenance3Properties"/>
<type category="struct" name="VkDescriptorSetLayoutSupport" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>supported</name></member>
</type>
<type category="struct" name="VkDescriptorSetLayoutSupportKHR" alias="VkDescriptorSetLayoutSupport"/>
<type category="struct" name="VkPhysicalDeviceShaderDrawParametersFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderDrawParameters</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderDrawParameterFeatures" alias="VkPhysicalDeviceShaderDrawParametersFeatures"/>
<type category="struct" name="VkPhysicalDeviceShaderFloat16Int8Features" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderFloat16</name><comment>16-bit floats (halfs) in shaders</comment></member>
<member><type>VkBool32</type> <name>shaderInt8</name><comment>8-bit integers in shaders</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderFloat16Int8FeaturesKHR" alias="VkPhysicalDeviceShaderFloat16Int8Features"/>
<type category="struct" name="VkPhysicalDeviceFloat16Int8FeaturesKHR" alias="VkPhysicalDeviceShaderFloat16Int8Features"/>
<type category="struct" name="VkPhysicalDeviceFloatControlsProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkShaderFloatControlsIndependence</type> <name>denormBehaviorIndependence</name></member>
<member limittype="noauto"><type>VkShaderFloatControlsIndependence</type> <name>roundingModeIndependence</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderSignedZeroInfNanPreserveFloat16</name><comment>An implementation can preserve signed zero, nan, inf</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderSignedZeroInfNanPreserveFloat32</name><comment>An implementation can preserve signed zero, nan, inf</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderSignedZeroInfNanPreserveFloat64</name><comment>An implementation can preserve signed zero, nan, inf</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormPreserveFloat16</name><comment>An implementation can preserve denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormPreserveFloat32</name><comment>An implementation can preserve denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormPreserveFloat64</name><comment>An implementation can preserve denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormFlushToZeroFloat16</name><comment>An implementation can flush to zero denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormFlushToZeroFloat32</name><comment>An implementation can flush to zero denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormFlushToZeroFloat64</name><comment>An implementation can flush to zero denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTEFloat16</name><comment>An implementation can support RTE</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTEFloat32</name><comment>An implementation can support RTE</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTEFloat64</name><comment>An implementation can support RTE</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTZFloat16</name><comment>An implementation can support RTZ</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTZFloat32</name><comment>An implementation can support RTZ</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTZFloat64</name><comment>An implementation can support RTZ</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceFloatControlsPropertiesKHR" alias="VkPhysicalDeviceFloatControlsProperties"/>
<type category="struct" name="VkPhysicalDeviceHostQueryResetFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>hostQueryReset</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceHostQueryResetFeaturesEXT" alias="VkPhysicalDeviceHostQueryResetFeatures"/>
<type category="struct" name="VkNativeBufferUsage2ANDROID">
<member><type>uint64_t</type> <name>consumer</name></member>
<member><type>uint64_t</type> <name>producer</name></member>
</type>
<type category="struct" name="VkNativeBufferANDROID">
<member values="VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member>const <type>void</type>* <name>handle</name></member>
<member><type>int</type> <name>stride</name></member>
<member><type>int</type> <name>format</name></member>
<member><type>int</type> <name>usage</name></member>
<member><type>VkNativeBufferUsage2ANDROID</type> <name>usage2</name></member>
</type>
<type category="struct" name="VkSwapchainImageCreateInfoANDROID">
<member values="VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSwapchainImageUsageFlagsANDROID</type> <name>usage</name></member>
</type>
<type category="struct" name="VkPhysicalDevicePresentationPropertiesANDROID">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>sharedImage</name></member>
</type>
<type category="struct" name="VkShaderResourceUsageAMD" returnedonly="true">
<member><type>uint32_t</type> <name>numUsedVgprs</name></member>
<member><type>uint32_t</type> <name>numUsedSgprs</name></member>
<member><type>uint32_t</type> <name>ldsSizePerLocalWorkGroup</name></member>
<member><type>size_t</type> <name>ldsUsageSizeInBytes</name></member>
<member><type>size_t</type> <name>scratchMemUsageInBytes</name></member>
</type>
<type category="struct" name="VkShaderStatisticsInfoAMD" returnedonly="true">
<member><type>VkShaderStageFlags</type> <name>shaderStageMask</name></member>
<member><type>VkShaderResourceUsageAMD</type> <name>resourceUsage</name></member>
<member><type>uint32_t</type> <name>numPhysicalVgprs</name></member>
<member><type>uint32_t</type> <name>numPhysicalSgprs</name></member>
<member><type>uint32_t</type> <name>numAvailableVgprs</name></member>
<member><type>uint32_t</type> <name>numAvailableSgprs</name></member>
<member><type>uint32_t</type> <name>computeWorkGroupSize</name>[3]</member>
</type>
<type category="struct" name="VkDeviceQueueGlobalPriorityCreateInfoEXT" structextends="VkDeviceQueueCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkQueueGlobalPriorityEXT</type> <name>globalPriority</name></member>
</type>
<type category="struct" name="VkDebugUtilsObjectNameInfoEXT">
<member values="VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkObjectType</type> <name>objectType</name></member>
<member><type>uint64_t</type> <name>objectHandle</name></member>
<member optional="true" len="null-terminated">const <type>char</type>* <name>pObjectName</name></member>
</type>
<type category="struct" name="VkDebugUtilsObjectTagInfoEXT">
<member values="VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkObjectType</type> <name>objectType</name></member>
<member><type>uint64_t</type> <name>objectHandle</name></member>
<member><type>uint64_t</type> <name>tagName</name></member>
<member><type>size_t</type> <name>tagSize</name></member>
<member len="tagSize">const <type>void</type>* <name>pTag</name></member>
</type>
<type category="struct" name="VkDebugUtilsLabelEXT">
<member values="VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member len="null-terminated">const <type>char</type>* <name>pLabelName</name></member>
<member><type>float</type> <name>color</name>[4]</member>
</type>
<type category="struct" name="VkDebugUtilsMessengerCreateInfoEXT" allowduplicate="true" structextends="VkInstanceCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDebugUtilsMessengerCreateFlagsEXT</type> <name>flags</name></member>
<member><type>VkDebugUtilsMessageSeverityFlagsEXT</type> <name>messageSeverity</name></member>
<member><type>VkDebugUtilsMessageTypeFlagsEXT</type> <name>messageType</name></member>
<member><type>PFN_vkDebugUtilsMessengerCallbackEXT</type> <name>pfnUserCallback</name></member>
<member optional="true"><type>void</type>* <name>pUserData</name></member>
</type>
<type category="struct" name="VkDebugUtilsMessengerCallbackDataEXT">
<member values="VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDebugUtilsMessengerCallbackDataFlagsEXT</type> <name>flags</name></member>
<member optional="true" len="null-terminated">const <type>char</type>* <name>pMessageIdName</name></member>
<member><type>int32_t</type> <name>messageIdNumber</name></member>
<member len="null-terminated">const <type>char</type>* <name>pMessage</name></member>
<member optional="true"><type>uint32_t</type> <name>queueLabelCount</name></member>
<member len="queueLabelCount">const <type>VkDebugUtilsLabelEXT</type>* <name>pQueueLabels</name></member>
<member optional="true"><type>uint32_t</type> <name>cmdBufLabelCount</name></member>
<member len="cmdBufLabelCount">const <type>VkDebugUtilsLabelEXT</type>* <name>pCmdBufLabels</name></member>
<member optional="true"><type>uint32_t</type> <name>objectCount</name></member>
<member len="objectCount">const <type>VkDebugUtilsObjectNameInfoEXT</type>* <name>pObjects</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDeviceMemoryReportFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>deviceMemoryReport</name></member>
</type>
<type category="struct" name="VkDeviceDeviceMemoryReportCreateInfoEXT" allowduplicate="true" structextends="VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceMemoryReportFlagsEXT</type> <name>flags</name></member>
<member><type>PFN_vkDeviceMemoryReportCallbackEXT</type> <name>pfnUserCallback</name></member>
<member><type>void</type>* <name>pUserData</name></member>
</type>
<type category="struct" name="VkDeviceMemoryReportCallbackDataEXT" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceMemoryReportFlagsEXT</type> <name>flags</name></member>
<member><type>VkDeviceMemoryReportEventTypeEXT</type> <name>type</name></member>
<member><type>uint64_t</type> <name>memoryObjectId</name></member>
<member><type>VkDeviceSize</type> <name>size</name></member>
<member><type>VkObjectType</type> <name>objectType</name></member>
<member><type>uint64_t</type> <name>objectHandle</name></member>
<member><type>uint32_t</type> <name>heapIndex</name></member>
</type>
<type category="struct" name="VkImportMemoryHostPointerInfoEXT" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></member>
<member optional="false"><type>void</type>* <name>pHostPointer</name></member>
</type>
<type category="struct" name="VkMemoryHostPointerPropertiesEXT" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>memoryTypeBits</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExternalMemoryHostPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>minImportedHostPointerAlignment</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceConservativeRasterizationPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>float</type> <name>primitiveOverestimationSize</name><comment>The size in pixels the primitive is enlarged at each edge during conservative rasterization</comment></member>
<member limittype="max"><type>float</type> <name>maxExtraPrimitiveOverestimationSize</name><comment>The maximum additional overestimation the client can specify in the pipeline state</comment></member>
<member limittype="noauto"><type>float</type> <name>extraPrimitiveOverestimationSizeGranularity</name><comment>The granularity of extra overestimation sizes the implementations supports between 0 and maxExtraOverestimationSize</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>primitiveUnderestimation</name><comment>true if the implementation supports conservative rasterization underestimation mode</comment></member>
<member limittype="noauto"><type>VkBool32</type> <name>conservativePointAndLineRasterization</name><comment>true if conservative rasterization also applies to points and lines</comment></member>
<member limittype="noauto"><type>VkBool32</type> <name>degenerateTrianglesRasterized</name><comment>true if degenerate triangles (those with zero area after snap) are rasterized</comment></member>
<member limittype="noauto"><type>VkBool32</type> <name>degenerateLinesRasterized</name><comment>true if degenerate lines (those with zero length after snap) are rasterized</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fullyCoveredFragmentShaderInputVariable</name><comment>true if the implementation supports the FullyCoveredEXT SPIR-V builtin fragment shader input variable</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>conservativeRasterizationPostDepthCoverage</name><comment>true if the implementation supports both conservative rasterization and post depth coverage sample coverage mask</comment></member>
</type>
<type category="struct" name="VkCalibratedTimestampInfoEXT">
<member values="VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkTimeDomainEXT</type> <name>timeDomain</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderCorePropertiesAMD" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>shaderEngineCount</name><comment>number of shader engines</comment></member>
<member limittype="max"><type>uint32_t</type> <name>shaderArraysPerEngineCount</name><comment>number of shader arrays</comment></member>
<member limittype="max"><type>uint32_t</type> <name>computeUnitsPerShaderArray</name><comment>number of physical CUs per shader array</comment></member>
<member limittype="max"><type>uint32_t</type> <name>simdPerComputeUnit</name><comment>number of SIMDs per compute unit</comment></member>
<member limittype="max"><type>uint32_t</type> <name>wavefrontsPerSimd</name><comment>number of wavefront slots in each SIMD</comment></member>
<member limittype="max"><type>uint32_t</type> <name>wavefrontSize</name><comment>maximum number of threads per wavefront</comment></member>
<member limittype="max"><type>uint32_t</type> <name>sgprsPerSimd</name><comment>number of physical SGPRs per SIMD</comment></member>
<member limittype="min"><type>uint32_t</type> <name>minSgprAllocation</name><comment>minimum number of SGPRs that can be allocated by a wave</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxSgprAllocation</name><comment>number of available SGPRs</comment></member>
<member limittype="noauto"><type>uint32_t</type> <name>sgprAllocationGranularity</name><comment>SGPRs are allocated in groups of this size</comment></member>
<member limittype="max"><type>uint32_t</type> <name>vgprsPerSimd</name><comment>number of physical VGPRs per SIMD</comment></member>
<member limittype="min"><type>uint32_t</type> <name>minVgprAllocation</name><comment>minimum number of VGPRs that can be allocated by a wave</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxVgprAllocation</name><comment>number of available VGPRs</comment></member>
<member limittype="noauto"><type>uint32_t</type> <name>vgprAllocationGranularity</name><comment>VGPRs are allocated in groups of this size</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderCoreProperties2AMD" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name><comment>Pointer to next structure</comment></member>
<member limittype="bitmask"><type>VkShaderCorePropertiesFlagsAMD</type> <name>shaderCoreFeatures</name><comment>features supported by the shader core</comment></member>
<member limittype="max"><type>uint32_t</type> <name>activeComputeUnitCount</name><comment>number of active compute units across all shader engines/arrays</comment></member>
</type>
<type category="struct" name="VkPipelineRasterizationConservativeStateCreateInfoEXT" structextends="VkPipelineRasterizationStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineRasterizationConservativeStateCreateFlagsEXT</type> <name>flags</name><comment>Reserved</comment></member>
<member><type>VkConservativeRasterizationModeEXT</type> <name>conservativeRasterizationMode</name><comment>Conservative rasterization mode</comment></member>
<member><type>float</type> <name>extraPrimitiveOverestimationSize</name><comment>Extra overestimation to add to the primitive</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceDescriptorIndexingFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderInputAttachmentArrayDynamicIndexing</name></member>
<member><type>VkBool32</type> <name>shaderUniformTexelBufferArrayDynamicIndexing</name></member>
<member><type>VkBool32</type> <name>shaderStorageTexelBufferArrayDynamicIndexing</name></member>
<member><type>VkBool32</type> <name>shaderUniformBufferArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderSampledImageArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderStorageBufferArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderStorageImageArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderInputAttachmentArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderUniformTexelBufferArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderStorageTexelBufferArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>descriptorBindingUniformBufferUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingSampledImageUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingStorageImageUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingStorageBufferUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingUniformTexelBufferUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingStorageTexelBufferUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingUpdateUnusedWhilePending</name></member>
<member><type>VkBool32</type> <name>descriptorBindingPartiallyBound</name></member>
<member><type>VkBool32</type> <name>descriptorBindingVariableDescriptorCount</name></member>
<member><type>VkBool32</type> <name>runtimeDescriptorArray</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDescriptorIndexingFeaturesEXT" alias="VkPhysicalDeviceDescriptorIndexingFeatures"/>
<type category="struct" name="VkPhysicalDeviceDescriptorIndexingProperties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxUpdateAfterBindDescriptorsInAllPools</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderUniformBufferArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderSampledImageArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderStorageBufferArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderStorageImageArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderInputAttachmentArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>robustBufferAccessUpdateAfterBind</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>quadDivergentImplicitLod</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindSamplers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindUniformBuffers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindStorageBuffers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindSampledImages</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindStorageImages</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindInputAttachments</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageUpdateAfterBindResources</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindSamplers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindUniformBuffers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindUniformBuffersDynamic</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindStorageBuffers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindStorageBuffersDynamic</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindSampledImages</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindStorageImages</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindInputAttachments</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDescriptorIndexingPropertiesEXT" alias="VkPhysicalDeviceDescriptorIndexingProperties"/>
<type category="struct" name="VkDescriptorSetLayoutBindingFlagsCreateInfo" structextends="VkDescriptorSetLayoutCreateInfo">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>bindingCount</name></member>
<member len="bindingCount" optional="false,true">const <type>VkDescriptorBindingFlags</type>* <name>pBindingFlags</name></member>
</type>
<type category="struct" name="VkDescriptorSetLayoutBindingFlagsCreateInfoEXT" alias="VkDescriptorSetLayoutBindingFlagsCreateInfo"/>
<type category="struct" name="VkDescriptorSetVariableDescriptorCountAllocateInfo" structextends="VkDescriptorSetAllocateInfo">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>descriptorSetCount</name></member>
<member len="descriptorSetCount">const <type>uint32_t</type>* <name>pDescriptorCounts</name></member>
</type>
<type category="struct" name="VkDescriptorSetVariableDescriptorCountAllocateInfoEXT" alias="VkDescriptorSetVariableDescriptorCountAllocateInfo"/>
<type category="struct" name="VkDescriptorSetVariableDescriptorCountLayoutSupport" structextends="VkDescriptorSetLayoutSupport" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>maxVariableDescriptorCount</name></member>
</type>
<type category="struct" name="VkDescriptorSetVariableDescriptorCountLayoutSupportEXT" alias="VkDescriptorSetVariableDescriptorCountLayoutSupport"/>
<type category="struct" name="VkAttachmentDescription2">
<member values="VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkAttachmentDescriptionFlags</type> <name>flags</name></member>
<member><type>VkFormat</type> <name>format</name></member>
<member><type>VkSampleCountFlagBits</type> <name>samples</name></member>
<member><type>VkAttachmentLoadOp</type> <name>loadOp</name><comment>Load operation for color or depth data</comment></member>
<member><type>VkAttachmentStoreOp</type> <name>storeOp</name><comment>Store operation for color or depth data</comment></member>
<member><type>VkAttachmentLoadOp</type> <name>stencilLoadOp</name><comment>Load operation for stencil data</comment></member>
<member><type>VkAttachmentStoreOp</type> <name>stencilStoreOp</name><comment>Store operation for stencil data</comment></member>
<member><type>VkImageLayout</type> <name>initialLayout</name></member>
<member><type>VkImageLayout</type> <name>finalLayout</name></member>
</type>
<type category="struct" name="VkAttachmentDescription2KHR" alias="VkAttachmentDescription2"/>
<type category="struct" name="VkAttachmentReference2">
<member values="VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>attachment</name></member>
<member><type>VkImageLayout</type> <name>layout</name></member>
<member noautovalidity="true"><type>VkImageAspectFlags</type> <name>aspectMask</name></member>
</type>
<type category="struct" name="VkAttachmentReference2KHR" alias="VkAttachmentReference2"/>
<type category="struct" name="VkSubpassDescription2">
<member values="VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkSubpassDescriptionFlags</type> <name>flags</name></member>
<member><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></member>
<member><type>uint32_t</type> <name>viewMask</name></member>
<member optional="true"><type>uint32_t</type> <name>inputAttachmentCount</name></member>
<member len="inputAttachmentCount">const <type>VkAttachmentReference2</type>* <name>pInputAttachments</name></member>
<member optional="true"><type>uint32_t</type> <name>colorAttachmentCount</name></member>
<member len="colorAttachmentCount">const <type>VkAttachmentReference2</type>* <name>pColorAttachments</name></member>
<member optional="true" len="colorAttachmentCount">const <type>VkAttachmentReference2</type>* <name>pResolveAttachments</name></member>
<member optional="true">const <type>VkAttachmentReference2</type>* <name>pDepthStencilAttachment</name></member>
<member optional="true"><type>uint32_t</type> <name>preserveAttachmentCount</name></member>
<member len="preserveAttachmentCount">const <type>uint32_t</type>* <name>pPreserveAttachments</name></member>
</type>
<type category="struct" name="VkSubpassDescription2KHR" alias="VkSubpassDescription2"/>
<type category="struct" name="VkSubpassDependency2">
<member values="VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>srcSubpass</name></member>
<member><type>uint32_t</type> <name>dstSubpass</name></member>
<member optional="true"><type>VkPipelineStageFlags</type> <name>srcStageMask</name></member>
<member optional="true"><type>VkPipelineStageFlags</type> <name>dstStageMask</name></member>
<member optional="true"><type>VkAccessFlags</type> <name>srcAccessMask</name></member>
<member optional="true"><type>VkAccessFlags</type> <name>dstAccessMask</name></member>
<member optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></member>
<member><type>int32_t</type> <name>viewOffset</name></member>
</type>
<type category="struct" name="VkSubpassDependency2KHR" alias="VkSubpassDependency2"/>
<type category="struct" name="VkRenderPassCreateInfo2">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkRenderPassCreateFlags</type> <name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member>
<member len="attachmentCount">const <type>VkAttachmentDescription2</type>* <name>pAttachments</name></member>
<member><type>uint32_t</type> <name>subpassCount</name></member>
<member len="subpassCount">const <type>VkSubpassDescription2</type>* <name>pSubpasses</name></member>
<member optional="true"><type>uint32_t</type> <name>dependencyCount</name></member>
<member len="dependencyCount">const <type>VkSubpassDependency2</type>* <name>pDependencies</name></member>
<member optional="true"><type>uint32_t</type> <name>correlatedViewMaskCount</name></member>
<member len="correlatedViewMaskCount">const <type>uint32_t</type>* <name>pCorrelatedViewMasks</name></member>
</type>
<type category="struct" name="VkRenderPassCreateInfo2KHR" alias="VkRenderPassCreateInfo2"/>
<type category="struct" name="VkSubpassBeginInfo">
<member values="VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSubpassContents</type> <name>contents</name></member>
</type>
<type category="struct" name="VkSubpassBeginInfoKHR" alias="VkSubpassBeginInfo"/>
<type category="struct" name="VkSubpassEndInfo">
<member values="VK_STRUCTURE_TYPE_SUBPASS_END_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
</type>
<type category="struct" name="VkSubpassEndInfoKHR" alias="VkSubpassEndInfo"/>
<type category="struct" name="VkPhysicalDeviceTimelineSemaphoreFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>timelineSemaphore</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceTimelineSemaphoreFeaturesKHR" alias="VkPhysicalDeviceTimelineSemaphoreFeatures"/>
<type category="struct" name="VkPhysicalDeviceTimelineSemaphoreProperties" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint64_t</type> <name>maxTimelineSemaphoreValueDifference</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceTimelineSemaphorePropertiesKHR" alias="VkPhysicalDeviceTimelineSemaphoreProperties"/>
<type category="struct" name="VkSemaphoreTypeCreateInfo" structextends="VkSemaphoreCreateInfo,VkPhysicalDeviceExternalSemaphoreInfo">
<member values="VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSemaphoreType</type> <name>semaphoreType</name></member>
<member><type>uint64_t</type> <name>initialValue</name></member>
</type>
<type category="struct" name="VkSemaphoreTypeCreateInfoKHR" alias="VkSemaphoreTypeCreateInfo"/>
<type category="struct" name="VkTimelineSemaphoreSubmitInfo" structextends="VkSubmitInfo,VkBindSparseInfo">
<member values="VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>waitSemaphoreValueCount</name></member>
<member optional="true" len="waitSemaphoreValueCount">const <type>uint64_t</type>* <name>pWaitSemaphoreValues</name></member>
<member optional="true"><type>uint32_t</type> <name>signalSemaphoreValueCount</name></member>
<member optional="true" len="signalSemaphoreValueCount">const <type>uint64_t</type>* <name>pSignalSemaphoreValues</name></member>
</type>
<type category="struct" name="VkTimelineSemaphoreSubmitInfoKHR" alias="VkTimelineSemaphoreSubmitInfo"/>
<type category="struct" name="VkSemaphoreWaitInfo">
<member values="VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkSemaphoreWaitFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>semaphoreCount</name></member>
<member len="semaphoreCount">const <type>VkSemaphore</type>* <name>pSemaphores</name></member>
<member len="semaphoreCount">const <type>uint64_t</type>* <name>pValues</name></member>
</type>
<type category="struct" name="VkSemaphoreWaitInfoKHR" alias="VkSemaphoreWaitInfo"/>
<type category="struct" name="VkSemaphoreSignalInfo">
<member values="VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkSemaphore</type> <name>semaphore</name></member>
<member><type>uint64_t</type> <name>value</name></member>
</type>
<type category="struct" name="VkSemaphoreSignalInfoKHR" alias="VkSemaphoreSignalInfo"/>
<type category="struct" name="VkVertexInputBindingDivisorDescriptionEXT">
<member><type>uint32_t</type> <name>binding</name></member>
<member><type>uint32_t</type> <name>divisor</name></member>
</type>
<type category="struct" name="VkPipelineVertexInputDivisorStateCreateInfoEXT" structextends="VkPipelineVertexInputStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>vertexBindingDivisorCount</name></member>
<member len="vertexBindingDivisorCount">const <type>VkVertexInputBindingDivisorDescriptionEXT</type>* <name>pVertexBindingDivisors</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxVertexAttribDivisor</name><comment>max value of vertex attribute divisor</comment></member>
</type>
<type category="struct" name="VkPhysicalDevicePCIBusInfoPropertiesEXT" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>pciDomain</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>pciBus</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>pciDevice</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>pciFunction</name></member>
</type>
<type category="struct" name="VkImportAndroidHardwareBufferInfoANDROID" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member>struct <type>AHardwareBuffer</type>* <name>buffer</name></member>
</type>
<type category="struct" name="VkAndroidHardwareBufferUsageANDROID" structextends="VkImageFormatProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint64_t</type> <name>androidHardwareBufferUsage</name></member>
</type>
<type category="struct" name="VkAndroidHardwareBufferPropertiesANDROID" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceSize</type> <name>allocationSize</name></member>
<member><type>uint32_t</type> <name>memoryTypeBits</name></member>
</type>
<type category="struct" name="VkMemoryGetAndroidHardwareBufferInfoANDROID">
<member values="VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name></member>
</type>
<type category="struct" name="VkAndroidHardwareBufferFormatPropertiesANDROID" structextends="VkAndroidHardwareBufferPropertiesANDROID" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkFormat</type> <name>format</name></member>
<member><type>uint64_t</type> <name>externalFormat</name></member>
<member><type>VkFormatFeatureFlags</type> <name>formatFeatures</name></member>
<member><type>VkComponentMapping</type> <name>samplerYcbcrConversionComponents</name></member>
<member><type>VkSamplerYcbcrModelConversion</type> <name>suggestedYcbcrModel</name></member>
<member><type>VkSamplerYcbcrRange</type> <name>suggestedYcbcrRange</name></member>
<member><type>VkChromaLocation</type> <name>suggestedXChromaOffset</name></member>
<member><type>VkChromaLocation</type> <name>suggestedYChromaOffset</name></member>
</type>
<type category="struct" name="VkCommandBufferInheritanceConditionalRenderingInfoEXT" structextends="VkCommandBufferInheritanceInfo">
<member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>conditionalRenderingEnable</name><comment>Whether this secondary command buffer may be executed during an active conditional rendering</comment></member>
</type>
<type category="struct" name="VkExternalFormatANDROID" structextends="VkImageCreateInfo,VkSamplerYcbcrConversionCreateInfo">
<member values="VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint64_t</type> <name>externalFormat</name></member>
</type>
<type category="struct" name="VkPhysicalDevice8BitStorageFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>storageBuffer8BitAccess</name><comment>8-bit integer variables supported in StorageBuffer</comment></member>
<member><type>VkBool32</type> <name>uniformAndStorageBuffer8BitAccess</name><comment>8-bit integer variables supported in StorageBuffer and Uniform</comment></member>
<member><type>VkBool32</type> <name>storagePushConstant8</name><comment>8-bit integer variables supported in PushConstant</comment></member>
</type>
<type category="struct" name="VkPhysicalDevice8BitStorageFeaturesKHR" alias="VkPhysicalDevice8BitStorageFeatures"/>
<type category="struct" name="VkPhysicalDeviceConditionalRenderingFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>conditionalRendering</name></member>
<member><type>VkBool32</type> <name>inheritedConditionalRendering</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVulkanMemoryModelFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>vulkanMemoryModel</name></member>
<member><type>VkBool32</type> <name>vulkanMemoryModelDeviceScope</name></member>
<member><type>VkBool32</type> <name>vulkanMemoryModelAvailabilityVisibilityChains</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVulkanMemoryModelFeaturesKHR" alias="VkPhysicalDeviceVulkanMemoryModelFeatures"/>
<type category="struct" name="VkPhysicalDeviceShaderAtomicInt64Features" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderBufferInt64Atomics</name></member>
<member><type>VkBool32</type> <name>shaderSharedInt64Atomics</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderAtomicInt64FeaturesKHR" alias="VkPhysicalDeviceShaderAtomicInt64Features"/>
<type category="struct" name="VkPhysicalDeviceShaderAtomicFloatFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderBufferFloat32Atomics</name></member>
<member><type>VkBool32</type> <name>shaderBufferFloat32AtomicAdd</name></member>
<member><type>VkBool32</type> <name>shaderBufferFloat64Atomics</name></member>
<member><type>VkBool32</type> <name>shaderBufferFloat64AtomicAdd</name></member>
<member><type>VkBool32</type> <name>shaderSharedFloat32Atomics</name></member>
<member><type>VkBool32</type> <name>shaderSharedFloat32AtomicAdd</name></member>
<member><type>VkBool32</type> <name>shaderSharedFloat64Atomics</name></member>
<member><type>VkBool32</type> <name>shaderSharedFloat64AtomicAdd</name></member>
<member><type>VkBool32</type> <name>shaderImageFloat32Atomics</name></member>
<member><type>VkBool32</type> <name>shaderImageFloat32AtomicAdd</name></member>
<member><type>VkBool32</type> <name>sparseImageFloat32Atomics</name></member>
<member><type>VkBool32</type> <name>sparseImageFloat32AtomicAdd</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>vertexAttributeInstanceRateDivisor</name></member>
<member><type>VkBool32</type> <name>vertexAttributeInstanceRateZeroDivisor</name></member>
</type>
<type category="struct" name="VkQueueFamilyCheckpointPropertiesNV" structextends="VkQueueFamilyProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkPipelineStageFlags</type> <name>checkpointExecutionStageMask</name></member>
</type>
<type category="struct" name="VkCheckpointDataNV" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkPipelineStageFlagBits</type> <name>stage</name></member>
<member noautovalidity="true"><type>void</type>* <name>pCheckpointMarker</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDepthStencilResolveProperties" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="bitmask"><type>VkResolveModeFlags</type> <name>supportedDepthResolveModes</name><comment>supported depth resolve modes</comment></member>
<member limittype="bitmask"><type>VkResolveModeFlags</type> <name>supportedStencilResolveModes</name><comment>supported stencil resolve modes</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>independentResolveNone</name><comment>depth and stencil resolve modes can be set independently if one of them is none</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>independentResolve</name><comment>depth and stencil resolve modes can be set independently</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceDepthStencilResolvePropertiesKHR" alias="VkPhysicalDeviceDepthStencilResolveProperties"/>
<type category="struct" name="VkSubpassDescriptionDepthStencilResolve" structextends="VkSubpassDescription2">
<member values="VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkResolveModeFlagBits</type> <name>depthResolveMode</name><comment>depth resolve mode</comment></member>
<member noautovalidity="true"><type>VkResolveModeFlagBits</type> <name>stencilResolveMode</name><comment>stencil resolve mode</comment></member>
<member optional="true">const <type>VkAttachmentReference2</type>* <name>pDepthStencilResolveAttachment</name><comment>depth/stencil resolve attachment</comment></member>
</type>
<type category="struct" name="VkSubpassDescriptionDepthStencilResolveKHR" alias="VkSubpassDescriptionDepthStencilResolve"/>
<type category="struct" name="VkImageViewASTCDecodeModeEXT" structextends="VkImageViewCreateInfo">
<member values="VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkFormat</type> <name>decodeMode</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceASTCDecodeFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>decodeModeSharedExponent</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceTransformFeedbackFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>transformFeedback</name></member>
<member><type>VkBool32</type> <name>geometryStreams</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceTransformFeedbackPropertiesEXT" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxTransformFeedbackStreams</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxTransformFeedbackBuffers</name></member>
<member limittype="max"><type>VkDeviceSize</type> <name>maxTransformFeedbackBufferSize</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxTransformFeedbackStreamDataSize</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxTransformFeedbackBufferDataSize</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>maxTransformFeedbackBufferDataStride</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>transformFeedbackQueries</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>transformFeedbackStreamsLinesTriangles</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>transformFeedbackRasterizationStreamSelect</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>transformFeedbackDraw</name></member>
</type>
<type category="struct" name="VkPipelineRasterizationStateStreamCreateInfoEXT" structextends="VkPipelineRasterizationStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineRasterizationStateStreamCreateFlagsEXT</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>rasterizationStream</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>representativeFragmentTest</name></member>
</type>
<type category="struct" name="VkPipelineRepresentativeFragmentTestStateCreateInfoNV" structextends="VkGraphicsPipelineCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>representativeFragmentTestEnable</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExclusiveScissorFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>exclusiveScissor</name></member>
</type>
<type category="struct" name="VkPipelineViewportExclusiveScissorStateCreateInfoNV" structextends="VkPipelineViewportStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>exclusiveScissorCount</name></member>
<member noautovalidity="true" len="exclusiveScissorCount">const <type>VkRect2D</type>* <name>pExclusiveScissors</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceCornerSampledImageFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>cornerSampledImage</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceComputeShaderDerivativesFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>computeDerivativeGroupQuads</name></member>
<member><type>VkBool32</type> <name>computeDerivativeGroupLinear</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>fragmentShaderBarycentric</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderImageFootprintFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>imageFootprint</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>dedicatedAllocationImageAliasing</name></member>
</type>
<type category="struct" name="VkShadingRatePaletteNV">
<member><type>uint32_t</type> <name>shadingRatePaletteEntryCount</name></member>
<member len="shadingRatePaletteEntryCount">const <type>VkShadingRatePaletteEntryNV</type>* <name>pShadingRatePaletteEntries</name></member>
</type>
<type category="struct" name="VkPipelineViewportShadingRateImageStateCreateInfoNV" structextends="VkPipelineViewportStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shadingRateImageEnable</name></member>
<member optional="true"><type>uint32_t</type> <name>viewportCount</name></member>
<member noautovalidity="true" len="viewportCount">const <type>VkShadingRatePaletteNV</type>* <name>pShadingRatePalettes</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShadingRateImageFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shadingRateImage</name></member>
<member><type>VkBool32</type> <name>shadingRateCoarseSampleOrder</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShadingRateImagePropertiesNV" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkExtent2D</type> <name>shadingRateTexelSize</name></member>
<member limittype="max"><type>uint32_t</type> <name>shadingRatePaletteSize</name></member>
<member limittype="max"><type>uint32_t</type> <name>shadingRateMaxCoarseSamples</name></member>
</type>
<type category="struct" name="VkCoarseSampleLocationNV">
<member><type>uint32_t</type> <name>pixelX</name></member>
<member><type>uint32_t</type> <name>pixelY</name></member>
<member><type>uint32_t</type> <name>sample</name></member>
</type>
<type category="struct" name="VkCoarseSampleOrderCustomNV">
<member><type>VkShadingRatePaletteEntryNV</type> <name>shadingRate</name></member>
<member><type>uint32_t</type> <name>sampleCount</name></member>
<member><type>uint32_t</type> <name>sampleLocationCount</name></member>
<member len="sampleLocationCount">const <type>VkCoarseSampleLocationNV</type>* <name>pSampleLocations</name></member>
</type>
<type category="struct" name="VkPipelineViewportCoarseSampleOrderStateCreateInfoNV" structextends="VkPipelineViewportStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkCoarseSampleOrderTypeNV</type> <name>sampleOrderType</name></member>
<member optional="true"><type>uint32_t</type> <name>customSampleOrderCount</name></member>
<member len="customSampleOrderCount">const <type>VkCoarseSampleOrderCustomNV</type>* <name>pCustomSampleOrders</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMeshShaderFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>taskShader</name></member>
<member><type>VkBool32</type> <name>meshShader</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMeshShaderPropertiesNV" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDrawMeshTasksCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxTaskWorkGroupInvocations</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxTaskWorkGroupSize</name>[3]</member>
<member limittype="max"><type>uint32_t</type> <name>maxTaskTotalMemorySize</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxTaskOutputCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxMeshWorkGroupInvocations</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxMeshWorkGroupSize</name>[3]</member>
<member limittype="max"><type>uint32_t</type> <name>maxMeshTotalMemorySize</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxMeshOutputVertices</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxMeshOutputPrimitives</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxMeshMultiviewViewCount</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>meshOutputPerVertexGranularity</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>meshOutputPerPrimitiveGranularity</name></member>
</type>
<type category="struct" name="VkDrawMeshTasksIndirectCommandNV">
<member><type>uint32_t</type> <name>taskCount</name></member>
<member><type>uint32_t</type> <name>firstTask</name></member>
</type>
<type category="struct" name="VkRayTracingShaderGroupCreateInfoNV">
<member values="VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkRayTracingShaderGroupTypeKHR</type> <name>type</name></member>
<member><type>uint32_t</type> <name>generalShader</name></member>
<member><type>uint32_t</type> <name>closestHitShader</name></member>
<member><type>uint32_t</type> <name>anyHitShader</name></member>
<member><type>uint32_t</type> <name>intersectionShader</name></member>
</type>
<type category="struct" name="VkRayTracingShaderGroupCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkRayTracingShaderGroupTypeKHR</type> <name>type</name></member>
<member><type>uint32_t</type> <name>generalShader</name></member>
<member><type>uint32_t</type> <name>closestHitShader</name></member>
<member><type>uint32_t</type> <name>anyHitShader</name></member>
<member><type>uint32_t</type> <name>intersectionShader</name></member>
<member optional="true">const <type>void</type>* <name>pShaderGroupCaptureReplayHandle</name></member>
</type>
<type category="struct" name="VkRayTracingPipelineCreateInfoNV">
<member values="VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name><comment>Pipeline creation flags</comment></member>
<member><type>uint32_t</type> <name>stageCount</name></member>
<member len="stageCount">const <type>VkPipelineShaderStageCreateInfo</type>* <name>pStages</name><comment>One entry for each active shader stage</comment></member>
<member><type>uint32_t</type> <name>groupCount</name></member>
<member len="groupCount">const <type>VkRayTracingShaderGroupCreateInfoNV</type>* <name>pGroups</name></member>
<member><type>uint32_t</type> <name>maxRecursionDepth</name></member>
<member><type>VkPipelineLayout</type> <name>layout</name><comment>Interface layout of the pipeline</comment></member>
<member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name><comment>If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of</comment></member>
<member><type>int32_t</type> <name>basePipelineIndex</name><comment>If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of</comment></member>
</type>
<type category="struct" name="VkRayTracingPipelineCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCreateFlags</type> <name>flags</name><comment>Pipeline creation flags</comment></member>
<member optional="true"><type>uint32_t</type> <name>stageCount</name></member>
<member len="stageCount">const <type>VkPipelineShaderStageCreateInfo</type>* <name>pStages</name><comment>One entry for each active shader stage</comment></member>
<member optional="true"><type>uint32_t</type> <name>groupCount</name></member>
<member len="groupCount">const <type>VkRayTracingShaderGroupCreateInfoKHR</type>* <name>pGroups</name></member>
<member><type>uint32_t</type> <name>maxPipelineRayRecursionDepth</name></member>
<member optional="true">const <type>VkPipelineLibraryCreateInfoKHR</type>* <name>pLibraryInfo</name></member>
<member optional="true">const <type>VkRayTracingPipelineInterfaceCreateInfoKHR</type>* <name>pLibraryInterface</name></member>
<member optional="true">const <type>VkPipelineDynamicStateCreateInfo</type>* <name>pDynamicState</name></member>
<member><type>VkPipelineLayout</type> <name>layout</name><comment>Interface layout of the pipeline</comment></member>
<member noautovalidity="true" optional="true"><type>VkPipeline</type> <name>basePipelineHandle</name><comment>If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of</comment></member>
<member><type>int32_t</type> <name>basePipelineIndex</name><comment>If VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of</comment></member>
</type>
<type category="struct" name="VkGeometryTrianglesNV">
<member values="VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkBuffer</type> <name>vertexData</name></member>
<member><type>VkDeviceSize</type> <name>vertexOffset</name></member>
<member><type>uint32_t</type> <name>vertexCount</name></member>
<member><type>VkDeviceSize</type> <name>vertexStride</name></member>
<member><type>VkFormat</type> <name>vertexFormat</name></member>
<member optional="true"><type>VkBuffer</type> <name>indexData</name></member>
<member><type>VkDeviceSize</type> <name>indexOffset</name></member>
<member><type>uint32_t</type> <name>indexCount</name></member>
<member><type>VkIndexType</type> <name>indexType</name></member>
<member optional="true"><type>VkBuffer</type> <name>transformData</name><comment>Optional reference to array of floats representing a 3x4 row major affine transformation matrix.</comment></member>
<member><type>VkDeviceSize</type> <name>transformOffset</name></member>
</type>
<type category="struct" name="VkGeometryAABBNV">
<member values="VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkBuffer</type> <name>aabbData</name></member>
<member><type>uint32_t</type> <name>numAABBs</name></member>
<member><type>uint32_t</type> <name>stride</name><comment>Stride in bytes between AABBs</comment></member>
<member><type>VkDeviceSize</type> <name>offset</name><comment>Offset in bytes of the first AABB in aabbData</comment></member>
</type>
<type category="struct" name="VkGeometryDataNV">
<member><type>VkGeometryTrianglesNV</type> <name>triangles</name></member>
<member><type>VkGeometryAABBNV</type> <name>aabbs</name></member>
</type>
<type category="struct" name="VkGeometryNV">
<member values="VK_STRUCTURE_TYPE_GEOMETRY_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkGeometryTypeKHR</type> <name>geometryType</name></member>
<member><type>VkGeometryDataNV</type> <name>geometry</name></member>
<member optional="true"><type>VkGeometryFlagsKHR</type> <name>flags</name></member>
</type>
<type category="struct" name="VkAccelerationStructureInfoNV">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkAccelerationStructureTypeNV</type> <name>type</name></member>
<member optional="true"><type>VkBuildAccelerationStructureFlagsNV</type><name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>instanceCount</name></member>
<member optional="true"><type>uint32_t</type> <name>geometryCount</name></member>
<member len="geometryCount">const <type>VkGeometryNV</type>* <name>pGeometries</name></member>
</type>
<type category="struct" name="VkAccelerationStructureCreateInfoNV">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceSize</type> <name>compactedSize</name></member>
<member><type>VkAccelerationStructureInfoNV</type> <name>info</name></member>
</type>
<type category="struct" name="VkBindAccelerationStructureMemoryInfoNV">
<member values="VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkAccelerationStructureNV</type> <name>accelerationStructure</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkDeviceSize</type> <name>memoryOffset</name></member>
<member optional="true"><type>uint32_t</type> <name>deviceIndexCount</name></member>
<member len="deviceIndexCount">const <type>uint32_t</type>* <name>pDeviceIndices</name></member>
</type>
<type category="struct" name="VkWriteDescriptorSetAccelerationStructureKHR" structextends="VkWriteDescriptorSet">
<member values="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>accelerationStructureCount</name></member>
<member optional="false,true" len="accelerationStructureCount">const <type>VkAccelerationStructureKHR</type>* <name>pAccelerationStructures</name></member>
</type>
<type category="struct" name="VkWriteDescriptorSetAccelerationStructureNV" structextends="VkWriteDescriptorSet">
<member values="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>accelerationStructureCount</name></member>
<member optional="false,true" len="accelerationStructureCount">const <type>VkAccelerationStructureNV</type>* <name>pAccelerationStructures</name></member>
</type>
<type category="struct" name="VkAccelerationStructureMemoryRequirementsInfoNV">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkAccelerationStructureMemoryRequirementsTypeNV</type> <name>type</name></member>
<member><type>VkAccelerationStructureNV</type> <name>accelerationStructure</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceAccelerationStructureFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>accelerationStructure</name></member>
<member><type>VkBool32</type> <name>accelerationStructureCaptureReplay</name></member>
<member><type>VkBool32</type> <name>accelerationStructureIndirectBuild</name></member>
<member><type>VkBool32</type> <name>accelerationStructureHostCommands</name></member>
<member><type>VkBool32</type> <name>descriptorBindingAccelerationStructureUpdateAfterBind</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceRayTracingPipelineFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>rayTracingPipeline</name></member>
<member><type>VkBool32</type> <name>rayTracingPipelineShaderGroupHandleCaptureReplay</name></member>
<member><type>VkBool32</type> <name>rayTracingPipelineShaderGroupHandleCaptureReplayMixed</name></member>
<member><type>VkBool32</type> <name>rayTracingPipelineTraceRaysIndirect</name></member>
<member><type>VkBool32</type> <name>rayTraversalPrimitiveCulling</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceRayQueryFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>rayQuery</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceAccelerationStructurePropertiesKHR" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint64_t</type> <name>maxGeometryCount</name></member>
<member limittype="max"><type>uint64_t</type> <name>maxInstanceCount</name></member>
<member limittype="max"><type>uint64_t</type> <name>maxPrimitiveCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorAccelerationStructures</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindAccelerationStructures</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetAccelerationStructures</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindAccelerationStructures</name></member>
<member limittype="min"><type>uint32_t</type> <name>minAccelerationStructureScratchOffsetAlignment</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceRayTracingPipelinePropertiesKHR" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>shaderGroupHandleSize</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxRayRecursionDepth</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxShaderGroupStride</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>shaderGroupBaseAlignment</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>shaderGroupHandleCaptureReplaySize</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxRayDispatchInvocationCount</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>shaderGroupHandleAlignment</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxRayHitAttributeSize</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceRayTracingPropertiesNV" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>shaderGroupHandleSize</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxRecursionDepth</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxShaderGroupStride</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>shaderGroupBaseAlignment</name></member>
<member limittype="max"><type>uint64_t</type> <name>maxGeometryCount</name></member>
<member limittype="max"><type>uint64_t</type> <name>maxInstanceCount</name></member>
<member limittype="max"><type>uint64_t</type> <name>maxTriangleCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetAccelerationStructures</name></member>
</type>
<type category="struct" name="VkStridedDeviceAddressRegionKHR">
<member optional="true"><type>VkDeviceAddress</type> <name>deviceAddress</name></member>
<member><type>VkDeviceSize</type> <name>stride</name></member>
<member><type>VkDeviceSize</type> <name>size</name></member>
</type>
<type category="struct" name="VkTraceRaysIndirectCommandKHR">
<member><type>uint32_t</type> <name>width</name></member>
<member><type>uint32_t</type> <name>height</name></member>
<member><type>uint32_t</type> <name>depth</name></member>
</type>
<type category="struct" name="VkDrmFormatModifierPropertiesListEXT" returnedonly="true" structextends="VkFormatProperties2">
<member values="VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>drmFormatModifierCount</name></member>
<member optional="true,false" len="drmFormatModifierCount"><type>VkDrmFormatModifierPropertiesEXT</type>* <name>pDrmFormatModifierProperties</name></member>
</type>
<type category="struct" name="VkDrmFormatModifierPropertiesEXT" returnedonly="true">
<member><type>uint64_t</type> <name>drmFormatModifier</name></member>
<member><type>uint32_t</type> <name>drmFormatModifierPlaneCount</name></member>
<member><type>VkFormatFeatureFlags</type> <name>drmFormatModifierTilingFeatures</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceImageDrmFormatModifierInfoEXT" structextends="VkPhysicalDeviceImageFormatInfo2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint64_t</type> <name>drmFormatModifier</name></member>
<member><type>VkSharingMode</type> <name>sharingMode</name></member>
<member optional="true"><type>uint32_t</type> <name>queueFamilyIndexCount</name></member>
<member noautovalidity="true" len="queueFamilyIndexCount">const <type>uint32_t</type>* <name>pQueueFamilyIndices</name></member>
</type>
<type category="struct" name="VkImageDrmFormatModifierListCreateInfoEXT" structextends="VkImageCreateInfo">
<member values="VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>drmFormatModifierCount</name></member>
<member len="drmFormatModifierCount">const <type>uint64_t</type>* <name>pDrmFormatModifiers</name></member>
</type>
<type category="struct" name="VkImageDrmFormatModifierExplicitCreateInfoEXT" structextends="VkImageCreateInfo">
<member values="VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint64_t</type> <name>drmFormatModifier</name></member>
<member optional="false"><type>uint32_t</type> <name>drmFormatModifierPlaneCount</name></member>
<member len="drmFormatModifierPlaneCount">const <type>VkSubresourceLayout</type>* <name>pPlaneLayouts</name></member>
</type>
<type category="struct" name="VkImageDrmFormatModifierPropertiesEXT" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint64_t</type> <name>drmFormatModifier</name></member>
</type>
<type category="struct" name="VkImageStencilUsageCreateInfo" structextends="VkImageCreateInfo,VkPhysicalDeviceImageFormatInfo2">
<member values="VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageUsageFlags</type> <name>stencilUsage</name></member>
</type>
<type category="struct" name="VkImageStencilUsageCreateInfoEXT" alias="VkImageStencilUsageCreateInfo"/>
<type category="struct" name="VkDeviceMemoryOverallocationCreateInfoAMD" structextends="VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkMemoryOverallocationBehaviorAMD</type> <name>overallocationBehavior</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentDensityMapFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>fragmentDensityMap</name></member>
<member><type>VkBool32</type> <name>fragmentDensityMapDynamic</name></member>
<member><type>VkBool32</type> <name>fragmentDensityMapNonSubsampledImages</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentDensityMap2FeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>fragmentDensityMapDeferred</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentDensityMapPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="min"><type>VkExtent2D</type> <name>minFragmentDensityTexelSize</name></member>
<member limittype="max"><type>VkExtent2D</type> <name>maxFragmentDensityTexelSize</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentDensityInvocations</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentDensityMap2PropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkBool32</type> <name>subsampledLoads</name></member>
<member limittype="noauto"><type>VkBool32</type> <name>subsampledCoarseReconstructionEarlyAccess</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxSubsampledArrayLayers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetSubsampledSamplers</name></member>
</type>
<type category="struct" name="VkRenderPassFragmentDensityMapCreateInfoEXT" structextends="VkRenderPassCreateInfo,VkRenderPassCreateInfo2">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkAttachmentReference</type> <name>fragmentDensityMapAttachment</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceScalarBlockLayoutFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>scalarBlockLayout</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceScalarBlockLayoutFeaturesEXT" alias="VkPhysicalDeviceScalarBlockLayoutFeatures"/>
<type category="struct" name="VkSurfaceProtectedCapabilitiesKHR" structextends="VkSurfaceCapabilities2KHR">
<member values="VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>supportsProtected</name><comment>Represents if surface can be protected</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceUniformBufferStandardLayoutFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>uniformBufferStandardLayout</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR" alias="VkPhysicalDeviceUniformBufferStandardLayoutFeatures"/>
<type category="struct" name="VkPhysicalDeviceDepthClipEnableFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>depthClipEnable</name></member>
</type>
<type category="struct" name="VkPipelineRasterizationDepthClipStateCreateInfoEXT" structextends="VkPipelineRasterizationStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineRasterizationDepthClipStateCreateFlagsEXT</type> <name>flags</name><comment>Reserved</comment></member>
<member><type>VkBool32</type> <name>depthClipEnable</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMemoryBudgetPropertiesEXT" structextends="VkPhysicalDeviceMemoryProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceSize</type> <name>heapBudget</name>[<enum>VK_MAX_MEMORY_HEAPS</enum>]</member>
<member><type>VkDeviceSize</type> <name>heapUsage</name>[<enum>VK_MAX_MEMORY_HEAPS</enum>]</member>
</type>
<type category="struct" name="VkPhysicalDeviceMemoryPriorityFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>memoryPriority</name></member>
</type>
<type category="struct" name="VkMemoryPriorityAllocateInfoEXT" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>float</type> <name>priority</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceBufferDeviceAddressFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddress</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddressCaptureReplay</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddressMultiDevice</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceBufferDeviceAddressFeaturesKHR" alias="VkPhysicalDeviceBufferDeviceAddressFeatures"/>
<type category="struct" name="VkPhysicalDeviceBufferDeviceAddressFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddress</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddressCaptureReplay</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddressMultiDevice</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceBufferAddressFeaturesEXT" alias="VkPhysicalDeviceBufferDeviceAddressFeaturesEXT"/>
<type category="struct" name="VkBufferDeviceAddressInfo">
<member values="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBuffer</type> <name>buffer</name></member>
</type>
<type category="struct" name="VkBufferDeviceAddressInfoKHR" alias="VkBufferDeviceAddressInfo"/>
<type category="struct" name="VkBufferDeviceAddressInfoEXT" alias="VkBufferDeviceAddressInfo"/>
<type category="struct" name="VkBufferOpaqueCaptureAddressCreateInfo" structextends="VkBufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint64_t</type> <name>opaqueCaptureAddress</name></member>
</type>
<type category="struct" name="VkBufferOpaqueCaptureAddressCreateInfoKHR" alias="VkBufferOpaqueCaptureAddressCreateInfo"/>
<type category="struct" name="VkBufferDeviceAddressCreateInfoEXT" structextends="VkBufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceAddress</type> <name>deviceAddress</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceImageViewImageFormatInfoEXT" structextends="VkPhysicalDeviceImageFormatInfo2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkImageViewType</type> <name>imageViewType</name></member>
</type>
<type category="struct" name="VkFilterCubicImageViewImageFormatPropertiesEXT" returnedonly="true" structextends="VkImageFormatProperties2">
<member values="VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>filterCubic</name><comment>The combinations of format, image type (and image view type if provided) can be filtered with VK_FILTER_CUBIC_EXT</comment></member>
<member><type>VkBool32</type> <name>filterCubicMinmax</name><comment>The combination of format, image type (and image view type if provided) can be filtered with VK_FILTER_CUBIC_EXT and ReductionMode of Min or Max</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceImagelessFramebufferFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>imagelessFramebuffer</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceImagelessFramebufferFeaturesKHR" alias="VkPhysicalDeviceImagelessFramebufferFeatures"/>
<type category="struct" name="VkFramebufferAttachmentsCreateInfo" structextends="VkFramebufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>attachmentImageInfoCount</name></member>
<member len="attachmentImageInfoCount">const <type>VkFramebufferAttachmentImageInfo</type>* <name>pAttachmentImageInfos</name></member>
</type>
<type category="struct" name="VkFramebufferAttachmentsCreateInfoKHR" alias="VkFramebufferAttachmentsCreateInfo"/>
<type category="struct" name="VkFramebufferAttachmentImageInfo">
<member values="VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkImageCreateFlags</type> <name>flags</name><comment>Image creation flags</comment></member>
<member><type>VkImageUsageFlags</type> <name>usage</name><comment>Image usage flags</comment></member>
<member><type>uint32_t</type> <name>width</name></member>
<member><type>uint32_t</type> <name>height</name></member>
<member><type>uint32_t</type> <name>layerCount</name></member>
<member optional="true"><type>uint32_t</type> <name>viewFormatCount</name></member>
<member len="viewFormatCount">const <type>VkFormat</type>* <name>pViewFormats</name></member>
</type>
<type category="struct" name="VkFramebufferAttachmentImageInfoKHR" alias="VkFramebufferAttachmentImageInfo"/>
<type category="struct" name="VkRenderPassAttachmentBeginInfo" structextends="VkRenderPassBeginInfo">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>attachmentCount</name></member>
<member len="attachmentCount">const <type>VkImageView</type>* <name>pAttachments</name></member>
</type>
<type category="struct" name="VkRenderPassAttachmentBeginInfoKHR" alias="VkRenderPassAttachmentBeginInfo"/>
<type category="struct" name="VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>textureCompressionASTC_HDR</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceCooperativeMatrixFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>cooperativeMatrix</name></member>
<member><type>VkBool32</type> <name>cooperativeMatrixRobustBufferAccess</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceCooperativeMatrixPropertiesNV" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="bitmask"><type>VkShaderStageFlags</type> <name>cooperativeMatrixSupportedStages</name></member>
</type>
<type category="struct" name="VkCooperativeMatrixPropertiesNV">
<member values="VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>MSize</name></member>
<member><type>uint32_t</type> <name>NSize</name></member>
<member><type>uint32_t</type> <name>KSize</name></member>
<member><type>VkComponentTypeNV</type> <name>AType</name></member>
<member><type>VkComponentTypeNV</type> <name>BType</name></member>
<member><type>VkComponentTypeNV</type> <name>CType</name></member>
<member><type>VkComponentTypeNV</type> <name>DType</name></member>
<member><type>VkScopeNV</type> <name>scope</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceYcbcrImageArraysFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>ycbcrImageArrays</name></member>
</type>
<type category="struct" name="VkImageViewHandleInfoNVX">
<member values="VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageView</type> <name>imageView</name></member>
<member><type>VkDescriptorType</type> <name>descriptorType</name></member>
<member optional="true"><type>VkSampler</type> <name>sampler</name></member>
</type>
<type category="struct" name="VkImageViewAddressPropertiesNVX" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceAddress</type> <name>deviceAddress</name></member>
<member><type>VkDeviceSize</type> <name>size</name></member>
</type>
<type category="struct" name="VkPresentFrameTokenGGP" structextends="VkPresentInfoKHR">
<member values="VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>GgpFrameToken</type> <name>frameToken</name></member>
</type>
<type category="struct" name="VkPipelineCreationFeedbackEXT" returnedonly="true">
<member><type>VkPipelineCreationFeedbackFlagsEXT</type> <name>flags</name></member>
<member><type>uint64_t</type> <name>duration</name></member>
</type>
<type category="struct" name="VkPipelineCreationFeedbackCreateInfoEXT" structextends="VkGraphicsPipelineCreateInfo,VkComputePipelineCreateInfo,VkRayTracingPipelineCreateInfoNV,VkRayTracingPipelineCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPipelineCreationFeedbackEXT</type>* <name>pPipelineCreationFeedback</name><comment>Output pipeline creation feedback.</comment></member>
<member><type>uint32_t</type> <name>pipelineStageCreationFeedbackCount</name></member>
<member len="pipelineStageCreationFeedbackCount"><type>VkPipelineCreationFeedbackEXT</type>* <name>pPipelineStageCreationFeedbacks</name><comment>One entry for each shader stage specified in the parent Vk*PipelineCreateInfo struct</comment></member>
</type>
<type category="struct" name="VkSurfaceFullScreenExclusiveInfoEXT" structextends="VkPhysicalDeviceSurfaceInfo2KHR,VkSwapchainCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkFullScreenExclusiveEXT</type> <name>fullScreenExclusive</name></member>
</type>
<type category="struct" name="VkSurfaceFullScreenExclusiveWin32InfoEXT" structextends="VkPhysicalDeviceSurfaceInfo2KHR,VkSwapchainCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>HMONITOR</type> <name>hmonitor</name></member>
</type>
<type category="struct" name="VkSurfaceCapabilitiesFullScreenExclusiveEXT" structextends="VkSurfaceCapabilities2KHR">
<member values="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>fullScreenExclusiveSupported</name></member>
</type>
<type category="struct" name="VkPhysicalDevicePerformanceQueryFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>performanceCounterQueryPools</name><comment>performance counters supported in query pools</comment></member>
<member><type>VkBool32</type> <name>performanceCounterMultipleQueryPools</name><comment>performance counters from multiple query pools can be accessed in the same primary command buffer</comment></member>
</type>
<type category="struct" name="VkPhysicalDevicePerformanceQueryPropertiesKHR" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="bitmask" noautovalidity="true"><type>VkBool32</type> <name>allowCommandBufferQueryCopies</name><comment>Flag to specify whether performance queries are allowed to be used in vkCmdCopyQueryPoolResults</comment></member>
</type>
<type category="struct" name="VkPerformanceCounterKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPerformanceCounterUnitKHR</type> <name>unit</name></member>
<member><type>VkPerformanceCounterScopeKHR</type> <name>scope</name></member>
<member><type>VkPerformanceCounterStorageKHR</type> <name>storage</name></member>
<member><type>uint8_t</type> <name>uuid</name>[<enum>VK_UUID_SIZE</enum>]</member>
</type>
<type category="struct" name="VkPerformanceCounterDescriptionKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPerformanceCounterDescriptionFlagsKHR</type> <name>flags</name></member>
<member><type>char</type> <name>name</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>char</type> <name>category</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
</type>
<type category="struct" name="VkQueryPoolPerformanceCreateInfoKHR" structextends="VkQueryPoolCreateInfo">
<member values="VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>queueFamilyIndex</name></member>
<member><type>uint32_t</type> <name>counterIndexCount</name></member>
<member len="counterIndexCount">const <type>uint32_t</type>* <name>pCounterIndices</name></member>
</type>
<type category="union" name="VkPerformanceCounterResultKHR" comment="// Union of all the possible return types a counter result could return">
<member><type>int32_t</type> <name>int32</name></member>
<member><type>int64_t</type> <name>int64</name></member>
<member><type>uint32_t</type> <name>uint32</name></member>
<member><type>uint64_t</type> <name>uint64</name></member>
<member><type>float</type> <name>float32</name></member>
<member><type>double</type> <name>float64</name></member>
</type>
<type category="struct" name="VkAcquireProfilingLockInfoKHR">
<member values="VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkAcquireProfilingLockFlagsKHR</type> <name>flags</name><comment>Acquire profiling lock flags</comment></member>
<member><type>uint64_t</type> <name>timeout</name></member>
</type>
<type category="struct" name="VkPerformanceQuerySubmitInfoKHR" structextends="VkSubmitInfo,VkSubmitInfo2KHR">
<member values="VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>counterPassIndex</name><comment>Index for which counter pass to submit</comment></member>
</type>
<type category="struct" name="VkHeadlessSurfaceCreateInfoEXT">
<member values="VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkHeadlessSurfaceCreateFlagsEXT</type> <name>flags</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceCoverageReductionModeFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>coverageReductionMode</name></member>
</type>
<type category="struct" name="VkPipelineCoverageReductionStateCreateInfoNV" structextends="VkPipelineMultisampleStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCoverageReductionStateCreateFlagsNV</type> <name>flags</name></member>
<member><type>VkCoverageReductionModeNV</type> <name>coverageReductionMode</name></member>
</type>
<type category="struct" name="VkFramebufferMixedSamplesCombinationNV" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkCoverageReductionModeNV</type> <name>coverageReductionMode</name></member>
<member><type>VkSampleCountFlagBits</type> <name>rasterizationSamples</name></member>
<member><type>VkSampleCountFlags</type> <name>depthStencilSamples</name></member>
<member><type>VkSampleCountFlags</type> <name>colorSamples</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderIntegerFunctions2</name></member>
</type>
<type category="union" name="VkPerformanceValueDataINTEL">
<member selection="VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL"><type>uint32_t</type> <name>value32</name></member>
<member selection="VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL"><type>uint64_t</type> <name>value64</name></member>
<member selection="VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL"><type>float</type> <name>valueFloat</name></member>
<member selection="VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL"><type>VkBool32</type> <name>valueBool</name></member>
<member selection="VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL" len="null-terminated">const <type>char</type>* <name>valueString</name></member>
</type>
<type category="struct" name="VkPerformanceValueINTEL">
<member><type>VkPerformanceValueTypeINTEL</type> <name>type</name></member>
<member selector="type" noautovalidity="true"><type>VkPerformanceValueDataINTEL</type> <name>data</name></member>
</type>
<type category="struct" name="VkInitializePerformanceApiInfoINTEL" >
<member values="VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>void</type>* <name>pUserData</name></member>
</type>
<type category="struct" name="VkQueryPoolPerformanceQueryCreateInfoINTEL" structextends="VkQueryPoolCreateInfo">
<member values="VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkQueryPoolSamplingModeINTEL</type> <name>performanceCountersSampling</name></member>
</type>
<type category="struct" name="VkQueryPoolCreateInfoINTEL" alias="VkQueryPoolPerformanceQueryCreateInfoINTEL"/>
<type category="struct" name="VkPerformanceMarkerInfoINTEL">
<member values="VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint64_t</type> <name>marker</name></member>
</type>
<type category="struct" name="VkPerformanceStreamMarkerInfoINTEL">
<member values="VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>marker</name></member>
</type>
<type category="struct" name="VkPerformanceOverrideInfoINTEL">
<member values="VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPerformanceOverrideTypeINTEL</type> <name>type</name></member>
<member><type>VkBool32</type> <name>enable</name></member>
<member><type>uint64_t</type> <name>parameter</name></member>
</type>
<type category="struct" name="VkPerformanceConfigurationAcquireInfoINTEL">
<member values="VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPerformanceConfigurationTypeINTEL</type> <name>type</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderClockFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderSubgroupClock</name></member>
<member><type>VkBool32</type> <name>shaderDeviceClock</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceIndexTypeUint8FeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>indexTypeUint8</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderSMBuiltinsPropertiesNV" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>shaderSMCount</name></member>
<member limittype="max"><type>uint32_t</type> <name>shaderWarpsPerSM</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderSMBuiltinsFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderSMBuiltins</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name><comment>Pointer to next structure</comment></member>
<member><type>VkBool32</type> <name>fragmentShaderSampleInterlock</name></member>
<member><type>VkBool32</type> <name>fragmentShaderPixelInterlock</name></member>
<member><type>VkBool32</type> <name>fragmentShaderShadingRateInterlock</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>separateDepthStencilLayouts</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR" alias="VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures"/>
<type category="struct" name="VkAttachmentReferenceStencilLayout" structextends="VkAttachmentReference2">
<member values="VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkImageLayout</type> <name>stencilLayout</name></member>
</type>
<type category="struct" name="VkAttachmentReferenceStencilLayoutKHR" alias="VkAttachmentReferenceStencilLayout"/>
<type category="struct" name="VkAttachmentDescriptionStencilLayout" structextends="VkAttachmentDescription2">
<member values="VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkImageLayout</type> <name>stencilInitialLayout</name></member>
<member><type>VkImageLayout</type> <name>stencilFinalLayout</name></member>
</type>
<type category="struct" name="VkAttachmentDescriptionStencilLayoutKHR" alias="VkAttachmentDescriptionStencilLayout"/>
<type category="struct" name="VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>pipelineExecutableInfo</name></member>
</type>
<type category="struct" name="VkPipelineInfoKHR">
<member values="VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPipeline</type> <name>pipeline</name></member>
</type>
<type category="struct" name="VkPipelineExecutablePropertiesKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkShaderStageFlags</type> <name>stages</name></member>
<member><type>char</type> <name>name</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>uint32_t</type> <name>subgroupSize</name></member>
</type>
<type category="struct" name="VkPipelineExecutableInfoKHR">
<member values="VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkPipeline</type> <name>pipeline</name></member>
<member><type>uint32_t</type> <name>executableIndex</name></member>
</type>
<type category="union" name="VkPipelineExecutableStatisticValueKHR" returnedonly="true">
<member selection="VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR"><type>VkBool32</type> <name>b32</name></member>
<member selection="VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR"><type>int64_t</type> <name>i64</name></member>
<member selection="VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR"><type>uint64_t</type> <name>u64</name></member>
<member selection="VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR"><type>double</type> <name>f64</name></member>
</type>
<type category="struct" name="VkPipelineExecutableStatisticKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>char</type> <name>name</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>VkPipelineExecutableStatisticFormatKHR</type> <name>format</name></member>
<member selector="format" noautovalidity="true"><type>VkPipelineExecutableStatisticValueKHR</type> <name>value</name></member>
</type>
<type category="struct" name="VkPipelineExecutableInternalRepresentationKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>char</type> <name>name</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>VkBool32</type> <name>isText</name></member>
<member><type>size_t</type> <name>dataSize</name></member>
<member optional="true" len="dataSize"><type>void</type>* <name>pData</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderDemoteToHelperInvocation</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>texelBufferAlignment</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>storageTexelBufferOffsetAlignmentBytes</name></member>
<member limittype="noauto"><type>VkBool32</type> <name>storageTexelBufferOffsetSingleTexelAlignment</name></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>uniformTexelBufferOffsetAlignmentBytes</name></member>
<member limittype="noauto"><type>VkBool32</type> <name>uniformTexelBufferOffsetSingleTexelAlignment</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSubgroupSizeControlFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>subgroupSizeControl</name></member>
<member><type>VkBool32</type> <name>computeFullSubgroups</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSubgroupSizeControlPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="min" noautovalidity="true"><type>uint32_t</type> <name>minSubgroupSize</name><comment>The minimum subgroup size supported by this device</comment></member>
<member limittype="max" noautovalidity="true"><type>uint32_t</type> <name>maxSubgroupSize</name><comment>The maximum subgroup size supported by this device</comment></member>
<member limittype="max" noautovalidity="true"><type>uint32_t</type> <name>maxComputeWorkgroupSubgroups</name><comment>The maximum number of subgroups supported in a workgroup</comment></member>
<member limittype="bitmask"><type>VkShaderStageFlags</type> <name>requiredSubgroupSizeStages</name><comment>The shader stages that support specifying a subgroup size</comment></member>
</type>
<type category="struct" name="VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT" returnedonly="true" structextends="VkPipelineShaderStageCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>requiredSubgroupSize</name></member>
</type>
<type category="struct" name="VkMemoryOpaqueCaptureAddressAllocateInfo" structextends="VkMemoryAllocateInfo">
<member values="VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint64_t</type> <name>opaqueCaptureAddress</name></member>
</type>
<type category="struct" name="VkMemoryOpaqueCaptureAddressAllocateInfoKHR" alias="VkMemoryOpaqueCaptureAddressAllocateInfo"/>
<type category="struct" name="VkDeviceMemoryOpaqueCaptureAddressInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name></member>
</type>
<type category="struct" name="VkDeviceMemoryOpaqueCaptureAddressInfoKHR" alias="VkDeviceMemoryOpaqueCaptureAddressInfo"/>
<type category="struct" name="VkPhysicalDeviceLineRasterizationFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>rectangularLines</name></member>
<member><type>VkBool32</type> <name>bresenhamLines</name></member>
<member><type>VkBool32</type> <name>smoothLines</name></member>
<member><type>VkBool32</type> <name>stippledRectangularLines</name></member>
<member><type>VkBool32</type> <name>stippledBresenhamLines</name></member>
<member><type>VkBool32</type> <name>stippledSmoothLines</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceLineRasterizationPropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>lineSubPixelPrecisionBits</name></member>
</type>
<type category="struct" name="VkPipelineRasterizationLineStateCreateInfoEXT" structextends="VkPipelineRasterizationStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkLineRasterizationModeEXT</type> <name>lineRasterizationMode</name></member>
<member><type>VkBool32</type> <name>stippledLineEnable</name></member>
<member><type>uint32_t</type> <name>lineStippleFactor</name></member>
<member><type>uint16_t</type> <name>lineStipplePattern</name></member>
</type>
<type category="struct" name="VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>pipelineCreationCacheControl</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVulkan11Features" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>storageBuffer16BitAccess</name><comment>16-bit integer/floating-point variables supported in BufferBlock</comment></member>
<member><type>VkBool32</type> <name>uniformAndStorageBuffer16BitAccess</name><comment>16-bit integer/floating-point variables supported in BufferBlock and Block</comment></member>
<member><type>VkBool32</type> <name>storagePushConstant16</name><comment>16-bit integer/floating-point variables supported in PushConstant</comment></member>
<member><type>VkBool32</type> <name>storageInputOutput16</name><comment>16-bit integer/floating-point variables supported in shader inputs and outputs</comment></member>
<member><type>VkBool32</type> <name>multiview</name><comment>Multiple views in a renderpass</comment></member>
<member><type>VkBool32</type> <name>multiviewGeometryShader</name><comment>Multiple views in a renderpass w/ geometry shader</comment></member>
<member><type>VkBool32</type> <name>multiviewTessellationShader</name><comment>Multiple views in a renderpass w/ tessellation shader</comment></member>
<member><type>VkBool32</type> <name>variablePointersStorageBuffer</name></member>
<member><type>VkBool32</type> <name>variablePointers</name></member>
<member><type>VkBool32</type> <name>protectedMemory</name></member>
<member><type>VkBool32</type> <name>samplerYcbcrConversion</name><comment>Sampler color conversion supported</comment></member>
<member><type>VkBool32</type> <name>shaderDrawParameters</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVulkan11Properties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>uint8_t</type> <name>deviceUUID</name>[<enum>VK_UUID_SIZE</enum>]</member>
<member limittype="noauto"><type>uint8_t</type> <name>driverUUID</name>[<enum>VK_UUID_SIZE</enum>]</member>
<member limittype="noauto"><type>uint8_t</type> <name>deviceLUID</name>[<enum>VK_LUID_SIZE</enum>]</member>
<member limittype="noauto"><type>uint32_t</type> <name>deviceNodeMask</name></member>
<member limittype="noauto"><type>VkBool32</type> <name>deviceLUIDValid</name></member>
<member limittype="noauto" noautovalidity="true"><type>uint32_t</type> <name>subgroupSize</name><comment>The size of a subgroup for this queue.</comment></member>
<member limittype="bitmask" noautovalidity="true"><type>VkShaderStageFlags</type> <name>subgroupSupportedStages</name><comment>Bitfield of what shader stages support subgroup operations</comment></member>
<member limittype="bitmask" noautovalidity="true"><type>VkSubgroupFeatureFlags</type> <name>subgroupSupportedOperations</name><comment>Bitfield of what subgroup operations are supported.</comment></member>
<member limittype="bitmask" noautovalidity="true"><type>VkBool32</type> <name>subgroupQuadOperationsInAllStages</name><comment>Flag to specify whether quad operations are available in all stages.</comment></member>
<member limittype="noauto"><type>VkPointClippingBehavior</type> <name>pointClippingBehavior</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxMultiviewViewCount</name><comment>max number of views in a subpass</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxMultiviewInstanceIndex</name><comment>max instance index for a draw in a multiview subpass</comment></member>
<member limittype="noauto"><type>VkBool32</type> <name>protectedNoFault</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerSetDescriptors</name></member>
<member limittype="max"><type>VkDeviceSize</type> <name>maxMemoryAllocationSize</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVulkan12Features" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>samplerMirrorClampToEdge</name></member>
<member><type>VkBool32</type> <name>drawIndirectCount</name></member>
<member><type>VkBool32</type> <name>storageBuffer8BitAccess</name><comment>8-bit integer variables supported in StorageBuffer</comment></member>
<member><type>VkBool32</type> <name>uniformAndStorageBuffer8BitAccess</name><comment>8-bit integer variables supported in StorageBuffer and Uniform</comment></member>
<member><type>VkBool32</type> <name>storagePushConstant8</name><comment>8-bit integer variables supported in PushConstant</comment></member>
<member><type>VkBool32</type> <name>shaderBufferInt64Atomics</name></member>
<member><type>VkBool32</type> <name>shaderSharedInt64Atomics</name></member>
<member><type>VkBool32</type> <name>shaderFloat16</name><comment>16-bit floats (halfs) in shaders</comment></member>
<member><type>VkBool32</type> <name>shaderInt8</name><comment>8-bit integers in shaders</comment></member>
<member><type>VkBool32</type> <name>descriptorIndexing</name></member>
<member><type>VkBool32</type> <name>shaderInputAttachmentArrayDynamicIndexing</name></member>
<member><type>VkBool32</type> <name>shaderUniformTexelBufferArrayDynamicIndexing</name></member>
<member><type>VkBool32</type> <name>shaderStorageTexelBufferArrayDynamicIndexing</name></member>
<member><type>VkBool32</type> <name>shaderUniformBufferArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderSampledImageArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderStorageBufferArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderStorageImageArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderInputAttachmentArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderUniformTexelBufferArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>shaderStorageTexelBufferArrayNonUniformIndexing</name></member>
<member><type>VkBool32</type> <name>descriptorBindingUniformBufferUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingSampledImageUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingStorageImageUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingStorageBufferUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingUniformTexelBufferUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingStorageTexelBufferUpdateAfterBind</name></member>
<member><type>VkBool32</type> <name>descriptorBindingUpdateUnusedWhilePending</name></member>
<member><type>VkBool32</type> <name>descriptorBindingPartiallyBound</name></member>
<member><type>VkBool32</type> <name>descriptorBindingVariableDescriptorCount</name></member>
<member><type>VkBool32</type> <name>runtimeDescriptorArray</name></member>
<member><type>VkBool32</type> <name>samplerFilterMinmax</name></member>
<member><type>VkBool32</type> <name>scalarBlockLayout</name></member>
<member><type>VkBool32</type> <name>imagelessFramebuffer</name></member>
<member><type>VkBool32</type> <name>uniformBufferStandardLayout</name></member>
<member><type>VkBool32</type> <name>shaderSubgroupExtendedTypes</name></member>
<member><type>VkBool32</type> <name>separateDepthStencilLayouts</name></member>
<member><type>VkBool32</type> <name>hostQueryReset</name></member>
<member><type>VkBool32</type> <name>timelineSemaphore</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddress</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddressCaptureReplay</name></member>
<member><type>VkBool32</type> <name>bufferDeviceAddressMultiDevice</name></member>
<member><type>VkBool32</type> <name>vulkanMemoryModel</name></member>
<member><type>VkBool32</type> <name>vulkanMemoryModelDeviceScope</name></member>
<member><type>VkBool32</type> <name>vulkanMemoryModelAvailabilityVisibilityChains</name></member>
<member><type>VkBool32</type> <name>shaderOutputViewportIndex</name></member>
<member><type>VkBool32</type> <name>shaderOutputLayer</name></member>
<member><type>VkBool32</type> <name>subgroupBroadcastDynamicId</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVulkan12Properties" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkDriverId</type> <name>driverID</name></member>
<member limittype="noauto"><type>char</type> <name>driverName</name>[<enum>VK_MAX_DRIVER_NAME_SIZE</enum>]</member>
<member limittype="noauto"><type>char</type> <name>driverInfo</name>[<enum>VK_MAX_DRIVER_INFO_SIZE</enum>]</member>
<member limittype="noauto"><type>VkConformanceVersion</type> <name>conformanceVersion</name></member>
<member limittype="noauto"><type>VkShaderFloatControlsIndependence</type><name>denormBehaviorIndependence</name></member>
<member limittype="noauto"><type>VkShaderFloatControlsIndependence</type><name>roundingModeIndependence</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderSignedZeroInfNanPreserveFloat16</name><comment>An implementation can preserve signed zero, nan, inf</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderSignedZeroInfNanPreserveFloat32</name><comment>An implementation can preserve signed zero, nan, inf</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderSignedZeroInfNanPreserveFloat64</name><comment>An implementation can preserve signed zero, nan, inf</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormPreserveFloat16</name><comment>An implementation can preserve denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormPreserveFloat32</name><comment>An implementation can preserve denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormPreserveFloat64</name><comment>An implementation can preserve denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormFlushToZeroFloat16</name><comment>An implementation can flush to zero denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormFlushToZeroFloat32</name><comment>An implementation can flush to zero denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderDenormFlushToZeroFloat64</name><comment>An implementation can flush to zero denormals</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTEFloat16</name><comment>An implementation can support RTE</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTEFloat32</name><comment>An implementation can support RTE</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTEFloat64</name><comment>An implementation can support RTE</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTZFloat16</name><comment>An implementation can support RTZ</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTZFloat32</name><comment>An implementation can support RTZ</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderRoundingModeRTZFloat64</name><comment>An implementation can support RTZ</comment></member>
<member limittype="max"><type>uint32_t</type> <name>maxUpdateAfterBindDescriptorsInAllPools</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderUniformBufferArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderSampledImageArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderStorageBufferArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderStorageImageArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>shaderInputAttachmentArrayNonUniformIndexingNative</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>robustBufferAccessUpdateAfterBind</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>quadDivergentImplicitLod</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindSamplers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindUniformBuffers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindStorageBuffers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindSampledImages</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindStorageImages</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageDescriptorUpdateAfterBindInputAttachments</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxPerStageUpdateAfterBindResources</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindSamplers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindUniformBuffers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindUniformBuffersDynamic</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindStorageBuffers</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindStorageBuffersDynamic</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindSampledImages</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindStorageImages</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxDescriptorSetUpdateAfterBindInputAttachments</name></member>
<member limittype="bitmask"><type>VkResolveModeFlags</type> <name>supportedDepthResolveModes</name><comment>supported depth resolve modes</comment></member>
<member limittype="bitmask"><type>VkResolveModeFlags</type> <name>supportedStencilResolveModes</name><comment>supported stencil resolve modes</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>independentResolveNone</name><comment>depth and stencil resolve modes can be set independently if one of them is none</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>independentResolve</name><comment>depth and stencil resolve modes can be set independently</comment></member>
<member limittype="bitmask"><type>VkBool32</type> <name>filterMinmaxSingleComponentFormats</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>filterMinmaxImageComponentMapping</name></member>
<member limittype="max"><type>uint64_t</type> <name>maxTimelineSemaphoreValueDifference</name></member>
<member limittype="bitmask" optional="true"><type>VkSampleCountFlags</type> <name>framebufferIntegerColorSampleCounts</name></member>
</type>
<type category="struct" name="VkPipelineCompilerControlCreateInfoAMD" structextends="VkGraphicsPipelineCreateInfo,VkComputePipelineCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineCompilerControlFlagsAMD</type> <name>compilerControlFlags</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceCoherentMemoryFeaturesAMD" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>deviceCoherentMemory</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceToolPropertiesEXT" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>char</type> <name>name</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member>
<member><type>char</type> <name>version</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member>
<member><type>VkToolPurposeFlagsEXT</type> <name>purposes</name></member>
<member><type>char</type> <name>description</name>[<enum>VK_MAX_DESCRIPTION_SIZE</enum>]</member>
<member><type>char</type> <name>layer</name>[<enum>VK_MAX_EXTENSION_NAME_SIZE</enum>]</member>
</type>
<type category="struct" name="VkSamplerCustomBorderColorCreateInfoEXT" structextends="VkSamplerCreateInfo">
<member values="VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkClearColorValue</type> <name>customBorderColor</name></member>
<member><type>VkFormat</type> <name>format</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceCustomBorderColorPropertiesEXT" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="max"><type>uint32_t</type> <name>maxCustomBorderColorSamplers</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceCustomBorderColorFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>customBorderColors</name></member>
<member><type>VkBool32</type> <name>customBorderColorWithoutFormat</name></member>
</type>
<type category="union" name="VkDeviceOrHostAddressKHR">
<member noautovalidity="true"><type>VkDeviceAddress</type> <name>deviceAddress</name></member>
<member noautovalidity="true"><type>void</type>* <name>hostAddress</name></member>
</type>
<type category="union" name="VkDeviceOrHostAddressConstKHR">
<member noautovalidity="true"><type>VkDeviceAddress</type> <name>deviceAddress</name></member>
<member noautovalidity="true">const <type>void</type>* <name>hostAddress</name></member>
</type>
<type category="struct" name="VkAccelerationStructureGeometryTrianglesDataKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkFormat</type> <name>vertexFormat</name></member>
<member noautovalidity="true"><type>VkDeviceOrHostAddressConstKHR</type> <name>vertexData</name></member>
<member><type>VkDeviceSize</type> <name>vertexStride</name></member>
<member><type>uint32_t</type> <name>maxVertex</name></member>
<member><type>VkIndexType</type> <name>indexType</name></member>
<member noautovalidity="true"><type>VkDeviceOrHostAddressConstKHR</type> <name>indexData</name></member>
<member noautovalidity="true"><type>VkDeviceOrHostAddressConstKHR</type> <name>transformData</name></member>
</type>
<type category="struct" name="VkAccelerationStructureGeometryAabbsDataKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkDeviceOrHostAddressConstKHR</type> <name>data</name></member>
<member><type>VkDeviceSize</type> <name>stride</name></member>
</type>
<type category="struct" name="VkAccelerationStructureGeometryInstancesDataKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>arrayOfPointers</name></member>
<member noautovalidity="true"><type>VkDeviceOrHostAddressConstKHR</type> <name>data</name></member>
</type>
<type category="union" name="VkAccelerationStructureGeometryDataKHR">
<member selection="VK_GEOMETRY_TYPE_TRIANGLES_KHR"><type>VkAccelerationStructureGeometryTrianglesDataKHR</type> <name>triangles</name></member>
<member selection="VK_GEOMETRY_TYPE_AABBS_KHR"><type>VkAccelerationStructureGeometryAabbsDataKHR</type> <name>aabbs</name></member>
<member selection="VK_GEOMETRY_TYPE_INSTANCES_KHR"><type>VkAccelerationStructureGeometryInstancesDataKHR</type> <name>instances</name></member>
</type>
<type category="struct" name="VkAccelerationStructureGeometryKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkGeometryTypeKHR</type> <name>geometryType</name></member>
<member selector="geometryType"><type>VkAccelerationStructureGeometryDataKHR</type> <name>geometry</name></member>
<member optional="true"><type>VkGeometryFlagsKHR</type> <name>flags</name></member>
</type>
<type category="struct" name="VkAccelerationStructureBuildGeometryInfoKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkAccelerationStructureTypeKHR</type> <name>type</name></member>
<member optional="true"><type>VkBuildAccelerationStructureFlagsKHR</type> <name>flags</name></member>
<member noautovalidity="true"><type>VkBuildAccelerationStructureModeKHR</type> <name>mode</name></member>
<member optional="true" noautovalidity="true"><type>VkAccelerationStructureKHR</type> <name>srcAccelerationStructure</name></member>
<member optional="true" noautovalidity="true"><type>VkAccelerationStructureKHR</type> <name>dstAccelerationStructure</name></member>
<member optional="true"><type>uint32_t</type> <name>geometryCount</name></member>
<member len="geometryCount" optional="true">const <type>VkAccelerationStructureGeometryKHR</type>* <name>pGeometries</name></member>
<member len="geometryCount,1" optional="true,false">const <type>VkAccelerationStructureGeometryKHR</type>* const* <name>ppGeometries</name></member>
<member noautovalidity="true"><type>VkDeviceOrHostAddressKHR</type> <name>scratchData</name></member>
</type>
<type category="struct" name="VkAccelerationStructureBuildRangeInfoKHR">
<member><type>uint32_t</type> <name>primitiveCount</name></member>
<member><type>uint32_t</type> <name>primitiveOffset</name></member>
<member><type>uint32_t</type> <name>firstVertex</name></member>
<member><type>uint32_t</type> <name>transformOffset</name></member>
</type>
<type category="struct" name="VkAccelerationStructureCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkAccelerationStructureCreateFlagsKHR</type> <name>createFlags</name></member>
<member><type>VkBuffer</type> <name>buffer</name></member>
<member><type>VkDeviceSize</type> <name>offset</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>size</name></member>
<member><type>VkAccelerationStructureTypeKHR</type> <name>type</name></member>
<member optional="true"><type>VkDeviceAddress</type> <name>deviceAddress</name></member>
</type>
<type category="struct" name="VkAabbPositionsKHR">
<member><type>float</type> <name>minX</name></member>
<member><type>float</type> <name>minY</name></member>
<member><type>float</type> <name>minZ</name></member>
<member><type>float</type> <name>maxX</name></member>
<member><type>float</type> <name>maxY</name></member>
<member><type>float</type> <name>maxZ</name></member>
</type>
<type category="struct" name="VkAabbPositionsNV" alias="VkAabbPositionsKHR"/>
<type category="struct" name="VkTransformMatrixKHR">
<member><type>float</type> <name>matrix</name>[3][4]</member>
</type>
<type category="struct" name="VkTransformMatrixNV" alias="VkTransformMatrixKHR"/>
<type category="struct" name="VkAccelerationStructureInstanceKHR">
<comment>The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout.</comment>
<member><type>VkTransformMatrixKHR</type> <name>transform</name></member>
<member><type>uint32_t</type> <name>instanceCustomIndex</name>:24</member>
<member><type>uint32_t</type> <name>mask</name>:8</member>
<member><type>uint32_t</type> <name>instanceShaderBindingTableRecordOffset</name>:24</member>
<member optional="true"><type>VkGeometryInstanceFlagsKHR</type> <name>flags</name>:8</member>
<member><type>uint64_t</type> <name>accelerationStructureReference</name></member>
</type>
<type category="struct" name="VkAccelerationStructureInstanceNV" alias="VkAccelerationStructureInstanceKHR"/>
<type category="struct" name="VkAccelerationStructureDeviceAddressInfoKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkAccelerationStructureKHR</type> <name>accelerationStructure</name></member>
</type>
<type category="struct" name="VkAccelerationStructureVersionInfoKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member len="2*ename:VK_UUID_SIZE" altlen="2*VK_UUID_SIZE">const <type>uint8_t</type>* <name>pVersionData</name></member>
</type>
<type category="struct" name="VkCopyAccelerationStructureInfoKHR">
<member values="VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkAccelerationStructureKHR</type> <name>src</name></member>
<member><type>VkAccelerationStructureKHR</type> <name>dst</name></member>
<member><type>VkCopyAccelerationStructureModeKHR</type> <name>mode</name></member>
</type>
<type category="struct" name="VkCopyAccelerationStructureToMemoryInfoKHR">
<member values="VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkAccelerationStructureKHR</type> <name>src</name></member>
<member noautovalidity="true"><type>VkDeviceOrHostAddressKHR</type> <name>dst</name></member>
<member><type>VkCopyAccelerationStructureModeKHR</type> <name>mode</name></member>
</type>
<type category="struct" name="VkCopyMemoryToAccelerationStructureInfoKHR">
<member values="VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkDeviceOrHostAddressConstKHR</type> <name>src</name></member>
<member><type>VkAccelerationStructureKHR</type> <name>dst</name></member>
<member><type>VkCopyAccelerationStructureModeKHR</type> <name>mode</name></member>
</type>
<type category="struct" name="VkRayTracingPipelineInterfaceCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>maxPipelineRayPayloadSize</name></member>
<member><type>uint32_t</type> <name>maxPipelineRayHitAttributeSize</name></member>
</type>
<type category="struct" name="VkPipelineLibraryCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>libraryCount</name></member>
<member len="libraryCount">const <type>VkPipeline</type>* <name>pLibraries</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExtendedDynamicStateFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>extendedDynamicState</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceExtendedDynamicState2FeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>extendedDynamicState2</name></member>
<member><type>VkBool32</type> <name>extendedDynamicState2LogicOp</name></member>
<member><type>VkBool32</type> <name>extendedDynamicState2PatchControlPoints</name></member>
</type>
<type category="struct" name="VkRenderPassTransformBeginInfoQCOM" structextends="VkRenderPassBeginInfo">
<member values="VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name><comment>Pointer to next structure</comment></member>
<member noautovalidity="true"><type>VkSurfaceTransformFlagBitsKHR</type> <name>transform</name></member>
</type>
<type category="struct" name="VkCopyCommandTransformInfoQCOM" structextends="VkBufferImageCopy2KHR,VkImageBlit2KHR">
<member values="VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true" noautovalidity="true">const <type>void</type>* <name>pNext</name></member>
<member noautovalidity="true"><type>VkSurfaceTransformFlagBitsKHR</type> <name>transform</name></member>
</type>
<type category="struct" name="VkCommandBufferInheritanceRenderPassTransformInfoQCOM" structextends="VkCommandBufferInheritanceInfo">
<member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name><comment>Pointer to next structure</comment></member>
<member noautovalidity="true"><type>VkSurfaceTransformFlagBitsKHR</type> <name>transform</name></member>
<member><type>VkRect2D</type> <name>renderArea</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceDiagnosticsConfigFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV"><type>VkStructureType</type><name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>diagnosticsConfig</name></member>
</type>
<type category="struct" name="VkDeviceDiagnosticsConfigCreateInfoNV" structextends="VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDeviceDiagnosticsConfigFlagsNV</type> <name>flags</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderZeroInitializeWorkgroupMemory</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceRobustness2FeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>robustBufferAccess2</name></member>
<member><type>VkBool32</type> <name>robustImageAccess2</name></member>
<member><type>VkBool32</type> <name>nullDescriptor</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceRobustness2PropertiesEXT" returnedonly="true" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>robustStorageBufferAccessSizeAlignment</name></member>
<member limittype="noauto"><type>VkDeviceSize</type> <name>robustUniformBufferAccessSizeAlignment</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceImageRobustnessFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>robustImageAccess</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>workgroupMemoryExplicitLayout</name></member>
<member><type>VkBool32</type> <name>workgroupMemoryExplicitLayoutScalarBlockLayout</name></member>
<member><type>VkBool32</type> <name>workgroupMemoryExplicitLayout8BitAccess</name></member>
<member><type>VkBool32</type> <name>workgroupMemoryExplicitLayout16BitAccess</name></member>
</type>
<type category="struct" name="VkPhysicalDevicePortabilitySubsetFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>constantAlphaColorBlendFactors</name></member>
<member><type>VkBool32</type> <name>events</name></member>
<member><type>VkBool32</type> <name>imageViewFormatReinterpretation</name></member>
<member><type>VkBool32</type> <name>imageViewFormatSwizzle</name></member>
<member><type>VkBool32</type> <name>imageView2DOn3DImage</name></member>
<member><type>VkBool32</type> <name>multisampleArrayImage</name></member>
<member><type>VkBool32</type> <name>mutableComparisonSamplers</name></member>
<member><type>VkBool32</type> <name>pointPolygons</name></member>
<member><type>VkBool32</type> <name>samplerMipLodBias</name></member>
<member><type>VkBool32</type> <name>separateStencilMaskRef</name></member>
<member><type>VkBool32</type> <name>shaderSampleRateInterpolationFunctions</name></member>
<member><type>VkBool32</type> <name>tessellationIsolines</name></member>
<member><type>VkBool32</type> <name>tessellationPointMode</name></member>
<member><type>VkBool32</type> <name>triangleFans</name></member>
<member><type>VkBool32</type> <name>vertexAttributeAccessBeyondStride</name></member>
</type>
<type category="struct" name="VkPhysicalDevicePortabilitySubsetPropertiesKHR" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>minVertexInputBindingStrideAlignment</name></member>
</type>
<type category="struct" name="VkPhysicalDevice4444FormatsFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>formatA4R4G4B4</name></member>
<member><type>VkBool32</type> <name>formatA4B4G4R4</name></member>
</type>
<type category="struct" name="VkBufferCopy2KHR">
<member values="VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceSize</type> <name>srcOffset</name><comment>Specified in bytes</comment></member>
<member><type>VkDeviceSize</type> <name>dstOffset</name><comment>Specified in bytes</comment></member>
<member noautovalidity="true"><type>VkDeviceSize</type> <name>size</name><comment>Specified in bytes</comment></member>
</type>
<type category="struct" name="VkImageCopy2KHR">
<member values="VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
<member><type>VkOffset3D</type> <name>srcOffset</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
<member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
<member><type>VkOffset3D</type> <name>dstOffset</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
<member><type>VkExtent3D</type> <name>extent</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
</type>
<type category="struct" name="VkImageBlit2KHR">
<member values="VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
<member><type>VkOffset3D</type> <name>srcOffsets</name>[2]<comment>Specified in pixels for both compressed and uncompressed images</comment></member>
<member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
<member><type>VkOffset3D</type> <name>dstOffsets</name>[2]<comment>Specified in pixels for both compressed and uncompressed images</comment></member>
</type>
<type category="struct" name="VkBufferImageCopy2KHR">
<member values="VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceSize</type> <name>bufferOffset</name><comment>Specified in bytes</comment></member>
<member><type>uint32_t</type> <name>bufferRowLength</name><comment>Specified in texels</comment></member>
<member><type>uint32_t</type> <name>bufferImageHeight</name></member>
<member><type>VkImageSubresourceLayers</type> <name>imageSubresource</name></member>
<member><type>VkOffset3D</type> <name>imageOffset</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
<member><type>VkExtent3D</type> <name>imageExtent</name><comment>Specified in pixels for both compressed and uncompressed images</comment></member>
</type>
<type category="struct" name="VkImageResolve2KHR">
<member values="VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageSubresourceLayers</type> <name>srcSubresource</name></member>
<member><type>VkOffset3D</type> <name>srcOffset</name></member>
<member><type>VkImageSubresourceLayers</type> <name>dstSubresource</name></member>
<member><type>VkOffset3D</type> <name>dstOffset</name></member>
<member><type>VkExtent3D</type> <name>extent</name></member>
</type>
<type category="struct" name="VkCopyBufferInfo2KHR">
<member values="VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBuffer</type> <name>srcBuffer</name></member>
<member><type>VkBuffer</type> <name>dstBuffer</name></member>
<member><type>uint32_t</type> <name>regionCount</name></member>
<member len="regionCount">const <type>VkBufferCopy2KHR</type>* <name>pRegions</name></member>
</type>
<type category="struct" name="VkCopyImageInfo2KHR">
<member values="VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImage</type> <name>srcImage</name></member>
<member><type>VkImageLayout</type> <name>srcImageLayout</name></member>
<member><type>VkImage</type> <name>dstImage</name></member>
<member><type>VkImageLayout</type> <name>dstImageLayout</name></member>
<member><type>uint32_t</type> <name>regionCount</name></member>
<member len="regionCount">const <type>VkImageCopy2KHR</type>* <name>pRegions</name></member>
</type>
<type category="struct" name="VkBlitImageInfo2KHR">
<member values="VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImage</type> <name>srcImage</name></member>
<member><type>VkImageLayout</type> <name>srcImageLayout</name></member>
<member><type>VkImage</type> <name>dstImage</name></member>
<member><type>VkImageLayout</type> <name>dstImageLayout</name></member>
<member><type>uint32_t</type> <name>regionCount</name></member>
<member len="regionCount">const <type>VkImageBlit2KHR</type>* <name>pRegions</name></member>
<member><type>VkFilter</type> <name>filter</name></member>
</type>
<type category="struct" name="VkCopyBufferToImageInfo2KHR">
<member values="VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkBuffer</type> <name>srcBuffer</name></member>
<member><type>VkImage</type> <name>dstImage</name></member>
<member><type>VkImageLayout</type> <name>dstImageLayout</name></member>
<member><type>uint32_t</type> <name>regionCount</name></member>
<member len="regionCount">const <type>VkBufferImageCopy2KHR</type>* <name>pRegions</name></member>
</type>
<type category="struct" name="VkCopyImageToBufferInfo2KHR">
<member values="VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImage</type> <name>srcImage</name></member>
<member><type>VkImageLayout</type> <name>srcImageLayout</name></member>
<member><type>VkBuffer</type> <name>dstBuffer</name></member>
<member><type>uint32_t</type> <name>regionCount</name></member>
<member len="regionCount">const <type>VkBufferImageCopy2KHR</type>* <name>pRegions</name></member>
</type>
<type category="struct" name="VkResolveImageInfo2KHR">
<member values="VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkImage</type> <name>srcImage</name></member>
<member><type>VkImageLayout</type> <name>srcImageLayout</name></member>
<member><type>VkImage</type> <name>dstImage</name></member>
<member><type>VkImageLayout</type> <name>dstImageLayout</name></member>
<member><type>uint32_t</type> <name>regionCount</name></member>
<member len="regionCount">const <type>VkImageResolve2KHR</type>* <name>pRegions</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderImageInt64Atomics</name></member>
<member><type>VkBool32</type> <name>sparseImageInt64Atomics</name></member>
</type>
<type category="struct" name="VkFragmentShadingRateAttachmentInfoKHR" structextends="VkSubpassDescription2">
<member values="VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member>const <type>VkAttachmentReference2</type>* <name>pFragmentShadingRateAttachment</name></member>
<member><type>VkExtent2D</type> <name>shadingRateAttachmentTexelSize</name></member>
</type>
<type category="struct" name="VkPipelineFragmentShadingRateStateCreateInfoKHR" structextends="VkGraphicsPipelineCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkExtent2D</type> <name>fragmentSize</name></member>
<member><type>VkFragmentShadingRateCombinerOpKHR</type> <name>combinerOps</name>[2]</member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentShadingRateFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>pipelineFragmentShadingRate</name></member>
<member><type>VkBool32</type> <name>primitiveFragmentShadingRate</name></member>
<member><type>VkBool32</type> <name>attachmentFragmentShadingRate</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentShadingRatePropertiesKHR" structextends="VkPhysicalDeviceProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="min"><type>VkExtent2D</type> <name>minFragmentShadingRateAttachmentTexelSize</name></member>
<member limittype="max"><type>VkExtent2D</type> <name>maxFragmentShadingRateAttachmentTexelSize</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>maxFragmentShadingRateAttachmentTexelSizeAspectRatio</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>primitiveFragmentShadingRateWithMultipleViewports</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>layeredShadingRateAttachments</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentShadingRateNonTrivialCombinerOps</name></member>
<member limittype="max"><type>VkExtent2D</type> <name>maxFragmentSize</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>maxFragmentSizeAspectRatio</name></member>
<member limittype="noauto"><type>uint32_t</type> <name>maxFragmentShadingRateCoverageSamples</name></member>
<member limittype="max"><type>VkSampleCountFlagBits</type> <name>maxFragmentShadingRateRasterizationSamples</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentShadingRateWithShaderDepthStencilWrites</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentShadingRateWithSampleMask</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentShadingRateWithShaderSampleMask</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentShadingRateWithConservativeRasterization</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentShadingRateWithFragmentShaderInterlock</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentShadingRateWithCustomSampleLocations</name></member>
<member limittype="bitmask"><type>VkBool32</type> <name>fragmentShadingRateStrictMultiplyCombiner</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentShadingRateKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkSampleCountFlags</type> <name>sampleCounts</name></member>
<member><type>VkExtent2D</type> <name>fragmentSize</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR"><type>VkStructureType</type><name>sType</name></member>
<member optional="true" noautovalidity="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>shaderTerminateInvocation</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>fragmentShadingRateEnums</name></member>
<member><type>VkBool32</type> <name>supersampleFragmentShadingRates</name></member>
<member><type>VkBool32</type> <name>noInvocationFragmentShadingRates</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV" structextends="VkPhysicalDeviceProperties2">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member limittype="bitmask"><type>VkSampleCountFlagBits</type> <name>maxFragmentShadingRateInvocationCount</name></member>
</type>
<type category="struct" name="VkPipelineFragmentShadingRateEnumStateCreateInfoNV" structextends="VkGraphicsPipelineCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkFragmentShadingRateTypeNV</type> <name>shadingRateType</name></member>
<member><type>VkFragmentShadingRateNV</type> <name>shadingRate</name></member>
<member><type>VkFragmentShadingRateCombinerOpKHR</type> <name>combinerOps</name>[2]</member>
</type>
<type category="struct" name="VkAccelerationStructureBuildSizesInfoKHR">
<member values="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member><type>VkDeviceSize</type> <name>accelerationStructureSize</name></member>
<member><type>VkDeviceSize</type> <name>updateScratchSize</name></member>
<member><type>VkDeviceSize</type> <name>buildScratchSize</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE"><type>VkStructureType</type> <name>sType</name></member>
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>mutableDescriptorType</name></member>
</type>
<type category="struct" name="VkMutableDescriptorTypeListVALVE">
<member optional="true"><type>uint32_t</type> <name>descriptorTypeCount</name></member>
<member len="descriptorTypeCount">const <type>VkDescriptorType</type>* <name>pDescriptorTypes</name></member>
</type>
<type category="struct" name="VkMutableDescriptorTypeCreateInfoVALVE" structextends="VkDescriptorSetLayoutCreateInfo,VkDescriptorPoolCreateInfo">
<member values="VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>mutableDescriptorTypeListCount</name></member>
<member len="mutableDescriptorTypeListCount">const <type>VkMutableDescriptorTypeListVALVE</type>* <name>pMutableDescriptorTypeLists</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>vertexInputDynamicState</name></member>
</type>
<type category="struct" name="VkVertexInputBindingDescription2EXT">
<member values="VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT"><type>VkStructureType</type><name>sType</name></member>
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>binding</name></member>
<member><type>uint32_t</type> <name>stride</name></member>
<member><type>VkVertexInputRate</type> <name>inputRate</name></member>
<member><type>uint32_t</type> <name>divisor</name></member>
</type>
<type category="struct" name="VkVertexInputAttributeDescription2EXT">
<member values="VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT"><type>VkStructureType</type><name>sType</name></member>
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>location</name><comment>location of the shader vertex attrib</comment></member>
<member><type>uint32_t</type> <name>binding</name><comment>Vertex buffer binding id</comment></member>
<member><type>VkFormat</type> <name>format</name><comment>format of source data</comment></member>
<member><type>uint32_t</type> <name>offset</name><comment>Offset of first element in bytes from base of vertex</comment></member>
</type>
<type category="struct" name="VkPhysicalDeviceColorWriteEnableFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>colorWriteEnable</name></member>
</type>
<type category="struct" name="VkPipelineColorWriteCreateInfoEXT" structextends="VkPipelineColorBlendStateCreateInfo">
<member values="VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>uint32_t</type> <name>attachmentCount</name><comment># of pAttachments</comment></member>
<member len="attachmentCount">const <type>VkBool32</type>* <name>pColorWriteEnables</name></member>
</type>
<type category="struct" name="VkMemoryBarrier2KHR" structextends="VkSubpassDependency2">
<member values="VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineStageFlags2KHR</type> <name>srcStageMask</name></member>
<member optional="true"><type>VkAccessFlags2KHR</type> <name>srcAccessMask</name></member>
<member optional="true"><type>VkPipelineStageFlags2KHR</type> <name>dstStageMask</name></member>
<member optional="true"><type>VkAccessFlags2KHR</type> <name>dstAccessMask</name></member>
</type>
<type category="struct" name="VkImageMemoryBarrier2KHR">
<member values="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineStageFlags2KHR</type> <name>srcStageMask</name></member>
<member optional="true"><type>VkAccessFlags2KHR</type> <name>srcAccessMask</name></member>
<member optional="true"><type>VkPipelineStageFlags2KHR</type> <name>dstStageMask</name></member>
<member optional="true"><type>VkAccessFlags2KHR</type> <name>dstAccessMask</name></member>
<member><type>VkImageLayout</type> <name>oldLayout</name></member>
<member><type>VkImageLayout</type> <name>newLayout</name></member>
<member><type>uint32_t</type> <name>srcQueueFamilyIndex</name></member>
<member><type>uint32_t</type> <name>dstQueueFamilyIndex</name></member>
<member><type>VkImage</type> <name>image</name></member>
<member><type>VkImageSubresourceRange</type> <name>subresourceRange</name></member>
</type>
<type category="struct" name="VkBufferMemoryBarrier2KHR">
<member values="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkPipelineStageFlags2KHR</type> <name>srcStageMask</name></member>
<member optional="true"><type>VkAccessFlags2KHR</type> <name>srcAccessMask</name></member>
<member optional="true"><type>VkPipelineStageFlags2KHR</type> <name>dstStageMask</name></member>
<member optional="true"><type>VkAccessFlags2KHR</type> <name>dstAccessMask</name></member>
<member><type>uint32_t</type> <name>srcQueueFamilyIndex</name></member>
<member><type>uint32_t</type> <name>dstQueueFamilyIndex</name></member>
<member><type>VkBuffer</type> <name>buffer</name></member>
<member><type>VkDeviceSize</type> <name>offset</name></member>
<member><type>VkDeviceSize</type> <name>size</name></member>
</type>
<type category="struct" name="VkDependencyInfoKHR">
<member values="VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></member>
<member optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></member>
<member len="memoryBarrierCount">const <type>VkMemoryBarrier2KHR</type>* <name>pMemoryBarriers</name></member>
<member optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></member>
<member len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier2KHR</type>* <name>pBufferMemoryBarriers</name></member>
<member optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></member>
<member len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier2KHR</type>* <name>pImageMemoryBarriers</name></member>
</type>
<type category="struct" name="VkSemaphoreSubmitInfoKHR">
<member values="VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkSemaphore</type> <name>semaphore</name></member>
<member><type>uint64_t</type> <name>value</name></member>
<member optional="true"><type>VkPipelineStageFlags2KHR</type> <name>stageMask</name></member>
<member><type>uint32_t</type> <name>deviceIndex</name></member>
</type>
<type category="struct" name="VkCommandBufferSubmitInfoKHR">
<member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkCommandBuffer</type> <name>commandBuffer</name></member>
<member><type>uint32_t</type> <name>deviceMask</name></member>
</type>
<type category="struct" name="VkSubmitInfo2KHR">
<member values="VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkSubmitFlagsKHR</type> <name>flags</name></member>
<member optional="true"><type>uint32_t</type> <name>waitSemaphoreInfoCount</name></member>
<member len="waitSemaphoreInfoCount">const <type>VkSemaphoreSubmitInfoKHR</type>* <name>pWaitSemaphoreInfos</name></member>
<member optional="true"><type>uint32_t</type> <name>commandBufferInfoCount</name></member>
<member len="commandBufferInfoCount">const <type>VkCommandBufferSubmitInfoKHR</type>* <name>pCommandBufferInfos</name></member>
<member optional="true"><type>uint32_t</type> <name>signalSemaphoreInfoCount</name></member>
<member len="signalSemaphoreInfoCount">const <type>VkSemaphoreSubmitInfoKHR</type>* <name>pSignalSemaphoreInfos</name></member>
</type>
<type category="struct" name="VkQueueFamilyCheckpointProperties2NV" structextends="VkQueueFamilyProperties2" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkPipelineStageFlags2KHR</type> <name>checkpointExecutionStageMask</name></member>
</type>
<type category="struct" name="VkCheckpointData2NV" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkPipelineStageFlags2KHR</type> <name>stage</name></member>
<member noautovalidity="true"><type>void</type>* <name>pCheckpointMarker</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceSynchronization2FeaturesKHR" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR"><type>VkStructureType</type> <name>sType</name></member>
<member noautovalidity="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>synchronization2</name></member>
</type>
<type category="struct" name="VkVideoQueueFamilyProperties2KHR" structextends="VkQueueFamilyProperties2">
<member values="VK_STRUCTURE_TYPE_VIDEO_QUEUE_FAMILY_PROPERTIES_2_KHR"><type>VkStructureType</type><name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkVideoCodecOperationFlagsKHR</type> <name>videoCodecOperations</name></member>
</type>
<type category="struct" name="VkVideoProfilesKHR" structextends="VkFormatProperties2,VkImageCreateInfo,VkImageViewCreateInfo,VkBufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_VIDEO_PROFILES_KHR"><type>VkStructureType</type><name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>profileCount</name></member>
<member>const <type>VkVideoProfileKHR</type>* <name>pProfiles</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceVideoFormatInfoKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkImageUsageFlags</type> <name>imageUsage</name></member>
<member>const <type>VkVideoProfilesKHR</type>* <name>pVideoProfiles</name></member>
</type>
<type category="struct" name="VkVideoFormatPropertiesKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR"><type>VkStructureType</type><name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkFormat</type> <name>format</name></member>
</type>
<type category="struct" name="VkVideoProfileKHR" structextends="VkQueryPoolCreateInfo,VkFormatProperties2,VkImageCreateInfo,VkImageViewCreateInfo,VkBufferCreateInfo">
<member values="VK_STRUCTURE_TYPE_VIDEO_PROFILE_KHR"><type>VkStructureType</type><name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkVideoCodecOperationFlagBitsKHR</type> <name>videoCodecOperation</name></member>
<member><type>VkVideoChromaSubsamplingFlagsKHR</type> <name>chromaSubsampling</name></member>
<member><type>VkVideoComponentBitDepthFlagsKHR</type> <name>lumaBitDepth</name></member>
<member><type>VkVideoComponentBitDepthFlagsKHR</type> <name>chromaBitDepth</name></member>
</type>
<type category="struct" name="VkVideoCapabilitiesKHR" returnedonly="true">
<member values="VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR"><type>VkStructureType</type><name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkVideoCapabilitiesFlagsKHR</type> <name>capabilityFlags</name></member>
<member><type>VkDeviceSize</type> <name>minBitstreamBufferOffsetAlignment</name></member>
<member><type>VkDeviceSize</type> <name>minBitstreamBufferSizeAlignment</name></member>
<member><type>VkExtent2D</type> <name>videoPictureExtentGranularity</name></member>
<member><type>VkExtent2D</type> <name>minExtent</name></member>
<member><type>VkExtent2D</type> <name>maxExtent</name></member>
<member><type>uint32_t</type> <name>maxReferencePicturesSlotsCount</name></member>
<member><type>uint32_t</type> <name>maxReferencePicturesActiveCount</name></member>
</type>
<type category="struct" name="VkVideoGetMemoryPropertiesKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_GET_MEMORY_PROPERTIES_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>memoryBindIndex</name></member>
<member><type>VkMemoryRequirements2</type>* <name>pMemoryRequirements</name></member>
</type>
<type category="struct" name="VkVideoBindMemoryKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_BIND_MEMORY_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>memoryBindIndex</name></member>
<member><type>VkDeviceMemory</type> <name>memory</name></member>
<member><type>VkDeviceSize</type> <name>memoryOffset</name></member>
<member><type>VkDeviceSize</type> <name>memorySize</name></member>
</type>
<type category="struct" name="VkVideoPictureResourceKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkOffset2D</type> <name>codedOffset</name><comment>The offset to be used for the picture resource, currently only used in field mode</comment></member>
<member><type>VkExtent2D</type> <name>codedExtent</name><comment>The extent to be used for the picture resource</comment></member>
<member><type>uint32_t</type> <name>baseArrayLayer</name><comment>TThe first array layer to be accessed for the Decode or Encode Operations</comment></member>
<member><type>VkImageView</type> <name>imageViewBinding</name><comment>The ImageView binding of the resource</comment></member>
</type>
<type category="struct" name="VkVideoReferenceSlotKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>int8_t</type> <name>slotIndex</name><comment>The reference slot index</comment></member>
<member>const <type>VkVideoPictureResourceKHR</type>* <name>pPictureResource</name><comment>The reference picture resource</comment></member>
</type>
<type category="struct" name="VkVideoDecodeInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkVideoDecodeFlagsKHR</type> <name>flags</name></member>
<member><type>VkOffset2D</type> <name>codedOffset</name></member>
<member><type>VkExtent2D</type> <name>codedExtent</name></member>
<member><type>VkBuffer</type> <name>srcBuffer</name></member>
<member><type>VkDeviceSize</type> <name>srcBufferOffset</name></member>
<member><type>VkDeviceSize</type> <name>srcBufferRange</name></member>
<member><type>VkVideoPictureResourceKHR</type> <name>dstPictureResource</name></member>
<member>const <type>VkVideoReferenceSlotKHR</type>* <name>pSetupReferenceSlot</name></member>
<member><type>uint32_t</type> <name>referenceSlotCount</name></member>
<member len="referenceSlotCount">const <type>VkVideoReferenceSlotKHR</type>* <name>pReferenceSlots</name></member>
</type>
<comment>Video Decode Codec Standard specific structures</comment>
<type category="include" name="vk_video/vulkan_video_codec_h264std.h">#include "vk_video/vulkan_video_codec_h264std.h"</type>
<type requires="vk_video/vulkan_video_codec_h264std.h" name="StdVideoH264ProfileIdc"/>
<type category="include" name="vk_video/vulkan_video_codec_h264std_decode.h">#include "vk_video/vulkan_video_codec_h264std_decode.h"</type>
<type requires="vk_video/vulkan_video_codec_h264std_decode.h" name="StdVideoDecodeH264PictureInfo"/>
<type requires="vk_video/vulkan_video_codec_h264std_decode.h" name="StdVideoDecodeH264ReferenceInfo"/>
<type requires="vk_video/vulkan_video_codec_h264std_decode.h" name="StdVideoDecodeH264Mvc"/>
<type category="struct" name="VkVideoDecodeH264ProfileEXT" structextends="VkVideoProfileKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>StdVideoH264ProfileIdc</type> <name>stdProfileIdc</name></member>
<member><type>VkVideoDecodeH264FieldLayoutFlagsEXT</type> <name>fieldLayout</name></member>
</type>
<type category="struct" name="VkVideoDecodeH264CapabilitiesEXT" returnedonly="true" structextends="VkVideoCapabilitiesKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_EXT"><type>VkStructureType</type><name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>maxLevel</name></member>
<member><type>VkOffset2D</type> <name>fieldOffsetGranularity</name></member>
<member><type>VkExtensionProperties</type> <name>stdExtensionVersion</name></member>
</type>
<type category="struct" name="VkVideoDecodeH264SessionCreateInfoEXT" structextends="VkVideoSessionCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_CREATE_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkVideoDecodeH264CreateFlagsEXT</type> <name>flags</name></member>
<member>const <type>VkExtensionProperties</type>* <name>pStdExtensionVersion</name></member>
</type>
<type requires="vk_video/vulkan_video_codec_h264std.h" name="StdVideoH264SequenceParameterSet"/>
<type requires="vk_video/vulkan_video_codec_h264std.h" name="StdVideoH264PictureParameterSet"/>
<type category="struct" name="VkVideoDecodeH264SessionParametersAddInfoEXT" structextends="VkVideoSessionParametersUpdateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>spsStdCount</name></member>
<member len="spsStdCount" optional="true">const <type>StdVideoH264SequenceParameterSet</type>* <name>pSpsStd</name></member>
<member><type>uint32_t</type> <name>ppsStdCount</name></member>
<member len="ppsStdCount" optional="true">const <type>StdVideoH264PictureParameterSet</type>* <name>pPpsStd</name><comment>List of Picture Parameters associated with the spsStd, above</comment></member>
</type>
<type category="struct" name="VkVideoDecodeH264SessionParametersCreateInfoEXT" structextends="VkVideoSessionParametersCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>maxSpsStdCount</name></member>
<member><type>uint32_t</type> <name>maxPpsStdCount</name></member>
<member optional="true">const <type>VkVideoDecodeH264SessionParametersAddInfoEXT</type>* <name>pParametersAddInfo</name></member>
</type>
<type category="struct" name="VkVideoDecodeH264PictureInfoEXT" structextends="VkVideoDecodeInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member noautovalidity="true">const <type>void</type>* <name>pNext</name></member>
<member>const <type>StdVideoDecodeH264PictureInfo</type>* <name>pStdPictureInfo</name></member>
<member><type>uint32_t</type> <name>slicesCount</name></member>
<member len="slicesCount">const <type>uint32_t</type>* <name>pSlicesDataOffsets</name></member>
</type>
<type category="struct" name="VkVideoDecodeH264DpbSlotInfoEXT" structextends="VkVideoReferenceSlotKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member>const <type>StdVideoDecodeH264ReferenceInfo</type>* <name>pStdReferenceInfo</name></member>
</type>
<type category="struct" name="VkVideoDecodeH264MvcEXT" structextends="VkVideoDecodeH264PictureInfoEXT">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_MVC_EXT"><type>VkStructureType</type><name>sType</name></member>
<member noautovalidity="true">const <type>void</type>*<name>pNext</name></member>
<member>const <type>StdVideoDecodeH264Mvc</type>* <name>pStdMvc</name></member>
</type>
<type category="include" name="vk_video/vulkan_video_codec_h265std.h">#include "vk_video/vulkan_video_codec_h265std.h"</type>
<type requires="vk_video/vulkan_video_codec_h265std.h" name="StdVideoH265ProfileIdc"/>
<type requires="vk_video/vulkan_video_codec_h265std.h" name="StdVideoH265VideoParameterSet"/>
<type requires="vk_video/vulkan_video_codec_h265std.h" name="StdVideoH265SequenceParameterSet"/>
<type requires="vk_video/vulkan_video_codec_h265std.h" name="StdVideoH265PictureParameterSet"/>
<type category="include" name="vk_video/vulkan_video_codec_h265std_decode.h">#include "vk_video/vulkan_video_codec_h265std_decode.h"</type>
<type requires="vk_video/vulkan_video_codec_h265std_decode.h" name="StdVideoDecodeH265PictureInfo"/>
<type requires="vk_video/vulkan_video_codec_h265std_decode.h" name="StdVideoDecodeH265ReferenceInfo"/>
<type category="struct" name="VkVideoDecodeH265ProfileEXT" structextends="VkVideoProfileKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>StdVideoH265ProfileIdc</type> <name>stdProfileIdc</name></member>
</type>
<type category="struct" name="VkVideoDecodeH265CapabilitiesEXT" returnedonly="true" structextends="VkVideoCapabilitiesKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_EXT"><type>VkStructureType</type><name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>maxLevel</name></member>
<member><type>VkExtensionProperties</type> <name>stdExtensionVersion</name></member>
</type>
<type category="struct" name="VkVideoDecodeH265SessionCreateInfoEXT" structextends="VkVideoSessionCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_CREATE_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkVideoDecodeH265CreateFlagsEXT</type> <name>flags</name></member>
<member>const <type>VkExtensionProperties</type>* <name>pStdExtensionVersion</name></member>
</type>
<type category="struct" name="VkVideoDecodeH265SessionParametersAddInfoEXT" structextends="VkVideoSessionParametersUpdateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>spsStdCount</name></member>
<member len="spsStdCount" optional="true">const <type>StdVideoH265SequenceParameterSet</type>* <name>pSpsStd</name></member>
<member><type>uint32_t</type> <name>ppsStdCount</name></member>
<member len="ppsStdCount" optional="true">const <type>StdVideoH265PictureParameterSet</type>* <name>pPpsStd</name><comment>List of Picture Parameters associated with the spsStd, above</comment></member>
</type>
<type category="struct" name="VkVideoDecodeH265SessionParametersCreateInfoEXT" structextends="VkVideoSessionParametersCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>maxSpsStdCount</name></member>
<member><type>uint32_t</type> <name>maxPpsStdCount</name></member>
<member optional="true">const <type>VkVideoDecodeH265SessionParametersAddInfoEXT</type>* <name>pParametersAddInfo</name></member>
</type>
<type category="struct" name="VkVideoDecodeH265PictureInfoEXT" structextends="VkVideoDecodeInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>StdVideoDecodeH265PictureInfo</type>* <name>pStdPictureInfo</name></member>
<member><type>uint32_t</type> <name>slicesCount</name></member>
<member len="slicesCount">const <type>uint32_t</type>* <name>pSlicesDataOffsets</name></member>
</type>
<type category="struct" name="VkVideoDecodeH265DpbSlotInfoEXT" structextends="VkVideoReferenceSlotKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member>const <type>StdVideoDecodeH265ReferenceInfo</type>* <name>pStdReferenceInfo</name></member>
</type>
<type category="struct" name="VkVideoSessionCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>queueFamilyIndex</name></member>
<member optional="true"><type>VkVideoSessionCreateFlagsKHR</type> <name>flags</name></member>
<member>const <type>VkVideoProfileKHR</type>* <name>pVideoProfile</name></member>
<member><type>VkFormat</type> <name>pictureFormat</name></member>
<member><type>VkExtent2D</type> <name>maxCodedExtent</name></member>
<member><type>VkFormat</type> <name>referencePicturesFormat</name></member>
<member><type>uint32_t</type> <name>maxReferencePicturesSlotsCount</name></member>
<member><type>uint32_t</type> <name>maxReferencePicturesActiveCount</name></member>
</type>
<type category="struct" name="VkVideoSessionParametersCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkVideoSessionParametersKHR</type> <name>videoSessionParametersTemplate</name></member>
<member><type>VkVideoSessionKHR</type> <name>videoSession</name></member>
</type>
<type category="struct" name="VkVideoSessionParametersUpdateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>updateSequenceCount</name></member>
</type>
<type category="struct" name="VkVideoBeginCodingInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkVideoBeginCodingFlagsKHR</type> <name>flags</name></member>
<member><type>VkVideoCodingQualityPresetFlagsKHR</type> <name>codecQualityPreset</name></member>
<member><type>VkVideoSessionKHR</type> <name>videoSession</name></member>
<member optional="true"><type>VkVideoSessionParametersKHR</type> <name>videoSessionParameters</name></member>
<member><type>uint32_t</type> <name>referenceSlotCount</name></member>
<member len="referenceSlotCount">const <type>VkVideoReferenceSlotKHR</type>* <name>pReferenceSlots</name></member>
</type>
<type category="struct" name="VkVideoEndCodingInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkVideoEndCodingFlagsKHR</type> <name>flags</name></member>
</type>
<type category="struct" name="VkVideoCodingControlInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkVideoCodingControlFlagsKHR</type> <name>flags</name></member>
</type>
<type category="struct" name="VkVideoEncodeInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member optional="true"><type>VkVideoEncodeFlagsKHR</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>qualityLevel</name></member>
<member><type>VkExtent2D</type> <name>codedExtent</name></member>
<member><type>VkBuffer</type> <name>dstBitstreamBuffer</name></member>
<member><type>VkDeviceSize</type> <name>dstBitstreamBufferOffset</name></member>
<member><type>VkDeviceSize</type> <name>dstBitstreamBufferMaxRange</name></member>
<member><type>VkVideoPictureResourceKHR</type> <name>srcPictureResource</name></member>
<member>const <type>VkVideoReferenceSlotKHR</type>* <name>pSetupReferenceSlot</name></member>
<member><type>uint32_t</type> <name>referenceSlotCount</name></member>
<member len="referenceSlotCount">const <type>VkVideoReferenceSlotKHR</type>* <name>pReferenceSlots</name></member>
</type>
<type category="struct" name="VkVideoEncodeRateControlInfoKHR" structextends="VkVideoCodingControlInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkVideoEncodeRateControlFlagsKHR</type> <name>flags</name></member>
<member><type>VkVideoEncodeRateControlModeFlagBitsKHR</type> <name>rateControlMode</name></member>
<member><type>uint32_t</type> <name>averageBitrate</name></member>
<member><type>uint16_t</type> <name>peakToAverageBitrateRatio</name></member>
<member><type>uint16_t</type> <name>frameRateNumerator</name></member>
<member><type>uint16_t</type> <name>frameRateDenominator</name></member>
<member><type>uint32_t</type> <name>virtualBufferSizeInMs</name></member>
</type>
<type category="struct" name="VkVideoEncodeH264CapabilitiesEXT" structextends="VkVideoCapabilitiesKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkVideoEncodeH264CapabilitiesFlagsEXT</type> <name>flags</name></member>
<member><type>VkVideoEncodeH264InputModeFlagsEXT</type> <name>inputModeFlags</name></member>
<member><type>VkVideoEncodeH264OutputModeFlagsEXT</type> <name>outputModeFlags</name></member>
<member><type>VkExtent2D</type> <name>minPictureSizeInMbs</name></member>
<member><type>VkExtent2D</type> <name>maxPictureSizeInMbs</name></member>
<member><type>VkExtent2D</type> <name>inputImageDataAlignment</name></member>
<member><type>uint8_t</type> <name>maxNumL0ReferenceForP</name></member>
<member><type>uint8_t</type> <name>maxNumL0ReferenceForB</name></member>
<member><type>uint8_t</type> <name>maxNumL1Reference</name></member>
<member><type>uint8_t</type> <name>qualityLevelCount</name></member>
<member><type>VkExtensionProperties</type> <name>stdExtensionVersion</name></member>
</type>
<type category="struct" name="VkVideoEncodeH264SessionCreateInfoEXT" structextends="VkVideoSessionCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkVideoEncodeH264CreateFlagsEXT</type> <name>flags</name></member>
<member><type>VkExtent2D</type> <name>maxPictureSizeInMbs</name></member>
<member>const <type>VkExtensionProperties</type>* <name>pStdExtensionVersion</name></member>
</type>
<type category="include" name="vk_video/vulkan_video_codec_h264std_encode.h">#include "vk_video/vulkan_video_codec_h264std_encode.h"</type>
<type requires="vk_video/vulkan_video_codec_h264std_encode.h" name="StdVideoEncodeH264SliceHeader"/>
<type requires="vk_video/vulkan_video_codec_h264std_encode.h" name="StdVideoEncodeH264PictureInfo"/>
<type category="struct" name="VkVideoEncodeH264SessionParametersAddInfoEXT" structextends="VkVideoSessionParametersUpdateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>spsStdCount</name></member>
<member len="spsStdCount" optional="true">const <type>StdVideoH264SequenceParameterSet</type>* <name>pSpsStd</name></member>
<member><type>uint32_t</type> <name>ppsStdCount</name></member>
<member len="ppsStdCount" optional="true">const <type>StdVideoH264PictureParameterSet</type>* <name>pPpsStd</name><comment>List of Picture Parameters associated with the spsStd, above</comment></member>
</type>
<type category="struct" name="VkVideoEncodeH264SessionParametersCreateInfoEXT" structextends="VkVideoSessionParametersCreateInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint32_t</type> <name>maxSpsStdCount</name></member>
<member><type>uint32_t</type> <name>maxPpsStdCount</name></member>
<member optional="true">const <type>VkVideoEncodeH264SessionParametersAddInfoEXT</type>* <name>pParametersAddInfo</name></member>
</type>
<type category="struct" name="VkVideoEncodeH264DpbSlotInfoEXT">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>int8_t</type> <name>slotIndex</name></member>
<member>const <type>StdVideoEncodeH264PictureInfo</type>* <name>pStdPictureInfo</name></member>
</type>
<type category="struct" name="VkVideoEncodeH264VclFrameInfoEXT" structextends="VkVideoEncodeInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint8_t</type> <name>refDefaultFinalList0EntryCount</name></member>
<member len="refDefaultFinalList0EntryCount">const <type>VkVideoEncodeH264DpbSlotInfoEXT</type>* <name>pRefDefaultFinalList0Entries</name></member>
<member><type>uint8_t</type> <name>refDefaultFinalList1EntryCount</name></member>
<member len="refDefaultFinalList1EntryCount">const <type>VkVideoEncodeH264DpbSlotInfoEXT</type>* <name>pRefDefaultFinalList1Entries</name></member>
<member><type>uint32_t</type> <name>naluSliceEntryCount</name></member>
<member len="naluSliceEntryCount">const <type>VkVideoEncodeH264NaluSliceEXT</type>* <name>pNaluSliceEntries</name></member>
<member>const <type>VkVideoEncodeH264DpbSlotInfoEXT</type>* <name>pCurrentPictureInfo</name></member>
</type>
<type category="struct" name="VkVideoEncodeH264EmitPictureParametersEXT" structextends="VkVideoEncodeInfoKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>uint8_t</type> <name>spsId</name></member>
<member><type>VkBool32</type> <name>emitSpsEnable</name></member>
<member><type>uint32_t</type> <name>ppsIdEntryCount</name></member>
<member len="ppsIdEntryCount">const <type>uint8_t</type>* <name>ppsIdEntries</name></member>
</type>
<type category="struct" name="VkVideoEncodeH264ProfileEXT" structextends="VkVideoProfileKHR">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>StdVideoH264ProfileIdc</type> <name>stdProfileIdc</name></member>
</type>
<type category="struct" name="VkVideoEncodeH264NaluSliceEXT">
<member values="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_EXT"><type>VkStructureType</type><name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member>const <type>StdVideoEncodeH264SliceHeader</type>* <name>pSliceHeaderStd</name></member>
<member><type>uint32_t</type> <name>mbCount</name></member>
<member><type>uint8_t</type> <name>refFinalList0EntryCount</name></member>
<member len="refFinalList0EntryCount">const <type>VkVideoEncodeH264DpbSlotInfoEXT</type>* <name>pRefFinalList0Entries</name></member>
<member><type>uint8_t</type> <name>refFinalList1EntryCount</name></member>
<member len="refFinalList1EntryCount">const <type>VkVideoEncodeH264DpbSlotInfoEXT</type>* <name>pRefFinalList1Entries</name></member>
<member><type>uint32_t</type> <name>precedingNaluBytes</name></member>
<member><type>uint8_t</type> <name>minQp</name></member>
<member><type>uint8_t</type> <name>maxQp</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceInheritedViewportScissorFeaturesNV" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV"><type>VkStructureType</type> <name>sType</name></member>
<member><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>inheritedViewportScissor2D</name></member>
</type>
<type category="struct" name="VkCommandBufferInheritanceViewportScissorInfoNV" structextends="VkCommandBufferInheritanceInfo">
<member values="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV"><type>VkStructureType</type> <name>sType</name></member>
<member>const <type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>viewportScissor2D</name></member>
<member><type>uint32_t</type> <name>viewportDepthCount</name></member>
<member noautovalidity="true">const <type>VkViewport</type>* <name>pViewportDepths</name></member>
</type>
<type category="struct" name="VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT" structextends="VkPhysicalDeviceFeatures2,VkDeviceCreateInfo">
<member values="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT"><type>VkStructureType</type> <name>sType</name></member>
<member optional="true"><type>void</type>* <name>pNext</name></member>
<member><type>VkBool32</type> <name>ycbcr2plane444Formats</name></member>
</type>
</types>
<comment>Vulkan enumerant (token) definitions</comment>
<enums name="API Constants" comment="Vulkan hardcoded constants - not an enumerated type, part of the header boilerplate">
<enum type="uint32_t" value="256" name="VK_MAX_PHYSICAL_DEVICE_NAME_SIZE"/>
<enum type="uint32_t" value="16" name="VK_UUID_SIZE"/>
<enum type="uint32_t" value="8" name="VK_LUID_SIZE"/>
<enum name="VK_LUID_SIZE_KHR" alias="VK_LUID_SIZE"/>
<enum type="uint32_t" value="256" name="VK_MAX_EXTENSION_NAME_SIZE"/>
<enum type="uint32_t" value="256" name="VK_MAX_DESCRIPTION_SIZE"/>
<enum type="uint32_t" value="32" name="VK_MAX_MEMORY_TYPES"/>
<enum type="uint32_t" value="16" name="VK_MAX_MEMORY_HEAPS" comment="The maximum number of unique memory heaps, each of which supporting 1 or more memory types"/>
<enum type="float" value="1000.0F" name="VK_LOD_CLAMP_NONE"/>
<enum type="uint32_t" value="(~0U)" name="VK_REMAINING_MIP_LEVELS"/>
<enum type="uint32_t" value="(~0U)" name="VK_REMAINING_ARRAY_LAYERS"/>
<enum type="uint64_t" value="(~0ULL)" name="VK_WHOLE_SIZE"/>
<enum type="uint32_t" value="(~0U)" name="VK_ATTACHMENT_UNUSED"/>
<enum type="uint32_t" value="1" name="VK_TRUE"/>
<enum type="uint32_t" value="0" name="VK_FALSE"/>
<enum type="uint32_t" value="(~0U)" name="VK_QUEUE_FAMILY_IGNORED"/>
<enum type="uint32_t" value="(~1U)" name="VK_QUEUE_FAMILY_EXTERNAL"/>
<enum name="VK_QUEUE_FAMILY_EXTERNAL_KHR" alias="VK_QUEUE_FAMILY_EXTERNAL"/>
<enum type="uint32_t" value="(~2U)" name="VK_QUEUE_FAMILY_FOREIGN_EXT"/>
<enum type="uint32_t" value="(~0U)" name="VK_SUBPASS_EXTERNAL"/>
<enum type="uint32_t" value="32" name="VK_MAX_DEVICE_GROUP_SIZE"/>
<enum name="VK_MAX_DEVICE_GROUP_SIZE_KHR" alias="VK_MAX_DEVICE_GROUP_SIZE"/>
<enum type="uint32_t" value="256" name="VK_MAX_DRIVER_NAME_SIZE"/>
<enum name="VK_MAX_DRIVER_NAME_SIZE_KHR" alias="VK_MAX_DRIVER_NAME_SIZE"/>
<enum type="uint32_t" value="256" name="VK_MAX_DRIVER_INFO_SIZE"/>
<enum name="VK_MAX_DRIVER_INFO_SIZE_KHR" alias="VK_MAX_DRIVER_INFO_SIZE"/>
<enum type="uint32_t" value="(~0U)" name="VK_SHADER_UNUSED_KHR"/>
<enum name="VK_SHADER_UNUSED_NV" alias="VK_SHADER_UNUSED_KHR"/>
</enums>
<comment>
Unlike OpenGL, most tokens in Vulkan are actual typed enumerants in
their own numeric namespaces. The "name" attribute is the C enum
type name, and is pulled in from a type tag definition above
(slightly clunky, but retains the type / enum distinction). "type"
attributes of "enum" or "bitmask" indicate that these values should
be generated inside an appropriate definition.
</comment>
<enums name="VkImageLayout" type="enum">
<enum value="0" name="VK_IMAGE_LAYOUT_UNDEFINED" comment="Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation)"/>
<enum value="1" name="VK_IMAGE_LAYOUT_GENERAL" comment="General layout when image can be used for any kind of access"/>
<enum value="2" name="VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL" comment="Optimal layout when image is only used for color attachment read/write"/>
<enum value="3" name="VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL" comment="Optimal layout when image is only used for depth/stencil attachment read/write"/>
<enum value="4" name="VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL" comment="Optimal layout when image is used for read only depth/stencil attachment and shader access"/>
<enum value="5" name="VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL" comment="Optimal layout when image is used for read only shader access"/>
<enum value="6" name="VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL" comment="Optimal layout when image is used only as source of transfer operations"/>
<enum value="7" name="VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL" comment="Optimal layout when image is used only as destination of transfer operations"/>
<enum value="8" name="VK_IMAGE_LAYOUT_PREINITIALIZED" comment="Initial layout used when the data is populated by the CPU"/>
</enums>
<enums name="VkAttachmentLoadOp" type="enum">
<enum value="0" name="VK_ATTACHMENT_LOAD_OP_LOAD"/>
<enum value="1" name="VK_ATTACHMENT_LOAD_OP_CLEAR"/>
<enum value="2" name="VK_ATTACHMENT_LOAD_OP_DONT_CARE"/>
</enums>
<enums name="VkAttachmentStoreOp" type="enum">
<enum value="0" name="VK_ATTACHMENT_STORE_OP_STORE"/>
<enum value="1" name="VK_ATTACHMENT_STORE_OP_DONT_CARE"/>
</enums>
<enums name="VkImageType" type="enum">
<enum value="0" name="VK_IMAGE_TYPE_1D"/>
<enum value="1" name="VK_IMAGE_TYPE_2D"/>
<enum value="2" name="VK_IMAGE_TYPE_3D"/>
</enums>
<enums name="VkImageTiling" type="enum">
<enum value="0" name="VK_IMAGE_TILING_OPTIMAL"/>
<enum value="1" name="VK_IMAGE_TILING_LINEAR"/>
</enums>
<enums name="VkImageViewType" type="enum">
<enum value="0" name="VK_IMAGE_VIEW_TYPE_1D"/>
<enum value="1" name="VK_IMAGE_VIEW_TYPE_2D"/>
<enum value="2" name="VK_IMAGE_VIEW_TYPE_3D"/>
<enum value="3" name="VK_IMAGE_VIEW_TYPE_CUBE"/>
<enum value="4" name="VK_IMAGE_VIEW_TYPE_1D_ARRAY"/>
<enum value="5" name="VK_IMAGE_VIEW_TYPE_2D_ARRAY"/>
<enum value="6" name="VK_IMAGE_VIEW_TYPE_CUBE_ARRAY"/>
</enums>
<enums name="VkCommandBufferLevel" type="enum">
<enum value="0" name="VK_COMMAND_BUFFER_LEVEL_PRIMARY"/>
<enum value="1" name="VK_COMMAND_BUFFER_LEVEL_SECONDARY"/>
</enums>
<enums name="VkComponentSwizzle" type="enum">
<enum value="0" name="VK_COMPONENT_SWIZZLE_IDENTITY"/>
<enum value="1" name="VK_COMPONENT_SWIZZLE_ZERO"/>
<enum value="2" name="VK_COMPONENT_SWIZZLE_ONE"/>
<enum value="3" name="VK_COMPONENT_SWIZZLE_R"/>
<enum value="4" name="VK_COMPONENT_SWIZZLE_G"/>
<enum value="5" name="VK_COMPONENT_SWIZZLE_B"/>
<enum value="6" name="VK_COMPONENT_SWIZZLE_A"/>
</enums>
<enums name="VkDescriptorType" type="enum">
<enum value="0" name="VK_DESCRIPTOR_TYPE_SAMPLER"/>
<enum value="1" name="VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER"/>
<enum value="2" name="VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE"/>
<enum value="3" name="VK_DESCRIPTOR_TYPE_STORAGE_IMAGE"/>
<enum value="4" name="VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER"/>
<enum value="5" name="VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER"/>
<enum value="6" name="VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER"/>
<enum value="7" name="VK_DESCRIPTOR_TYPE_STORAGE_BUFFER"/>
<enum value="8" name="VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC"/>
<enum value="9" name="VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC"/>
<enum value="10" name="VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT"/>
</enums>
<enums name="VkQueryType" type="enum">
<enum value="0" name="VK_QUERY_TYPE_OCCLUSION"/>
<enum value="1" name="VK_QUERY_TYPE_PIPELINE_STATISTICS" comment="Optional"/>
<enum value="2" name="VK_QUERY_TYPE_TIMESTAMP"/>
</enums>
<enums name="VkBorderColor" type="enum">
<enum value="0" name="VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK"/>
<enum value="1" name="VK_BORDER_COLOR_INT_TRANSPARENT_BLACK"/>
<enum value="2" name="VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK"/>
<enum value="3" name="VK_BORDER_COLOR_INT_OPAQUE_BLACK"/>
<enum value="4" name="VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE"/>
<enum value="5" name="VK_BORDER_COLOR_INT_OPAQUE_WHITE"/>
</enums>
<enums name="VkPipelineBindPoint" type="enum">
<enum value="0" name="VK_PIPELINE_BIND_POINT_GRAPHICS"/>
<enum value="1" name="VK_PIPELINE_BIND_POINT_COMPUTE"/>
</enums>
<enums name="VkPipelineCacheHeaderVersion" type="enum">
<enum value="1" name="VK_PIPELINE_CACHE_HEADER_VERSION_ONE"/>
</enums>
<enums name="VkPipelineCacheCreateFlagBits" type="bitmask"></enums>
<enums name="VkPrimitiveTopology" type="enum">
<enum value="0" name="VK_PRIMITIVE_TOPOLOGY_POINT_LIST"/>
<enum value="1" name="VK_PRIMITIVE_TOPOLOGY_LINE_LIST"/>
<enum value="2" name="VK_PRIMITIVE_TOPOLOGY_LINE_STRIP"/>
<enum value="3" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST"/>
<enum value="4" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP"/>
<enum value="5" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN"/>
<enum value="6" name="VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY"/>
<enum value="7" name="VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY"/>
<enum value="8" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY"/>
<enum value="9" name="VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY"/>
<enum value="10" name="VK_PRIMITIVE_TOPOLOGY_PATCH_LIST"/>
</enums>
<enums name="VkSharingMode" type="enum">
<enum value="0" name="VK_SHARING_MODE_EXCLUSIVE"/>
<enum value="1" name="VK_SHARING_MODE_CONCURRENT"/>
</enums>
<enums name="VkIndexType" type="enum">
<enum value="0" name="VK_INDEX_TYPE_UINT16"/>
<enum value="1" name="VK_INDEX_TYPE_UINT32"/>
</enums>
<enums name="VkFilter" type="enum">
<enum value="0" name="VK_FILTER_NEAREST"/>
<enum value="1" name="VK_FILTER_LINEAR"/>
</enums>
<enums name="VkSamplerMipmapMode" type="enum">
<enum value="0" name="VK_SAMPLER_MIPMAP_MODE_NEAREST" comment="Choose nearest mip level"/>
<enum value="1" name="VK_SAMPLER_MIPMAP_MODE_LINEAR" comment="Linear filter between mip levels"/>
</enums>
<enums name="VkSamplerAddressMode" type="enum">
<enum value="0" name="VK_SAMPLER_ADDRESS_MODE_REPEAT"/>
<enum value="1" name="VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT"/>
<enum value="2" name="VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE"/>
<enum value="3" name="VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER"/>
<comment>
value="4" reserved for VK_KHR_sampler_mirror_clamp_to_edge
enum VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; do not
alias!
</comment>
</enums>
<enums name="VkCompareOp" type="enum">
<enum value="0" name="VK_COMPARE_OP_NEVER"/>
<enum value="1" name="VK_COMPARE_OP_LESS"/>
<enum value="2" name="VK_COMPARE_OP_EQUAL"/>
<enum value="3" name="VK_COMPARE_OP_LESS_OR_EQUAL"/>
<enum value="4" name="VK_COMPARE_OP_GREATER"/>
<enum value="5" name="VK_COMPARE_OP_NOT_EQUAL"/>
<enum value="6" name="VK_COMPARE_OP_GREATER_OR_EQUAL"/>
<enum value="7" name="VK_COMPARE_OP_ALWAYS"/>
</enums>
<enums name="VkPolygonMode" type="enum">
<enum value="0" name="VK_POLYGON_MODE_FILL"/>
<enum value="1" name="VK_POLYGON_MODE_LINE"/>
<enum value="2" name="VK_POLYGON_MODE_POINT"/>
</enums>
<enums name="VkFrontFace" type="enum">
<enum value="0" name="VK_FRONT_FACE_COUNTER_CLOCKWISE"/>
<enum value="1" name="VK_FRONT_FACE_CLOCKWISE"/>
</enums>
<enums name="VkBlendFactor" type="enum">
<enum value="0" name="VK_BLEND_FACTOR_ZERO"/>
<enum value="1" name="VK_BLEND_FACTOR_ONE"/>
<enum value="2" name="VK_BLEND_FACTOR_SRC_COLOR"/>
<enum value="3" name="VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR"/>
<enum value="4" name="VK_BLEND_FACTOR_DST_COLOR"/>
<enum value="5" name="VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR"/>
<enum value="6" name="VK_BLEND_FACTOR_SRC_ALPHA"/>
<enum value="7" name="VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA"/>
<enum value="8" name="VK_BLEND_FACTOR_DST_ALPHA"/>
<enum value="9" name="VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA"/>
<enum value="10" name="VK_BLEND_FACTOR_CONSTANT_COLOR"/>
<enum value="11" name="VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR"/>
<enum value="12" name="VK_BLEND_FACTOR_CONSTANT_ALPHA"/>
<enum value="13" name="VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA"/>
<enum value="14" name="VK_BLEND_FACTOR_SRC_ALPHA_SATURATE"/>
<enum value="15" name="VK_BLEND_FACTOR_SRC1_COLOR"/>
<enum value="16" name="VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR"/>
<enum value="17" name="VK_BLEND_FACTOR_SRC1_ALPHA"/>
<enum value="18" name="VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA"/>
</enums>
<enums name="VkBlendOp" type="enum">
<enum value="0" name="VK_BLEND_OP_ADD"/>
<enum value="1" name="VK_BLEND_OP_SUBTRACT"/>
<enum value="2" name="VK_BLEND_OP_REVERSE_SUBTRACT"/>
<enum value="3" name="VK_BLEND_OP_MIN"/>
<enum value="4" name="VK_BLEND_OP_MAX"/>
</enums>
<enums name="VkStencilOp" type="enum">
<enum value="0" name="VK_STENCIL_OP_KEEP"/>
<enum value="1" name="VK_STENCIL_OP_ZERO"/>
<enum value="2" name="VK_STENCIL_OP_REPLACE"/>
<enum value="3" name="VK_STENCIL_OP_INCREMENT_AND_CLAMP"/>
<enum value="4" name="VK_STENCIL_OP_DECREMENT_AND_CLAMP"/>
<enum value="5" name="VK_STENCIL_OP_INVERT"/>
<enum value="6" name="VK_STENCIL_OP_INCREMENT_AND_WRAP"/>
<enum value="7" name="VK_STENCIL_OP_DECREMENT_AND_WRAP"/>
</enums>
<enums name="VkLogicOp" type="enum">
<enum value="0" name="VK_LOGIC_OP_CLEAR"/>
<enum value="1" name="VK_LOGIC_OP_AND"/>
<enum value="2" name="VK_LOGIC_OP_AND_REVERSE"/>
<enum value="3" name="VK_LOGIC_OP_COPY"/>
<enum value="4" name="VK_LOGIC_OP_AND_INVERTED"/>
<enum value="5" name="VK_LOGIC_OP_NO_OP"/>
<enum value="6" name="VK_LOGIC_OP_XOR"/>
<enum value="7" name="VK_LOGIC_OP_OR"/>
<enum value="8" name="VK_LOGIC_OP_NOR"/>
<enum value="9" name="VK_LOGIC_OP_EQUIVALENT"/>
<enum value="10" name="VK_LOGIC_OP_INVERT"/>
<enum value="11" name="VK_LOGIC_OP_OR_REVERSE"/>
<enum value="12" name="VK_LOGIC_OP_COPY_INVERTED"/>
<enum value="13" name="VK_LOGIC_OP_OR_INVERTED"/>
<enum value="14" name="VK_LOGIC_OP_NAND"/>
<enum value="15" name="VK_LOGIC_OP_SET"/>
</enums>
<enums name="VkInternalAllocationType" type="enum">
<enum value="0" name="VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE"/>
</enums>
<enums name="VkSystemAllocationScope" type="enum">
<enum value="0" name="VK_SYSTEM_ALLOCATION_SCOPE_COMMAND"/>
<enum value="1" name="VK_SYSTEM_ALLOCATION_SCOPE_OBJECT"/>
<enum value="2" name="VK_SYSTEM_ALLOCATION_SCOPE_CACHE"/>
<enum value="3" name="VK_SYSTEM_ALLOCATION_SCOPE_DEVICE"/>
<enum value="4" name="VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE"/>
</enums>
<enums name="VkPhysicalDeviceType" type="enum">
<enum value="0" name="VK_PHYSICAL_DEVICE_TYPE_OTHER"/>
<enum value="1" name="VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU"/>
<enum value="2" name="VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU"/>
<enum value="3" name="VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU"/>
<enum value="4" name="VK_PHYSICAL_DEVICE_TYPE_CPU"/>
</enums>
<enums name="VkVertexInputRate" type="enum">
<enum value="0" name="VK_VERTEX_INPUT_RATE_VERTEX"/>
<enum value="1" name="VK_VERTEX_INPUT_RATE_INSTANCE"/>
</enums>
<enums name="VkFormat" type="enum" comment="Vulkan format definitions">
<enum value="0" name="VK_FORMAT_UNDEFINED"/>
<enum value="1" name="VK_FORMAT_R4G4_UNORM_PACK8"/>
<enum value="2" name="VK_FORMAT_R4G4B4A4_UNORM_PACK16"/>
<enum value="3" name="VK_FORMAT_B4G4R4A4_UNORM_PACK16"/>
<enum value="4" name="VK_FORMAT_R5G6B5_UNORM_PACK16"/>
<enum value="5" name="VK_FORMAT_B5G6R5_UNORM_PACK16"/>
<enum value="6" name="VK_FORMAT_R5G5B5A1_UNORM_PACK16"/>
<enum value="7" name="VK_FORMAT_B5G5R5A1_UNORM_PACK16"/>
<enum value="8" name="VK_FORMAT_A1R5G5B5_UNORM_PACK16"/>
<enum value="9" name="VK_FORMAT_R8_UNORM"/>
<enum value="10" name="VK_FORMAT_R8_SNORM"/>
<enum value="11" name="VK_FORMAT_R8_USCALED"/>
<enum value="12" name="VK_FORMAT_R8_SSCALED"/>
<enum value="13" name="VK_FORMAT_R8_UINT"/>
<enum value="14" name="VK_FORMAT_R8_SINT"/>
<enum value="15" name="VK_FORMAT_R8_SRGB"/>
<enum value="16" name="VK_FORMAT_R8G8_UNORM"/>
<enum value="17" name="VK_FORMAT_R8G8_SNORM"/>
<enum value="18" name="VK_FORMAT_R8G8_USCALED"/>
<enum value="19" name="VK_FORMAT_R8G8_SSCALED"/>
<enum value="20" name="VK_FORMAT_R8G8_UINT"/>
<enum value="21" name="VK_FORMAT_R8G8_SINT"/>
<enum value="22" name="VK_FORMAT_R8G8_SRGB"/>
<enum value="23" name="VK_FORMAT_R8G8B8_UNORM"/>
<enum value="24" name="VK_FORMAT_R8G8B8_SNORM"/>
<enum value="25" name="VK_FORMAT_R8G8B8_USCALED"/>
<enum value="26" name="VK_FORMAT_R8G8B8_SSCALED"/>
<enum value="27" name="VK_FORMAT_R8G8B8_UINT"/>
<enum value="28" name="VK_FORMAT_R8G8B8_SINT"/>
<enum value="29" name="VK_FORMAT_R8G8B8_SRGB"/>
<enum value="30" name="VK_FORMAT_B8G8R8_UNORM"/>
<enum value="31" name="VK_FORMAT_B8G8R8_SNORM"/>
<enum value="32" name="VK_FORMAT_B8G8R8_USCALED"/>
<enum value="33" name="VK_FORMAT_B8G8R8_SSCALED"/>
<enum value="34" name="VK_FORMAT_B8G8R8_UINT"/>
<enum value="35" name="VK_FORMAT_B8G8R8_SINT"/>
<enum value="36" name="VK_FORMAT_B8G8R8_SRGB"/>
<enum value="37" name="VK_FORMAT_R8G8B8A8_UNORM"/>
<enum value="38" name="VK_FORMAT_R8G8B8A8_SNORM"/>
<enum value="39" name="VK_FORMAT_R8G8B8A8_USCALED"/>
<enum value="40" name="VK_FORMAT_R8G8B8A8_SSCALED"/>
<enum value="41" name="VK_FORMAT_R8G8B8A8_UINT"/>
<enum value="42" name="VK_FORMAT_R8G8B8A8_SINT"/>
<enum value="43" name="VK_FORMAT_R8G8B8A8_SRGB"/>
<enum value="44" name="VK_FORMAT_B8G8R8A8_UNORM"/>
<enum value="45" name="VK_FORMAT_B8G8R8A8_SNORM"/>
<enum value="46" name="VK_FORMAT_B8G8R8A8_USCALED"/>
<enum value="47" name="VK_FORMAT_B8G8R8A8_SSCALED"/>
<enum value="48" name="VK_FORMAT_B8G8R8A8_UINT"/>
<enum value="49" name="VK_FORMAT_B8G8R8A8_SINT"/>
<enum value="50" name="VK_FORMAT_B8G8R8A8_SRGB"/>
<enum value="51" name="VK_FORMAT_A8B8G8R8_UNORM_PACK32"/>
<enum value="52" name="VK_FORMAT_A8B8G8R8_SNORM_PACK32"/>
<enum value="53" name="VK_FORMAT_A8B8G8R8_USCALED_PACK32"/>
<enum value="54" name="VK_FORMAT_A8B8G8R8_SSCALED_PACK32"/>
<enum value="55" name="VK_FORMAT_A8B8G8R8_UINT_PACK32"/>
<enum value="56" name="VK_FORMAT_A8B8G8R8_SINT_PACK32"/>
<enum value="57" name="VK_FORMAT_A8B8G8R8_SRGB_PACK32"/>
<enum value="58" name="VK_FORMAT_A2R10G10B10_UNORM_PACK32"/>
<enum value="59" name="VK_FORMAT_A2R10G10B10_SNORM_PACK32"/>
<enum value="60" name="VK_FORMAT_A2R10G10B10_USCALED_PACK32"/>
<enum value="61" name="VK_FORMAT_A2R10G10B10_SSCALED_PACK32"/>
<enum value="62" name="VK_FORMAT_A2R10G10B10_UINT_PACK32"/>
<enum value="63" name="VK_FORMAT_A2R10G10B10_SINT_PACK32"/>
<enum value="64" name="VK_FORMAT_A2B10G10R10_UNORM_PACK32"/>
<enum value="65" name="VK_FORMAT_A2B10G10R10_SNORM_PACK32"/>
<enum value="66" name="VK_FORMAT_A2B10G10R10_USCALED_PACK32"/>
<enum value="67" name="VK_FORMAT_A2B10G10R10_SSCALED_PACK32"/>
<enum value="68" name="VK_FORMAT_A2B10G10R10_UINT_PACK32"/>
<enum value="69" name="VK_FORMAT_A2B10G10R10_SINT_PACK32"/>
<enum value="70" name="VK_FORMAT_R16_UNORM"/>
<enum value="71" name="VK_FORMAT_R16_SNORM"/>
<enum value="72" name="VK_FORMAT_R16_USCALED"/>
<enum value="73" name="VK_FORMAT_R16_SSCALED"/>
<enum value="74" name="VK_FORMAT_R16_UINT"/>
<enum value="75" name="VK_FORMAT_R16_SINT"/>
<enum value="76" name="VK_FORMAT_R16_SFLOAT"/>
<enum value="77" name="VK_FORMAT_R16G16_UNORM"/>
<enum value="78" name="VK_FORMAT_R16G16_SNORM"/>
<enum value="79" name="VK_FORMAT_R16G16_USCALED"/>
<enum value="80" name="VK_FORMAT_R16G16_SSCALED"/>
<enum value="81" name="VK_FORMAT_R16G16_UINT"/>
<enum value="82" name="VK_FORMAT_R16G16_SINT"/>
<enum value="83" name="VK_FORMAT_R16G16_SFLOAT"/>
<enum value="84" name="VK_FORMAT_R16G16B16_UNORM"/>
<enum value="85" name="VK_FORMAT_R16G16B16_SNORM"/>
<enum value="86" name="VK_FORMAT_R16G16B16_USCALED"/>
<enum value="87" name="VK_FORMAT_R16G16B16_SSCALED"/>
<enum value="88" name="VK_FORMAT_R16G16B16_UINT"/>
<enum value="89" name="VK_FORMAT_R16G16B16_SINT"/>
<enum value="90" name="VK_FORMAT_R16G16B16_SFLOAT"/>
<enum value="91" name="VK_FORMAT_R16G16B16A16_UNORM"/>
<enum value="92" name="VK_FORMAT_R16G16B16A16_SNORM"/>
<enum value="93" name="VK_FORMAT_R16G16B16A16_USCALED"/>
<enum value="94" name="VK_FORMAT_R16G16B16A16_SSCALED"/>
<enum value="95" name="VK_FORMAT_R16G16B16A16_UINT"/>
<enum value="96" name="VK_FORMAT_R16G16B16A16_SINT"/>
<enum value="97" name="VK_FORMAT_R16G16B16A16_SFLOAT"/>
<enum value="98" name="VK_FORMAT_R32_UINT"/>
<enum value="99" name="VK_FORMAT_R32_SINT"/>
<enum value="100" name="VK_FORMAT_R32_SFLOAT"/>
<enum value="101" name="VK_FORMAT_R32G32_UINT"/>
<enum value="102" name="VK_FORMAT_R32G32_SINT"/>
<enum value="103" name="VK_FORMAT_R32G32_SFLOAT"/>
<enum value="104" name="VK_FORMAT_R32G32B32_UINT"/>
<enum value="105" name="VK_FORMAT_R32G32B32_SINT"/>
<enum value="106" name="VK_FORMAT_R32G32B32_SFLOAT"/>
<enum value="107" name="VK_FORMAT_R32G32B32A32_UINT"/>
<enum value="108" name="VK_FORMAT_R32G32B32A32_SINT"/>
<enum value="109" name="VK_FORMAT_R32G32B32A32_SFLOAT"/>
<enum value="110" name="VK_FORMAT_R64_UINT"/>
<enum value="111" name="VK_FORMAT_R64_SINT"/>
<enum value="112" name="VK_FORMAT_R64_SFLOAT"/>
<enum value="113" name="VK_FORMAT_R64G64_UINT"/>
<enum value="114" name="VK_FORMAT_R64G64_SINT"/>
<enum value="115" name="VK_FORMAT_R64G64_SFLOAT"/>
<enum value="116" name="VK_FORMAT_R64G64B64_UINT"/>
<enum value="117" name="VK_FORMAT_R64G64B64_SINT"/>
<enum value="118" name="VK_FORMAT_R64G64B64_SFLOAT"/>
<enum value="119" name="VK_FORMAT_R64G64B64A64_UINT"/>
<enum value="120" name="VK_FORMAT_R64G64B64A64_SINT"/>
<enum value="121" name="VK_FORMAT_R64G64B64A64_SFLOAT"/>
<enum value="122" name="VK_FORMAT_B10G11R11_UFLOAT_PACK32"/>
<enum value="123" name="VK_FORMAT_E5B9G9R9_UFLOAT_PACK32"/>
<enum value="124" name="VK_FORMAT_D16_UNORM"/>
<enum value="125" name="VK_FORMAT_X8_D24_UNORM_PACK32"/>
<enum value="126" name="VK_FORMAT_D32_SFLOAT"/>
<enum value="127" name="VK_FORMAT_S8_UINT"/>
<enum value="128" name="VK_FORMAT_D16_UNORM_S8_UINT"/>
<enum value="129" name="VK_FORMAT_D24_UNORM_S8_UINT"/>
<enum value="130" name="VK_FORMAT_D32_SFLOAT_S8_UINT"/>
<enum value="131" name="VK_FORMAT_BC1_RGB_UNORM_BLOCK"/>
<enum value="132" name="VK_FORMAT_BC1_RGB_SRGB_BLOCK"/>
<enum value="133" name="VK_FORMAT_BC1_RGBA_UNORM_BLOCK"/>
<enum value="134" name="VK_FORMAT_BC1_RGBA_SRGB_BLOCK"/>
<enum value="135" name="VK_FORMAT_BC2_UNORM_BLOCK"/>
<enum value="136" name="VK_FORMAT_BC2_SRGB_BLOCK"/>
<enum value="137" name="VK_FORMAT_BC3_UNORM_BLOCK"/>
<enum value="138" name="VK_FORMAT_BC3_SRGB_BLOCK"/>
<enum value="139" name="VK_FORMAT_BC4_UNORM_BLOCK"/>
<enum value="140" name="VK_FORMAT_BC4_SNORM_BLOCK"/>
<enum value="141" name="VK_FORMAT_BC5_UNORM_BLOCK"/>
<enum value="142" name="VK_FORMAT_BC5_SNORM_BLOCK"/>
<enum value="143" name="VK_FORMAT_BC6H_UFLOAT_BLOCK"/>
<enum value="144" name="VK_FORMAT_BC6H_SFLOAT_BLOCK"/>
<enum value="145" name="VK_FORMAT_BC7_UNORM_BLOCK"/>
<enum value="146" name="VK_FORMAT_BC7_SRGB_BLOCK"/>
<enum value="147" name="VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK"/>
<enum value="148" name="VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK"/>
<enum value="149" name="VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK"/>
<enum value="150" name="VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK"/>
<enum value="151" name="VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK"/>
<enum value="152" name="VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK"/>
<enum value="153" name="VK_FORMAT_EAC_R11_UNORM_BLOCK"/>
<enum value="154" name="VK_FORMAT_EAC_R11_SNORM_BLOCK"/>
<enum value="155" name="VK_FORMAT_EAC_R11G11_UNORM_BLOCK"/>
<enum value="156" name="VK_FORMAT_EAC_R11G11_SNORM_BLOCK"/>
<enum value="157" name="VK_FORMAT_ASTC_4x4_UNORM_BLOCK"/>
<enum value="158" name="VK_FORMAT_ASTC_4x4_SRGB_BLOCK"/>
<enum value="159" name="VK_FORMAT_ASTC_5x4_UNORM_BLOCK"/>
<enum value="160" name="VK_FORMAT_ASTC_5x4_SRGB_BLOCK"/>
<enum value="161" name="VK_FORMAT_ASTC_5x5_UNORM_BLOCK"/>
<enum value="162" name="VK_FORMAT_ASTC_5x5_SRGB_BLOCK"/>
<enum value="163" name="VK_FORMAT_ASTC_6x5_UNORM_BLOCK"/>
<enum value="164" name="VK_FORMAT_ASTC_6x5_SRGB_BLOCK"/>
<enum value="165" name="VK_FORMAT_ASTC_6x6_UNORM_BLOCK"/>
<enum value="166" name="VK_FORMAT_ASTC_6x6_SRGB_BLOCK"/>
<enum value="167" name="VK_FORMAT_ASTC_8x5_UNORM_BLOCK"/>
<enum value="168" name="VK_FORMAT_ASTC_8x5_SRGB_BLOCK"/>
<enum value="169" name="VK_FORMAT_ASTC_8x6_UNORM_BLOCK"/>
<enum value="170" name="VK_FORMAT_ASTC_8x6_SRGB_BLOCK"/>
<enum value="171" name="VK_FORMAT_ASTC_8x8_UNORM_BLOCK"/>
<enum value="172" name="VK_FORMAT_ASTC_8x8_SRGB_BLOCK"/>
<enum value="173" name="VK_FORMAT_ASTC_10x5_UNORM_BLOCK"/>
<enum value="174" name="VK_FORMAT_ASTC_10x5_SRGB_BLOCK"/>
<enum value="175" name="VK_FORMAT_ASTC_10x6_UNORM_BLOCK"/>
<enum value="176" name="VK_FORMAT_ASTC_10x6_SRGB_BLOCK"/>
<enum value="177" name="VK_FORMAT_ASTC_10x8_UNORM_BLOCK"/>
<enum value="178" name="VK_FORMAT_ASTC_10x8_SRGB_BLOCK"/>
<enum value="179" name="VK_FORMAT_ASTC_10x10_UNORM_BLOCK"/>
<enum value="180" name="VK_FORMAT_ASTC_10x10_SRGB_BLOCK"/>
<enum value="181" name="VK_FORMAT_ASTC_12x10_UNORM_BLOCK"/>
<enum value="182" name="VK_FORMAT_ASTC_12x10_SRGB_BLOCK"/>
<enum value="183" name="VK_FORMAT_ASTC_12x12_UNORM_BLOCK"/>
<enum value="184" name="VK_FORMAT_ASTC_12x12_SRGB_BLOCK"/>
</enums>
<enums name="VkStructureType" type="enum" comment="Structure type enumerant">
<enum value="0" name="VK_STRUCTURE_TYPE_APPLICATION_INFO"/>
<enum value="1" name="VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO"/>
<enum value="2" name="VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO"/>
<enum value="3" name="VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO"/>
<enum value="4" name="VK_STRUCTURE_TYPE_SUBMIT_INFO"/>
<enum value="5" name="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO"/>
<enum value="6" name="VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE"/>
<enum value="7" name="VK_STRUCTURE_TYPE_BIND_SPARSE_INFO"/>
<enum value="8" name="VK_STRUCTURE_TYPE_FENCE_CREATE_INFO"/>
<enum value="9" name="VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO"/>
<enum value="10" name="VK_STRUCTURE_TYPE_EVENT_CREATE_INFO"/>
<enum value="11" name="VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO"/>
<enum value="12" name="VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO"/>
<enum value="13" name="VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO"/>
<enum value="14" name="VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO"/>
<enum value="15" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO"/>
<enum value="16" name="VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO"/>
<enum value="17" name="VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO"/>
<enum value="18" name="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO"/>
<enum value="19" name="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO"/>
<enum value="20" name="VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO"/>
<enum value="21" name="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO"/>
<enum value="22" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO"/>
<enum value="23" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO"/>
<enum value="24" name="VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"/>
<enum value="25" name="VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO"/>
<enum value="26" name="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO"/>
<enum value="27" name="VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO"/>
<enum value="28" name="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO"/>
<enum value="29" name="VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO"/>
<enum value="30" name="VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO"/>
<enum value="31" name="VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO"/>
<enum value="32" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO"/>
<enum value="33" name="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO"/>
<enum value="34" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO"/>
<enum value="35" name="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET"/>
<enum value="36" name="VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET"/>
<enum value="37" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO"/>
<enum value="38" name="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO"/>
<enum value="39" name="VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO"/>
<enum value="40" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO"/>
<enum value="41" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO"/>
<enum value="42" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO"/>
<enum value="43" name="VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO"/>
<enum value="44" name="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER"/>
<enum value="45" name="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER"/>
<enum value="46" name="VK_STRUCTURE_TYPE_MEMORY_BARRIER"/>
<enum value="47" name="VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO" comment="Reserved for internal use by the loader, layers, and ICDs"/>
<enum value="48" name="VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO" comment="Reserved for internal use by the loader, layers, and ICDs"/>
</enums>
<enums name="VkSubpassContents" type="enum">
<enum value="0" name="VK_SUBPASS_CONTENTS_INLINE"/>
<enum value="1" name="VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS"/>
</enums>
<enums name="VkResult" type="enum" comment="API result codes">
<comment>Return codes (positive values)</comment>
<enum value="0" name="VK_SUCCESS" comment="Command completed successfully"/>
<enum value="1" name="VK_NOT_READY" comment="A fence or query has not yet completed"/>
<enum value="2" name="VK_TIMEOUT" comment="A wait operation has not completed in the specified time"/>
<enum value="3" name="VK_EVENT_SET" comment="An event is signaled"/>
<enum value="4" name="VK_EVENT_RESET" comment="An event is unsignaled"/>
<enum value="5" name="VK_INCOMPLETE" comment="A return array was too small for the result"/>
<comment>Error codes (negative values)</comment>
<enum value="-1" name="VK_ERROR_OUT_OF_HOST_MEMORY" comment="A host memory allocation has failed"/>
<enum value="-2" name="VK_ERROR_OUT_OF_DEVICE_MEMORY" comment="A device memory allocation has failed"/>
<enum value="-3" name="VK_ERROR_INITIALIZATION_FAILED" comment="Initialization of a object has failed"/>
<enum value="-4" name="VK_ERROR_DEVICE_LOST" comment="The logical device has been lost. See <<devsandqueues-lost-device>>"/>
<enum value="-5" name="VK_ERROR_MEMORY_MAP_FAILED" comment="Mapping of a memory object has failed"/>
<enum value="-6" name="VK_ERROR_LAYER_NOT_PRESENT" comment="Layer specified does not exist"/>
<enum value="-7" name="VK_ERROR_EXTENSION_NOT_PRESENT" comment="Extension specified does not exist"/>
<enum value="-8" name="VK_ERROR_FEATURE_NOT_PRESENT" comment="Requested feature is not available on this device"/>
<enum value="-9" name="VK_ERROR_INCOMPATIBLE_DRIVER" comment="Unable to find a Vulkan driver"/>
<enum value="-10" name="VK_ERROR_TOO_MANY_OBJECTS" comment="Too many objects of the type have already been created"/>
<enum value="-11" name="VK_ERROR_FORMAT_NOT_SUPPORTED" comment="Requested format is not supported on this device"/>
<enum value="-12" name="VK_ERROR_FRAGMENTED_POOL" comment="A requested pool allocation has failed due to fragmentation of the pool's memory"/>
<enum value="-13" name="VK_ERROR_UNKNOWN" comment="An unknown error has occurred, due to an implementation or application bug"/>
<unused start="-14" comment="This is the next unused available error code (negative value)"/>
</enums>
<enums name="VkDynamicState" type="enum">
<enum value="0" name="VK_DYNAMIC_STATE_VIEWPORT"/>
<enum value="1" name="VK_DYNAMIC_STATE_SCISSOR"/>
<enum value="2" name="VK_DYNAMIC_STATE_LINE_WIDTH"/>
<enum value="3" name="VK_DYNAMIC_STATE_DEPTH_BIAS"/>
<enum value="4" name="VK_DYNAMIC_STATE_BLEND_CONSTANTS"/>
<enum value="5" name="VK_DYNAMIC_STATE_DEPTH_BOUNDS"/>
<enum value="6" name="VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK"/>
<enum value="7" name="VK_DYNAMIC_STATE_STENCIL_WRITE_MASK"/>
<enum value="8" name="VK_DYNAMIC_STATE_STENCIL_REFERENCE"/>
</enums>
<enums name="VkDescriptorUpdateTemplateType" type="enum">
<enum value="0" name="VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET" comment="Create descriptor update template for descriptor set updates"/>
</enums>
<enums name="VkObjectType" type="enum" comment="Enums to track objects of various types - also see objtypeenum attributes on type tags">
<enum value="0" name="VK_OBJECT_TYPE_UNKNOWN"/>
<enum value="1" name="VK_OBJECT_TYPE_INSTANCE"/>
<enum value="2" name="VK_OBJECT_TYPE_PHYSICAL_DEVICE"/>
<enum value="3" name="VK_OBJECT_TYPE_DEVICE"/>
<enum value="4" name="VK_OBJECT_TYPE_QUEUE"/>
<enum value="5" name="VK_OBJECT_TYPE_SEMAPHORE"/>
<enum value="6" name="VK_OBJECT_TYPE_COMMAND_BUFFER"/>
<enum value="7" name="VK_OBJECT_TYPE_FENCE"/>
<enum value="8" name="VK_OBJECT_TYPE_DEVICE_MEMORY"/>
<enum value="9" name="VK_OBJECT_TYPE_BUFFER"/>
<enum value="10" name="VK_OBJECT_TYPE_IMAGE"/>
<enum value="11" name="VK_OBJECT_TYPE_EVENT"/>
<enum value="12" name="VK_OBJECT_TYPE_QUERY_POOL"/>
<enum value="13" name="VK_OBJECT_TYPE_BUFFER_VIEW"/>
<enum value="14" name="VK_OBJECT_TYPE_IMAGE_VIEW"/>
<enum value="15" name="VK_OBJECT_TYPE_SHADER_MODULE"/>
<enum value="16" name="VK_OBJECT_TYPE_PIPELINE_CACHE"/>
<enum value="17" name="VK_OBJECT_TYPE_PIPELINE_LAYOUT"/>
<enum value="18" name="VK_OBJECT_TYPE_RENDER_PASS"/>
<enum value="19" name="VK_OBJECT_TYPE_PIPELINE"/>
<enum value="20" name="VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT"/>
<enum value="21" name="VK_OBJECT_TYPE_SAMPLER"/>
<enum value="22" name="VK_OBJECT_TYPE_DESCRIPTOR_POOL"/>
<enum value="23" name="VK_OBJECT_TYPE_DESCRIPTOR_SET"/>
<enum value="24" name="VK_OBJECT_TYPE_FRAMEBUFFER"/>
<enum value="25" name="VK_OBJECT_TYPE_COMMAND_POOL"/>
</enums>
<comment>Flags</comment>
<enums name="VkQueueFlagBits" type="bitmask">
<enum bitpos="0" name="VK_QUEUE_GRAPHICS_BIT" comment="Queue supports graphics operations"/>
<enum bitpos="1" name="VK_QUEUE_COMPUTE_BIT" comment="Queue supports compute operations"/>
<enum bitpos="2" name="VK_QUEUE_TRANSFER_BIT" comment="Queue supports transfer operations"/>
<enum bitpos="3" name="VK_QUEUE_SPARSE_BINDING_BIT" comment="Queue supports sparse resource memory management operations"/>
</enums>
<enums name="VkCullModeFlagBits" type="bitmask">
<enum value="0" name="VK_CULL_MODE_NONE"/>
<enum bitpos="0" name="VK_CULL_MODE_FRONT_BIT"/>
<enum bitpos="1" name="VK_CULL_MODE_BACK_BIT"/>
<enum value="0x00000003" name="VK_CULL_MODE_FRONT_AND_BACK"/>
</enums>
<enums name="VkRenderPassCreateFlagBits" type="bitmask"></enums>
<enums name="VkDeviceQueueCreateFlagBits" type="bitmask"></enums>
<enums name="VkMemoryPropertyFlagBits" type="bitmask">
<enum bitpos="0" name="VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT" comment="If otherwise stated, then allocate memory on device"/>
<enum bitpos="1" name="VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT" comment="Memory is mappable by host"/>
<enum bitpos="2" name="VK_MEMORY_PROPERTY_HOST_COHERENT_BIT" comment="Memory will have i/o coherency. If not set, application may need to use vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges to flush/invalidate host cache"/>
<enum bitpos="3" name="VK_MEMORY_PROPERTY_HOST_CACHED_BIT" comment="Memory will be cached by the host"/>
<enum bitpos="4" name="VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT" comment="Memory may be allocated by the driver when it is required"/>
</enums>
<enums name="VkMemoryHeapFlagBits" type="bitmask">
<enum bitpos="0" name="VK_MEMORY_HEAP_DEVICE_LOCAL_BIT" comment="If set, heap represents device memory"/>
</enums>
<enums name="VkAccessFlagBits" type="bitmask">
<enum bitpos="0" name="VK_ACCESS_INDIRECT_COMMAND_READ_BIT" comment="Controls coherency of indirect command reads"/>
<enum bitpos="1" name="VK_ACCESS_INDEX_READ_BIT" comment="Controls coherency of index reads"/>
<enum bitpos="2" name="VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT" comment="Controls coherency of vertex attribute reads"/>
<enum bitpos="3" name="VK_ACCESS_UNIFORM_READ_BIT" comment="Controls coherency of uniform buffer reads"/>
<enum bitpos="4" name="VK_ACCESS_INPUT_ATTACHMENT_READ_BIT" comment="Controls coherency of input attachment reads"/>
<enum bitpos="5" name="VK_ACCESS_SHADER_READ_BIT" comment="Controls coherency of shader reads"/>
<enum bitpos="6" name="VK_ACCESS_SHADER_WRITE_BIT" comment="Controls coherency of shader writes"/>
<enum bitpos="7" name="VK_ACCESS_COLOR_ATTACHMENT_READ_BIT" comment="Controls coherency of color attachment reads"/>
<enum bitpos="8" name="VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT" comment="Controls coherency of color attachment writes"/>
<enum bitpos="9" name="VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT" comment="Controls coherency of depth/stencil attachment reads"/>
<enum bitpos="10" name="VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT" comment="Controls coherency of depth/stencil attachment writes"/>
<enum bitpos="11" name="VK_ACCESS_TRANSFER_READ_BIT" comment="Controls coherency of transfer reads"/>
<enum bitpos="12" name="VK_ACCESS_TRANSFER_WRITE_BIT" comment="Controls coherency of transfer writes"/>
<enum bitpos="13" name="VK_ACCESS_HOST_READ_BIT" comment="Controls coherency of host reads"/>
<enum bitpos="14" name="VK_ACCESS_HOST_WRITE_BIT" comment="Controls coherency of host writes"/>
<enum bitpos="15" name="VK_ACCESS_MEMORY_READ_BIT" comment="Controls coherency of memory reads"/>
<enum bitpos="16" name="VK_ACCESS_MEMORY_WRITE_BIT" comment="Controls coherency of memory writes"/>
</enums>
<enums name="VkBufferUsageFlagBits" type="bitmask">
<enum bitpos="0" name="VK_BUFFER_USAGE_TRANSFER_SRC_BIT" comment="Can be used as a source of transfer operations"/>
<enum bitpos="1" name="VK_BUFFER_USAGE_TRANSFER_DST_BIT" comment="Can be used as a destination of transfer operations"/>
<enum bitpos="2" name="VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT" comment="Can be used as TBO"/>
<enum bitpos="3" name="VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT" comment="Can be used as IBO"/>
<enum bitpos="4" name="VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT" comment="Can be used as UBO"/>
<enum bitpos="5" name="VK_BUFFER_USAGE_STORAGE_BUFFER_BIT" comment="Can be used as SSBO"/>
<enum bitpos="6" name="VK_BUFFER_USAGE_INDEX_BUFFER_BIT" comment="Can be used as source of fixed-function index fetch (index buffer)"/>
<enum bitpos="7" name="VK_BUFFER_USAGE_VERTEX_BUFFER_BIT" comment="Can be used as source of fixed-function vertex fetch (VBO)"/>
<enum bitpos="8" name="VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT" comment="Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer)"/>
</enums>
<enums name="VkBufferCreateFlagBits" type="bitmask">
<enum bitpos="0" name="VK_BUFFER_CREATE_SPARSE_BINDING_BIT" comment="Buffer should support sparse backing"/>
<enum bitpos="1" name="VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT" comment="Buffer should support sparse backing with partial residency"/>
<enum bitpos="2" name="VK_BUFFER_CREATE_SPARSE_ALIASED_BIT" comment="Buffer should support constant data access to physical memory ranges mapped into multiple locations of sparse buffers"/>
</enums>
<enums name="VkShaderStageFlagBits" type="bitmask">
<enum bitpos="0" name="VK_SHADER_STAGE_VERTEX_BIT"/>
<enum bitpos="1" name="VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT"/>
<enum bitpos="2" name="VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT"/>
<enum bitpos="3" name="VK_SHADER_STAGE_GEOMETRY_BIT"/>
<enum bitpos="4" name="VK_SHADER_STAGE_FRAGMENT_BIT"/>
<enum bitpos="5" name="VK_SHADER_STAGE_COMPUTE_BIT"/>
<enum value="0x0000001F" name="VK_SHADER_STAGE_ALL_GRAPHICS"/>
<enum value="0x7FFFFFFF" name="VK_SHADER_STAGE_ALL"/>
</enums>
<enums name="VkImageUsageFlagBits" type="bitmask">
<enum bitpos="0" name="VK_IMAGE_USAGE_TRANSFER_SRC_BIT" comment="Can be used as a source of transfer operations"/>
<enum bitpos="1" name="VK_IMAGE_USAGE_TRANSFER_DST_BIT" comment="Can be used as a destination of transfer operations"/>
<enum bitpos="2" name="VK_IMAGE_USAGE_SAMPLED_BIT" comment="Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"/>
<enum bitpos="3" name="VK_IMAGE_USAGE_STORAGE_BIT" comment="Can be used as storage image (STORAGE_IMAGE descriptor type)"/>
<enum bitpos="4" name="VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT" comment="Can be used as framebuffer color attachment"/>
<enum bitpos="5" name="VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" comment="Can be used as framebuffer depth/stencil attachment"/>
<enum bitpos="6" name="VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT" comment="Image data not needed outside of rendering"/>
<enum bitpos="7" name="VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT" comment="Can be used as framebuffer input attachment"/>
</enums>
<enums name="VkImageCreateFlagBits" type="bitmask">
<enum bitpos="0" name="VK_IMAGE_CREATE_SPARSE_BINDING_BIT" comment="Image should support sparse backing"/>
<enum bitpos="1" name="VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT" comment="Image should support sparse backing with partial residency"/>
<enum bitpos="2" name="VK_IMAGE_CREATE_SPARSE_ALIASED_BIT" comment="Image should support constant data access to physical memory ranges mapped into multiple locations of sparse images"/>
<enum bitpos="3" name="VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT" comment="Allows image views to have different format than the base image"/>
<enum bitpos="4" name="VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT" comment="Allows creating image views with cube type from the created image"/>
</enums>
<enums name="VkImageViewCreateFlagBits" type="bitmask">
</enums>
<enums name="VkSamplerCreateFlagBits" type="bitmask">
</enums>
<enums name="VkPipelineCreateFlagBits" type="bitmask" comment="Note that the gap at bitpos 10 is unused, and can be reserved">
<enum bitpos="0" name="VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT"/>
<enum bitpos="1" name="VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT"/>
<enum bitpos="2" name="VK_PIPELINE_CREATE_DERIVATIVE_BIT"/>
</enums>
<enums name="VkPipelineShaderStageCreateFlagBits" type="bitmask">
</enums>
<enums name="VkColorComponentFlagBits" type="bitmask">
<enum bitpos="0" name="VK_COLOR_COMPONENT_R_BIT"/>
<enum bitpos="1" name="VK_COLOR_COMPONENT_G_BIT"/>
<enum bitpos="2" name="VK_COLOR_COMPONENT_B_BIT"/>
<enum bitpos="3" name="VK_COLOR_COMPONENT_A_BIT"/>
</enums>
<enums name="VkFenceCreateFlagBits" type="bitmask">
<enum bitpos="0" name="VK_FENCE_CREATE_SIGNALED_BIT"/>
</enums>
<comment>When VkSemaphoreCreateFlagBits is first extended, need to add a bitmask enums tag for it here</comment>
<enums name="VkFormatFeatureFlagBits" type="bitmask">
<enum bitpos="0" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT" comment="Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types)"/>
<enum bitpos="1" name="VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" comment="Format can be used for storage images (STORAGE_IMAGE descriptor type)"/>
<enum bitpos="2" name="VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT" comment="Format supports atomic operations in case it is used for storage images"/>
<enum bitpos="3" name="VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT" comment="Format can be used for uniform texel buffers (TBOs)"/>
<enum bitpos="4" name="VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT" comment="Format can be used for storage texel buffers (IBOs)"/>
<enum bitpos="5" name="VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" comment="Format supports atomic operations in case it is used for storage texel buffers"/>
<enum bitpos="6" name="VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" comment="Format can be used for vertex buffers (VBOs)"/>
<enum bitpos="7" name="VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT" comment="Format can be used for color attachment images"/>
<enum bitpos="8" name="VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" comment="Format supports blending in case it is used for color attachment images"/>
<enum bitpos="9" name="VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT" comment="Format can be used for depth/stencil attachment images"/>
<enum bitpos="10" name="VK_FORMAT_FEATURE_BLIT_SRC_BIT" comment="Format can be used as the source image of blits with vkCmdBlitImage"/>
<enum bitpos="11" name="VK_FORMAT_FEATURE_BLIT_DST_BIT" comment="Format can be used as the destination image of blits with vkCmdBlitImage"/>
<enum bitpos="12" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT" comment="Format can be filtered with VK_FILTER_LINEAR when being sampled"/>
</enums>
<enums name="VkQueryControlFlagBits" type="bitmask">
<enum bitpos="0" name="VK_QUERY_CONTROL_PRECISE_BIT" comment="Require precise results to be collected by the query"/>
</enums>
<enums name="VkQueryResultFlagBits" type="bitmask">
<enum bitpos="0" name="VK_QUERY_RESULT_64_BIT" comment="Results of the queries are written to the destination buffer as 64-bit values"/>
<enum bitpos="1" name="VK_QUERY_RESULT_WAIT_BIT" comment="Results of the queries are waited on before proceeding with the result copy"/>
<enum bitpos="2" name="VK_QUERY_RESULT_WITH_AVAILABILITY_BIT" comment="Besides the results of the query, the availability of the results is also written"/>
<enum bitpos="3" name="VK_QUERY_RESULT_PARTIAL_BIT" comment="Copy the partial results of the query even if the final results are not available"/>
</enums>
<enums name="VkCommandBufferUsageFlagBits" type="bitmask">
<enum bitpos="0" name="VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT"/>
<enum bitpos="1" name="VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT"/>
<enum bitpos="2" name="VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT" comment="Command buffer may be submitted/executed more than once simultaneously"/>
</enums>
<enums name="VkQueryPipelineStatisticFlagBits" type="bitmask">
<enum bitpos="0" name="VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT" comment="Optional"/>
<enum bitpos="1" name="VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT" comment="Optional"/>
<enum bitpos="2" name="VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT" comment="Optional"/>
<enum bitpos="3" name="VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT" comment="Optional"/>
<enum bitpos="4" name="VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT" comment="Optional"/>
<enum bitpos="5" name="VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT" comment="Optional"/>
<enum bitpos="6" name="VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT" comment="Optional"/>
<enum bitpos="7" name="VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT" comment="Optional"/>
<enum bitpos="8" name="VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT" comment="Optional"/>
<enum bitpos="9" name="VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT" comment="Optional"/>
<enum bitpos="10" name="VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT" comment="Optional"/>
</enums>
<enums name="VkImageAspectFlagBits" type="bitmask">
<enum bitpos="0" name="VK_IMAGE_ASPECT_COLOR_BIT"/>
<enum bitpos="1" name="VK_IMAGE_ASPECT_DEPTH_BIT"/>
<enum bitpos="2" name="VK_IMAGE_ASPECT_STENCIL_BIT"/>
<enum bitpos="3" name="VK_IMAGE_ASPECT_METADATA_BIT"/>
</enums>
<enums name="VkSparseImageFormatFlagBits" type="bitmask">
<enum bitpos="0" name="VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT" comment="Image uses a single mip tail region for all array layers"/>
<enum bitpos="1" name="VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT" comment="Image requires mip level dimensions to be an integer multiple of the sparse image block dimensions for non-tail mip levels."/>
<enum bitpos="2" name="VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT" comment="Image uses a non-standard sparse image block dimensions"/>
</enums>
<enums name="VkSparseMemoryBindFlagBits" type="bitmask">
<enum bitpos="0" name="VK_SPARSE_MEMORY_BIND_METADATA_BIT" comment="Operation binds resource metadata to memory"/>
</enums>
<enums name="VkPipelineStageFlagBits" type="bitmask">
<enum bitpos="0" name="VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT" comment="Before subsequent commands are processed"/>
<enum bitpos="1" name="VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT" comment="Draw/DispatchIndirect command fetch"/>
<enum bitpos="2" name="VK_PIPELINE_STAGE_VERTEX_INPUT_BIT" comment="Vertex/index fetch"/>
<enum bitpos="3" name="VK_PIPELINE_STAGE_VERTEX_SHADER_BIT" comment="Vertex shading"/>
<enum bitpos="4" name="VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT" comment="Tessellation control shading"/>
<enum bitpos="5" name="VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT" comment="Tessellation evaluation shading"/>
<enum bitpos="6" name="VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT" comment="Geometry shading"/>
<enum bitpos="7" name="VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT" comment="Fragment shading"/>
<enum bitpos="8" name="VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT" comment="Early fragment (depth and stencil) tests"/>
<enum bitpos="9" name="VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT" comment="Late fragment (depth and stencil) tests"/>
<enum bitpos="10" name="VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT" comment="Color attachment writes"/>
<enum bitpos="11" name="VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT" comment="Compute shading"/>
<enum bitpos="12" name="VK_PIPELINE_STAGE_TRANSFER_BIT" comment="Transfer/copy operations"/>
<enum bitpos="13" name="VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT" comment="After previous commands have completed"/>
<enum bitpos="14" name="VK_PIPELINE_STAGE_HOST_BIT" comment="Indicates host (CPU) is a source/sink of the dependency"/>
<enum bitpos="15" name="VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT" comment="All stages of the graphics pipeline"/>
<enum bitpos="16" name="VK_PIPELINE_STAGE_ALL_COMMANDS_BIT" comment="All stages supported on the queue"/>
</enums>
<enums name="VkCommandPoolCreateFlagBits" type="bitmask">
<enum bitpos="0" name="VK_COMMAND_POOL_CREATE_TRANSIENT_BIT" comment="Command buffers have a short lifetime"/>
<enum bitpos="1" name="VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT" comment="Command buffers may release their memory individually"/>
</enums>
<enums name="VkCommandPoolResetFlagBits" type="bitmask">
<enum bitpos="0" name="VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT" comment="Release resources owned by the pool"/>
</enums>
<enums name="VkCommandBufferResetFlagBits" type="bitmask">
<enum bitpos="0" name="VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT" comment="Release resources owned by the buffer"/>
</enums>
<enums name="VkSampleCountFlagBits" type="bitmask">
<enum bitpos="0" name="VK_SAMPLE_COUNT_1_BIT" comment="Sample count 1 supported"/>
<enum bitpos="1" name="VK_SAMPLE_COUNT_2_BIT" comment="Sample count 2 supported"/>
<enum bitpos="2" name="VK_SAMPLE_COUNT_4_BIT" comment="Sample count 4 supported"/>
<enum bitpos="3" name="VK_SAMPLE_COUNT_8_BIT" comment="Sample count 8 supported"/>
<enum bitpos="4" name="VK_SAMPLE_COUNT_16_BIT" comment="Sample count 16 supported"/>
<enum bitpos="5" name="VK_SAMPLE_COUNT_32_BIT" comment="Sample count 32 supported"/>
<enum bitpos="6" name="VK_SAMPLE_COUNT_64_BIT" comment="Sample count 64 supported"/>
</enums>
<enums name="VkAttachmentDescriptionFlagBits" type="bitmask">
<enum bitpos="0" name="VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT" comment="The attachment may alias physical memory of another attachment in the same render pass"/>
</enums>
<enums name="VkStencilFaceFlagBits" type="bitmask">
<enum bitpos="0" name="VK_STENCIL_FACE_FRONT_BIT" comment="Front face"/>
<enum bitpos="1" name="VK_STENCIL_FACE_BACK_BIT" comment="Back face"/>
<enum value="0x00000003" name="VK_STENCIL_FACE_FRONT_AND_BACK" comment="Front and back faces"/>
<enum name="VK_STENCIL_FRONT_AND_BACK" alias="VK_STENCIL_FACE_FRONT_AND_BACK" comment="Alias for backwards compatibility"/>
</enums>
<enums name="VkDescriptorPoolCreateFlagBits" type="bitmask">
<enum bitpos="0" name="VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT" comment="Descriptor sets may be freed individually"/>
</enums>
<enums name="VkDependencyFlagBits" type="bitmask">
<enum bitpos="0" name="VK_DEPENDENCY_BY_REGION_BIT" comment="Dependency is per pixel region "/>
</enums>
<enums name="VkSemaphoreType" type="enum">
<enum value="0" name="VK_SEMAPHORE_TYPE_BINARY"/>
<enum value="1" name="VK_SEMAPHORE_TYPE_TIMELINE"/>
</enums>
<enums name="VkSemaphoreWaitFlagBits" type="bitmask">
<enum bitpos="0" name="VK_SEMAPHORE_WAIT_ANY_BIT"/>
</enums>
<comment>WSI Extensions</comment>
<enums name="VkPresentModeKHR" type="enum">
<enum value="0" name="VK_PRESENT_MODE_IMMEDIATE_KHR"/>
<enum value="1" name="VK_PRESENT_MODE_MAILBOX_KHR"/>
<enum value="2" name="VK_PRESENT_MODE_FIFO_KHR"/>
<enum value="3" name="VK_PRESENT_MODE_FIFO_RELAXED_KHR"/>
</enums>
<enums name="VkColorSpaceKHR" type="enum">
<enum value="0" name="VK_COLOR_SPACE_SRGB_NONLINEAR_KHR"/>
<enum name="VK_COLORSPACE_SRGB_NONLINEAR_KHR" alias="VK_COLOR_SPACE_SRGB_NONLINEAR_KHR" comment="Backwards-compatible alias containing a typo"/>
</enums>
<enums name="VkDisplayPlaneAlphaFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR"/>
<enum bitpos="1" name="VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR"/>
<enum bitpos="2" name="VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR"/>
<enum bitpos="3" name="VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR"/>
</enums>
<enums name="VkCompositeAlphaFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR"/>
<enum bitpos="1" name="VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR"/>
<enum bitpos="2" name="VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR"/>
<enum bitpos="3" name="VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR"/>
</enums>
<enums name="VkSurfaceTransformFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR"/>
<enum bitpos="1" name="VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR"/>
<enum bitpos="2" name="VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR"/>
<enum bitpos="3" name="VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR"/>
<enum bitpos="4" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR"/>
<enum bitpos="5" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR"/>
<enum bitpos="6" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR"/>
<enum bitpos="7" name="VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR"/>
<enum bitpos="8" name="VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR"/>
</enums>
<enums name="VkSwapchainImageUsageFlagBitsANDROID" type="bitmask">
<enum bitpos="0" name="VK_SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_ANDROID"/>
</enums>
<enums name="VkTimeDomainEXT" type="enum">
<enum value="0" name="VK_TIME_DOMAIN_DEVICE_EXT"/>
<enum value="1" name="VK_TIME_DOMAIN_CLOCK_MONOTONIC_EXT"/>
<enum value="2" name="VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT"/>
<enum value="3" name="VK_TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT"/>
</enums>
<enums name="VkDebugReportFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_DEBUG_REPORT_INFORMATION_BIT_EXT"/>
<enum bitpos="1" name="VK_DEBUG_REPORT_WARNING_BIT_EXT"/>
<enum bitpos="2" name="VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT"/>
<enum bitpos="3" name="VK_DEBUG_REPORT_ERROR_BIT_EXT"/>
<enum bitpos="4" name="VK_DEBUG_REPORT_DEBUG_BIT_EXT"/>
</enums>
<enums name="VkDebugReportObjectTypeEXT" type="enum">
<enum value="0" name="VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT"/>
<enum value="1" name="VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT"/>
<enum value="2" name="VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT"/>
<enum value="3" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT"/>
<enum value="4" name="VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT"/>
<enum value="5" name="VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT"/>
<enum value="6" name="VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT"/>
<enum value="7" name="VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT"/>
<enum value="8" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT"/>
<enum value="9" name="VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT"/>
<enum value="10" name="VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT"/>
<enum value="11" name="VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT"/>
<enum value="12" name="VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT"/>
<enum value="13" name="VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT"/>
<enum value="14" name="VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT"/>
<enum value="15" name="VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT"/>
<enum value="16" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT"/>
<enum value="17" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT"/>
<enum value="18" name="VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT"/>
<enum value="19" name="VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT"/>
<enum value="20" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT"/>
<enum value="21" name="VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT"/>
<enum value="22" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT"/>
<enum value="23" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT"/>
<enum value="24" name="VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT"/>
<enum value="25" name="VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT"/>
<enum value="26" name="VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT"/>
<enum value="27" name="VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT"/>
<enum value="28" name="VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT"/>
<enum name="VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT" alias="VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT" comment="Backwards-compatible alias containing a typo"/>
<enum value="29" name="VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT"/>
<enum value="30" name="VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT"/>
<!--<enum value="31" name="VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT" comment="Removed NVX_device_generated_commands"/>-->
<!--<enum value="32" name="VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT" comment="Removed NVX_device_generated_commands"/>-->
<enum value="33" name="VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT"/>
<enum name="VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT" alias="VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT" comment="Backwards-compatible alias containing a typo"/>
</enums>
<enums name="VkDeviceMemoryReportEventTypeEXT" type="enum">
<enum value="0" name="VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT"/>
<enum value="1" name="VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT"/>
<enum value="2" name="VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT"/>
<enum value="3" name="VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT"/>
<enum value="4" name="VK_DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT"/>
</enums>
<enums name="VkRasterizationOrderAMD" type="enum">
<enum value="0" name="VK_RASTERIZATION_ORDER_STRICT_AMD"/>
<enum value="1" name="VK_RASTERIZATION_ORDER_RELAXED_AMD"/>
</enums>
<enums name="VkExternalMemoryHandleTypeFlagBitsNV" type="bitmask">
<enum bitpos="0" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV"/>
<enum bitpos="1" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV"/>
<enum bitpos="2" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV"/>
<enum bitpos="3" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV"/>
</enums>
<enums name="VkExternalMemoryFeatureFlagBitsNV" type="bitmask">
<enum bitpos="0" name="VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV"/>
<enum bitpos="1" name="VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV"/>
<enum bitpos="2" name="VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV"/>
</enums>
<enums name="VkValidationCheckEXT" type="enum">
<enum value="0" name="VK_VALIDATION_CHECK_ALL_EXT"/>
<enum value="1" name="VK_VALIDATION_CHECK_SHADERS_EXT"/>
</enums>
<enums name="VkValidationFeatureEnableEXT" type="enum">
<enum value="0" name="VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT"/>
<enum value="1" name="VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT"/>
<enum value="2" name="VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT"/>
<enum value="3" name="VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT"/>
<enum value="4" name="VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT"/>
</enums>
<enums name="VkValidationFeatureDisableEXT" type="enum">
<enum value="0" name="VK_VALIDATION_FEATURE_DISABLE_ALL_EXT"/>
<enum value="1" name="VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT"/>
<enum value="2" name="VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT"/>
<enum value="3" name="VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT"/>
<enum value="4" name="VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT"/>
<enum value="5" name="VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT"/>
<enum value="6" name="VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT"/>
</enums>
<enums name="VkSubgroupFeatureFlagBits" type="bitmask">
<enum bitpos="0" name="VK_SUBGROUP_FEATURE_BASIC_BIT" comment="Basic subgroup operations"/>
<enum bitpos="1" name="VK_SUBGROUP_FEATURE_VOTE_BIT" comment="Vote subgroup operations"/>
<enum bitpos="2" name="VK_SUBGROUP_FEATURE_ARITHMETIC_BIT" comment="Arithmetic subgroup operations"/>
<enum bitpos="3" name="VK_SUBGROUP_FEATURE_BALLOT_BIT" comment="Ballot subgroup operations"/>
<enum bitpos="4" name="VK_SUBGROUP_FEATURE_SHUFFLE_BIT" comment="Shuffle subgroup operations"/>
<enum bitpos="5" name="VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT" comment="Shuffle relative subgroup operations"/>
<enum bitpos="6" name="VK_SUBGROUP_FEATURE_CLUSTERED_BIT" comment="Clustered subgroup operations"/>
<enum bitpos="7" name="VK_SUBGROUP_FEATURE_QUAD_BIT" comment="Quad subgroup operations"/>
</enums>
<enums name="VkIndirectCommandsLayoutUsageFlagBitsNV" type="bitmask">
<enum bitpos="0" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV"/>
<enum bitpos="1" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV"/>
<enum bitpos="2" name="VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV"/>
</enums>
<enums name="VkIndirectStateFlagBitsNV" type="bitmask">
<enum bitpos="0" name="VK_INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV"/>
</enums>
<enums name="VkIndirectCommandsTokenTypeNV" type="enum">
<enum value="0" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV"/>
<enum value="1" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV"/>
<enum value="2" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV"/>
<enum value="3" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV"/>
<enum value="4" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV"/>
<enum value="5" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV"/>
<enum value="6" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV"/>
<enum value="7" name="VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV"/>
</enums>
<enums name="VkPrivateDataSlotCreateFlagBitsEXT" type="bitmask">
</enums>
<enums name="VkDescriptorSetLayoutCreateFlagBits" type="bitmask">
</enums>
<enums name="VkExternalMemoryHandleTypeFlagBits" type="bitmask">
<enum bitpos="0" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT"/>
<enum bitpos="1" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT"/>
<enum bitpos="2" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"/>
<enum bitpos="3" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT"/>
<enum bitpos="4" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT"/>
<enum bitpos="5" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT"/>
<enum bitpos="6" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT"/>
</enums>
<enums name="VkExternalMemoryFeatureFlagBits" type="bitmask">
<enum bitpos="0" name="VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT"/>
<enum bitpos="1" name="VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT"/>
<enum bitpos="2" name="VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT"/>
</enums>
<enums name="VkExternalSemaphoreHandleTypeFlagBits" type="bitmask">
<enum bitpos="0" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT"/>
<enum bitpos="1" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT"/>
<enum bitpos="2" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"/>
<enum bitpos="3" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT"/>
<enum name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT" alias="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT"/>
<enum bitpos="4" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT"/>
</enums>
<enums name="VkExternalSemaphoreFeatureFlagBits" type="bitmask">
<enum bitpos="0" name="VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT"/>
<enum bitpos="1" name="VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT"/>
</enums>
<enums name="VkSemaphoreImportFlagBits" type="bitmask">
<enum bitpos="0" name="VK_SEMAPHORE_IMPORT_TEMPORARY_BIT"/>
</enums>
<enums name="VkExternalFenceHandleTypeFlagBits" type="bitmask">
<enum bitpos="0" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT"/>
<enum bitpos="1" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT"/>
<enum bitpos="2" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"/>
<enum bitpos="3" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT"/>
</enums>
<enums name="VkExternalFenceFeatureFlagBits" type="bitmask">
<enum bitpos="0" name="VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT"/>
<enum bitpos="1" name="VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT"/>
</enums>
<enums name="VkFenceImportFlagBits" type="bitmask">
<enum bitpos="0" name="VK_FENCE_IMPORT_TEMPORARY_BIT"/>
</enums>
<enums name="VkSurfaceCounterFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_SURFACE_COUNTER_VBLANK_BIT_EXT"/>
<enum name="VK_SURFACE_COUNTER_VBLANK_EXT" alias="VK_SURFACE_COUNTER_VBLANK_BIT_EXT" comment="Backwards-compatible alias containing a typo"/>
</enums>
<enums name="VkDisplayPowerStateEXT" type="enum">
<enum value="0" name="VK_DISPLAY_POWER_STATE_OFF_EXT"/>
<enum value="1" name="VK_DISPLAY_POWER_STATE_SUSPEND_EXT"/>
<enum value="2" name="VK_DISPLAY_POWER_STATE_ON_EXT"/>
</enums>
<enums name="VkDeviceEventTypeEXT" type="enum">
<enum value="0" name="VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT"/>
</enums>
<enums name="VkDisplayEventTypeEXT" type="enum">
<enum value="0" name="VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT"/>
</enums>
<enums name="VkPeerMemoryFeatureFlagBits" type="bitmask">
<enum bitpos="0" name="VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT" comment="Can read with vkCmdCopy commands"/>
<enum bitpos="1" name="VK_PEER_MEMORY_FEATURE_COPY_DST_BIT" comment="Can write with vkCmdCopy commands"/>
<enum bitpos="2" name="VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT" comment="Can read with any access type/command"/>
<enum bitpos="3" name="VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT" comment="Can write with and access type/command"/>
</enums>
<enums name="VkMemoryAllocateFlagBits" type="bitmask">
<enum bitpos="0" name="VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT" comment="Force allocation on specific devices"/>
</enums>
<enums name="VkDeviceGroupPresentModeFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR" comment="Present from local memory"/>
<enum bitpos="1" name="VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR" comment="Present from remote memory"/>
<enum bitpos="2" name="VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR" comment="Present sum of local and/or remote memory"/>
<enum bitpos="3" name="VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR" comment="Each physical device presents from local memory"/>
</enums>
<enums name="VkSwapchainCreateFlagBitsKHR" type="bitmask">
</enums>
<enums name="VkViewportCoordinateSwizzleNV" type="enum">
<enum value="0" name="VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV"/>
<enum value="1" name="VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV"/>
<enum value="2" name="VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV"/>
<enum value="3" name="VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV"/>
<enum value="4" name="VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV"/>
<enum value="5" name="VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV"/>
<enum value="6" name="VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV"/>
<enum value="7" name="VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV"/>
</enums>
<enums name="VkDiscardRectangleModeEXT" type="enum">
<enum value="0" name="VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT"/>
<enum value="1" name="VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT"/>
</enums>
<enums name="VkSubpassDescriptionFlagBits" type="bitmask">
</enums>
<enums name="VkPointClippingBehavior" type="enum">
<enum value="0" name="VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES"/>
<enum value="1" name="VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY"/>
</enums>
<enums name="VkSamplerReductionMode" type="enum">
<enum value="0" name="VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE"/>
<enum value="1" name="VK_SAMPLER_REDUCTION_MODE_MIN"/>
<enum value="2" name="VK_SAMPLER_REDUCTION_MODE_MAX"/>
</enums>
<enums name="VkTessellationDomainOrigin" type="enum">
<enum value="0" name="VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT"/>
<enum value="1" name="VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT"/>
</enums>
<enums name="VkSamplerYcbcrModelConversion" type="enum">
<enum value="0" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY"/>
<enum value="1" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY" comment="just range expansion"/>
<enum value="2" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709" comment="aka HD YUV"/>
<enum value="3" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601" comment="aka SD YUV"/>
<enum value="4" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020" comment="aka UHD YUV"/>
</enums>
<enums name="VkSamplerYcbcrRange" type="enum">
<enum value="0" name="VK_SAMPLER_YCBCR_RANGE_ITU_FULL" comment="Luma 0..1 maps to 0..255, chroma -0.5..0.5 to 1..255 (clamped)"/>
<enum value="1" name="VK_SAMPLER_YCBCR_RANGE_ITU_NARROW" comment="Luma 0..1 maps to 16..235, chroma -0.5..0.5 to 16..240"/>
</enums>
<enums name="VkChromaLocation" type="enum">
<enum value="0" name="VK_CHROMA_LOCATION_COSITED_EVEN"/>
<enum value="1" name="VK_CHROMA_LOCATION_MIDPOINT"/>
</enums>
<enums name="VkBlendOverlapEXT" type="enum">
<enum value="0" name="VK_BLEND_OVERLAP_UNCORRELATED_EXT"/>
<enum value="1" name="VK_BLEND_OVERLAP_DISJOINT_EXT"/>
<enum value="2" name="VK_BLEND_OVERLAP_CONJOINT_EXT"/>
</enums>
<enums name="VkCoverageModulationModeNV" type="enum">
<enum value="0" name="VK_COVERAGE_MODULATION_MODE_NONE_NV"/>
<enum value="1" name="VK_COVERAGE_MODULATION_MODE_RGB_NV"/>
<enum value="2" name="VK_COVERAGE_MODULATION_MODE_ALPHA_NV"/>
<enum value="3" name="VK_COVERAGE_MODULATION_MODE_RGBA_NV"/>
</enums>
<enums name="VkCoverageReductionModeNV" type="enum">
<enum value="0" name="VK_COVERAGE_REDUCTION_MODE_MERGE_NV"/>
<enum value="1" name="VK_COVERAGE_REDUCTION_MODE_TRUNCATE_NV"/>
</enums>
<enums name="VkValidationCacheHeaderVersionEXT" type="enum">
<enum value="1" name="VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT"/>
</enums>
<enums name="VkShaderInfoTypeAMD" type="enum">
<enum value="0" name="VK_SHADER_INFO_TYPE_STATISTICS_AMD"/>
<enum value="1" name="VK_SHADER_INFO_TYPE_BINARY_AMD"/>
<enum value="2" name="VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD"/>
</enums>
<enums name="VkQueueGlobalPriorityEXT" type="enum">
<enum value="128" name="VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT"/>
<enum value="256" name="VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT"/>
<enum value="512" name="VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT"/>
<enum value="1024" name="VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT"/>
</enums>
<enums name="VkDebugUtilsMessageSeverityFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT"/>
<enum bitpos="4" name="VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT"/>
<enum bitpos="8" name="VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT"/>
<enum bitpos="12" name="VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT"/>
</enums>
<enums name="VkDebugUtilsMessageTypeFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT"/>
<enum bitpos="1" name="VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT"/>
<enum bitpos="2" name="VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT"/>
</enums>
<enums name="VkConservativeRasterizationModeEXT" type="enum">
<enum value="0" name="VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT"/>
<enum value="1" name="VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT"/>
<enum value="2" name="VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT"/>
</enums>
<enums name="VkDescriptorBindingFlagBits" type="bitmask">
<enum bitpos="0" name="VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT"/>
<enum bitpos="1" name="VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT"/>
<enum bitpos="2" name="VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT"/>
<enum bitpos="3" name="VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT"/>
</enums>
<enums name="VkVendorId" type="enum">
<comment>Vendor IDs are now represented as enums instead of the old
<vendorids> tag, allowing them to be included in the
API headers.</comment>
<enum value="0x10001" name="VK_VENDOR_ID_VIV" comment="Vivante vendor ID"/>
<enum value="0x10002" name="VK_VENDOR_ID_VSI" comment="VeriSilicon vendor ID"/>
<enum value="0x10003" name="VK_VENDOR_ID_KAZAN" comment="Kazan Software Renderer"/>
<enum value="0x10004" name="VK_VENDOR_ID_CODEPLAY" comment="Codeplay Software Ltd. vendor ID"/>
<enum value="0x10005" name="VK_VENDOR_ID_MESA" comment="Mesa vendor ID"/>
<enum value="0x10006" name="VK_VENDOR_ID_POCL" comment="PoCL vendor ID"/>
<unused start="0x10007" comment="This is the next unused available Khronos vendor ID"/>
</enums>
<enums name="VkDriverId" type="enum">
<comment>Driver IDs are now represented as enums instead of the old
<driverids> tag, allowing them to be included in the
API headers.</comment>
<enum value="1" name="VK_DRIVER_ID_AMD_PROPRIETARY" comment="Advanced Micro Devices, Inc."/>
<enum value="2" name="VK_DRIVER_ID_AMD_OPEN_SOURCE" comment="Advanced Micro Devices, Inc."/>
<enum value="3" name="VK_DRIVER_ID_MESA_RADV" comment="Mesa open source project"/>
<enum value="4" name="VK_DRIVER_ID_NVIDIA_PROPRIETARY" comment="NVIDIA Corporation"/>
<enum value="5" name="VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS" comment="Intel Corporation"/>
<enum value="6" name="VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA" comment="Intel Corporation"/>
<enum value="7" name="VK_DRIVER_ID_IMAGINATION_PROPRIETARY" comment="Imagination Technologies"/>
<enum value="8" name="VK_DRIVER_ID_QUALCOMM_PROPRIETARY" comment="Qualcomm Technologies, Inc."/>
<enum value="9" name="VK_DRIVER_ID_ARM_PROPRIETARY" comment="Arm Limited"/>
<enum value="10" name="VK_DRIVER_ID_GOOGLE_SWIFTSHADER" comment="Google LLC"/>
<enum value="11" name="VK_DRIVER_ID_GGP_PROPRIETARY" comment="Google LLC"/>
<enum value="12" name="VK_DRIVER_ID_BROADCOM_PROPRIETARY" comment="Broadcom Inc."/>
<enum value="13" name="VK_DRIVER_ID_MESA_LLVMPIPE" comment="Mesa"/>
<enum value="14" name="VK_DRIVER_ID_MOLTENVK" comment="MoltenVK"/>
<enum value="15" name="VK_DRIVER_ID_COREAVI_PROPRIETARY" comment="Core Avionics & Industrial Inc."/>
</enums>
<enums name="VkConditionalRenderingFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_CONDITIONAL_RENDERING_INVERTED_BIT_EXT"/>
</enums>
<enums name="VkResolveModeFlagBits" type="bitmask">
<enum value="0" name="VK_RESOLVE_MODE_NONE"/>
<enum bitpos="0" name="VK_RESOLVE_MODE_SAMPLE_ZERO_BIT"/>
<enum bitpos="1" name="VK_RESOLVE_MODE_AVERAGE_BIT"/>
<enum bitpos="2" name="VK_RESOLVE_MODE_MIN_BIT"/>
<enum bitpos="3" name="VK_RESOLVE_MODE_MAX_BIT"/>
</enums>
<enums name="VkShadingRatePaletteEntryNV" type="enum">
<enum value="0" name="VK_SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV"/>
<enum value="1" name="VK_SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV"/>
<enum value="2" name="VK_SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV"/>
<enum value="3" name="VK_SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV"/>
<enum value="4" name="VK_SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV"/>
<enum value="5" name="VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV"/>
<enum value="6" name="VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV"/>
<enum value="7" name="VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV"/>
<enum value="8" name="VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV"/>
<enum value="9" name="VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV"/>
<enum value="10" name="VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV"/>
<enum value="11" name="VK_SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV"/>
</enums>
<enums name="VkCoarseSampleOrderTypeNV" type="enum">
<enum value="0" name="VK_COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV"/>
<enum value="1" name="VK_COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV"/>
<enum value="2" name="VK_COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV"/>
<enum value="3" name="VK_COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV"/>
</enums>
<enums name="VkGeometryInstanceFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR"/>
<enum bitpos="1" name="VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR"/>
<enum bitpos="2" name="VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR"/>
<enum bitpos="3" name="VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR"/>
</enums>
<enums name="VkGeometryFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_GEOMETRY_OPAQUE_BIT_KHR"/>
<enum bitpos="1" name="VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR"/>
</enums>
<enums name="VkBuildAccelerationStructureFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR"/>
<enum bitpos="1" name="VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR"/>
<enum bitpos="2" name="VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR"/>
<enum bitpos="3" name="VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR"/>
<enum bitpos="4" name="VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR"/>
</enums>
<enums name="VkAccelerationStructureCreateFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR"/>
</enums>
<enums name="VkCopyAccelerationStructureModeKHR" type="enum">
<enum value="0" name="VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR"/>
<enum value="1" name="VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR"/>
<enum value="2" name="VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR"/>
<enum value="3" name="VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR"/>
</enums>
<enums name="VkBuildAccelerationStructureModeKHR" type="enum">
<enum value="0" name="VK_BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR"/>
<enum value="1" name="VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR"/>
</enums>
<enums name="VkAccelerationStructureTypeKHR" type="enum">
<enum value="0" name="VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR"/>
<enum value="1" name="VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR"/>
<enum value="2" name="VK_ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR"/>
</enums>
<enums name="VkGeometryTypeKHR" type="enum">
<enum value="0" name="VK_GEOMETRY_TYPE_TRIANGLES_KHR"/>
<enum value="1" name="VK_GEOMETRY_TYPE_AABBS_KHR"/>
<enum value="2" name="VK_GEOMETRY_TYPE_INSTANCES_KHR"/>
</enums>
<enums name="VkAccelerationStructureMemoryRequirementsTypeNV" type="enum">
<enum value="0" name="VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV"/>
<enum value="1" name="VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV"/>
<enum value="2" name="VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV"/>
</enums>
<enums name="VkAccelerationStructureBuildTypeKHR" type="enum">
<enum value="0" name="VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR"/>
<enum value="1" name="VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR"/>
<enum value="2" name="VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR"/>
</enums>
<enums name="VkRayTracingShaderGroupTypeKHR" type="enum">
<enum value="0" name="VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR"/>
<enum value="1" name="VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR"/>
<enum value="2" name="VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR"/>
</enums>
<enums name="VkAccelerationStructureCompatibilityKHR" type="enum">
<enum value="0" name="VK_ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR"/>
<enum value="1" name="VK_ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR"/>
</enums>
<enums name="VkShaderGroupShaderKHR" type="enum">
<enum value="0" name="VK_SHADER_GROUP_SHADER_GENERAL_KHR"/>
<enum value="1" name="VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR"/>
<enum value="2" name="VK_SHADER_GROUP_SHADER_ANY_HIT_KHR"/>
<enum value="3" name="VK_SHADER_GROUP_SHADER_INTERSECTION_KHR"/>
</enums>
<enums name="VkMemoryOverallocationBehaviorAMD" type="enum">
<enum value="0" name="VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD"/>
<enum value="1" name="VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD"/>
<enum value="2" name="VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD"/>
</enums>
<enums name="VkFramebufferCreateFlagBits" type="bitmask">
</enums>
<enums name="VkScopeNV" type="enum">
<enum value="1" name="VK_SCOPE_DEVICE_NV"/>
<enum value="2" name="VK_SCOPE_WORKGROUP_NV"/>
<enum value="3" name="VK_SCOPE_SUBGROUP_NV"/>
<enum value="5" name="VK_SCOPE_QUEUE_FAMILY_NV"/>
</enums>
<enums name="VkComponentTypeNV" type="enum">
<enum value="0" name="VK_COMPONENT_TYPE_FLOAT16_NV"/>
<enum value="1" name="VK_COMPONENT_TYPE_FLOAT32_NV"/>
<enum value="2" name="VK_COMPONENT_TYPE_FLOAT64_NV"/>
<enum value="3" name="VK_COMPONENT_TYPE_SINT8_NV"/>
<enum value="4" name="VK_COMPONENT_TYPE_SINT16_NV"/>
<enum value="5" name="VK_COMPONENT_TYPE_SINT32_NV"/>
<enum value="6" name="VK_COMPONENT_TYPE_SINT64_NV"/>
<enum value="7" name="VK_COMPONENT_TYPE_UINT8_NV"/>
<enum value="8" name="VK_COMPONENT_TYPE_UINT16_NV"/>
<enum value="9" name="VK_COMPONENT_TYPE_UINT32_NV"/>
<enum value="10" name="VK_COMPONENT_TYPE_UINT64_NV"/>
</enums>
<enums name="VkDeviceDiagnosticsConfigFlagBitsNV" type="bitmask">
<enum bitpos="0" name="VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV"/>
<enum bitpos="1" name="VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV"/>
<enum bitpos="2" name="VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV"/>
</enums>
<enums name="VkPipelineCreationFeedbackFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_PIPELINE_CREATION_FEEDBACK_VALID_BIT_EXT"/>
<enum bitpos="1" name="VK_PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT"/>
<enum bitpos="2" name="VK_PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BIT_EXT"/>
</enums>
<enums name="VkFullScreenExclusiveEXT" type="enum">
<enum value="0" name="VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT"/>
<enum value="1" name="VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT"/>
<enum value="2" name="VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT"/>
<enum value="3" name="VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT"/>
</enums>
<enums name="VkPerformanceCounterScopeKHR" type="enum">
<enum value="0" name="VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR"/>
<enum value="1" name="VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR"/>
<enum value="2" name="VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR"/>
<enum name="VK_QUERY_SCOPE_COMMAND_BUFFER_KHR" alias="VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR"/>
<enum name="VK_QUERY_SCOPE_RENDER_PASS_KHR" alias="VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR"/>
<enum name="VK_QUERY_SCOPE_COMMAND_KHR" alias="VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR"/>
</enums>
<enums name="VkPerformanceCounterUnitKHR" type="enum">
<enum value="0" name="VK_PERFORMANCE_COUNTER_UNIT_GENERIC_KHR"/>
<enum value="1" name="VK_PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR"/>
<enum value="2" name="VK_PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR"/>
<enum value="3" name="VK_PERFORMANCE_COUNTER_UNIT_BYTES_KHR"/>
<enum value="4" name="VK_PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR"/>
<enum value="5" name="VK_PERFORMANCE_COUNTER_UNIT_KELVIN_KHR"/>
<enum value="6" name="VK_PERFORMANCE_COUNTER_UNIT_WATTS_KHR"/>
<enum value="7" name="VK_PERFORMANCE_COUNTER_UNIT_VOLTS_KHR"/>
<enum value="8" name="VK_PERFORMANCE_COUNTER_UNIT_AMPS_KHR"/>
<enum value="9" name="VK_PERFORMANCE_COUNTER_UNIT_HERTZ_KHR"/>
<enum value="10" name="VK_PERFORMANCE_COUNTER_UNIT_CYCLES_KHR"/>
</enums>
<enums name="VkPerformanceCounterStorageKHR" type="enum">
<enum value="0" name="VK_PERFORMANCE_COUNTER_STORAGE_INT32_KHR"/>
<enum value="1" name="VK_PERFORMANCE_COUNTER_STORAGE_INT64_KHR"/>
<enum value="2" name="VK_PERFORMANCE_COUNTER_STORAGE_UINT32_KHR"/>
<enum value="3" name="VK_PERFORMANCE_COUNTER_STORAGE_UINT64_KHR"/>
<enum value="4" name="VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR"/>
<enum value="5" name="VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR"/>
</enums>
<enums name="VkPerformanceCounterDescriptionFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR"/>
<enum name="VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR" alias="VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR" comment="Backwards-compatible alias containing a typo"/>
<enum bitpos="1" name="VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR"/>
<enum name="VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR" alias="VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR" comment="Backwards-compatible alias containing a typo"/>
</enums>
<enums name="VkAcquireProfilingLockFlagBitsKHR" type="bitmask">
</enums>
<enums name="VkShaderCorePropertiesFlagBitsAMD" type="bitmask">
</enums>
<enums name="VkPerformanceConfigurationTypeINTEL" type="enum">
<enum value="0" name="VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL"/>
</enums>
<enums name="VkQueryPoolSamplingModeINTEL" type="enum">
<enum value="0" name="VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL"/>
</enums>
<enums name="VkPerformanceOverrideTypeINTEL" type="enum">
<enum value="0" name="VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL"/>
<enum value="1" name="VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL"/>
</enums>
<enums name="VkPerformanceParameterTypeINTEL" type="enum">
<enum value="0" name="VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL"/>
<enum value="1" name="VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL"/>
</enums>
<enums name="VkPerformanceValueTypeINTEL" type="enum">
<enum value="0" name="VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL"/>
<enum value="1" name="VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL"/>
<enum value="2" name="VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL"/>
<enum value="3" name="VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL"/>
<enum value="4" name="VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL"/>
</enums>
<enums name="VkShaderFloatControlsIndependence" type="enum">
<enum value="0" name="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY"/>
<enum value="1" name="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL"/>
<enum value="2" name="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE"/>
</enums>
<enums name="VkPipelineExecutableStatisticFormatKHR" type="enum">
<enum value="0" name="VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR"/>
<enum value="1" name="VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR"/>
<enum value="2" name="VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR"/>
<enum value="3" name="VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR"/>
</enums>
<enums name="VkLineRasterizationModeEXT" type="enum">
<enum value="0" name="VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT"/>
<enum value="1" name="VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT"/>
<enum value="2" name="VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT"/>
<enum value="3" name="VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT"/>
</enums>
<enums name="VkShaderModuleCreateFlagBits" type="bitmask">
</enums>
<enums name="VkPipelineCompilerControlFlagBitsAMD" type="bitmask">
</enums>
<enums name="VkToolPurposeFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_TOOL_PURPOSE_VALIDATION_BIT_EXT"/>
<enum bitpos="1" name="VK_TOOL_PURPOSE_PROFILING_BIT_EXT"/>
<enum bitpos="2" name="VK_TOOL_PURPOSE_TRACING_BIT_EXT"/>
<enum bitpos="3" name="VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT"/>
<enum bitpos="4" name="VK_TOOL_PURPOSE_MODIFYING_FEATURES_BIT_EXT"/>
</enums>
<enums name="VkFragmentShadingRateCombinerOpKHR" type="enum">
<enum value="0" name="VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR"/>
<enum value="1" name="VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR"/>
<enum value="2" name="VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR"/>
<enum value="3" name="VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR"/>
<enum value="4" name="VK_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR"/>
</enums>
<enums name="VkFragmentShadingRateNV" type="enum">
<enum value="0" name="VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV"/>
<enum value="1" name="VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV"/>
<enum value="4" name="VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV"/>
<enum value="5" name="VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV"/>
<enum value="6" name="VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV"/>
<enum value="9" name="VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV"/>
<enum value="10" name="VK_FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV"/>
<enum value="11" name="VK_FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV"/>
<enum value="12" name="VK_FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV"/>
<enum value="13" name="VK_FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV"/>
<enum value="14" name="VK_FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV"/>
<enum value="15" name="VK_FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV"/>
</enums>
<enums name="VkFragmentShadingRateTypeNV" type="enum">
<enum value="0" name="VK_FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV"/>
<enum value="1" name="VK_FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV"/>
</enums>
<enums name="VkAccessFlagBits2KHR" type="bitmask" bitwidth="64">
<enum value="0" name="VK_ACCESS_2_NONE_KHR"/>
<enum bitpos="0" name="VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR"/>
<enum bitpos="1" name="VK_ACCESS_2_INDEX_READ_BIT_KHR"/>
<enum bitpos="2" name="VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR"/>
<enum bitpos="3" name="VK_ACCESS_2_UNIFORM_READ_BIT_KHR"/>
<enum bitpos="4" name="VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR"/>
<enum bitpos="5" name="VK_ACCESS_2_SHADER_READ_BIT_KHR"/>
<enum bitpos="6" name="VK_ACCESS_2_SHADER_WRITE_BIT_KHR"/>
<enum bitpos="7" name="VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR"/>
<enum bitpos="8" name="VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR"/>
<enum bitpos="9" name="VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR"/>
<enum bitpos="10" name="VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR"/>
<enum bitpos="11" name="VK_ACCESS_2_TRANSFER_READ_BIT_KHR"/>
<enum bitpos="12" name="VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR"/>
<enum bitpos="13" name="VK_ACCESS_2_HOST_READ_BIT_KHR"/>
<enum bitpos="14" name="VK_ACCESS_2_HOST_WRITE_BIT_KHR"/>
<enum bitpos="15" name="VK_ACCESS_2_MEMORY_READ_BIT_KHR"/>
<enum bitpos="16" name="VK_ACCESS_2_MEMORY_WRITE_BIT_KHR"/>
<!-- bitpos 17-31 are specified by extensions to the original VkAccessFlagBits enum -->
<enum bitpos="32" name="VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR"/>
<enum bitpos="33" name="VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR"/>
<enum bitpos="34" name="VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR"/>
</enums>
<enums name="VkPipelineStageFlagBits2KHR" type="bitmask" bitwidth="64">
<enum value="0" name="VK_PIPELINE_STAGE_2_NONE_KHR"/>
<enum bitpos="0" name="VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR"/>
<enum bitpos="1" name="VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR"/>
<enum bitpos="2" name="VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR"/>
<enum bitpos="3" name="VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR"/>
<enum bitpos="4" name="VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR"/>
<enum bitpos="5" name="VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR"/>
<enum bitpos="6" name="VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR"/>
<enum bitpos="7" name="VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR"/>
<enum bitpos="8" name="VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR"/>
<enum bitpos="9" name="VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR"/>
<enum bitpos="10" name="VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR"/>
<enum bitpos="11" name="VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR"/>
<enum bitpos="12" name="VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR"/>
<enum name="VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR" alias="VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR"/>
<enum bitpos="13" name="VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR"/>
<enum bitpos="14" name="VK_PIPELINE_STAGE_2_HOST_BIT_KHR"/>
<enum bitpos="15" name="VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR"/>
<enum bitpos="16" name="VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR"/>
<!-- bitpos 17-31 are specified by extensions to the original VkPipelineStageFlagBits enum -->
<enum bitpos="32" name="VK_PIPELINE_STAGE_2_COPY_BIT_KHR"/>
<enum bitpos="33" name="VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR"/>
<enum bitpos="34" name="VK_PIPELINE_STAGE_2_BLIT_BIT_KHR"/>
<enum bitpos="35" name="VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR"/>
<enum bitpos="36" name="VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR"/>
<enum bitpos="37" name="VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR"/>
<enum bitpos="38" name="VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR"/>
</enums>
<enums name="VkSubmitFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_SUBMIT_PROTECTED_BIT_KHR"/>
</enums>
<enums name="VkEventCreateFlagBits" type="bitmask">
</enums>
<enums name="VkVideoCodecOperationFlagBitsKHR" type="bitmask">
<enum value="0" name="VK_VIDEO_CODEC_OPERATION_INVALID_BIT_KHR"/>
</enums>
<enums name="VkVideoChromaSubsamplingFlagBitsKHR" type="bitmask" comment="Vulkan video chroma subsampling definitions">
<enum value="0" name="VK_VIDEO_CHROMA_SUBSAMPLING_INVALID_BIT_KHR"/>
<enum bitpos="0" name="VK_VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR"/>
<enum bitpos="1" name="VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR"/>
<enum bitpos="2" name="VK_VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR"/>
<enum bitpos="3" name="VK_VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR"/>
</enums>
<enums name="VkVideoComponentBitDepthFlagBitsKHR" type="bitmask" comment="Vulkan video component bit depth definitions">
<enum value="0" name="VK_VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR"/>
<enum bitpos="0" name="VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR"/>
<enum bitpos="2" name="VK_VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR"/>
<enum bitpos="4" name="VK_VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR"/>
</enums>
<enums name="VkVideoCapabilitiesFlagBitsKHR" type="bitmask">
<enum bitpos="0" name="VK_VIDEO_CAPABILITIES_PROTECTED_CONTENT_BIT_KHR"/>
<enum bitpos="1" name="VK_VIDEO_CAPABILITIES_SEPARATE_REFERENCE_IMAGES_BIT_KHR"/>
</enums>
<enums name="VkVideoSessionCreateFlagBitsKHR" type="bitmask">
<enum value="0" name="VK_VIDEO_SESSION_CREATE_DEFAULT_KHR"/>
<enum bitpos="0" name="VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR"/>
</enums>
<enums name="VkVideoCodingQualityPresetFlagBitsKHR" type="bitmask">
<enum value="0" name="VK_VIDEO_CODING_QUALITY_PRESET_DEFAULT_BIT_KHR"/>
<enum bitpos="0" name="VK_VIDEO_CODING_QUALITY_PRESET_NORMAL_BIT_KHR"/>
<enum bitpos="1" name="VK_VIDEO_CODING_QUALITY_PRESET_POWER_BIT_KHR"/>
<enum bitpos="2" name="VK_VIDEO_CODING_QUALITY_PRESET_QUALITY_BIT_KHR"/>
</enums>
<enums name="VkVideoDecodeH264FieldLayoutFlagBitsEXT" type="bitmask">
<enum value="0" name="VK_VIDEO_DECODE_H264_PROGRESSIVE_PICTURES_ONLY_EXT"/>
<enum bitpos="0" name="VK_VIDEO_DECODE_H264_FIELD_LAYOUT_LINE_INTERLACED_PLANE_BIT_EXT"/>
<enum bitpos="1" name="VK_VIDEO_DECODE_H264_FIELD_LAYOUT_SEPARATE_INTERLACED_PLANE_BIT_EXT"/>
</enums>
<enums name="VkVideoCodingControlFlagBitsKHR" type="bitmask">
<enum value="0" name="VK_VIDEO_CODING_CONTROL_DEFAULT_KHR"/>
<enum bitpos="0" name="VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR"/>
</enums>
<enums name="VkQueryResultStatusKHR" type="enum">
<enum value="-1" name="VK_QUERY_RESULT_STATUS_ERROR_KHR"/>
<enum value="0" name="VK_QUERY_RESULT_STATUS_NOT_READY_KHR"/>
<enum value="1" name="VK_QUERY_RESULT_STATUS_COMPLETE_KHR"/>
</enums>
<enums name="VkVideoDecodeFlagBitsKHR" type="bitmask">
<enum value="0" name="VK_VIDEO_DECODE_DEFAULT_KHR"/>
<enum bitpos="0" name="VK_VIDEO_DECODE_RESERVED_0_BIT_KHR"/>
</enums>
<enums name="VkVideoEncodeFlagBitsKHR" type="bitmask">
<enum value="0" name="VK_VIDEO_ENCODE_DEFAULT_KHR"/>
<enum bitpos="0" name="VK_VIDEO_ENCODE_RESERVED_0_BIT_KHR"/>
</enums>
<enums name="VkVideoEncodeRateControlFlagBitsKHR" type="bitmask">
<enum value="0" name="VK_VIDEO_ENCODE_RATE_CONTROL_DEFAULT_KHR"/>
<enum bitpos="0" name="VK_VIDEO_ENCODE_RATE_CONTROL_RESET_BIT_KHR"/>
</enums>
<enums name="VkVideoEncodeRateControlModeFlagBitsKHR" type="bitmask">
<enum value="0" name="VK_VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR"/>
<enum value="1" name="VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR"/>
<enum value="2" name="VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR"/>
</enums>
<enums name="VkVideoEncodeH264CapabilitiesFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT"/>
<enum bitpos="1" name="VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT"/>
<enum bitpos="2" name="VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BI_PRED_IMPLICIT_BIT_EXT"/>
<enum bitpos="3" name="VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT"/>
<enum bitpos="4" name="VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT"/>
<enum bitpos="5" name="VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT"/>
<enum bitpos="6" name="VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT"/>
<enum bitpos="7" name="VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT"/>
<enum bitpos="8" name="VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT"/>
<enum bitpos="9" name="VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT"/>
<enum bitpos="10" name="VK_VIDEO_ENCODE_H264_CAPABILITY_EVENLY_DISTRIBUTED_SLICE_SIZE_BIT_EXT"/>
</enums>
<enums name="VkVideoEncodeH264InputModeFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT"/>
<enum bitpos="1" name="VK_VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT"/>
<enum bitpos="2" name="VK_VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT"/>
</enums>
<enums name="VkVideoEncodeH264OutputModeFlagBitsEXT" type="bitmask">
<enum bitpos="0" name="VK_VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT"/>
<enum bitpos="1" name="VK_VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT"/>
<enum bitpos="2" name="VK_VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT"/>
</enums>
<enums name="VkVideoEncodeH264CreateFlagBitsEXT" type="bitmask">
<enum value="0" name="VK_VIDEO_ENCODE_H264_CREATE_DEFAULT_EXT"/>
<enum bitpos="0" name="VK_VIDEO_ENCODE_H264_CREATE_RESERVED_0_BIT_EXT"/>
</enums>
<commands comment="Vulkan command definitions">
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_LAYER_NOT_PRESENT,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_INCOMPATIBLE_DRIVER">
<proto><type>VkResult</type> <name>vkCreateInstance</name></proto>
<param>const <type>VkInstanceCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkInstance</type>* <name>pInstance</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyInstance</name></proto>
<param optional="true" externsync="true"><type>VkInstance</type> <name>instance</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<implicitexternsyncparams>
<param>all sname:VkPhysicalDevice objects enumerated from pname:instance</param>
</implicitexternsyncparams>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkEnumeratePhysicalDevices</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPhysicalDeviceCount</name></param>
<param optional="true" len="pPhysicalDeviceCount"><type>VkPhysicalDevice</type>* <name>pPhysicalDevices</name></param>
</command>
<command>
<proto><type>PFN_vkVoidFunction</type> <name>vkGetDeviceProcAddr</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param len="null-terminated">const <type>char</type>* <name>pName</name></param>
</command>
<command>
<proto><type>PFN_vkVoidFunction</type> <name>vkGetInstanceProcAddr</name></proto>
<param optional="true"><type>VkInstance</type> <name>instance</name></param>
<param len="null-terminated">const <type>char</type>* <name>pName</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkPhysicalDeviceProperties</type>* <name>pProperties</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceQueueFamilyProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pQueueFamilyPropertyCount</name></param>
<param optional="true" len="pQueueFamilyPropertyCount"><type>VkQueueFamilyProperties</type>* <name>pQueueFamilyProperties</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceMemoryProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkPhysicalDeviceMemoryProperties</type>* <name>pMemoryProperties</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceFeatures</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkPhysicalDeviceFeatures</type>* <name>pFeatures</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceFormatProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkFormat</type> <name>format</name></param>
<param><type>VkFormatProperties</type>* <name>pFormatProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceImageFormatProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkFormat</type> <name>format</name></param>
<param><type>VkImageType</type> <name>type</name></param>
<param><type>VkImageTiling</type> <name>tiling</name></param>
<param><type>VkImageUsageFlags</type> <name>usage</name></param>
<param optional="true"><type>VkImageCreateFlags</type> <name>flags</name></param>
<param><type>VkImageFormatProperties</type>* <name>pImageFormatProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_FEATURE_NOT_PRESENT,VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkCreateDevice</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkDeviceCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDevice</type>* <name>pDevice</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyDevice</name></proto>
<param optional="true" externsync="true"><type>VkDevice</type> <name>device</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<implicitexternsyncparams>
<param>all sname:VkQueue objects received from pname:device</param>
</implicitexternsyncparams>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkEnumerateInstanceVersion</name></proto>
<param><type>uint32_t</type>* <name>pApiVersion</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkEnumerateInstanceLayerProperties</name></proto>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkLayerProperties</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_LAYER_NOT_PRESENT">
<proto><type>VkResult</type> <name>vkEnumerateInstanceExtensionProperties</name></proto>
<param optional="true" len="null-terminated">const <type>char</type>* <name>pLayerName</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkExtensionProperties</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkEnumerateDeviceLayerProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkLayerProperties</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_LAYER_NOT_PRESENT">
<proto><type>VkResult</type> <name>vkEnumerateDeviceExtensionProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="true" len="null-terminated">const <type>char</type>* <name>pLayerName</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkExtensionProperties</type>* <name>pProperties</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetDeviceQueue</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param><type>uint32_t</type> <name>queueIndex</name></param>
<param><type>VkQueue</type>* <name>pQueue</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkQueueSubmit</name></proto>
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
<param optional="true"><type>uint32_t</type> <name>submitCount</name></param>
<param len="submitCount">const <type>VkSubmitInfo</type>* <name>pSubmits</name></param>
<param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkQueueWaitIdle</name></proto>
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkDeviceWaitIdle</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<implicitexternsyncparams>
<param>all sname:VkQueue objects created from pname:device</param>
</implicitexternsyncparams>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
<proto><type>VkResult</type> <name>vkAllocateMemory</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkMemoryAllocateInfo</type>* <name>pAllocateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDeviceMemory</type>* <name>pMemory</name></param>
</command>
<command>
<proto><type>void</type> <name>vkFreeMemory</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_MEMORY_MAP_FAILED">
<proto><type>VkResult</type> <name>vkMapMemory</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
<param><type>VkDeviceSize</type> <name>size</name></param>
<param optional="true"><type>VkMemoryMapFlags</type> <name>flags</name></param>
<param optional="false,true"><type>void</type>** <name>ppData</name></param>
</command>
<command>
<proto><type>void</type> <name>vkUnmapMemory</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkFlushMappedMemoryRanges</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>memoryRangeCount</name></param>
<param len="memoryRangeCount">const <type>VkMappedMemoryRange</type>* <name>pMemoryRanges</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkInvalidateMappedMemoryRanges</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>memoryRangeCount</name></param>
<param len="memoryRangeCount">const <type>VkMappedMemoryRange</type>* <name>pMemoryRanges</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetDeviceMemoryCommitment</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDeviceMemory</type> <name>memory</name></param>
<param><type>VkDeviceSize</type>* <name>pCommittedMemoryInBytes</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetBufferMemoryRequirements</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
<proto><type>VkResult</type> <name>vkBindBufferMemory</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceMemory</type> <name>memory</name></param>
<param><type>VkDeviceSize</type> <name>memoryOffset</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetImageMemoryRequirements</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkImage</type> <name>image</name></param>
<param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkBindImageMemory</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkImage</type> <name>image</name></param>
<param><type>VkDeviceMemory</type> <name>memory</name></param>
<param><type>VkDeviceSize</type> <name>memoryOffset</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetImageSparseMemoryRequirements</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkImage</type> <name>image</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pSparseMemoryRequirementCount</name></param>
<param optional="true" len="pSparseMemoryRequirementCount"><type>VkSparseImageMemoryRequirements</type>* <name>pSparseMemoryRequirements</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceSparseImageFormatProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkFormat</type> <name>format</name></param>
<param><type>VkImageType</type> <name>type</name></param>
<param><type>VkSampleCountFlagBits</type> <name>samples</name></param>
<param><type>VkImageUsageFlags</type> <name>usage</name></param>
<param><type>VkImageTiling</type> <name>tiling</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkSparseImageFormatProperties</type>* <name>pProperties</name></param>
</command>
<command queues="sparse_binding" successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkQueueBindSparse</name></proto>
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
<param optional="true"><type>uint32_t</type> <name>bindInfoCount</name></param>
<param len="bindInfoCount" externsync="pBindInfo[].pBufferBinds[].buffer,pBindInfo[].pImageOpaqueBinds[].image,pBindInfo[].pImageBinds[].image">const <type>VkBindSparseInfo</type>* <name>pBindInfo</name></param>
<param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateFence</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkFenceCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkFence</type>* <name>pFence</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyFence</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkResetFences</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>fenceCount</name></param>
<param len="fenceCount" externsync="true">const <type>VkFence</type>* <name>pFences</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_NOT_READY" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkGetFenceStatus</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkFence</type> <name>fence</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_TIMEOUT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkWaitForFences</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>fenceCount</name></param>
<param len="fenceCount">const <type>VkFence</type>* <name>pFences</name></param>
<param><type>VkBool32</type> <name>waitAll</name></param>
<param><type>uint64_t</type> <name>timeout</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateSemaphore</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkSemaphoreCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSemaphore</type>* <name>pSemaphore</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroySemaphore</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateEvent</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkEventCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkEvent</type>* <name>pEvent</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyEvent</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkEvent</type> <name>event</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_EVENT_SET,VK_EVENT_RESET" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkGetEventStatus</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkEvent</type> <name>event</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkSetEvent</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkEvent</type> <name>event</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkResetEvent</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkEvent</type> <name>event</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateQueryPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkQueryPoolCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkQueryPool</type>* <name>pQueryPool</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyQueryPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkQueryPool</type> <name>queryPool</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_NOT_READY" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkGetQueryPoolResults</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>firstQuery</name></param>
<param><type>uint32_t</type> <name>queryCount</name></param>
<param><type>size_t</type> <name>dataSize</name></param>
<param len="dataSize"><type>void</type>* <name>pData</name></param>
<param><type>VkDeviceSize</type> <name>stride</name></param>
<param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param>
</command>
<command>
<proto><type>void</type> <name>vkResetQueryPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>firstQuery</name></param>
<param><type>uint32_t</type> <name>queryCount</name></param>
</command>
<command name="vkResetQueryPoolEXT" alias="vkResetQueryPool"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
<proto><type>VkResult</type> <name>vkCreateBuffer</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkBufferCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkBuffer</type>* <name>pBuffer</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyBuffer</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkBuffer</type> <name>buffer</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateBufferView</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkBufferViewCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkBufferView</type>* <name>pView</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyBufferView</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkBufferView</type> <name>bufferView</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateImage</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImageCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkImage</type>* <name>pImage</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyImage</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkImage</type> <name>image</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetImageSubresourceLayout</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkImage</type> <name>image</name></param>
<param>const <type>VkImageSubresource</type>* <name>pSubresource</name></param>
<param><type>VkSubresourceLayout</type>* <name>pLayout</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateImageView</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImageViewCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkImageView</type>* <name>pView</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyImageView</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkImageView</type> <name>imageView</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV">
<proto><type>VkResult</type> <name>vkCreateShaderModule</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkShaderModuleCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkShaderModule</type>* <name>pShaderModule</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyShaderModule</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkShaderModule</type> <name>shaderModule</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreatePipelineCache</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkPipelineCacheCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkPipelineCache</type>* <name>pPipelineCache</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyPipelineCache</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPipelineCacheData</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkPipelineCache</type> <name>pipelineCache</name></param>
<param optional="false,true"><type>size_t</type>* <name>pDataSize</name></param>
<param optional="true" len="pDataSize"><type>void</type>* <name>pData</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkMergePipelineCaches</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkPipelineCache</type> <name>dstCache</name></param>
<param><type>uint32_t</type> <name>srcCacheCount</name></param>
<param len="srcCacheCount">const <type>VkPipelineCache</type>* <name>pSrcCaches</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_PIPELINE_COMPILE_REQUIRED_EXT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV">
<proto><type>VkResult</type> <name>vkCreateGraphicsPipelines</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param>
<param><type>uint32_t</type> <name>createInfoCount</name></param>
<param len="createInfoCount">const <type>VkGraphicsPipelineCreateInfo</type>* <name>pCreateInfos</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_PIPELINE_COMPILE_REQUIRED_EXT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV">
<proto><type>VkResult</type> <name>vkCreateComputePipelines</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param>
<param><type>uint32_t</type> <name>createInfoCount</name></param>
<param len="createInfoCount">const <type>VkComputePipelineCreateInfo</type>* <name>pCreateInfos</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyPipeline</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkPipeline</type> <name>pipeline</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreatePipelineLayout</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkPipelineLayoutCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkPipelineLayout</type>* <name>pPipelineLayout</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyPipelineLayout</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkPipelineLayout</type> <name>pipelineLayout</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateSampler</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkSamplerCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSampler</type>* <name>pSampler</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroySampler</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkSampler</type> <name>sampler</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateDescriptorSetLayout</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkDescriptorSetLayoutCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDescriptorSetLayout</type>* <name>pSetLayout</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyDescriptorSetLayout</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkDescriptorSetLayout</type> <name>descriptorSetLayout</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FRAGMENTATION_EXT">
<proto><type>VkResult</type> <name>vkCreateDescriptorPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkDescriptorPoolCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDescriptorPool</type>* <name>pDescriptorPool</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyDescriptorPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS">
<proto><type>VkResult</type> <name>vkResetDescriptorPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param>
<param optional="true"><type>VkDescriptorPoolResetFlags</type> <name>flags</name></param>
<implicitexternsyncparams>
<param>any sname:VkDescriptorSet objects allocated from pname:descriptorPool</param>
</implicitexternsyncparams>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FRAGMENTED_POOL,VK_ERROR_OUT_OF_POOL_MEMORY">
<proto><type>VkResult</type> <name>vkAllocateDescriptorSets</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="pAllocateInfo->descriptorPool">const <type>VkDescriptorSetAllocateInfo</type>* <name>pAllocateInfo</name></param>
<param len="pAllocateInfo->descriptorSetCount"><type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param>
</command>
<command successcodes="VK_SUCCESS">
<proto><type>VkResult</type> <name>vkFreeDescriptorSets</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param>
<param><type>uint32_t</type> <name>descriptorSetCount</name></param>
<param noautovalidity="true" externsync="true" len="descriptorSetCount">const <type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param>
</command>
<command>
<proto><type>void</type> <name>vkUpdateDescriptorSets</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>uint32_t</type> <name>descriptorWriteCount</name></param>
<param len="descriptorWriteCount" externsync="pDescriptorWrites[].dstSet">const <type>VkWriteDescriptorSet</type>* <name>pDescriptorWrites</name></param>
<param optional="true"><type>uint32_t</type> <name>descriptorCopyCount</name></param>
<param len="descriptorCopyCount" externsync="pDescriptorCopies[].dstSet">const <type>VkCopyDescriptorSet</type>* <name>pDescriptorCopies</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateFramebuffer</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkFramebufferCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkFramebuffer</type>* <name>pFramebuffer</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyFramebuffer</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkFramebuffer</type> <name>framebuffer</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateRenderPass</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkRenderPassCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkRenderPass</type>* <name>pRenderPass</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyRenderPass</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkRenderPass</type> <name>renderPass</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetRenderAreaGranularity</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkRenderPass</type> <name>renderPass</name></param>
<param><type>VkExtent2D</type>* <name>pGranularity</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateCommandPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkCommandPoolCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkCommandPool</type>* <name>pCommandPool</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyCommandPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkResetCommandPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param>
<param optional="true"><type>VkCommandPoolResetFlags</type> <name>flags</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkAllocateCommandBuffers</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="pAllocateInfo->commandPool">const <type>VkCommandBufferAllocateInfo</type>* <name>pAllocateInfo</name></param>
<param len="pAllocateInfo->commandBufferCount"><type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param>
</command>
<command>
<proto><type>void</type> <name>vkFreeCommandBuffers</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param>
<param><type>uint32_t</type> <name>commandBufferCount</name></param>
<param noautovalidity="true" externsync="true" len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkBeginCommandBuffer</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkCommandBufferBeginInfo</type>* <name>pBeginInfo</name></param>
<implicitexternsyncparams>
<param>the sname:VkCommandPool that pname:commandBuffer was allocated from</param>
</implicitexternsyncparams>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkEndCommandBuffer</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<implicitexternsyncparams>
<param>the sname:VkCommandPool that pname:commandBuffer was allocated from</param>
</implicitexternsyncparams>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkResetCommandBuffer</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param optional="true"><type>VkCommandBufferResetFlags</type> <name>flags</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBindPipeline</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param>
<param><type>VkPipeline</type> <name>pipeline</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetViewport</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstViewport</name></param>
<param><type>uint32_t</type> <name>viewportCount</name></param>
<param len="viewportCount">const <type>VkViewport</type>* <name>pViewports</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetScissor</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstScissor</name></param>
<param><type>uint32_t</type> <name>scissorCount</name></param>
<param len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetLineWidth</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>float</type> <name>lineWidth</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDepthBias</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>float</type> <name>depthBiasConstantFactor</name></param>
<param><type>float</type> <name>depthBiasClamp</name></param>
<param><type>float</type> <name>depthBiasSlopeFactor</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetBlendConstants</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>float</type> <name>blendConstants</name>[4]</param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDepthBounds</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>float</type> <name>minDepthBounds</name></param>
<param><type>float</type> <name>maxDepthBounds</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetStencilCompareMask</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkStencilFaceFlags</type> <name>faceMask</name></param>
<param><type>uint32_t</type> <name>compareMask</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetStencilWriteMask</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkStencilFaceFlags</type> <name>faceMask</name></param>
<param><type>uint32_t</type> <name>writeMask</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetStencilReference</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkStencilFaceFlags</type> <name>faceMask</name></param>
<param><type>uint32_t</type> <name>reference</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBindDescriptorSets</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param>
<param><type>VkPipelineLayout</type> <name>layout</name></param>
<param><type>uint32_t</type> <name>firstSet</name></param>
<param><type>uint32_t</type> <name>descriptorSetCount</name></param>
<param len="descriptorSetCount">const <type>VkDescriptorSet</type>* <name>pDescriptorSets</name></param>
<param optional="true"><type>uint32_t</type> <name>dynamicOffsetCount</name></param>
<param len="dynamicOffsetCount">const <type>uint32_t</type>* <name>pDynamicOffsets</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBindIndexBuffer</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
<param><type>VkIndexType</type> <name>indexType</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBindVertexBuffers</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstBinding</name></param>
<param><type>uint32_t</type> <name>bindingCount</name></param>
<param len="bindingCount" optional="false,true">const <type>VkBuffer</type>* <name>pBuffers</name></param>
<param len="bindingCount">const <type>VkDeviceSize</type>* <name>pOffsets</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDraw</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>vertexCount</name></param>
<param><type>uint32_t</type> <name>instanceCount</name></param>
<param><type>uint32_t</type> <name>firstVertex</name></param>
<param><type>uint32_t</type> <name>firstInstance</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawIndexed</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>indexCount</name></param>
<param><type>uint32_t</type> <name>instanceCount</name></param>
<param><type>uint32_t</type> <name>firstIndex</name></param>
<param><type>int32_t</type> <name>vertexOffset</name></param>
<param><type>uint32_t</type> <name>firstInstance</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawIndirect</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
<param><type>uint32_t</type> <name>drawCount</name></param>
<param><type>uint32_t</type> <name>stride</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawIndexedIndirect</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
<param><type>uint32_t</type> <name>drawCount</name></param>
<param><type>uint32_t</type> <name>stride</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="compute">
<proto><type>void</type> <name>vkCmdDispatch</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>groupCountX</name></param>
<param><type>uint32_t</type> <name>groupCountY</name></param>
<param><type>uint32_t</type> <name>groupCountZ</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="compute">
<proto><type>void</type> <name>vkCmdDispatchIndirect</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyBuffer</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>srcBuffer</name></param>
<param><type>VkBuffer</type> <name>dstBuffer</name></param>
<param><type>uint32_t</type> <name>regionCount</name></param>
<param len="regionCount">const <type>VkBufferCopy</type>* <name>pRegions</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyImage</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkImage</type> <name>srcImage</name></param>
<param><type>VkImageLayout</type> <name>srcImageLayout</name></param>
<param><type>VkImage</type> <name>dstImage</name></param>
<param><type>VkImageLayout</type> <name>dstImageLayout</name></param>
<param><type>uint32_t</type> <name>regionCount</name></param>
<param len="regionCount">const <type>VkImageCopy</type>* <name>pRegions</name></param>
</command>
<command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdBlitImage</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkImage</type> <name>srcImage</name></param>
<param><type>VkImageLayout</type> <name>srcImageLayout</name></param>
<param><type>VkImage</type> <name>dstImage</name></param>
<param><type>VkImageLayout</type> <name>dstImageLayout</name></param>
<param><type>uint32_t</type> <name>regionCount</name></param>
<param len="regionCount">const <type>VkImageBlit</type>* <name>pRegions</name></param>
<param><type>VkFilter</type> <name>filter</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyBufferToImage</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>srcBuffer</name></param>
<param><type>VkImage</type> <name>dstImage</name></param>
<param><type>VkImageLayout</type> <name>dstImageLayout</name></param>
<param><type>uint32_t</type> <name>regionCount</name></param>
<param len="regionCount">const <type>VkBufferImageCopy</type>* <name>pRegions</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyImageToBuffer</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkImage</type> <name>srcImage</name></param>
<param><type>VkImageLayout</type> <name>srcImageLayout</name></param>
<param><type>VkBuffer</type> <name>dstBuffer</name></param>
<param><type>uint32_t</type> <name>regionCount</name></param>
<param len="regionCount">const <type>VkBufferImageCopy</type>* <name>pRegions</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdUpdateBuffer</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>dstBuffer</name></param>
<param><type>VkDeviceSize</type> <name>dstOffset</name></param>
<param><type>VkDeviceSize</type> <name>dataSize</name></param>
<param len="dataSize">const <type>void</type>* <name>pData</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer" comment="transfer support is only available when VK_KHR_maintenance1 is enabled, as documented in valid usage language in the specification">
<proto><type>void</type> <name>vkCmdFillBuffer</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>dstBuffer</name></param>
<param><type>VkDeviceSize</type> <name>dstOffset</name></param>
<param><type>VkDeviceSize</type> <name>size</name></param>
<param><type>uint32_t</type> <name>data</name></param>
</command>
<command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdClearColorImage</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkImage</type> <name>image</name></param>
<param><type>VkImageLayout</type> <name>imageLayout</name></param>
<param noautovalidity="true">const <type>VkClearColorValue</type>* <name>pColor</name></param>
<param><type>uint32_t</type> <name>rangeCount</name></param>
<param len="rangeCount">const <type>VkImageSubresourceRange</type>* <name>pRanges</name></param>
</command>
<command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdClearDepthStencilImage</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkImage</type> <name>image</name></param>
<param><type>VkImageLayout</type> <name>imageLayout</name></param>
<param>const <type>VkClearDepthStencilValue</type>* <name>pDepthStencil</name></param>
<param><type>uint32_t</type> <name>rangeCount</name></param>
<param len="rangeCount">const <type>VkImageSubresourceRange</type>* <name>pRanges</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdClearAttachments</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>attachmentCount</name></param>
<param len="attachmentCount">const <type>VkClearAttachment</type>* <name>pAttachments</name></param>
<param><type>uint32_t</type> <name>rectCount</name></param>
<param len="rectCount">const <type>VkClearRect</type>* <name>pRects</name></param>
</command>
<command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdResolveImage</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkImage</type> <name>srcImage</name></param>
<param><type>VkImageLayout</type> <name>srcImageLayout</name></param>
<param><type>VkImage</type> <name>dstImage</name></param>
<param><type>VkImageLayout</type> <name>dstImageLayout</name></param>
<param><type>uint32_t</type> <name>regionCount</name></param>
<param len="regionCount">const <type>VkImageResolve</type>* <name>pRegions</name></param>
</command>
<command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetEvent</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkEvent</type> <name>event</name></param>
<param><type>VkPipelineStageFlags</type> <name>stageMask</name></param>
</command>
<command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdResetEvent</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkEvent</type> <name>event</name></param>
<param><type>VkPipelineStageFlags</type> <name>stageMask</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdWaitEvents</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>eventCount</name></param>
<param len="eventCount">const <type>VkEvent</type>* <name>pEvents</name></param>
<param optional="true"><type>VkPipelineStageFlags</type> <name>srcStageMask</name></param>
<param optional="true"><type>VkPipelineStageFlags</type> <name>dstStageMask</name></param>
<param optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></param>
<param len="memoryBarrierCount">const <type>VkMemoryBarrier</type>* <name>pMemoryBarriers</name></param>
<param optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></param>
<param len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier</type>* <name>pBufferMemoryBarriers</name></param>
<param optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></param>
<param len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier</type>* <name>pImageMemoryBarriers</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdPipelineBarrier</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineStageFlags</type> <name>srcStageMask</name></param>
<param><type>VkPipelineStageFlags</type> <name>dstStageMask</name></param>
<param optional="true"><type>VkDependencyFlags</type> <name>dependencyFlags</name></param>
<param optional="true"><type>uint32_t</type> <name>memoryBarrierCount</name></param>
<param len="memoryBarrierCount">const <type>VkMemoryBarrier</type>* <name>pMemoryBarriers</name></param>
<param optional="true"><type>uint32_t</type> <name>bufferMemoryBarrierCount</name></param>
<param len="bufferMemoryBarrierCount">const <type>VkBufferMemoryBarrier</type>* <name>pBufferMemoryBarriers</name></param>
<param optional="true"><type>uint32_t</type> <name>imageMemoryBarrierCount</name></param>
<param len="imageMemoryBarrierCount">const <type>VkImageMemoryBarrier</type>* <name>pImageMemoryBarriers</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBeginQuery</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>query</name></param>
<param optional="true"><type>VkQueryControlFlags</type> <name>flags</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdEndQuery</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>query</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBeginConditionalRenderingEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkConditionalRenderingBeginInfoEXT</type>* <name>pConditionalRenderingBegin</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdEndConditionalRenderingEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
</command>
<command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdResetQueryPool</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>firstQuery</name></param>
<param><type>uint32_t</type> <name>queryCount</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdWriteTimestamp</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineStageFlagBits</type> <name>pipelineStage</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>query</name></param>
</command>
<command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyQueryPoolResults</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>firstQuery</name></param>
<param><type>uint32_t</type> <name>queryCount</name></param>
<param><type>VkBuffer</type> <name>dstBuffer</name></param>
<param><type>VkDeviceSize</type> <name>dstOffset</name></param>
<param><type>VkDeviceSize</type> <name>stride</name></param>
<param optional="true"><type>VkQueryResultFlags</type> <name>flags</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdPushConstants</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineLayout</type> <name>layout</name></param>
<param><type>VkShaderStageFlags</type> <name>stageFlags</name></param>
<param><type>uint32_t</type> <name>offset</name></param>
<param><type>uint32_t</type> <name>size</name></param>
<param len="size">const <type>void</type>* <name>pValues</name></param>
</command>
<command queues="graphics" renderpass="outside" cmdbufferlevel="primary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdBeginRenderPass</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkRenderPassBeginInfo</type>* <name>pRenderPassBegin</name></param>
<param><type>VkSubpassContents</type> <name>contents</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdNextSubpass</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkSubpassContents</type> <name>contents</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdEndRenderPass</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary">
<proto><type>void</type> <name>vkCmdExecuteCommands</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>commandBufferCount</name></param>
<param len="commandBufferCount">const <type>VkCommandBuffer</type>* <name>pCommandBuffers</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
<proto><type>VkResult</type> <name>vkCreateAndroidSurfaceKHR</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkAndroidSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPropertiesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkDisplayPropertiesKHR</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPlanePropertiesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkDisplayPlanePropertiesKHR</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetDisplayPlaneSupportedDisplaysKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>planeIndex</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pDisplayCount</name></param>
<param optional="true" len="pDisplayCount"><type>VkDisplayKHR</type>* <name>pDisplays</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetDisplayModePropertiesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkDisplayModePropertiesKHR</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkCreateDisplayModeKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param externsync="true"><type>VkDisplayKHR</type> <name>display</name></param>
<param>const <type>VkDisplayModeCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDisplayModeKHR</type>* <name>pMode</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetDisplayPlaneCapabilitiesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param externsync="true"><type>VkDisplayModeKHR</type> <name>mode</name></param>
<param><type>uint32_t</type> <name>planeIndex</name></param>
<param><type>VkDisplayPlaneCapabilitiesKHR</type>* <name>pCapabilities</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateDisplayPlaneSurfaceKHR</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkDisplaySurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INCOMPATIBLE_DISPLAY_KHR,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkCreateSharedSwapchainsKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>swapchainCount</name></param>
<param len="swapchainCount" externsync="pCreateInfos[].surface,pCreateInfos[].oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfos</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param len="swapchainCount"><type>VkSwapchainKHR</type>* <name>pSwapchains</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroySurfaceKHR</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param optional="true" externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceSupportKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param><type>VkSurfaceKHR</type> <name>surface</name></param>
<param><type>VkBool32</type>* <name>pSupported</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkSurfaceKHR</type> <name>surface</name></param>
<param><type>VkSurfaceCapabilitiesKHR</type>* <name>pSurfaceCapabilities</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceFormatsKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkSurfaceKHR</type> <name>surface</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pSurfaceFormatCount</name></param>
<param optional="true" len="pSurfaceFormatCount"><type>VkSurfaceFormatKHR</type>* <name>pSurfaceFormats</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfacePresentModesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkSurfaceKHR</type> <name>surface</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPresentModeCount</name></param>
<param optional="true" len="pPresentModeCount"><type>VkPresentModeKHR</type>* <name>pPresentModes</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkCreateSwapchainKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="pCreateInfo->surface,pCreateInfo->oldSwapchain">const <type>VkSwapchainCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSwapchainKHR</type>* <name>pSwapchain</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroySwapchainKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetSwapchainImagesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pSwapchainImageCount</name></param>
<param optional="true" len="pSwapchainImageCount"><type>VkImage</type>* <name>pSwapchainImages</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
<proto><type>VkResult</type> <name>vkAcquireNextImageKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
<param><type>uint64_t</type> <name>timeout</name></param>
<param optional="true" externsync="true"><type>VkSemaphore</type> <name>semaphore</name></param>
<param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
<param><type>uint32_t</type>* <name>pImageIndex</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
<proto><type>VkResult</type> <name>vkQueuePresentKHR</name></proto>
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
<param externsync="pPresentInfo->pWaitSemaphores[],pPresentInfo->pSwapchains[]">const <type>VkPresentInfoKHR</type>* <name>pPresentInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
<proto><type>VkResult</type> <name>vkCreateViSurfaceNN</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkViSurfaceCreateInfoNN</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateWaylandSurfaceKHR</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkWaylandSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command>
<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWaylandPresentationSupportKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param>struct <type>wl_display</type>* <name>display</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateWin32SurfaceKHR</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkWin32SurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command>
<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceWin32PresentationSupportKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateXlibSurfaceKHR</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkXlibSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command>
<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXlibPresentationSupportKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param><type>Display</type>* <name>dpy</name></param>
<param><type>VisualID</type> <name>visualID</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateXcbSurfaceKHR</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkXcbSurfaceCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command>
<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceXcbPresentationSupportKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param><type>xcb_connection_t</type>* <name>connection</name></param>
<param><type>xcb_visualid_t</type> <name>visual_id</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateDirectFBSurfaceEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkDirectFBSurfaceCreateInfoEXT</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command>
<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceDirectFBPresentationSupportEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param><type>IDirectFB</type>* <name>dfb</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateImagePipeSurfaceFUCHSIA</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkImagePipeSurfaceCreateInfoFUCHSIA</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
<proto><type>VkResult</type> <name>vkCreateStreamDescriptorSurfaceGGP</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkStreamDescriptorSurfaceCreateInfoGGP</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateScreenSurfaceQNX</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkScreenSurfaceCreateInfoQNX</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command>
<proto><type>VkBool32</type> <name>vkGetPhysicalDeviceScreenPresentationSupportQNX</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param>struct <type>_screen_window</type>* <name>window</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCreateDebugReportCallbackEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkDebugReportCallbackCreateInfoEXT</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDebugReportCallbackEXT</type>* <name>pCallback</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyDebugReportCallbackEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param optional="true" externsync="true"><type>VkDebugReportCallbackEXT</type> <name>callback</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDebugReportMessageEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param><type>VkDebugReportFlagsEXT</type> <name>flags</name></param>
<param><type>VkDebugReportObjectTypeEXT</type> <name>objectType</name></param>
<param><type>uint64_t</type> <name>object</name></param>
<param><type>size_t</type> <name>location</name></param>
<param><type>int32_t</type> <name>messageCode</name></param>
<param len="null-terminated">const <type>char</type>* <name>pLayerPrefix</name></param>
<param len="null-terminated">const <type>char</type>* <name>pMessage</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkDebugMarkerSetObjectNameEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="pNameInfo->object">const <type>VkDebugMarkerObjectNameInfoEXT</type>* <name>pNameInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkDebugMarkerSetObjectTagEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="pTagInfo->object">const <type>VkDebugMarkerObjectTagInfoEXT</type>* <name>pTagInfo</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdDebugMarkerBeginEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkDebugMarkerMarkerInfoEXT</type>* <name>pMarkerInfo</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdDebugMarkerEndEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdDebugMarkerInsertEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkDebugMarkerMarkerInfoEXT</type>* <name>pMarkerInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceExternalImageFormatPropertiesNV</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkFormat</type> <name>format</name></param>
<param><type>VkImageType</type> <name>type</name></param>
<param><type>VkImageTiling</type> <name>tiling</name></param>
<param><type>VkImageUsageFlags</type> <name>usage</name></param>
<param optional="true"><type>VkImageCreateFlags</type> <name>flags</name></param>
<param optional="true"><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>externalHandleType</name></param>
<param><type>VkExternalImageFormatPropertiesNV</type>* <name>pExternalImageFormatProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetMemoryWin32HandleNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDeviceMemory</type> <name>memory</name></param>
<param><type>VkExternalMemoryHandleTypeFlagsNV</type> <name>handleType</name></param>
<param><type>HANDLE</type>* <name>pHandle</name></param>
</command>
<command queues="graphics,compute" renderpass="inside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdExecuteGeneratedCommandsNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBool32</type> <name>isPreprocessed</name></param>
<param>const <type>VkGeneratedCommandsInfoNV</type>* <name>pGeneratedCommandsInfo</name></param>
</command>
<command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdPreprocessGeneratedCommandsNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkGeneratedCommandsInfoNV</type>* <name>pGeneratedCommandsInfo</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBindPipelineShaderGroupNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param>
<param><type>VkPipeline</type> <name>pipeline</name></param>
<param><type>uint32_t</type> <name>groupIndex</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetGeneratedCommandsMemoryRequirementsNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkGeneratedCommandsMemoryRequirementsInfoNV</type>* <name>pInfo</name></param>
<param><type>VkMemoryRequirements2</type>* <name>pMemoryRequirements</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateIndirectCommandsLayoutNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkIndirectCommandsLayoutCreateInfoNV</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkIndirectCommandsLayoutNV</type>* <name>pIndirectCommandsLayout</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyIndirectCommandsLayoutNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkIndirectCommandsLayoutNV</type> <name>indirectCommandsLayout</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceFeatures2</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkPhysicalDeviceFeatures2</type>* <name>pFeatures</name></param>
</command>
<command name="vkGetPhysicalDeviceFeatures2KHR" alias="vkGetPhysicalDeviceFeatures2"/>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceProperties2</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkPhysicalDeviceProperties2</type>* <name>pProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceProperties2KHR" alias="vkGetPhysicalDeviceProperties2"/>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceFormatProperties2</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkFormat</type> <name>format</name></param>
<param><type>VkFormatProperties2</type>* <name>pFormatProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceFormatProperties2KHR" alias="vkGetPhysicalDeviceFormatProperties2"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_FORMAT_NOT_SUPPORTED">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceImageFormatProperties2</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceImageFormatInfo2</type>* <name>pImageFormatInfo</name></param>
<param><type>VkImageFormatProperties2</type>* <name>pImageFormatProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceImageFormatProperties2KHR" alias="vkGetPhysicalDeviceImageFormatProperties2"/>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceQueueFamilyProperties2</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pQueueFamilyPropertyCount</name></param>
<param optional="true" len="pQueueFamilyPropertyCount"><type>VkQueueFamilyProperties2</type>* <name>pQueueFamilyProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceQueueFamilyProperties2KHR" alias="vkGetPhysicalDeviceQueueFamilyProperties2"/>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceMemoryProperties2</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkPhysicalDeviceMemoryProperties2</type>* <name>pMemoryProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceMemoryProperties2KHR" alias="vkGetPhysicalDeviceMemoryProperties2"/>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceSparseImageFormatProperties2</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceSparseImageFormatInfo2</type>* <name>pFormatInfo</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkSparseImageFormatProperties2</type>* <name>pProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceSparseImageFormatProperties2KHR" alias="vkGetPhysicalDeviceSparseImageFormatProperties2"/>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdPushDescriptorSetKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineBindPoint</type> <name>pipelineBindPoint</name></param>
<param><type>VkPipelineLayout</type> <name>layout</name></param>
<param><type>uint32_t</type> <name>set</name></param>
<param><type>uint32_t</type> <name>descriptorWriteCount</name></param>
<param len="descriptorWriteCount">const <type>VkWriteDescriptorSet</type>* <name>pDescriptorWrites</name></param>
</command>
<command>
<proto><type>void</type> <name>vkTrimCommandPool</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkCommandPool</type> <name>commandPool</name></param>
<param optional="true"><type>VkCommandPoolTrimFlags</type> <name>flags</name></param>
</command>
<command name="vkTrimCommandPoolKHR" alias="vkTrimCommandPool"/>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceExternalBufferProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceExternalBufferInfo</type>* <name>pExternalBufferInfo</name></param>
<param><type>VkExternalBufferProperties</type>* <name>pExternalBufferProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceExternalBufferPropertiesKHR" alias="vkGetPhysicalDeviceExternalBufferProperties"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetMemoryWin32HandleKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkMemoryGetWin32HandleInfoKHR</type>* <name>pGetWin32HandleInfo</name></param>
<param><type>HANDLE</type>* <name>pHandle</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkGetMemoryWin32HandlePropertiesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></param>
<param><type>HANDLE</type> <name>handle</name></param>
<param><type>VkMemoryWin32HandlePropertiesKHR</type>* <name>pMemoryWin32HandleProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetMemoryFdKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkMemoryGetFdInfoKHR</type>* <name>pGetFdInfo</name></param>
<param><type>int</type>* <name>pFd</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkGetMemoryFdPropertiesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></param>
<param><type>int</type> <name>fd</name></param>
<param><type>VkMemoryFdPropertiesKHR</type>* <name>pMemoryFdProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetMemoryZirconHandleFUCHSIA</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkMemoryGetZirconHandleInfoFUCHSIA</type>* <name>pGetZirconHandleInfo</name></param>
<param><type>zx_handle_t</type>* <name>pZirconHandle</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkGetMemoryZirconHandlePropertiesFUCHSIA</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></param>
<param><type>zx_handle_t</type> <name>zirconHandle</name></param>
<param><type>VkMemoryZirconHandlePropertiesFUCHSIA</type>* <name>pMemoryZirconHandleProperties</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceExternalSemaphoreProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceExternalSemaphoreInfo</type>* <name>pExternalSemaphoreInfo</name></param>
<param><type>VkExternalSemaphoreProperties</type>* <name>pExternalSemaphoreProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceExternalSemaphorePropertiesKHR" alias="vkGetPhysicalDeviceExternalSemaphoreProperties"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetSemaphoreWin32HandleKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkSemaphoreGetWin32HandleInfoKHR</type>* <name>pGetWin32HandleInfo</name></param>
<param><type>HANDLE</type>* <name>pHandle</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkImportSemaphoreWin32HandleKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImportSemaphoreWin32HandleInfoKHR</type>* <name>pImportSemaphoreWin32HandleInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetSemaphoreFdKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkSemaphoreGetFdInfoKHR</type>* <name>pGetFdInfo</name></param>
<param><type>int</type>* <name>pFd</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkImportSemaphoreFdKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImportSemaphoreFdInfoKHR</type>* <name>pImportSemaphoreFdInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetSemaphoreZirconHandleFUCHSIA</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkSemaphoreGetZirconHandleInfoFUCHSIA</type>* <name>pGetZirconHandleInfo</name></param>
<param><type>zx_handle_t</type>* <name>pZirconHandle</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkImportSemaphoreZirconHandleFUCHSIA</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImportSemaphoreZirconHandleInfoFUCHSIA</type>* <name>pImportSemaphoreZirconHandleInfo</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceExternalFenceProperties</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceExternalFenceInfo</type>* <name>pExternalFenceInfo</name></param>
<param><type>VkExternalFenceProperties</type>* <name>pExternalFenceProperties</name></param>
</command>
<command name="vkGetPhysicalDeviceExternalFencePropertiesKHR" alias="vkGetPhysicalDeviceExternalFenceProperties"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetFenceWin32HandleKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkFenceGetWin32HandleInfoKHR</type>* <name>pGetWin32HandleInfo</name></param>
<param><type>HANDLE</type>* <name>pHandle</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkImportFenceWin32HandleKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImportFenceWin32HandleInfoKHR</type>* <name>pImportFenceWin32HandleInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetFenceFdKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkFenceGetFdInfoKHR</type>* <name>pGetFdInfo</name></param>
<param><type>int</type>* <name>pFd</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkImportFenceFdKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImportFenceFdInfoKHR</type>* <name>pImportFenceFdInfo</name></param>
</command>
<command successcodes="VK_SUCCESS">
<proto><type>VkResult</type> <name>vkReleaseDisplayEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkAcquireXlibDisplayEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>Display</type>* <name>dpy</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetRandROutputDisplayEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>Display</type>* <name>dpy</name></param>
<param><type>RROutput</type> <name>rrOutput</name></param>
<param><type>VkDisplayKHR</type>* <name>pDisplay</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkAcquireWinrtDisplayNV</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkGetWinrtDisplayNV</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>deviceRelativeId</name></param>
<param><type>VkDisplayKHR</type>* <name>pDisplay</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkDisplayPowerControlEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
<param>const <type>VkDisplayPowerInfoEXT</type>* <name>pDisplayPowerInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkRegisterDeviceEventEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkDeviceEventInfoEXT</type>* <name>pDeviceEventInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkFence</type>* <name>pFence</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkRegisterDisplayEventEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
<param>const <type>VkDisplayEventInfoEXT</type>* <name>pDisplayEventInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkFence</type>* <name>pFence</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR">
<proto><type>VkResult</type> <name>vkGetSwapchainCounterEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
<param><type>VkSurfaceCounterFlagBitsEXT</type> <name>counter</name></param>
<param><type>uint64_t</type>* <name>pCounterValue</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilities2EXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkSurfaceKHR</type> <name>surface</name></param>
<param><type>VkSurfaceCapabilities2EXT</type>* <name>pSurfaceCapabilities</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkEnumeratePhysicalDeviceGroups</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPhysicalDeviceGroupCount</name></param>
<param optional="true" len="pPhysicalDeviceGroupCount"><type>VkPhysicalDeviceGroupProperties</type>* <name>pPhysicalDeviceGroupProperties</name></param>
</command>
<command name="vkEnumeratePhysicalDeviceGroupsKHR" alias="vkEnumeratePhysicalDeviceGroups"/>
<command>
<proto><type>void</type> <name>vkGetDeviceGroupPeerMemoryFeatures</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>heapIndex</name></param>
<param><type>uint32_t</type> <name>localDeviceIndex</name></param>
<param><type>uint32_t</type> <name>remoteDeviceIndex</name></param>
<param><type>VkPeerMemoryFeatureFlags</type>* <name>pPeerMemoryFeatures</name></param>
</command>
<command name="vkGetDeviceGroupPeerMemoryFeaturesKHR" alias="vkGetDeviceGroupPeerMemoryFeatures"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
<proto><type>VkResult</type> <name>vkBindBufferMemory2</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>bindInfoCount</name></param>
<param len="bindInfoCount">const <type>VkBindBufferMemoryInfo</type>* <name>pBindInfos</name></param>
</command>
<command name="vkBindBufferMemory2KHR" alias="vkBindBufferMemory2"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkBindImageMemory2</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>bindInfoCount</name></param>
<param len="bindInfoCount">const <type>VkBindImageMemoryInfo</type>* <name>pBindInfos</name></param>
</command>
<command name="vkBindImageMemory2KHR" alias="vkBindImageMemory2"/>
<command queues="graphics,compute,transfer" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDeviceMask</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>deviceMask</name></param>
</command>
<command name="vkCmdSetDeviceMaskKHR" alias="vkCmdSetDeviceMask"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetDeviceGroupPresentCapabilitiesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDeviceGroupPresentCapabilitiesKHR</type>* <name>pDeviceGroupPresentCapabilities</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetDeviceGroupSurfacePresentModesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
<param optional="false,true"><type>VkDeviceGroupPresentModeFlagsKHR</type>* <name>pModes</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_TIMEOUT,VK_NOT_READY,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
<proto><type>VkResult</type> <name>vkAcquireNextImage2KHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkAcquireNextImageInfoKHR</type>* <name>pAcquireInfo</name></param>
<param><type>uint32_t</type>* <name>pImageIndex</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdDispatchBase</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>baseGroupX</name></param>
<param><type>uint32_t</type> <name>baseGroupY</name></param>
<param><type>uint32_t</type> <name>baseGroupZ</name></param>
<param><type>uint32_t</type> <name>groupCountX</name></param>
<param><type>uint32_t</type> <name>groupCountY</name></param>
<param><type>uint32_t</type> <name>groupCountZ</name></param>
</command>
<command name="vkCmdDispatchBaseKHR" alias="vkCmdDispatchBase"/>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDevicePresentRectanglesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param externsync="true"><type>VkSurfaceKHR</type> <name>surface</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pRectCount</name></param>
<param optional="true" len="pRectCount"><type>VkRect2D</type>* <name>pRects</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateDescriptorUpdateTemplate</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkDescriptorUpdateTemplateCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDescriptorUpdateTemplate</type>* <name>pDescriptorUpdateTemplate</name></param>
</command>
<command name="vkCreateDescriptorUpdateTemplateKHR" alias="vkCreateDescriptorUpdateTemplate"/>
<command>
<proto><type>void</type> <name>vkDestroyDescriptorUpdateTemplate</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkDescriptorUpdateTemplate</type> <name>descriptorUpdateTemplate</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command name="vkDestroyDescriptorUpdateTemplateKHR" alias="vkDestroyDescriptorUpdateTemplate"/>
<command>
<proto><type>void</type> <name>vkUpdateDescriptorSetWithTemplate</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkDescriptorSet</type> <name>descriptorSet</name></param>
<param><type>VkDescriptorUpdateTemplate</type> <name>descriptorUpdateTemplate</name></param>
<param noautovalidity="true">const <type>void</type>* <name>pData</name></param>
</command>
<command name="vkUpdateDescriptorSetWithTemplateKHR" alias="vkUpdateDescriptorSetWithTemplate"/>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdPushDescriptorSetWithTemplateKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkDescriptorUpdateTemplate</type> <name>descriptorUpdateTemplate</name></param>
<param><type>VkPipelineLayout</type> <name>layout</name></param>
<param><type>uint32_t</type> <name>set</name></param>
<param noautovalidity="true">const <type>void</type>* <name>pData</name></param>
</command>
<command>
<proto><type>void</type> <name>vkSetHdrMetadataEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>swapchainCount</name></param>
<param len="swapchainCount">const <type>VkSwapchainKHR</type>* <name>pSwapchains</name></param>
<param len="swapchainCount">const <type>VkHdrMetadataEXT</type>* <name>pMetadata</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_SUBOPTIMAL_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR,VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT">
<proto><type>VkResult</type> <name>vkGetSwapchainStatusKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetRefreshCycleDurationGOOGLE</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
<param><type>VkRefreshCycleDurationGOOGLE</type>* <name>pDisplayTimingProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_DEVICE_LOST,VK_ERROR_OUT_OF_DATE_KHR,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPastPresentationTimingGOOGLE</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkSwapchainKHR</type> <name>swapchain</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPresentationTimingCount</name></param>
<param optional="true" len="pPresentationTimingCount"><type>VkPastPresentationTimingGOOGLE</type>* <name>pPresentationTimings</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
<proto><type>VkResult</type> <name>vkCreateIOSSurfaceMVK</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkIOSSurfaceCreateInfoMVK</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
<proto><type>VkResult</type> <name>vkCreateMacOSSurfaceMVK</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkMacOSSurfaceCreateInfoMVK</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_NATIVE_WINDOW_IN_USE_KHR">
<proto><type>VkResult</type> <name>vkCreateMetalSurfaceEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkMetalSurfaceCreateInfoEXT</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetViewportWScalingNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstViewport</name></param>
<param><type>uint32_t</type> <name>viewportCount</name></param>
<param len="viewportCount">const <type>VkViewportWScalingNV</type>* <name>pViewportWScalings</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDiscardRectangleEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstDiscardRectangle</name></param>
<param><type>uint32_t</type> <name>discardRectangleCount</name></param>
<param len="discardRectangleCount">const <type>VkRect2D</type>* <name>pDiscardRectangles</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetSampleLocationsEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkSampleLocationsInfoEXT</type>* <name>pSampleLocationsInfo</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceMultisamplePropertiesEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkSampleCountFlagBits</type> <name>samples</name></param>
<param><type>VkMultisamplePropertiesEXT</type>* <name>pMultisampleProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceCapabilities2KHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
<param><type>VkSurfaceCapabilities2KHR</type>* <name>pSurfaceCapabilities</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfaceFormats2KHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pSurfaceFormatCount</name></param>
<param optional="true" len="pSurfaceFormatCount"><type>VkSurfaceFormat2KHR</type>* <name>pSurfaceFormats</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayProperties2KHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkDisplayProperties2KHR</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceDisplayPlaneProperties2KHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkDisplayPlaneProperties2KHR</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetDisplayModeProperties2KHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>VkDisplayKHR</type> <name>display</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkDisplayModeProperties2KHR</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetDisplayPlaneCapabilities2KHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkDisplayPlaneInfo2KHR</type>* <name>pDisplayPlaneInfo</name></param>
<param><type>VkDisplayPlaneCapabilities2KHR</type>* <name>pCapabilities</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetBufferMemoryRequirements2</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkBufferMemoryRequirementsInfo2</type>* <name>pInfo</name></param>
<param><type>VkMemoryRequirements2</type>* <name>pMemoryRequirements</name></param>
</command>
<command name="vkGetBufferMemoryRequirements2KHR" alias="vkGetBufferMemoryRequirements2"/>
<command>
<proto><type>void</type> <name>vkGetImageMemoryRequirements2</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImageMemoryRequirementsInfo2</type>* <name>pInfo</name></param>
<param><type>VkMemoryRequirements2</type>* <name>pMemoryRequirements</name></param>
</command>
<command name="vkGetImageMemoryRequirements2KHR" alias="vkGetImageMemoryRequirements2"/>
<command>
<proto><type>void</type> <name>vkGetImageSparseMemoryRequirements2</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImageSparseMemoryRequirementsInfo2</type>* <name>pInfo</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pSparseMemoryRequirementCount</name></param>
<param optional="true" len="pSparseMemoryRequirementCount"><type>VkSparseImageMemoryRequirements2</type>* <name>pSparseMemoryRequirements</name></param>
</command>
<command name="vkGetImageSparseMemoryRequirements2KHR" alias="vkGetImageSparseMemoryRequirements2"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateSamplerYcbcrConversion</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkSamplerYcbcrConversionCreateInfo</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSamplerYcbcrConversion</type>* <name>pYcbcrConversion</name></param>
</command>
<command name="vkCreateSamplerYcbcrConversionKHR" alias="vkCreateSamplerYcbcrConversion"/>
<command>
<proto><type>void</type> <name>vkDestroySamplerYcbcrConversion</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkSamplerYcbcrConversion</type> <name>ycbcrConversion</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command name="vkDestroySamplerYcbcrConversionKHR" alias="vkDestroySamplerYcbcrConversion"/>
<command>
<proto><type>void</type> <name>vkGetDeviceQueue2</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkDeviceQueueInfo2</type>* <name>pQueueInfo</name></param>
<param><type>VkQueue</type>* <name>pQueue</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCreateValidationCacheEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkValidationCacheCreateInfoEXT</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkValidationCacheEXT</type>* <name>pValidationCache</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyValidationCacheEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkValidationCacheEXT</type> <name>validationCache</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetValidationCacheDataEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkValidationCacheEXT</type> <name>validationCache</name></param>
<param optional="false,true"><type>size_t</type>* <name>pDataSize</name></param>
<param optional="true" len="pDataSize"><type>void</type>* <name>pData</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkMergeValidationCachesEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="true"><type>VkValidationCacheEXT</type> <name>dstCache</name></param>
<param><type>uint32_t</type> <name>srcCacheCount</name></param>
<param len="srcCacheCount">const <type>VkValidationCacheEXT</type>* <name>pSrcCaches</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetDescriptorSetLayoutSupport</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkDescriptorSetLayoutCreateInfo</type>* <name>pCreateInfo</name></param>
<param><type>VkDescriptorSetLayoutSupport</type>* <name>pSupport</name></param>
</command>
<command name="vkGetDescriptorSetLayoutSupportKHR" alias="vkGetDescriptorSetLayoutSupport"/>
<command>
<proto><type>VkResult</type> <name>vkGetSwapchainGrallocUsageANDROID</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkFormat</type> <name>format</name></param>
<param><type>VkImageUsageFlags</type> <name>imageUsage</name></param>
<param><type>int</type>* <name>grallocUsage</name></param>
</command>
<command>
<proto><type>VkResult</type> <name>vkGetSwapchainGrallocUsage2ANDROID</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkFormat</type> <name>format</name></param>
<param><type>VkImageUsageFlags</type> <name>imageUsage</name></param>
<param><type>VkSwapchainImageUsageFlagsANDROID</type> <name>swapchainImageUsage</name></param>
<param><type>uint64_t</type>* <name>grallocConsumerUsage</name></param>
<param><type>uint64_t</type>* <name>grallocProducerUsage</name></param>
</command>
<command>
<proto><type>VkResult</type> <name>vkAcquireImageANDROID</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkImage</type> <name>image</name></param>
<param><type>int</type> <name>nativeFenceFd</name></param>
<param><type>VkSemaphore</type> <name>semaphore</name></param>
<param><type>VkFence</type> <name>fence</name></param>
</command>
<command>
<proto><type>VkResult</type> <name>vkQueueSignalReleaseImageANDROID</name></proto>
<param><type>VkQueue</type> <name>queue</name></param>
<param><type>uint32_t</type> <name>waitSemaphoreCount</name></param>
<param len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></param>
<param><type>VkImage</type> <name>image</name></param>
<param><type>int</type>* <name>pNativeFenceFd</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_FEATURE_NOT_PRESENT,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetShaderInfoAMD</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkPipeline</type> <name>pipeline</name></param>
<param><type>VkShaderStageFlagBits</type> <name>shaderStage</name></param>
<param><type>VkShaderInfoTypeAMD</type> <name>infoType</name></param>
<param optional="false,true"><type>size_t</type>* <name>pInfoSize</name></param>
<param optional="true" len="pInfoSize"><type>void</type>* <name>pInfo</name></param>
</command>
<command>
<proto><type>void</type> <name>vkSetLocalDimmingAMD</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkSwapchainKHR</type> <name>swapChain</name></param>
<param><type>VkBool32</type> <name>localDimmingEnable</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceCalibrateableTimeDomainsEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pTimeDomainCount</name></param>
<param optional="true" len="pTimeDomainCount"><type>VkTimeDomainEXT</type>* <name>pTimeDomains</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetCalibratedTimestampsEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>timestampCount</name></param>
<param len="timestampCount">const <type>VkCalibratedTimestampInfoEXT</type>* <name>pTimestampInfos</name></param>
<param len="timestampCount"><type>uint64_t</type>* <name>pTimestamps</name></param>
<param><type>uint64_t</type>* <name>pMaxDeviation</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkSetDebugUtilsObjectNameEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="pNameInfo->objectHandle">const <type>VkDebugUtilsObjectNameInfoEXT</type>* <name>pNameInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkSetDebugUtilsObjectTagEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param externsync="pTagInfo->objectHandle">const <type>VkDebugUtilsObjectTagInfoEXT</type>* <name>pTagInfo</name></param>
</command>
<command>
<proto><type>void</type> <name>vkQueueBeginDebugUtilsLabelEXT</name></proto>
<param><type>VkQueue</type> <name>queue</name></param>
<param>const <type>VkDebugUtilsLabelEXT</type>* <name>pLabelInfo</name></param>
</command>
<command>
<proto><type>void</type> <name>vkQueueEndDebugUtilsLabelEXT</name></proto>
<param><type>VkQueue</type> <name>queue</name></param>
</command>
<command>
<proto><type>void</type> <name>vkQueueInsertDebugUtilsLabelEXT</name></proto>
<param><type>VkQueue</type> <name>queue</name></param>
<param>const <type>VkDebugUtilsLabelEXT</type>* <name>pLabelInfo</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBeginDebugUtilsLabelEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkDebugUtilsLabelEXT</type>* <name>pLabelInfo</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdEndDebugUtilsLabelEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdInsertDebugUtilsLabelEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkDebugUtilsLabelEXT</type>* <name>pLabelInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCreateDebugUtilsMessengerEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkDebugUtilsMessengerCreateInfoEXT</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDebugUtilsMessengerEXT</type>* <name>pMessenger</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyDebugUtilsMessengerEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param optional="true" externsync="true"><type>VkDebugUtilsMessengerEXT</type> <name>messenger</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command>
<proto><type>void</type> <name>vkSubmitDebugUtilsMessageEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param><type>VkDebugUtilsMessageSeverityFlagBitsEXT</type> <name>messageSeverity</name></param>
<param><type>VkDebugUtilsMessageTypeFlagsEXT</type> <name>messageTypes</name></param>
<param>const <type>VkDebugUtilsMessengerCallbackDataEXT</type>* <name>pCallbackData</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE">
<proto><type>VkResult</type> <name>vkGetMemoryHostPointerPropertiesEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkExternalMemoryHandleTypeFlagBits</type> <name>handleType</name></param>
<param optional="false">const <type>void</type>* <name>pHostPointer</name></param>
<param><type>VkMemoryHostPointerPropertiesEXT</type>* <name>pMemoryHostPointerProperties</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdWriteBufferMarkerAMD</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineStageFlagBits</type> <name>pipelineStage</name></param>
<param><type>VkBuffer</type> <name>dstBuffer</name></param>
<param><type>VkDeviceSize</type> <name>dstOffset</name></param>
<param><type>uint32_t</type> <name>marker</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateRenderPass2</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkRenderPassCreateInfo2</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkRenderPass</type>* <name>pRenderPass</name></param>
</command>
<command name="vkCreateRenderPass2KHR" alias="vkCreateRenderPass2"/>
<command queues="graphics" renderpass="outside" cmdbufferlevel="primary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdBeginRenderPass2</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkRenderPassBeginInfo</type>* <name>pRenderPassBegin</name></param>
<param>const <type>VkSubpassBeginInfo</type>* <name>pSubpassBeginInfo</name></param>
</command>
<command name="vkCmdBeginRenderPass2KHR" alias="vkCmdBeginRenderPass2"/>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdNextSubpass2</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkSubpassBeginInfo</type>* <name>pSubpassBeginInfo</name></param>
<param>const <type>VkSubpassEndInfo</type>* <name>pSubpassEndInfo</name></param>
</command>
<command name="vkCmdNextSubpass2KHR" alias="vkCmdNextSubpass2"/>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdEndRenderPass2</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkSubpassEndInfo</type>* <name>pSubpassEndInfo</name></param>
</command>
<command name="vkCmdEndRenderPass2KHR" alias="vkCmdEndRenderPass2"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkGetSemaphoreCounterValue</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkSemaphore</type> <name>semaphore</name></param>
<param><type>uint64_t</type>* <name>pValue</name></param>
</command>
<command name="vkGetSemaphoreCounterValueKHR" alias="vkGetSemaphoreCounterValue"/>
<command successcodes="VK_SUCCESS,VK_TIMEOUT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkWaitSemaphores</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkSemaphoreWaitInfo</type>* <name>pWaitInfo</name></param>
<param><type>uint64_t</type> <name>timeout</name></param>
</command>
<command name="vkWaitSemaphoresKHR" alias="vkWaitSemaphores"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkSignalSemaphore</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkSemaphoreSignalInfo</type>* <name>pSignalInfo</name></param>
</command>
<command name="vkSignalSemaphoreKHR" alias="vkSignalSemaphore"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR">
<proto><type>VkResult</type> <name>vkGetAndroidHardwareBufferPropertiesANDROID</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const struct <type>AHardwareBuffer</type>* <name>buffer</name></param>
<param><type>VkAndroidHardwareBufferPropertiesANDROID</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetMemoryAndroidHardwareBufferANDROID</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkMemoryGetAndroidHardwareBufferInfoANDROID</type>* <name>pInfo</name></param>
<param>struct <type>AHardwareBuffer</type>** <name>pBuffer</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawIndirectCount</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
<param><type>VkBuffer</type> <name>countBuffer</name></param>
<param><type>VkDeviceSize</type> <name>countBufferOffset</name></param>
<param><type>uint32_t</type> <name>maxDrawCount</name></param>
<param><type>uint32_t</type> <name>stride</name></param>
</command>
<command name="vkCmdDrawIndirectCountKHR" alias="vkCmdDrawIndirectCount"/>
<command name="vkCmdDrawIndirectCountAMD" alias="vkCmdDrawIndirectCount"/>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawIndexedIndirectCount</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
<param><type>VkBuffer</type> <name>countBuffer</name></param>
<param><type>VkDeviceSize</type> <name>countBufferOffset</name></param>
<param><type>uint32_t</type> <name>maxDrawCount</name></param>
<param><type>uint32_t</type> <name>stride</name></param>
</command>
<command name="vkCmdDrawIndexedIndirectCountKHR" alias="vkCmdDrawIndexedIndirectCount"/>
<command name="vkCmdDrawIndexedIndirectCountAMD" alias="vkCmdDrawIndexedIndirectCount"/>
<command queues="graphics,compute,transfer" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetCheckpointNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param noautovalidity="true">const <type>void</type>* <name>pCheckpointMarker</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetQueueCheckpointDataNV</name></proto>
<param><type>VkQueue</type> <name>queue</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pCheckpointDataCount</name></param>
<param optional="true" len="pCheckpointDataCount"><type>VkCheckpointDataNV</type>* <name>pCheckpointData</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBindTransformFeedbackBuffersEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstBinding</name></param>
<param><type>uint32_t</type> <name>bindingCount</name></param>
<param len="bindingCount">const <type>VkBuffer</type>* <name>pBuffers</name></param>
<param len="bindingCount">const <type>VkDeviceSize</type>* <name>pOffsets</name></param>
<param optional="true" len="bindingCount" noautovalidity="true">const <type>VkDeviceSize</type>* <name>pSizes</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBeginTransformFeedbackEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstCounterBuffer</name></param>
<param optional="true"><type>uint32_t</type> <name>counterBufferCount</name></param>
<param noautovalidity="true" len="counterBufferCount">const <type>VkBuffer</type>* <name>pCounterBuffers</name></param>
<param optional="true" len="counterBufferCount">const <type>VkDeviceSize</type>* <name>pCounterBufferOffsets</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdEndTransformFeedbackEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstCounterBuffer</name></param>
<param optional="true"><type>uint32_t</type> <name>counterBufferCount</name></param>
<param noautovalidity="true" len="counterBufferCount">const <type>VkBuffer</type>* <name>pCounterBuffers</name></param>
<param optional="true" len="counterBufferCount">const <type>VkDeviceSize</type>* <name>pCounterBufferOffsets</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBeginQueryIndexedEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>query</name></param>
<param optional="true"><type>VkQueryControlFlags</type> <name>flags</name></param>
<param><type>uint32_t</type> <name>index</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdEndQueryIndexedEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>query</name></param>
<param><type>uint32_t</type> <name>index</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawIndirectByteCountEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>instanceCount</name></param>
<param><type>uint32_t</type> <name>firstInstance</name></param>
<param><type>VkBuffer</type> <name>counterBuffer</name></param>
<param><type>VkDeviceSize</type> <name>counterBufferOffset</name></param>
<param><type>uint32_t</type> <name>counterOffset</name></param>
<param><type>uint32_t</type> <name>vertexStride</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetExclusiveScissorNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstExclusiveScissor</name></param>
<param><type>uint32_t</type> <name>exclusiveScissorCount</name></param>
<param len="exclusiveScissorCount">const <type>VkRect2D</type>* <name>pExclusiveScissors</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBindShadingRateImageNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param optional="true"><type>VkImageView</type> <name>imageView</name></param>
<param><type>VkImageLayout</type> <name>imageLayout</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetViewportShadingRatePaletteNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstViewport</name></param>
<param><type>uint32_t</type> <name>viewportCount</name></param>
<param len="viewportCount">const <type>VkShadingRatePaletteNV</type>* <name>pShadingRatePalettes</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetCoarseSampleOrderNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkCoarseSampleOrderTypeNV</type> <name>sampleOrderType</name></param>
<param optional="true"><type>uint32_t</type> <name>customSampleOrderCount</name></param>
<param len="customSampleOrderCount">const <type>VkCoarseSampleOrderCustomNV</type>* <name>pCustomSampleOrders</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawMeshTasksNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>taskCount</name></param>
<param><type>uint32_t</type> <name>firstTask</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawMeshTasksIndirectNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
<param><type>uint32_t</type> <name>drawCount</name></param>
<param><type>uint32_t</type> <name>stride</name></param>
</command>
<command queues="graphics" renderpass="inside" cmdbufferlevel="primary,secondary" pipeline="graphics">
<proto><type>void</type> <name>vkCmdDrawMeshTasksIndirectCountNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>buffer</name></param>
<param><type>VkDeviceSize</type> <name>offset</name></param>
<param><type>VkBuffer</type> <name>countBuffer</name></param>
<param><type>VkDeviceSize</type> <name>countBufferOffset</name></param>
<param><type>uint32_t</type> <name>maxDrawCount</name></param>
<param><type>uint32_t</type> <name>stride</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCompileDeferredNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkPipeline</type> <name>pipeline</name></param>
<param><type>uint32_t</type> <name>shader</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCreateAccelerationStructureNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkAccelerationStructureCreateInfoNV</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkAccelerationStructureNV</type>* <name>pAccelerationStructure</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyAccelerationStructureKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkAccelerationStructureKHR</type> <name>accelerationStructure</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyAccelerationStructureNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkAccelerationStructureNV</type> <name>accelerationStructure</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetAccelerationStructureMemoryRequirementsNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkAccelerationStructureMemoryRequirementsInfoNV</type>* <name>pInfo</name></param>
<param><type>VkMemoryRequirements2KHR</type>* <name>pMemoryRequirements</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkBindAccelerationStructureMemoryNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>bindInfoCount</name></param>
<param len="bindInfoCount">const <type>VkBindAccelerationStructureMemoryInfoNV</type>* <name>pBindInfos</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdCopyAccelerationStructureNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkAccelerationStructureNV</type> <name>dst</name></param>
<param><type>VkAccelerationStructureNV</type> <name>src</name></param>
<param><type>VkCopyAccelerationStructureModeKHR</type> <name>mode</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdCopyAccelerationStructureKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkCopyAccelerationStructureInfoKHR</type>* <name>pInfo</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_OPERATION_DEFERRED_KHR,VK_OPERATION_NOT_DEFERRED_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCopyAccelerationStructureKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>VkDeferredOperationKHR</type> <name>deferredOperation</name></param>
<param>const <type>VkCopyAccelerationStructureInfoKHR</type>* <name>pInfo</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdCopyAccelerationStructureToMemoryKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkCopyAccelerationStructureToMemoryInfoKHR</type>* <name>pInfo</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_OPERATION_DEFERRED_KHR,VK_OPERATION_NOT_DEFERRED_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCopyAccelerationStructureToMemoryKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>VkDeferredOperationKHR</type> <name>deferredOperation</name></param>
<param>const <type>VkCopyAccelerationStructureToMemoryInfoKHR</type>* <name>pInfo</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdCopyMemoryToAccelerationStructureKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkCopyMemoryToAccelerationStructureInfoKHR</type>* <name>pInfo</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_OPERATION_DEFERRED_KHR,VK_OPERATION_NOT_DEFERRED_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCopyMemoryToAccelerationStructureKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>VkDeferredOperationKHR</type> <name>deferredOperation</name></param>
<param>const <type>VkCopyMemoryToAccelerationStructureInfoKHR</type>* <name>pInfo</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdWriteAccelerationStructuresPropertiesKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>accelerationStructureCount</name></param>
<param len="accelerationStructureCount">const <type>VkAccelerationStructureKHR</type>* <name>pAccelerationStructures</name></param>
<param><type>VkQueryType</type> <name>queryType</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>firstQuery</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdWriteAccelerationStructuresPropertiesNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>accelerationStructureCount</name></param>
<param len="accelerationStructureCount">const <type>VkAccelerationStructureNV</type>* <name>pAccelerationStructures</name></param>
<param><type>VkQueryType</type> <name>queryType</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>firstQuery</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBuildAccelerationStructureNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkAccelerationStructureInfoNV</type>* <name>pInfo</name></param>
<param optional="true"><type>VkBuffer</type> <name>instanceData</name></param>
<param><type>VkDeviceSize</type> <name>instanceOffset</name></param>
<param><type>VkBool32</type> <name>update</name></param>
<param><type>VkAccelerationStructureNV</type> <name>dst</name></param>
<param optional="true"><type>VkAccelerationStructureNV</type> <name>src</name></param>
<param><type>VkBuffer</type> <name>scratch</name></param>
<param><type>VkDeviceSize</type> <name>scratchOffset</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkWriteAccelerationStructuresPropertiesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>uint32_t</type> <name>accelerationStructureCount</name></param>
<param len="accelerationStructureCount">const <type>VkAccelerationStructureKHR</type>* <name>pAccelerationStructures</name></param>
<param><type>VkQueryType</type> <name>queryType</name></param>
<param><type>size_t</type> <name>dataSize</name></param>
<param len="dataSize"><type>void</type>* <name>pData</name></param>
<param><type>size_t</type> <name>stride</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdTraceRaysKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkStridedDeviceAddressRegionKHR</type>* <name>pRaygenShaderBindingTable</name></param>
<param>const <type>VkStridedDeviceAddressRegionKHR</type>* <name>pMissShaderBindingTable</name></param>
<param>const <type>VkStridedDeviceAddressRegionKHR</type>* <name>pHitShaderBindingTable</name></param>
<param>const <type>VkStridedDeviceAddressRegionKHR</type>* <name>pCallableShaderBindingTable</name></param>
<param><type>uint32_t</type> <name>width</name></param>
<param><type>uint32_t</type> <name>height</name></param>
<param><type>uint32_t</type> <name>depth</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdTraceRaysNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBuffer</type> <name>raygenShaderBindingTableBuffer</name></param>
<param><type>VkDeviceSize</type> <name>raygenShaderBindingOffset</name></param>
<param optional="true"><type>VkBuffer</type> <name>missShaderBindingTableBuffer</name></param>
<param><type>VkDeviceSize</type> <name>missShaderBindingOffset</name></param>
<param><type>VkDeviceSize</type> <name>missShaderBindingStride</name></param>
<param optional="true"><type>VkBuffer</type> <name>hitShaderBindingTableBuffer</name></param>
<param><type>VkDeviceSize</type> <name>hitShaderBindingOffset</name></param>
<param><type>VkDeviceSize</type> <name>hitShaderBindingStride</name></param>
<param optional="true"><type>VkBuffer</type> <name>callableShaderBindingTableBuffer</name></param>
<param><type>VkDeviceSize</type> <name>callableShaderBindingOffset</name></param>
<param><type>VkDeviceSize</type> <name>callableShaderBindingStride</name></param>
<param><type>uint32_t</type> <name>width</name></param>
<param><type>uint32_t</type> <name>height</name></param>
<param><type>uint32_t</type> <name>depth</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetRayTracingShaderGroupHandlesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkPipeline</type> <name>pipeline</name></param>
<param><type>uint32_t</type> <name>firstGroup</name></param>
<param><type>uint32_t</type> <name>groupCount</name></param>
<param><type>size_t</type> <name>dataSize</name></param>
<param len="dataSize"><type>void</type>* <name>pData</name></param>
</command>
<command name="vkGetRayTracingShaderGroupHandlesNV" alias="vkGetRayTracingShaderGroupHandlesKHR"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetRayTracingCaptureReplayShaderGroupHandlesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkPipeline</type> <name>pipeline</name></param>
<param><type>uint32_t</type> <name>firstGroup</name></param>
<param><type>uint32_t</type> <name>groupCount</name></param>
<param><type>size_t</type> <name>dataSize</name></param>
<param len="dataSize"><type>void</type>* <name>pData</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetAccelerationStructureHandleNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkAccelerationStructureNV</type> <name>accelerationStructure</name></param>
<param><type>size_t</type> <name>dataSize</name></param>
<param len="dataSize"><type>void</type>* <name>pData</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_PIPELINE_COMPILE_REQUIRED_EXT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_SHADER_NV">
<proto><type>VkResult</type> <name>vkCreateRayTracingPipelinesNV</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param>
<param><type>uint32_t</type> <name>createInfoCount</name></param>
<param len="createInfoCount">const <type>VkRayTracingPipelineCreateInfoNV</type>* <name>pCreateInfos</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_OPERATION_DEFERRED_KHR,VK_OPERATION_NOT_DEFERRED_KHR,VK_PIPELINE_COMPILE_REQUIRED_EXT" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS">
<proto><type>VkResult</type> <name>vkCreateRayTracingPipelinesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>VkDeferredOperationKHR</type> <name>deferredOperation</name></param>
<param optional="true"><type>VkPipelineCache</type> <name>pipelineCache</name></param>
<param><type>uint32_t</type> <name>createInfoCount</name></param>
<param len="createInfoCount">const <type>VkRayTracingPipelineCreateInfoKHR</type>* <name>pCreateInfos</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param len="createInfoCount"><type>VkPipeline</type>* <name>pPipelines</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceCooperativeMatrixPropertiesNV</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPropertyCount</name></param>
<param optional="true" len="pPropertyCount"><type>VkCooperativeMatrixPropertiesNV</type>* <name>pProperties</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdTraceRaysIndirectKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkStridedDeviceAddressRegionKHR</type>* <name>pRaygenShaderBindingTable</name></param>
<param>const <type>VkStridedDeviceAddressRegionKHR</type>* <name>pMissShaderBindingTable</name></param>
<param>const <type>VkStridedDeviceAddressRegionKHR</type>* <name>pHitShaderBindingTable</name></param>
<param>const <type>VkStridedDeviceAddressRegionKHR</type>* <name>pCallableShaderBindingTable</name></param>
<param><type>VkDeviceAddress</type> <name>indirectDeviceAddress</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetDeviceAccelerationStructureCompatibilityKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkAccelerationStructureVersionInfoKHR</type>* <name>pVersionInfo</name></param>
<param><type>VkAccelerationStructureCompatibilityKHR</type>* <name>pCompatibility</name></param>
</command>
<command>
<proto><type>VkDeviceSize</type> <name>vkGetRayTracingShaderGroupStackSizeKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkPipeline</type> <name>pipeline</name></param>
<param><type>uint32_t</type> <name>group</name></param>
<param><type>VkShaderGroupShaderKHR</type> <name>groupShader</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetRayTracingPipelineStackSizeKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>pipelineStackSize</name></param>
</command>
<command>
<proto><type>uint32_t</type> <name>vkGetImageViewHandleNVX</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkImageViewHandleInfoNVX</type>* <name>pInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_UNKNOWN">
<proto><type>VkResult</type> <name>vkGetImageViewAddressNVX</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkImageView</type> <name>imageView</name></param>
<param><type>VkImageViewAddressPropertiesNVX</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSurfacePresentModes2EXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pPresentModeCount</name></param>
<param optional="true" len="pPresentModeCount"><type>VkPresentModeKHR</type>* <name>pPresentModes</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkGetDeviceGroupSurfacePresentModes2EXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkPhysicalDeviceSurfaceInfo2KHR</type>* <name>pSurfaceInfo</name></param>
<param optional="false,true"><type>VkDeviceGroupPresentModeFlagsKHR</type>* <name>pModes</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkAcquireFullScreenExclusiveModeEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_SURFACE_LOST_KHR">
<proto><type>VkResult</type> <name>vkReleaseFullScreenExclusiveModeEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkSwapchainKHR</type> <name>swapchain</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param><type>uint32_t</type> <name>queueFamilyIndex</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pCounterCount</name></param>
<param optional="true" len="pCounterCount"><type>VkPerformanceCounterKHR</type>* <name>pCounters</name></param>
<param optional="true" len="pCounterCount"><type>VkPerformanceCounterDescriptionKHR</type>* <name>pCounterDescriptions</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkQueryPoolPerformanceCreateInfoKHR</type>* <name>pPerformanceQueryCreateInfo</name></param>
<param><type>uint32_t</type>* <name>pNumPasses</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_TIMEOUT">
<proto><type>VkResult</type> <name>vkAcquireProfilingLockKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkAcquireProfilingLockInfoKHR</type>* <name>pInfo</name></param>
</command>
<command>
<proto><type>void</type> <name>vkReleaseProfilingLockKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetImageDrmFormatModifierPropertiesEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkImage</type> <name>image</name></param>
<param><type>VkImageDrmFormatModifierPropertiesEXT</type>* <name>pProperties</name></param>
</command>
<command>
<proto><type>uint64_t</type> <name>vkGetBufferOpaqueCaptureAddress</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkBufferDeviceAddressInfo</type>* <name>pInfo</name></param>
</command>
<command name="vkGetBufferOpaqueCaptureAddressKHR" alias="vkGetBufferOpaqueCaptureAddress"/>
<command>
<proto><type>VkDeviceAddress</type> <name>vkGetBufferDeviceAddress</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkBufferDeviceAddressInfo</type>* <name>pInfo</name></param>
</command>
<command name="vkGetBufferDeviceAddressKHR" alias="vkGetBufferDeviceAddress"/>
<command name="vkGetBufferDeviceAddressEXT" alias="vkGetBufferDeviceAddress"/>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkCreateHeadlessSurfaceEXT</name></proto>
<param><type>VkInstance</type> <name>instance</name></param>
<param>const <type>VkHeadlessSurfaceCreateInfoEXT</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkSurfaceKHR</type>* <name>pSurface</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pCombinationCount</name></param>
<param optional="true" len="pCombinationCount"><type>VkFramebufferMixedSamplesCombinationNV</type>* <name>pCombinations</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkInitializePerformanceApiINTEL</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkInitializePerformanceApiInfoINTEL</type>* <name>pInitializeInfo</name></param>
</command>
<command>
<proto><type>void</type> <name>vkUninitializePerformanceApiINTEL</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
</command>
<command queues="graphics,compute,transfer" renderpass="both" cmdbufferlevel="primary,secondary" successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCmdSetPerformanceMarkerINTEL</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkPerformanceMarkerInfoINTEL</type>* <name>pMarkerInfo</name></param>
</command>
<command queues="graphics,compute,transfer" renderpass="both" cmdbufferlevel="primary,secondary" successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCmdSetPerformanceStreamMarkerINTEL</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkPerformanceStreamMarkerInfoINTEL</type>* <name>pMarkerInfo</name></param>
</command>
<command queues="graphics,compute,transfer" renderpass="both" cmdbufferlevel="primary,secondary" successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCmdSetPerformanceOverrideINTEL</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkPerformanceOverrideInfoINTEL</type>* <name>pOverrideInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkAcquirePerformanceConfigurationINTEL</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkPerformanceConfigurationAcquireInfoINTEL</type>* <name>pAcquireInfo</name></param>
<param><type>VkPerformanceConfigurationINTEL</type>* <name>pConfiguration</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkReleasePerformanceConfigurationINTEL</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkPerformanceConfigurationINTEL</type> <name>configuration</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkQueueSetPerformanceConfigurationINTEL</name></proto>
<param><type>VkQueue</type> <name>queue</name></param>
<param><type>VkPerformanceConfigurationINTEL</type> <name>configuration</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_TOO_MANY_OBJECTS,VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetPerformanceParameterINTEL</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkPerformanceParameterTypeINTEL</type> <name>parameter</name></param>
<param><type>VkPerformanceValueINTEL</type>* <name>pValue</name></param>
</command>
<command>
<proto><type>uint64_t</type> <name>vkGetDeviceMemoryOpaqueCaptureAddress</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkDeviceMemoryOpaqueCaptureAddressInfo</type>* <name>pInfo</name></param>
</command>
<command name="vkGetDeviceMemoryOpaqueCaptureAddressKHR" alias="vkGetDeviceMemoryOpaqueCaptureAddress"/>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPipelineExecutablePropertiesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkPipelineInfoKHR</type>* <name>pPipelineInfo</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pExecutableCount</name></param>
<param optional="true" len="pExecutableCount"><type>VkPipelineExecutablePropertiesKHR</type>* <name>pProperties</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPipelineExecutableStatisticsKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkPipelineExecutableInfoKHR</type>* <name>pExecutableInfo</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pStatisticCount</name></param>
<param optional="true" len="pStatisticCount"><type>VkPipelineExecutableStatisticKHR</type>* <name>pStatistics</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkGetPipelineExecutableInternalRepresentationsKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkPipelineExecutableInfoKHR</type>* <name>pExecutableInfo</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pInternalRepresentationCount</name></param>
<param optional="true" len="pInternalRepresentationCount"><type>VkPipelineExecutableInternalRepresentationKHR</type>* <name>pInternalRepresentations</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetLineStippleEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>lineStippleFactor</name></param>
<param><type>uint16_t</type> <name>lineStipplePattern</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceToolPropertiesEXT</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pToolCount</name></param>
<param optional="true" len="pToolCount"><type>VkPhysicalDeviceToolPropertiesEXT</type>* <name>pToolProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR">
<proto><type>VkResult</type> <name>vkCreateAccelerationStructureKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkAccelerationStructureCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkAccelerationStructureKHR</type>* <name>pAccelerationStructure</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBuildAccelerationStructuresKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>infoCount</name></param>
<param len="infoCount">const <type>VkAccelerationStructureBuildGeometryInfoKHR</type>* <name>pInfos</name></param>
<param len="infoCount">const <type>VkAccelerationStructureBuildRangeInfoKHR</type>* const* <name>ppBuildRangeInfos</name></param>
</command>
<command queues="compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBuildAccelerationStructuresIndirectKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>infoCount</name></param>
<param len="infoCount">const <type>VkAccelerationStructureBuildGeometryInfoKHR</type>* <name>pInfos</name></param>
<param len="infoCount">const <type>VkDeviceAddress</type>* <name>pIndirectDeviceAddresses</name></param>
<param len="infoCount">const <type>uint32_t</type>* <name>pIndirectStrides</name></param>
<param len="infoCount">const <type>uint32_t</type>* const* <name>ppMaxPrimitiveCounts</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_OPERATION_DEFERRED_KHR,VK_OPERATION_NOT_DEFERRED_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkBuildAccelerationStructuresKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true"><type>VkDeferredOperationKHR</type> <name>deferredOperation</name></param>
<param><type>uint32_t</type> <name>infoCount</name></param>
<param len="infoCount">const <type>VkAccelerationStructureBuildGeometryInfoKHR</type>* <name>pInfos</name></param>
<param len="infoCount">const <type>VkAccelerationStructureBuildRangeInfoKHR</type>* const* <name>ppBuildRangeInfos</name></param>
</command>
<command>
<proto><type>VkDeviceAddress</type> <name>vkGetAccelerationStructureDeviceAddressKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkAccelerationStructureDeviceAddressInfoKHR</type>* <name>pInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCreateDeferredOperationKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkDeferredOperationKHR</type>* <name>pDeferredOperation</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyDeferredOperationKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkDeferredOperationKHR</type> <name>operation</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command>
<proto><type>uint32_t</type> <name>vkGetDeferredOperationMaxConcurrencyKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDeferredOperationKHR</type> <name>operation</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_NOT_READY">
<proto><type>VkResult</type> <name>vkGetDeferredOperationResultKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDeferredOperationKHR</type> <name>operation</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_THREAD_DONE_KHR,VK_THREAD_IDLE_KHR" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
<proto><type>VkResult</type> <name>vkDeferredOperationJoinKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkDeferredOperationKHR</type> <name>operation</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetCullModeEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param optional="true"><type>VkCullModeFlags</type> <name>cullMode</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetFrontFaceEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkFrontFace</type> <name>frontFace</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetPrimitiveTopologyEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPrimitiveTopology</type> <name>primitiveTopology</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetViewportWithCountEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>viewportCount</name></param>
<param len="viewportCount">const <type>VkViewport</type>* <name>pViewports</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetScissorWithCountEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>scissorCount</name></param>
<param len="scissorCount">const <type>VkRect2D</type>* <name>pScissors</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdBindVertexBuffers2EXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>firstBinding</name></param>
<param><type>uint32_t</type> <name>bindingCount</name></param>
<param len="bindingCount">const <type>VkBuffer</type>* <name>pBuffers</name></param>
<param len="bindingCount">const <type>VkDeviceSize</type>* <name>pOffsets</name></param>
<param optional="true" len="bindingCount">const <type>VkDeviceSize</type>* <name>pSizes</name></param>
<param optional="true" len="bindingCount">const <type>VkDeviceSize</type>* <name>pStrides</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDepthTestEnableEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBool32</type> <name>depthTestEnable</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDepthWriteEnableEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBool32</type> <name>depthWriteEnable</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDepthCompareOpEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkCompareOp</type> <name>depthCompareOp</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDepthBoundsTestEnableEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBool32</type> <name>depthBoundsTestEnable</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetStencilTestEnableEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBool32</type> <name>stencilTestEnable</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetStencilOpEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkStencilFaceFlags</type> <name>faceMask</name></param>
<param><type>VkStencilOp</type> <name>failOp</name></param>
<param><type>VkStencilOp</type> <name>passOp</name></param>
<param><type>VkStencilOp</type> <name>depthFailOp</name></param>
<param><type>VkCompareOp</type> <name>compareOp</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetPatchControlPointsEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>patchControlPoints</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetRasterizerDiscardEnableEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBool32</type> <name>rasterizerDiscardEnable</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetDepthBiasEnableEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBool32</type> <name>depthBiasEnable</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetLogicOpEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkLogicOp</type> <name>logicOp</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetPrimitiveRestartEnableEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkBool32</type> <name>primitiveRestartEnable</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkCreatePrivateDataSlotEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkPrivateDataSlotCreateInfoEXT</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkPrivateDataSlotEXT</type>* <name>pPrivateDataSlot</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyPrivateDataSlotEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param optional="true" externsync="true"><type>VkPrivateDataSlotEXT</type> <name>privateDataSlot</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkSetPrivateDataEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkObjectType</type> <name>objectType</name></param>
<param><type>uint64_t</type> <name>objectHandle</name></param>
<param><type>VkPrivateDataSlotEXT</type> <name>privateDataSlot</name></param>
<param><type>uint64_t</type> <name>data</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetPrivateDataEXT</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkObjectType</type> <name>objectType</name></param>
<param><type>uint64_t</type> <name>objectHandle</name></param>
<param><type>VkPrivateDataSlotEXT</type> <name>privateDataSlot</name></param>
<param><type>uint64_t</type>* <name>pData</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyBuffer2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkCopyBufferInfo2KHR</type>* <name>pCopyBufferInfo</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyImage2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkCopyImageInfo2KHR</type>* <name>pCopyImageInfo</name></param>
</command>
<command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdBlitImage2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkBlitImageInfo2KHR</type>* <name>pBlitImageInfo</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyBufferToImage2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkCopyBufferToImageInfo2KHR</type>* <name>pCopyBufferToImageInfo</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdCopyImageToBuffer2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkCopyImageToBufferInfo2KHR</type>* <name>pCopyImageToBufferInfo</name></param>
</command>
<command queues="graphics" renderpass="outside" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdResolveImage2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkResolveImageInfo2KHR</type>* <name>pResolveImageInfo</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetFragmentShadingRateKHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkExtent2D</type>* <name>pFragmentSize</name></param>
<param>const <type>VkFragmentShadingRateCombinerOpKHR</type> <name>combinerOps</name>[2]</param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceFragmentShadingRatesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pFragmentShadingRateCount</name></param>
<param optional="true" len="pFragmentShadingRateCount"><type>VkPhysicalDeviceFragmentShadingRateKHR</type>* <name>pFragmentShadingRates</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetFragmentShadingRateEnumNV</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkFragmentShadingRateNV</type> <name>shadingRate</name></param>
<param>const <type>VkFragmentShadingRateCombinerOpKHR</type> <name>combinerOps</name>[2]</param>
</command>
<command>
<proto><type>void</type> <name>vkGetAccelerationStructureBuildSizesKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkAccelerationStructureBuildTypeKHR</type> <name>buildType</name></param>
<param>const <type>VkAccelerationStructureBuildGeometryInfoKHR</type>* <name>pBuildInfo</name></param>
<param optional="true" len="pBuildInfo->geometryCount">const <type>uint32_t</type>* <name>pMaxPrimitiveCounts</name></param>
<param><type>VkAccelerationStructureBuildSizesInfoKHR</type>* <name>pSizeInfo</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetVertexInputEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param optional="true"><type>uint32_t</type> <name>vertexBindingDescriptionCount</name></param>
<param len="vertexBindingDescriptionCount">const <type>VkVertexInputBindingDescription2EXT</type>* <name>pVertexBindingDescriptions</name></param>
<param optional="true"><type>uint32_t</type> <name>vertexAttributeDescriptionCount</name></param>
<param len="vertexAttributeDescriptionCount">const <type>VkVertexInputAttributeDescription2EXT</type>* <name>pVertexAttributeDescriptions</name></param>
</command>
<command queues="graphics" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetColorWriteEnableEXT</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>attachmentCount</name></param>
<param len="attachmentCount">const <type>VkBool32</type>* <name>pColorWriteEnables</name></param>
</command>
<command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdSetEvent2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkEvent</type> <name>event</name></param>
<param>const <type>VkDependencyInfoKHR</type>* <name>pDependencyInfo</name></param>
</command>
<command queues="graphics,compute" renderpass="outside" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdResetEvent2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkEvent</type> <name>event</name></param>
<param><type>VkPipelineStageFlags2KHR</type> <name>stageMask</name></param>
</command>
<command queues="graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdWaitEvents2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>uint32_t</type> <name>eventCount</name></param>
<param len="eventCount">const <type>VkEvent</type>* <name>pEvents</name></param>
<param len="eventCount">const <type>VkDependencyInfoKHR</type>* <name>pDependencyInfos</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary">
<proto><type>void</type> <name>vkCmdPipelineBarrier2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkDependencyInfoKHR</type>* <name>pDependencyInfo</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_DEVICE_LOST">
<proto><type>VkResult</type> <name>vkQueueSubmit2KHR</name></proto>
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
<param optional="true"><type>uint32_t</type> <name>submitCount</name></param>
<param len="submitCount">const <type>VkSubmitInfo2KHR</type>* <name>pSubmits</name></param>
<param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdWriteTimestamp2KHR</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineStageFlags2KHR</type> <name>stage</name></param>
<param><type>VkQueryPool</type> <name>queryPool</name></param>
<param><type>uint32_t</type> <name>query</name></param>
</command>
<command queues="transfer,graphics,compute" renderpass="both" cmdbufferlevel="primary,secondary" pipeline="transfer">
<proto><type>void</type> <name>vkCmdWriteBufferMarker2AMD</name></proto>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param><type>VkPipelineStageFlags2KHR</type> <name>stage</name></param>
<param><type>VkBuffer</type> <name>dstBuffer</name></param>
<param><type>VkDeviceSize</type> <name>dstOffset</name></param>
<param><type>uint32_t</type> <name>marker</name></param>
</command>
<command>
<proto><type>void</type> <name>vkGetQueueCheckpointData2NV</name></proto>
<param><type>VkQueue</type> <name>queue</name></param>
<param optional="false,true"><type>uint32_t</type>* <name>pCheckpointDataCount</name></param>
<param optional="true" len="pCheckpointDataCount"><type>VkCheckpointData2NV</type>* <name>pCheckpointData</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_FEATURE_NOT_PRESENT,VK_ERROR_FORMAT_NOT_SUPPORTED">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceVideoCapabilitiesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkVideoProfileKHR</type>* <name>pVideoProfile</name></param>
<param><type>VkVideoCapabilitiesKHR</type>* <name>pCapabilities</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_EXTENSION_NOT_PRESENT,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_FORMAT_NOT_SUPPORTED">
<proto><type>VkResult</type> <name>vkGetPhysicalDeviceVideoFormatPropertiesKHR</name></proto>
<param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
<param>const <type>VkPhysicalDeviceVideoFormatInfoKHR</type>* <name>pVideoFormatInfo</name></param>
<param><type>uint32_t</type>* <name>pVideoFormatPropertyCount</name></param>
<param optional="true" len="pVideoFormatPropertyCount"><type>VkVideoFormatPropertiesKHR</type>* <name>pVideoFormatProperties</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_INCOMPATIBLE_DRIVER,VK_ERROR_FEATURE_NOT_PRESENT">
<proto><type>VkResult</type> <name>vkCreateVideoSessionKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkVideoSessionCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkVideoSessionKHR</type>* <name>pVideoSession</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyVideoSessionKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkVideoSessionKHR</type> <name>videoSession</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_TOO_MANY_OBJECTS">
<proto><type>VkResult</type> <name>vkCreateVideoSessionParametersKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param>const <type>VkVideoSessionParametersCreateInfoKHR</type>* <name>pCreateInfo</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
<param><type>VkVideoSessionParametersKHR</type>* <name>pVideoSessionParameters</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_INITIALIZATION_FAILED,VK_ERROR_TOO_MANY_OBJECTS">
<proto><type>VkResult</type> <name>vkUpdateVideoSessionParametersKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkVideoSessionParametersKHR</type> <name>videoSessionParameters</name></param>
<param>const <type>VkVideoSessionParametersUpdateInfoKHR</type>* <name>pUpdateInfo</name></param>
</command>
<command>
<proto><type>void</type> <name>vkDestroyVideoSessionParametersKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkVideoSessionParametersKHR</type> <name>videoSessionParameters</name></param>
<param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
</command>
<command successcodes="VK_SUCCESS,VK_INCOMPLETE" errorcodes="VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkGetVideoSessionMemoryRequirementsKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkVideoSessionKHR</type> <name>videoSession</name></param>
<param><type>uint32_t</type>* <name>pVideoSessionMemoryRequirementsCount</name></param>
<param optional="true" len="pVideoSessionMemoryRequirementsCount"><type>VkVideoGetMemoryPropertiesKHR</type>* <name>pVideoSessionMemoryRequirements</name></param>
</command>
<command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_INITIALIZATION_FAILED">
<proto><type>VkResult</type> <name>vkBindVideoSessionMemoryKHR</name></proto>
<param><type>VkDevice</type> <name>device</name></param>
<param><type>VkVideoSessionKHR</type> <name>videoSession</name></param>
<param><type>uint32_t</type> <name>videoSessionBindMemoryCount</name></param>
<param len="videoSessionBindMemoryCount">const <type>VkVideoBindMemoryKHR</type>* <name>pVideoSessionBindMemories</name></param>
</command>
<command queues="decode" renderpass="outside" cmdbufferlevel="primary">
<proto><type>void</type> <name>vkCmdDecodeVideoKHR</name></proto>
<param><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkVideoDecodeInfoKHR</type>* <name>pFrameInfo</name></param>
</command>
<command queues="decode,encode" renderpass="outside" cmdbufferlevel="primary">
<proto><type>void</type> <name>vkCmdBeginVideoCodingKHR</name></proto>
<param><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkVideoBeginCodingInfoKHR</type>* <name>pBeginInfo</name></param>
</command>
<command queues="decode,encode" renderpass="outside" cmdbufferlevel="primary">
<proto><type>void</type> <name>vkCmdControlVideoCodingKHR</name></proto>
<param><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkVideoCodingControlInfoKHR</type>* <name>pCodingControlInfo</name></param>
</command>
<command queues="decode,encode" renderpass="outside" cmdbufferlevel="primary">
<proto><type>void</type> <name>vkCmdEndVideoCodingKHR</name></proto>
<param><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkVideoEndCodingInfoKHR</type>* <name>pEndCodingInfo</name></param>
</command>
<command queues="encode" renderpass="outside" cmdbufferlevel="primary">
<proto><type>void</type> <name>vkCmdEncodeVideoKHR</name></proto>
<param><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
<param>const <type>VkVideoEncodeInfoKHR</type>* <name>pEncodeInfo</name></param>
</command>
</commands>
<feature api="vulkan" name="VK_VERSION_1_0" number="1.0" comment="Vulkan core API interface definitions">
<require comment="Header boilerplate">
<type name="vk_platform"/>
<type name="VK_DEFINE_HANDLE"/>
<type name="VK_USE_64_BIT_PTR_DEFINES"/>
<type name="VK_DEFINE_NON_DISPATCHABLE_HANDLE"/>
<type name="VK_NULL_HANDLE"/>
</require>
<require comment="Fundamental types used by many commands and structures">
<type name="VkBool32"/>
<type name="VkDeviceAddress"/>
<type name="VkDeviceSize"/>
<type name="VkExtent2D"/>
<type name="VkExtent3D"/>
<type name="VkFlags"/>
<type name="VkOffset2D"/>
<type name="VkOffset3D"/>
<type name="VkRect2D"/>
<type name="VkResult"/>
<type name="VkStructureType"/>
</require>
<require comment="These types are part of the API, though not directly used in API commands or data structures">
<type name="VkBaseInStructure"/>
<type name="VkBaseOutStructure"/>
<type name="VkBufferMemoryBarrier"/>
<type name="VkDispatchIndirectCommand"/>
<type name="VkDrawIndexedIndirectCommand"/>
<type name="VkDrawIndirectCommand"/>
<type name="VkImageMemoryBarrier"/>
<type name="VkMemoryBarrier"/>
<type name="VkObjectType"/>
<type name="VkVendorId"/>
</require>
<require comment="API version macros">
<type name="VK_API_VERSION"/>
<type name="VK_API_VERSION_1_0"/>
<type name="VK_HEADER_VERSION"/>
<type name="VK_HEADER_VERSION_COMPLETE"/>
<type name="VK_MAKE_VERSION"/>
<type name="VK_VERSION_MAJOR"/>
<type name="VK_VERSION_MINOR"/>
<type name="VK_VERSION_PATCH"/>
<type name="VK_MAKE_API_VERSION"/>
<type name="VK_API_VERSION_VARIANT"/>
<type name="VK_API_VERSION_MAJOR"/>
<type name="VK_API_VERSION_MINOR"/>
<type name="VK_API_VERSION_PATCH"/>
</require>
<require comment="API constants">
<enum name="VK_ATTACHMENT_UNUSED"/>
<enum name="VK_FALSE"/>
<enum name="VK_LOD_CLAMP_NONE"/>
<enum name="VK_QUEUE_FAMILY_IGNORED"/>
<enum name="VK_REMAINING_ARRAY_LAYERS"/>
<enum name="VK_REMAINING_MIP_LEVELS"/>
<enum name="VK_SUBPASS_EXTERNAL"/>
<enum name="VK_TRUE"/>
<enum name="VK_WHOLE_SIZE"/>
<type name="VkPipelineCacheHeaderVersion"/>
</require>
<require comment="Device initialization">
<type name="PFN_vkAllocationFunction"/>
<type name="PFN_vkFreeFunction"/>
<type name="PFN_vkInternalAllocationNotification"/>
<type name="PFN_vkInternalFreeNotification"/>
<type name="PFN_vkReallocationFunction"/>
<type name="PFN_vkVoidFunction"/>
<type name="VkAllocationCallbacks"/>
<type name="VkApplicationInfo"/>
<type name="VkFormat"/>
<type name="VkFormatFeatureFlagBits"/>
<type name="VkFormatFeatureFlags"/>
<type name="VkFormatProperties"/>
<type name="VkImageCreateFlagBits"/>
<type name="VkImageCreateFlags"/>
<type name="VkImageFormatProperties"/>
<type name="VkImageTiling"/>
<type name="VkImageType"/>
<type name="VkImageUsageFlagBits"/>
<type name="VkImageUsageFlags"/>
<type name="VkInstance"/>
<type name="VkInstanceCreateFlags"/>
<type name="VkInstanceCreateInfo"/>
<type name="VkInternalAllocationType"/>
<type name="VkMemoryHeap"/>
<type name="VkMemoryHeapFlagBits"/>
<type name="VkMemoryHeapFlags"/>
<type name="VkMemoryPropertyFlagBits"/>
<type name="VkMemoryPropertyFlags"/>
<type name="VkMemoryType"/>
<type name="VkPhysicalDevice"/>
<type name="VkPhysicalDeviceFeatures"/>
<type name="VkPhysicalDeviceLimits"/>
<type name="VkPhysicalDeviceMemoryProperties"/>
<type name="VkPhysicalDeviceProperties"/>
<type name="VkPhysicalDeviceSparseProperties"/>
<type name="VkPhysicalDeviceType"/>
<type name="VkQueueFamilyProperties"/>
<type name="VkQueueFlagBits"/>
<type name="VkQueueFlags"/>
<type name="VkSampleCountFlagBits"/>
<type name="VkSampleCountFlags"/>
<type name="VkSystemAllocationScope"/>
<command name="vkCreateInstance"/>
<command name="vkDestroyInstance"/>
<command name="vkEnumeratePhysicalDevices"/>
<command name="vkGetPhysicalDeviceFeatures"/>
<command name="vkGetPhysicalDeviceFormatProperties"/>
<command name="vkGetPhysicalDeviceImageFormatProperties"/>
<command name="vkGetPhysicalDeviceProperties"/>
<command name="vkGetPhysicalDeviceQueueFamilyProperties"/>
<command name="vkGetPhysicalDeviceMemoryProperties"/>
<command name="vkGetInstanceProcAddr"/>
<command name="vkGetDeviceProcAddr"/>
</require>
<require comment="Device commands">
<type name="VkDevice"/>
<type name="VkDeviceCreateFlags"/>
<type name="VkDeviceCreateInfo"/>
<type name="VkDeviceQueueCreateFlagBits"/>
<type name="VkDeviceQueueCreateFlags"/>
<type name="VkDeviceQueueCreateInfo"/>
<command name="vkCreateDevice"/>
<command name="vkDestroyDevice"/>
</require>
<require comment="Extension discovery commands">
<type name="VkExtensionProperties"/>
<command name="vkEnumerateInstanceExtensionProperties"/>
<command name="vkEnumerateDeviceExtensionProperties"/>
</require>
<require comment="Layer discovery commands">
<type name="VkLayerProperties"/>
<command name="vkEnumerateInstanceLayerProperties"/>
<command name="vkEnumerateDeviceLayerProperties"/>
</require>
<require comment="Queue commands">
<type name="VkPipelineStageFlagBits"/>
<type name="VkPipelineStageFlags"/>
<type name="VkQueue"/>
<type name="VkSubmitInfo"/>
<command name="vkGetDeviceQueue"/>
<command name="vkQueueSubmit"/>
<command name="vkQueueWaitIdle"/>
<command name="vkDeviceWaitIdle"/>
</require>
<require comment="Memory commands">
<type name="VkMappedMemoryRange"/>
<type name="VkMemoryAllocateInfo"/>
<type name="VkMemoryMapFlags"/>
<command name="vkAllocateMemory"/>
<command name="vkFreeMemory"/>
<command name="vkMapMemory"/>
<command name="vkUnmapMemory"/>
<command name="vkFlushMappedMemoryRanges"/>
<command name="vkInvalidateMappedMemoryRanges"/>
<command name="vkGetDeviceMemoryCommitment"/>
</require>
<require comment="Memory management API commands">
<type name="VkDeviceMemory"/>
<type name="VkMemoryRequirements"/>
<command name="vkBindBufferMemory"/>
<command name="vkBindImageMemory"/>
<command name="vkGetBufferMemoryRequirements"/>
<command name="vkGetImageMemoryRequirements"/>
</require>
<require comment="Sparse resource memory management API commands">
<type name="VkBindSparseInfo"/>
<type name="VkImageAspectFlagBits"/>
<type name="VkImageAspectFlags"/>
<type name="VkImageSubresource"/>
<type name="VkSparseBufferMemoryBindInfo"/>
<type name="VkSparseImageFormatFlagBits"/>
<type name="VkSparseImageFormatFlags"/>
<type name="VkSparseImageFormatProperties"/>
<type name="VkSparseImageMemoryBind"/>
<type name="VkSparseImageMemoryBindInfo"/>
<type name="VkSparseImageMemoryRequirements"/>
<type name="VkSparseImageOpaqueMemoryBindInfo"/>
<type name="VkSparseMemoryBind"/>
<type name="VkSparseMemoryBindFlagBits"/>
<type name="VkSparseMemoryBindFlags"/>
<command name="vkGetImageSparseMemoryRequirements"/>
<command name="vkGetPhysicalDeviceSparseImageFormatProperties"/>
<command name="vkQueueBindSparse"/>
</require>
<require comment="Fence commands">
<type name="VkFence"/>
<type name="VkFenceCreateFlagBits"/>
<type name="VkFenceCreateFlags"/>
<type name="VkFenceCreateInfo"/>
<command name="vkCreateFence"/>
<command name="vkDestroyFence"/>
<command name="vkResetFences"/>
<command name="vkGetFenceStatus"/>
<command name="vkWaitForFences"/>
</require>
<require comment="Queue semaphore commands">
<type name="VkSemaphore"/>
<type name="VkSemaphoreCreateFlags"/>
<type name="VkSemaphoreCreateInfo"/>
<command name="vkCreateSemaphore"/>
<command name="vkDestroySemaphore"/>
</require>
<require comment="Event commands">
<type name="VkEvent"/>
<type name="VkEventCreateFlags"/>
<type name="VkEventCreateFlagBits"/>
<type name="VkEventCreateInfo"/>
<command name="vkCreateEvent"/>
<command name="vkDestroyEvent"/>
<command name="vkGetEventStatus"/>
<command name="vkSetEvent"/>
<command name="vkResetEvent"/>
</require>
<require comment="Query commands">
<type name="VkQueryPipelineStatisticFlagBits"/>
<type name="VkQueryPipelineStatisticFlags"/>
<type name="VkQueryPool"/>
<type name="VkQueryPoolCreateFlags"/>
<type name="VkQueryPoolCreateInfo"/>
<type name="VkQueryResultFlagBits"/>
<type name="VkQueryResultFlags"/>
<type name="VkQueryType"/>
<command name="vkCreateQueryPool"/>
<command name="vkDestroyQueryPool"/>
<command name="vkGetQueryPoolResults"/>
</require>
<require comment="Buffer commands">
<type name="VkBuffer"/>
<type name="VkBufferCreateFlagBits"/>
<type name="VkBufferCreateFlags"/>
<type name="VkBufferCreateInfo"/>
<type name="VkBufferUsageFlagBits"/>
<type name="VkBufferUsageFlags"/>
<type name="VkSharingMode"/>
<command name="vkCreateBuffer"/>
<command name="vkDestroyBuffer"/>
</require>
<require comment="Buffer view commands">
<type name="VkBufferView"/>
<type name="VkBufferViewCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkBufferViewCreateInfo"/>
<command name="vkCreateBufferView"/>
<command name="vkDestroyBufferView"/>
</require>
<require comment="Image commands">
<type name="VkImage"/>
<type name="VkImageCreateInfo"/>
<type name="VkImageLayout"/>
<type name="VkSubresourceLayout"/>
<command name="vkCreateImage"/>
<command name="vkDestroyImage"/>
<command name="vkGetImageSubresourceLayout"/>
</require>
<require comment="Image view commands">
<type name="VkComponentMapping"/>
<type name="VkComponentSwizzle"/>
<type name="VkImageSubresourceRange"/>
<type name="VkImageView"/>
<type name="VkImageViewCreateFlagBits"/>
<type name="VkImageViewCreateFlags"/>
<type name="VkImageViewCreateInfo"/>
<type name="VkImageViewType"/>
<command name="vkCreateImageView"/>
<command name="vkDestroyImageView"/>
</require>
<require comment="Shader commands">
<type name="VkShaderModule"/>
<type name="VkShaderModuleCreateFlagBits"/>
<type name="VkShaderModuleCreateFlags"/>
<type name="VkShaderModuleCreateInfo"/>
<command name="vkCreateShaderModule"/>
<command name="vkDestroyShaderModule"/>
</require>
<require comment="Pipeline Cache commands">
<type name="VkPipelineCache"/>
<type name="VkPipelineCacheCreateFlagBits"/>
<type name="VkPipelineCacheCreateFlags"/>
<type name="VkPipelineCacheCreateInfo"/>
<command name="vkCreatePipelineCache"/>
<command name="vkDestroyPipelineCache"/>
<command name="vkGetPipelineCacheData"/>
<command name="vkMergePipelineCaches"/>
</require>
<require comment="Pipeline commands">
<type name="VkBlendFactor"/>
<type name="VkBlendOp"/>
<type name="VkColorComponentFlagBits"/>
<type name="VkColorComponentFlags"/>
<type name="VkCompareOp"/>
<type name="VkComputePipelineCreateInfo"/>
<type name="VkCullModeFlagBits"/>
<type name="VkCullModeFlags"/>
<type name="VkDynamicState"/>
<type name="VkFrontFace"/>
<type name="VkGraphicsPipelineCreateInfo"/>
<type name="VkLogicOp"/>
<type name="VkPipeline"/>
<type name="VkPipelineColorBlendAttachmentState"/>
<type name="VkPipelineColorBlendStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineColorBlendStateCreateInfo"/>
<type name="VkPipelineCreateFlagBits"/>
<type name="VkPipelineCreateFlags"/>
<type name="VkPipelineDepthStencilStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineDepthStencilStateCreateInfo"/>
<type name="VkPipelineDynamicStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineDynamicStateCreateInfo"/>
<type name="VkPipelineInputAssemblyStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineInputAssemblyStateCreateInfo"/>
<type name="VkPipelineLayoutCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineMultisampleStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineMultisampleStateCreateInfo"/>
<type name="VkPipelineRasterizationStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineRasterizationStateCreateInfo"/>
<type name="VkPipelineShaderStageCreateFlagBits"/>
<type name="VkPipelineShaderStageCreateFlags"/>
<type name="VkPipelineShaderStageCreateInfo"/>
<type name="VkPipelineTessellationStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineTessellationStateCreateInfo"/>
<type name="VkPipelineVertexInputStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineVertexInputStateCreateInfo"/>
<type name="VkPipelineViewportStateCreateFlags" comment="Will need FlagBits type eventually"/>
<type name="VkPipelineViewportStateCreateInfo"/>
<type name="VkPolygonMode"/>
<type name="VkPrimitiveTopology"/>
<type name="VkSampleMask"/>
<type name="VkShaderStageFlagBits"/>
<type name="VkShaderStageFlags"/>
<type name="VkSpecializationInfo"/>
<type name="VkSpecializationMapEntry"/>
<type name="VkStencilOp"/>
<type name="VkStencilOpState"/>
<type name="VkVertexInputAttributeDescription"/>
<type name="VkVertexInputBindingDescription"/>
<type name="VkVertexInputRate"/>
<type name="VkViewport"/>
<command name="vkCreateGraphicsPipelines"/>
<command name="vkCreateComputePipelines"/>
<command name="vkDestroyPipeline"/>
</require>
<require comment="Pipeline layout commands">
<type name="VkPipelineLayout"/>
<type name="VkPipelineLayoutCreateInfo"/>
<type name="VkPushConstantRange"/>
<command name="vkCreatePipelineLayout"/>
<command name="vkDestroyPipelineLayout"/>
</require>
<require comment="Sampler commands">
<type name="VkBorderColor"/>
<type name="VkFilter"/>
<type name="VkSampler"/>
<type name="VkSamplerAddressMode"/>
<type name="VkSamplerCreateFlagBits"/>
<type name="VkSamplerCreateFlags"/>
<type name="VkSamplerCreateInfo"/>
<type name="VkSamplerMipmapMode"/>
<command name="vkCreateSampler"/>
<command name="vkDestroySampler"/>
</require>
<require comment="Descriptor set commands">
<type name="VkCopyDescriptorSet"/>
<type name="VkDescriptorBufferInfo"/>
<type name="VkDescriptorImageInfo"/>
<type name="VkDescriptorPool"/>
<type name="VkDescriptorPoolCreateFlagBits"/>
<type name="VkDescriptorPoolCreateFlags"/>
<type name="VkDescriptorPoolCreateInfo"/>
<type name="VkDescriptorPoolResetFlags"/>
<type name="VkDescriptorPoolSize"/>
<type name="VkDescriptorSet"/>
<type name="VkDescriptorSetAllocateInfo"/>
<type name="VkDescriptorSetLayout"/>
<type name="VkDescriptorSetLayoutBinding"/>
<type name="VkDescriptorSetLayoutCreateFlagBits"/>
<type name="VkDescriptorSetLayoutCreateFlags"/>
<type name="VkDescriptorSetLayoutCreateInfo"/>
<type name="VkDescriptorType"/>
<type name="VkWriteDescriptorSet"/>
<command name="vkCreateDescriptorSetLayout"/>
<command name="vkDestroyDescriptorSetLayout"/>
<command name="vkCreateDescriptorPool"/>
<command name="vkDestroyDescriptorPool"/>
<command name="vkResetDescriptorPool"/>
<command name="vkAllocateDescriptorSets"/>
<command name="vkFreeDescriptorSets"/>
<command name="vkUpdateDescriptorSets"/>
</require>
<require comment="Pass commands">
<type name="VkAccessFlagBits"/>
<type name="VkAccessFlags"/>
<type name="VkAttachmentDescription"/>
<type name="VkAttachmentDescriptionFlagBits"/>
<type name="VkAttachmentDescriptionFlags"/>
<type name="VkAttachmentLoadOp"/>
<type name="VkAttachmentReference"/>
<type name="VkAttachmentStoreOp"/>
<type name="VkDependencyFlagBits"/>
<type name="VkDependencyFlags"/>
<type name="VkFramebuffer"/>
<type name="VkFramebufferCreateFlagBits"/>
<type name="VkFramebufferCreateFlags"/>
<type name="VkFramebufferCreateInfo"/>
<type name="VkPipelineBindPoint"/>
<type name="VkRenderPass"/>
<type name="VkRenderPassCreateFlagBits"/>
<type name="VkRenderPassCreateFlags"/>
<type name="VkRenderPassCreateInfo"/>
<type name="VkSubpassDependency"/>
<type name="VkSubpassDescription"/>
<type name="VkSubpassDescriptionFlagBits"/>
<type name="VkSubpassDescriptionFlags"/>
<command name="vkCreateFramebuffer"/>
<command name="vkDestroyFramebuffer"/>
<command name="vkCreateRenderPass"/>
<command name="vkDestroyRenderPass"/>
<command name="vkGetRenderAreaGranularity"/>
</require>
<require comment="Command pool commands">
<type name="VkCommandPool"/>
<type name="VkCommandPoolCreateFlagBits"/>
<type name="VkCommandPoolCreateFlags"/>
<type name="VkCommandPoolCreateInfo"/>
<type name="VkCommandPoolResetFlagBits"/>
<type name="VkCommandPoolResetFlags"/>
<command name="vkCreateCommandPool"/>
<command name="vkDestroyCommandPool"/>
<command name="vkResetCommandPool"/>
</require>
<require comment="Command buffer commands">
<type name="VkCommandBuffer"/>
<type name="VkCommandBufferAllocateInfo"/>
<type name="VkCommandBufferBeginInfo"/>
<type name="VkCommandBufferInheritanceInfo"/>
<type name="VkCommandBufferLevel"/>
<type name="VkCommandBufferResetFlagBits"/>
<type name="VkCommandBufferResetFlags"/>
<type name="VkCommandBufferUsageFlagBits"/>
<type name="VkCommandBufferUsageFlags"/>
<type name="VkQueryControlFlagBits"/>
<type name="VkQueryControlFlags"/>
<command name="vkAllocateCommandBuffers"/>
<command name="vkFreeCommandBuffers"/>
<command name="vkBeginCommandBuffer"/>
<command name="vkEndCommandBuffer"/>
<command name="vkResetCommandBuffer"/>
</require>
<require comment="Command buffer building commands">
<type name="VkBufferCopy"/>
<type name="VkBufferImageCopy"/>
<type name="VkClearAttachment"/>
<type name="VkClearColorValue"/>
<type name="VkClearDepthStencilValue"/>
<type name="VkClearRect"/>
<type name="VkClearValue"/>
<type name="VkImageBlit"/>
<type name="VkImageCopy"/>
<type name="VkImageResolve"/>
<type name="VkImageSubresourceLayers"/>
<type name="VkIndexType"/>
<type name="VkRenderPassBeginInfo"/>
<type name="VkStencilFaceFlagBits"/>
<type name="VkStencilFaceFlags"/>
<type name="VkSubpassContents"/>
<command name="vkCmdBindPipeline"/>
<command name="vkCmdSetViewport"/>
<command name="vkCmdSetScissor"/>
<command name="vkCmdSetLineWidth"/>
<command name="vkCmdSetDepthBias"/>
<command name="vkCmdSetBlendConstants"/>
<command name="vkCmdSetDepthBounds"/>
<command name="vkCmdSetStencilCompareMask"/>
<command name="vkCmdSetStencilWriteMask"/>
<command name="vkCmdSetStencilReference"/>
<command name="vkCmdBindDescriptorSets"/>
<command name="vkCmdBindIndexBuffer"/>
<command name="vkCmdBindVertexBuffers"/>
<command name="vkCmdDraw"/>
<command name="vkCmdDrawIndexed"/>
<command name="vkCmdDrawIndirect"/>
<command name="vkCmdDrawIndexedIndirect"/>
<command name="vkCmdDispatch"/>
<command name="vkCmdDispatchIndirect"/>
<command name="vkCmdCopyBuffer"/>
<command name="vkCmdCopyImage"/>
<command name="vkCmdBlitImage"/>
<command name="vkCmdCopyBufferToImage"/>
<command name="vkCmdCopyImageToBuffer"/>
<command name="vkCmdUpdateBuffer"/>
<command name="vkCmdFillBuffer"/>
<command name="vkCmdClearColorImage"/>
<command name="vkCmdClearDepthStencilImage"/>
<command name="vkCmdClearAttachments"/>
<command name="vkCmdResolveImage"/>
<command name="vkCmdSetEvent"/>
<command name="vkCmdResetEvent"/>
<command name="vkCmdWaitEvents"/>
<command name="vkCmdPipelineBarrier"/>
<command name="vkCmdBeginQuery"/>
<command name="vkCmdEndQuery"/>
<command name="vkCmdResetQueryPool"/>
<command name="vkCmdWriteTimestamp"/>
<command name="vkCmdCopyQueryPoolResults"/>
<command name="vkCmdPushConstants"/>
<command name="vkCmdBeginRenderPass"/>
<command name="vkCmdNextSubpass"/>
<command name="vkCmdEndRenderPass"/>
<command name="vkCmdExecuteCommands"/>
</require>
</feature>
<feature api="vulkan" name="VK_VERSION_1_1" number="1.1" comment="Vulkan 1.1 core API interface definitions.">
<require>
<type name="VK_API_VERSION_1_1"/>
</require>
<require comment="Device Initialization">
<command name="vkEnumerateInstanceVersion"/>
</require>
<require comment="Promoted from VK_KHR_relaxed_block_layout, which has no API"/>
<require comment="Promoted from VK_KHR_storage_buffer_storage_class, which has no API"/>
<require comment="Originally based on VK_KHR_subgroup (extension 94), but the actual enum block used was, incorrectly, that of extension 95">
<enum extends="VkStructureType" extnumber="95" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES"/>
<type name="VkPhysicalDeviceSubgroupProperties"/>
<type name="VkSubgroupFeatureFlags"/>
<type name="VkSubgroupFeatureFlagBits"/>
</require>
<require comment="Promoted from VK_KHR_bind_memory2">
<command name="vkBindBufferMemory2"/>
<command name="vkBindImageMemory2"/>
<enum extends="VkStructureType" extnumber="158" offset="0" name="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO"/>
<enum extends="VkStructureType" extnumber="158" offset="1" name="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO"/>
<enum bitpos="10" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_ALIAS_BIT"/>
<type name="VkBindBufferMemoryInfo"/>
<type name="VkBindImageMemoryInfo"/>
</require>
<require comment="Promoted from VK_KHR_16bit_storage">
<enum extends="VkStructureType" extnumber="84" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES"/>
<type name="VkPhysicalDevice16BitStorageFeatures"/>
</require>
<require comment="Promoted from VK_KHR_dedicated_allocation">
<enum extends="VkStructureType" extnumber="128" offset="0" name="VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS"/>
<enum extends="VkStructureType" extnumber="128" offset="1" name="VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO"/>
<type name="VkMemoryDedicatedRequirements"/>
<type name="VkMemoryDedicatedAllocateInfo"/>
</require>
<require comment="Promoted from VK_KHR_device_group">
<enum extends="VkStructureType" extnumber="61" offset="0" name="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO"/>
<comment>offset 1 reserved for the old VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX enum</comment>
<comment>offset 2 reserved for the old VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX enum</comment>
<enum extends="VkStructureType" extnumber="61" offset="3" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO"/>
<enum extends="VkStructureType" extnumber="61" offset="4" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO"/>
<enum extends="VkStructureType" extnumber="61" offset="5" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO"/>
<enum extends="VkStructureType" extnumber="61" offset="6" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO"/>
<type name="VkPeerMemoryFeatureFlags"/>
<type name="VkPeerMemoryFeatureFlagBits"/>
<type name="VkMemoryAllocateFlags"/>
<type name="VkMemoryAllocateFlagBits"/>
<type name="VkMemoryAllocateFlagsInfo"/>
<type name="VkDeviceGroupRenderPassBeginInfo"/>
<type name="VkDeviceGroupCommandBufferBeginInfo"/>
<type name="VkDeviceGroupSubmitInfo"/>
<type name="VkDeviceGroupBindSparseInfo"/>
<command name="vkGetDeviceGroupPeerMemoryFeatures"/>
<command name="vkCmdSetDeviceMask"/>
<command name="vkCmdDispatchBase"/>
<enum bitpos="3" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT"/>
<enum bitpos="4" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_DISPATCH_BASE_BIT"/>
<enum extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_DISPATCH_BASE" alias="VK_PIPELINE_CREATE_DISPATCH_BASE_BIT"/>
<enum bitpos="2" extends="VkDependencyFlagBits" name="VK_DEPENDENCY_DEVICE_GROUP_BIT" comment="Dependency is across devices"/>
</require>
<require comment="Promoted from VK_KHR_device_group + VK_KHR_bind_memory2">
<enum extends="VkStructureType" extnumber="61" offset="13" name="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO"/>
<enum extends="VkStructureType" extnumber="61" offset="14" name="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO"/>
<type name="VkBindBufferMemoryDeviceGroupInfo"/>
<type name="VkBindImageMemoryDeviceGroupInfo"/>
<enum bitpos="6" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT" comment="Allows using VkBindImageMemoryDeviceGroupInfo::pSplitInstanceBindRegions when binding memory to the image"/>
</require>
<require comment="Promoted from VK_KHR_device_group_creation">
<enum extends="VkStructureType" extnumber="71" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES"/>
<enum extends="VkStructureType" extnumber="71" offset="1" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO"/>
<enum name="VK_MAX_DEVICE_GROUP_SIZE"/>
<type name="VkPhysicalDeviceGroupProperties"/>
<type name="VkDeviceGroupDeviceCreateInfo"/>
<command name="vkEnumeratePhysicalDeviceGroups"/>
<enum bitpos="1" extends="VkMemoryHeapFlagBits" name="VK_MEMORY_HEAP_MULTI_INSTANCE_BIT" comment="If set, heap allocations allocate multiple instances by default"/>
</require>
<require comment="Promoted from VK_KHR_get_memory_requirements2">
<enum extends="VkStructureType" extnumber="147" offset="0" name="VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2"/>
<enum extends="VkStructureType" extnumber="147" offset="1" name="VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2"/>
<enum extends="VkStructureType" extnumber="147" offset="2" name="VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2"/>
<enum extends="VkStructureType" extnumber="147" offset="3" name="VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2"/>
<enum extends="VkStructureType" extnumber="147" offset="4" name="VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2"/>
<type name="VkBufferMemoryRequirementsInfo2"/>
<type name="VkImageMemoryRequirementsInfo2"/>
<type name="VkImageSparseMemoryRequirementsInfo2"/>
<type name="VkMemoryRequirements2"/>
<type name="VkSparseImageMemoryRequirements2"/>
<command name="vkGetImageMemoryRequirements2"/>
<command name="vkGetBufferMemoryRequirements2"/>
<command name="vkGetImageSparseMemoryRequirements2"/>
</require>
<require comment="Promoted from VK_KHR_get_physical_device_properties2">
<enum extends="VkStructureType" extnumber="60" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2"/>
<enum extends="VkStructureType" extnumber="60" offset="1" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2"/>
<enum extends="VkStructureType" extnumber="60" offset="2" name="VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2"/>
<enum extends="VkStructureType" extnumber="60" offset="3" name="VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2"/>
<enum extends="VkStructureType" extnumber="60" offset="4" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2"/>
<enum extends="VkStructureType" extnumber="60" offset="5" name="VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2"/>
<enum extends="VkStructureType" extnumber="60" offset="6" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2"/>
<enum extends="VkStructureType" extnumber="60" offset="7" name="VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2"/>
<enum extends="VkStructureType" extnumber="60" offset="8" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2"/>
<type name="VkPhysicalDeviceFeatures2"/>
<type name="VkPhysicalDeviceProperties2"/>
<type name="VkFormatProperties2"/>
<type name="VkImageFormatProperties2"/>
<type name="VkPhysicalDeviceImageFormatInfo2"/>
<type name="VkQueueFamilyProperties2"/>
<type name="VkPhysicalDeviceMemoryProperties2"/>
<type name="VkSparseImageFormatProperties2"/>
<type name="VkPhysicalDeviceSparseImageFormatInfo2"/>
<command name="vkGetPhysicalDeviceFeatures2"/>
<command name="vkGetPhysicalDeviceProperties2"/>
<command name="vkGetPhysicalDeviceFormatProperties2"/>
<command name="vkGetPhysicalDeviceImageFormatProperties2"/>
<command name="vkGetPhysicalDeviceQueueFamilyProperties2"/>
<command name="vkGetPhysicalDeviceMemoryProperties2"/>
<command name="vkGetPhysicalDeviceSparseImageFormatProperties2"/>
</require>
<require comment="Promoted from VK_KHR_maintenance1">
<enum extends="VkResult" extnumber="70" offset="0" dir="-" name="VK_ERROR_OUT_OF_POOL_MEMORY"/>
<enum bitpos="14" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_TRANSFER_SRC_BIT" comment="Format can be used as the source image of image transfer commands"/>
<enum bitpos="15" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_TRANSFER_DST_BIT" comment="Format can be used as the destination image of image transfer commands"/>
<enum bitpos="5" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT" comment="The 3D image can be viewed as a 2D or 2D array image"/>
<command name="vkTrimCommandPool"/>
<comment>Additional dependent types / tokens extending enumerants, not explicitly mentioned</comment>
<type name="VkCommandPoolTrimFlags"/>
</require>
<require comment="Promoted from VK_KHR_maintenance2">
<enum bitpos="7" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT"/>
<enum bitpos="8" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_EXTENDED_USAGE_BIT"/>
<enum extends="VkStructureType" extnumber="118" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES"/>
<enum extends="VkStructureType" extnumber="118" offset="1" name="VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO"/>
<enum extends="VkStructureType" extnumber="118" offset="2" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO"/>
<enum extends="VkStructureType" extnumber="118" offset="3" name="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO"/>
<enum extends="VkImageLayout" extnumber="118" offset="0" name="VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL"/>
<enum extends="VkImageLayout" extnumber="118" offset="1" name="VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL"/>
<type name="VkPhysicalDevicePointClippingProperties"/>
<type name="VkPointClippingBehavior"/>
<type name="VkRenderPassInputAttachmentAspectCreateInfo"/>
<type name="VkInputAttachmentAspectReference"/>
<type name="VkImageViewUsageCreateInfo"/>
<type name="VkTessellationDomainOrigin"/>
<type name="VkPipelineTessellationDomainOriginStateCreateInfo"/>
</require>
<require comment="Promoted from VK_KHR_multiview">
<enum extends="VkStructureType" extnumber="54" offset="0" name="VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO"/>
<enum extends="VkStructureType" extnumber="54" offset="1" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES"/>
<enum extends="VkStructureType" extnumber="54" offset="2" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES"/>
<enum bitpos="1" extends="VkDependencyFlagBits" name="VK_DEPENDENCY_VIEW_LOCAL_BIT"/>
<type name="VkRenderPassMultiviewCreateInfo"/>
<type name="VkPhysicalDeviceMultiviewFeatures"/>
<type name="VkPhysicalDeviceMultiviewProperties"/>
</require>
<require comment="Promoted from VK_KHR_variable_pointers">
<enum extends="VkStructureType" extnumber="121" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES"/>
<type name="VkPhysicalDeviceVariablePointerFeatures"/>
<type name="VkPhysicalDeviceVariablePointersFeatures"/>
</require>
<require comment="Originally based on VK_KHR_protected_memory (extension 146), which was never published; thus the mystifying large value= numbers below. These are not aliased since they weren't actually promoted from an extension.">
<enum extends="VkStructureType" extnumber="146" offset="0" name="VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO"/>
<enum extends="VkStructureType" extnumber="146" offset="1" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES"/>
<enum extends="VkStructureType" extnumber="146" offset="2" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES"/>
<enum extends="VkStructureType" extnumber="146" offset="3" name="VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2"/>
<enum bitpos="4" extends="VkQueueFlagBits" name="VK_QUEUE_PROTECTED_BIT" comment="Queues may support protected operations"/>
<enum bitpos="0" extends="VkDeviceQueueCreateFlagBits" name="VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT" comment="Queue is a protected-capable device queue"/>
<enum bitpos="5" extends="VkMemoryPropertyFlagBits" name="VK_MEMORY_PROPERTY_PROTECTED_BIT" comment="Memory is protected"/>
<enum bitpos="3" extends="VkBufferCreateFlagBits" name="VK_BUFFER_CREATE_PROTECTED_BIT" comment="Buffer requires protected memory"/>
<enum bitpos="11" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_PROTECTED_BIT" comment="Image requires protected memory"/>
<enum bitpos="2" extends="VkCommandPoolCreateFlagBits" name="VK_COMMAND_POOL_CREATE_PROTECTED_BIT" comment="Command buffers allocated from pool are protected command buffers"/>
<type name="VkPhysicalDeviceProtectedMemoryFeatures"/>
<type name="VkPhysicalDeviceProtectedMemoryProperties"/>
<type name="VkDeviceQueueInfo2"/>
<type name="VkProtectedSubmitInfo"/>
<command name="vkGetDeviceQueue2"/>
</require>
<require comment="Promoted from VK_KHR_sampler_ycbcr_conversion">
<enum extends="VkStructureType" extnumber="157" offset="0" name="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO"/>
<enum extends="VkStructureType" extnumber="157" offset="1" name="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO"/>
<enum extends="VkStructureType" extnumber="157" offset="2" name="VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO"/>
<enum extends="VkStructureType" extnumber="157" offset="3" name="VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO"/>
<enum extends="VkStructureType" extnumber="157" offset="4" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES"/>
<enum extends="VkStructureType" extnumber="157" offset="5" name="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES"/>
<enum extends="VkObjectType" extnumber="157" offset="0" name="VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION"/>
<enum extends="VkFormat" extnumber="157" offset="0" name="VK_FORMAT_G8B8G8R8_422_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="1" name="VK_FORMAT_B8G8R8G8_422_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="2" name="VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="3" name="VK_FORMAT_G8_B8R8_2PLANE_420_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="4" name="VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="5" name="VK_FORMAT_G8_B8R8_2PLANE_422_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="6" name="VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="7" name="VK_FORMAT_R10X6_UNORM_PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="8" name="VK_FORMAT_R10X6G10X6_UNORM_2PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="9" name="VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="10" name="VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="11" name="VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="12" name="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="13" name="VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="14" name="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="15" name="VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="16" name="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="17" name="VK_FORMAT_R12X4_UNORM_PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="18" name="VK_FORMAT_R12X4G12X4_UNORM_2PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="19" name="VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="20" name="VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="21" name="VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="22" name="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="23" name="VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="24" name="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="25" name="VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="26" name="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16"/>
<enum extends="VkFormat" extnumber="157" offset="27" name="VK_FORMAT_G16B16G16R16_422_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="28" name="VK_FORMAT_B16G16R16G16_422_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="29" name="VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="30" name="VK_FORMAT_G16_B16R16_2PLANE_420_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="31" name="VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="32" name="VK_FORMAT_G16_B16R16_2PLANE_422_UNORM"/>
<enum extends="VkFormat" extnumber="157" offset="33" name="VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM"/>
<enum bitpos="4" extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_PLANE_0_BIT"/>
<enum bitpos="5" extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_PLANE_1_BIT"/>
<enum bitpos="6" extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_PLANE_2_BIT"/>
<enum bitpos="9" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_DISJOINT_BIT"/>
<enum bitpos="17" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT" comment="Format can have midpoint rather than cosited chroma samples"/>
<enum bitpos="18" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT" comment="Format can be used with linear filtering whilst color conversion is enabled"/>
<enum bitpos="19" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT" comment="Format can have different chroma, min and mag filters"/>
<enum bitpos="20" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT"/>
<enum bitpos="21" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT"/>
<enum bitpos="22" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_DISJOINT_BIT" comment="Format supports disjoint planes"/>
<enum bitpos="23" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT" comment="Format can have cosited rather than midpoint chroma samples"/>
<type name="VkSamplerYcbcrConversionCreateInfo"/>
<type name="VkSamplerYcbcrConversionInfo"/>
<type name="VkBindImagePlaneMemoryInfo"/>
<type name="VkImagePlaneMemoryRequirementsInfo"/>
<type name="VkPhysicalDeviceSamplerYcbcrConversionFeatures"/>
<type name="VkSamplerYcbcrConversionImageFormatProperties"/>
<command name="vkCreateSamplerYcbcrConversion"/>
<command name="vkDestroySamplerYcbcrConversion"/>
<comment>Additional dependent types / tokens extending enumerants, not explicitly mentioned</comment>
<type name="VkSamplerYcbcrConversion"/>
<type name="VkSamplerYcbcrModelConversion"/>
<type name="VkSamplerYcbcrRange"/>
<type name="VkChromaLocation"/>
</require>
<require comment="Promoted from VK_KHR_descriptor_update_template">
<enum extends="VkStructureType" extnumber="86" offset="0" name="VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO"/>
<enum extends="VkObjectType" extnumber="86" offset="0" name="VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE"/>
<command name="vkCreateDescriptorUpdateTemplate"/>
<command name="vkDestroyDescriptorUpdateTemplate"/>
<command name="vkUpdateDescriptorSetWithTemplate"/>
<type name="VkDescriptorUpdateTemplate"/>
<type name="VkDescriptorUpdateTemplateCreateFlags"/>
<type name="VkDescriptorUpdateTemplateType"/>
<type name="VkDescriptorUpdateTemplateEntry"/>
<type name="VkDescriptorUpdateTemplateCreateInfo"/>
</require>
<require comment="Promoted from VK_KHR_external_memory_capabilities">
<enum extends="VkStructureType" extnumber="72" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO"/>
<enum extends="VkStructureType" extnumber="72" offset="1" name="VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES"/>
<enum extends="VkStructureType" extnumber="72" offset="2" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO"/>
<enum extends="VkStructureType" extnumber="72" offset="3" name="VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES"/>
<enum extends="VkStructureType" extnumber="72" offset="4" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES"/>
<enum name="VK_LUID_SIZE"/>
<type name="VkExternalMemoryHandleTypeFlags"/>
<type name="VkExternalMemoryHandleTypeFlagBits"/>
<type name="VkExternalMemoryFeatureFlags"/>
<type name="VkExternalMemoryFeatureFlagBits"/>
<type name="VkExternalMemoryProperties"/>
<type name="VkPhysicalDeviceExternalImageFormatInfo"/>
<type name="VkExternalImageFormatProperties"/>
<type name="VkPhysicalDeviceExternalBufferInfo"/>
<type name="VkExternalBufferProperties"/>
<type name="VkPhysicalDeviceIDProperties"/>
<command name="vkGetPhysicalDeviceExternalBufferProperties"/>
</require>
<require comment="Promoted from VK_KHR_external_memory">
<enum extends="VkStructureType" extnumber="73" offset="0" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO"/>
<enum extends="VkStructureType" extnumber="73" offset="1" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO"/>
<enum extends="VkStructureType" extnumber="73" offset="2" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO"/>
<enum extends="VkResult" extnumber="73" offset="3" dir="-" name="VK_ERROR_INVALID_EXTERNAL_HANDLE"/>
<enum name="VK_QUEUE_FAMILY_EXTERNAL"/>
<type name="VkExternalMemoryImageCreateInfo"/>
<type name="VkExternalMemoryBufferCreateInfo"/>
<type name="VkExportMemoryAllocateInfo"/>
</require>
<require comment="Promoted from VK_KHR_external_fence_capabilities">
<enum extends="VkStructureType" extnumber="113" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO"/>
<enum extends="VkStructureType" extnumber="113" offset="1" name="VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES"/>
<type name="VkExternalFenceHandleTypeFlags"/>
<type name="VkExternalFenceHandleTypeFlagBits"/>
<type name="VkExternalFenceFeatureFlags"/>
<type name="VkExternalFenceFeatureFlagBits"/>
<type name="VkPhysicalDeviceExternalFenceInfo"/>
<type name="VkExternalFenceProperties"/>
<command name="vkGetPhysicalDeviceExternalFenceProperties"/>
</require>
<require comment="Promoted from VK_KHR_external_fence">
<enum extends="VkStructureType" extnumber="114" offset="0" name="VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO"/>
<type name="VkFenceImportFlags"/>
<type name="VkFenceImportFlagBits"/>
<type name="VkExportFenceCreateInfo"/>
</require>
<require comment="Promoted from VK_KHR_external_semaphore">
<enum extends="VkStructureType" extnumber="78" offset="0" name="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO"/>
<type name="VkSemaphoreImportFlags"/>
<type name="VkSemaphoreImportFlagBits"/>
<type name="VkExportSemaphoreCreateInfo"/>
</require>
<require comment="Promoted from VK_KHR_external_semaphore_capabilities">
<enum extends="VkStructureType" extnumber="77" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO"/>
<enum extends="VkStructureType" extnumber="77" offset="1" name="VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES"/>
<type name="VkExternalSemaphoreHandleTypeFlags"/>
<type name="VkExternalSemaphoreHandleTypeFlagBits"/>
<type name="VkExternalSemaphoreFeatureFlags"/>
<type name="VkExternalSemaphoreFeatureFlagBits"/>
<type name="VkPhysicalDeviceExternalSemaphoreInfo"/>
<type name="VkExternalSemaphoreProperties"/>
<command name="vkGetPhysicalDeviceExternalSemaphoreProperties"/>
</require>
<require comment="Promoted from VK_KHR_maintenance3">
<enum extends="VkStructureType" extnumber="169" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES"/>
<enum extends="VkStructureType" extnumber="169" offset="1" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT"/>
<type name="VkPhysicalDeviceMaintenance3Properties"/>
<type name="VkDescriptorSetLayoutSupport"/>
<command name="vkGetDescriptorSetLayoutSupport"/>
</require>
<require comment="Promoted from VK_KHR_shader_draw_parameters, with a feature support query added">
<enum extends="VkStructureType" extnumber="64" offset="0" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES"/>
<type name="VkPhysicalDeviceShaderDrawParameterFeatures"/>
<type name="VkPhysicalDeviceShaderDrawParametersFeatures"/>
</require>
</feature>
<feature api="vulkan" name="VK_VERSION_1_2" number="1.2" comment="Vulkan 1.2 core API interface definitions.">
<require>
<type name="VK_API_VERSION_1_2"/>
</require>
<require>
<enum extends="VkStructureType" value="49" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES"/>
<enum extends="VkStructureType" value="50" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES"/>
<enum extends="VkStructureType" value="51" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES"/>
<enum extends="VkStructureType" value="52" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES"/>
<type name="VkPhysicalDeviceVulkan11Features"/>
<type name="VkPhysicalDeviceVulkan11Properties"/>
<type name="VkPhysicalDeviceVulkan12Features"/>
<type name="VkPhysicalDeviceVulkan12Properties"/>
</require>
<require comment="Promoted from VK_KHR_image_format_list (extension 148)">
<enum offset="0" extends="VkStructureType" extnumber="148" name="VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO"/>
<type name="VkImageFormatListCreateInfo"/>
</require>
<require comment="Promoted from VK_KHR_sampler_mirror_clamp_to_edge (extension 15)">
<enum value="4" extends="VkSamplerAddressMode" name="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE" comment="No need to add an extnumber attribute, since this uses a core enum value"/>
</require>
<require comment="Promoted from VK_KHR_draw_indirect_count (extension 170)">
<command name="vkCmdDrawIndirectCount"/>
<command name="vkCmdDrawIndexedIndirectCount"/>
</require>
<require comment="Promoted from VK_KHR_create_renderpass2 (extension 110)">
<enum offset="0" extends="VkStructureType" extnumber="110" name="VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2"/>
<enum offset="1" extends="VkStructureType" extnumber="110" name="VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2"/>
<enum offset="2" extends="VkStructureType" extnumber="110" name="VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2"/>
<enum offset="3" extends="VkStructureType" extnumber="110" name="VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2"/>
<enum offset="4" extends="VkStructureType" extnumber="110" name="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2"/>
<enum offset="5" extends="VkStructureType" extnumber="110" name="VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO"/>
<enum offset="6" extends="VkStructureType" extnumber="110" name="VK_STRUCTURE_TYPE_SUBPASS_END_INFO"/>
<command name="vkCreateRenderPass2"/>
<command name="vkCmdBeginRenderPass2"/>
<command name="vkCmdNextSubpass2"/>
<command name="vkCmdEndRenderPass2"/>
<type name="VkRenderPassCreateInfo2"/>
<type name="VkAttachmentDescription2"/>
<type name="VkAttachmentReference2"/>
<type name="VkSubpassDescription2"/>
<type name="VkSubpassDependency2"/>
<type name="VkSubpassBeginInfo"/>
<type name="VkSubpassEndInfo"/>
</require>
<require comment="Promoted from VK_KHR_8bit_storage (extension 178)">
<enum offset="0" extends="VkStructureType" extnumber="178" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES"/>
<type name="VkPhysicalDevice8BitStorageFeatures"/>
</require>
<require comment="Promoted from VK_KHR_driver_properties (extension 197)">
<enum offset="0" extends="VkStructureType" extnumber="197" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES"/>
<enum name="VK_MAX_DRIVER_NAME_SIZE"/>
<enum name="VK_MAX_DRIVER_INFO_SIZE"/>
<type name="VkDriverId"/>
<type name="VkConformanceVersion"/>
<type name="VkPhysicalDeviceDriverProperties"/>
</require>
<require comment="Promoted from VK_KHR_shader_atomic_int64 (extension 181)">
<enum offset="0" extends="VkStructureType" extnumber="181" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES"/>
<type name="VkPhysicalDeviceShaderAtomicInt64Features"/>
</require>
<require comment="Promoted from VK_KHR_shader_float16_int8 (extension 83)">
<enum offset="0" extends="VkStructureType" extnumber="83" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES"/>
<type name="VkPhysicalDeviceShaderFloat16Int8Features"/>
</require>
<require comment="Promoted from VK_KHR_shader_float_controls (extension 198)">
<enum offset="0" extends="VkStructureType" extnumber="198" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES"/>
<type name="VkPhysicalDeviceFloatControlsProperties"/>
<type name="VkShaderFloatControlsIndependence"/>
</require>
<require comment="Promoted from VK_EXT_descriptor_indexing (extension 162)">
<enum offset="0" extends="VkStructureType" extnumber="162" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO"/>
<enum offset="1" extends="VkStructureType" extnumber="162" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES"/>
<enum offset="2" extends="VkStructureType" extnumber="162" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES"/>
<enum offset="3" extends="VkStructureType" extnumber="162" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO"/>
<enum offset="4" extends="VkStructureType" extnumber="162" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT"/>
<enum bitpos="1" extends="VkDescriptorPoolCreateFlagBits" name="VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT"/>
<enum bitpos="1" extends="VkDescriptorSetLayoutCreateFlagBits" name="VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT"/>
<enum offset="0" dir="-" extends="VkResult" extnumber="162" name="VK_ERROR_FRAGMENTATION"/>
<type name="VkDescriptorSetLayoutBindingFlagsCreateInfo"/>
<type name="VkPhysicalDeviceDescriptorIndexingFeatures"/>
<type name="VkPhysicalDeviceDescriptorIndexingProperties"/>
<type name="VkDescriptorSetVariableDescriptorCountAllocateInfo"/>
<type name="VkDescriptorSetVariableDescriptorCountLayoutSupport"/>
<type name="VkDescriptorBindingFlagBits"/>
<type name="VkDescriptorBindingFlags"/>
</require>
<require comment="Promoted from VK_KHR_depth_stencil_resolve (extension 200)">
<enum offset="0" extends="VkStructureType" extnumber="200" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES"/>
<enum offset="1" extends="VkStructureType" extnumber="200" name="VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE"/>
<type name="VkSubpassDescriptionDepthStencilResolve"/>
<type name="VkPhysicalDeviceDepthStencilResolveProperties"/>
<type name="VkResolveModeFlagBits"/>
<type name="VkResolveModeFlags"/>
</require>
<require comment="Promoted from VK_EXT_scalar_block_layout (extension 222))">
<type name="VkPhysicalDeviceScalarBlockLayoutFeatures"/>
<enum offset="0" extends="VkStructureType" extnumber="222" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES"/>
</require>
<require comment="Promoted from VK_EXT_shader_viewport_index_layer, which has no API (extension 163)"/>
<require comment="Promoted from VK_EXT_separate_stencil_usage (extension 247)">
<enum offset="0" extends="VkStructureType" extnumber="247" name="VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO"/>
<type name="VkImageStencilUsageCreateInfo"/>
</require>
<require comment="Promoted from VK_EXT_sampler_filter_minmax (extension 131)">
<enum offset="0" extends="VkStructureType" extnumber="131" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES"/>
<enum offset="1" extends="VkStructureType" extnumber="131" name="VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO"/>
<enum bitpos="16" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT" comment="Format can be used with min/max reduction filtering"/>
<type name="VkSamplerReductionMode"/>
<type name="VkSamplerReductionModeCreateInfo"/>
<type name="VkPhysicalDeviceSamplerFilterMinmaxProperties"/>
</require>
<require comment="Promoted from VK_KHR_vulkan_memory_model (extension 212)">
<enum offset="0" extends="VkStructureType" extnumber="212" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES"/>
<type name="VkPhysicalDeviceVulkanMemoryModelFeatures"/>
</require>
<require comment="Promoted from VK_KHR_imageless_framebuffer (extension 109)">
<type name="VkPhysicalDeviceImagelessFramebufferFeatures"/>
<type name="VkFramebufferAttachmentsCreateInfo"/>
<type name="VkFramebufferAttachmentImageInfo"/>
<type name="VkRenderPassAttachmentBeginInfo"/>
<enum offset="0" extends="VkStructureType" extnumber="109" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES"/>
<enum offset="1" extends="VkStructureType" extnumber="109" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO"/>
<enum offset="2" extends="VkStructureType" extnumber="109" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO"/>
<enum offset="3" extends="VkStructureType" extnumber="109" name="VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO"/>
<enum bitpos="0" extends="VkFramebufferCreateFlagBits" name="VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT"/>
</require>
<require comment="Promoted from VK_KHR_uniform_buffer_standard_layout (extension 254)">
<type name="VkPhysicalDeviceUniformBufferStandardLayoutFeatures"/>
<enum offset="0" extends="VkStructureType" extnumber="254" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES"/>
</require>
<require comment="Promoted from VK_KHR_shader_subgroup_extended_types (extension 176)">
<enum offset="0" extends="VkStructureType" extnumber="176" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES"/>
<type name="VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures"/>
</require>
<require comment="Promoted from VK_KHR_spirv_1_4 (extension 237)">
</require>
<require comment="Promoted from VK_KHR_separate_depth_stencil_layouts (extension 242)">
<enum offset="0" extends="VkStructureType" extnumber="242" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES"/>
<enum offset="1" extends="VkStructureType" extnumber="242" name="VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT"/>
<enum offset="2" extends="VkStructureType" extnumber="242" name="VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT"/>
<enum offset="0" extends="VkImageLayout" extnumber="242" name="VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL"/>
<enum offset="1" extends="VkImageLayout" extnumber="242" name="VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL"/>
<enum offset="2" extends="VkImageLayout" extnumber="242" name="VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL"/>
<enum offset="3" extends="VkImageLayout" extnumber="242" name="VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL"/>
<type name="VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures"/>
<type name="VkAttachmentReferenceStencilLayout"/>
<type name="VkAttachmentDescriptionStencilLayout"/>
</require>
<require comment="Promoted from VK_EXT_host_query_reset (extension 262)">
<enum offset="0" extends="VkStructureType" extnumber="262" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES"/>
<type name="VkPhysicalDeviceHostQueryResetFeatures"/>
<command name="vkResetQueryPool"/>
</require>
<require comment="Promoted from VK_KHR_timeline_semaphore (extension 208)">
<enum offset="0" extends="VkStructureType" extnumber="208" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES"/>
<enum offset="1" extends="VkStructureType" extnumber="208" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES"/>
<enum offset="2" extends="VkStructureType" extnumber="208" name="VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO"/>
<enum offset="3" extends="VkStructureType" extnumber="208" name="VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO"/>
<enum offset="4" extends="VkStructureType" extnumber="208" name="VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO"/>
<enum offset="5" extends="VkStructureType" extnumber="208" name="VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO"/>
<type name="VkSemaphoreType"/>
<type name="VkPhysicalDeviceTimelineSemaphoreFeatures"/>
<type name="VkPhysicalDeviceTimelineSemaphoreProperties"/>
<type name="VkSemaphoreTypeCreateInfo"/>
<type name="VkTimelineSemaphoreSubmitInfo"/>
<type name="VkSemaphoreWaitFlagBits"/>
<type name="VkSemaphoreWaitFlags"/>
<type name="VkSemaphoreWaitInfo"/>
<type name="VkSemaphoreSignalInfo"/>
<command name="vkGetSemaphoreCounterValue"/>
<command name="vkWaitSemaphores"/>
<command name="vkSignalSemaphore"/>
</require>
<require comment="Promoted from VK_KHR_buffer_device_address (extension 258)">
<enum offset="0" extends="VkStructureType" extnumber="258" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES"/>
<enum offset="1" extends="VkStructureType" extnumber="245" name="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO"/>
<enum offset="2" extends="VkStructureType" extnumber="258" name="VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO"/>
<enum offset="3" extends="VkStructureType" extnumber="258" name="VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO"/>
<enum offset="4" extends="VkStructureType" extnumber="258" name="VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO"/>
<enum bitpos="17" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT"/>
<enum bitpos="4" extends="VkBufferCreateFlagBits" name="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT"/>
<enum bitpos="1" extends="VkMemoryAllocateFlagBits" name="VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT"/>
<enum bitpos="2" extends="VkMemoryAllocateFlagBits" name="VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT"/>
<enum offset="0" dir="-" extends="VkResult" extnumber="258" name="VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS"/>
<type name="VkPhysicalDeviceBufferDeviceAddressFeatures"/>
<type name="VkBufferDeviceAddressInfo"/>
<type name="VkBufferOpaqueCaptureAddressCreateInfo"/>
<type name="VkMemoryOpaqueCaptureAddressAllocateInfo"/>
<type name="VkDeviceMemoryOpaqueCaptureAddressInfo"/>
<command name="vkGetBufferDeviceAddress"/>
<command name="vkGetBufferOpaqueCaptureAddress"/>
<command name="vkGetDeviceMemoryOpaqueCaptureAddress"/>
</require>
</feature>
<extensions comment="Vulkan extension interface definitions">
<extension name="VK_KHR_surface" number="1" type="instance" author="KHR" contact="James Jones @cubanismo,Ian Elliott @ianelliottus" supported="vulkan">
<require>
<enum value="25" name="VK_KHR_SURFACE_SPEC_VERSION"/>
<enum value=""VK_KHR_surface"" name="VK_KHR_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkResult" dir="-" name="VK_ERROR_SURFACE_LOST_KHR"/>
<enum offset="1" extends="VkResult" dir="-" name="VK_ERROR_NATIVE_WINDOW_IN_USE_KHR"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_SURFACE_KHR"/>
<type name="VkSurfaceKHR"/>
<type name="VkSurfaceTransformFlagBitsKHR"/>
<type name="VkPresentModeKHR"/>
<type name="VkColorSpaceKHR"/>
<type name="VkCompositeAlphaFlagBitsKHR"/>
<type name="VkCompositeAlphaFlagsKHR"/>
<type name="VkSurfaceCapabilitiesKHR"/>
<type name="VkSurfaceFormatKHR"/>
<command name="vkDestroySurfaceKHR"/>
<command name="vkGetPhysicalDeviceSurfaceSupportKHR"/>
<command name="vkGetPhysicalDeviceSurfaceCapabilitiesKHR"/>
<command name="vkGetPhysicalDeviceSurfaceFormatsKHR"/>
<command name="vkGetPhysicalDeviceSurfacePresentModesKHR"/>
</require>
</extension>
<extension name="VK_KHR_swapchain" number="2" type="device" requires="VK_KHR_surface" author="KHR" contact="James Jones @cubanismo,Ian Elliott @ianelliottus" supported="vulkan">
<require>
<enum value="70" name="VK_KHR_SWAPCHAIN_SPEC_VERSION"/>
<enum value=""VK_KHR_swapchain"" name="VK_KHR_SWAPCHAIN_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_INFO_KHR"/>
<enum offset="2" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_PRESENT_SRC_KHR"/>
<enum offset="3" extends="VkResult" name="VK_SUBOPTIMAL_KHR"/>
<enum offset="4" extends="VkResult" dir="-" name="VK_ERROR_OUT_OF_DATE_KHR"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_SWAPCHAIN_KHR"/>
<type name="VkSwapchainCreateFlagBitsKHR"/>
<type name="VkSwapchainCreateFlagsKHR"/>
<type name="VkSwapchainCreateInfoKHR"/>
<type name="VkSwapchainKHR"/>
<type name="VkPresentInfoKHR"/>
<command name="vkCreateSwapchainKHR"/>
<command name="vkDestroySwapchainKHR"/>
<command name="vkGetSwapchainImagesKHR"/>
<command name="vkAcquireNextImageKHR"/>
<command name="vkQueuePresentKHR"/>
</require>
<require feature="VK_VERSION_1_1">
<comment>This duplicates definitions in VK_KHR_device_group below</comment>
<enum extends="VkStructureType" extnumber="61" offset="7" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR"/>
<enum extends="VkStructureType" extnumber="61" offset="8" name="VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR"/>
<enum extends="VkStructureType" extnumber="61" offset="9" name="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR"/>
<enum extends="VkStructureType" extnumber="61" offset="10" name="VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR"/>
<enum extends="VkStructureType" extnumber="61" offset="11" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR"/>
<enum extends="VkStructureType" extnumber="61" offset="12" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR"/>
<enum bitpos="0" extends="VkSwapchainCreateFlagBitsKHR" name="VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR" comment="Allow images with VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT"/>
<type name="VkImageSwapchainCreateInfoKHR"/>
<type name="VkBindImageMemorySwapchainInfoKHR"/>
<type name="VkAcquireNextImageInfoKHR"/>
<type name="VkDeviceGroupPresentModeFlagBitsKHR"/>
<type name="VkDeviceGroupPresentModeFlagsKHR"/>
<type name="VkDeviceGroupPresentCapabilitiesKHR"/>
<type name="VkDeviceGroupPresentInfoKHR"/>
<type name="VkDeviceGroupSwapchainCreateInfoKHR"/>
<command name="vkGetDeviceGroupPresentCapabilitiesKHR"/>
<command name="vkGetDeviceGroupSurfacePresentModesKHR"/>
<command name="vkGetPhysicalDevicePresentRectanglesKHR"/>
<command name="vkAcquireNextImage2KHR"/>
<enum bitpos="1" extends="VkSwapchainCreateFlagBitsKHR" name="VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR" comment="Swapchain is protected"/>
</require>
</extension>
<extension name="VK_KHR_display" number="3" type="instance" requires="VK_KHR_surface" author="KHR" contact="James Jones @cubanismo,Norbert Nopper @FslNopper" supported="vulkan">
<require>
<enum value="23" name="VK_KHR_DISPLAY_SPEC_VERSION"/>
<enum value=""VK_KHR_display"" name="VK_KHR_DISPLAY_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_DISPLAY_KHR"/>
<enum offset="1" extends="VkObjectType" name="VK_OBJECT_TYPE_DISPLAY_MODE_KHR"/>
<type name="VkDisplayKHR"/>
<type name="VkDisplayModeCreateFlagsKHR"/>
<type name="VkDisplayModeCreateInfoKHR"/>
<type name="VkDisplayModeKHR"/>
<type name="VkDisplayModeParametersKHR"/>
<type name="VkDisplayModePropertiesKHR"/>
<type name="VkDisplayPlaneAlphaFlagBitsKHR"/>
<type name="VkDisplayPlaneAlphaFlagsKHR"/>
<type name="VkDisplayPlaneCapabilitiesKHR"/>
<type name="VkDisplayPlanePropertiesKHR"/>
<type name="VkDisplayPropertiesKHR"/>
<type name="VkDisplaySurfaceCreateFlagsKHR"/>
<type name="VkDisplaySurfaceCreateInfoKHR"/>
<type name="VkSurfaceTransformFlagsKHR"/>
<command name="vkGetPhysicalDeviceDisplayPropertiesKHR"/>
<command name="vkGetPhysicalDeviceDisplayPlanePropertiesKHR"/>
<command name="vkGetDisplayPlaneSupportedDisplaysKHR"/>
<command name="vkGetDisplayModePropertiesKHR"/>
<command name="vkCreateDisplayModeKHR"/>
<command name="vkGetDisplayPlaneCapabilitiesKHR"/>
<command name="vkCreateDisplayPlaneSurfaceKHR"/>
</require>
</extension>
<extension name="VK_KHR_display_swapchain" number="4" type="device" requires="VK_KHR_swapchain,VK_KHR_display" author="KHR" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="10" name="VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION"/>
<enum value=""VK_KHR_display_swapchain"" name="VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR"/>
<enum offset="1" extends="VkResult" dir="-" name="VK_ERROR_INCOMPATIBLE_DISPLAY_KHR"/>
<type name="VkDisplayPresentInfoKHR"/>
<command name="vkCreateSharedSwapchainsKHR"/>
</require>
</extension>
<extension name="VK_KHR_xlib_surface" number="5" type="instance" requires="VK_KHR_surface" platform="xlib" author="KHR" contact="Jesse Hall @critsec,Ian Elliott @ianelliottus" supported="vulkan">
<require>
<enum value="6" name="VK_KHR_XLIB_SURFACE_SPEC_VERSION"/>
<enum value=""VK_KHR_xlib_surface"" name="VK_KHR_XLIB_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR"/>
<type name="VkXlibSurfaceCreateFlagsKHR"/>
<type name="VkXlibSurfaceCreateInfoKHR"/>
<command name="vkCreateXlibSurfaceKHR"/>
<command name="vkGetPhysicalDeviceXlibPresentationSupportKHR"/>
</require>
</extension>
<extension name="VK_KHR_xcb_surface" number="6" type="instance" requires="VK_KHR_surface" platform="xcb" author="KHR" contact="Jesse Hall @critsec,Ian Elliott @ianelliottus" supported="vulkan">
<require>
<enum value="6" name="VK_KHR_XCB_SURFACE_SPEC_VERSION"/>
<enum value=""VK_KHR_xcb_surface"" name="VK_KHR_XCB_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR"/>
<type name="VkXcbSurfaceCreateFlagsKHR"/>
<type name="VkXcbSurfaceCreateInfoKHR"/>
<command name="vkCreateXcbSurfaceKHR"/>
<command name="vkGetPhysicalDeviceXcbPresentationSupportKHR"/>
</require>
</extension>
<extension name="VK_KHR_wayland_surface" number="7" type="instance" requires="VK_KHR_surface" platform="wayland" author="KHR" contact="Jesse Hall @critsec,Ian Elliott @ianelliottus" supported="vulkan">
<require>
<enum value="6" name="VK_KHR_WAYLAND_SURFACE_SPEC_VERSION"/>
<enum value=""VK_KHR_wayland_surface"" name="VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR"/>
<type name="VkWaylandSurfaceCreateFlagsKHR"/>
<type name="VkWaylandSurfaceCreateInfoKHR"/>
<command name="vkCreateWaylandSurfaceKHR"/>
<command name="vkGetPhysicalDeviceWaylandPresentationSupportKHR"/>
</require>
</extension>
<extension name="VK_KHR_mir_surface" number="8" type="instance" requires="VK_KHR_surface" author="KHR" supported="disabled" comment="Extension permanently disabled. Extension number should not be reused">
<require>
<enum value="4" name="VK_KHR_MIR_SURFACE_SPEC_VERSION"/>
<enum value=""VK_KHR_mir_surface"" name="VK_KHR_MIR_SURFACE_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_android_surface" number="9" type="instance" requires="VK_KHR_surface" platform="android" author="KHR" contact="Jesse Hall @critsec" supported="vulkan">
<require>
<enum value="6" name="VK_KHR_ANDROID_SURFACE_SPEC_VERSION"/>
<enum value=""VK_KHR_android_surface"" name="VK_KHR_ANDROID_SURFACE_EXTENSION_NAME"/>
<type name="ANativeWindow"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR"/>
<type name="VkAndroidSurfaceCreateFlagsKHR"/>
<type name="VkAndroidSurfaceCreateInfoKHR"/>
<command name="vkCreateAndroidSurfaceKHR"/>
</require>
</extension>
<extension name="VK_KHR_win32_surface" number="10" type="instance" requires="VK_KHR_surface" platform="win32" author="KHR" contact="Jesse Hall @critsec,Ian Elliott @ianelliottus" supported="vulkan">
<require>
<enum value="6" name="VK_KHR_WIN32_SURFACE_SPEC_VERSION"/>
<enum value=""VK_KHR_win32_surface"" name="VK_KHR_WIN32_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR"/>
<type name="VkWin32SurfaceCreateFlagsKHR"/>
<type name="VkWin32SurfaceCreateInfoKHR"/>
<command name="vkCreateWin32SurfaceKHR"/>
<command name="vkGetPhysicalDeviceWin32PresentationSupportKHR"/>
</require>
</extension>
<extension name="VK_ANDROID_native_buffer" number="11" type="device" author="ANDROID" platform="android" contact="Jesse Hall @critsec" supported="disabled">
<require>
<comment>VK_ANDROID_native_buffer is used between the Android Vulkan loader and drivers to implement the WSI extensions. It isn't exposed to applications and uses types that aren't part of Android's stable public API, so it is left disabled to keep it out of the standard Vulkan headers.</comment>
<enum value="8" name="VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION"/>
<enum value="11" name="VK_ANDROID_NATIVE_BUFFER_NUMBER"/>
<enum value=""VK_ANDROID_native_buffer"" name="VK_ANDROID_NATIVE_BUFFER_NAME"/>
<enum name="VK_ANDROID_NATIVE_BUFFER_EXTENSION_NAME" alias="VK_ANDROID_NATIVE_BUFFER_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID"/>
<type name="VkNativeBufferANDROID"/>
<type name="VkSwapchainImageCreateInfoANDROID"/>
<type name="VkPhysicalDevicePresentationPropertiesANDROID"/>
<type name="VkNativeBufferUsage2ANDROID"/>
<type name="VkSwapchainImageUsageFlagBitsANDROID"/>
<type name="VkSwapchainImageUsageFlagsANDROID"/>
<command name="vkGetSwapchainGrallocUsageANDROID"/>
<command name="vkAcquireImageANDROID"/>
<command name="vkQueueSignalReleaseImageANDROID"/>
<command name="vkGetSwapchainGrallocUsage2ANDROID"/>
</require>
</extension>
<extension name="VK_EXT_debug_report" number="12" type="instance" author="GOOGLE" contact="Courtney Goeltzenleuchter @courtney-g" specialuse="debugging" supported="vulkan" deprecatedby="VK_EXT_debug_utils">
<require>
<enum value="10" name="VK_EXT_DEBUG_REPORT_SPEC_VERSION"/>
<enum value=""VK_EXT_debug_report"" name="VK_EXT_DEBUG_REPORT_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT"/>
<enum alias="VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT" comment="Backwards-compatible alias containing a typo"/>
<enum offset="1" extends="VkResult" dir="-" name="VK_ERROR_VALIDATION_FAILED_EXT"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT"/>
<type name="VkDebugReportCallbackEXT"/>
<type name="PFN_vkDebugReportCallbackEXT"/>
<type name="VkDebugReportFlagBitsEXT"/>
<type name="VkDebugReportFlagsEXT"/>
<type name="VkDebugReportObjectTypeEXT"/>
<type name="VkDebugReportCallbackCreateInfoEXT"/>
<command name="vkCreateDebugReportCallbackEXT"/>
<command name="vkDestroyDebugReportCallbackEXT"/>
<command name="vkDebugReportMessageEXT"/>
</require>
<require feature="VK_VERSION_1_1">
<comment>This duplicates definitions in other extensions, below</comment>
<enum extends="VkDebugReportObjectTypeEXT" extnumber="157" offset="0" name="VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT"/>
<enum extends="VkDebugReportObjectTypeEXT" extnumber="86" offset="0" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT"/>
</require>
</extension>
<extension name="VK_NV_glsl_shader" number="13" type="device" author="NV" contact="Piers Daniell @pdaniell-nv" supported="vulkan" deprecatedby="">
<require>
<enum value="1" name="VK_NV_GLSL_SHADER_SPEC_VERSION"/>
<enum value=""VK_NV_glsl_shader"" name="VK_NV_GLSL_SHADER_EXTENSION_NAME"/>
<enum offset="0" extends="VkResult" dir="-" name="VK_ERROR_INVALID_SHADER_NV"/>
</require>
</extension>
<extension name="VK_EXT_depth_range_unrestricted" type="device" number="14" author="NV" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION"/>
<enum value=""VK_EXT_depth_range_unrestricted"" name="VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_sampler_mirror_clamp_to_edge" type="device" number="15" author="KHR" contact="Tobias Hector @tobski" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="3" name="VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION"/>
<enum value=""VK_KHR_sampler_mirror_clamp_to_edge"" name="VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME"/>
<enum value="4" extends="VkSamplerAddressMode" name="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE" comment="Note that this defines what was previously a core enum, and so uses the 'value' attribute rather than 'offset', and does not have a suffix. This is a special case, and should not be repeated"/>
<enum extends="VkSamplerAddressMode" name="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE_KHR" alias="VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE" comment="Alias introduced for consistency with extension suffixing rules"/>
</require>
</extension>
<extension name="VK_IMG_filter_cubic" number="16" type="device" author="IMG" contact="Tobias Hector @tobski" supported="vulkan">
<require>
<enum value="1" name="VK_IMG_FILTER_CUBIC_SPEC_VERSION"/>
<enum value=""VK_IMG_filter_cubic"" name="VK_IMG_FILTER_CUBIC_EXTENSION_NAME"/>
<enum offset="0" extends="VkFilter" name="VK_FILTER_CUBIC_IMG"/>
<enum bitpos="13" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG" comment="Format can be filtered with VK_FILTER_CUBIC_IMG when being sampled"/>
</require>
</extension>
<extension name="VK_AMD_extension_17" number="17" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_17_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_17"" name="VK_AMD_EXTENSION_17_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_18" number="18" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_18_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_18"" name="VK_AMD_EXTENSION_18_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_rasterization_order" number="19" type="device" author="AMD" contact="Daniel Rakos @drakos-amd" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION"/>
<enum value=""VK_AMD_rasterization_order"" name="VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD"/>
<type name="VkRasterizationOrderAMD"/>
<type name="VkPipelineRasterizationStateRasterizationOrderAMD"/>
</require>
</extension>
<extension name="VK_AMD_extension_20" number="20" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_20_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_20"" name="VK_AMD_EXTENSION_20_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_shader_trinary_minmax" number="21" type="device" author="AMD" contact="Qun Lin @linqun" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION"/>
<enum value=""VK_AMD_shader_trinary_minmax"" name="VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_shader_explicit_vertex_parameter" number="22" type="device" author="AMD" contact="Qun Lin @linqun" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION"/>
<enum value=""VK_AMD_shader_explicit_vertex_parameter"" name="VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_debug_marker" number="23" type="device" requires="VK_EXT_debug_report" author="Baldur Karlsson" contact="Baldur Karlsson @baldurk" specialuse="debugging" supported="vulkan" promotedto="VK_EXT_debug_utils">
<require>
<enum value="4" name="VK_EXT_DEBUG_MARKER_SPEC_VERSION"/>
<enum value=""VK_EXT_debug_marker"" name="VK_EXT_DEBUG_MARKER_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT"/>
<type name="VkDebugReportObjectTypeEXT"/>
<type name="VkDebugMarkerObjectNameInfoEXT"/>
<type name="VkDebugMarkerObjectTagInfoEXT"/>
<type name="VkDebugMarkerMarkerInfoEXT"/>
<command name="vkDebugMarkerSetObjectTagEXT"/>
<command name="vkDebugMarkerSetObjectNameEXT"/>
<command name="vkCmdDebugMarkerBeginEXT"/>
<command name="vkCmdDebugMarkerEndEXT"/>
<command name="vkCmdDebugMarkerInsertEXT"/>
</require>
</extension>
<extension name="VK_KHR_video_queue" number="24" type="device" requires="VK_KHR_get_physical_device_properties2,VK_KHR_sampler_ycbcr_conversion" author="KHR" contact="Tony Zlatinski @tzlatinski" provisional="true" platform="provisional" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_VIDEO_QUEUE_SPEC_VERSION"/>
<enum value=""VK_KHR_video_queue"" name="VK_KHR_VIDEO_QUEUE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_PROFILE_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_GET_MEMORY_PROPERTIES_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_BIND_MEMORY_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="9" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="10" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="11" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="12" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_QUEUE_FAMILY_PROPERTIES_2_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="13" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_PROFILES_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="14" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="15" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_VIDEO_SESSION_KHR" comment="VkVideoSessionKHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkObjectType" name="VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR" comment="VkVideoSessionParametersKHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="0" extends="VkQueryType" name="VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="4" extends="VkQueryResultFlagBits" name="VK_QUERY_RESULT_WITH_STATUS_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<type name="VkVideoSessionKHR"/>
<type name="VkVideoSessionParametersKHR"/>
<type name="VkVideoCodecOperationFlagBitsKHR"/>
<type name="VkVideoCodecOperationFlagsKHR"/>
<type name="VkVideoChromaSubsamplingFlagBitsKHR"/>
<type name="VkVideoChromaSubsamplingFlagsKHR"/>
<type name="VkVideoComponentBitDepthFlagBitsKHR"/>
<type name="VkVideoComponentBitDepthFlagsKHR"/>
<type name="VkVideoCapabilitiesFlagBitsKHR"/>
<type name="VkVideoCapabilitiesFlagsKHR"/>
<type name="VkVideoSessionCreateFlagBitsKHR"/>
<type name="VkVideoSessionCreateFlagsKHR"/>
<type name="VkVideoBeginCodingFlagsKHR"/>
<type name="VkVideoEndCodingFlagsKHR"/>
<type name="VkVideoCodingControlFlagBitsKHR"/>
<type name="VkVideoCodingControlFlagsKHR"/>
<type name="VkVideoCodingQualityPresetFlagBitsKHR"/>
<type name="VkVideoCodingQualityPresetFlagsKHR"/>
<type name="VkQueryResultStatusKHR"/>
<type name="VkVideoQueueFamilyProperties2KHR"/>
<type name="VkVideoProfileKHR"/>
<type name="VkVideoProfilesKHR"/>
<type name="VkVideoCapabilitiesKHR"/>
<type name="VkPhysicalDeviceVideoFormatInfoKHR"/>
<type name="VkVideoFormatPropertiesKHR"/>
<type name="VkVideoPictureResourceKHR"/>
<type name="VkVideoReferenceSlotKHR"/>
<type name="VkVideoGetMemoryPropertiesKHR"/>
<type name="VkVideoBindMemoryKHR"/>
<type name="VkVideoSessionCreateInfoKHR"/>
<type name="VkVideoSessionParametersCreateInfoKHR"/>
<type name="VkVideoSessionParametersUpdateInfoKHR"/>
<type name="VkVideoBeginCodingInfoKHR"/>
<type name="VkVideoEndCodingInfoKHR"/>
<type name="VkVideoCodingControlInfoKHR"/>
<command name="vkGetPhysicalDeviceVideoCapabilitiesKHR"/>
<command name="vkGetPhysicalDeviceVideoFormatPropertiesKHR"/>
<command name="vkCreateVideoSessionKHR"/>
<command name="vkDestroyVideoSessionKHR"/>
<command name="vkGetVideoSessionMemoryRequirementsKHR"/>
<command name="vkBindVideoSessionMemoryKHR"/>
<command name="vkCreateVideoSessionParametersKHR"/>
<command name="vkUpdateVideoSessionParametersKHR"/>
<command name="vkDestroyVideoSessionParametersKHR"/>
<command name="vkCmdBeginVideoCodingKHR"/>
<command name="vkCmdEndVideoCodingKHR"/>
<command name="vkCmdControlVideoCodingKHR"/>
</require>
</extension>
<extension name="VK_KHR_video_decode_queue" number="25" type="device" requires="VK_KHR_video_queue,VK_KHR_synchronization2" author="KHR" contact="[email protected]" provisional="true" platform="provisional" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION"/>
<enum value=""VK_KHR_video_decode_queue"" name="VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="5" extends="VkQueueFlagBits" name="VK_QUEUE_VIDEO_DECODE_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="26" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS "/>
<enum bitpos="35" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS" />
<enum bitpos="36" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="13" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_VIDEO_DECODE_SRC_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="14" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_VIDEO_DECODE_DST_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="10" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="11" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="12" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="25" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="26" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="0" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="2" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<type name="VkVideoDecodeFlagBitsKHR"/>
<type name="VkVideoDecodeFlagsKHR"/>
<type name="VkVideoDecodeInfoKHR"/>
<command name="vkCmdDecodeVideoKHR"/>
</require>
</extension>
<extension name="VK_KHR_video_encode_queue" number="300" type="device" requires="VK_KHR_video_queue,VK_KHR_synchronization2" author="KHR" contact="[email protected]" provisional="true" platform="provisional" supported="vulkan">
<require>
<enum value="2" name="VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION"/>
<enum value=""VK_KHR_video_encode_queue"" name="VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME"/>
<enum bitpos="27" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS" />
<enum bitpos="37" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS" />
<enum bitpos="38" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="6" extends="VkQueueFlagBits" name="VK_QUEUE_VIDEO_ENCODE_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="15" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="16" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="13" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="14" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="15" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="27" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="28" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="0" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="2" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="0" extends="VkQueryType" name="VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<type name="VkVideoEncodeFlagBitsKHR"/>
<type name="VkVideoEncodeFlagsKHR"/>
<type name="VkVideoEncodeInfoKHR"/>
<type name="VkVideoEncodeRateControlFlagBitsKHR"/>
<type name="VkVideoEncodeRateControlFlagsKHR"/>
<type name="VkVideoEncodeRateControlModeFlagBitsKHR"/>
<type name="VkVideoEncodeRateControlModeFlagsKHR"/>
<type name="VkVideoEncodeRateControlInfoKHR"/>
<command name="vkCmdEncodeVideoKHR"/>
</require>
</extension>
<extension name="VK_AMD_gcn_shader" number="26" type="device" author="AMD" contact="Dominik Witczak @dominikwitczakamd" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_GCN_SHADER_SPEC_VERSION"/>
<enum value=""VK_AMD_gcn_shader"" name="VK_AMD_GCN_SHADER_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_dedicated_allocation" number="27" type="device" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan" deprecatedby="VK_KHR_dedicated_allocation">
<require>
<enum value="1" name="VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION"/>
<enum value=""VK_NV_dedicated_allocation"" name="VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"/>
<type name="VkDedicatedAllocationImageCreateInfoNV"/>
<type name="VkDedicatedAllocationBufferCreateInfoNV"/>
<type name="VkDedicatedAllocationMemoryAllocateInfoNV"/>
</require>
</extension>
<extension name="VK_EXT_extension_28" number="28" author="NV" contact="Piers Daniell @pdaniell-nv" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_28_SPEC_VERSION"/>
<enum value=""VK_NV_extension_28"" name="VK_EXT_EXTENSION_28_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_transform_feedback" number="29" type="device" author="NV" contact="Piers Daniell @pdaniell-nv" specialuse="glemulation,d3demulation,devtools" supported="vulkan" requires="VK_KHR_get_physical_device_properties2">
<require>
<enum value="1" name="VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION"/>
<enum value=""VK_EXT_transform_feedback"" name="VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME"/>
<command name="vkCmdBindTransformFeedbackBuffersEXT"/>
<command name="vkCmdBeginTransformFeedbackEXT"/>
<command name="vkCmdEndTransformFeedbackEXT"/>
<command name="vkCmdBeginQueryIndexedEXT"/>
<command name="vkCmdEndQueryIndexedEXT"/>
<command name="vkCmdDrawIndirectByteCountEXT"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT"/>
<enum offset="4" extends="VkQueryType" name="VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT"/>
<enum bitpos="11" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT"/>
<enum bitpos="12" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT"/>
<enum bitpos="25" extends="VkAccessFlagBits" name="VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT"/>
<enum bitpos="26" extends="VkAccessFlagBits" name="VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT"/>
<enum bitpos="27" extends="VkAccessFlagBits" name="VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT"/>
<enum bitpos="24" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT"/>
<type name="VkPhysicalDeviceTransformFeedbackFeaturesEXT"/>
<type name="VkPhysicalDeviceTransformFeedbackPropertiesEXT"/>
<type name="VkPipelineRasterizationStateStreamCreateInfoEXT"/>
<type name="VkPipelineRasterizationStateStreamCreateFlagsEXT"/>
</require>
</extension>
<extension name="VK_NVX_extension_30" number="30" author="NVX" contact="Jeff Juliano @jjulianoatnv" supported="disabled">
<require>
<enum value="0" name="VK_NVX_EXTENSION_30_SPEC_VERSION"/>
<enum value=""VK_NVX_extension_30"" name="VK_NVX_EXTENSION_30_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NVX_image_view_handle" number="31" type="device" author="NVX" contact="Eric Werness @ewerness" supported="vulkan">
<require>
<enum value="2" name="VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION"/>
<enum value=""VK_NVX_image_view_handle"" name="VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX"/>
<type name="VkImageViewHandleInfoNVX"/>
<type name="VkImageViewAddressPropertiesNVX"/>
<command name="vkGetImageViewHandleNVX"/>
<command name="vkGetImageViewAddressNVX"/>
</require>
</extension>
<extension name="VK_AMD_extension_32" number="32" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_32_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_32"" name="VK_AMD_EXTENSION_32_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_33" number="33" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_33_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_33"" name="VK_AMD_EXTENSION_33_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_draw_indirect_count" number="34" type="device" author="AMD" contact="Daniel Rakos @drakos-amd" supported="vulkan" promotedto="VK_KHR_draw_indirect_count">
<require>
<enum value="2" name="VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION"/>
<enum value=""VK_AMD_draw_indirect_count"" name="VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME"/>
<command name="vkCmdDrawIndirectCountAMD"/>
<command name="vkCmdDrawIndexedIndirectCountAMD"/>
</require>
</extension>
<extension name="VK_AMD_extension_35" number="35" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_35_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_35"" name="VK_AMD_EXTENSION_35_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_negative_viewport_height" number="36" type="device" author="AMD" contact="Matthaeus G. Chajdas @anteru" supported="vulkan" obsoletedby="VK_KHR_maintenance1">
<require>
<enum value="1" name="VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION"/>
<enum value=""VK_AMD_negative_viewport_height"" name="VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_gpu_shader_half_float" number="37" type="device" author="AMD" contact="Dominik Witczak @dominikwitczakamd" supported="vulkan" deprecatedby="VK_KHR_shader_float16_int8">
<require>
<enum value="2" name="VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION"/>
<enum value=""VK_AMD_gpu_shader_half_float"" name="VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_shader_ballot" number="38" type="device" author="AMD" contact="Dominik Witczak @dominikwitczakamd" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_SHADER_BALLOT_SPEC_VERSION"/>
<enum value=""VK_AMD_shader_ballot"" name="VK_AMD_SHADER_BALLOT_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_video_encode_h264" number="39" type="device" requires="VK_KHR_video_encode_queue" author="KHR" contact="Ahmed Abdelkhalek @aabdelkh" provisional="true" platform="provisional" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION"/>
<enum value=""VK_EXT_video_encode_h264"" name="VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="16" extends="VkVideoCodecOperationFlagBitsKHR" name="VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<type name="VkVideoEncodeH264CapabilitiesFlagBitsEXT"/>
<type name="VkVideoEncodeH264CapabilitiesFlagsEXT"/>
<type name="VkVideoEncodeH264InputModeFlagBitsEXT"/>
<type name="VkVideoEncodeH264InputModeFlagsEXT"/>
<type name="VkVideoEncodeH264OutputModeFlagBitsEXT"/>
<type name="VkVideoEncodeH264OutputModeFlagsEXT"/>
<type name="VkVideoEncodeH264CreateFlagBitsEXT"/>
<type name="VkVideoEncodeH264CreateFlagsEXT"/>
<type name="VkVideoEncodeH264CapabilitiesEXT"/>
<type name="VkVideoEncodeH264SessionCreateInfoEXT"/>
<type name="VkVideoEncodeH264SessionParametersCreateInfoEXT"/>
<type name="VkVideoEncodeH264SessionParametersAddInfoEXT"/>
<type name="VkVideoEncodeH264VclFrameInfoEXT"/>
<type name="VkVideoEncodeH264EmitPictureParametersEXT"/>
<type name="VkVideoEncodeH264DpbSlotInfoEXT"/>
<type name="VkVideoEncodeH264NaluSliceEXT"/>
<type name="VkVideoEncodeH264ProfileEXT"/>
</require>
</extension>
<extension name="VK_EXT_video_decode_h264" number="41" type="device" requires="VK_KHR_video_decode_queue" author="KHR" contact="[email protected]" provisional="true" platform="provisional" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_VIDEO_DECODE_H264_SPEC_VERSION"/>
<enum value=""VK_EXT_video_decode_h264"" name="VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_CREATE_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_MVC_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="0" extends="VkVideoCodecOperationFlagBitsKHR" name="VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<type name="VkVideoDecodeH264FieldLayoutFlagBitsEXT"/>
<type name="VkVideoDecodeH264FieldLayoutFlagsEXT"/>
<type name="VkVideoDecodeH264CreateFlagsEXT"/>
<type name="VkVideoDecodeH264ProfileEXT"/>
<type name="VkVideoDecodeH264CapabilitiesEXT"/>
<type name="VkVideoDecodeH264SessionCreateInfoEXT"/>
<type name="VkVideoDecodeH264SessionParametersCreateInfoEXT"/>
<type name="VkVideoDecodeH264SessionParametersAddInfoEXT"/>
<type name="VkVideoDecodeH264PictureInfoEXT"/>
<type name="VkVideoDecodeH264MvcEXT"/>
<type name="VkVideoDecodeH264DpbSlotInfoEXT"/>
</require>
</extension>
<extension name="VK_AMD_texture_gather_bias_lod" number="42" author="AMD" contact="Rex Xu @amdrexu" supported="vulkan" type="device" requires="VK_KHR_get_physical_device_properties2">
<require>
<enum value="1" name="VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION"/>
<enum value=""VK_AMD_texture_gather_bias_lod"" name="VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD"/>
<type name="VkTextureLODGatherFormatPropertiesAMD"/>
</require>
</extension>
<extension name="VK_AMD_shader_info" number="43" author="AMD" contact="Jaakko Konttinen @jaakkoamd" supported="vulkan" specialuse="devtools" type="device">
<require>
<enum value="1" name="VK_AMD_SHADER_INFO_SPEC_VERSION"/>
<enum value=""VK_AMD_shader_info"" name="VK_AMD_SHADER_INFO_EXTENSION_NAME"/>
<type name="VkShaderInfoTypeAMD"/>
<type name="VkShaderResourceUsageAMD"/>
<type name="VkShaderStatisticsInfoAMD"/>
<command name="vkGetShaderInfoAMD"/>
</require>
</extension>
<extension name="VK_AMD_extension_44" number="44" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_44_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_44"" name="VK_AMD_EXTENSION_44_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_45" number="45" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_45_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_45"" name="VK_AMD_EXTENSION_45_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_46" number="46" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_46_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_46"" name="VK_AMD_EXTENSION_46_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_shader_image_load_store_lod" number="47" author="AMD" contact="Dominik Witczak @dominikwitczakamd" supported="vulkan" type="device">
<require>
<enum value="1" name="VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION"/>
<enum value=""VK_AMD_shader_image_load_store_lod"" name="VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NVX_extension_48" number="48" author="NVX" contact="James Jones @cubanismo" supported="disabled">
<require>
<enum value="0" name="VK_NVX_EXTENSION_48_SPEC_VERSION"/>
<enum value=""VK_NVX_extension_48"" name="VK_NVX_EXTENSION_48_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_GOOGLE_extension_49" number="49" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
<require>
<enum value="0" name="VK_GOOGLE_EXTENSION_49_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_extension_49"" name="VK_GOOGLE_EXTENSION_49_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_GGP_stream_descriptor_surface" number="50" type="instance" requires="VK_KHR_surface" platform="ggp" author="GGP" contact="Jean-Francois Roy @jfroy" supported="vulkan">
<require>
<enum value="1" name="VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION"/>
<enum value=""VK_GGP_stream_descriptor_surface"" name="VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP"/>
<type name="VkStreamDescriptorSurfaceCreateFlagsGGP"/>
<type name="VkStreamDescriptorSurfaceCreateInfoGGP"/>
<command name="vkCreateStreamDescriptorSurfaceGGP"/>
</require>
</extension>
<extension name="VK_NV_corner_sampled_image" number="51" author="NV" type="device" requires="VK_KHR_get_physical_device_properties2" contact="Daniel Koch @dgkoch" supported="vulkan">
<require>
<enum value="2" name="VK_NV_CORNER_SAMPLED_IMAGE_SPEC_VERSION"/>
<enum value=""VK_NV_corner_sampled_image"" name="VK_NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME"/>
<enum bitpos="13" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV"/>
<type name="VkPhysicalDeviceCornerSampledImageFeaturesNV"/>
</require>
</extension>
<extension name="VK_NV_extension_52" number="52" author="NV" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_52_SPEC_VERSION"/>
<enum value=""VK_NV_extension_52"" name="VK_NV_EXTENSION_52_EXTENSION_NAME"/>
<enum bitpos="0" extends="VkShaderModuleCreateFlagBits" name="VK_SHADER_MODULE_CREATE_RESERVED_0_BIT_NV"/>
<enum bitpos="2" extends="VkPipelineShaderStageCreateFlagBits" name="VK_PIPELINE_SHADER_STAGE_CREATE_RESERVED_2_BIT_NV"/>
</require>
</extension>
<extension name="VK_NV_extension_53" number="53" author="NV" contact="Jeff Bolz @jeffbolznv" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_53_SPEC_VERSION"/>
<enum value=""VK_NV_extension_53"" name="VK_NV_EXTENSION_53_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_multiview" number="54" type="device" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_MULTIVIEW_SPEC_VERSION"/>
<enum value=""VK_KHR_multiview"" name="VK_KHR_MULTIVIEW_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES"/>
<enum extends="VkDependencyFlagBits" name="VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR" alias="VK_DEPENDENCY_VIEW_LOCAL_BIT"/>
<type name="VkRenderPassMultiviewCreateInfoKHR"/>
<type name="VkPhysicalDeviceMultiviewFeaturesKHR"/>
<type name="VkPhysicalDeviceMultiviewPropertiesKHR"/>
</require>
</extension>
<extension name="VK_IMG_format_pvrtc" number="55" type="device" author="IMG" contact="Stuart Smith" supported="vulkan">
<require>
<enum value="1" name="VK_IMG_FORMAT_PVRTC_SPEC_VERSION"/>
<enum value=""VK_IMG_format_pvrtc"" name="VK_IMG_FORMAT_PVRTC_EXTENSION_NAME"/>
<enum offset="0" extends="VkFormat" name="VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG"/>
<enum offset="1" extends="VkFormat" name="VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG"/>
<enum offset="2" extends="VkFormat" name="VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG"/>
<enum offset="3" extends="VkFormat" name="VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG"/>
<enum offset="4" extends="VkFormat" name="VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG"/>
<enum offset="5" extends="VkFormat" name="VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG"/>
<enum offset="6" extends="VkFormat" name="VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG"/>
<enum offset="7" extends="VkFormat" name="VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG"/>
</require>
</extension>
<extension name="VK_NV_external_memory_capabilities" number="56" type="instance" author="NV" contact="James Jones @cubanismo" supported="vulkan" deprecatedby="VK_KHR_external_memory_capabilities">
<require>
<enum value="1" name="VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION"/>
<enum value=""VK_NV_external_memory_capabilities"" name="VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME"/>
<type name="VkExternalMemoryHandleTypeFlagsNV"/>
<type name="VkExternalMemoryHandleTypeFlagBitsNV"/>
<type name="VkExternalMemoryFeatureFlagsNV"/>
<type name="VkExternalMemoryFeatureFlagBitsNV"/>
<type name="VkExternalImageFormatPropertiesNV"/>
<command name="vkGetPhysicalDeviceExternalImageFormatPropertiesNV"/>
</require>
</extension>
<extension name="VK_NV_external_memory" number="57" type="device" requires="VK_NV_external_memory_capabilities" author="NV" contact="James Jones @cubanismo" supported="vulkan" deprecatedby="VK_KHR_external_memory">
<require>
<enum value="1" name="VK_NV_EXTERNAL_MEMORY_SPEC_VERSION"/>
<enum value=""VK_NV_external_memory"" name="VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV"/>
<type name="VkExternalMemoryImageCreateInfoNV"/>
<type name="VkExportMemoryAllocateInfoNV"/>
</require>
</extension>
<extension name="VK_NV_external_memory_win32" number="58" type="device" requires="VK_NV_external_memory" author="NV" contact="James Jones @cubanismo" platform="win32" supported="vulkan" deprecatedby="VK_KHR_external_memory_win32">
<require>
<enum value="1" name="VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION"/>
<enum value=""VK_NV_external_memory_win32"" name="VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV"/>
<type name="VkImportMemoryWin32HandleInfoNV"/>
<type name="VkExportMemoryWin32HandleInfoNV"/>
<command name="vkGetMemoryWin32HandleNV"/>
</require>
</extension>
<extension name="VK_NV_win32_keyed_mutex" number="59" type="device" requires="VK_NV_external_memory_win32" author="NV" contact="Carsten Rohde @crohde" platform="win32" supported="vulkan" promotedto="VK_KHR_win32_keyed_mutex">
<require>
<enum value="2" name="VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION"/>
<enum value=""VK_NV_win32_keyed_mutex"" name="VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV"/>
<type name="VkWin32KeyedMutexAcquireReleaseInfoNV"/>
</require>
</extension>
<extension name="VK_KHR_get_physical_device_properties2" number="60" type="instance" author="KHR" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="2" name="VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION"/>
<enum value=""VK_KHR_get_physical_device_properties2"" name="VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR" alias="VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR" alias="VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR" alias="VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR" alias="VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2"/>
<type name="VkPhysicalDeviceFeatures2KHR"/>
<type name="VkPhysicalDeviceProperties2KHR"/>
<type name="VkFormatProperties2KHR"/>
<type name="VkImageFormatProperties2KHR"/>
<type name="VkPhysicalDeviceImageFormatInfo2KHR"/>
<type name="VkQueueFamilyProperties2KHR"/>
<type name="VkPhysicalDeviceMemoryProperties2KHR"/>
<type name="VkSparseImageFormatProperties2KHR"/>
<type name="VkPhysicalDeviceSparseImageFormatInfo2KHR"/>
<command name="vkGetPhysicalDeviceFeatures2KHR"/>
<command name="vkGetPhysicalDeviceProperties2KHR"/>
<command name="vkGetPhysicalDeviceFormatProperties2KHR"/>
<command name="vkGetPhysicalDeviceImageFormatProperties2KHR"/>
<command name="vkGetPhysicalDeviceQueueFamilyProperties2KHR"/>
<command name="vkGetPhysicalDeviceMemoryProperties2KHR"/>
<command name="vkGetPhysicalDeviceSparseImageFormatProperties2KHR"/>
</require>
</extension>
<extension name="VK_KHR_device_group" number="61" type="device" author="KHR" requires="VK_KHR_device_group_creation" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="4" name="VK_KHR_DEVICE_GROUP_SPEC_VERSION"/>
<enum value=""VK_KHR_device_group"" name="VK_KHR_DEVICE_GROUP_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR" alias="VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR" alias="VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR" alias="VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR" alias="VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR" alias="VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO"/>
<type name="VkPeerMemoryFeatureFlagsKHR"/>
<type name="VkPeerMemoryFeatureFlagBitsKHR"/>
<enum extends="VkPeerMemoryFeatureFlagBits" name="VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR" alias="VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT"/>
<enum extends="VkPeerMemoryFeatureFlagBits" name="VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR" alias="VK_PEER_MEMORY_FEATURE_COPY_DST_BIT"/>
<enum extends="VkPeerMemoryFeatureFlagBits" name="VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR" alias="VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT"/>
<enum extends="VkPeerMemoryFeatureFlagBits" name="VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR" alias="VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT"/>
<type name="VkMemoryAllocateFlagsKHR"/>
<type name="VkMemoryAllocateFlagBitsKHR"/>
<enum extends="VkMemoryAllocateFlagBits" name="VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR" alias="VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT"/>
<type name="VkMemoryAllocateFlagsInfoKHR"/>
<type name="VkDeviceGroupRenderPassBeginInfoKHR"/>
<type name="VkDeviceGroupCommandBufferBeginInfoKHR"/>
<type name="VkDeviceGroupSubmitInfoKHR"/>
<type name="VkDeviceGroupBindSparseInfoKHR"/>
<command name="vkGetDeviceGroupPeerMemoryFeaturesKHR"/>
<command name="vkCmdSetDeviceMaskKHR"/>
<command name="vkCmdDispatchBaseKHR"/>
<enum extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR" alias="VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT"/>
<enum extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_DISPATCH_BASE_KHR" alias="VK_PIPELINE_CREATE_DISPATCH_BASE"/>
<enum extends="VkDependencyFlagBits" name="VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR" alias="VK_DEPENDENCY_DEVICE_GROUP_BIT"/>
</require>
<require extension="VK_KHR_bind_memory2">
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR" alias="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR" alias="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO"/>
<type name="VkBindBufferMemoryDeviceGroupInfoKHR"/>
<type name="VkBindImageMemoryDeviceGroupInfoKHR"/>
<enum extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR" alias="VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT"/>
</require>
<require extension="VK_KHR_surface">
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR"/>
<type name="VkDeviceGroupPresentModeFlagBitsKHR"/>
<type name="VkDeviceGroupPresentModeFlagsKHR"/>
<type name="VkDeviceGroupPresentCapabilitiesKHR"/>
<command name="vkGetDeviceGroupPresentCapabilitiesKHR"/>
<command name="vkGetDeviceGroupSurfacePresentModesKHR"/>
<command name="vkGetPhysicalDevicePresentRectanglesKHR"/>
</require>
<require extension="VK_KHR_swapchain">
<enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR"/>
<enum offset="9" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR"/>
<enum offset="10" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR"/>
<enum offset="11" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR"/>
<enum offset="12" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR"/>
<enum bitpos="0" extends="VkSwapchainCreateFlagBitsKHR" name="VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR" comment="Allow images with VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT"/>
<type name="VkImageSwapchainCreateInfoKHR"/>
<type name="VkBindImageMemorySwapchainInfoKHR"/>
<type name="VkAcquireNextImageInfoKHR"/>
<type name="VkDeviceGroupPresentInfoKHR"/>
<type name="VkDeviceGroupSwapchainCreateInfoKHR"/>
<command name="vkAcquireNextImage2KHR"/>
</require>
</extension>
<extension name="VK_EXT_validation_flags" number="62" type="instance" author="GOOGLE" contact="Tobin Ehlis @tobine" specialuse="debugging" supported="vulkan" deprecatedby="VK_EXT_validation_features">
<require>
<enum value="2" name="VK_EXT_VALIDATION_FLAGS_SPEC_VERSION"/>
<enum value=""VK_EXT_validation_flags"" name="VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT"/>
<type name="VkValidationFlagsEXT"/>
<type name="VkValidationCheckEXT"/>
</require>
</extension>
<extension name="VK_NN_vi_surface" number="63" type="instance" author="NN" contact="Mathias Heyer gitlab:@mheyer" requires="VK_KHR_surface" platform="vi" supported="vulkan">
<require>
<enum value="1" name="VK_NN_VI_SURFACE_SPEC_VERSION"/>
<enum value=""VK_NN_vi_surface"" name="VK_NN_VI_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN"/>
<type name="VkViSurfaceCreateFlagsNN"/>
<type name="VkViSurfaceCreateInfoNN"/>
<command name="vkCreateViSurfaceNN"/>
</require>
</extension>
<extension name="VK_KHR_shader_draw_parameters" number="64" type="device" author="KHR" contact="Daniel Koch @dgkoch" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION"/>
<enum value=""VK_KHR_shader_draw_parameters"" name="VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_shader_subgroup_ballot" number="65" type="device" author="NV" contact="Daniel Koch @dgkoch" supported="vulkan" deprecatedby="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION"/>
<enum value=""VK_EXT_shader_subgroup_ballot"" name="VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_shader_subgroup_vote" number="66" type="device" author="NV" contact="Daniel Koch @dgkoch" supported="vulkan" deprecatedby="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION"/>
<enum value=""VK_EXT_shader_subgroup_vote"" name="VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_texture_compression_astc_hdr" number="67" type="device" author="ARM" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" requires="VK_KHR_get_physical_device_properties2" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_SPEC_VERSION"/>
<enum value=""VK_EXT_texture_compression_astc_hdr"" name="VK_EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT"/>
<type name="VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT"/>
<enum extends="VkFormat" extnumber="67" offset="0" name="VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="1" name="VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="2" name="VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="3" name="VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="4" name="VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="5" name="VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="6" name="VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="7" name="VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="8" name="VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="9" name="VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="10" name="VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="11" name="VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="12" name="VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="67" offset="13" name="VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT"/>
</require>
</extension>
<extension name="VK_EXT_astc_decode_mode" number="68" type="device" author="ARM" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" requires="VK_KHR_get_physical_device_properties2" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_ASTC_DECODE_MODE_SPEC_VERSION"/>
<enum value=""VK_EXT_astc_decode_mode"" name="VK_EXT_ASTC_DECODE_MODE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT"/>
<type name="VkImageViewASTCDecodeModeEXT"/>
<type name="VkPhysicalDeviceASTCDecodeFeaturesEXT"/>
</require>
</extension>
<extension name="VK_IMG_extension_69" number="69" type="device" author="IMG" contact="Tobias Hector @tobski" supported="disabled">
<require>
<enum value="0" name="VK_IMG_EXTENSION_69_SPEC_VERSION"/>
<enum value=""VK_IMG_extension_69"" name="VK_IMG_EXTENSION_69_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_maintenance1" number="70" type="device" author="KHR" contact="Piers Daniell @pdaniell-nv" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="2" name="VK_KHR_MAINTENANCE1_SPEC_VERSION"/>
<enum value=""VK_KHR_maintenance1"" name="VK_KHR_MAINTENANCE1_EXTENSION_NAME"/>
<enum extends="VkResult" name="VK_ERROR_OUT_OF_POOL_MEMORY_KHR" alias="VK_ERROR_OUT_OF_POOL_MEMORY"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR" alias="VK_FORMAT_FEATURE_TRANSFER_SRC_BIT"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR" alias="VK_FORMAT_FEATURE_TRANSFER_DST_BIT"/>
<enum extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR" alias="VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT"/>
<type name="VkCommandPoolTrimFlagsKHR"/>
<command name="vkTrimCommandPoolKHR"/>
</require>
</extension>
<extension name="VK_KHR_device_group_creation" number="71" type="instance" author="KHR" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION"/>
<enum value=""VK_KHR_device_group_creation"" name="VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO"/>
<enum name="VK_MAX_DEVICE_GROUP_SIZE_KHR"/>
<type name="VkPhysicalDeviceGroupPropertiesKHR"/>
<type name="VkDeviceGroupDeviceCreateInfoKHR"/>
<command name="vkEnumeratePhysicalDeviceGroupsKHR"/>
<enum extends="VkMemoryHeapFlagBits" name="VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR" alias="VK_MEMORY_HEAP_MULTI_INSTANCE_BIT"/>
</require>
</extension>
<extension name="VK_KHR_external_memory_capabilities" number="72" type="instance" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="James Jones @cubanismo" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION"/>
<enum value=""VK_KHR_external_memory_capabilities"" name="VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES"/>
<enum name="VK_LUID_SIZE_KHR"/>
<type name="VkExternalMemoryHandleTypeFlagsKHR"/>
<type name="VkExternalMemoryHandleTypeFlagBitsKHR"/>
<enum extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR" alias="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT"/>
<enum extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR" alias="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT"/>
<enum extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR" alias="VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"/>
<enum extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR" alias="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT"/>
<enum extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR" alias="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT"/>
<enum extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR" alias="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT"/>
<enum extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR" alias="VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT"/>
<type name="VkExternalMemoryFeatureFlagsKHR"/>
<type name="VkExternalMemoryFeatureFlagBitsKHR"/>
<enum extends="VkExternalMemoryFeatureFlagBits" name="VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR" alias="VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT"/>
<enum extends="VkExternalMemoryFeatureFlagBits" name="VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR" alias="VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT"/>
<enum extends="VkExternalMemoryFeatureFlagBits" name="VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR" alias="VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT"/>
<type name="VkExternalMemoryPropertiesKHR"/>
<type name="VkPhysicalDeviceExternalImageFormatInfoKHR"/>
<type name="VkExternalImageFormatPropertiesKHR"/>
<type name="VkPhysicalDeviceExternalBufferInfoKHR"/>
<type name="VkExternalBufferPropertiesKHR"/>
<type name="VkPhysicalDeviceIDPropertiesKHR"/>
<command name="vkGetPhysicalDeviceExternalBufferPropertiesKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_memory" number="73" type="device" requires="VK_KHR_external_memory_capabilities" author="KHR" contact="James Jones @cubanismo" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION"/>
<enum value=""VK_KHR_external_memory"" name="VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO"/>
<enum extends="VkResult" name="VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR" alias="VK_ERROR_INVALID_EXTERNAL_HANDLE"/>
<enum name="VK_QUEUE_FAMILY_EXTERNAL_KHR"/>
<type name="VkExternalMemoryImageCreateInfoKHR"/>
<type name="VkExternalMemoryBufferCreateInfoKHR"/>
<type name="VkExportMemoryAllocateInfoKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_memory_win32" number="74" type="device" requires="VK_KHR_external_memory" author="KHR" contact="James Jones @cubanismo" platform="win32" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION"/>
<enum value=""VK_KHR_external_memory_win32"" name="VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR"/>
<type name="VkImportMemoryWin32HandleInfoKHR"/>
<type name="VkExportMemoryWin32HandleInfoKHR"/>
<type name="VkMemoryWin32HandlePropertiesKHR"/>
<type name="VkMemoryGetWin32HandleInfoKHR"/>
<command name="vkGetMemoryWin32HandleKHR"/>
<command name="vkGetMemoryWin32HandlePropertiesKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_memory_fd" number="75" type="device" requires="VK_KHR_external_memory" author="KHR" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION"/>
<enum value=""VK_KHR_external_memory_fd"" name="VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR"/>
<type name="VkImportMemoryFdInfoKHR"/>
<type name="VkMemoryFdPropertiesKHR"/>
<type name="VkMemoryGetFdInfoKHR"/>
<command name="vkGetMemoryFdKHR"/>
<command name="vkGetMemoryFdPropertiesKHR"/>
</require>
</extension>
<extension name="VK_KHR_win32_keyed_mutex" number="76" type="device" requires="VK_KHR_external_memory_win32" author="KHR" contact="Carsten Rohde @crohde" platform="win32" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION"/>
<enum value=""VK_KHR_win32_keyed_mutex"" name="VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR"/>
<type name="VkWin32KeyedMutexAcquireReleaseInfoKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_semaphore_capabilities" number="77" type="instance" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="James Jones @cubanismo" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION"/>
<enum value=""VK_KHR_external_semaphore_capabilities"" name="VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES"/>
<enum name="VK_LUID_SIZE_KHR"/>
<type name="VkExternalSemaphoreHandleTypeFlagsKHR"/>
<type name="VkExternalSemaphoreHandleTypeFlagBitsKHR"/>
<enum extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR" alias="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT"/>
<enum extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR" alias="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT"/>
<enum extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR" alias="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"/>
<enum extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR" alias="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT"/>
<enum extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR" alias="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT"/>
<type name="VkExternalSemaphoreFeatureFlagsKHR"/>
<type name="VkExternalSemaphoreFeatureFlagBitsKHR"/>
<enum extends="VkExternalSemaphoreFeatureFlagBits" name="VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR" alias="VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT"/>
<enum extends="VkExternalSemaphoreFeatureFlagBits" name="VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR" alias="VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT"/>
<type name="VkPhysicalDeviceExternalSemaphoreInfoKHR"/>
<type name="VkExternalSemaphorePropertiesKHR"/>
<type name="VkPhysicalDeviceIDPropertiesKHR"/>
<command name="vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_semaphore" number="78" type="device" requires="VK_KHR_external_semaphore_capabilities" author="KHR" contact="James Jones @cubanismo" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION"/>
<enum value=""VK_KHR_external_semaphore"" name="VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO"/>
<type name="VkSemaphoreImportFlagsKHR"/>
<type name="VkSemaphoreImportFlagBitsKHR"/>
<enum extends="VkSemaphoreImportFlagBits" name="VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR" alias="VK_SEMAPHORE_IMPORT_TEMPORARY_BIT"/>
<type name="VkExportSemaphoreCreateInfoKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_semaphore_win32" number="79" type="device" requires="VK_KHR_external_semaphore" author="KHR" contact="James Jones @cubanismo" platform="win32" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION"/>
<enum value=""VK_KHR_external_semaphore_win32"" name="VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR"/>
<type name="VkImportSemaphoreWin32HandleInfoKHR"/>
<type name="VkExportSemaphoreWin32HandleInfoKHR"/>
<type name="VkD3D12FenceSubmitInfoKHR"/>
<type name="VkSemaphoreGetWin32HandleInfoKHR"/>
<command name="vkImportSemaphoreWin32HandleKHR"/>
<command name="vkGetSemaphoreWin32HandleKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_semaphore_fd" number="80" type="device" requires="VK_KHR_external_semaphore" author="KHR" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION"/>
<enum value=""VK_KHR_external_semaphore_fd"" name="VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR"/>
<type name="VkImportSemaphoreFdInfoKHR"/>
<type name="VkSemaphoreGetFdInfoKHR"/>
<command name="vkImportSemaphoreFdKHR"/>
<command name="vkGetSemaphoreFdKHR"/>
</require>
</extension>
<extension name="VK_KHR_push_descriptor" number="81" type="device" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="2" name="VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION"/>
<enum value=""VK_KHR_push_descriptor"" name="VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR"/>
<enum bitpos="0" extends="VkDescriptorSetLayoutCreateFlagBits" name="VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR" comment="Descriptors are pushed via flink:vkCmdPushDescriptorSetKHR"/>
<command name="vkCmdPushDescriptorSetKHR"/>
<type name="VkPhysicalDevicePushDescriptorPropertiesKHR"/>
</require>
<require feature="VK_VERSION_1_1">
<command name="vkCmdPushDescriptorSetWithTemplateKHR"/>
<enum value="1" extends="VkDescriptorUpdateTemplateType" name="VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR" comment="Create descriptor update template for pushed descriptor updates"/>
</require>
<require extension="VK_KHR_descriptor_update_template">
<command name="vkCmdPushDescriptorSetWithTemplateKHR"/>
<enum value="1" extends="VkDescriptorUpdateTemplateType" name="VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR" comment="Create descriptor update template for pushed descriptor updates"/>
</require>
</extension>
<extension name="VK_EXT_conditional_rendering" number="82" type="device" author="NV" contact="Vikram Kushwaha @vkushwaha" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION"/>
<enum value=""VK_EXT_conditional_rendering"" name="VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT"/>
<type name="VkConditionalRenderingFlagsEXT"/>
<type name="VkConditionalRenderingFlagBitsEXT"/>
<enum bitpos="20" extends="VkAccessFlagBits" name="VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT" comment="read access flag for reading conditional rendering predicate"/>
<enum bitpos="9" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT" comment="Specifies the buffer can be used as predicate in conditional rendering"/>
<enum bitpos="18" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT" comment="A pipeline stage for conditional rendering predicate fetch"/>
<command name="vkCmdBeginConditionalRenderingEXT"/>
<command name="vkCmdEndConditionalRenderingEXT"/>
<type name="VkConditionalRenderingBeginInfoEXT"/>
<type name="VkPhysicalDeviceConditionalRenderingFeaturesEXT"/>
<type name="VkCommandBufferInheritanceConditionalRenderingInfoEXT"/>
</require>
</extension>
<extension name="VK_KHR_shader_float16_int8" number="83" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Alexander Galazin @alegal-arm" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION"/>
<enum value=""VK_KHR_shader_float16_int8"" name="VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES"/>
<type name="VkPhysicalDeviceShaderFloat16Int8FeaturesKHR"/>
<type name="VkPhysicalDeviceFloat16Int8FeaturesKHR"/>
</require>
</extension>
<extension name="VK_KHR_16bit_storage" number="84" type="device" requires="VK_KHR_get_physical_device_properties2,VK_KHR_storage_buffer_storage_class" author="KHR" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_16BIT_STORAGE_SPEC_VERSION"/>
<enum value=""VK_KHR_16bit_storage"" name="VK_KHR_16BIT_STORAGE_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES"/>
<type name="VkPhysicalDevice16BitStorageFeaturesKHR"/>
</require>
</extension>
<extension name="VK_KHR_incremental_present" number="85" type="device" author="KHR" requires="VK_KHR_swapchain" contact="Ian Elliott @ianelliottus" supported="vulkan">
<require>
<enum value="2" name="VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION"/>
<enum value=""VK_KHR_incremental_present"" name="VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR"/>
<type name="VkPresentRegionsKHR"/>
<type name="VkPresentRegionKHR"/>
<type name="VkRectLayerKHR"/>
</require>
</extension>
<extension name="VK_KHR_descriptor_update_template" number="86" type="device" author="KHR" contact="Markus Tavenrath @mtavenrath" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION"/>
<enum value=""VK_KHR_descriptor_update_template"" name="VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO"/>
<enum extends="VkObjectType" name="VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR" alias="VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE"/>
<command name="vkCreateDescriptorUpdateTemplateKHR"/>
<command name="vkDestroyDescriptorUpdateTemplateKHR"/>
<command name="vkUpdateDescriptorSetWithTemplateKHR"/>
<type name="VkDescriptorUpdateTemplateKHR"/>
<type name="VkDescriptorUpdateTemplateCreateFlagsKHR"/>
<type name="VkDescriptorUpdateTemplateTypeKHR"/>
<type name="VkDescriptorUpdateTemplateEntryKHR"/>
<type name="VkDescriptorUpdateTemplateCreateInfoKHR"/>
<enum extends="VkDescriptorUpdateTemplateType" name="VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR" alias="VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET"/>
</require>
<require extension="VK_KHR_push_descriptor">
<command name="vkCmdPushDescriptorSetWithTemplateKHR"/>
<enum value="1" extends="VkDescriptorUpdateTemplateType" name="VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR" comment="Create descriptor update template for pushed descriptor updates"/>
</require>
<require extension="VK_EXT_debug_report">
<enum extends="VkDebugReportObjectTypeEXT" name="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT" alias="VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT"/>
</require>
</extension>
<extension name="VK_NVX_device_generated_commands" number="87" type="device" author="NVX" contact="Christoph Kubisch @pixeljetstream" supported="disabled">
<require>
<enum value="3" name="VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION"/>
<enum value=""VK_NVX_device_generated_commands"" name="VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_clip_space_w_scaling" number="88" type="device" author="NV" contact="Eric Werness @ewerness-nv" supported="vulkan">
<require>
<enum value="1" name="VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION"/>
<enum value=""VK_NV_clip_space_w_scaling"" name="VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV"/>
<type name="VkViewportWScalingNV"/>
<type name="VkPipelineViewportWScalingStateCreateInfoNV"/>
<command name="vkCmdSetViewportWScalingNV"/>
</require>
</extension>
<extension name="VK_EXT_direct_mode_display" number="89" type="instance" requires="VK_KHR_display" author="NV" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION"/>
<enum value=""VK_EXT_direct_mode_display"" name="VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME"/>
<command name="vkReleaseDisplayEXT"/>
</require>
</extension>
<extension name="VK_EXT_acquire_xlib_display" number="90" type="instance" requires="VK_EXT_direct_mode_display" author="NV" contact="James Jones @cubanismo" platform="xlib_xrandr" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION"/>
<enum value=""VK_EXT_acquire_xlib_display"" name="VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME"/>
<command name="vkAcquireXlibDisplayEXT"/>
<command name="vkGetRandROutputDisplayEXT"/>
</require>
</extension>
<extension name="VK_EXT_display_surface_counter" number="91" type="instance" requires="VK_KHR_display" author="NV" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION"/>
<enum value=""VK_EXT_display_surface_counter"" name="VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT"/>
<enum alias="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT" comment="Backwards-compatible alias containing a typo"/>
<type name="VkSurfaceCounterFlagsEXT"/>
<type name="VkSurfaceCounterFlagBitsEXT"/>
<type name="VkSurfaceCapabilities2EXT"/>
<command name="vkGetPhysicalDeviceSurfaceCapabilities2EXT"/>
</require>
</extension>
<extension name="VK_EXT_display_control" number="92" type="device" requires="VK_EXT_display_surface_counter,VK_KHR_swapchain" author="NV" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_DISPLAY_CONTROL_SPEC_VERSION"/>
<enum value=""VK_EXT_display_control"" name="VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT"/>
<type name="VkDisplayPowerStateEXT"/>
<type name="VkDeviceEventTypeEXT"/>
<type name="VkDisplayEventTypeEXT"/>
<type name="VkDisplayPowerInfoEXT"/>
<type name="VkDeviceEventInfoEXT"/>
<type name="VkDisplayEventInfoEXT"/>
<type name="VkSwapchainCounterCreateInfoEXT"/>
<command name="vkDisplayPowerControlEXT"/>
<command name="vkRegisterDeviceEventEXT"/>
<command name="vkRegisterDisplayEventEXT"/>
<command name="vkGetSwapchainCounterEXT"/>
</require>
</extension>
<extension name="VK_GOOGLE_display_timing" number="93" type="device" author="GOOGLE" requires="VK_KHR_swapchain" contact="Ian Elliott @ianelliottus" supported="vulkan">
<require>
<enum value="1" name="VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_display_timing"" name="VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE"/>
<type name="VkRefreshCycleDurationGOOGLE"/>
<type name="VkPastPresentationTimingGOOGLE"/>
<type name="VkPresentTimesInfoGOOGLE"/>
<type name="VkPresentTimeGOOGLE"/>
<command name="vkGetRefreshCycleDurationGOOGLE"/>
<command name="vkGetPastPresentationTimingGOOGLE"/>
</require>
</extension>
<extension name="RESERVED_DO_NOT_USE_94" number="94" supported="disabled" comment="Used for functionality subsumed into Vulkan 1.1 and not published as an extension">
</extension>
<extension name="VK_NV_sample_mask_override_coverage" number="95" type="device" author="NV" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION"/>
<enum value=""VK_NV_sample_mask_override_coverage"" name="VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME"/>
<comment>
enum offset=0 was mistakenly used for the 1.1 core enum
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES
(value=1000094000). Fortunately, no conflict resulted.
</comment>
</require>
</extension>
<extension name="VK_NV_geometry_shader_passthrough" number="96" type="device" author="NV" contact="Daniel Koch @dgkoch" supported="vulkan">
<require>
<enum value="1" name="VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION"/>
<enum value=""VK_NV_geometry_shader_passthrough"" name="VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_viewport_array2" number="97" type="device" author="NV" contact="Daniel Koch @dgkoch" supported="vulkan">
<require>
<enum value="1" name="VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION"/>
<enum value=""VK_NV_viewport_array2"" name="VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NVX_multiview_per_view_attributes" number="98" type="device" requires="VK_KHR_multiview" author="NVX" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION"/>
<enum value=""VK_NVX_multiview_per_view_attributes"" name="VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX"/>
<enum bitpos="0" extends="VkSubpassDescriptionFlagBits" name="VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX"/>
<enum bitpos="1" extends="VkSubpassDescriptionFlagBits" name="VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX"/>
<type name="VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX"/>
</require>
</extension>
<extension name="VK_NV_viewport_swizzle" number="99" type="device" author="NV" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION"/>
<enum value=""VK_NV_viewport_swizzle"" name="VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV"/>
<type name="VkViewportSwizzleNV"/>
<type name="VkViewportCoordinateSwizzleNV"/>
<type name="VkPipelineViewportSwizzleStateCreateInfoNV"/>
<type name="VkPipelineViewportSwizzleStateCreateFlagsNV"/>
</require>
</extension>
<extension name="VK_EXT_discard_rectangles" number="100" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION"/>
<enum value=""VK_EXT_discard_rectangles"" name="VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT"/>
<type name="VkPhysicalDeviceDiscardRectanglePropertiesEXT"/>
<type name="VkPipelineDiscardRectangleStateCreateInfoEXT"/>
<type name="VkPipelineDiscardRectangleStateCreateFlagsEXT"/>
<type name="VkDiscardRectangleModeEXT"/>
<command name="vkCmdSetDiscardRectangleEXT"/>
</require>
</extension>
<extension name="VK_NV_extension_101" number="101" author="NV" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_101_SPEC_VERSION"/>
<enum value=""VK_NV_extension_101"" name="VK_NV_EXTENSION_101_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_conservative_rasterization" number="102" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION"/>
<enum value=""VK_EXT_conservative_rasterization"" name="VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT"/>
<type name="VkPhysicalDeviceConservativeRasterizationPropertiesEXT"/>
<type name="VkPipelineRasterizationConservativeStateCreateInfoEXT"/>
<type name="VkPipelineRasterizationConservativeStateCreateFlagsEXT"/>
<type name="VkConservativeRasterizationModeEXT"/>
</require>
</extension>
<extension name="VK_EXT_depth_clip_enable" number="103" type="device" author="EXT" contact="Piers Daniell @pdaniell-nv" specialuse="d3demulation" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_DEPTH_CLIP_ENABLE_SPEC_VERSION"/>
<enum value=""VK_EXT_depth_clip_enable"" name="VK_EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT"/>
<type name="VkPhysicalDeviceDepthClipEnableFeaturesEXT"/>
<type name="VkPipelineRasterizationDepthClipStateCreateInfoEXT"/>
<type name="VkPipelineRasterizationDepthClipStateCreateFlagsEXT"/>
</require>
</extension>
<extension name="VK_NV_extension_104" number="104" author="NV" contact="Mathias Schott gitlab:@mschott" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_104_SPEC_VERSION"/>
<enum value=""VK_NV_extension_104"" name="VK_NV_EXTENSION_104_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_swapchain_colorspace" number="105" type="instance" author="GOOGLE" contact="Courtney Goeltzenleuchter @courtney-g" requires="VK_KHR_surface" supported="vulkan">
<require>
<enum value="4" name="VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION"/>
<enum value=""VK_EXT_swapchain_colorspace"" name="VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME"/>
<enum offset="1" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT"/>
<enum offset="2" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT"/>
<enum offset="3" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT"/>
<enum offset="4" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT"/>
<enum offset="5" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT709_LINEAR_EXT"/>
<enum offset="6" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT709_NONLINEAR_EXT"/>
<enum offset="7" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_BT2020_LINEAR_EXT"/>
<enum offset="8" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_HDR10_ST2084_EXT"/>
<enum offset="9" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DOLBYVISION_EXT"/>
<enum offset="10" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_HDR10_HLG_EXT"/>
<enum offset="11" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT"/>
<enum offset="12" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT"/>
<enum offset="13" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_PASS_THROUGH_EXT"/>
<enum offset="14" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT"/>
<enum extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DCI_P3_LINEAR_EXT" alias="VK_COLOR_SPACE_DISPLAY_P3_LINEAR_EXT" comment="Deprecated name for backwards compatibility"/>
</require>
</extension>
<extension name="VK_EXT_hdr_metadata" number="106" type="device" requires="VK_KHR_swapchain" author="GOOGLE" contact="Courtney Goeltzenleuchter @courtney-g" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_HDR_METADATA_SPEC_VERSION"/>
<enum value=""VK_EXT_hdr_metadata"" name="VK_EXT_HDR_METADATA_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_HDR_METADATA_EXT"/>
<type name="VkHdrMetadataEXT"/>
<type name="VkXYColorEXT"/>
<command name="vkSetHdrMetadataEXT"/>
</require>
</extension>
<extension name="VK_IMG_extension_107" number="107" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled">
<require>
<enum value="0" name="VK_IMG_EXTENSION_107_SPEC_VERSION"/>
<enum value=""VK_IMG_extension_107"" name="VK_IMG_EXTENSION_107_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_IMG_extension_108" number="108" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled">
<require>
<enum value="0" name="VK_IMG_EXTENSION_108_SPEC_VERSION"/>
<enum value=""VK_IMG_extension_108"" name="VK_IMG_EXTENSION_108_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_imageless_framebuffer" requires="VK_KHR_maintenance2,VK_KHR_image_format_list" number="109" author="KHR" contact="Tobias Hector @tobias" type="device" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_IMAGELESS_FRAMEBUFFER_SPEC_VERSION"/>
<enum value=""VK_KHR_imageless_framebuffer"" name="VK_KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME"/>
<type name="VkPhysicalDeviceImagelessFramebufferFeaturesKHR"/>
<type name="VkFramebufferAttachmentsCreateInfoKHR"/>
<type name="VkFramebufferAttachmentImageInfoKHR"/>
<type name="VkRenderPassAttachmentBeginInfoKHR"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR" alias="VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR" alias="VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO"/>
<enum extends="VkFramebufferCreateFlagBits" name="VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR" alias="VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT"/>
</require>
</extension>
<extension name="VK_KHR_create_renderpass2" requires="VK_KHR_multiview,VK_KHR_maintenance2" number="110" contact="Tobias Hector @tobias" type="device" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION"/>
<enum value=""VK_KHR_create_renderpass2"" name="VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR" alias="VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR" alias="VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR" alias="VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR" alias="VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR" alias="VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR" alias="VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR" alias="VK_STRUCTURE_TYPE_SUBPASS_END_INFO"/>
<command name="vkCreateRenderPass2KHR"/>
<command name="vkCmdBeginRenderPass2KHR"/>
<command name="vkCmdNextSubpass2KHR"/>
<command name="vkCmdEndRenderPass2KHR"/>
<type name="VkRenderPassCreateInfo2KHR"/>
<type name="VkAttachmentDescription2KHR"/>
<type name="VkAttachmentReference2KHR"/>
<type name="VkSubpassDescription2KHR"/>
<type name="VkSubpassDependency2KHR"/>
<type name="VkSubpassBeginInfoKHR"/>
<type name="VkSubpassEndInfoKHR"/>
</require>
</extension>
<extension name="VK_IMG_extension_111" number="111" author="IMG" contact="Michael Worcester @michaelworcester" supported="disabled">
<require>
<enum value="0" name="VK_IMG_EXTENSION_111_SPEC_VERSION"/>
<enum value=""VK_IMG_extension_111"" name="VK_IMG_EXTENSION_111_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_shared_presentable_image" number="112" type="device" requires="VK_KHR_swapchain,VK_KHR_get_physical_device_properties2,VK_KHR_get_surface_capabilities2" author="KHR" contact="Alon Or-bach @alonorbach" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION"/>
<enum value=""VK_KHR_shared_presentable_image"" name="VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR"/>
<enum offset="0" extends="VkPresentModeKHR" name="VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR"/>
<enum offset="1" extends="VkPresentModeKHR" name="VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR"/>
<enum offset="0" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR"/>
<type name="VkSharedPresentSurfaceCapabilitiesKHR"/>
<command name="vkGetSwapchainStatusKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_fence_capabilities" number="113" type="instance" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Jesse Hall @critsec" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION"/>
<enum value=""VK_KHR_external_fence_capabilities"" name="VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES"/>
<enum name="VK_LUID_SIZE_KHR"/>
<type name="VkExternalFenceHandleTypeFlagsKHR"/>
<type name="VkExternalFenceHandleTypeFlagBitsKHR"/>
<enum extends="VkExternalFenceHandleTypeFlagBits" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR" alias="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT"/>
<enum extends="VkExternalFenceHandleTypeFlagBits" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR" alias="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT"/>
<enum extends="VkExternalFenceHandleTypeFlagBits" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR" alias="VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT"/>
<enum extends="VkExternalFenceHandleTypeFlagBits" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR" alias="VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT"/>
<type name="VkExternalFenceFeatureFlagsKHR"/>
<type name="VkExternalFenceFeatureFlagBitsKHR"/>
<enum extends="VkExternalFenceFeatureFlagBits" name="VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR" alias="VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT"/>
<enum extends="VkExternalFenceFeatureFlagBits" name="VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR" alias="VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT"/>
<type name="VkPhysicalDeviceExternalFenceInfoKHR"/>
<type name="VkExternalFencePropertiesKHR"/>
<type name="VkPhysicalDeviceIDPropertiesKHR"/>
<command name="vkGetPhysicalDeviceExternalFencePropertiesKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_fence" number="114" type="device" requires="VK_KHR_external_fence_capabilities" author="KHR" contact="Jesse Hall @critsec" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_FENCE_SPEC_VERSION"/>
<enum value=""VK_KHR_external_fence"" name="VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO"/>
<type name="VkFenceImportFlagsKHR"/>
<type name="VkFenceImportFlagBitsKHR"/>
<enum extends="VkFenceImportFlagBits" name="VK_FENCE_IMPORT_TEMPORARY_BIT_KHR" alias="VK_FENCE_IMPORT_TEMPORARY_BIT"/>
<type name="VkExportFenceCreateInfoKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_fence_win32" number="115" type="device" requires="VK_KHR_external_fence" author="KHR" contact="Jesse Hall @critsec" platform="win32" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION"/>
<enum value=""VK_KHR_external_fence_win32"" name="VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR"/>
<type name="VkImportFenceWin32HandleInfoKHR"/>
<type name="VkExportFenceWin32HandleInfoKHR"/>
<type name="VkFenceGetWin32HandleInfoKHR"/>
<command name="vkImportFenceWin32HandleKHR"/>
<command name="vkGetFenceWin32HandleKHR"/>
</require>
</extension>
<extension name="VK_KHR_external_fence_fd" number="116" type="device" requires="VK_KHR_external_fence" author="KHR" contact="Jesse Hall @critsec" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION"/>
<enum value=""VK_KHR_external_fence_fd"" name="VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR"/>
<type name="VkImportFenceFdInfoKHR"/>
<type name="VkFenceGetFdInfoKHR"/>
<command name="vkImportFenceFdKHR"/>
<command name="vkGetFenceFdKHR"/>
</require>
</extension>
<extension name="VK_KHR_performance_query" number="117" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Alon Or-bach @alonorbach" specialuse="devtools" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION"/>
<enum value=""VK_KHR_performance_query"" name="VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME"/>
<enum offset="0" extends="VkQueryType" name="VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR"/>
<type name="VkPhysicalDevicePerformanceQueryFeaturesKHR"/>
<type name="VkPhysicalDevicePerformanceQueryPropertiesKHR"/>
<type name="VkPerformanceCounterKHR"/>
<type name="VkPerformanceCounterDescriptionKHR"/>
<type name="VkPerformanceCounterDescriptionFlagsKHR"/>
<type name="VkPerformanceCounterDescriptionFlagBitsKHR"/>
<type name="VkQueryPoolPerformanceCreateInfoKHR"/>
<type name="VkPerformanceCounterScopeKHR"/>
<type name="VkPerformanceCounterStorageKHR"/>
<type name="VkPerformanceCounterUnitKHR"/>
<type name="VkPerformanceCounterResultKHR"/>
<type name="VkAcquireProfilingLockInfoKHR"/>
<type name="VkAcquireProfilingLockFlagsKHR"/>
<type name="VkAcquireProfilingLockFlagBitsKHR"/>
<type name="VkPerformanceQuerySubmitInfoKHR"/>
<command name="vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"/>
<command name="vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR"/>
<command name="vkAcquireProfilingLockKHR"/>
<command name="vkReleaseProfilingLockKHR"/>
</require>
</extension>
<extension name="VK_KHR_maintenance2" number="118" type="device" author="KHR" contact="Michael Worcester @michaelworcester" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_MAINTENANCE2_SPEC_VERSION"/>
<enum value=""VK_KHR_maintenance2"" name="VK_KHR_MAINTENANCE2_EXTENSION_NAME"/>
<enum extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR" alias="VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT"/>
<enum extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR" alias="VK_IMAGE_CREATE_EXTENDED_USAGE_BIT"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO"/>
<enum extends="VkImageLayout" name="VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR" alias="VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL"/>
<enum extends="VkImageLayout" name="VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR" alias="VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL"/>
<type name="VkPhysicalDevicePointClippingPropertiesKHR"/>
<type name="VkPointClippingBehaviorKHR"/>
<enum extends="VkPointClippingBehavior" name="VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR" alias="VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES"/>
<enum extends="VkPointClippingBehavior" name="VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR" alias="VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY"/>
<type name="VkRenderPassInputAttachmentAspectCreateInfoKHR"/>
<type name="VkInputAttachmentAspectReferenceKHR"/>
<type name="VkImageViewUsageCreateInfoKHR"/>
<type name="VkTessellationDomainOriginKHR"/>
<enum extends="VkTessellationDomainOrigin" name="VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR" alias="VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT"/>
<enum extends="VkTessellationDomainOrigin" name="VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR" alias="VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT"/>
<type name="VkPipelineTessellationDomainOriginStateCreateInfoKHR"/>
</require>
</extension>
<extension name="VK_KHR_extension_119" number="119" author="KHR" contact="Michael Worcester @michaelworcester" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_119_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_119"" name="VK_KHR_EXTENSION_119_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_get_surface_capabilities2" number="120" type="instance" requires="VK_KHR_surface" author="KHR" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION"/>
<enum value=""VK_KHR_get_surface_capabilities2"" name="VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR"/>
<type name="VkPhysicalDeviceSurfaceInfo2KHR"/>
<type name="VkSurfaceCapabilities2KHR"/>
<type name="VkSurfaceFormat2KHR"/>
<command name="vkGetPhysicalDeviceSurfaceCapabilities2KHR"/>
<command name="vkGetPhysicalDeviceSurfaceFormats2KHR"/>
</require>
</extension>
<extension name="VK_KHR_variable_pointers" number="121" type="device" author="KHR" contact="Jesse Hall @critsec" requires="VK_KHR_get_physical_device_properties2,VK_KHR_storage_buffer_storage_class" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_VARIABLE_POINTERS_SPEC_VERSION"/>
<enum value=""VK_KHR_variable_pointers"" name="VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR"/>
<type name="VkPhysicalDeviceVariablePointerFeaturesKHR"/>
<type name="VkPhysicalDeviceVariablePointersFeaturesKHR"/>
</require>
</extension>
<extension name="VK_KHR_get_display_properties2" number="122" type="instance" requires="VK_KHR_display" author="KHR" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION"/>
<enum value=""VK_KHR_get_display_properties2"" name="VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR"/>
<type name="VkDisplayProperties2KHR"/>
<type name="VkDisplayPlaneProperties2KHR"/>
<type name="VkDisplayModeProperties2KHR"/>
<type name="VkDisplayPlaneInfo2KHR"/>
<type name="VkDisplayPlaneCapabilities2KHR"/>
<command name="vkGetPhysicalDeviceDisplayProperties2KHR"/>
<command name="vkGetPhysicalDeviceDisplayPlaneProperties2KHR"/>
<command name="vkGetDisplayModeProperties2KHR"/>
<command name="vkGetDisplayPlaneCapabilities2KHR"/>
</require>
</extension>
<extension name="VK_MVK_ios_surface" number="123" type="instance" requires="VK_KHR_surface" platform="ios" supported="vulkan" author="MVK" contact="Bill Hollings @billhollings" deprecatedby="VK_EXT_metal_surface">
<require>
<enum value="3" name="VK_MVK_IOS_SURFACE_SPEC_VERSION"/>
<enum value=""VK_MVK_ios_surface"" name="VK_MVK_IOS_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK"/>
<type name="VkIOSSurfaceCreateFlagsMVK"/>
<type name="VkIOSSurfaceCreateInfoMVK"/>
<command name="vkCreateIOSSurfaceMVK"/>
</require>
</extension>
<extension name="VK_MVK_macos_surface" number="124" type="instance" requires="VK_KHR_surface" platform="macos" supported="vulkan" author="MVK" contact="Bill Hollings @billhollings" deprecatedby="VK_EXT_metal_surface">
<require>
<enum value="3" name="VK_MVK_MACOS_SURFACE_SPEC_VERSION"/>
<enum value=""VK_MVK_macos_surface"" name="VK_MVK_MACOS_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK"/>
<type name="VkMacOSSurfaceCreateFlagsMVK"/>
<type name="VkMacOSSurfaceCreateInfoMVK"/>
<command name="vkCreateMacOSSurfaceMVK"/>
</require>
</extension>
<extension name="VK_MVK_moltenvk" number="125" type="instance" author="MVK" contact="Bill Hollings @billhollings" supported="disabled">
<require>
<enum value="0" name="VK_MVK_MOLTENVK_SPEC_VERSION"/>
<enum value=""VK_MVK_moltenvk"" name="VK_MVK_MOLTENVK_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_external_memory_dma_buf" number="126" type="device" requires="VK_KHR_external_memory_fd" author="EXT" contact="Chad Versace @chadversary" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION"/>
<enum value=""VK_EXT_external_memory_dma_buf"" name="VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME"/>
<enum bitpos="9" extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT"/>
</require>
</extension>
<extension name="VK_EXT_queue_family_foreign" number="127" type="device" author="EXT" requires="VK_KHR_external_memory" contact="Chad Versace @chadversary" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION"/>
<enum value=""VK_EXT_queue_family_foreign"" name="VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME"/>
<enum name="VK_QUEUE_FAMILY_FOREIGN_EXT"/>
</require>
</extension>
<extension name="VK_KHR_dedicated_allocation" number="128" type="device" author="KHR" requires="VK_KHR_get_memory_requirements2" contact="James Jones @cubanismo" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="3" name="VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION"/>
<enum value=""VK_KHR_dedicated_allocation"" name="VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR" alias="VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO"/>
<type name="VkMemoryDedicatedRequirementsKHR"/>
<type name="VkMemoryDedicatedAllocateInfoKHR"/>
</require>
</extension>
<extension name="VK_EXT_debug_utils" number="129" type="instance" author="EXT" contact="Mark Young @marky-lunarg" specialuse="debugging" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_DEBUG_UTILS_SPEC_VERSION"/>
<enum value=""VK_EXT_debug_utils"" name="VK_EXT_DEBUG_UTILS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT"/>
<type name="PFN_vkDebugUtilsMessengerCallbackEXT"/>
<type name="VkDebugUtilsLabelEXT"/>
<type name="VkDebugUtilsMessageSeverityFlagBitsEXT"/>
<type name="VkDebugUtilsMessageSeverityFlagsEXT"/>
<type name="VkDebugUtilsMessageTypeFlagBitsEXT"/>
<type name="VkDebugUtilsMessageTypeFlagsEXT"/>
<type name="VkDebugUtilsMessengerCallbackDataEXT"/>
<type name="VkDebugUtilsMessengerCallbackDataFlagsEXT"/>
<type name="VkDebugUtilsMessengerCreateFlagsEXT"/>
<type name="VkDebugUtilsMessengerCreateInfoEXT"/>
<type name="VkDebugUtilsMessengerEXT"/>
<type name="VkDebugUtilsObjectNameInfoEXT"/>
<type name="VkDebugUtilsObjectTagInfoEXT"/>
<command name="vkSetDebugUtilsObjectNameEXT"/>
<command name="vkSetDebugUtilsObjectTagEXT"/>
<command name="vkQueueBeginDebugUtilsLabelEXT"/>
<command name="vkQueueEndDebugUtilsLabelEXT"/>
<command name="vkQueueInsertDebugUtilsLabelEXT"/>
<command name="vkCmdBeginDebugUtilsLabelEXT"/>
<command name="vkCmdEndDebugUtilsLabelEXT"/>
<command name="vkCmdInsertDebugUtilsLabelEXT"/>
<command name="vkCreateDebugUtilsMessengerEXT"/>
<command name="vkDestroyDebugUtilsMessengerEXT"/>
<command name="vkSubmitDebugUtilsMessageEXT"/>
</require>
</extension>
<extension name="VK_ANDROID_external_memory_android_hardware_buffer" number="130" type="device" author="ANDROID" requires="VK_KHR_sampler_ycbcr_conversion,VK_KHR_external_memory,VK_EXT_queue_family_foreign,VK_KHR_dedicated_allocation" platform="android" contact="Jesse Hall @critsec" supported="vulkan">
<require>
<enum value="3" name="VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION"/>
<enum value=""VK_ANDROID_external_memory_android_hardware_buffer"" name="VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME"/>
<enum bitpos="10" extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID"/>
<type name="VkAndroidHardwareBufferUsageANDROID"/>
<type name="VkAndroidHardwareBufferPropertiesANDROID"/>
<type name="VkAndroidHardwareBufferFormatPropertiesANDROID"/>
<type name="VkImportAndroidHardwareBufferInfoANDROID"/>
<type name="VkMemoryGetAndroidHardwareBufferInfoANDROID"/>
<type name="VkExternalFormatANDROID"/>
<command name="vkGetAndroidHardwareBufferPropertiesANDROID"/>
<command name="vkGetMemoryAndroidHardwareBufferANDROID"/>
<type name="AHardwareBuffer"/>
</require>
</extension>
<extension name="VK_EXT_sampler_filter_minmax" number="131" type="device" author="NV" requires="VK_KHR_get_physical_device_properties2" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="2" name="VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION"/>
<enum value=""VK_EXT_sampler_filter_minmax"" name="VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT" alias="VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT" alias="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT"/>
<enum extends="VkSamplerReductionMode" name="VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT" alias="VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE"/>
<enum extends="VkSamplerReductionMode" name="VK_SAMPLER_REDUCTION_MODE_MIN_EXT" alias="VK_SAMPLER_REDUCTION_MODE_MIN"/>
<enum extends="VkSamplerReductionMode" name="VK_SAMPLER_REDUCTION_MODE_MAX_EXT" alias="VK_SAMPLER_REDUCTION_MODE_MAX"/>
<type name="VkSamplerReductionModeEXT"/>
<type name="VkSamplerReductionModeCreateInfoEXT"/>
<type name="VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT"/>
</require>
</extension>
<extension name="VK_KHR_storage_buffer_storage_class" number="132" type="device" author="KHR" contact="Alexander Galazin @alegal-arm" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION"/>
<enum value=""VK_KHR_storage_buffer_storage_class"" name="VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_gpu_shader_int16" number="133" type="device" author="AMD" contact="Qun Lin @linqun" supported="vulkan" deprecatedby="VK_KHR_shader_float16_int8">
<require>
<enum value="2" name="VK_AMD_GPU_SHADER_INT16_SPEC_VERSION"/>
<enum value=""VK_AMD_gpu_shader_int16"" name="VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_134" number="134" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_134_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_134"" name="VK_AMD_EXTENSION_134_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_135" number="135" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_135_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_135"" name="VK_AMD_EXTENSION_135_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_136" number="136" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_136_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_136"" name="VK_AMD_EXTENSION_136_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_mixed_attachment_samples" number="137" type="device" author="AMD" contact="Matthaeus G. Chajdas @anteru" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION"/>
<enum value=""VK_AMD_mixed_attachment_samples"" name="VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_shader_fragment_mask" number="138" author="AMD" contact="Aaron Hagan @AaronHaganAMD" supported="vulkan" type="device">
<require>
<enum value="1" name="VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION"/>
<enum value=""VK_AMD_shader_fragment_mask"" name="VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_inline_uniform_block" number="139" type="device" author="EXT" requires="VK_KHR_get_physical_device_properties2,VK_KHR_maintenance1" contact="Daniel Rakos @aqnuep" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION"/>
<enum value=""VK_EXT_inline_uniform_block"" name="VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME"/>
<enum offset="0" extends="VkDescriptorType" name="VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT"/>
<type name="VkPhysicalDeviceInlineUniformBlockFeaturesEXT"/>
<type name="VkPhysicalDeviceInlineUniformBlockPropertiesEXT"/>
<type name="VkWriteDescriptorSetInlineUniformBlockEXT"/>
<type name="VkDescriptorPoolInlineUniformBlockCreateInfoEXT"/>
</require>
</extension>
<extension name="VK_AMD_extension_140" number="140" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_140_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_140"" name="VK_AMD_EXTENSION_140_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_shader_stencil_export" number="141" type="device" author="EXT" contact="Dominik Witczak @dominikwitczakamd" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION"/>
<enum value=""VK_EXT_shader_stencil_export"" name="VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_142" number="142" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_142_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_142"" name="VK_AMD_EXTENSION_142_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_143" number="143" author="AMD" contact="Mais Alnasser @malnasse" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_143_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_143"" name="VK_AMD_EXTENSION_143_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_sample_locations" number="144" type="device" author="AMD" contact="Daniel Rakos @drakos-amd" supported="vulkan" requires="VK_KHR_get_physical_device_properties2">
<require>
<enum value="1" name="VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION"/>
<enum value=""VK_EXT_sample_locations"" name="VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME"/>
<enum bitpos="12" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT"/>
<type name="VkSampleLocationEXT"/>
<type name="VkSampleLocationsInfoEXT"/>
<type name="VkAttachmentSampleLocationsEXT"/>
<type name="VkSubpassSampleLocationsEXT"/>
<type name="VkRenderPassSampleLocationsBeginInfoEXT"/>
<type name="VkPipelineSampleLocationsStateCreateInfoEXT"/>
<type name="VkPhysicalDeviceSampleLocationsPropertiesEXT"/>
<type name="VkMultisamplePropertiesEXT"/>
<command name="vkCmdSetSampleLocationsEXT"/>
<command name="vkGetPhysicalDeviceMultisamplePropertiesEXT"/>
</require>
</extension>
<extension name="VK_KHR_relaxed_block_layout" number="145" type="device" author="KHR" contact="John Kessenich @johnkslang" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION"/>
<enum value=""VK_KHR_relaxed_block_layout"" name="VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME"/>
</require>
</extension>
<extension name="RESERVED_DO_NOT_USE_146" number="146" supported="disabled" comment="Used for functionality subsumed into Vulkan 1.1 and not published as an extension">
</extension>
<extension name="VK_KHR_get_memory_requirements2" number="147" type="device" author="KHR" contact="Jason Ekstrand @jekstrand" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION"/>
<enum value=""VK_KHR_get_memory_requirements2"" name="VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR" alias="VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR" alias="VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR" alias="VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR" alias="VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR" alias="VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2"/>
<type name="VkBufferMemoryRequirementsInfo2KHR"/>
<type name="VkImageMemoryRequirementsInfo2KHR"/>
<type name="VkImageSparseMemoryRequirementsInfo2KHR"/>
<type name="VkMemoryRequirements2KHR"/>
<type name="VkSparseImageMemoryRequirements2KHR"/>
<command name="vkGetImageMemoryRequirements2KHR"/>
<command name="vkGetBufferMemoryRequirements2KHR"/>
<command name="vkGetImageSparseMemoryRequirements2KHR"/>
</require>
</extension>
<extension name="VK_KHR_image_format_list" number="148" type="device" author="KHR" contact="Jason Ekstrand @jekstrand" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION"/>
<enum value=""VK_KHR_image_format_list"" name="VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO"/>
<type name="VkImageFormatListCreateInfoKHR"/>
</require>
</extension>
<extension name="VK_EXT_blend_operation_advanced" number="149" type="device" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION"/>
<enum value=""VK_EXT_blend_operation_advanced"" name="VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT"/>
<type name="VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT"/>
<type name="VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT"/>
<type name="VkPipelineColorBlendAdvancedStateCreateInfoEXT"/>
<type name="VkBlendOverlapEXT"/>
<enum offset="0" extends="VkBlendOp" name="VK_BLEND_OP_ZERO_EXT"/>
<enum offset="1" extends="VkBlendOp" name="VK_BLEND_OP_SRC_EXT"/>
<enum offset="2" extends="VkBlendOp" name="VK_BLEND_OP_DST_EXT"/>
<enum offset="3" extends="VkBlendOp" name="VK_BLEND_OP_SRC_OVER_EXT"/>
<enum offset="4" extends="VkBlendOp" name="VK_BLEND_OP_DST_OVER_EXT"/>
<enum offset="5" extends="VkBlendOp" name="VK_BLEND_OP_SRC_IN_EXT"/>
<enum offset="6" extends="VkBlendOp" name="VK_BLEND_OP_DST_IN_EXT"/>
<enum offset="7" extends="VkBlendOp" name="VK_BLEND_OP_SRC_OUT_EXT"/>
<enum offset="8" extends="VkBlendOp" name="VK_BLEND_OP_DST_OUT_EXT"/>
<enum offset="9" extends="VkBlendOp" name="VK_BLEND_OP_SRC_ATOP_EXT"/>
<enum offset="10" extends="VkBlendOp" name="VK_BLEND_OP_DST_ATOP_EXT"/>
<enum offset="11" extends="VkBlendOp" name="VK_BLEND_OP_XOR_EXT"/>
<enum offset="12" extends="VkBlendOp" name="VK_BLEND_OP_MULTIPLY_EXT"/>
<enum offset="13" extends="VkBlendOp" name="VK_BLEND_OP_SCREEN_EXT"/>
<enum offset="14" extends="VkBlendOp" name="VK_BLEND_OP_OVERLAY_EXT"/>
<enum offset="15" extends="VkBlendOp" name="VK_BLEND_OP_DARKEN_EXT"/>
<enum offset="16" extends="VkBlendOp" name="VK_BLEND_OP_LIGHTEN_EXT"/>
<enum offset="17" extends="VkBlendOp" name="VK_BLEND_OP_COLORDODGE_EXT"/>
<enum offset="18" extends="VkBlendOp" name="VK_BLEND_OP_COLORBURN_EXT"/>
<enum offset="19" extends="VkBlendOp" name="VK_BLEND_OP_HARDLIGHT_EXT"/>
<enum offset="20" extends="VkBlendOp" name="VK_BLEND_OP_SOFTLIGHT_EXT"/>
<enum offset="21" extends="VkBlendOp" name="VK_BLEND_OP_DIFFERENCE_EXT"/>
<enum offset="22" extends="VkBlendOp" name="VK_BLEND_OP_EXCLUSION_EXT"/>
<enum offset="23" extends="VkBlendOp" name="VK_BLEND_OP_INVERT_EXT"/>
<enum offset="24" extends="VkBlendOp" name="VK_BLEND_OP_INVERT_RGB_EXT"/>
<enum offset="25" extends="VkBlendOp" name="VK_BLEND_OP_LINEARDODGE_EXT"/>
<enum offset="26" extends="VkBlendOp" name="VK_BLEND_OP_LINEARBURN_EXT"/>
<enum offset="27" extends="VkBlendOp" name="VK_BLEND_OP_VIVIDLIGHT_EXT"/>
<enum offset="28" extends="VkBlendOp" name="VK_BLEND_OP_LINEARLIGHT_EXT"/>
<enum offset="29" extends="VkBlendOp" name="VK_BLEND_OP_PINLIGHT_EXT"/>
<enum offset="30" extends="VkBlendOp" name="VK_BLEND_OP_HARDMIX_EXT"/>
<enum offset="31" extends="VkBlendOp" name="VK_BLEND_OP_HSL_HUE_EXT"/>
<enum offset="32" extends="VkBlendOp" name="VK_BLEND_OP_HSL_SATURATION_EXT"/>
<enum offset="33" extends="VkBlendOp" name="VK_BLEND_OP_HSL_COLOR_EXT"/>
<enum offset="34" extends="VkBlendOp" name="VK_BLEND_OP_HSL_LUMINOSITY_EXT"/>
<enum offset="35" extends="VkBlendOp" name="VK_BLEND_OP_PLUS_EXT"/>
<enum offset="36" extends="VkBlendOp" name="VK_BLEND_OP_PLUS_CLAMPED_EXT"/>
<enum offset="37" extends="VkBlendOp" name="VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT"/>
<enum offset="38" extends="VkBlendOp" name="VK_BLEND_OP_PLUS_DARKER_EXT"/>
<enum offset="39" extends="VkBlendOp" name="VK_BLEND_OP_MINUS_EXT"/>
<enum offset="40" extends="VkBlendOp" name="VK_BLEND_OP_MINUS_CLAMPED_EXT"/>
<enum offset="41" extends="VkBlendOp" name="VK_BLEND_OP_CONTRAST_EXT"/>
<enum offset="42" extends="VkBlendOp" name="VK_BLEND_OP_INVERT_OVG_EXT"/>
<enum offset="43" extends="VkBlendOp" name="VK_BLEND_OP_RED_EXT"/>
<enum offset="44" extends="VkBlendOp" name="VK_BLEND_OP_GREEN_EXT"/>
<enum offset="45" extends="VkBlendOp" name="VK_BLEND_OP_BLUE_EXT"/>
<enum bitpos="19" extends="VkAccessFlagBits" name="VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT"/>
</require>
</extension>
<extension name="VK_NV_fragment_coverage_to_color" number="150" type="device" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION"/>
<enum value=""VK_NV_fragment_coverage_to_color"" name="VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV"/>
<type name="VkPipelineCoverageToColorStateCreateFlagsNV"/>
<type name="VkPipelineCoverageToColorStateCreateInfoNV"/>
</require>
</extension>
<extension name="VK_KHR_acceleration_structure" number="151" type="device" requiresCore="1.1" requires="VK_EXT_descriptor_indexing,VK_KHR_buffer_device_address,VK_KHR_deferred_host_operations" author="KHR" contact="Daniel Koch @dgkoch" supported="vulkan" sortorder="1">
<require>
<enum value="11" name="VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION"/>
<enum value=""VK_KHR_acceleration_structure"" name="VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME"/>
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_KHR"/>
<enum offset="9" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_VERSION_INFO_KHR"/>
<enum offset="10" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_INFO_KHR"/>
<enum offset="11" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR"/>
<enum offset="12" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR"/>
<enum offset="13" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR"/>
<enum offset="14" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR"/>
<enum offset="17" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_KHR"/>
<enum offset="20" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR"/>
<enum bitpos="25" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR"/>
<enum offset="0" extends="VkDescriptorType" name="VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR"/>
<enum bitpos="21" extends="VkAccessFlagBits" name="VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR"/>
<enum bitpos="22" extends="VkAccessFlagBits" name="VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR"/>
<enum offset="0" extends="VkQueryType" name="VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR"/>
<enum offset="1" extends="VkQueryType" name="VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR"/>
<enum offset="0" extends="VkDebugReportObjectTypeEXT" name="VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT"/>
<enum offset="0" extends="VkIndexType" extnumber="166" name="VK_INDEX_TYPE_NONE_KHR"/>
<enum bitpos="29" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR"/>
<enum bitpos="19" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR"/>
<enum bitpos="20" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR"/>
<type name="VkAccelerationStructureTypeKHR"/>
<type name="VkDeviceOrHostAddressKHR"/>
<type name="VkDeviceOrHostAddressConstKHR"/>
<type name="VkAccelerationStructureBuildRangeInfoKHR"/>
<type name="VkAabbPositionsKHR"/>
<type name="VkAccelerationStructureGeometryTrianglesDataKHR"/>
<type name="VkTransformMatrixKHR"/>
<type name="VkAccelerationStructureBuildGeometryInfoKHR"/>
<type name="VkAccelerationStructureBuildTypeKHR"/>
<type name="VkAccelerationStructureGeometryAabbsDataKHR"/>
<type name="VkAccelerationStructureInstanceKHR"/>
<type name="VkAccelerationStructureGeometryInstancesDataKHR"/>
<type name="VkAccelerationStructureGeometryDataKHR"/>
<type name="VkAccelerationStructureGeometryKHR"/>
<type name="VkGeometryFlagsKHR"/>
<type name="VkGeometryInstanceFlagsKHR"/>
<type name="VkGeometryFlagBitsKHR"/>
<type name="VkGeometryInstanceFlagBitsKHR"/>
<type name="VkAccelerationStructureCreateInfoKHR"/>
<type name="VkAccelerationStructureKHR"/>
<type name="VkBuildAccelerationStructureFlagBitsKHR"/>
<type name="VkBuildAccelerationStructureFlagsKHR"/>
<type name="VkCopyAccelerationStructureModeKHR"/>
<type name="VkGeometryTypeKHR"/>
<type name="VkWriteDescriptorSetAccelerationStructureKHR"/>
<type name="VkPhysicalDeviceAccelerationStructureFeaturesKHR"/>
<type name="VkPhysicalDeviceAccelerationStructurePropertiesKHR"/>
<type name="VkAccelerationStructureDeviceAddressInfoKHR"/>
<type name="VkAccelerationStructureVersionInfoKHR"/>
<type name="VkCopyAccelerationStructureToMemoryInfoKHR"/>
<type name="VkCopyMemoryToAccelerationStructureInfoKHR"/>
<type name="VkCopyAccelerationStructureInfoKHR"/>
<type name="VkAccelerationStructureCompatibilityKHR"/>
<type name="VkAccelerationStructureCreateFlagBitsKHR"/>
<type name="VkAccelerationStructureCreateFlagsKHR"/>
<type name="VkBuildAccelerationStructureModeKHR"/>
<type name="VkAccelerationStructureBuildSizesInfoKHR"/>
<command name="vkCreateAccelerationStructureKHR"/>
<command name="vkDestroyAccelerationStructureKHR"/>
<command name="vkCmdBuildAccelerationStructuresKHR"/>
<command name="vkCmdBuildAccelerationStructuresIndirectKHR"/>
<command name="vkBuildAccelerationStructuresKHR"/>
<command name="vkCopyAccelerationStructureKHR"/>
<command name="vkCopyAccelerationStructureToMemoryKHR"/>
<command name="vkCopyMemoryToAccelerationStructureKHR"/>
<command name="vkWriteAccelerationStructuresPropertiesKHR"/>
<command name="vkCmdCopyAccelerationStructureKHR"/>
<command name="vkCmdCopyAccelerationStructureToMemoryKHR"/>
<command name="vkCmdCopyMemoryToAccelerationStructureKHR"/>
<command name="vkGetAccelerationStructureDeviceAddressKHR"/>
<command name="vkCmdWriteAccelerationStructuresPropertiesKHR"/>
<command name="vkGetDeviceAccelerationStructureCompatibilityKHR"/>
<command name="vkGetAccelerationStructureBuildSizesKHR"/>
</require>
</extension>
<extension name="VK_KHR_ray_tracing_pipeline" number="348" type="device" requiresCore="1.1" requires="VK_KHR_spirv_1_4,VK_KHR_acceleration_structure" author="KHR" contact="Daniel Koch @dgkoch" supported="vulkan" sortorder="1">
<require>
<enum value="1" name="VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION"/>
<enum value=""VK_KHR_ray_tracing_pipeline"" name="VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME"/>
<enum name="VK_SHADER_UNUSED_KHR"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR"/>
<enum offset="15" extends="VkStructureType" extnumber="151" name="VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR"/>
<enum offset="16" extends="VkStructureType" extnumber="151" name="VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR"/>
<enum offset="18" extends="VkStructureType" extnumber="151" name="VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR"/>
<enum bitpos="8" extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_RAYGEN_BIT_KHR"/>
<enum bitpos="9" extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_ANY_HIT_BIT_KHR"/>
<enum bitpos="10" extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR"/>
<enum bitpos="11" extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_MISS_BIT_KHR"/>
<enum bitpos="12" extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_INTERSECTION_BIT_KHR"/>
<enum bitpos="13" extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_CALLABLE_BIT_KHR"/>
<enum bitpos="21" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR"/>
<enum bitpos="10" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR"/>
<enum offset="0" extends="VkPipelineBindPoint" extnumber="166" name="VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR"/>
<enum bitpos="14" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR"/>
<enum bitpos="15" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR"/>
<enum bitpos="16" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR"/>
<enum bitpos="17" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR"/>
<enum bitpos="12" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR"/>
<enum bitpos="13" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR"/>
<enum bitpos="19" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR"/>
<type name="VkRayTracingShaderGroupCreateInfoKHR"/>
<type name="VkRayTracingShaderGroupTypeKHR"/>
<type name="VkRayTracingPipelineCreateInfoKHR"/>
<type name="VkPhysicalDeviceRayTracingPipelineFeaturesKHR"/>
<type name="VkPhysicalDeviceRayTracingPipelinePropertiesKHR"/>
<type name="VkStridedDeviceAddressRegionKHR"/>
<type name="VkTraceRaysIndirectCommandKHR"/>
<type name="VkRayTracingPipelineInterfaceCreateInfoKHR"/>
<type name="VkShaderGroupShaderKHR"/>
<command name="vkCmdTraceRaysKHR"/>
<command name="vkCreateRayTracingPipelinesKHR"/>
<command name="vkGetRayTracingShaderGroupHandlesKHR"/>
<command name="vkGetRayTracingCaptureReplayShaderGroupHandlesKHR"/>
<command name="vkCmdTraceRaysIndirectKHR"/>
<command name="vkGetRayTracingShaderGroupStackSizeKHR"/>
<command name="vkCmdSetRayTracingPipelineStackSizeKHR"/>
</require>
</extension>
<extension name="VK_KHR_ray_query" number="349" type="device" requiresCore="1.1" requires="VK_KHR_spirv_1_4,VK_KHR_acceleration_structure" author="KHR" contact="Daniel Koch @dgkoch" supported="vulkan" sortorder="1">
<require>
<enum value="1" name="VK_KHR_RAY_QUERY_SPEC_VERSION"/>
<enum value=""VK_KHR_ray_query"" name="VK_KHR_RAY_QUERY_EXTENSION_NAME"/>
<enum offset="13" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR"/>
<type name="VkPhysicalDeviceRayQueryFeaturesKHR"/>
</require>
</extension>
<extension name="VK_NV_extension_152" number="152" author="NV" contact="Jeff Bolz @jeffbolznv" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_152_SPEC_VERSION"/>
<enum value=""VK_NV_extension_152"" name="VK_NV_EXTENSION_152_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_framebuffer_mixed_samples" number="153" type="device" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION"/>
<enum value=""VK_NV_framebuffer_mixed_samples"" name="VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV"/>
<type name="VkPipelineCoverageModulationStateCreateInfoNV"/>
<type name="VkPipelineCoverageModulationStateCreateFlagsNV"/>
<type name="VkCoverageModulationModeNV"/>
</require>
</extension>
<extension name="VK_NV_fill_rectangle" number="154" type="device" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_NV_FILL_RECTANGLE_SPEC_VERSION"/>
<enum value=""VK_NV_fill_rectangle"" name="VK_NV_FILL_RECTANGLE_EXTENSION_NAME"/>
<enum offset="0" extends="VkPolygonMode" name="VK_POLYGON_MODE_FILL_RECTANGLE_NV"/>
</require>
</extension>
<extension name="VK_NV_shader_sm_builtins" number="155" type="device" requiresCore="1.1" author="NV" contact="Daniel Koch @dgkoch" supported="vulkan">
<require>
<enum value="1" name="VK_NV_SHADER_SM_BUILTINS_SPEC_VERSION"/>
<enum value=""VK_NV_shader_sm_builtins"" name="VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV"/>
<type name="VkPhysicalDeviceShaderSMBuiltinsPropertiesNV"/>
<type name="VkPhysicalDeviceShaderSMBuiltinsFeaturesNV"/>
</require>
</extension>
<extension name="VK_EXT_post_depth_coverage" number="156" type="device" author="NV" contact="Daniel Koch @dgkoch" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION"/>
<enum value=""VK_EXT_post_depth_coverage"" name="VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_sampler_ycbcr_conversion" number="157" type="device" requires="VK_KHR_maintenance1,VK_KHR_bind_memory2,VK_KHR_get_memory_requirements2,VK_KHR_get_physical_device_properties2" author="KHR" contact="Andrew Garrard @fluppeteer" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="14" name="VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION"/>
<enum value=""VK_KHR_sampler_ycbcr_conversion"" name="VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR" alias="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR" alias="VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR" alias="VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES"/>
<enum extends="VkDebugReportObjectTypeEXT" name="VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT" alias="VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT"/>
<enum extends="VkObjectType" name="VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR" alias="VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION"/>
<enum extends="VkFormat" name="VK_FORMAT_G8B8G8R8_422_UNORM_KHR" alias="VK_FORMAT_G8B8G8R8_422_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_B8G8R8G8_422_UNORM_KHR" alias="VK_FORMAT_B8G8R8G8_422_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR" alias="VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR" alias="VK_FORMAT_G8_B8R8_2PLANE_420_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR" alias="VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR" alias="VK_FORMAT_G8_B8R8_2PLANE_422_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR" alias="VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_R10X6_UNORM_PACK16_KHR" alias="VK_FORMAT_R10X6_UNORM_PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR" alias="VK_FORMAT_R10X6G10X6_UNORM_2PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR" alias="VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR" alias="VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR" alias="VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR" alias="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR" alias="VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR" alias="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR" alias="VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR" alias="VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_R12X4_UNORM_PACK16_KHR" alias="VK_FORMAT_R12X4_UNORM_PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR" alias="VK_FORMAT_R12X4G12X4_UNORM_2PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR" alias="VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR" alias="VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR" alias="VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR" alias="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR" alias="VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR" alias="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR" alias="VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR" alias="VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16"/>
<enum extends="VkFormat" name="VK_FORMAT_G16B16G16R16_422_UNORM_KHR" alias="VK_FORMAT_G16B16G16R16_422_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_B16G16R16G16_422_UNORM_KHR" alias="VK_FORMAT_B16G16R16G16_422_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR" alias="VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR" alias="VK_FORMAT_G16_B16R16_2PLANE_420_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR" alias="VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR" alias="VK_FORMAT_G16_B16R16_2PLANE_422_UNORM"/>
<enum extends="VkFormat" name="VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR" alias="VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM"/>
<enum extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_PLANE_0_BIT_KHR" alias="VK_IMAGE_ASPECT_PLANE_0_BIT"/>
<enum extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_PLANE_1_BIT_KHR" alias="VK_IMAGE_ASPECT_PLANE_1_BIT"/>
<enum extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_PLANE_2_BIT_KHR" alias="VK_IMAGE_ASPECT_PLANE_2_BIT"/>
<enum extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_DISJOINT_BIT_KHR" alias="VK_IMAGE_CREATE_DISJOINT_BIT"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR" alias="VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR" alias="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR" alias="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR" alias="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR" alias="VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_DISJOINT_BIT_KHR" alias="VK_FORMAT_FEATURE_DISJOINT_BIT"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR" alias="VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT"/>
<type name="VkSamplerYcbcrConversionCreateInfoKHR"/>
<type name="VkSamplerYcbcrConversionInfoKHR"/>
<type name="VkBindImagePlaneMemoryInfoKHR"/>
<type name="VkImagePlaneMemoryRequirementsInfoKHR"/>
<type name="VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR"/>
<type name="VkSamplerYcbcrConversionImageFormatPropertiesKHR"/>
<command name="vkCreateSamplerYcbcrConversionKHR"/>
<command name="vkDestroySamplerYcbcrConversionKHR"/>
<type name="VkSamplerYcbcrConversionKHR"/>
<type name="VkSamplerYcbcrModelConversionKHR"/>
<enum extends="VkSamplerYcbcrModelConversion" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR" alias="VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY"/>
<enum extends="VkSamplerYcbcrModelConversion" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR" alias="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY"/>
<enum extends="VkSamplerYcbcrModelConversion" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR" alias="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709"/>
<enum extends="VkSamplerYcbcrModelConversion" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR" alias="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601"/>
<enum extends="VkSamplerYcbcrModelConversion" name="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR" alias="VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020"/>
<type name="VkSamplerYcbcrRangeKHR"/>
<enum extends="VkSamplerYcbcrRange" name="VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR" alias="VK_SAMPLER_YCBCR_RANGE_ITU_FULL"/>
<enum extends="VkSamplerYcbcrRange" name="VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR" alias="VK_SAMPLER_YCBCR_RANGE_ITU_NARROW"/>
<type name="VkChromaLocationKHR"/>
<enum extends="VkChromaLocation" name="VK_CHROMA_LOCATION_COSITED_EVEN_KHR" alias="VK_CHROMA_LOCATION_COSITED_EVEN"/>
<enum extends="VkChromaLocation" name="VK_CHROMA_LOCATION_MIDPOINT_KHR" alias="VK_CHROMA_LOCATION_MIDPOINT"/>
</require>
<require extension="VK_EXT_debug_report">
<enum extends="VkDebugReportObjectTypeEXT" offset="0" name="VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT"/>
</require>
</extension>
<extension name="VK_KHR_bind_memory2" number="158" type="device" author="KHR" contact="Tobias Hector @tobski" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_BIND_MEMORY_2_SPEC_VERSION"/>
<enum value=""VK_KHR_bind_memory2"" name="VK_KHR_BIND_MEMORY_2_EXTENSION_NAME"/>
<command name="vkBindBufferMemory2KHR"/>
<command name="vkBindImageMemory2KHR"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR" alias="VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR" alias="VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO"/>
<enum extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_ALIAS_BIT_KHR" alias="VK_IMAGE_CREATE_ALIAS_BIT"/>
<type name="VkBindBufferMemoryInfoKHR"/>
<type name="VkBindImageMemoryInfoKHR"/>
</require>
</extension>
<extension name="VK_EXT_image_drm_format_modifier" number="159" type="device" requires="VK_KHR_bind_memory2,VK_KHR_get_physical_device_properties2,VK_KHR_image_format_list,VK_KHR_sampler_ycbcr_conversion" author="EXT" contact="Chad Versace @chadversary" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION"/>
<enum value=""VK_EXT_image_drm_format_modifier"" name="VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME"/>
<enum offset="0" dir="-" extends="VkResult" name="VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT"/>
<enum offset="0" extends="VkImageTiling" name="VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT"/>
<enum bitpos="7" extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT"/>
<enum bitpos="8" extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT"/>
<enum bitpos="9" extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT"/>
<enum bitpos="10" extends="VkImageAspectFlagBits" name="VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT"/>
<type name="VkDrmFormatModifierPropertiesListEXT"/>
<type name="VkDrmFormatModifierPropertiesEXT"/>
<type name="VkPhysicalDeviceImageDrmFormatModifierInfoEXT"/>
<type name="VkImageDrmFormatModifierListCreateInfoEXT"/>
<type name="VkImageDrmFormatModifierExplicitCreateInfoEXT"/>
<type name="VkImageDrmFormatModifierPropertiesEXT"/>
<command name="vkGetImageDrmFormatModifierPropertiesEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_160" number="160" author="EXT" contact="Mark Young @marky-lunarg" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_160_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_160"" name="VK_EXT_EXTENSION_160_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_validation_cache" number="161" type="device" author="GOOGLE" contact="Cort Stratton @cdwfs" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_VALIDATION_CACHE_SPEC_VERSION"/>
<enum value=""VK_EXT_validation_cache"" name="VK_EXT_VALIDATION_CACHE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_VALIDATION_CACHE_EXT"/>
<type name="VkValidationCacheEXT"/>
<type name="VkValidationCacheCreateInfoEXT"/>
<type name="VkShaderModuleValidationCacheCreateInfoEXT"/>
<type name="VkValidationCacheHeaderVersionEXT"/>
<type name="VkValidationCacheCreateFlagsEXT"/>
<command name="vkCreateValidationCacheEXT"/>
<command name="vkDestroyValidationCacheEXT"/>
<command name="vkMergeValidationCachesEXT"/>
<command name="vkGetValidationCacheDataEXT"/>
</require>
</extension>
<extension name="VK_EXT_descriptor_indexing" number="162" type="device" requires="VK_KHR_get_physical_device_properties2,VK_KHR_maintenance3" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="2" name="VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION"/>
<enum value=""VK_EXT_descriptor_indexing"" name="VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT" alias="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT" alias="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT" alias="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT"/>
<enum extends="VkDescriptorBindingFlagBits" name="VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT" alias="VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT"/>
<enum extends="VkDescriptorBindingFlagBits" name="VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT" alias="VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT"/>
<enum extends="VkDescriptorBindingFlagBits" name="VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT" alias="VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT"/>
<enum extends="VkDescriptorBindingFlagBits" name="VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT" alias="VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT"/>
<enum extends="VkDescriptorPoolCreateFlagBits" name="VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT" alias="VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT"/>
<enum extends="VkDescriptorSetLayoutCreateFlagBits" name="VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT" alias="VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT"/>
<enum extends="VkResult" name="VK_ERROR_FRAGMENTATION_EXT" alias="VK_ERROR_FRAGMENTATION"/>
<type name="VkDescriptorSetLayoutBindingFlagsCreateInfoEXT"/>
<type name="VkPhysicalDeviceDescriptorIndexingFeaturesEXT"/>
<type name="VkPhysicalDeviceDescriptorIndexingPropertiesEXT"/>
<type name="VkDescriptorSetVariableDescriptorCountAllocateInfoEXT"/>
<type name="VkDescriptorSetVariableDescriptorCountLayoutSupportEXT"/>
<type name="VkDescriptorBindingFlagBitsEXT"/>
<type name="VkDescriptorBindingFlagsEXT"/>
</require>
</extension>
<extension name="VK_EXT_shader_viewport_index_layer" number="163" type="device" author="NV" contact="Daniel Koch @dgkoch" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION"/>
<enum value=""VK_EXT_shader_viewport_index_layer"" name="VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_portability_subset" number="164" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Bill Hollings @billhollings" platform="provisional" supported="vulkan" provisional="true">
<require>
<enum value="1" name="VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION"/>
<enum value=""VK_KHR_portability_subset"" name="VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<type name="VkPhysicalDevicePortabilitySubsetFeaturesKHR"/>
<type name="VkPhysicalDevicePortabilitySubsetPropertiesKHR"/>
</require>
</extension>
<extension name="VK_NV_shading_rate_image" number="165" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Pat Brown @nvpbrown" supported="vulkan">
<require>
<enum value="3" name="VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION"/>
<enum value=""VK_NV_shading_rate_image"" name="VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV"/>
<enum offset="3" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV"/>
<enum offset="4" extends="VkDynamicState" name="VK_DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV"/>
<enum bitpos="23" extends="VkAccessFlagBits" name="VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV"/>
<enum bitpos="8" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV"/>
<enum bitpos="22" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV"/>
<enum offset="6" extends="VkDynamicState" name="VK_DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV"/>
<type name="VkShadingRatePaletteEntryNV"/>
<type name="VkShadingRatePaletteNV"/>
<type name="VkPipelineViewportShadingRateImageStateCreateInfoNV"/>
<type name="VkPhysicalDeviceShadingRateImageFeaturesNV"/>
<type name="VkPhysicalDeviceShadingRateImagePropertiesNV"/>
<type name="VkCoarseSampleLocationNV"/>
<type name="VkCoarseSampleOrderCustomNV"/>
<type name="VkPipelineViewportCoarseSampleOrderStateCreateInfoNV"/>
<type name="VkCoarseSampleOrderTypeNV"/>
<command name="vkCmdBindShadingRateImageNV"/>
<command name="vkCmdSetViewportShadingRatePaletteNV"/>
<command name="vkCmdSetCoarseSampleOrderNV"/>
</require>
</extension>
<extension name="VK_NV_ray_tracing" number="166" type="device" requires="VK_KHR_get_physical_device_properties2,VK_KHR_get_memory_requirements2" author="NV" contact="Eric Werness @ewerness" supported="vulkan">
<require>
<enum value="3" name="VK_NV_RAY_TRACING_SPEC_VERSION"/>
<enum value=""VK_NV_ray_tracing"" name="VK_NV_RAY_TRACING_EXTENSION_NAME"/>
<enum name="VK_SHADER_UNUSED_NV"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_GEOMETRY_NV"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV"/>
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV"/>
<enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV"/>
<enum offset="9" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV"/>
<enum offset="11" extends="VkStructureType" name="VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV"/>
<enum offset="12" extends="VkStructureType" name="VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV"/>
<enum extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_RAYGEN_BIT_NV" alias="VK_SHADER_STAGE_RAYGEN_BIT_KHR"/>
<enum extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_ANY_HIT_BIT_NV" alias="VK_SHADER_STAGE_ANY_HIT_BIT_KHR"/>
<enum extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV" alias="VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR"/>
<enum extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_MISS_BIT_NV" alias="VK_SHADER_STAGE_MISS_BIT_KHR"/>
<enum extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_INTERSECTION_BIT_NV" alias="VK_SHADER_STAGE_INTERSECTION_BIT_KHR"/>
<enum extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_CALLABLE_BIT_NV" alias="VK_SHADER_STAGE_CALLABLE_BIT_KHR"/>
<enum extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV" alias="VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR"/>
<enum extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV" alias="VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR"/>
<enum extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_RAY_TRACING_BIT_NV" alias="VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR"/>
<enum extends="VkPipelineBindPoint" name="VK_PIPELINE_BIND_POINT_RAY_TRACING_NV" alias="VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR"/>
<enum offset="0" extends="VkDescriptorType" name="VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV"/>
<enum extends="VkAccessFlagBits" name="VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV" alias="VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR"/>
<enum extends="VkAccessFlagBits" name="VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV" alias="VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR"/>
<enum offset="0" extends="VkQueryType" name="VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV"/>
<enum bitpos="5" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV"/>
<enum offset="0" extends="VkDebugReportObjectTypeEXT" name="VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT"/>
<enum extends="VkIndexType" name="VK_INDEX_TYPE_NONE_NV" alias="VK_INDEX_TYPE_NONE_KHR"/>
<type name="VkRayTracingShaderGroupCreateInfoNV"/>
<type name="VkRayTracingShaderGroupTypeNV"/>
<enum extends="VkRayTracingShaderGroupTypeKHR" name="VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV" alias="VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR"/>
<enum extends="VkRayTracingShaderGroupTypeKHR" name="VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV" alias="VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR"/>
<enum extends="VkRayTracingShaderGroupTypeKHR" name="VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV" alias="VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR"/>
<type name="VkRayTracingPipelineCreateInfoNV"/>
<type name="VkGeometryTypeNV"/>
<enum extends="VkGeometryTypeKHR" name="VK_GEOMETRY_TYPE_TRIANGLES_NV" alias="VK_GEOMETRY_TYPE_TRIANGLES_KHR"/>
<enum extends="VkGeometryTypeKHR" name="VK_GEOMETRY_TYPE_AABBS_NV" alias="VK_GEOMETRY_TYPE_AABBS_KHR"/>
<type name="VkAccelerationStructureTypeNV"/>
<enum extends="VkAccelerationStructureTypeKHR" name="VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV" alias="VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR"/>
<enum extends="VkAccelerationStructureTypeKHR" name="VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV" alias="VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR"/>
<type name="VkGeometryTrianglesNV"/>
<type name="VkGeometryAABBNV"/>
<type name="VkGeometryDataNV"/>
<type name="VkGeometryNV"/>
<type name="VkGeometryFlagsNV"/>
<type name="VkGeometryFlagBitsNV"/>
<enum extends="VkGeometryFlagBitsKHR" name="VK_GEOMETRY_OPAQUE_BIT_NV" alias="VK_GEOMETRY_OPAQUE_BIT_KHR"/>
<enum extends="VkGeometryFlagBitsKHR" name="VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV" alias="VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR"/>
<type name="VkGeometryInstanceFlagsNV"/>
<type name="VkGeometryInstanceFlagBitsNV"/>
<enum extends="VkGeometryInstanceFlagBitsKHR" name="VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV" alias="VK_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR"/>
<enum extends="VkGeometryInstanceFlagBitsKHR" name="VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV" alias="VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR"/>
<enum extends="VkGeometryInstanceFlagBitsKHR" name="VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV" alias="VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR"/>
<enum extends="VkGeometryInstanceFlagBitsKHR" name="VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV" alias="VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR"/>
<type name="VkAccelerationStructureInfoNV"/>
<type name="VkAccelerationStructureCreateInfoNV"/>
<type name="VkAccelerationStructureNV"/>
<type name="VkBuildAccelerationStructureFlagBitsNV"/>
<enum extends="VkBuildAccelerationStructureFlagBitsKHR" name="VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV" alias="VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR"/>
<enum extends="VkBuildAccelerationStructureFlagBitsKHR" name="VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV" alias="VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR"/>
<enum extends="VkBuildAccelerationStructureFlagBitsKHR" name="VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV" alias="VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR"/>
<enum extends="VkBuildAccelerationStructureFlagBitsKHR" name="VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV" alias="VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR"/>
<enum extends="VkBuildAccelerationStructureFlagBitsKHR" name="VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV" alias="VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR"/>
<type name="VkBuildAccelerationStructureFlagsNV"/>
<type name="VkCopyAccelerationStructureModeNV"/>
<enum extends="VkCopyAccelerationStructureModeKHR" name="VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV" alias="VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR"/>
<enum extends="VkCopyAccelerationStructureModeKHR" name="VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV" alias="VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR"/>
<type name="VkBindAccelerationStructureMemoryInfoNV"/>
<type name="VkWriteDescriptorSetAccelerationStructureNV"/>
<type name="VkAccelerationStructureMemoryRequirementsInfoNV"/>
<type name="VkPhysicalDeviceRayTracingPropertiesNV"/>
<type name="VkMemoryRequirements2KHR"/>
<type name="VkAccelerationStructureMemoryRequirementsTypeNV"/>
<type name="VkTransformMatrixNV"/>
<type name="VkAabbPositionsNV"/>
<type name="VkAccelerationStructureInstanceNV"/>
<command name="vkCreateAccelerationStructureNV"/>
<command name="vkDestroyAccelerationStructureNV"/>
<command name="vkGetAccelerationStructureMemoryRequirementsNV"/>
<command name="vkBindAccelerationStructureMemoryNV"/>
<command name="vkCmdBuildAccelerationStructureNV"/>
<command name="vkCmdCopyAccelerationStructureNV"/>
<command name="vkCmdTraceRaysNV"/>
<command name="vkCreateRayTracingPipelinesNV"/>
<command name="vkGetRayTracingShaderGroupHandlesNV"/>
<command name="vkGetAccelerationStructureHandleNV"/>
<command name="vkCmdWriteAccelerationStructuresPropertiesNV"/>
<command name="vkCompileDeferredNV"/>
</require>
</extension>
<extension name="VK_NV_representative_fragment_test" number="167" type="device" author="NV" contact="Kedarnath Thangudu @kthangudu" supported="vulkan">
<require>
<enum value="2" name="VK_NV_REPRESENTATIVE_FRAGMENT_TEST_SPEC_VERSION"/>
<enum value=""VK_NV_representative_fragment_test"" name="VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV"/>
<type name="VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV"/>
<type name="VkPipelineRepresentativeFragmentTestStateCreateInfoNV"/>
</require>
</extension>
<extension name="VK_NV_extension_168" number="168" author="NV" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_168_SPEC_VERSION"/>
<enum value=""VK_NV_extension_168"" name="VK_EXT_EXTENSION_168_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_maintenance3" number="169" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_1">
<require>
<enum value="1" name="VK_KHR_MAINTENANCE3_SPEC_VERSION"/>
<enum value=""VK_KHR_maintenance3"" name="VK_KHR_MAINTENANCE3_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR" alias="VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT"/>
<type name="VkPhysicalDeviceMaintenance3PropertiesKHR"/>
<type name="VkDescriptorSetLayoutSupportKHR"/>
<command name="vkGetDescriptorSetLayoutSupportKHR"/>
</require>
</extension>
<extension name="VK_KHR_draw_indirect_count" number="170" type="device" author="KHR" contact="Piers Daniell @pdaniell-nv" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION"/>
<enum value=""VK_KHR_draw_indirect_count"" name="VK_KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME"/>
<command name="vkCmdDrawIndirectCountKHR"/>
<command name="vkCmdDrawIndexedIndirectCountKHR"/>
</require>
</extension>
<extension name="VK_EXT_filter_cubic" number="171" type="device" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="vulkan">
<require>
<enum value="3" name="VK_EXT_FILTER_CUBIC_SPEC_VERSION"/>
<enum value=""VK_EXT_filter_cubic"" name="VK_EXT_FILTER_CUBIC_EXTENSION_NAME"/>
<enum extends="VkFilter" name="VK_FILTER_CUBIC_EXT" alias="VK_FILTER_CUBIC_IMG"/>
<enum extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT" alias="VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT"/>
<type name="VkPhysicalDeviceImageViewImageFormatInfoEXT"/>
<type name="VkFilterCubicImageViewImageFormatPropertiesEXT"/>
</require>
</extension>
<extension name="VK_QCOM_render_pass_shader_resolve" number="172" type="device" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="vulkan">
<require>
<enum value="4" name="VK_QCOM_RENDER_PASS_SHADER_RESOLVE_SPEC_VERSION"/>
<enum value=""VK_QCOM_render_pass_shader_resolve"" name="VK_QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME"/>
<enum bitpos="2" extends="VkSubpassDescriptionFlagBits" name="VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM"/>
<enum bitpos="3" extends="VkSubpassDescriptionFlagBits" name="VK_SUBPASS_DESCRIPTION_SHADER_RESOLVE_BIT_QCOM"/>
</require>
</extension>
<extension name="VK_QCOM_extension_173" number="173" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_extension_173_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_173"" name="VK_QCOM_extension_173_EXTENSION_NAME"/>
<enum bitpos="18" extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_RESERVED_18_BIT_QCOM"/>
<enum bitpos="16" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_RESERVED_16_BIT_QCOM"/>
<enum bitpos="17" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_RESERVED_17_BIT_QCOM"/>
</require>
</extension>
<extension name="VK_QCOM_extension_174" number="174" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_extension_174_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_174"" name="VK_QCOM_extension_174_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_global_priority" number="175" type="device" author="EXT" contact="Andres Rodriguez @lostgoat" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION"/>
<enum value=""VK_EXT_global_priority"" name="VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT"/>
<enum offset="1" dir="-" extends="VkResult" name="VK_ERROR_NOT_PERMITTED_EXT"/>
<type name="VkDeviceQueueGlobalPriorityCreateInfoEXT"/>
<type name="VkQueueGlobalPriorityEXT"/>
</require>
</extension>
<extension name="VK_KHR_shader_subgroup_extended_types" number="176" type="device" requiresCore="1.1" author="KHR" contact="Neil Henning @sheredom" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_SPEC_VERSION"/>
<enum value=""VK_KHR_shader_subgroup_extended_types"" name="VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES"/>
<type name="VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR"/>
</require>
</extension>
<extension name="VK_EXT_extension_177" number="177" author="EXT" contact="Neil Henning @sheredom" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_177_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_177"" name="VK_KHR_EXTENSION_177_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_8bit_storage" number="178" type="device" requires="VK_KHR_get_physical_device_properties2,VK_KHR_storage_buffer_storage_class" author="KHR" contact="Alexander Galazin @alegal-arm" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_8BIT_STORAGE_SPEC_VERSION"/>
<enum value=""VK_KHR_8bit_storage"" name="VK_KHR_8BIT_STORAGE_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES"/>
<type name="VkPhysicalDevice8BitStorageFeaturesKHR"/>
</require>
</extension>
<extension name="VK_EXT_external_memory_host" number="179" type="device" author="EXT" requires="VK_KHR_external_memory" contact="Daniel Rakos @drakos-amd" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION"/>
<enum value=""VK_EXT_external_memory_host"" name="VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT"/>
<enum bitpos="7" extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT"/>
<enum bitpos="8" extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT"/>
<type name="VkImportMemoryHostPointerInfoEXT"/>
<type name="VkMemoryHostPointerPropertiesEXT"/>
<type name="VkPhysicalDeviceExternalMemoryHostPropertiesEXT"/>
<command name="vkGetMemoryHostPointerPropertiesEXT"/>
</require>
</extension>
<extension name="VK_AMD_buffer_marker" number="180" type="device" author="AMD" contact="Daniel Rakos @drakos-amd" specialuse="devtools" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_BUFFER_MARKER_SPEC_VERSION"/>
<enum value=""VK_AMD_buffer_marker"" name="VK_AMD_BUFFER_MARKER_EXTENSION_NAME"/>
<command name="vkCmdWriteBufferMarkerAMD"/>
</require>
</extension>
<extension name="VK_KHR_shader_atomic_int64" number="181" type="device" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Aaron Hagan @ahagan" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION"/>
<enum value=""VK_KHR_shader_atomic_int64"" name="VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES"/>
<type name="VkPhysicalDeviceShaderAtomicInt64FeaturesKHR"/>
</require>
</extension>
<extension name="VK_KHR_shader_clock" number="182" type="device" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Aaron Hagan @ahagan" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_SHADER_CLOCK_SPEC_VERSION"/>
<enum value=""VK_KHR_shader_clock"" name="VK_KHR_SHADER_CLOCK_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR"/>
<type name="VkPhysicalDeviceShaderClockFeaturesKHR"/>
</require>
</extension>
<extension name="VK_AMD_extension_183" number="183" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_183_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_183"" name="VK_KHR_EXTENSION_183_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_pipeline_compiler_control" number="184" type="device" author="AMD" contact="Matthaeus G. Chajdas @anteru" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_PIPELINE_COMPILER_CONTROL_SPEC_VERSION"/>
<enum value=""VK_AMD_pipeline_compiler_control"" name="VK_AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD"/>
<type name="VkPipelineCompilerControlFlagBitsAMD"/>
<type name="VkPipelineCompilerControlFlagsAMD"/>
<type name="VkPipelineCompilerControlCreateInfoAMD"/>
</require>
</extension>
<extension name="VK_EXT_calibrated_timestamps" number="185" type="device" author="EXT" contact="Daniel Rakos @drakos-amd" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_CALIBRATED_TIMESTAMPS_SPEC_VERSION"/>
<enum value=""VK_EXT_calibrated_timestamps"" name="VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT"/>
<type name="VkTimeDomainEXT"/>
<type name="VkCalibratedTimestampInfoEXT"/>
<command name="vkGetPhysicalDeviceCalibrateableTimeDomainsEXT"/>
<command name="vkGetCalibratedTimestampsEXT"/>
</require>
</extension>
<extension name="VK_AMD_shader_core_properties" number="186" type="device" author="AMD" requires="VK_KHR_get_physical_device_properties2" contact="Martin Dinkov @mdinkov" supported="vulkan">
<require>
<enum value="2" name="VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION"/>
<enum value=""VK_AMD_shader_core_properties"" name="VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD"/>
<type name="VkPhysicalDeviceShaderCorePropertiesAMD"/>
</require>
</extension>
<extension name="VK_AMD_extension_187" number="187" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_187_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_187"" name="VK_KHR_EXTENSION_187_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_video_decode_h265" number="188" type="device" requires="VK_KHR_video_decode_queue" author="KHR" contact="[email protected]" provisional="true" platform="provisional" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_VIDEO_DECODE_H265_SPEC_VERSION"/>
<enum value=""VK_EXT_video_decode_h265"" name="VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_CAPABILITIES_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_CREATE_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<enum bitpos="1" extends="VkVideoCodecOperationFlagBitsKHR" name="VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT" protect="VK_ENABLE_BETA_EXTENSIONS"/>
<type name="VkVideoDecodeH265CreateFlagsEXT"/>
<type name="VkVideoDecodeH265ProfileEXT"/>
<type name="VkVideoDecodeH265CapabilitiesEXT"/>
<type name="VkVideoDecodeH265SessionCreateInfoEXT"/>
<type name="VkVideoDecodeH265SessionParametersCreateInfoEXT"/>
<type name="VkVideoDecodeH265SessionParametersAddInfoEXT"/>
<type name="VkVideoDecodeH265PictureInfoEXT"/>
<type name="VkVideoDecodeH265DpbSlotInfoEXT"/>
</require>
</extension>
<extension name="VK_AMD_extension_189" number="189" author="AMD" contact="Daniel Rakos @drakos-amd" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_189_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_189"" name="VK_KHR_EXTENSION_189_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_memory_overallocation_behavior" number="190" type="device" author="AMD" contact="Martin Dinkov @mdinkov" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION"/>
<enum value=""VK_AMD_memory_overallocation_behavior"" name="VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD"/>
<type name="VkMemoryOverallocationBehaviorAMD"/>
<type name="VkDeviceMemoryOverallocationCreateInfoAMD"/>
</require>
</extension>
<extension name="VK_EXT_vertex_attribute_divisor" number="191" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Vikram Kushwaha @vkushwaha" supported="vulkan">
<require>
<enum value="3" name="VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION"/>
<enum value=""VK_EXT_vertex_attribute_divisor"" name="VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT"/>
<type name="VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT"/>
<type name="VkVertexInputBindingDivisorDescriptionEXT"/>
<type name="VkPipelineVertexInputDivisorStateCreateInfoEXT"/>
<type name="VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT"/>
</require>
</extension>
<extension name="VK_GGP_frame_token" number="192" type="device" requires="VK_KHR_swapchain,VK_GGP_stream_descriptor_surface" platform="ggp" author="GGP" contact="Jean-Francois Roy @jfroy" supported="vulkan">
<require>
<enum value="1" name="VK_GGP_FRAME_TOKEN_SPEC_VERSION"/>
<enum value=""VK_GGP_frame_token"" name="VK_GGP_FRAME_TOKEN_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP"/>
<type name="VkPresentFrameTokenGGP"/>
</require>
</extension>
<extension name="VK_EXT_pipeline_creation_feedback" number="193" type="device" author="GOOGLE" contact="Jean-Francois Roy @jfroy" specialuse="devtools" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_PIPELINE_CREATION_FEEDBACK_SPEC_VERSION"/>
<enum value=""VK_EXT_pipeline_creation_feedback"" name="VK_EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT"/>
<type name="VkPipelineCreationFeedbackFlagBitsEXT"/>
<type name="VkPipelineCreationFeedbackFlagsEXT"/>
<type name="VkPipelineCreationFeedbackCreateInfoEXT"/>
<type name="VkPipelineCreationFeedbackEXT"/>
</require>
</extension>
<extension name="VK_GOOGLE_extension_194" number="194" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
<require>
<enum value="0" name="VK_GOOGLE_EXTENSION_194_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_extension_194"" name="VK_GOOGLE_EXTENSION_194_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_GOOGLE_extension_195" number="195" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
<require>
<enum value="0" name="VK_GOOGLE_EXTENSION_195_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_extension_195"" name="VK_GOOGLE_EXTENSION_195_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_GOOGLE_extension_196" number="196" author="GOOGLE" contact="Jean-Francois Roy @jfroy" supported="disabled">
<require>
<enum value="0" name="VK_GOOGLE_EXTENSION_196_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_extension_196"" name="VK_GOOGLE_EXTENSION_196_EXTENSION_NAME"/>
<enum bitpos="1" extends="VkPipelineCacheCreateFlagBits"
name="VK_PIPELINE_CACHE_CREATE_RESERVED_1_BIT_EXT"/>
</require>
</extension>
<extension name="VK_KHR_driver_properties" number="197" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Daniel Rakos @drakos-amd" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION"/>
<enum value=""VK_KHR_driver_properties"" name="VK_KHR_DRIVER_PROPERTIES_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES"/>
<enum name="VK_MAX_DRIVER_NAME_SIZE_KHR"/>
<enum name="VK_MAX_DRIVER_INFO_SIZE_KHR"/>
<type name="VkDriverIdKHR"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_AMD_PROPRIETARY_KHR" alias="VK_DRIVER_ID_AMD_PROPRIETARY"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR" alias="VK_DRIVER_ID_AMD_OPEN_SOURCE"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_MESA_RADV_KHR" alias="VK_DRIVER_ID_MESA_RADV"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR" alias="VK_DRIVER_ID_NVIDIA_PROPRIETARY"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR" alias="VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR" alias="VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR" alias="VK_DRIVER_ID_IMAGINATION_PROPRIETARY"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR" alias="VK_DRIVER_ID_QUALCOMM_PROPRIETARY"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_ARM_PROPRIETARY_KHR" alias="VK_DRIVER_ID_ARM_PROPRIETARY"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_GOOGLE_SWIFTSHADER_KHR" alias="VK_DRIVER_ID_GOOGLE_SWIFTSHADER"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_GGP_PROPRIETARY_KHR" alias="VK_DRIVER_ID_GGP_PROPRIETARY"/>
<enum extends="VkDriverId" name="VK_DRIVER_ID_BROADCOM_PROPRIETARY_KHR" alias="VK_DRIVER_ID_BROADCOM_PROPRIETARY"/>
<type name="VkConformanceVersionKHR"/>
<type name="VkPhysicalDeviceDriverPropertiesKHR"/>
</require>
</extension>
<extension name="VK_KHR_shader_float_controls" number="198" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Alexander Galazin @alegal-arm" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="4" name="VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION"/>
<enum value=""VK_KHR_shader_float_controls"" name="VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES"/>
<type name="VkPhysicalDeviceFloatControlsPropertiesKHR"/>
<type name="VkShaderFloatControlsIndependenceKHR"/>
<enum extends="VkShaderFloatControlsIndependence" name="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY_KHR" alias="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY"/>
<enum extends="VkShaderFloatControlsIndependence" name="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL_KHR" alias="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_ALL"/>
<enum extends="VkShaderFloatControlsIndependence" name="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE_KHR" alias="VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE"/>
</require>
</extension>
<extension name="VK_NV_shader_subgroup_partitioned" number="199" type="device" requiresCore="1.1" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION"/>
<enum value=""VK_NV_shader_subgroup_partitioned"" name="VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME"/>
<enum bitpos="8" extends="VkSubgroupFeatureFlagBits" name="VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV"/>
</require>
</extension>
<extension name="VK_KHR_depth_stencil_resolve" number="200" type="device" requires="VK_KHR_create_renderpass2" author="KHR" contact="Jan-Harald Fredriksen @janharald" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION"/>
<enum value=""VK_KHR_depth_stencil_resolve"" name="VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR" alias="VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE"/>
<type name="VkSubpassDescriptionDepthStencilResolveKHR"/>
<type name="VkPhysicalDeviceDepthStencilResolvePropertiesKHR"/>
<type name="VkResolveModeFlagBitsKHR"/>
<type name="VkResolveModeFlagsKHR"/>
<enum extends="VkResolveModeFlagBits" name="VK_RESOLVE_MODE_NONE_KHR" alias="VK_RESOLVE_MODE_NONE"/>
<enum extends="VkResolveModeFlagBits" name="VK_RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR" alias="VK_RESOLVE_MODE_SAMPLE_ZERO_BIT"/>
<enum extends="VkResolveModeFlagBits" name="VK_RESOLVE_MODE_AVERAGE_BIT_KHR" alias="VK_RESOLVE_MODE_AVERAGE_BIT"/>
<enum extends="VkResolveModeFlagBits" name="VK_RESOLVE_MODE_MIN_BIT_KHR" alias="VK_RESOLVE_MODE_MIN_BIT"/>
<enum extends="VkResolveModeFlagBits" name="VK_RESOLVE_MODE_MAX_BIT_KHR" alias="VK_RESOLVE_MODE_MAX_BIT"/>
</require>
</extension>
<extension name="VK_KHR_swapchain_mutable_format" number="201" type="device" author="KHR" requires="VK_KHR_swapchain,VK_KHR_maintenance2,VK_KHR_image_format_list" contact="Daniel Rakos @drakos-arm" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_SPEC_VERSION"/>
<enum value=""VK_KHR_swapchain_mutable_format"" name="VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME"/>
<enum bitpos="2" extends="VkSwapchainCreateFlagBitsKHR" name="VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR"/>
</require>
</extension>
<extension name="VK_NV_compute_shader_derivatives" number="202" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Pat Brown @nvpbrown" supported="vulkan">
<require>
<enum value="1" name="VK_NV_COMPUTE_SHADER_DERIVATIVES_SPEC_VERSION"/>
<enum value=""VK_NV_compute_shader_derivatives"" name="VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV"/>
<type name="VkPhysicalDeviceComputeShaderDerivativesFeaturesNV"/>
</require>
</extension>
<extension name="VK_NV_mesh_shader" number="203" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Christoph Kubisch @pixeljetstream" supported="vulkan">
<require>
<enum value="1" name="VK_NV_MESH_SHADER_SPEC_VERSION"/>
<enum value=""VK_NV_mesh_shader"" name="VK_NV_MESH_SHADER_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV"/>
<enum bitpos="6" extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_TASK_BIT_NV"/>
<enum bitpos="7" extends="VkShaderStageFlagBits" name="VK_SHADER_STAGE_MESH_BIT_NV"/>
<enum bitpos="19" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV"/>
<enum bitpos="20" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV"/>
<command name="vkCmdDrawMeshTasksNV"/>
<command name="vkCmdDrawMeshTasksIndirectNV"/>
<command name="vkCmdDrawMeshTasksIndirectCountNV"/>
<type name="VkPhysicalDeviceMeshShaderFeaturesNV"/>
<type name="VkPhysicalDeviceMeshShaderPropertiesNV"/>
<type name="VkDrawMeshTasksIndirectCommandNV"/>
</require>
</extension>
<extension name="VK_NV_fragment_shader_barycentric" number="204" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Pat Brown @nvpbrown" supported="vulkan">
<require>
<enum value="1" name="VK_NV_FRAGMENT_SHADER_BARYCENTRIC_SPEC_VERSION"/>
<enum value=""VK_NV_fragment_shader_barycentric"" name="VK_NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV"/>
<type name="VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV"/>
</require>
</extension>
<extension name="VK_NV_shader_image_footprint" number="205" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Pat Brown @nvpbrown" supported="vulkan">
<require>
<enum value="2" name="VK_NV_SHADER_IMAGE_FOOTPRINT_SPEC_VERSION"/>
<enum value=""VK_NV_shader_image_footprint"" name="VK_NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV"/>
<type name="VkPhysicalDeviceShaderImageFootprintFeaturesNV"/>
</require>
</extension>
<extension name="VK_NV_scissor_exclusive" number="206" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Pat Brown @nvpbrown" supported="vulkan">
<require>
<enum value="1" name="VK_NV_SCISSOR_EXCLUSIVE_SPEC_VERSION"/>
<enum value=""VK_NV_scissor_exclusive"" name="VK_NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV"/>
<enum offset="1" extends="VkDynamicState" name="VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV"/>
<type name="VkPipelineViewportExclusiveScissorStateCreateInfoNV"/>
<type name="VkPhysicalDeviceExclusiveScissorFeaturesNV"/>
<command name="vkCmdSetExclusiveScissorNV"/>
</require>
</extension>
<extension name="VK_NV_device_diagnostic_checkpoints" type="device" number="207" requires="VK_KHR_get_physical_device_properties2" author="NVIDIA" contact="Nuno Subtil @nsubtil" supported="vulkan">
<require>
<enum value="2" name="VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_SPEC_VERSION"/>
<enum value=""VK_NV_device_diagnostic_checkpoints"" name="VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV"/>
<type name="VkQueueFamilyCheckpointPropertiesNV"/>
<type name="VkCheckpointDataNV"/>
<command name="vkCmdSetCheckpointNV"/>
<command name="vkGetQueueCheckpointDataNV"/>
</require>
</extension>
<extension name="VK_KHR_timeline_semaphore" number="208" type="device" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Jason Ekstrand @jekstrand" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="2" name="VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION"/>
<enum value=""VK_KHR_timeline_semaphore"" name="VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR" alias="VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR" alias="VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR" alias="VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO"/>
<enum extends="VkSemaphoreType" name="VK_SEMAPHORE_TYPE_BINARY_KHR" alias="VK_SEMAPHORE_TYPE_BINARY"/>
<enum extends="VkSemaphoreType" name="VK_SEMAPHORE_TYPE_TIMELINE_KHR" alias="VK_SEMAPHORE_TYPE_TIMELINE"/>
<enum extends="VkSemaphoreWaitFlagBits" name="VK_SEMAPHORE_WAIT_ANY_BIT_KHR" alias="VK_SEMAPHORE_WAIT_ANY_BIT"/>
<type name="VkSemaphoreTypeKHR"/>
<type name="VkPhysicalDeviceTimelineSemaphoreFeaturesKHR"/>
<type name="VkPhysicalDeviceTimelineSemaphorePropertiesKHR"/>
<type name="VkSemaphoreTypeCreateInfoKHR"/>
<type name="VkTimelineSemaphoreSubmitInfoKHR"/>
<type name="VkSemaphoreWaitFlagBitsKHR"/>
<type name="VkSemaphoreWaitFlagsKHR"/>
<type name="VkSemaphoreWaitInfoKHR"/>
<type name="VkSemaphoreSignalInfoKHR"/>
<command name="vkGetSemaphoreCounterValueKHR"/>
<command name="vkWaitSemaphoresKHR"/>
<command name="vkSignalSemaphoreKHR"/>
</require>
</extension>
<extension name="VK_KHR_extension_209" number="209" type="device" author="KHR" contact="Ian Elliott @ianelliott" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_209_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_209"" name="VK_KHR_EXTENSION_209_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_INTEL_shader_integer_functions2" number="210" type="device" requires="VK_KHR_get_physical_device_properties2" author="INTEL" contact="Ian Romanick @ianromanick" supported="vulkan">
<require>
<enum value="1" name="VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_SPEC_VERSION"/>
<enum value=""VK_INTEL_shader_integer_functions2"" name="VK_INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL"/>
<type name="VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL"/>
</require>
</extension>
<extension name="VK_INTEL_performance_query" number="211" type="device" author="INTEL" contact="Lionel Landwerlin @llandwerlin" specialuse="devtools" supported="vulkan">
<require>
<enum value="2" name="VK_INTEL_PERFORMANCE_QUERY_SPEC_VERSION"/>
<enum value=""VK_INTEL_performance_query"" name="VK_INTEL_PERFORMANCE_QUERY_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL" alias="VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL" comment="Backwards-compatible alias"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL"/>
<enum offset="0" extends="VkQueryType" name="VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL"/>
<type name="VkPerformanceConfigurationTypeINTEL"/>
<type name="VkQueryPoolSamplingModeINTEL"/>
<type name="VkPerformanceOverrideTypeINTEL"/>
<type name="VkPerformanceParameterTypeINTEL"/>
<type name="VkPerformanceValueTypeINTEL"/>
<type name="VkPerformanceValueDataINTEL"/>
<type name="VkPerformanceValueINTEL"/>
<type name="VkInitializePerformanceApiInfoINTEL"/>
<type name="VkQueryPoolCreateInfoINTEL"/>
<type name="VkQueryPoolPerformanceQueryCreateInfoINTEL"/>
<type name="VkPerformanceMarkerInfoINTEL"/>
<type name="VkPerformanceStreamMarkerInfoINTEL"/>
<type name="VkPerformanceOverrideInfoINTEL"/>
<type name="VkPerformanceConfigurationAcquireInfoINTEL"/>
<type name="VkPerformanceConfigurationINTEL"/>
<command name="vkInitializePerformanceApiINTEL"/>
<command name="vkUninitializePerformanceApiINTEL"/>
<command name="vkCmdSetPerformanceMarkerINTEL"/>
<command name="vkCmdSetPerformanceStreamMarkerINTEL"/>
<command name="vkCmdSetPerformanceOverrideINTEL"/>
<command name="vkAcquirePerformanceConfigurationINTEL"/>
<command name="vkReleasePerformanceConfigurationINTEL"/>
<command name="vkQueueSetPerformanceConfigurationINTEL"/>
<command name="vkGetPerformanceParameterINTEL"/>
</require>
</extension>
<extension name="VK_KHR_vulkan_memory_model" number="212" type="device" author="KHR" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="3" name="VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION"/>
<enum value=""VK_KHR_vulkan_memory_model"" name="VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES"/>
<type name="VkPhysicalDeviceVulkanMemoryModelFeaturesKHR"/>
</require>
</extension>
<extension name="VK_EXT_pci_bus_info" number="213" type="device" author="EXT" requires="VK_KHR_get_physical_device_properties2" contact="Matthaeus G. Chajdas @anteru" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_PCI_BUS_INFO_SPEC_VERSION"/>
<enum value=""VK_EXT_pci_bus_info"" name="VK_EXT_PCI_BUS_INFO_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT"/>
<type name="VkPhysicalDevicePCIBusInfoPropertiesEXT"/>
</require>
</extension>
<extension name="VK_AMD_display_native_hdr" number="214" type="device" author="AMD" requires="VK_KHR_get_physical_device_properties2,VK_KHR_get_surface_capabilities2,VK_KHR_swapchain" contact="Matthaeus G. Chajdas @anteru" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_DISPLAY_NATIVE_HDR_SPEC_VERSION"/>
<enum value=""VK_AMD_display_native_hdr"" name="VK_AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD"/>
<enum offset="0" extends="VkColorSpaceKHR" name="VK_COLOR_SPACE_DISPLAY_NATIVE_AMD"/>
<type name="VkDisplayNativeHdrSurfaceCapabilitiesAMD"/>
<type name="VkSwapchainDisplayNativeHdrCreateInfoAMD"/>
<command name="vkSetLocalDimmingAMD"/>
</require>
</extension>
<extension name="VK_FUCHSIA_imagepipe_surface" number="215" type="instance" author="FUCHSIA" requires="VK_KHR_surface" platform="fuchsia" contact="Craig Stout @cdotstout" supported="vulkan">
<require>
<enum value="1" name="VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION"/>
<enum value=""VK_FUCHSIA_imagepipe_surface"" name="VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA"/>
<type name="VkImagePipeSurfaceCreateFlagsFUCHSIA"/>
<type name="VkImagePipeSurfaceCreateInfoFUCHSIA"/>
<command name="vkCreateImagePipeSurfaceFUCHSIA"/>
</require>
</extension>
<extension name="VK_KHR_shader_terminate_invocation" number="216" type="device" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Jesse Hall @critsec" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_SHADER_TERMINATE_INVOCATION_SPEC_VERSION"/>
<enum value=""VK_KHR_shader_terminate_invocation"" name="VK_KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR"/>
<type name="VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR"/>
</require>
</extension>
<extension name="VK_GOOGLE_extension_217" number="217" author="GOOGLE" contact="Jesse Hall @critsec" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_217_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_217"" name="VK_KHR_EXTENSION_217_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_metal_surface" number="218" type="instance" requires="VK_KHR_surface" platform="metal" supported="vulkan" author="EXT" contact="Dzmitry Malyshau @kvark">
<require>
<enum value="1" name="VK_EXT_METAL_SURFACE_SPEC_VERSION"/>
<enum value=""VK_EXT_metal_surface"" name="VK_EXT_METAL_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT"/>
<type name="VkMetalSurfaceCreateFlagsEXT"/>
<type name="VkMetalSurfaceCreateInfoEXT"/>
<command name="vkCreateMetalSurfaceEXT"/>
<type name="CAMetalLayer"/>
</require>
</extension>
<extension name="VK_EXT_fragment_density_map" number="219" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Matthew Netsch @mnetsch" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION"/>
<enum value=""VK_EXT_fragment_density_map"" name="VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT"/>
<enum bitpos="14" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT"/>
<enum offset="0" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT"/>
<enum bitpos="24" extends="VkAccessFlagBits" name="VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT"/>
<enum bitpos="24" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT"/>
<enum bitpos="9" extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT"/>
<enum bitpos="0" extends="VkImageViewCreateFlagBits" name="VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT"/>
<enum bitpos="23" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT"/>
<enum bitpos="0" extends="VkSamplerCreateFlagBits" name="VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT"/>
<enum bitpos="1" extends="VkSamplerCreateFlagBits" name="VK_SAMPLER_CREATE_SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT"/>
<type name="VkPhysicalDeviceFragmentDensityMapFeaturesEXT"/>
<type name="VkPhysicalDeviceFragmentDensityMapPropertiesEXT"/>
<type name="VkRenderPassFragmentDensityMapCreateInfoEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_220" number="220" author="EXT" contact="Dzmitry Malyshau @kvark" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_220_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_220"" name="VK_EXT_EXTENSION_220_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_221" number="221" author="KHR" contact="Tobias Hector @tobski" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_221_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_221"" name="VK_KHR_EXTENSION_221_EXTENSION_NAME"/>
<enum bitpos="0" extends="VkRenderPassCreateFlagBits" name="VK_RENDER_PASS_CREATE_RESERVED_0_BIT_KHR"/>
</require>
</extension>
<extension name="VK_EXT_scalar_block_layout" number="222" requires="VK_KHR_get_physical_device_properties2" type="device" author="EXT" contact="Tobias Hector @tobski" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION"/>
<enum value=""VK_EXT_scalar_block_layout"" name="VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME"/>
<type name="VkPhysicalDeviceScalarBlockLayoutFeaturesEXT"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES"/>
</require>
</extension>
<extension name="VK_EXT_extension_223" number="223" author="EXT" contact="Tobias Hector @tobski" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_223_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_223"" name="VK_EXT_EXTENSION_223_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_GOOGLE_hlsl_functionality1" number="224" type="device" author="GOOGLE" contact="Hai Nguyen @chaoticbob" supported="vulkan">
<require>
<enum value="1" name="VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_hlsl_functionality1"" name="VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_GOOGLE_decorate_string" number="225" type="device" author="GOOGLE" contact="Hai Nguyen @chaoticbob" supported="vulkan">
<require>
<enum value="1" name="VK_GOOGLE_DECORATE_STRING_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_decorate_string"" name="VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_subgroup_size_control" number="226" type="device" requiresCore="1.1" author="EXT" contact="Neil Henning @sheredom" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION"/>
<enum value=""VK_EXT_subgroup_size_control"" name="VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME"/>
<type name="VkPhysicalDeviceSubgroupSizeControlFeaturesEXT"/>
<type name="VkPhysicalDeviceSubgroupSizeControlPropertiesEXT"/>
<type name="VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT"/>
<enum bitpos="0" extends="VkPipelineShaderStageCreateFlagBits" name="VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT"/>
<enum bitpos="1" extends="VkPipelineShaderStageCreateFlagBits" name="VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT_EXT"/>
</require>
</extension>
<extension name="VK_KHR_fragment_shading_rate" number="227" type="device" requires="VK_KHR_create_renderpass2,VK_KHR_get_physical_device_properties2" author="KHR" contact="Tobias Hector @tobski" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION"/>
<enum value=""VK_KHR_fragment_shading_rate"" name="VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME"/>
<type name="VkFragmentShadingRateCombinerOpKHR"/>
<type name="VkFragmentShadingRateAttachmentInfoKHR"/>
<type name="VkPipelineFragmentShadingRateStateCreateInfoKHR"/>
<type name="VkPhysicalDeviceFragmentShadingRateFeaturesKHR"/>
<type name="VkPhysicalDeviceFragmentShadingRatePropertiesKHR"/>
<type name="VkPhysicalDeviceFragmentShadingRateKHR"/>
<command name="vkGetPhysicalDeviceFragmentShadingRatesKHR"/>
<command name="vkCmdSetFragmentShadingRateKHR"/>
<enum extends="VkImageLayout" name="VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR" alias="VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR"/>
<enum extends="VkAccessFlagBits" name="VK_ACCESS_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR" alias="VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV"/>
<enum extends="VkImageUsageFlagBits" name="VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR" alias="VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV"/>
<enum extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR" alias="VK_PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV"/>
<enum bitpos="30" extends="VkFormatFeatureFlagBits" name="VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR"/>
</require>
</extension>
<extension name="VK_AMD_shader_core_properties2" number="228" type="device" author="AMD" contact="Matthaeus G. Chajdas @anteru" supported="vulkan" requires="VK_AMD_shader_core_properties">
<require>
<enum value="1" name="VK_AMD_SHADER_CORE_PROPERTIES_2_SPEC_VERSION"/>
<enum value=""VK_AMD_shader_core_properties2"" name="VK_AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD"/>
<type name="VkPhysicalDeviceShaderCoreProperties2AMD"/>
<type name="VkShaderCorePropertiesFlagBitsAMD"/>
<type name="VkShaderCorePropertiesFlagsAMD"/>
</require>
</extension>
<extension name="VK_AMD_extension_229" number="229" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_229_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_229"" name="VK_AMD_EXTENSION_229_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_device_coherent_memory" number="230" type="device" author="AMD" contact="Tobias Hector @tobski" supported="vulkan">
<require>
<enum value="1" name="VK_AMD_DEVICE_COHERENT_MEMORY_SPEC_VERSION"/>
<enum value=""VK_AMD_device_coherent_memory"" name="VK_AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME"/>
<enum bitpos="6" extends="VkMemoryPropertyFlagBits" name="VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD"/>
<enum bitpos="7" extends="VkMemoryPropertyFlagBits" name="VK_MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD"/>
<type name="VkPhysicalDeviceCoherentMemoryFeaturesAMD"/>
</require>
</extension>
<extension name="VK_AMD_extension_231" number="231" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_231_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_231"" name="VK_AMD_EXTENSION_231_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_232" number="232" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_232_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_232"" name="VK_AMD_EXTENSION_232_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_233" number="233" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_233_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_233"" name="VK_AMD_EXTENSION_233_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_234" number="234" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_234_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_234"" name="VK_AMD_EXTENSION_234_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_shader_image_atomic_int64" number="235" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Tobias Hector @tobski" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_SHADER_IMAGE_ATOMIC_INT64_SPEC_VERSION"/>
<enum value=""VK_EXT_shader_image_atomic_int64"" name="VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT"/>
<type name="VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT"/>
</require>
</extension>
<extension name="VK_AMD_extension_236" number="236" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_236_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_236"" name="VK_AMD_EXTENSION_236_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_spirv_1_4" number="237" type="device" requiresCore="1.1" requires="VK_KHR_shader_float_controls" author="KHR" contact="Jesse Hall @critsec" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_SPIRV_1_4_SPEC_VERSION"/>
<enum value=""VK_KHR_spirv_1_4"" name="VK_KHR_SPIRV_1_4_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_memory_budget" number="238" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_MEMORY_BUDGET_SPEC_VERSION"/>
<enum value=""VK_EXT_memory_budget"" name="VK_EXT_MEMORY_BUDGET_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT"/>
<type name="VkPhysicalDeviceMemoryBudgetPropertiesEXT"/>
</require>
</extension>
<extension name="VK_EXT_memory_priority" number="239" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_MEMORY_PRIORITY_SPEC_VERSION"/>
<enum value=""VK_EXT_memory_priority"" name="VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT"/>
<type name="VkPhysicalDeviceMemoryPriorityFeaturesEXT"/>
<type name="VkMemoryPriorityAllocateInfoEXT"/>
</require>
</extension>
<extension name="VK_KHR_surface_protected_capabilities" number="240" type="instance" requiresCore="1.1" requires="VK_KHR_get_surface_capabilities2" author="KHR" contact="Sandeep Shinde @sashinde" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION"/>
<enum value=""VK_KHR_surface_protected_capabilities"" name="VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR"/>
<type name="VkSurfaceProtectedCapabilitiesKHR"/>
</require>
</extension>
<extension name="VK_NV_dedicated_allocation_image_aliasing" number="241" type="device" requires="VK_KHR_dedicated_allocation" author="NVIDIA" contact="Nuno Subtil @nsubtil" supported="vulkan">
<require>
<enum value="1" name="VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_SPEC_VERSION"/>
<enum value=""VK_NV_dedicated_allocation_image_aliasing"" name="VK_NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV"/>
<type name="VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV"/>
</require>
</extension>
<extension name="VK_KHR_separate_depth_stencil_layouts" number="242" type="device" requires="VK_KHR_get_physical_device_properties2,VK_KHR_create_renderpass2" author="KHR" contact="Piers Daniell @pdaniell-nv" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_SPEC_VERSION"/>
<enum value=""VK_KHR_separate_depth_stencil_layouts"" name="VK_KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR" alias="VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR" alias="VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT"/>
<enum extends="VkImageLayout" name="VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR" alias="VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL"/>
<enum extends="VkImageLayout" name="VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR" alias="VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL"/>
<enum extends="VkImageLayout" name="VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR" alias="VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL"/>
<enum extends="VkImageLayout" name="VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL_KHR" alias="VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL"/>
<type name="VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR"/>
<type name="VkAttachmentReferenceStencilLayoutKHR"/>
<type name="VkAttachmentDescriptionStencilLayoutKHR"/>
</require>
</extension>
<extension name="VK_INTEL_extension_243" number="243" author="INTEL" contact="Slawek Grajewski @sgrajewski" supported="disabled">
<require>
<enum value="0" name="VK_INTEL_EXTENSION_243_SPEC_VERSION"/>
<enum value=""VK_INTEL_extension_243"" name="VK_INTEL_EXTENSION_243_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_MESA_extension_244" number="244" author="MESA" contact="Andres Rodriguez @lostgoat" supported="disabled">
<require>
<enum value="0" name="VK_MESA_EXTENSION_244_SPEC_VERSION"/>
<enum value=""VK_MESA_extension_244"" name="VK_MESA_EXTENSION_244_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_buffer_device_address" number="245" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Jeff Bolz @jeffbolznv" deprecatedby="VK_KHR_buffer_device_address" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_BUFFER_DEVICE_ADDRESS_SPEC_VERSION"/>
<enum value=""VK_EXT_buffer_device_address"" name="VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_EXT" alias="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT"/>
<enum extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT" alias="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT"/>
<enum extends="VkBufferCreateFlagBits" name="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT" alias="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT"/>
<enum extends="VkResult" name="VK_ERROR_INVALID_DEVICE_ADDRESS_EXT" alias="VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS"/>
<type name="VkPhysicalDeviceBufferAddressFeaturesEXT"/>
<type name="VkPhysicalDeviceBufferDeviceAddressFeaturesEXT"/>
<type name="VkBufferDeviceAddressInfoEXT"/>
<type name="VkBufferDeviceAddressCreateInfoEXT"/>
<command name="vkGetBufferDeviceAddressEXT"/>
</require>
</extension>
<extension name="VK_EXT_tooling_info" number="246" type="device" author="EXT" contact="Tobias Hector @tobski" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_TOOLING_INFO_SPEC_VERSION"/>
<enum value=""VK_EXT_tooling_info"" name="VK_EXT_TOOLING_INFO_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT"/>
<type name="VkToolPurposeFlagBitsEXT"/>
<type name="VkToolPurposeFlagsEXT"/>
<type name="VkPhysicalDeviceToolPropertiesEXT"/>
<command name="vkGetPhysicalDeviceToolPropertiesEXT"/>
</require>
<require extension="VK_EXT_debug_report">
<enum bitpos="5" extends="VkToolPurposeFlagBitsEXT" name="VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT"/>
</require>
<require extension="VK_EXT_debug_marker">
<enum bitpos="6" extends="VkToolPurposeFlagBitsEXT" name="VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT"/>
</require>
<require extension="VK_EXT_debug_utils">
<enum bitpos="5" extends="VkToolPurposeFlagBitsEXT" name="VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT"/>
<enum bitpos="6" extends="VkToolPurposeFlagBitsEXT" name="VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT"/>
</require>
</extension>
<extension name="VK_EXT_separate_stencil_usage" number="247" type="device" author="EXT" contact="Daniel Rakos @drakos-amd" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_EXT_SEPARATE_STENCIL_USAGE_SPEC_VERSION"/>
<enum value=""VK_EXT_separate_stencil_usage"" name="VK_EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT" alias="VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO"/>
<type name="VkImageStencilUsageCreateInfoEXT"/>
</require>
</extension>
<extension name="VK_EXT_validation_features" number="248" type="instance" author="LUNARG" contact="Karl Schultz @karl-lunarg" specialuse="debugging" supported="vulkan">
<require>
<enum value="4" name="VK_EXT_VALIDATION_FEATURES_SPEC_VERSION"/>
<enum value=""VK_EXT_validation_features"" name="VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT"/>
<type name="VkValidationFeaturesEXT"/>
<type name="VkValidationFeatureEnableEXT"/>
<type name="VkValidationFeatureDisableEXT"/>
</require>
</extension>
<extension name="VK_KHR_extension_249" number="249" author="KHR" contact="Keith Packard @keithp" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_249_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_249"" name="VK_KHR_EXTENSION_249_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_cooperative_matrix" number="250" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION"/>
<enum value=""VK_NV_cooperative_matrix"" name="VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_NV"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV"/>
<type name="VkCooperativeMatrixPropertiesNV"/>
<type name="VkScopeNV"/>
<type name="VkComponentTypeNV"/>
<type name="VkPhysicalDeviceCooperativeMatrixFeaturesNV"/>
<type name="VkPhysicalDeviceCooperativeMatrixPropertiesNV"/>
<command name="vkGetPhysicalDeviceCooperativeMatrixPropertiesNV"/>
</require>
</extension>
<extension name="VK_NV_coverage_reduction_mode" number="251" requires="VK_NV_framebuffer_mixed_samples" type="device" author="NV" contact="Kedarnath Thangudu @kthangudu" supported="vulkan">
<require>
<enum value="1" name="VK_NV_COVERAGE_REDUCTION_MODE_SPEC_VERSION"/>
<enum value=""VK_NV_coverage_reduction_mode"" name="VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV"/>
<type name="VkPhysicalDeviceCoverageReductionModeFeaturesNV"/>
<type name="VkPipelineCoverageReductionStateCreateInfoNV"/>
<type name="VkPipelineCoverageReductionStateCreateFlagsNV"/>
<type name="VkCoverageReductionModeNV"/>
<type name="VkFramebufferMixedSamplesCombinationNV"/>
<command name="vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV"/>
</require>
</extension>
<extension name="VK_EXT_fragment_shader_interlock" number="252" author="EXT" type="device" requires="VK_KHR_get_physical_device_properties2" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_FRAGMENT_SHADER_INTERLOCK_SPEC_VERSION"/>
<enum value=""VK_EXT_fragment_shader_interlock"" name="VK_EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT"/>
<type name="VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT"/>
</require>
</extension>
<extension name="VK_EXT_ycbcr_image_arrays" number="253" type="device" requires="VK_KHR_sampler_ycbcr_conversion" author="EXT" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_YCBCR_IMAGE_ARRAYS_SPEC_VERSION"/>
<enum value=""VK_EXT_ycbcr_image_arrays"" name="VK_EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT"/>
<type name="VkPhysicalDeviceYcbcrImageArraysFeaturesEXT"/>
</require>
</extension>
<extension name="VK_KHR_uniform_buffer_standard_layout" number="254" requires="VK_KHR_get_physical_device_properties2" type="device" author="KHR" contact="Graeme Leese @gnl21" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_SPEC_VERSION"/>
<enum value=""VK_KHR_uniform_buffer_standard_layout"" name="VK_KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME"/>
<type name="VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES"/>
</require>
</extension>
<extension name="VK_EXT_extension_255" number="255" author="EXT" contact="Jesse Hall @jessehall" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_255_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_255"" name="VK_EXT_EXTENSION_255_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_full_screen_exclusive" number="256" type="device" author="EXT" requires="VK_KHR_get_physical_device_properties2,VK_KHR_surface,VK_KHR_get_surface_capabilities2,VK_KHR_swapchain" platform="win32" contact="James Jones @cubanismo" supported="vulkan">
<require>
<enum value="4" name="VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION"/>
<enum value=""VK_EXT_full_screen_exclusive"" name="VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT"/>
<enum offset="0" extends="VkResult" dir="-" name="VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"/>
<type name="VkFullScreenExclusiveEXT"/>
<type name="VkSurfaceFullScreenExclusiveInfoEXT"/>
<type name="VkSurfaceCapabilitiesFullScreenExclusiveEXT"/>
<command name="vkGetPhysicalDeviceSurfacePresentModes2EXT"/>
<command name="vkAcquireFullScreenExclusiveModeEXT"/>
<command name="vkReleaseFullScreenExclusiveModeEXT"/>
</require>
<require extension="VK_KHR_win32_surface">
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT"/>
<type name="VkSurfaceFullScreenExclusiveWin32InfoEXT"/>
</require>
<require extension="VK_KHR_device_group">
<command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
</require>
<require feature="VK_VERSION_1_1">
<command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
</require>
</extension>
<extension name="VK_EXT_headless_surface" number="257" type="instance" requires="VK_KHR_surface" author="EXT" contact="Lisa Wu @chengtianww" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_HEADLESS_SURFACE_SPEC_VERSION"/>
<enum value=""VK_EXT_headless_surface"" name="VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT"/>
<type name="VkHeadlessSurfaceCreateFlagsEXT"/>
<type name="VkHeadlessSurfaceCreateInfoEXT"/>
<command name="vkCreateHeadlessSurfaceEXT"/>
</require>
</extension>
<extension name="VK_KHR_buffer_device_address" number="258" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Jeff Bolz @jeffbolznv" supported="vulkan" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_KHR_BUFFER_DEVICE_ADDRESS_SPEC_VERSION"/>
<enum value=""VK_KHR_buffer_device_address"" name="VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR" alias="VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR" alias="VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR" alias="VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO"/>
<enum extends="VkBufferUsageFlagBits" name="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR" alias="VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT"/>
<enum extends="VkBufferCreateFlagBits" name="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR" alias="VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT"/>
<enum extends="VkMemoryAllocateFlagBits" name="VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR" alias="VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT"/>
<enum extends="VkMemoryAllocateFlagBits" name="VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR" alias="VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT"/>
<enum extends="VkResult" name="VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR" alias="VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS"/>
<type name="VkPhysicalDeviceBufferDeviceAddressFeaturesKHR"/>
<type name="VkBufferDeviceAddressInfoKHR"/>
<type name="VkBufferOpaqueCaptureAddressCreateInfoKHR"/>
<type name="VkMemoryOpaqueCaptureAddressAllocateInfoKHR"/>
<type name="VkDeviceMemoryOpaqueCaptureAddressInfoKHR"/>
<command name="vkGetBufferDeviceAddressKHR"/>
<command name="vkGetBufferOpaqueCaptureAddressKHR"/>
<command name="vkGetDeviceMemoryOpaqueCaptureAddressKHR"/>
</require>
</extension>
<extension name="VK_EXT_extension_259" number="259" author="EXT" contact="Jeff Leger @jackohound" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_259_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_259"" name="VK_EXT_EXTENSION_259_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_line_rasterization" number="260" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Jeff Bolz @jeffbolznv" specialuse="cadsupport" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_LINE_RASTERIZATION_SPEC_VERSION"/>
<enum value=""VK_EXT_line_rasterization"" name="VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_LINE_STIPPLE_EXT"/>
<type name="VkPhysicalDeviceLineRasterizationFeaturesEXT"/>
<type name="VkPhysicalDeviceLineRasterizationPropertiesEXT"/>
<type name="VkPipelineRasterizationLineStateCreateInfoEXT"/>
<type name="VkLineRasterizationModeEXT"/>
<command name="vkCmdSetLineStippleEXT"/>
</require>
</extension>
<extension name="VK_EXT_shader_atomic_float" number="261" type="device" author="NV" requires="VK_KHR_get_physical_device_properties2" contact="Vikram Kushwaha @vkushwaha-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_SHADER_ATOMIC_FLOAT_SPEC_VERSION"/>
<enum value=""VK_EXT_shader_atomic_float"" name="VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT"/>
<type name="VkPhysicalDeviceShaderAtomicFloatFeaturesEXT"/>
</require>
</extension>
<extension name="VK_EXT_host_query_reset" number="262" author="EXT" contact="Bas Nieuwenhuizen @BNieuwenhuizen" supported="vulkan" type="device" requires="VK_KHR_get_physical_device_properties2" promotedto="VK_VERSION_1_2">
<require>
<enum value="1" name="VK_EXT_HOST_QUERY_RESET_SPEC_VERSION"/>
<enum value=""VK_EXT_host_query_reset"" name="VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME"/>
<enum extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT" alias="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES"/>
<type name="VkPhysicalDeviceHostQueryResetFeaturesEXT"/>
<command name="vkResetQueryPoolEXT"/>
</require>
</extension>
<extension name="VK_GGP_extension_263" number="263" author="GGP" contact="Jean-Francois Roy @jfroy" supported="disabled">
<require>
<enum value="0" name="VK_GOOGLE_EXTENSION_263_SPEC_VERSION"/>
<enum value=""VK_GGP_extension_263"" name="VK_GOOGLE_EXTENSION_263_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_BRCM_extension_264" number="264" author="BRCM" contact="Graeme Leese @gnl21" supported="disabled">
<require>
<enum value="0" name="VK_BRCM_EXTENSION_264_SPEC_VERSION"/>
<enum value=""VK_BRCM_extension_264"" name="VK_BRCM_EXTENSION_264_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_BRCM_extension_265" number="265" author="BRCM" contact="Graeme Leese @gnl21" supported="disabled">
<require>
<enum value="0" name="VK_BRCM_EXTENSION_265_SPEC_VERSION"/>
<enum value=""VK_BRCM_extension_265"" name="VK_BRCM_EXTENSION_265_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_index_type_uint8" number="266" type="device" author="EXT" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION"/>
<enum value=""VK_EXT_index_type_uint8"" name="VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT"/>
<enum offset="0" extends="VkIndexType" name="VK_INDEX_TYPE_UINT8_EXT"/>
<type name="VkPhysicalDeviceIndexTypeUint8FeaturesEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_267" number="267" type="device" author="EXT" contact="Piers Daniell @pdaniell-nv" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_267_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_267"" name="VK_EXT_extension_267"/>
</require>
</extension>
<extension name="VK_EXT_extended_dynamic_state" number="268" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_EXTENDED_DYNAMIC_STATE_SPEC_VERSION"/>
<enum value=""VK_EXT_extended_dynamic_state"" name="VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_CULL_MODE_EXT"/>
<enum offset="1" extends="VkDynamicState" name="VK_DYNAMIC_STATE_FRONT_FACE_EXT"/>
<enum offset="2" extends="VkDynamicState" name="VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT"/>
<enum offset="3" extends="VkDynamicState" name="VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXT"/>
<enum offset="4" extends="VkDynamicState" name="VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXT"/>
<enum offset="5" extends="VkDynamicState" name="VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT"/>
<enum offset="6" extends="VkDynamicState" name="VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE_EXT"/>
<enum offset="7" extends="VkDynamicState" name="VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE_EXT"/>
<enum offset="8" extends="VkDynamicState" name="VK_DYNAMIC_STATE_DEPTH_COMPARE_OP_EXT"/>
<enum offset="9" extends="VkDynamicState" name="VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE_EXT"/>
<enum offset="10" extends="VkDynamicState" name="VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT"/>
<enum offset="11" extends="VkDynamicState" name="VK_DYNAMIC_STATE_STENCIL_OP_EXT"/>
<type name="VkPhysicalDeviceExtendedDynamicStateFeaturesEXT"/>
<command name="vkCmdSetCullModeEXT"/>
<command name="vkCmdSetFrontFaceEXT"/>
<command name="vkCmdSetPrimitiveTopologyEXT"/>
<command name="vkCmdSetViewportWithCountEXT"/>
<command name="vkCmdSetScissorWithCountEXT"/>
<command name="vkCmdBindVertexBuffers2EXT"/>
<command name="vkCmdSetDepthTestEnableEXT"/>
<command name="vkCmdSetDepthWriteEnableEXT"/>
<command name="vkCmdSetDepthCompareOpEXT"/>
<command name="vkCmdSetDepthBoundsTestEnableEXT"/>
<command name="vkCmdSetStencilTestEnableEXT"/>
<command name="vkCmdSetStencilOpEXT"/>
</require>
</extension>
<extension name="VK_KHR_deferred_host_operations" number="269" type="device" author="KHR" contact="Josh Barczak @jbarczak" supported="vulkan">
<require>
<enum value="4" name="VK_KHR_DEFERRED_HOST_OPERATIONS_SPEC_VERSION"/>
<enum value=""VK_KHR_deferred_host_operations"" name="VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR"/>
<type name="VkDeferredOperationKHR"/>
<command name="vkCreateDeferredOperationKHR"/>
<command name="vkDestroyDeferredOperationKHR"/>
<command name="vkGetDeferredOperationMaxConcurrencyKHR"/>
<command name="vkGetDeferredOperationResultKHR"/>
<command name="vkDeferredOperationJoinKHR" />
<enum extends="VkResult" offset="0" name="VK_THREAD_IDLE_KHR" />
<enum extends="VkResult" offset="1" name="VK_THREAD_DONE_KHR" />
<enum extends="VkResult" offset="2" name="VK_OPERATION_DEFERRED_KHR" />
<enum extends="VkResult" offset="3" name="VK_OPERATION_NOT_DEFERRED_KHR" />
</require>
</extension>
<extension name="VK_KHR_pipeline_executable_properties" number="270" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Jason Ekstrand @jekstrand" specialuse="devtools" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_SPEC_VERSION"/>
<enum value=""VK_KHR_pipeline_executable_properties"" name="VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR"/>
<enum bitpos="6" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR"/>
<enum bitpos="7" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR"/>
<type name="VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR"/>
<type name="VkPipelineInfoKHR"/>
<type name="VkPipelineExecutablePropertiesKHR"/>
<type name="VkPipelineExecutableInfoKHR"/>
<type name="VkPipelineExecutableStatisticFormatKHR"/>
<type name="VkPipelineExecutableStatisticValueKHR"/>
<type name="VkPipelineExecutableStatisticKHR"/>
<type name="VkPipelineExecutableInternalRepresentationKHR"/>
<command name="vkGetPipelineExecutablePropertiesKHR"/>
<command name="vkGetPipelineExecutableStatisticsKHR"/>
<command name="vkGetPipelineExecutableInternalRepresentationsKHR"/>
</require>
</extension>
<extension name="VK_INTEL_extension_271" number="271" type="device" author="INTEL" contact="Jason Ekstrand @jekstrand" supported="disabled">
<require>
<enum value="0" name="VK_INTEL_EXTENSION_271_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_271"" name="VK_INTEL_extension_271"/>
</require>
</extension>
<extension name="VK_INTEL_extension_272" number="272" type="device" author="INTEL" contact="Jason Ekstrand @jekstrand" supported="disabled">
<require>
<enum value="0" name="VK_INTEL_EXTENSION_272_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_272"" name="VK_INTEL_extension_272"/>
</require>
</extension>
<extension name="VK_INTEL_extension_273" number="273" type="device" author="INTEL" contact="Jason Ekstrand @jekstrand" supported="disabled">
<require>
<enum value="0" name="VK_INTEL_EXTENSION_273_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_273"" name="VK_INTEL_extension_273"/>
</require>
</extension>
<extension name="VK_INTEL_extension_274" number="274" type="device" author="INTEL" contact="Jason Ekstrand @jekstrand" supported="disabled">
<require>
<enum value="0" name="VK_INTEL_EXTENSION_274_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_274"" name="VK_INTEL_extension_274"/>
</require>
</extension>
<extension name="VK_KHR_extension_275" number="275" type="instance" author="KHR" contact="Lionel Landwerlin @llandwerlin" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_275_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_275"" name="VK_KHR_extension_275"/>
</require>
</extension>
<extension name="VK_KHR_extension_276" number="276" type="device" author="KHR" contact="James Jones @cubanismo" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_276_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_276"" name="VK_KHR_extension_276"/>
</require>
</extension>
<extension name="VK_EXT_shader_demote_to_helper_invocation" number="277" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_SPEC_VERSION"/>
<enum value=""VK_EXT_shader_demote_to_helper_invocation"" name="VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT"/>
<type name="VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT"/>
</require>
</extension>
<extension name="VK_NV_device_generated_commands" number="278" type="device" requiresCore="1.1" author="NV" contact="Christoph Kubisch @pixeljetstream" supported="vulkan">
<require>
<enum value="3" name="VK_NV_DEVICE_GENERATED_COMMANDS_SPEC_VERSION"/>
<enum value=""VK_NV_device_generated_commands"" name="VK_NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_TOKEN_NV"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV"/>
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV"/>
<enum bitpos="18" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV"/>
<enum bitpos="17" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV"/>
<enum bitpos="17" extends="VkAccessFlagBits" name="VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV"/>
<enum bitpos="18" extends="VkAccessFlagBits" name="VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV"/>
<type name="VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV"/>
<type name="VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV"/>
<type name="VkGraphicsShaderGroupCreateInfoNV"/>
<type name="VkGraphicsPipelineShaderGroupsCreateInfoNV"/>
<type name="VkBindShaderGroupIndirectCommandNV"/>
<type name="VkBindIndexBufferIndirectCommandNV"/>
<type name="VkBindVertexBufferIndirectCommandNV"/>
<type name="VkSetStateFlagsIndirectCommandNV"/>
<type name="VkIndirectStateFlagBitsNV"/>
<type name="VkIndirectStateFlagsNV"/>
<type name="VkIndirectCommandsLayoutNV"/>
<type name="VkIndirectCommandsTokenTypeNV"/>
<type name="VkIndirectCommandsLayoutUsageFlagBitsNV"/>
<type name="VkIndirectCommandsLayoutUsageFlagsNV"/>
<type name="VkIndirectCommandsStreamNV"/>
<type name="VkIndirectCommandsLayoutTokenNV"/>
<type name="VkIndirectCommandsLayoutCreateInfoNV"/>
<type name="VkGeneratedCommandsInfoNV"/>
<type name="VkGeneratedCommandsMemoryRequirementsInfoNV"/>
<command name="vkGetGeneratedCommandsMemoryRequirementsNV"/>
<command name="vkCmdPreprocessGeneratedCommandsNV"/>
<command name="vkCmdExecuteGeneratedCommandsNV"/>
<command name="vkCmdBindPipelineShaderGroupNV"/>
<command name="vkCreateIndirectCommandsLayoutNV"/>
<command name="vkDestroyIndirectCommandsLayoutNV"/>
</require>
</extension>
<extension name="VK_NV_inherited_viewport_scissor" number="279" type="device" author="NV" contact="David Zhao Akeley @akeley98" supported="vulkan">
<require>
<enum value="1" name="VK_NV_INHERITED_VIEWPORT_SCISSOR_SPEC_VERSION"/>
<enum value=""VK_NV_inherited_viewport_scissor"" name="VK_NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV"/>
<type name="VkPhysicalDeviceInheritedViewportScissorFeaturesNV"/>
<type name="VkCommandBufferInheritanceViewportScissorInfoNV"/>
</require>
</extension>
<extension name="VK_KHR_extension_280" number="280" type="device" author="KHR" contact="Kevin Petit @kevinpetit" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_280_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_280"" name="VK_KHR_extension_280"/>
</require>
</extension>
<extension name="VK_ARM_extension_281" number="281" type="device" author="ARM" contact="Kevin Petit @kevinpetit" supported="disabled">
<require>
<enum value="0" name="VK_ARM_EXTENSION_281_SPEC_VERSION"/>
<enum value=""VK_ARM_extension_281"" name="VK_ARM_extension_281"/>
</require>
</extension>
<extension name="VK_EXT_texel_buffer_alignment" number="282" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Jeff Bolz @jeffbolznv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION"/>
<enum value=""VK_EXT_texel_buffer_alignment"" name="VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT"/>
<type name="VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT"/>
<type name="VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT"/>
</require>
</extension>
<extension name="VK_QCOM_render_pass_transform" number="283" type="device" requires="VK_KHR_swapchain,VK_KHR_surface" author="QCOM" contact="Jeff Leger @jackohound" supported="vulkan">
<require>
<enum value="2" name="VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION"/>
<enum value=""VK_QCOM_render_pass_transform"" name="VK_QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM"/>
<enum bitpos="1" extends="VkRenderPassCreateFlagBits" name="VK_RENDER_PASS_CREATE_TRANSFORM_BIT_QCOM"/>
<type name="VkRenderPassTransformBeginInfoQCOM"/>
<type name="VkCommandBufferInheritanceRenderPassTransformInfoQCOM"/>
</require>
</extension>
<extension name="VK_EXT_extension_284" number="284" type="device" author="EXT" contact="Samuel Pitoiset @hakzsam" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_284_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_284"" name="VK_EXT_extension_284"/>
</require>
</extension>
<extension name="VK_EXT_device_memory_report" number="285" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Yiwei Zhang @zhangyiwei" specialuse="devtools" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_DEVICE_MEMORY_REPORT_SPEC_VERSION"/>
<enum value=""VK_EXT_device_memory_report"" name="VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT"/>
<type name="VkPhysicalDeviceDeviceMemoryReportFeaturesEXT"/>
<type name="VkDeviceDeviceMemoryReportCreateInfoEXT"/>
<type name="VkDeviceMemoryReportCallbackDataEXT"/>
<type name="VkDeviceMemoryReportFlagsEXT"/>
<type name="VkDeviceMemoryReportEventTypeEXT"/>
<type name="PFN_vkDeviceMemoryReportCallbackEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_286" number="286" type="instance" author="EXT" contact="Drew DeVault [email protected]" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_286_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_286"" name="VK_EXT_extension_286"/>
</require>
</extension>
<extension name="VK_EXT_robustness2" number="287" type="device" author="EXT" contact="Liam Middlebrook @liam-middlebrook" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_ROBUSTNESS_2_SPEC_VERSION"/>
<enum value=""VK_EXT_robustness2"" name="VK_EXT_ROBUSTNESS_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT"/>
<type name="VkPhysicalDeviceRobustness2FeaturesEXT"/>
<type name="VkPhysicalDeviceRobustness2PropertiesEXT"/>
</require>
</extension>
<extension name="VK_EXT_custom_border_color" number="288" type="device" author="EXT" contact="Liam Middlebrook @liam-middlebrook" supported="vulkan">
<require>
<enum value="12" name="VK_EXT_CUSTOM_BORDER_COLOR_SPEC_VERSION"/>
<enum value=""VK_EXT_custom_border_color"" name="VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT"/>
<enum offset="3" extends="VkBorderColor" name="VK_BORDER_COLOR_FLOAT_CUSTOM_EXT"/>
<enum offset="4" extends="VkBorderColor" name="VK_BORDER_COLOR_INT_CUSTOM_EXT"/>
<type name="VkSamplerCustomBorderColorCreateInfoEXT"/>
<type name="VkPhysicalDeviceCustomBorderColorPropertiesEXT"/>
<type name="VkPhysicalDeviceCustomBorderColorFeaturesEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_289" number="289" author="EXT" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
<require>
<comment>
These enums are present only to inform downstream
consumers like KTX2. There is no actual Vulkan extension
corresponding to the enums.
</comment>
<enum value="0" name="VK_EXT_EXTENSION_289_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_289"" name="VK_EXT_EXTENSION_289_EXTENSION_NAME"/>
<enum extends="VkFormat" extnumber="289" offset="0" name="VK_FORMAT_ASTC_3x3x3_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="1" name="VK_FORMAT_ASTC_3x3x3_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="2" name="VK_FORMAT_ASTC_3x3x3_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="3" name="VK_FORMAT_ASTC_4x3x3_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="4" name="VK_FORMAT_ASTC_4x3x3_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="5" name="VK_FORMAT_ASTC_4x3x3_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="6" name="VK_FORMAT_ASTC_4x4x3_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="7" name="VK_FORMAT_ASTC_4x4x3_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="8" name="VK_FORMAT_ASTC_4x4x3_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="9" name="VK_FORMAT_ASTC_4x4x4_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="10" name="VK_FORMAT_ASTC_4x4x4_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="11" name="VK_FORMAT_ASTC_4x4x4_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="12" name="VK_FORMAT_ASTC_5x4x4_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="13" name="VK_FORMAT_ASTC_5x4x4_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="14" name="VK_FORMAT_ASTC_5x4x4_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="15" name="VK_FORMAT_ASTC_5x5x4_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="16" name="VK_FORMAT_ASTC_5x5x4_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="17" name="VK_FORMAT_ASTC_5x5x4_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="18" name="VK_FORMAT_ASTC_5x5x5_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="19" name="VK_FORMAT_ASTC_5x5x5_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="20" name="VK_FORMAT_ASTC_5x5x5_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="21" name="VK_FORMAT_ASTC_6x5x5_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="22" name="VK_FORMAT_ASTC_6x5x5_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="23" name="VK_FORMAT_ASTC_6x5x5_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="24" name="VK_FORMAT_ASTC_6x6x5_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="25" name="VK_FORMAT_ASTC_6x6x5_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="26" name="VK_FORMAT_ASTC_6x6x5_SFLOAT_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="27" name="VK_FORMAT_ASTC_6x6x6_UNORM_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="28" name="VK_FORMAT_ASTC_6x6x6_SRGB_BLOCK_EXT"/>
<enum extends="VkFormat" extnumber="289" offset="29" name="VK_FORMAT_ASTC_6x6x6_SFLOAT_BLOCK_EXT"/>
</require>
</extension>
<extension name="VK_GOOGLE_user_type" number="290" type="device" author="GOOGLE" contact="Kaye Mason @chaleur" supported="vulkan">
<require>
<enum value="1" name="VK_GOOGLE_USER_TYPE_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_user_type"" name="VK_GOOGLE_USER_TYPE_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_pipeline_library" number="291" type="device" author="KHR" contact="Christoph Kubisch @pixeljetstream" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION"/>
<enum value=""VK_KHR_pipeline_library"" name="VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME"/>
<enum bitpos="11" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_LIBRARY_BIT_KHR"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR"/>
<type name="VkPipelineLibraryCreateInfoKHR"/>
</require>
</extension>
<extension name="VK_NV_extension_292" number="292" author="NV" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_292_SPEC_VERSION"/>
<enum value=""VK_NV_extension_292"" name="VK_NV_EXTENSION_292_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_extension_293" number="293" author="NV" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_293_SPEC_VERSION"/>
<enum value=""VK_NV_extension_293"" name="VK_NV_EXTENSION_293_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_shader_non_semantic_info" number="294" type="device" author="KHR" contact="Baldur Karlsson @baldurk" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_SHADER_NON_SEMANTIC_INFO_SPEC_VERSION"/>
<enum value=""VK_KHR_shader_non_semantic_info"" name="VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_295" number="295" author="KHR" contact="Keith Packard @keithp" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_295_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_295"" name="VK_KHR_EXTENSION_295_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_private_data" number="296" type="device" author="NV" contact="Matthew Rusch @mattruschnv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_PRIVATE_DATA_SPEC_VERSION"/>
<enum value=""VK_EXT_private_data"" name="VK_EXT_PRIVATE_DATA_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PRIVATE_DATA_SLOT_CREATE_INFO_EXT"/>
<enum offset="0" extends="VkObjectType" name="VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT"/>
<type name="VkPhysicalDevicePrivateDataFeaturesEXT"/>
<type name="VkDevicePrivateDataCreateInfoEXT"/>
<type name="VkPrivateDataSlotCreateInfoEXT"/>
<type name="VkPrivateDataSlotEXT"/>
<type name="VkPrivateDataSlotCreateFlagsEXT"/>
<type name="VkPrivateDataSlotCreateFlagBitsEXT"/>
<command name="vkCreatePrivateDataSlotEXT"/>
<command name="vkDestroyPrivateDataSlotEXT"/>
<command name="vkSetPrivateDataEXT"/>
<command name="vkGetPrivateDataEXT"/>
</require>
</extension>
<extension name="VK_KHR_extension_297" number="297" author="KHR" contact="Corentin Wallez @Kangz" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_297_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_297"" name="VK_KHR_EXTENSION_297_EXTENSION_NAME"/>
<enum bitpos="3" extends="VkPipelineShaderStageCreateFlagBits" name="VK_PIPELINE_SHADER_STAGE_CREATE_RESERVED_3_BIT_KHR"/>
</require>
</extension>
<extension name="VK_EXT_pipeline_creation_cache_control" number="298" type="device" author="AMD" contact="Gregory Grebe @grgrebe_amd" supported="vulkan">
<require>
<enum value="3" name="VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_SPEC_VERSION"/>
<enum value=""VK_EXT_pipeline_creation_cache_control""
name="VK_EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType"
name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT"/>
<type name="VkPhysicalDevicePipelineCreationCacheControlFeaturesEXT"/>
<enum bitpos="8" extends="VkPipelineCreateFlagBits"
name="VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT"/>
<enum bitpos="9" extends="VkPipelineCreateFlagBits"
name="VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT"/>
<enum extends="VkResult" offset="0" name="VK_PIPELINE_COMPILE_REQUIRED_EXT"/>
<enum extends="VkResult" name="VK_ERROR_PIPELINE_COMPILE_REQUIRED_EXT" alias="VK_PIPELINE_COMPILE_REQUIRED_EXT"/>
<enum bitpos="0" extends="VkPipelineCacheCreateFlagBits"
name="VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT"/>
</require>
</extension>
<extension name="VK_KHR_extension_299" number="299" author="KHR" contact="Mark Bellamy @mark.bellamy_arm" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_299_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_299"" name="VK_KHR_EXTENSION_299_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_300" number="300" author="KHR" contact="Aidan Fabius @afabius" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_300_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_300"" name="VK_KHR_EXTENSION_300_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_device_diagnostics_config" number="301" type="device" requires="VK_KHR_get_physical_device_properties2" author="NV" contact="Kedarnath Thangudu @kthangudu" supported="vulkan">
<require>
<enum value="1" name="VK_NV_DEVICE_DIAGNOSTICS_CONFIG_SPEC_VERSION"/>
<enum value=""VK_NV_device_diagnostics_config"" name="VK_NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV"/>
<type name="VkPhysicalDeviceDiagnosticsConfigFeaturesNV"/>
<type name="VkDeviceDiagnosticsConfigCreateInfoNV"/>
<type name="VkDeviceDiagnosticsConfigFlagsNV"/>
<type name="VkDeviceDiagnosticsConfigFlagBitsNV"/>
</require>
</extension>
<extension name="VK_QCOM_render_pass_store_ops" number="302" type="device" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="vulkan">
<require>
<enum value="2" name="VK_QCOM_render_pass_store_ops_SPEC_VERSION"/>
<enum value=""VK_QCOM_render_pass_store_ops"" name="VK_QCOM_render_pass_store_ops_EXTENSION_NAME"/>
<enum offset="0" extends="VkAttachmentStoreOp" name="VK_ATTACHMENT_STORE_OP_NONE_QCOM"/>
</require>
</extension>
<extension name="VK_QCOM_extension_303" number="303" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_extension_303_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_303"" name="VK_QCOM_extension_303_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_QCOM_extension_304" number="304" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_extension_304_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_304"" name="VK_QCOM_extension_304_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_QCOM_extension_305" number="305" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_extension_305_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_305"" name="VK_QCOM_extension_305_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_QCOM_extension_306" number="306" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_extension_306_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_306"" name="VK_QCOM_extension_306_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_QCOM_extension_307" number="307" author="QCOM" contact="Bill Licea-Kane @wwlk" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_extension_307_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_307"" name="VK_QCOM_extension_307_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_extension_308" number="308" type="device" author="NV" contact="Tristan Lorach @tlorach" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_308_SPEC_VERSION"/>
<enum value=""VK_NV_extension_308"" name="VK_NV_EXTENSION_308_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_309" number="309" author="KHR" contact="Aidan Fabius @afabius" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_309_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_309"" name="VK_KHR_EXTENSION_309_EXTENSION_NAME"/>
<enum bitpos="2" extends="VkMemoryHeapFlagBits" name="VK_MEMORY_HEAP_RESERVED_2_BIT_KHR"/>
</require>
</extension>
<extension name="VK_QCOM_extension_310" number="310" author="QCOM" contact="Jeff Leger @jackohound" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_extension_310_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_310"" name="VK_QCOM_extension_310_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_RESERVED_QCOM"/>
</require>
</extension>
<extension name="VK_NV_extension_311" number="311" author="NV" contact="Charles Hansen @cshansen" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_311_SPEC_VERSION"/>
<enum value=""VK_NV_extension_311"" name="VK_NV_EXTENSION_311_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_312" number="312" author="MVK" contact="Bill Hollings @billhollings" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_312_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_312"" name="VK_EXT_EXTENSION_312_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_313" number="313" author="MVK" contact="Bill Hollings @billhollings" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_313_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_313"" name="VK_EXT_EXTENSION_313_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_314" number="314" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_314_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_314"" name="VK_AMD_EXTENSION_314_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_synchronization2" number="315" type="device" author="KHR" requires="VK_KHR_get_physical_device_properties2" contact="Tobias Hector @tobski" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION"/>
<enum value=""VK_KHR_synchronization2"" name="VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DEPENDENCY_INFO_KHR"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SUBMIT_INFO_2_KHR"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO_KHR"/>
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR"/>
<enum bitpos="0" extends="VkEventCreateFlagBits" name="VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR"/>
<enum offset="0" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL_KHR"/>
<enum offset="1" extends="VkImageLayout" name="VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL_KHR"/>
<enum value="0" extends="VkPipelineStageFlagBits" name="VK_PIPELINE_STAGE_NONE_KHR"/>
<enum value="0" extends="VkAccessFlagBits" name="VK_ACCESS_NONE_KHR"/>
<type name="VkPipelineStageFlags2KHR"/>
<type name="VkPipelineStageFlagBits2KHR"/>
<type name="VkAccessFlags2KHR"/>
<type name="VkAccessFlagBits2KHR"/>
<type name="VkMemoryBarrier2KHR"/>
<type name="VkBufferMemoryBarrier2KHR"/>
<type name="VkImageMemoryBarrier2KHR"/>
<type name="VkDependencyInfoKHR"/>
<type name="VkSubmitInfo2KHR"/>
<type name="VkSemaphoreSubmitInfoKHR"/>
<type name="VkCommandBufferSubmitInfoKHR"/>
<type name="VkSubmitFlagBitsKHR"/>
<type name="VkSubmitFlagsKHR"/>
<type name="VkPhysicalDeviceSynchronization2FeaturesKHR"/>
<command name="vkCmdSetEvent2KHR"/>
<command name="vkCmdResetEvent2KHR"/>
<command name="vkCmdWaitEvents2KHR"/>
<command name="vkCmdPipelineBarrier2KHR"/>
<command name="vkCmdWriteTimestamp2KHR"/>
<command name="vkQueueSubmit2KHR"/>
</require>
<require extension="VK_EXT_transform_feedback">
<enum bitpos="24" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT"/>
<enum bitpos="25" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT"/>
<enum bitpos="26" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT"/>
<enum bitpos="27" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT"/>
</require>
<require extension="VK_EXT_conditional_rendering">
<enum bitpos="18" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT" comment="A pipeline stage for conditional rendering predicate fetch"/>
<enum bitpos="20" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT" comment="read access flag for reading conditional rendering predicate"/>
</require>
<require extension="VK_NV_device_generated_commands">
<enum bitpos="17" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV"/>
<enum bitpos="17" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV"/>
<enum bitpos="18" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV"/>
</require>
<require extension="VK_KHR_fragment_shading_rate">
<enum bitpos="22" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR"/>
<enum bitpos="23" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR"/>
</require>
<require extension="VK_NV_shading_rate_image">
<enum extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV" alias="VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR"/>
<enum extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV" alias="VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR"/>
</require>
<require extension="VK_KHR_acceleration_structure">
<enum bitpos="25" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR"/>
<enum bitpos="21" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR"/>
<enum bitpos="22" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR"/>
</require>
<require extension="VK_KHR_ray_tracing_pipeline">
<enum bitpos="21" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR"/>
</require>
<require extension="VK_NV_ray_tracing">
<enum extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV" alias="VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR"/>
<enum extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV" alias="VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR"/>
<enum extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV" alias="VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR"/>
<enum extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV" alias="VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR"/>
</require>
<require extension="VK_EXT_fragment_density_map">
<enum bitpos="23" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT"/>
<enum bitpos="24" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT"/>
</require>
<require extension="VK_EXT_blend_operation_advanced">
<enum bitpos="19" extends="VkAccessFlagBits2KHR" name="VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT"/>
</require>
<require extension="VK_NV_mesh_shader">
<enum bitpos="19" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV"/>
<enum bitpos="20" extends="VkPipelineStageFlagBits2KHR" name="VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV"/>
</require>
<require extension="VK_AMD_buffer_marker">
<command name="vkCmdWriteBufferMarker2AMD"/>
</require>
<require extension="VK_NV_device_diagnostic_checkpoints">
<type name="VkQueueFamilyCheckpointProperties2NV"/>
<type name="VkCheckpointData2NV"/>
<command name="vkGetQueueCheckpointData2NV"/>
<enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV"/>
<enum offset="9" extends="VkStructureType" name="VK_STRUCTURE_TYPE_CHECKPOINT_DATA_2_NV"/>
</require>
</extension>
<extension name="VK_AMD_extension_316" number="316" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_316_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_316"" name="VK_AMD_EXTENSION_316_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_317" number="317" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_317_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_317"" name="VK_AMD_EXTENSION_317_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_318" number="318" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_318_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_318"" name="VK_AMD_EXTENSION_318_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_319" number="319" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_319_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_319"" name="VK_AMD_EXTENSION_319_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_320" number="320" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_320_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_320"" name="VK_AMD_EXTENSION_320_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_321" number="321" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_321_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_321"" name="VK_AMD_EXTENSION_321_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_322" number="322" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_322_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_322"" name="VK_AMD_EXTENSION_322_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_AMD_extension_323" number="323" author="AMD" contact="Martin Dinkov @mdinkov" supported="disabled">
<require>
<enum value="0" name="VK_AMD_EXTENSION_323_SPEC_VERSION"/>
<enum value=""VK_AMD_extension_323"" name="VK_AMD_EXTENSION_323_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_324" number="324" author="KHR" contact="Alan Baker @alan-baker" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_324_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_324"" name="VK_KHR_EXTENSION_324_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_325" number="325" author="KHR" contact="Ralph Potter gitlab:@r_potter" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_325_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_325"" name="VK_KHR_EXTENSION_325_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_zero_initialize_workgroup_memory" number="326" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Alan Baker @alan-baker" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_SPEC_VERSION"/>
<enum value=""VK_KHR_zero_initialize_workgroup_memory"" name="VK_KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR"/>
<type name="VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR"/>
</require>
</extension>
<extension name="VK_NV_fragment_shading_rate_enums" number="327" type="device" requires="VK_KHR_fragment_shading_rate" author="NV" contact="Pat Brown @nvpbrown" supported="vulkan">
<require>
<enum value="1" name="VK_NV_FRAGMENT_SHADING_RATE_ENUMS_SPEC_VERSION"/>
<enum value=""VK_NV_fragment_shading_rate_enums"" name="VK_NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV"/>
<type name="VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV"/>
<type name="VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV"/>
<type name="VkPipelineFragmentShadingRateEnumStateCreateInfoNV"/>
<type name="VkFragmentShadingRateNV"/>
<type name="VkFragmentShadingRateTypeNV"/>
<command name="vkCmdSetFragmentShadingRateEnumNV"/>
</require>
</extension>
<extension name="VK_NV_extension_328" number="328" author="NV" contact="Eric Werness @ewerness-nv" supported="disabled" requires="VK_KHR_acceleration_structure">
<require>
<enum value="0" name="VK_NV_EXTENSION_328_SPEC_VERSION"/>
<enum value=""VK_NV_extension_328"" name="VK_NV_EXTENSION_328_EXTENSION_NAME"/>
<enum bitpos="5" extends="VkBuildAccelerationStructureFlagBitsKHR" name="VK_BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_5_NV"/>
<enum bitpos="2" extends="VkAccelerationStructureCreateFlagBitsKHR" name="VK_ACCELERATION_STRUCTURE_CREATE_RESERVED_BIT_2_NV"/>
<enum bitpos="20" extends="VkPipelineCreateFlagBits" name="VK_PIPELINE_CREATE_RESERVED_BIT_20_NV"/>
</require>
</extension>
<extension name="VK_NV_extension_329" number="329" author="NV" contact="Pat Brown @nvpbrown" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_329_SPEC_VERSION"/>
<enum value=""VK_NV_extension_329"" name="VK_NV_EXTENSION_329_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_extension_330" number="330" author="NV" contact="Liam Middlebrook @liam-middlebrook" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_330_SPEC_VERSION"/>
<enum value=""VK_NV_extension_330"" name="VK_NV_EXTENSION_330_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_ycbcr_2plane_444_formats" number="331" type="device" requires="VK_KHR_sampler_ycbcr_conversion" author="EXT" contact="Tony Zlatinski @tzlatinski" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_YCBCR_2PLANE_444_FORMATS_SPEC_VERSION"/>
<enum value=""VK_EXT_ycbcr_2plane_444_formats"" name="VK_EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT"/>
<enum offset="0" extends="VkFormat" name="VK_FORMAT_G8_B8R8_2PLANE_444_UNORM_EXT"/>
<enum offset="1" extends="VkFormat" name="VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT"/>
<enum offset="2" extends="VkFormat" name="VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT"/>
<enum offset="3" extends="VkFormat" name="VK_FORMAT_G16_B16R16_2PLANE_444_UNORM_EXT"/>
<type name="VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT"/>
</require>
</extension>
<extension name="VK_NV_extension_332" number="332" author="NV" contact="Tony Zlatinski @tzlatinski" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_332_SPEC_VERSION"/>
<enum value=""VK_NV_extension_332"" name="VK_NV_EXTENSION_332_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_fragment_density_map2" number="333" type="device" requires="VK_EXT_fragment_density_map" author="EXT" contact="Matthew Netsch @mnetsch" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_FRAGMENT_DENSITY_MAP_2_SPEC_VERSION"/>
<enum value=""VK_EXT_fragment_density_map2"" name="VK_EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT"/>
<enum bitpos="1" extends="VkImageViewCreateFlagBits" name="VK_IMAGE_VIEW_CREATE_FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT"/>
<type name="VkPhysicalDeviceFragmentDensityMap2FeaturesEXT"/>
<type name="VkPhysicalDeviceFragmentDensityMap2PropertiesEXT"/>
</require>
</extension>
<extension name="VK_QCOM_rotated_copy_commands" number="334" type="device" requires="VK_KHR_swapchain,VK_KHR_copy_commands2" author="QCOM" contact="Jeff Leger @jackohound" supported="vulkan">
<require>
<enum value="1" name="VK_QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION"/>
<enum value=""VK_QCOM_rotated_copy_commands"" name="VK_QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COPY_COMMAND_TRANSFORM_INFO_QCOM"/>
<type name="VkCopyCommandTransformInfoQCOM"/>
</require>
</extension>
<extension name="VK_KHR_extension_335" number="335" author="KHR" contact="Mark Bellamy @mark.bellamy_arm" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_335_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_335"" name="VK_KHR_EXTENSION_335_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_image_robustness" number="336" type="device" author="EXT" contact="Graeme Leese @gnl21" supported="vulkan" requires="VK_KHR_get_physical_device_properties2">
<require>
<enum value="1" name="VK_EXT_IMAGE_ROBUSTNESS_SPEC_VERSION"/>
<enum value=""VK_EXT_image_robustness"" name="VK_EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT"/>
<type name="VkPhysicalDeviceImageRobustnessFeaturesEXT"/>
</require>
</extension>
<extension name="VK_KHR_workgroup_memory_explicit_layout" number="337" type="device" requires="VK_KHR_get_physical_device_properties2" author="KHR" contact="Caio Marcelo de Oliveira Filho @cmarcelo" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_SPEC_VERSION"/>
<enum value=""VK_KHR_workgroup_memory_explicit_layout"" name="VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR"/>
<type name="VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR"/>
</require>
</extension>
<extension name="VK_KHR_copy_commands2" number="338" author="KHR" type="device" contact="Jeff Leger @jackohound" supported="vulkan">
<require>
<enum value="1" name="VK_KHR_COPY_COMMANDS_2_SPEC_VERSION"/>
<enum value=""VK_KHR_copy_commands2"" name="VK_KHR_COPY_COMMANDS_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COPY_BUFFER_INFO_2_KHR"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR"/>
<enum offset="3" extends="VkStructureType" name="VK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2_KHR"/>
<enum offset="4" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BLIT_IMAGE_INFO_2_KHR"/>
<enum offset="5" extends="VkStructureType" name="VK_STRUCTURE_TYPE_RESOLVE_IMAGE_INFO_2_KHR"/>
<enum offset="6" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_COPY_2_KHR"/>
<enum offset="7" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_COPY_2_KHR"/>
<enum offset="8" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR"/>
<enum offset="9" extends="VkStructureType" name="VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR"/>
<enum offset="10" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR"/>
<type name="VkCopyBufferInfo2KHR"/>
<type name="VkCopyImageInfo2KHR"/>
<type name="VkCopyBufferToImageInfo2KHR"/>
<type name="VkCopyImageToBufferInfo2KHR"/>
<type name="VkBlitImageInfo2KHR"/>
<type name="VkResolveImageInfo2KHR"/>
<type name="VkBufferCopy2KHR"/>
<type name="VkImageCopy2KHR"/>
<type name="VkImageBlit2KHR"/>
<type name="VkBufferImageCopy2KHR"/>
<type name="VkImageResolve2KHR"/>
<command name="vkCmdCopyBuffer2KHR"/>
<command name="vkCmdCopyImage2KHR"/>
<command name="vkCmdCopyBufferToImage2KHR"/>
<command name="vkCmdCopyImageToBuffer2KHR"/>
<command name="vkCmdBlitImage2KHR"/>
<command name="vkCmdResolveImage2KHR"/>
</require>
</extension>
<extension name="VK_ARM_extension_339" number="339" author="ARM" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
<require>
<enum value="0" name="VK_ARM_EXTENSION_339_SPEC_VERSION"/>
<enum value=""VK_ARM_extension_339"" name="VK_ARM_EXTENSION_339_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_340" number="340" author="EXT" contact="Joshua Ashton @Joshua-Ashton" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_340_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_340"" name="VK_EXT_EXTENSION_340_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_4444_formats" number="341" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Joshua Ashton @Joshua-Ashton" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_4444_FORMATS_SPEC_VERSION"/>
<enum value=""VK_EXT_4444_formats"" name="VK_EXT_4444_FORMATS_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT"/>
<enum offset="0" extends="VkFormat" name="VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT"/>
<enum offset="1" extends="VkFormat" name="VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT"/>
<type name="VkPhysicalDevice4444FormatsFeaturesEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_342" number="342" author="EXT" contact="Ralph Potter gitlab:@r_potter" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_342_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_342"" name="VK_EXT_EXTENSION_342_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_ARM_extension_343" number="343" author="ARM" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
<require>
<enum value="0" name="VK_ARM_EXTENSION_343_SPEC_VERSION"/>
<enum value=""VK_ARM_extension_343"" name="VK_ARM_EXTENSION_343_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_ARM_extension_344" number="344" author="ARM" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
<require>
<enum value="0" name="VK_ARM_EXTENSION_344_SPEC_VERSION"/>
<enum value=""VK_ARM_extension_344"" name="VK_ARM_EXTENSION_344_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_ARM_extension_345" number="345" author="ARM" contact="Jan-Harald Fredriksen @janharaldfredriksen-arm" supported="disabled">
<require>
<enum value="0" name="VK_ARM_EXTENSION_345_SPEC_VERSION"/>
<enum value=""VK_ARM_extension_345"" name="VK_ARM_EXTENSION_345_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_acquire_winrt_display" number="346" type="device" requires="VK_EXT_direct_mode_display" author="NV" contact="Jeff Juliano @jjuliano" platform="win32" supported="vulkan">
<require>
<enum value="1" name="VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION"/>
<enum value=""VK_NV_acquire_winrt_display"" name="VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME"/>
<command name="vkAcquireWinrtDisplayNV"/>
<command name="vkGetWinrtDisplayNV"/>
</require>
</extension>
<extension name="VK_EXT_directfb_surface" number="347" type="instance" requires="VK_KHR_surface" platform="directfb" supported="vulkan" author="EXT" contact="Nicolas Caramelli @caramelli">
<require>
<enum value="1" name="VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION"/>
<enum value=""VK_EXT_directfb_surface"" name="VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT"/>
<type name="VkDirectFBSurfaceCreateFlagsEXT"/>
<type name="VkDirectFBSurfaceCreateInfoEXT"/>
<command name="vkCreateDirectFBSurfaceEXT"/>
<command name="vkGetPhysicalDeviceDirectFBPresentationSupportEXT"/>
</require>
</extension>
<extension name="VK_KHR_extension_350" number="350" author="KHR" contact="Mark Bellamy @mark.bellamy_arm" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_350_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_350"" name="VK_KHR_EXTENSION_350_EXTENSION_NAME"/>
<enum bitpos="2" extends="VkPipelineCacheCreateFlagBits" name="VK_PIPELINE_CACHE_CREATE_RESERVED_2_BIT_EXT"/>
</require>
</extension>
<extension name="VK_NV_extension_351" number="351" author="NV" contact="Liam Middlebrook @liam-middlebrook" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_351_SPEC_VERSION"/>
<enum value=""VK_NV_extension_351"" name="VK_NV_EXTENSION_351_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_VALVE_mutable_descriptor_type" number="352" type="device" supported="vulkan" author="VALVE" contact="Joshua Ashton @Joshua-Ashton,Hans-Kristian Arntzen @HansKristian-Work" specialuse="d3demulation" requires="VK_KHR_maintenance3">
<require>
<enum value="1" name="VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_SPEC_VERSION"/>
<enum value=""VK_VALVE_mutable_descriptor_type"" name="VK_VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE"/>
<enum offset="0" extends="VkDescriptorType" name="VK_DESCRIPTOR_TYPE_MUTABLE_VALVE"/>
<enum bitpos="2" extends="VkDescriptorPoolCreateFlagBits" name="VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE"/>
<enum bitpos="2" extends="VkDescriptorSetLayoutCreateFlagBits" name="VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE"/>
<type name="VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE"/>
<type name="VkMutableDescriptorTypeListVALVE"/>
<type name="VkMutableDescriptorTypeCreateInfoVALVE"/>
</require>
</extension>
<extension name="VK_EXT_vertex_input_dynamic_state" number="353" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Piers Daniell @pdaniell-nv" supported="vulkan">
<require>
<enum value="2" name="VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_SPEC_VERSION"/>
<enum value=""VK_EXT_vertex_input_dynamic_state"" name="VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_VERTEX_INPUT_EXT"/>
<type name="VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT"/>
<type name="VkVertexInputBindingDescription2EXT"/>
<type name="VkVertexInputAttributeDescription2EXT"/>
<command name="vkCmdSetVertexInputEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_354" number="354" author="EXT" contact="Simon Ser @emersion" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_354_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_354"" name="VK_EXT_EXTENSION_354_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_355" number="355" author="EXT" contact="Ralph Potter gitlab:@r_potter" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_355_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_355"" name="VK_EXT_EXTENSION_355_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_vertex_attribute_aliasing" number="356" type="device" author="EXT" contact="Shahbaz Youssefi @syoussefi" supported="disabled" specialuse="glemulation">
<require>
<enum value="0" name="VK_EXT_VERTEX_ATTRIBUTE_ALIASING_SPEC_VERSION"/>
<enum value=""VK_EXT_vertex_attribute_aliasing"" name="VK_EXT_VERTEX_ATTRIBUTE_ALIASING_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_357" number="357" author="EXT" contact="Courtney Goeltzenleuchter @courtney-g" supported="disabled" specialuse="glemulation">
<require>
<enum value="0" name="VK_EXT_EXTENSION_357"/>
<enum value=""VK_EXT_extension_357"" name="VK_EXT_EXTENSION_357"/>
</require>
</extension>
<extension name="VK_KHR_extension_358" number="358" author="KHR" contact="Jeff Bolz @jeffbolznv" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_358_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_358"" name="VK_KHR_EXTENSION_358_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_359" number="359" author="EXT" contact="Bill Hollings @billhollings" supported="disabled" specialuse="glemulation">
<require>
<enum value="0" name="VK_EXT_EXTENSION_359"/>
<enum value=""VK_EXT_extension_359"" name="VK_EXT_EXTENSION_359"/>
</require>
</extension>
<extension name="VK_EXT_extension_360" number="360" author="EXT" contact="Bill Hollings @billhollings" supported="disabled" specialuse="glemulation">
<require>
<enum value="0" name="VK_EXT_EXTENSION_360"/>
<enum value=""VK_EXT_extension_360"" name="VK_EXT_EXTENSION_360"/>
</require>
</extension>
<extension name="VK_KHR_extension_361" number="361" author="KHR" contact="Lionel Landwerlin @llandwerlin" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_361"/>
<enum value=""VK_EXT_extension_361"" name="VK_EXT_EXTENSION_361"/>
</require>
</extension>
<extension name="VK_EXT_extension_362" number="362" author="EXT" contact="Lionel Duc @nvlduc" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_362_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_362"" name="VK_EXT_EXTENSION_362_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_363" number="363" author="EXT" contact="Kaye Mason @chaleur" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_363_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_363"" name="VK_EXT_EXTENSION_363_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_FUCHSIA_extension_364" number="364" author="FUCHSIA" contact="Craig Stout @cdotstout" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_364_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_364"" name="VK_EXT_EXTENSION_364_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_FUCHSIA_external_memory" number="365" type="device" requires="VK_KHR_external_memory_capabilities,VK_KHR_external_memory" author="FUCHSIA" contact="John Rosasco @rosasco" platform="fuchsia" supported="vulkan">
<require>
<enum value="1" name="VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION"/>
<enum value=""VK_FUCHSIA_external_memory"" name="VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA"/>
<enum offset="2" extends="VkStructureType" name="VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA"/>
<enum bitpos="11" extends="VkExternalMemoryHandleTypeFlagBits" name="VK_EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA"/>
<type name="VkImportMemoryZirconHandleInfoFUCHSIA"/>
<type name="VkMemoryZirconHandlePropertiesFUCHSIA"/>
<type name="VkMemoryGetZirconHandleInfoFUCHSIA"/>
<command name="vkGetMemoryZirconHandleFUCHSIA"/>
<command name="vkGetMemoryZirconHandlePropertiesFUCHSIA"/>
</require>
</extension>
<extension name="VK_FUCHSIA_external_semaphore" number="366" type="device" requires="VK_KHR_external_semaphore_capabilities,VK_KHR_external_semaphore" author="FUCHSIA" contact="John Rosasco @rosasco" platform="fuchsia" supported="vulkan">
<require>
<enum value="1" name="VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION"/>
<enum value=""VK_FUCHSIA_external_semaphore"" name="VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA"/>
<enum bitpos="7" extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA"/>
<type name="VkImportSemaphoreZirconHandleInfoFUCHSIA"/>
<type name="VkSemaphoreGetZirconHandleInfoFUCHSIA"/>
<command name="vkImportSemaphoreZirconHandleFUCHSIA"/>
<command name="vkGetSemaphoreZirconHandleFUCHSIA"/>
</require>
</extension>
<extension name="VK_FUCHSIA_extension_367" number="367" author="FUCHSIA" contact="Craig Stout @cdotstout" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_367_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_367"" name="VK_EXT_EXTENSION_367_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_FUCHSIA_extension_368" number="368" author="FUCHSIA" contact="Craig Stout @cdotstout" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_368_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_368"" name="VK_EXT_EXTENSION_368_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_QCOM_extension_369" number="369" author="QCOM" contact="Matthew Netsch @mnetsch" supported="disabled">
<require>
<enum value="0" name="VK_QCOM_EXTENSION_369_SPEC_VERSION"/>
<enum value=""VK_QCOM_extension_369"" name="VK_QCOM_EXTENSION_369_EXTENSION_NAME"/>
<enum bitpos="4" extends="VkDescriptorBindingFlagBits" name="VK_DESCRIPTOR_BINDING_RESERVED_4_BIT_QCOM"/>
</require>
</extension>
<extension name="VK_HUAWEI_extension_370" number="370" author="HUAWEI" contact="Hueilong Wang @wyvernathuawei" supported="disabled">
<require>
<enum value="0" name="VK_HUAWEI_EXTENSION_370_SPEC_VERSION"/>
<enum value=""VK_HUAWEI_extension_370"" name="VK_HUAWEI_EXTENSION_370_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_HUAWEI_extension_371" number="371" author="HUAWEI" contact="Hueilong Wang @wyvernathuawei" supported="disabled">
<require>
<enum value="0" name="VK_HUAWEI_EXTENSION_371_SPEC_VERSION"/>
<enum value=""VK_HUAWEI_extension_371"" name="VK_HUAWEI_EXTENSION_371_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_extension_372" number="372" author="NV" contact="Carsten Rohde @crohde" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_372_SPEC_VERSION"/>
<enum value=""VK_NV_extension_372"" name="VK_NV_EXTENSION_372_EXTENSION_NAME"/>
<enum bitpos="5" extends="VkBufferCreateFlagBits" name="VK_BUFFER_CREATE_RESERVED_5_BIT_NV"/>
<enum bitpos="15" extends="VkImageCreateFlagBits" name="VK_IMAGE_CREATE_RESERVED_15_BIT_NV"/>
</require>
</extension>
<extension name="VK_NV_extension_373" number="373" author="NV" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_373_SPEC_VERSION"/>
<enum value=""VK_NV_extension_373"" name="VK_NV_EXTENSION_373_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_NV_extension_374" number="374" author="NV" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_374_SPEC_VERSION"/>
<enum value=""VK_NV_extension_374"" name="VK_NV_EXTENSION_374_EXTENSION_NAME"/>
<enum bitpos="4" extends="VkExternalFenceHandleTypeFlagBits" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_RESERVED_4_BIT_NV"/>
<enum bitpos="5" extends="VkExternalFenceHandleTypeFlagBits" name="VK_EXTERNAL_FENCE_HANDLE_TYPE_RESERVED_5_BIT_NV"/>
</require>
</extension>
<extension name="VK_NV_extension_375" number="375" author="NV" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_NV_EXTENSION_375_SPEC_VERSION"/>
<enum value=""VK_NV_extension_375"" name="VK_NV_EXTENSION_375_EXTENSION_NAME"/>
<enum bitpos="5" extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_RESERVED_5_BIT_NV"/>
<enum bitpos="6" extends="VkExternalSemaphoreHandleTypeFlagBits" name="VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_RESERVED_6_BIT_NV"/>
</require>
</extension>
<extension name="VK_EXT_extension_376" number="376" author="EXT" contact="Shahbaz Youssefi @syoussefi" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_376_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_376"" name="VK_EXT_EXTENSION_376_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_377" number="377" author="EXT" contact="Hugues Evrard @hevrard" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_377_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_377"" name="VK_EXT_EXTENSION_377_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extended_dynamic_state2" number="378" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Vikram Kushwaha @vkushwaha-nv" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION"/>
<enum value=""VK_EXT_extended_dynamic_state2"" name="VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT"/>
<enum offset="1" extends="VkDynamicState" name="VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT"/>
<enum offset="2" extends="VkDynamicState" name="VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT"/>
<enum offset="3" extends="VkDynamicState" name="VK_DYNAMIC_STATE_LOGIC_OP_EXT"/>
<enum offset="4" extends="VkDynamicState" name="VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT"/>
<type name="VkPhysicalDeviceExtendedDynamicState2FeaturesEXT"/>
<command name="vkCmdSetPatchControlPointsEXT"/>
<command name="vkCmdSetRasterizerDiscardEnableEXT"/>
<command name="vkCmdSetDepthBiasEnableEXT"/>
<command name="vkCmdSetLogicOpEXT"/>
<command name="vkCmdSetPrimitiveRestartEnableEXT"/>
</require>
</extension>
<extension name="VK_QNX_screen_surface" number="379" type="instance" requires="VK_KHR_surface" platform="screen" author="QNX" contact="Mike Gorchak @mgorchak-blackberry" supported="vulkan">
<require>
<enum value="1" name="VK_QNX_SCREEN_SURFACE_SPEC_VERSION"/>
<enum value=""VK_QNX_screen_surface"" name="VK_QNX_SCREEN_SURFACE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX"/>
<type name="VkScreenSurfaceCreateFlagsQNX"/>
<type name="VkScreenSurfaceCreateInfoQNX"/>
<command name="vkCreateScreenSurfaceQNX"/>
<command name="vkGetPhysicalDeviceScreenPresentationSupportQNX"/>
</require>
</extension>
<extension name="VK_KHR_extension_380" number="380" author="KHR" contact="James Jones @cubanismo" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_380_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_380"" name="VK_KHR_EXTENSION_380_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_381" number="381" author="KHR" contact="James Jones @cubanismo" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_381_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_381"" name="VK_KHR_EXTENSION_381_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_color_write_enable" number="382" type="device" requires="VK_KHR_get_physical_device_properties2" author="EXT" contact="Sharif Elcott @selcott" supported="vulkan">
<require>
<enum value="1" name="VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION"/>
<enum value=""VK_EXT_color_write_enable"" name="VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME"/>
<enum offset="0" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT"/>
<enum offset="1" extends="VkStructureType" name="VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT"/>
<enum offset="0" extends="VkDynamicState" name="VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT"/>
<type name="VkPhysicalDeviceColorWriteEnableFeaturesEXT"/>
<type name="VkPipelineColorWriteCreateInfoEXT"/>
<command name="vkCmdSetColorWriteEnableEXT"/>
</require>
</extension>
<extension name="VK_EXT_extension_383" number="383" author="EXT" contact="Shahbaz Youssefi @syoussefi" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_383_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_383"" name="VK_EXT_EXTENSION_383_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_384" number="384" type="instance" author="EXT" contact="Chia-I Wu @olvaffe1" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_384_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_384"" name="VK_EXT_EXTENSION_384_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_MESA_extension_385" number="385" type="instance" author="MESA" contact="Chia-I Wu @olvaffe1" supported="disabled">
<require>
<enum value="0" name="VK_MESA_EXTENSION_385_SPEC_VERSION"/>
<enum value=""VK_MESA_extension_385"" name="VK_MESA_EXTENSION_385_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_GOOGLE_extension_386" number="386" author="GOOGLE" contact="Chia-I Wu @olvaffe1" supported="disabled">
<require>
<enum value="0" name="VK_GOOGLE_EXTENSION_386_SPEC_VERSION"/>
<enum value=""VK_GOOGLE_extension_386"" name="VK_GOOGLE_EXTENSION_386_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_387" number="387" author="KHR" contact="Daniel Koch @dgkoch" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_387_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_387"" name="VK_KHR_EXTENSION_387_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_388" number="388" author="EXT" contact="Alan Baker @alan-baker" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_388_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_388"" name="VK_EXT_EXTENSION_388_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_389" number="389" author="EXT" contact="Yiwei Zhang @zhangyiwei" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_389_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_389"" name="VK_EXT_EXTENSION_389_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_390" number="390" author="EXT" contact="Joshua Ashton @Joshua-Ashton" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_390_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_390"" name="VK_EXT_EXTENSION_390_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_391" number="391" author="EXT" contact="Joshua Ashton @Joshua-Ashton" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_391_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_391"" name="VK_EXT_EXTENSION_391_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_392" number="392" author="EXT" contact="Joshua Ashton @Joshua-Ashton" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_392_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_392"" name="VK_EXT_EXTENSION_392_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_MESA_multi_draw" number="393" author="MESA" contact="Mike Blumenkrantz @zmike" type="device" supported="disabled">
<require>
<enum value="0" name="VK_MESA_MULTI_DRAW_SPEC_VERSION"/>
<enum value=""VK_MESA_multi_draw"" name="VK_MESA_MULTI_DRAW_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_EXT_extension_394" number="394" author="EXT" contact="Mike Blumenkrantz @zmike" type="device" supported="disabled">
<require>
<enum value="0" name="VK_EXT_EXTENSION_394_SPEC_VERSION"/>
<enum value=""VK_EXT_extension_394"" name="VK_EXT_EXTENSION_394_EXTENSION_NAME"/>
</require>
</extension>
<extension name="VK_KHR_extension_395" number="395" author="KHR" contact="Lenny Komow @lkomow" supported="disabled">
<require>
<enum value="0" name="VK_KHR_EXTENSION_395_SPEC_VERSION"/>
<enum value=""VK_KHR_extension_395"" name="VK_KHR_EXTENSION_395_EXTENSION_NAME"/>
</require>
</extension>
</extensions>
<spirvextensions comment="SPIR-V Extensions allowed in Vulkan and what is required to use it">
<spirvextension name="SPV_KHR_variable_pointers">
<enable version="VK_API_VERSION_1_1"/>
<enable extension="VK_KHR_variable_pointers"/>
</spirvextension>
<spirvextension name="SPV_AMD_shader_explicit_vertex_parameter">
<enable extension="VK_AMD_shader_explicit_vertex_parameter"/>
</spirvextension>
<spirvextension name="SPV_AMD_gcn_shader">
<enable extension="VK_AMD_gcn_shader"/>
</spirvextension>
<spirvextension name="SPV_AMD_gpu_shader_half_float">
<enable extension="VK_AMD_gpu_shader_half_float"/>
</spirvextension>
<spirvextension name="SPV_AMD_gpu_shader_int16">
<enable extension="VK_AMD_gpu_shader_int16"/>
</spirvextension>
<spirvextension name="SPV_AMD_shader_ballot">
<enable extension="VK_AMD_shader_ballot"/>
</spirvextension>
<spirvextension name="SPV_AMD_shader_fragment_mask">
<enable extension="VK_AMD_shader_fragment_mask"/>
</spirvextension>
<spirvextension name="SPV_AMD_shader_image_load_store_lod">
<enable extension="VK_AMD_shader_image_load_store_lod"/>
</spirvextension>
<spirvextension name="SPV_AMD_shader_trinary_minmax">
<enable extension="VK_AMD_shader_trinary_minmax"/>
</spirvextension>
<spirvextension name="SPV_AMD_texture_gather_bias_lod">
<enable extension="VK_AMD_texture_gather_bias_lod"/>
</spirvextension>
<spirvextension name="SPV_KHR_shader_draw_parameters">
<enable version="VK_API_VERSION_1_1"/>
<enable extension="VK_KHR_shader_draw_parameters"/>
</spirvextension>
<spirvextension name="SPV_KHR_8bit_storage">
<enable version="VK_API_VERSION_1_2"/>
<enable extension="VK_KHR_8bit_storage"/>
</spirvextension>
<spirvextension name="SPV_KHR_16bit_storage">
<enable version="VK_API_VERSION_1_1"/>
<enable extension="VK_KHR_16bit_storage"/>
</spirvextension>
<spirvextension name="SPV_KHR_shader_clock">
<enable extension="VK_KHR_shader_clock"/>
</spirvextension>
<spirvextension name="SPV_KHR_float_controls">
<enable version="VK_API_VERSION_1_2"/>
<enable extension="VK_KHR_shader_float_controls"/>
</spirvextension>
<spirvextension name="SPV_KHR_storage_buffer_storage_class">
<enable version="VK_API_VERSION_1_1"/>
<enable extension="VK_KHR_storage_buffer_storage_class"/>
</spirvextension>
<spirvextension name="SPV_KHR_post_depth_coverage">
<enable extension="VK_EXT_post_depth_coverage"/>
</spirvextension>
<spirvextension name="SPV_EXT_shader_stencil_export">
<enable extension="VK_EXT_shader_stencil_export"/>
</spirvextension>
<spirvextension name="SPV_KHR_shader_ballot">
<enable extension="VK_EXT_shader_subgroup_ballot"/>
</spirvextension>
<spirvextension name="SPV_KHR_subgroup_vote">
<enable extension="VK_EXT_shader_subgroup_vote"/>
</spirvextension>
<spirvextension name="SPV_NV_sample_mask_override_coverage">
<enable extension="VK_NV_sample_mask_override_coverage"/>
</spirvextension>
<spirvextension name="SPV_NV_geometry_shader_passthrough">
<enable extension="VK_NV_geometry_shader_passthrough"/>
</spirvextension>
<spirvextension name="SPV_NV_mesh_shader">
<enable extension="VK_NV_mesh_shader"/>
</spirvextension>
<spirvextension name="SPV_NV_viewport_array2">
<enable extension="VK_NV_viewport_array2"/>
</spirvextension>
<spirvextension name="SPV_NV_shader_subgroup_partitioned">
<enable extension="VK_NV_shader_subgroup_partitioned"/>
</spirvextension>
<spirvextension name="SPV_EXT_shader_viewport_index_layer">
<enable version="VK_API_VERSION_1_2"/>
<enable extension="VK_EXT_shader_viewport_index_layer"/>
</spirvextension>
<spirvextension name="SPV_NVX_multiview_per_view_attributes">
<enable extension="VK_NVX_multiview_per_view_attributes"/>
</spirvextension>
<spirvextension name="SPV_EXT_descriptor_indexing">
<enable version="VK_API_VERSION_1_2"/>
<enable extension="VK_EXT_descriptor_indexing"/>
</spirvextension>
<spirvextension name="SPV_KHR_vulkan_memory_model">
<enable version="VK_API_VERSION_1_2"/>
<enable extension="VK_KHR_vulkan_memory_model"/>
</spirvextension>
<spirvextension name="SPV_NV_compute_shader_derivatives">
<enable extension="VK_NV_compute_shader_derivatives"/>
</spirvextension>
<spirvextension name="SPV_NV_fragment_shader_barycentric">
<enable extension="VK_NV_fragment_shader_barycentric"/>
</spirvextension>
<spirvextension name="SPV_NV_shader_image_footprint">
<enable extension="VK_NV_shader_image_footprint"/>
</spirvextension>
<spirvextension name="SPV_NV_shading_rate">
<enable extension="VK_NV_shading_rate_image"/>
</spirvextension>
<spirvextension name="SPV_NV_ray_tracing">
<enable extension="VK_NV_ray_tracing"/>
</spirvextension>
<spirvextension name="SPV_KHR_ray_tracing">
<enable extension="VK_KHR_ray_tracing_pipeline"/>
</spirvextension>
<spirvextension name="SPV_KHR_ray_query">
<enable extension="VK_KHR_ray_query"/>
</spirvextension>
<spirvextension name="SPV_GOOGLE_hlsl_functionality1">
<enable extension="VK_GOOGLE_hlsl_functionality1"/>
</spirvextension>
<spirvextension name="SPV_GOOGLE_user_type">
<enable extension="VK_GOOGLE_user_type"/>
</spirvextension>
<spirvextension name="SPV_GOOGLE_decorate_string">
<enable extension="VK_GOOGLE_decorate_string"/>
</spirvextension>
<spirvextension name="SPV_EXT_fragment_invocation_density">
<enable extension="VK_EXT_fragment_density_map"/>
</spirvextension>
<spirvextension name="SPV_KHR_physical_storage_buffer">
<enable version="VK_API_VERSION_1_2"/>
<enable extension="VK_KHR_buffer_device_address"/>
</spirvextension>
<spirvextension name="SPV_EXT_physical_storage_buffer">
<enable extension="VK_EXT_buffer_device_address"/>
</spirvextension>
<spirvextension name="SPV_NV_cooperative_matrix">
<enable extension="VK_NV_cooperative_matrix"/>
</spirvextension>
<spirvextension name="SPV_NV_shader_sm_builtins">
<enable extension="VK_NV_shader_sm_builtins"/>
</spirvextension>
<spirvextension name="SPV_EXT_fragment_shader_interlock">
<enable extension="VK_EXT_fragment_shader_interlock"/>
</spirvextension>
<spirvextension name="SPV_EXT_demote_to_helper_invocation">
<enable extension="VK_EXT_shader_demote_to_helper_invocation"/>
</spirvextension>
<spirvextension name="SPV_KHR_fragment_shading_rate">
<enable extension="VK_KHR_fragment_shading_rate"/>
</spirvextension>
<spirvextension name="SPV_KHR_non_semantic_info">
<enable extension="VK_KHR_shader_non_semantic_info"/>
</spirvextension>
<spirvextension name="SPV_EXT_shader_image_int64">
<enable extension="VK_EXT_shader_image_atomic_int64"/>
</spirvextension>
<spirvextension name="SPV_KHR_terminate_invocation">
<enable extension="VK_KHR_shader_terminate_invocation"/>
</spirvextension>
<spirvextension name="SPV_KHR_multiview">
<enable version="VK_API_VERSION_1_1"/>
<enable extension="VK_KHR_multiview"/>
</spirvextension>
<spirvextension name="SPV_KHR_workgroup_memory_explicit_layout">
<enable extension="VK_KHR_workgroup_memory_explicit_layout"/>
</spirvextension>
<spirvextension name="SPV_EXT_shader_atomic_float_add">
<enable extension="VK_EXT_shader_atomic_float"/>
</spirvextension>
</spirvextensions>
<spirvcapabilities comment="SPIR-V Capabilities allowed in Vulkan and what is required to use it">
<spirvcapability name="Matrix">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="Shader">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="InputAttachment">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="Sampled1D">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="Image1D">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="SampledBuffer">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="ImageBuffer">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="ImageQuery">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="DerivativeControl">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="Geometry">
<enable struct="VkPhysicalDeviceFeatures" feature="geometryShader"/>
</spirvcapability>
<spirvcapability name="Tessellation">
<enable struct="VkPhysicalDeviceFeatures" feature="tessellationShader"/>
</spirvcapability>
<spirvcapability name="Float64">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderFloat64"/>
</spirvcapability>
<spirvcapability name="Int64">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderInt64"/>
</spirvcapability>
<spirvcapability name="Int64Atomics">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderBufferInt64Atomics" requires="VK_VERSION_1_2,VK_KHR_shader_atomic_int64"/>
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderSharedInt64Atomics" requires="VK_VERSION_1_2,VK_KHR_shader_atomic_int64"/>
</spirvcapability>
<spirvcapability name="AtomicFloat32AddEXT">
<enable struct="VkPhysicalDeviceShaderAtomicFloatFeaturesEXT" feature="shaderBufferFloat32AtomicAdd" requires="VK_EXT_shader_atomic_float"/>
<enable struct="VkPhysicalDeviceShaderAtomicFloatFeaturesEXT" feature="shaderSharedFloat32AtomicAdd" requires="VK_EXT_shader_atomic_float"/>
<enable struct="VkPhysicalDeviceShaderAtomicFloatFeaturesEXT" feature="shaderImageFloat32AtomicAdd" requires="VK_EXT_shader_atomic_float"/>
<enable struct="VkPhysicalDeviceShaderAtomicFloatFeaturesEXT" feature="sparseImageFloat32AtomicAdd" requires="VK_EXT_shader_atomic_float"/>
</spirvcapability>
<spirvcapability name="AtomicFloat64AddEXT">
<enable struct="VkPhysicalDeviceShaderAtomicFloatFeaturesEXT" feature="shaderBufferFloat64AtomicAdd" requires="VK_EXT_shader_atomic_float"/>
<enable struct="VkPhysicalDeviceShaderAtomicFloatFeaturesEXT" feature="shaderSharedFloat64AtomicAdd" requires="VK_EXT_shader_atomic_float"/>
</spirvcapability>
<spirvcapability name="Int64ImageEXT">
<enable struct="VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT" feature="shaderImageInt64Atomics" requires="VK_EXT_shader_image_atomic_int64"/>
</spirvcapability>
<spirvcapability name="Int16">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderInt16"/>
</spirvcapability>
<spirvcapability name="TessellationPointSize">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderTessellationAndGeometryPointSize"/>
</spirvcapability>
<spirvcapability name="GeometryPointSize">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderTessellationAndGeometryPointSize"/>
</spirvcapability>
<spirvcapability name="ImageGatherExtended">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderImageGatherExtended"/>
</spirvcapability>
<spirvcapability name="StorageImageMultisample">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderStorageImageMultisample"/>
</spirvcapability>
<spirvcapability name="UniformBufferArrayDynamicIndexing">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderUniformBufferArrayDynamicIndexing"/>
</spirvcapability>
<spirvcapability name="SampledImageArrayDynamicIndexing">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderSampledImageArrayDynamicIndexing"/>
</spirvcapability>
<spirvcapability name="StorageBufferArrayDynamicIndexing">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderStorageBufferArrayDynamicIndexing"/>
</spirvcapability>
<spirvcapability name="StorageImageArrayDynamicIndexing">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderStorageImageArrayDynamicIndexing"/>
</spirvcapability>
<spirvcapability name="ClipDistance">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderClipDistance"/>
</spirvcapability>
<spirvcapability name="CullDistance">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderCullDistance"/>
</spirvcapability>
<spirvcapability name="ImageCubeArray">
<enable struct="VkPhysicalDeviceFeatures" feature="imageCubeArray"/>
</spirvcapability>
<spirvcapability name="SampleRateShading">
<enable struct="VkPhysicalDeviceFeatures" feature="sampleRateShading"/>
</spirvcapability>
<spirvcapability name="SparseResidency">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderResourceResidency"/>
</spirvcapability>
<spirvcapability name="MinLod">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderResourceMinLod"/>
</spirvcapability>
<spirvcapability name="SampledCubeArray">
<enable struct="VkPhysicalDeviceFeatures" feature="imageCubeArray"/>
</spirvcapability>
<spirvcapability name="ImageMSArray">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderStorageImageMultisample"/>
</spirvcapability>
<spirvcapability name="StorageImageExtendedFormats">
<enable version="VK_API_VERSION_1_0"/>
</spirvcapability>
<spirvcapability name="InterpolationFunction">
<enable struct="VkPhysicalDeviceFeatures" feature="sampleRateShading"/>
</spirvcapability>
<spirvcapability name="StorageImageReadWithoutFormat">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderStorageImageReadWithoutFormat"/>
</spirvcapability>
<spirvcapability name="StorageImageWriteWithoutFormat">
<enable struct="VkPhysicalDeviceFeatures" feature="shaderStorageImageWriteWithoutFormat"/>
</spirvcapability>
<spirvcapability name="MultiViewport">
<enable struct="VkPhysicalDeviceFeatures" feature="multiViewport"/>
</spirvcapability>
<spirvcapability name="DrawParameters">
<enable struct="VkPhysicalDeviceVulkan11Features" feature="shaderDrawParameters" requires="VK_VERSION_1_2"/>
<enable struct="VkPhysicalDeviceShaderDrawParametersFeatures" feature="shaderDrawParameters" requires="VK_VERSION_1_1"/>
<enable extension="VK_KHR_shader_draw_parameters"/>
</spirvcapability>
<spirvcapability name="MultiView">
<enable struct="VkPhysicalDeviceVulkan11Features" feature="multiview" requires="VK_VERSION_1_2"/>
<enable struct="VkPhysicalDeviceMultiviewFeatures" feature="multiview" requires="VK_KHR_multiview"/>
</spirvcapability>
<spirvcapability name="DeviceGroup">
<enable version="VK_API_VERSION_1_1"/>
<enable extension="VK_KHR_device_group"/>
</spirvcapability>
<spirvcapability name="VariablePointersStorageBuffer">
<enable struct="VkPhysicalDeviceVulkan11Features" feature="variablePointersStorageBuffer" requires="VK_VERSION_1_2"/>
<enable struct="VkPhysicalDeviceVariablePointersFeatures" feature="variablePointersStorageBuffer" requires="VK_KHR_variable_pointers"/>
</spirvcapability>
<spirvcapability name="VariablePointers">
<enable struct="VkPhysicalDeviceVulkan11Features" feature="variablePointers" requires="VK_VERSION_1_2"/>
<enable struct="VkPhysicalDeviceVariablePointersFeatures" feature="variablePointers" requires="VK_KHR_variable_pointers"/>
</spirvcapability>
<spirvcapability name="ShaderClockKHR">
<enable extension="VK_KHR_shader_clock"/>
</spirvcapability>
<spirvcapability name="StencilExportEXT">
<enable extension="VK_EXT_shader_stencil_export"/>
</spirvcapability>
<spirvcapability name="SubgroupBallotKHR">
<enable extension="VK_EXT_shader_subgroup_ballot"/>
</spirvcapability>
<spirvcapability name="SubgroupVoteKHR">
<enable extension="VK_EXT_shader_subgroup_vote"/>
</spirvcapability>
<spirvcapability name="ImageReadWriteLodAMD">
<enable extension="VK_AMD_shader_image_load_store_lod"/>
</spirvcapability>
<spirvcapability name="ImageGatherBiasLodAMD">
<enable extension="VK_AMD_texture_gather_bias_lod"/>
</spirvcapability>
<spirvcapability name="FragmentMaskAMD">
<enable extension="VK_AMD_shader_fragment_mask"/>
</spirvcapability>
<spirvcapability name="SampleMaskOverrideCoverageNV">
<enable extension="VK_NV_sample_mask_override_coverage"/>
</spirvcapability>
<spirvcapability name="GeometryShaderPassthroughNV">
<enable extension="VK_NV_geometry_shader_passthrough"/>
</spirvcapability>
<spirvcapability name="ShaderViewportIndex">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderOutputViewportIndex" requires="VK_VERSION_1_2"/>
</spirvcapability>
<spirvcapability name="ShaderLayer">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderOutputLayer" requires="VK_VERSION_1_2"/>
</spirvcapability>
<spirvcapability name="ShaderViewportIndexLayerEXT">
<enable extension="VK_EXT_shader_viewport_index_layer"/>
</spirvcapability>
<spirvcapability name="ShaderViewportIndexLayerNV">
<enable extension="VK_NV_viewport_array2"/>
</spirvcapability>
<spirvcapability name="ShaderViewportMaskNV">
<enable extension="VK_NV_viewport_array2"/>
</spirvcapability>
<spirvcapability name="PerViewAttributesNV">
<enable extension="VK_NVX_multiview_per_view_attributes"/>
</spirvcapability>
<spirvcapability name="StorageBuffer16BitAccess">
<enable struct="VkPhysicalDeviceVulkan11Features" feature="storageBuffer16BitAccess" requires="VK_VERSION_1_2"/>
<enable struct="VkPhysicalDevice16BitStorageFeatures" feature="storageBuffer16BitAccess" requires="VK_KHR_16bit_storage"/>
</spirvcapability>
<spirvcapability name="UniformAndStorageBuffer16BitAccess">
<enable struct="VkPhysicalDeviceVulkan11Features" feature="uniformAndStorageBuffer16BitAccess" requires="VK_VERSION_1_2"/>
<enable struct="VkPhysicalDevice16BitStorageFeatures" feature="uniformAndStorageBuffer16BitAccess" requires="VK_KHR_16bit_storage"/>
</spirvcapability>
<spirvcapability name="StoragePushConstant16">
<enable struct="VkPhysicalDeviceVulkan11Features" feature="storagePushConstant16" requires="VK_VERSION_1_2"/>
<enable struct="VkPhysicalDevice16BitStorageFeatures" feature="storagePushConstant16" requires="VK_KHR_16bit_storage"/>
</spirvcapability>
<spirvcapability name="StorageInputOutput16">
<enable struct="VkPhysicalDeviceVulkan11Features" feature="storageInputOutput16" requires="VK_VERSION_1_2"/>
<enable struct="VkPhysicalDevice16BitStorageFeatures" feature="storageInputOutput16" requires="VK_KHR_16bit_storage"/>
</spirvcapability>
<spirvcapability name="GroupNonUniform">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_BASIC_BIT" requires="VK_VERSION_1_1"/>
</spirvcapability>
<spirvcapability name="GroupNonUniformVote">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_VOTE_BIT" requires="VK_VERSION_1_1"/>
</spirvcapability>
<spirvcapability name="GroupNonUniformArithmetic">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_ARITHMETIC_BIT" requires="VK_VERSION_1_1"/>
</spirvcapability>
<spirvcapability name="GroupNonUniformBallot">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_BALLOT_BIT" requires="VK_VERSION_1_1"/>
</spirvcapability>
<spirvcapability name="GroupNonUniformShuffle">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_SHUFFLE_BIT" requires="VK_VERSION_1_1"/>
</spirvcapability>
<spirvcapability name="GroupNonUniformShuffleRelative">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT" requires="VK_VERSION_1_1"/>
</spirvcapability>
<spirvcapability name="GroupNonUniformClustered">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_CLUSTERED_BIT" requires="VK_VERSION_1_1"/>
</spirvcapability>
<spirvcapability name="GroupNonUniformQuad">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_QUAD_BIT" requires="VK_VERSION_1_1"/>
</spirvcapability>
<spirvcapability name="GroupNonUniformPartitionedNV">
<enable property="VkPhysicalDeviceVulkan11Properties" member="subgroupSupportedOperations" value="VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV" requires="VK_NV_shader_subgroup_partitioned"/>
</spirvcapability>
<spirvcapability name="SampleMaskPostDepthCoverage">
<enable extension="VK_EXT_post_depth_coverage"/>
</spirvcapability>
<spirvcapability name="ShaderNonUniform">
<enable version="VK_API_VERSION_1_2"/>
<enable extension="VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="RuntimeDescriptorArray">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="runtimeDescriptorArray" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="InputAttachmentArrayDynamicIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderInputAttachmentArrayDynamicIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="UniformTexelBufferArrayDynamicIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderUniformTexelBufferArrayDynamicIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="StorageTexelBufferArrayDynamicIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderStorageTexelBufferArrayDynamicIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="UniformBufferArrayNonUniformIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderUniformBufferArrayNonUniformIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="SampledImageArrayNonUniformIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderSampledImageArrayNonUniformIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="StorageBufferArrayNonUniformIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderStorageBufferArrayNonUniformIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="StorageImageArrayNonUniformIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderStorageImageArrayNonUniformIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="InputAttachmentArrayNonUniformIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderInputAttachmentArrayNonUniformIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="UniformTexelBufferArrayNonUniformIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderUniformTexelBufferArrayNonUniformIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="StorageTexelBufferArrayNonUniformIndexing">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderStorageTexelBufferArrayNonUniformIndexing" requires="VK_VERSION_1_2,VK_EXT_descriptor_indexing"/>
</spirvcapability>
<spirvcapability name="Float16">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderFloat16" requires="VK_VERSION_1_2,VK_KHR_shader_float16_int8"/>
<enable extension="VK_AMD_gpu_shader_half_float"/>
</spirvcapability>
<spirvcapability name="Int8">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="shaderInt8" requires="VK_VERSION_1_2,VK_KHR_shader_float16_int8"/>
</spirvcapability>
<spirvcapability name="StorageBuffer8BitAccess">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="storageBuffer8BitAccess" requires="VK_VERSION_1_2,VK_KHR_8bit_storage"/>
</spirvcapability>
<spirvcapability name="UniformAndStorageBuffer8BitAccess">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="uniformAndStorageBuffer8BitAccess" requires="VK_VERSION_1_2,VK_KHR_8bit_storage"/>
</spirvcapability>
<spirvcapability name="StoragePushConstant8">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="storagePushConstant8" requires="VK_VERSION_1_2,VK_KHR_8bit_storage"/>
</spirvcapability>
<spirvcapability name="VulkanMemoryModel">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="vulkanMemoryModel" requires="VK_VERSION_1_2,VK_KHR_vulkan_memory_model"/>
</spirvcapability>
<spirvcapability name="VulkanMemoryModelDeviceScope">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="vulkanMemoryModelDeviceScope" requires="VK_VERSION_1_2,VK_KHR_vulkan_memory_model"/>
</spirvcapability>
<spirvcapability name="DenormPreserve">
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderDenormPreserveFloat16" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderDenormPreserveFloat32" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderDenormPreserveFloat64" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
</spirvcapability>
<spirvcapability name="DenormFlushToZero">
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderDenormFlushToZeroFloat16" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderDenormFlushToZeroFloat32" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderDenormFlushToZeroFloat64" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
</spirvcapability>
<spirvcapability name="SignedZeroInfNanPreserve">
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderSignedZeroInfNanPreserveFloat16" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderSignedZeroInfNanPreserveFloat32" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderSignedZeroInfNanPreserveFloat64" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
</spirvcapability>
<spirvcapability name="RoundingModeRTE">
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderRoundingModeRTEFloat16" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderRoundingModeRTEFloat32" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderRoundingModeRTEFloat64" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
</spirvcapability>
<spirvcapability name="RoundingModeRTZ">
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderRoundingModeRTZFloat16" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderRoundingModeRTZFloat32" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
<enable property="VkPhysicalDeviceVulkan12Properties" member="shaderRoundingModeRTZFloat64" value="VK_TRUE" requires="VK_VERSION_1_2,VK_KHR_shader_float_controls"/>
</spirvcapability>
<spirvcapability name="ComputeDerivativeGroupQuadsNV">
<enable struct="VkPhysicalDeviceComputeShaderDerivativesFeaturesNV" feature="computeDerivativeGroupQuads" requires="VK_NV_compute_shader_derivatives"/>
</spirvcapability>
<spirvcapability name="ComputeDerivativeGroupLinearNV">
<enable struct="VkPhysicalDeviceComputeShaderDerivativesFeaturesNV" feature="computeDerivativeGroupLinear" requires="VK_NV_compute_shader_derivatives"/>
</spirvcapability>
<spirvcapability name="FragmentBarycentricNV">
<enable struct="VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV" feature="fragmentShaderBarycentric" requires="VK_NV_fragment_shader_barycentric"/>
</spirvcapability>
<spirvcapability name="ImageFootprintNV">
<enable struct="VkPhysicalDeviceShaderImageFootprintFeaturesNV" feature="imageFootprint" requires="VK_NV_shader_image_footprint"/>
</spirvcapability>
<spirvcapability name="ShadingRateNV">
<enable struct="VkPhysicalDeviceShadingRateImageFeaturesNV" feature="shadingRateImage" requires="VK_NV_shading_rate_image"/>
</spirvcapability>
<spirvcapability name="MeshShadingNV">
<enable extension="VK_NV_mesh_shader"/>
</spirvcapability>
<spirvcapability name="RayTracingKHR">
<enable struct="VkPhysicalDeviceRayTracingPipelineFeaturesKHR" feature="rayTracingPipeline" requires="VK_KHR_ray_tracing_pipeline"/>
</spirvcapability>
<spirvcapability name="RayQueryKHR">
<enable struct="VkPhysicalDeviceRayQueryFeaturesKHR" feature="rayQuery" requires="VK_KHR_ray_query"/>
</spirvcapability>
<spirvcapability name="RayTraversalPrimitiveCullingKHR">
<enable struct="VkPhysicalDeviceRayTracingPipelineFeaturesKHR" feature="rayTraversalPrimitiveCulling" requires="VK_KHR_ray_tracing_pipeline"/>
</spirvcapability>
<spirvcapability name="RayTracingNV">
<enable extension="VK_NV_ray_tracing"/>
</spirvcapability>
<spirvcapability name="TransformFeedback">
<enable struct="VkPhysicalDeviceTransformFeedbackFeaturesEXT" feature="transformFeedback" requires="VK_EXT_transform_feedback"/>
</spirvcapability>
<spirvcapability name="GeometryStreams">
<enable struct="VkPhysicalDeviceTransformFeedbackFeaturesEXT" feature="geometryStreams" requires="VK_EXT_transform_feedback"/>
</spirvcapability>
<spirvcapability name="FragmentDensityEXT">
<enable struct="VkPhysicalDeviceFragmentDensityMapFeaturesEXT" feature="fragmentDensityMap" requires="VK_EXT_fragment_density_map"/>
</spirvcapability>
<spirvcapability name="PhysicalStorageBufferAddresses">
<enable struct="VkPhysicalDeviceVulkan12Features" feature="bufferDeviceAddress" requires="VK_VERSION_1_2,VK_KHR_buffer_device_address"/>
<enable struct="VkPhysicalDeviceBufferDeviceAddressFeaturesEXT" feature="bufferDeviceAddress" requires="VK_EXT_buffer_device_address" alias="bufferDeviceAddressEXT"/>
</spirvcapability>
<spirvcapability name="CooperativeMatrixNV">
<enable struct="VkPhysicalDeviceCooperativeMatrixFeaturesNV" feature="cooperativeMatrix" requires="VK_NV_cooperative_matrix"/>
</spirvcapability>
<spirvcapability name="IntegerFunctions2INTEL">
<enable struct="VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL" feature="shaderIntegerFunctions2" requires="VK_INTEL_shader_integer_functions2"/>
</spirvcapability>
<spirvcapability name="ShaderSMBuiltinsNV">
<enable struct="VkPhysicalDeviceShaderSMBuiltinsFeaturesNV" feature="shaderSMBuiltins" requires="VK_NV_shader_sm_builtins"/>
</spirvcapability>
<spirvcapability name="FragmentShaderSampleInterlockEXT">
<enable struct="VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT" feature="fragmentShaderSampleInterlock" requires="VK_EXT_fragment_shader_interlock"/>
</spirvcapability>
<spirvcapability name="FragmentShaderPixelInterlockEXT">
<enable struct="VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT" feature="fragmentShaderPixelInterlock" requires="VK_EXT_fragment_shader_interlock"/>
</spirvcapability>
<spirvcapability name="FragmentShaderShadingRateInterlockEXT">
<enable struct="VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT" feature="fragmentShaderShadingRateInterlock" requires="VK_EXT_fragment_shader_interlock"/>
<enable struct="VkPhysicalDeviceShadingRateImageFeaturesNV" feature="shadingRateImage" requires="VK_NV_shading_rate_image"/>
</spirvcapability>
<spirvcapability name="DemoteToHelperInvocationEXT">
<enable struct="VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT" feature="shaderDemoteToHelperInvocation" requires="VK_EXT_shader_demote_to_helper_invocation"/>
</spirvcapability>
<spirvcapability name="FragmentShadingRateKHR">
<enable struct="VkPhysicalDeviceFragmentShadingRateFeaturesKHR" feature="pipelineFragmentShadingRate" requires="VK_KHR_fragment_shading_rate"/>
<enable struct="VkPhysicalDeviceFragmentShadingRateFeaturesKHR" feature="primitiveFragmentShadingRate" requires="VK_KHR_fragment_shading_rate"/>
<enable struct="VkPhysicalDeviceFragmentShadingRateFeaturesKHR" feature="attachmentFragmentShadingRate" requires="VK_KHR_fragment_shading_rate"/>
</spirvcapability>
<spirvcapability name="WorkgroupMemoryExplicitLayoutKHR">
<enable struct="VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR" feature="workgroupMemoryExplicitLayout" requires="VK_KHR_workgroup_memory_explicit_layout"/>
</spirvcapability>
<spirvcapability name="WorkgroupMemoryExplicitLayout8BitAccessKHR">
<enable struct="VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR" feature="workgroupMemoryExplicitLayout8BitAccess" requires="VK_KHR_workgroup_memory_explicit_layout"/>
</spirvcapability>
<spirvcapability name="WorkgroupMemoryExplicitLayout16BitAccessKHR">
<enable struct="VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR" feature="workgroupMemoryExplicitLayout16BitAccess" requires="VK_KHR_workgroup_memory_explicit_layout"/>
</spirvcapability>
</spirvcapabilities>
</registry>
|
0 | repos/zig_vulkan/deps | repos/zig_vulkan/deps/ztracy/README.md | # ztracy v0.9.0 - performance markers for Tracy 0.9
Initial Zig bindings created by [Martin Wickham](https://github.com/SpexGuy/Zig-Tracy)
## Getting started
Copy `ztracy` folder to a `libs` subdirectory of the root of your project.
Then in your `build.zig` add:
```zig
const std = @import("std");
const ztracy = @import("libs/ztracy/build.zig");
pub fn build(b: *std.Build) void {
...
const optimize = b.standardOptimizeOption(.{});
const target = b.standardTargetOptions(.{});
const ztracy_pkg = ztracy.package(b, target, optimize, .{
.options = .{ .enable_ztracy = true },
});
ztracy_pkg.link(exe);
}
```
Now in your code you may import and use `ztracy`. To build your project with Tracy enabled run:
`zig build -Dztracy-enable=true`
```zig
const ztracy = @import("ztracy");
pub fn main() !void {
{
const tracy_zone = ztracy.ZoneNC(@src(), "Compute Magic", 0x00_ff_00_00);
defer tracy_zone.End();
...
}
}
```
## Async "Fibers" support
Tracy has support for marking fibers (also called green threads,
coroutines, and other forms of cooperative multitasking). This support requires
an additional option passed through when compiling the Tracy library, so:
```zig
...
const optimize = b.standardOptimizeOption(.{});
const target = b.standardTargetOptions(.{});
const ztracy_pkg = ztracy.package(b, target, optimize, .{
.options = .{ .enable_ztracy = true, .enable_fibers = true },
});
ztracy_pkg.link(exe);
```
|
0 | repos/zig_vulkan/deps | repos/zig_vulkan/deps/ztracy/build.zig | const std = @import("std");
pub const Options = struct {
enable_ztracy: bool = false,
enable_fibers: bool = false,
};
pub const Package = struct {
options: Options,
ztracy: *std.Build.Module,
ztracy_options: *std.Build.Module,
ztracy_c_cpp: *std.Build.CompileStep,
pub fn link(pkg: Package, exe: *std.Build.CompileStep) void {
exe.addModule("ztracy", pkg.ztracy);
exe.addModule("ztracy_options", pkg.ztracy_options);
if (pkg.options.enable_ztracy) {
exe.addIncludePath(thisDir() ++ "/libs/tracy/tracy");
exe.linkLibrary(pkg.ztracy_c_cpp);
}
}
};
pub fn package(
b: *std.Build,
target: std.zig.CrossTarget,
optimize: std.builtin.Mode,
args: struct {
options: Options = .{},
},
) Package {
const step = b.addOptions();
step.addOption(bool, "enable_ztracy", args.options.enable_ztracy);
const ztracy_options = step.createModule();
const ztracy = b.createModule(.{
.source_file = .{ .path = thisDir() ++ "/src/ztracy.zig" },
.dependencies = &.{
.{ .name = "ztracy_options", .module = ztracy_options },
},
});
const ztracy_c_cpp = if (args.options.enable_ztracy) ztracy_c_cpp: {
const enable_fibers = if (args.options.enable_fibers) "-DTRACY_FIBERS" else "";
const ztracy_c_cpp = b.addStaticLibrary(.{
.name = "ztracy",
.target = target,
.optimize = optimize,
});
ztracy_c_cpp.addIncludePath(thisDir() ++ "/libs/tracy/tracy");
ztracy_c_cpp.addCSourceFile(thisDir() ++ "/libs/tracy/TracyClient.cpp", &.{
"-DTRACY_ENABLE",
enable_fibers,
// MinGW doesn't have all the newfangled windows features,
// so we need to pretend to have an older windows version.
"-D_WIN32_WINNT=0x601",
"-fno-sanitize=undefined",
});
ztracy_c_cpp.linkLibC();
ztracy_c_cpp.linkLibCpp();
switch (target.getOs().tag) {
.windows => {
ztracy_c_cpp.linkSystemLibraryName("ws2_32");
ztracy_c_cpp.linkSystemLibraryName("dbghelp");
},
.macos => {
ztracy_c_cpp.addFrameworkPath(
thisDir() ++ "/../system-sdk/macos12/System/Library/Frameworks",
);
},
else => {},
}
break :ztracy_c_cpp ztracy_c_cpp;
} else undefined;
return .{
.options = args.options,
.ztracy = ztracy,
.ztracy_options = ztracy_options,
.ztracy_c_cpp = ztracy_c_cpp,
};
}
pub fn build(_: *std.Build) void {}
inline fn thisDir() []const u8 {
return comptime std.fs.path.dirname(@src().file) orelse ".";
}
|
0 | repos/zig_vulkan/deps/ztracy | repos/zig_vulkan/deps/ztracy/src/ztracy.zig | pub const version = @import("std").SemanticVersion{ .major = 0, .minor = 9, .patch = 0 };
const std = @import("std");
const builtin = @import("builtin");
const Src = std.builtin.SourceLocation;
// check for a decl named tracy_enabled in root or build_options
pub const enabled = blk: {
var build_enable: ?bool = null;
if (!builtin.is_test) {
// Don't try to include build_options in tests.
// Otherwise `zig test` doesn't work.
const options = @import("ztracy_options");
if (@hasDecl(options, "enable_ztracy")) {
build_enable = options.enable_ztracy;
}
}
break :blk build_enable orelse false;
};
const debug_verify_stack_order = false;
pub usingnamespace if (enabled) tracy_full else tracy_stub;
const tracy_stub = struct {
pub const ZoneCtx = struct {
pub inline fn Text(self: ZoneCtx, text: []const u8) void {
_ = self;
_ = text;
}
pub inline fn Name(self: ZoneCtx, name: []const u8) void {
_ = self;
_ = name;
}
pub inline fn Value(self: ZoneCtx, value: u64) void {
_ = self;
_ = value;
}
pub inline fn End(self: ZoneCtx) void {
_ = self;
}
};
pub inline fn SetThreadName(name: [*:0]const u8) void {
_ = name;
}
pub inline fn Zone(comptime src: Src) ZoneCtx {
_ = src;
return .{};
}
pub inline fn ZoneN(comptime src: Src, name: [*:0]const u8) ZoneCtx {
_ = src;
_ = name;
return .{};
}
pub inline fn ZoneC(comptime src: Src, color: u32) ZoneCtx {
_ = src;
_ = color;
return .{};
}
pub inline fn ZoneNC(comptime src: Src, name: [*:0]const u8, color: u32) ZoneCtx {
_ = src;
_ = name;
_ = color;
return .{};
}
pub inline fn ZoneS(comptime src: Src, depth: i32) ZoneCtx {
_ = src;
_ = depth;
return .{};
}
pub inline fn ZoneNS(comptime src: Src, name: [*:0]const u8, depth: i32) ZoneCtx {
_ = src;
_ = name;
_ = depth;
return .{};
}
pub inline fn ZoneCS(comptime src: Src, color: u32, depth: i32) ZoneCtx {
_ = src;
_ = color;
_ = depth;
return .{};
}
pub inline fn ZoneNCS(comptime src: Src, name: [*:0]const u8, color: u32, depth: i32) ZoneCtx {
_ = src;
_ = name;
_ = color;
_ = depth;
return .{};
}
pub inline fn Alloc(ptr: ?*const anyopaque, size: usize) void {
_ = ptr;
_ = size;
}
pub inline fn Free(ptr: ?*const anyopaque) void {
_ = ptr;
}
pub inline fn SecureAlloc(ptr: ?*const anyopaque, size: usize) void {
_ = ptr;
_ = size;
}
pub inline fn SecureFree(ptr: ?*const anyopaque) void {
_ = ptr;
}
pub inline fn AllocS(ptr: ?*const anyopaque, size: usize, depth: c_int) void {
_ = ptr;
_ = size;
_ = depth;
}
pub inline fn FreeS(ptr: ?*const anyopaque, depth: c_int) void {
_ = ptr;
_ = depth;
}
pub inline fn SecureAllocS(ptr: ?*const anyopaque, size: usize, depth: c_int) void {
_ = ptr;
_ = size;
_ = depth;
}
pub inline fn SecureFreeS(ptr: ?*const anyopaque, depth: c_int) void {
_ = ptr;
_ = depth;
}
pub inline fn AllocN(ptr: ?*const anyopaque, size: usize, name: [*:0]const u8) void {
_ = ptr;
_ = size;
_ = name;
}
pub inline fn FreeN(ptr: ?*const anyopaque, name: [*:0]const u8) void {
_ = ptr;
_ = name;
}
pub inline fn SecureAllocN(ptr: ?*const anyopaque, size: usize, name: [*:0]const u8) void {
_ = ptr;
_ = size;
_ = name;
}
pub inline fn SecureFreeN(ptr: ?*const anyopaque, name: [*:0]const u8) void {
_ = ptr;
_ = name;
}
pub inline fn AllocNS(ptr: ?*const anyopaque, size: usize, depth: c_int, name: [*:0]const u8) void {
_ = ptr;
_ = size;
_ = depth;
_ = name;
}
pub inline fn FreeNS(ptr: ?*const anyopaque, depth: c_int, name: [*:0]const u8) void {
_ = ptr;
_ = depth;
_ = name;
}
pub inline fn SecureAllocNS(ptr: ?*const anyopaque, size: usize, depth: c_int, name: [*:0]const u8) void {
_ = ptr;
_ = size;
_ = depth;
_ = name;
}
pub inline fn SecureFreeNS(ptr: ?*const anyopaque, depth: c_int, name: [*:0]const u8) void {
_ = ptr;
_ = depth;
_ = name;
}
pub inline fn Message(text: []const u8) void {
_ = text;
}
pub inline fn MessageL(text: [*:0]const u8) void {
_ = text;
}
pub inline fn MessageC(text: []const u8, color: u32) void {
_ = text;
_ = color;
}
pub inline fn MessageLC(text: [*:0]const u8, color: u32) void {
_ = text;
_ = color;
}
pub inline fn MessageS(text: []const u8, depth: c_int) void {
_ = text;
_ = depth;
}
pub inline fn MessageLS(text: [*:0]const u8, depth: c_int) void {
_ = text;
_ = depth;
}
pub inline fn MessageCS(text: []const u8, color: u32, depth: c_int) void {
_ = text;
_ = color;
_ = depth;
}
pub inline fn MessageLCS(text: [*:0]const u8, color: u32, depth: c_int) void {
_ = text;
_ = color;
_ = depth;
}
pub inline fn FrameMark() void {}
pub inline fn FrameMarkNamed(name: [*:0]const u8) void {
_ = name;
}
pub inline fn FrameMarkStart(name: [*:0]const u8) void {
_ = name;
}
pub inline fn FrameMarkEnd(name: [*:0]const u8) void {
_ = name;
}
pub inline fn FrameImage(image: ?*const anyopaque, width: u16, height: u16, offset: u8, flip: c_int) void {
_ = image;
_ = width;
_ = height;
_ = offset;
_ = flip;
}
pub inline fn FiberEnter(name: [*:0]const u8) void {
_ = name;
}
pub inline fn FiberLeave() void {}
pub inline fn PlotF(name: [*:0]const u8, val: f64) void {
_ = name;
_ = val;
}
pub inline fn PlotU(name: [*:0]const u8, val: u64) void {
_ = name;
_ = val;
}
pub inline fn PlotI(name: [*:0]const u8, val: i64) void {
_ = name;
_ = val;
}
pub inline fn AppInfo(text: []const u8) void {
_ = text;
}
};
const tracy_full = struct {
const c = @cImport({
//@cDefine("TRACY_CALLSTACK", "8"); Uncomment to enable callstacks. "8" is max depth (can be changed).
@cDefine("TRACY_ENABLE", "");
@cInclude("TracyC.h");
});
const has_callstack_support = @hasDecl(c, "TRACY_HAS_CALLSTACK") and @hasDecl(c, "TRACY_CALLSTACK");
const callstack_depth: c_int = if (has_callstack_support) c.TRACY_CALLSTACK else 0;
threadlocal var stack_depth: if (debug_verify_stack_order) usize else u0 = 0;
pub const ZoneCtx = struct {
_zone: c.___tracy_c_zone_context,
_token: if (debug_verify_stack_order) usize else void,
pub inline fn Text(self: ZoneCtx, text: []const u8) void {
if (debug_verify_stack_order) {
if (stack_depth != self._token) {
std.debug.panic(
"Error: expected Value() at stack depth {} but was {}\n",
.{ self._token, stack_depth },
);
}
}
c.___tracy_emit_zone_text(self._zone, text.ptr, text.len);
}
pub inline fn Name(self: ZoneCtx, name: []const u8) void {
if (debug_verify_stack_order) {
if (stack_depth != self._token) {
std.debug.panic(
"Error: expected Value() at stack depth {} but was {}\n",
.{ self._token, stack_depth },
);
}
}
c.___tracy_emit_zone_name(self._zone, name.ptr, name.len);
}
pub inline fn Value(self: ZoneCtx, val: u64) void {
if (debug_verify_stack_order) {
if (stack_depth != self._token) {
std.debug.panic(
"Error: expected Value() at stack depth {} but was {}\n",
.{ self._token, stack_depth },
);
}
}
c.___tracy_emit_zone_value(self._zone, val);
}
pub inline fn End(self: ZoneCtx) void {
if (debug_verify_stack_order) {
if (stack_depth != self._token) {
std.debug.panic(
"Error: expected End() at stack depth {} but was {}\n",
.{ self._token, stack_depth },
);
}
stack_depth -= 1;
}
c.___tracy_emit_zone_end(self._zone);
}
};
inline fn initZone(comptime src: Src, name: ?[*:0]const u8, color: u32, depth: c_int) ZoneCtx {
// Tracy uses pointer identity to identify contexts.
// The `src` parameter being comptime ensures that
// each zone gets its own unique global location for this
// struct.
const static = struct {
var loc: c.___tracy_source_location_data = undefined;
};
static.loc = .{
.name = name,
.function = src.fn_name.ptr,
.file = src.file.ptr,
.line = src.line,
.color = color,
};
const zone = if (has_callstack_support)
c.___tracy_emit_zone_begin_callstack(&static.loc, depth, 1)
else
c.___tracy_emit_zone_begin(&static.loc, 1);
if (debug_verify_stack_order) {
stack_depth += 1;
return ZoneCtx{ ._zone = zone, ._token = stack_depth };
} else {
return ZoneCtx{ ._zone = zone, ._token = {} };
}
}
pub inline fn SetThreadName(name: [*:0]const u8) void {
c.___tracy_set_thread_name(name);
}
pub inline fn Zone(comptime src: Src) ZoneCtx {
return initZone(src, null, 0, callstack_depth);
}
pub inline fn ZoneN(comptime src: Src, name: [*:0]const u8) ZoneCtx {
return initZone(src, name, 0, callstack_depth);
}
pub inline fn ZoneC(comptime src: Src, color: u32) ZoneCtx {
return initZone(src, null, color, callstack_depth);
}
pub inline fn ZoneNC(comptime src: Src, name: [*:0]const u8, color: u32) ZoneCtx {
return initZone(src, name, color, callstack_depth);
}
pub inline fn ZoneS(comptime src: Src, depth: i32) ZoneCtx {
return initZone(src, null, 0, depth);
}
pub inline fn ZoneNS(comptime src: Src, name: [*:0]const u8, depth: i32) ZoneCtx {
return initZone(src, name, 0, depth);
}
pub inline fn ZoneCS(comptime src: Src, color: u32, depth: i32) ZoneCtx {
return initZone(src, null, color, depth);
}
pub inline fn ZoneNCS(comptime src: Src, name: [*:0]const u8, color: u32, depth: i32) ZoneCtx {
return initZone(src, name, color, depth);
}
pub inline fn Alloc(ptr: ?*const anyopaque, size: usize) void {
if (has_callstack_support) {
c.___tracy_emit_memory_alloc_callstack(ptr, size, callstack_depth, 0);
} else {
c.___tracy_emit_memory_alloc(ptr, size, 0);
}
}
pub inline fn Free(ptr: ?*const anyopaque) void {
if (has_callstack_support) {
c.___tracy_emit_memory_free_callstack(ptr, callstack_depth, 0);
} else {
c.___tracy_emit_memory_free(ptr, 0);
}
}
pub inline fn SecureAlloc(ptr: ?*const anyopaque, size: usize) void {
if (has_callstack_support) {
c.___tracy_emit_memory_alloc_callstack(ptr, size, callstack_depth, 1);
} else {
c.___tracy_emit_memory_alloc(ptr, size, 1);
}
}
pub inline fn SecureFree(ptr: ?*const anyopaque) void {
if (has_callstack_support) {
c.___tracy_emit_memory_free_callstack(ptr, callstack_depth, 1);
} else {
c.___tracy_emit_memory_free(ptr, 1);
}
}
pub inline fn AllocS(ptr: ?*const anyopaque, size: usize, depth: c_int) void {
if (has_callstack_support) {
c.___tracy_emit_memory_alloc_callstack(ptr, size, depth, 0);
} else {
c.___tracy_emit_memory_alloc(ptr, size, 0);
}
}
pub inline fn FreeS(ptr: ?*const anyopaque, depth: c_int) void {
if (has_callstack_support) {
c.___tracy_emit_memory_free_callstack(ptr, depth, 0);
} else {
c.___tracy_emit_memory_free(ptr, 0);
}
}
pub inline fn SecureAllocS(ptr: ?*const anyopaque, size: usize, depth: c_int) void {
if (has_callstack_support) {
c.___tracy_emit_memory_alloc_callstack(ptr, size, depth, 1);
} else {
c.___tracy_emit_memory_alloc(ptr, size, 1);
}
}
pub inline fn SecureFreeS(ptr: ?*const anyopaque, depth: c_int) void {
if (has_callstack_support) {
c.___tracy_emit_memory_free_callstack(ptr, depth, 1);
} else {
c.___tracy_emit_memory_free(ptr, 1);
}
}
pub inline fn AllocN(ptr: ?*const anyopaque, size: usize, name: [*:0]const u8) void {
if (has_callstack_support) {
c.___tracy_emit_memory_alloc_callstack_named(ptr, size, callstack_depth, 0, name);
} else {
c.___tracy_emit_memory_alloc_named(ptr, size, 0, name);
}
}
pub inline fn FreeN(ptr: ?*const anyopaque, name: [*:0]const u8) void {
if (has_callstack_support) {
c.___tracy_emit_memory_free_callstack_named(ptr, callstack_depth, 0, name);
} else {
c.___tracy_emit_memory_free_named(ptr, 0, name);
}
}
pub inline fn SecureAllocN(ptr: ?*const anyopaque, size: usize, name: [*:0]const u8) void {
if (has_callstack_support) {
c.___tracy_emit_memory_alloc_callstack_named(ptr, size, callstack_depth, 1, name);
} else {
c.___tracy_emit_memory_alloc_named(ptr, size, 1, name);
}
}
pub inline fn SecureFreeN(ptr: ?*const anyopaque, name: [*:0]const u8) void {
if (has_callstack_support) {
c.___tracy_emit_memory_free_callstack_named(ptr, callstack_depth, 1, name);
} else {
c.___tracy_emit_memory_free_named(ptr, 1, name);
}
}
pub inline fn AllocNS(ptr: ?*const anyopaque, size: usize, depth: c_int, name: [*:0]const u8) void {
if (has_callstack_support) {
c.___tracy_emit_memory_alloc_callstack_named(ptr, size, depth, 0, name);
} else {
c.___tracy_emit_memory_alloc_named(ptr, size, 0, name);
}
}
pub inline fn FreeNS(ptr: ?*const anyopaque, depth: c_int, name: [*:0]const u8) void {
if (has_callstack_support) {
c.___tracy_emit_memory_free_callstack_named(ptr, depth, 0, name);
} else {
c.___tracy_emit_memory_free_named(ptr, 0, name);
}
}
pub inline fn SecureAllocNS(ptr: ?*const anyopaque, size: usize, depth: c_int, name: [*:0]const u8) void {
if (has_callstack_support) {
c.___tracy_emit_memory_alloc_callstack_named(ptr, size, depth, 1, name);
} else {
c.___tracy_emit_memory_alloc_named(ptr, size, 1, name);
}
}
pub inline fn SecureFreeNS(ptr: ?*const anyopaque, depth: c_int, name: [*:0]const u8) void {
if (has_callstack_support) {
c.___tracy_emit_memory_free_callstack_named(ptr, depth, 1, name);
} else {
c.___tracy_emit_memory_free_named(ptr, 1, name);
}
}
pub inline fn Message(text: []const u8) void {
c.___tracy_emit_message(text.ptr, text.len, callstack_depth);
}
pub inline fn MessageL(text: [*:0]const u8, color: u32) void {
c.___tracy_emit_messageL(text, color, callstack_depth);
}
pub inline fn MessageC(text: []const u8, color: u32) void {
c.___tracy_emit_messageC(text.ptr, text.len, color, callstack_depth);
}
pub inline fn MessageLC(text: [*:0]const u8, color: u32) void {
c.___tracy_emit_messageLC(text, color, callstack_depth);
}
pub inline fn MessageS(text: []const u8, depth: c_int) void {
const inner_depth: c_int = if (has_callstack_support) depth else 0;
c.___tracy_emit_message(text.ptr, text.len, inner_depth);
}
pub inline fn MessageLS(text: [*:0]const u8, depth: c_int) void {
const inner_depth: c_int = if (has_callstack_support) depth else 0;
c.___tracy_emit_messageL(text, inner_depth);
}
pub inline fn MessageCS(text: []const u8, color: u32, depth: c_int) void {
const inner_depth: c_int = if (has_callstack_support) depth else 0;
c.___tracy_emit_messageC(text.ptr, text.len, color, inner_depth);
}
pub inline fn MessageLCS(text: [*:0]const u8, color: u32, depth: c_int) void {
const inner_depth: c_int = if (has_callstack_support) depth else 0;
c.___tracy_emit_messageLC(text, color, inner_depth);
}
pub inline fn FrameMark() void {
c.___tracy_emit_frame_mark(null);
}
pub inline fn FrameMarkNamed(name: [*:0]const u8) void {
c.___tracy_emit_frame_mark(name);
}
pub inline fn FrameMarkStart(name: [*:0]const u8) void {
c.___tracy_emit_frame_mark_start(name);
}
pub inline fn FrameMarkEnd(name: [*:0]const u8) void {
c.___tracy_emit_frame_mark_end(name);
}
pub inline fn FrameImage(image: ?*const anyopaque, width: u16, height: u16, offset: u8, flip: c_int) void {
c.___tracy_emit_frame_image(image, width, height, offset, flip);
}
pub inline fn FiberEnter(name: [*:0]const u8) void {
c.___tracy_fiber_enter(name);
}
pub inline fn FiberLeave() void {
c.___tracy_fiber_leave();
}
pub inline fn PlotF(name: [*:0]const u8, val: f64) void {
c.___tracy_emit_plot(name, val);
}
pub inline fn PlotU(name: [*:0]const u8, val: u64) void {
c.___tracy_emit_plot(name, @intToFloat(f64, val));
}
pub inline fn PlotI(name: [*:0]const u8, val: i64) void {
c.___tracy_emit_plot(name, @intToFloat(f64, val));
}
pub inline fn AppInfo(text: []const u8) void {
c.___tracy_emit_message_appinfo(text.ptr, text.len);
}
};
|
0 | repos/zig_vulkan/deps/ztracy/libs | repos/zig_vulkan/deps/ztracy/libs/tracy/TracyClient.cpp | //
// Tracy profiler
// ----------------
//
// For fast integration, compile and
// link with this source file (and none
// other) in your executable (or in the
// main DLL / shared object on multi-DLL
// projects).
//
// Define TRACY_ENABLE to enable profiler.
#include "common/TracySystem.cpp"
#ifdef TRACY_ENABLE
#ifdef _MSC_VER
# pragma warning(push, 0)
#endif
#include "common/tracy_lz4.cpp"
#include "client/TracyProfiler.cpp"
#include "client/TracyCallstack.cpp"
#include "client/TracySysTime.cpp"
#include "client/TracySysTrace.cpp"
#include "common/TracySocket.cpp"
#include "client/tracy_rpmalloc.cpp"
#include "client/TracyDxt1.cpp"
#include "client/TracyAlloc.cpp"
#if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
# include "libbacktrace/alloc.cpp"
# include "libbacktrace/dwarf.cpp"
# include "libbacktrace/fileline.cpp"
# include "libbacktrace/mmapio.cpp"
# include "libbacktrace/posix.cpp"
# include "libbacktrace/sort.cpp"
# include "libbacktrace/state.cpp"
# if TRACY_HAS_CALLSTACK == 4
# include "libbacktrace/macho.cpp"
# else
# include "libbacktrace/elf.cpp"
# endif
# include "common/TracyStackFrames.cpp"
#endif
#ifdef _MSC_VER
# pragma comment(lib, "ws2_32.lib")
# pragma comment(lib, "dbghelp.lib")
# pragma comment(lib, "advapi32.lib")
# pragma comment(lib, "user32.lib")
# pragma warning(pop)
#endif
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/config.h | #include <limits.h>
#if __WORDSIZE == 64
# define BACKTRACE_ELF_SIZE 64
#else
# define BACKTRACE_ELF_SIZE 32
#endif
#define HAVE_DLFCN_H 1
#define HAVE_FCNTL 1
#define HAVE_INTTYPES_H 1
#define HAVE_LSTAT 1
#define HAVE_READLINK 1
#define HAVE_DL_ITERATE_PHDR 1
#define HAVE_ATOMIC_FUNCTIONS 1
#define HAVE_DECL_STRNLEN 1
#ifdef __APPLE__
# define HAVE_MACH_O_DYLD_H 1
#elif defined BSD
# define HAVE_KERN_PROC 1
# define HAVE_KERN_PROC_ARGS 1
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/state.cpp | /* state.c -- Create the backtrace state.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <string.h>
#include <sys/types.h>
#include "backtrace.hpp"
#include "internal.hpp"
namespace tracy
{
/* Create the backtrace state. This will then be passed to all the
other routines. */
struct backtrace_state *
backtrace_create_state (const char *filename, int threaded,
backtrace_error_callback error_callback,
void *data)
{
struct backtrace_state init_state;
struct backtrace_state *state;
#ifndef HAVE_SYNC_FUNCTIONS
if (threaded)
{
error_callback (data, "backtrace library does not support threads", 0);
return NULL;
}
#endif
memset (&init_state, 0, sizeof init_state);
init_state.filename = filename;
init_state.threaded = threaded;
state = ((struct backtrace_state *)
backtrace_alloc (&init_state, sizeof *state, error_callback, data));
if (state == NULL)
return NULL;
*state = init_state;
return state;
}
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/sort.cpp | /* sort.c -- Sort without allocating memory
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <stddef.h>
#include <sys/types.h>
#include "backtrace.hpp"
#include "internal.hpp"
namespace tracy
{
/* The GNU glibc version of qsort allocates memory, which we must not
do if we are invoked by a signal handler. So provide our own
sort. */
static void
swap (char *a, char *b, size_t size)
{
size_t i;
for (i = 0; i < size; i++, a++, b++)
{
char t;
t = *a;
*a = *b;
*b = t;
}
}
void
backtrace_qsort (void *basearg, size_t count, size_t size,
int (*compar) (const void *, const void *))
{
char *base = (char *) basearg;
size_t i;
size_t mid;
tail_recurse:
if (count < 2)
return;
/* The symbol table and DWARF tables, which is all we use this
routine for, tend to be roughly sorted. Pick the middle element
in the array as our pivot point, so that we are more likely to
cut the array in half for each recursion step. */
swap (base, base + (count / 2) * size, size);
mid = 0;
for (i = 1; i < count; i++)
{
if ((*compar) (base, base + i * size) > 0)
{
++mid;
if (i != mid)
swap (base + mid * size, base + i * size, size);
}
}
if (mid > 0)
swap (base, base + mid * size, size);
/* Recurse with the smaller array, loop with the larger one. That
ensures that our maximum stack depth is log count. */
if (2 * mid < count)
{
backtrace_qsort (base, mid, size, compar);
base += (mid + 1) * size;
count -= mid + 1;
goto tail_recurse;
}
else
{
backtrace_qsort (base + (mid + 1) * size, count - (mid + 1),
size, compar);
count = mid;
goto tail_recurse;
}
}
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/internal.hpp | /* internal.h -- Internal header file for stack backtrace library.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#ifndef BACKTRACE_INTERNAL_H
#define BACKTRACE_INTERNAL_H
/* We assume that <sys/types.h> and "backtrace.h" have already been
included. */
#ifndef GCC_VERSION
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif
#if (GCC_VERSION < 2007)
# define __attribute__(x)
#endif
#ifndef ATTRIBUTE_UNUSED
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif
#ifndef ATTRIBUTE_MALLOC
# if (GCC_VERSION >= 2096)
# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
# else
# define ATTRIBUTE_MALLOC
# endif
#endif
#ifndef ATTRIBUTE_FALLTHROUGH
# if (GCC_VERSION >= 7000)
# define ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
# else
# define ATTRIBUTE_FALLTHROUGH
# endif
#endif
#ifndef HAVE_SYNC_FUNCTIONS
/* Define out the sync functions. These should never be called if
they are not available. */
#define __sync_bool_compare_and_swap(A, B, C) (abort(), 1)
#define __sync_lock_test_and_set(A, B) (abort(), 0)
#define __sync_lock_release(A) abort()
#endif /* !defined (HAVE_SYNC_FUNCTIONS) */
#ifdef HAVE_ATOMIC_FUNCTIONS
/* We have the atomic builtin functions. */
#define backtrace_atomic_load_pointer(p) \
__atomic_load_n ((p), __ATOMIC_ACQUIRE)
#define backtrace_atomic_load_int(p) \
__atomic_load_n ((p), __ATOMIC_ACQUIRE)
#define backtrace_atomic_store_pointer(p, v) \
__atomic_store_n ((p), (v), __ATOMIC_RELEASE)
#define backtrace_atomic_store_size_t(p, v) \
__atomic_store_n ((p), (v), __ATOMIC_RELEASE)
#define backtrace_atomic_store_int(p, v) \
__atomic_store_n ((p), (v), __ATOMIC_RELEASE)
#else /* !defined (HAVE_ATOMIC_FUNCTIONS) */
#ifdef HAVE_SYNC_FUNCTIONS
/* We have the sync functions but not the atomic functions. Define
the atomic ones in terms of the sync ones. */
extern void *backtrace_atomic_load_pointer (void *);
extern int backtrace_atomic_load_int (int *);
extern void backtrace_atomic_store_pointer (void *, void *);
extern void backtrace_atomic_store_size_t (size_t *, size_t);
extern void backtrace_atomic_store_int (int *, int);
#else /* !defined (HAVE_SYNC_FUNCTIONS) */
/* We have neither the sync nor the atomic functions. These will
never be called. */
#define backtrace_atomic_load_pointer(p) (abort(), (void *) NULL)
#define backtrace_atomic_load_int(p) (abort(), 0)
#define backtrace_atomic_store_pointer(p, v) abort()
#define backtrace_atomic_store_size_t(p, v) abort()
#define backtrace_atomic_store_int(p, v) abort()
#endif /* !defined (HAVE_SYNC_FUNCTIONS) */
#endif /* !defined (HAVE_ATOMIC_FUNCTIONS) */
namespace tracy
{
/* The type of the function that collects file/line information. This
is like backtrace_pcinfo. */
typedef int (*fileline) (struct backtrace_state *state, uintptr_t pc,
backtrace_full_callback callback,
backtrace_error_callback error_callback, void *data);
/* The type of the function that collects symbol information. This is
like backtrace_syminfo. */
typedef void (*syminfo) (struct backtrace_state *state, uintptr_t pc,
backtrace_syminfo_callback callback,
backtrace_error_callback error_callback, void *data);
/* What the backtrace state pointer points to. */
struct backtrace_state
{
/* The name of the executable. */
const char *filename;
/* Non-zero if threaded. */
int threaded;
/* The master lock for fileline_fn, fileline_data, syminfo_fn,
syminfo_data, fileline_initialization_failed and everything the
data pointers point to. */
void *lock;
/* The function that returns file/line information. */
fileline fileline_fn;
/* The data to pass to FILELINE_FN. */
void *fileline_data;
/* The function that returns symbol information. */
syminfo syminfo_fn;
/* The data to pass to SYMINFO_FN. */
void *syminfo_data;
/* Whether initializing the file/line information failed. */
int fileline_initialization_failed;
/* The lock for the freelist. */
int lock_alloc;
/* The freelist when using mmap. */
struct backtrace_freelist_struct *freelist;
};
/* Open a file for reading. Returns -1 on error. If DOES_NOT_EXIST
is not NULL, *DOES_NOT_EXIST will be set to 0 normally and set to 1
if the file does not exist. If the file does not exist and
DOES_NOT_EXIST is not NULL, the function will return -1 and will
not call ERROR_CALLBACK. On other errors, or if DOES_NOT_EXIST is
NULL, the function will call ERROR_CALLBACK before returning. */
extern int backtrace_open (const char *filename,
backtrace_error_callback error_callback,
void *data,
int *does_not_exist);
/* A view of the contents of a file. This supports mmap when
available. A view will remain in memory even after backtrace_close
is called on the file descriptor from which the view was
obtained. */
struct backtrace_view
{
/* The data that the caller requested. */
const void *data;
/* The base of the view. */
void *base;
/* The total length of the view. */
size_t len;
};
/* Create a view of SIZE bytes from DESCRIPTOR at OFFSET. Store the
result in *VIEW. Returns 1 on success, 0 on error. */
extern int backtrace_get_view (struct backtrace_state *state, int descriptor,
off_t offset, uint64_t size,
backtrace_error_callback error_callback,
void *data, struct backtrace_view *view);
/* Release a view created by backtrace_get_view. */
extern void backtrace_release_view (struct backtrace_state *state,
struct backtrace_view *view,
backtrace_error_callback error_callback,
void *data);
/* Close a file opened by backtrace_open. Returns 1 on success, 0 on
error. */
extern int backtrace_close (int descriptor,
backtrace_error_callback error_callback,
void *data);
/* Sort without using memory. */
extern void backtrace_qsort (void *base, size_t count, size_t size,
int (*compar) (const void *, const void *));
/* Allocate memory. This is like malloc. If ERROR_CALLBACK is NULL,
this does not report an error, it just returns NULL. */
extern void *backtrace_alloc (struct backtrace_state *state, size_t size,
backtrace_error_callback error_callback,
void *data) ATTRIBUTE_MALLOC;
/* Free memory allocated by backtrace_alloc. If ERROR_CALLBACK is
NULL, this does not report an error. */
extern void backtrace_free (struct backtrace_state *state, void *mem,
size_t size,
backtrace_error_callback error_callback,
void *data);
/* A growable vector of some struct. This is used for more efficient
allocation when we don't know the final size of some group of data
that we want to represent as an array. */
struct backtrace_vector
{
/* The base of the vector. */
void *base;
/* The number of bytes in the vector. */
size_t size;
/* The number of bytes available at the current allocation. */
size_t alc;
};
/* Grow VEC by SIZE bytes. Return a pointer to the newly allocated
bytes. Note that this may move the entire vector to a new memory
location. Returns NULL on failure. */
extern void *backtrace_vector_grow (struct backtrace_state *state, size_t size,
backtrace_error_callback error_callback,
void *data,
struct backtrace_vector *vec);
/* Finish the current allocation on VEC. Prepare to start a new
allocation. The finished allocation will never be freed. Returns
a pointer to the base of the finished entries, or NULL on
failure. */
extern void* backtrace_vector_finish (struct backtrace_state *state,
struct backtrace_vector *vec,
backtrace_error_callback error_callback,
void *data);
/* Release any extra space allocated for VEC. This may change
VEC->base. Returns 1 on success, 0 on failure. */
extern int backtrace_vector_release (struct backtrace_state *state,
struct backtrace_vector *vec,
backtrace_error_callback error_callback,
void *data);
/* Free the space managed by VEC. This will reset VEC. */
static inline void
backtrace_vector_free (struct backtrace_state *state,
struct backtrace_vector *vec,
backtrace_error_callback error_callback, void *data)
{
vec->alc += vec->size;
vec->size = 0;
backtrace_vector_release (state, vec, error_callback, data);
}
/* Read initial debug data from a descriptor, and set the
fileline_data, syminfo_fn, and syminfo_data fields of STATE.
Return the fileln_fn field in *FILELN_FN--this is done this way so
that the synchronization code is only implemented once. This is
called after the descriptor has first been opened. It will close
the descriptor if it is no longer needed. Returns 1 on success, 0
on error. There will be multiple implementations of this function,
for different file formats. Each system will compile the
appropriate one. */
extern int backtrace_initialize (struct backtrace_state *state,
const char *filename,
int descriptor,
backtrace_error_callback error_callback,
void *data,
fileline *fileline_fn);
/* An enum for the DWARF sections we care about. */
enum dwarf_section
{
DEBUG_INFO,
DEBUG_LINE,
DEBUG_ABBREV,
DEBUG_RANGES,
DEBUG_STR,
DEBUG_ADDR,
DEBUG_STR_OFFSETS,
DEBUG_LINE_STR,
DEBUG_RNGLISTS,
DEBUG_MAX
};
/* Data for the DWARF sections we care about. */
struct dwarf_sections
{
const unsigned char *data[DEBUG_MAX];
size_t size[DEBUG_MAX];
};
/* DWARF data read from a file, used for .gnu_debugaltlink. */
struct dwarf_data;
/* Add file/line information for a DWARF module. */
extern int backtrace_dwarf_add (struct backtrace_state *state,
uintptr_t base_address,
const struct dwarf_sections *dwarf_sections,
int is_bigendian,
struct dwarf_data *fileline_altlink,
backtrace_error_callback error_callback,
void *data, fileline *fileline_fn,
struct dwarf_data **fileline_entry);
/* A data structure to pass to backtrace_syminfo_to_full. */
struct backtrace_call_full
{
backtrace_full_callback full_callback;
backtrace_error_callback full_error_callback;
void *full_data;
int ret;
};
/* A backtrace_syminfo_callback that can call into a
backtrace_full_callback, used when we have a symbol table but no
debug info. */
extern void backtrace_syminfo_to_full_callback (void *data, uintptr_t pc,
const char *symname,
uintptr_t symval,
uintptr_t symsize);
/* An error callback that corresponds to
backtrace_syminfo_to_full_callback. */
extern void backtrace_syminfo_to_full_error_callback (void *, const char *,
int);
/* A test-only hook for elf_uncompress_zdebug. */
extern int backtrace_uncompress_zdebug (struct backtrace_state *,
const unsigned char *compressed,
size_t compressed_size,
backtrace_error_callback, void *data,
unsigned char **uncompressed,
size_t *uncompressed_size);
/* A test-only hook for elf_uncompress_lzma. */
extern int backtrace_uncompress_lzma (struct backtrace_state *,
const unsigned char *compressed,
size_t compressed_size,
backtrace_error_callback, void *data,
unsigned char **uncompressed,
size_t *uncompressed_size);
}
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/fileline.cpp | /* fileline.c -- Get file and line number information in a backtrace.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#if defined (HAVE_KERN_PROC_ARGS) || defined (HAVE_KERN_PROC)
#include <sys/sysctl.h>
#endif
#ifdef HAVE_MACH_O_DYLD_H
#include <mach-o/dyld.h>
#endif
#include "backtrace.hpp"
#include "internal.hpp"
#ifndef HAVE_GETEXECNAME
#define getexecname() NULL
#endif
namespace tracy
{
#if !defined (HAVE_KERN_PROC_ARGS) && !defined (HAVE_KERN_PROC)
#define sysctl_exec_name1(state, error_callback, data) NULL
#define sysctl_exec_name2(state, error_callback, data) NULL
#else /* defined (HAVE_KERN_PROC_ARGS) || |defined (HAVE_KERN_PROC) */
static char *
sysctl_exec_name (struct backtrace_state *state,
int mib0, int mib1, int mib2, int mib3,
backtrace_error_callback error_callback, void *data)
{
int mib[4];
size_t len;
char *name;
size_t rlen;
mib[0] = mib0;
mib[1] = mib1;
mib[2] = mib2;
mib[3] = mib3;
if (sysctl (mib, 4, NULL, &len, NULL, 0) < 0)
return NULL;
name = (char *) backtrace_alloc (state, len, error_callback, data);
if (name == NULL)
return NULL;
rlen = len;
if (sysctl (mib, 4, name, &rlen, NULL, 0) < 0)
{
backtrace_free (state, name, len, error_callback, data);
return NULL;
}
return name;
}
#ifdef HAVE_KERN_PROC_ARGS
static char *
sysctl_exec_name1 (struct backtrace_state *state,
backtrace_error_callback error_callback, void *data)
{
/* This variant is used on NetBSD. */
return sysctl_exec_name (state, CTL_KERN, KERN_PROC_ARGS, -1,
KERN_PROC_PATHNAME, error_callback, data);
}
#else
#define sysctl_exec_name1(state, error_callback, data) NULL
#endif
#ifdef HAVE_KERN_PROC
static char *
sysctl_exec_name2 (struct backtrace_state *state,
backtrace_error_callback error_callback, void *data)
{
/* This variant is used on FreeBSD. */
return sysctl_exec_name (state, CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1,
error_callback, data);
}
#else
#define sysctl_exec_name2(state, error_callback, data) NULL
#endif
#endif /* defined (HAVE_KERN_PROC_ARGS) || |defined (HAVE_KERN_PROC) */
#ifdef HAVE_MACH_O_DYLD_H
static char *
macho_get_executable_path (struct backtrace_state *state,
backtrace_error_callback error_callback, void *data)
{
uint32_t len;
char *name;
len = 0;
if (_NSGetExecutablePath (NULL, &len) == 0)
return NULL;
name = (char *) backtrace_alloc (state, len, error_callback, data);
if (name == NULL)
return NULL;
if (_NSGetExecutablePath (name, &len) != 0)
{
backtrace_free (state, name, len, error_callback, data);
return NULL;
}
return name;
}
#else /* !defined (HAVE_MACH_O_DYLD_H) */
#define macho_get_executable_path(state, error_callback, data) NULL
#endif /* !defined (HAVE_MACH_O_DYLD_H) */
/* Initialize the fileline information from the executable. Returns 1
on success, 0 on failure. */
static int
fileline_initialize (struct backtrace_state *state,
backtrace_error_callback error_callback, void *data)
{
int failed;
fileline fileline_fn;
int pass;
int called_error_callback;
int descriptor;
const char *filename;
char buf[64];
if (!state->threaded)
failed = state->fileline_initialization_failed;
else
failed = backtrace_atomic_load_int (&state->fileline_initialization_failed);
if (failed)
{
error_callback (data, "failed to read executable information", -1);
return 0;
}
if (!state->threaded)
fileline_fn = state->fileline_fn;
else
fileline_fn = backtrace_atomic_load_pointer (&state->fileline_fn);
if (fileline_fn != NULL)
return 1;
/* We have not initialized the information. Do it now. */
descriptor = -1;
called_error_callback = 0;
for (pass = 0; pass < 8; ++pass)
{
int does_not_exist;
switch (pass)
{
case 0:
filename = state->filename;
break;
case 1:
filename = getexecname ();
break;
case 2:
filename = "/proc/self/exe";
break;
case 3:
filename = "/proc/curproc/file";
break;
case 4:
snprintf (buf, sizeof (buf), "/proc/%ld/object/a.out",
(long) getpid ());
filename = buf;
break;
case 5:
filename = sysctl_exec_name1 (state, error_callback, data);
break;
case 6:
filename = sysctl_exec_name2 (state, error_callback, data);
break;
case 7:
filename = macho_get_executable_path (state, error_callback, data);
break;
default:
abort ();
}
if (filename == NULL)
continue;
descriptor = backtrace_open (filename, error_callback, data,
&does_not_exist);
if (descriptor < 0 && !does_not_exist)
{
called_error_callback = 1;
break;
}
if (descriptor >= 0)
break;
}
if (descriptor < 0)
{
if (!called_error_callback)
{
if (state->filename != NULL)
error_callback (data, state->filename, ENOENT);
else
error_callback (data,
"libbacktrace could not find executable to open",
0);
}
failed = 1;
}
if (!failed)
{
if (!backtrace_initialize (state, filename, descriptor, error_callback,
data, &fileline_fn))
failed = 1;
}
if (failed)
{
if (!state->threaded)
state->fileline_initialization_failed = 1;
else
backtrace_atomic_store_int (&state->fileline_initialization_failed, 1);
return 0;
}
if (!state->threaded)
state->fileline_fn = fileline_fn;
else
{
backtrace_atomic_store_pointer (&state->fileline_fn, fileline_fn);
/* Note that if two threads initialize at once, one of the data
sets may be leaked. */
}
return 1;
}
/* Given a PC, find the file name, line number, and function name. */
int
backtrace_pcinfo (struct backtrace_state *state, uintptr_t pc,
backtrace_full_callback callback,
backtrace_error_callback error_callback, void *data)
{
if (!fileline_initialize (state, error_callback, data))
return 0;
if (state->fileline_initialization_failed)
return 0;
return state->fileline_fn (state, pc, callback, error_callback, data);
}
/* Given a PC, find the symbol for it, and its value. */
int
backtrace_syminfo (struct backtrace_state *state, uintptr_t pc,
backtrace_syminfo_callback callback,
backtrace_error_callback error_callback, void *data)
{
if (!fileline_initialize (state, error_callback, data))
return 0;
if (state->fileline_initialization_failed)
return 0;
state->syminfo_fn (state, pc, callback, error_callback, data);
return 1;
}
/* A backtrace_syminfo_callback that can call into a
backtrace_full_callback, used when we have a symbol table but no
debug info. */
void
backtrace_syminfo_to_full_callback (void *data, uintptr_t pc,
const char *symname,
uintptr_t symval ATTRIBUTE_UNUSED,
uintptr_t symsize ATTRIBUTE_UNUSED)
{
struct backtrace_call_full *bdata = (struct backtrace_call_full *) data;
bdata->ret = bdata->full_callback (bdata->full_data, pc, 0, NULL, 0, symname);
}
/* An error callback that corresponds to
backtrace_syminfo_to_full_callback. */
void
backtrace_syminfo_to_full_error_callback (void *data, const char *msg,
int errnum)
{
struct backtrace_call_full *bdata = (struct backtrace_call_full *) data;
bdata->full_error_callback (bdata->full_data, msg, errnum);
}
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/dwarf.cpp | /* dwarf.c -- Get file/line information from DWARF for backtraces.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "filenames.hpp"
#include "backtrace.hpp"
#include "internal.hpp"
namespace tracy
{
/* DWARF constants. */
enum dwarf_tag {
DW_TAG_entry_point = 0x3,
DW_TAG_compile_unit = 0x11,
DW_TAG_inlined_subroutine = 0x1d,
DW_TAG_subprogram = 0x2e,
DW_TAG_skeleton_unit = 0x4a,
};
enum dwarf_form {
DW_FORM_addr = 0x01,
DW_FORM_block2 = 0x03,
DW_FORM_block4 = 0x04,
DW_FORM_data2 = 0x05,
DW_FORM_data4 = 0x06,
DW_FORM_data8 = 0x07,
DW_FORM_string = 0x08,
DW_FORM_block = 0x09,
DW_FORM_block1 = 0x0a,
DW_FORM_data1 = 0x0b,
DW_FORM_flag = 0x0c,
DW_FORM_sdata = 0x0d,
DW_FORM_strp = 0x0e,
DW_FORM_udata = 0x0f,
DW_FORM_ref_addr = 0x10,
DW_FORM_ref1 = 0x11,
DW_FORM_ref2 = 0x12,
DW_FORM_ref4 = 0x13,
DW_FORM_ref8 = 0x14,
DW_FORM_ref_udata = 0x15,
DW_FORM_indirect = 0x16,
DW_FORM_sec_offset = 0x17,
DW_FORM_exprloc = 0x18,
DW_FORM_flag_present = 0x19,
DW_FORM_ref_sig8 = 0x20,
DW_FORM_strx = 0x1a,
DW_FORM_addrx = 0x1b,
DW_FORM_ref_sup4 = 0x1c,
DW_FORM_strp_sup = 0x1d,
DW_FORM_data16 = 0x1e,
DW_FORM_line_strp = 0x1f,
DW_FORM_implicit_const = 0x21,
DW_FORM_loclistx = 0x22,
DW_FORM_rnglistx = 0x23,
DW_FORM_ref_sup8 = 0x24,
DW_FORM_strx1 = 0x25,
DW_FORM_strx2 = 0x26,
DW_FORM_strx3 = 0x27,
DW_FORM_strx4 = 0x28,
DW_FORM_addrx1 = 0x29,
DW_FORM_addrx2 = 0x2a,
DW_FORM_addrx3 = 0x2b,
DW_FORM_addrx4 = 0x2c,
DW_FORM_GNU_addr_index = 0x1f01,
DW_FORM_GNU_str_index = 0x1f02,
DW_FORM_GNU_ref_alt = 0x1f20,
DW_FORM_GNU_strp_alt = 0x1f21
};
enum dwarf_attribute {
DW_AT_sibling = 0x01,
DW_AT_location = 0x02,
DW_AT_name = 0x03,
DW_AT_ordering = 0x09,
DW_AT_subscr_data = 0x0a,
DW_AT_byte_size = 0x0b,
DW_AT_bit_offset = 0x0c,
DW_AT_bit_size = 0x0d,
DW_AT_element_list = 0x0f,
DW_AT_stmt_list = 0x10,
DW_AT_low_pc = 0x11,
DW_AT_high_pc = 0x12,
DW_AT_language = 0x13,
DW_AT_member = 0x14,
DW_AT_discr = 0x15,
DW_AT_discr_value = 0x16,
DW_AT_visibility = 0x17,
DW_AT_import = 0x18,
DW_AT_string_length = 0x19,
DW_AT_common_reference = 0x1a,
DW_AT_comp_dir = 0x1b,
DW_AT_const_value = 0x1c,
DW_AT_containing_type = 0x1d,
DW_AT_default_value = 0x1e,
DW_AT_inline = 0x20,
DW_AT_is_optional = 0x21,
DW_AT_lower_bound = 0x22,
DW_AT_producer = 0x25,
DW_AT_prototyped = 0x27,
DW_AT_return_addr = 0x2a,
DW_AT_start_scope = 0x2c,
DW_AT_bit_stride = 0x2e,
DW_AT_upper_bound = 0x2f,
DW_AT_abstract_origin = 0x31,
DW_AT_accessibility = 0x32,
DW_AT_address_class = 0x33,
DW_AT_artificial = 0x34,
DW_AT_base_types = 0x35,
DW_AT_calling_convention = 0x36,
DW_AT_count = 0x37,
DW_AT_data_member_location = 0x38,
DW_AT_decl_column = 0x39,
DW_AT_decl_file = 0x3a,
DW_AT_decl_line = 0x3b,
DW_AT_declaration = 0x3c,
DW_AT_discr_list = 0x3d,
DW_AT_encoding = 0x3e,
DW_AT_external = 0x3f,
DW_AT_frame_base = 0x40,
DW_AT_friend = 0x41,
DW_AT_identifier_case = 0x42,
DW_AT_macro_info = 0x43,
DW_AT_namelist_items = 0x44,
DW_AT_priority = 0x45,
DW_AT_segment = 0x46,
DW_AT_specification = 0x47,
DW_AT_static_link = 0x48,
DW_AT_type = 0x49,
DW_AT_use_location = 0x4a,
DW_AT_variable_parameter = 0x4b,
DW_AT_virtuality = 0x4c,
DW_AT_vtable_elem_location = 0x4d,
DW_AT_allocated = 0x4e,
DW_AT_associated = 0x4f,
DW_AT_data_location = 0x50,
DW_AT_byte_stride = 0x51,
DW_AT_entry_pc = 0x52,
DW_AT_use_UTF8 = 0x53,
DW_AT_extension = 0x54,
DW_AT_ranges = 0x55,
DW_AT_trampoline = 0x56,
DW_AT_call_column = 0x57,
DW_AT_call_file = 0x58,
DW_AT_call_line = 0x59,
DW_AT_description = 0x5a,
DW_AT_binary_scale = 0x5b,
DW_AT_decimal_scale = 0x5c,
DW_AT_small = 0x5d,
DW_AT_decimal_sign = 0x5e,
DW_AT_digit_count = 0x5f,
DW_AT_picture_string = 0x60,
DW_AT_mutable = 0x61,
DW_AT_threads_scaled = 0x62,
DW_AT_explicit = 0x63,
DW_AT_object_pointer = 0x64,
DW_AT_endianity = 0x65,
DW_AT_elemental = 0x66,
DW_AT_pure = 0x67,
DW_AT_recursive = 0x68,
DW_AT_signature = 0x69,
DW_AT_main_subprogram = 0x6a,
DW_AT_data_bit_offset = 0x6b,
DW_AT_const_expr = 0x6c,
DW_AT_enum_class = 0x6d,
DW_AT_linkage_name = 0x6e,
DW_AT_string_length_bit_size = 0x6f,
DW_AT_string_length_byte_size = 0x70,
DW_AT_rank = 0x71,
DW_AT_str_offsets_base = 0x72,
DW_AT_addr_base = 0x73,
DW_AT_rnglists_base = 0x74,
DW_AT_dwo_name = 0x76,
DW_AT_reference = 0x77,
DW_AT_rvalue_reference = 0x78,
DW_AT_macros = 0x79,
DW_AT_call_all_calls = 0x7a,
DW_AT_call_all_source_calls = 0x7b,
DW_AT_call_all_tail_calls = 0x7c,
DW_AT_call_return_pc = 0x7d,
DW_AT_call_value = 0x7e,
DW_AT_call_origin = 0x7f,
DW_AT_call_parameter = 0x80,
DW_AT_call_pc = 0x81,
DW_AT_call_tail_call = 0x82,
DW_AT_call_target = 0x83,
DW_AT_call_target_clobbered = 0x84,
DW_AT_call_data_location = 0x85,
DW_AT_call_data_value = 0x86,
DW_AT_noreturn = 0x87,
DW_AT_alignment = 0x88,
DW_AT_export_symbols = 0x89,
DW_AT_deleted = 0x8a,
DW_AT_defaulted = 0x8b,
DW_AT_loclists_base = 0x8c,
DW_AT_lo_user = 0x2000,
DW_AT_hi_user = 0x3fff,
DW_AT_MIPS_fde = 0x2001,
DW_AT_MIPS_loop_begin = 0x2002,
DW_AT_MIPS_tail_loop_begin = 0x2003,
DW_AT_MIPS_epilog_begin = 0x2004,
DW_AT_MIPS_loop_unroll_factor = 0x2005,
DW_AT_MIPS_software_pipeline_depth = 0x2006,
DW_AT_MIPS_linkage_name = 0x2007,
DW_AT_MIPS_stride = 0x2008,
DW_AT_MIPS_abstract_name = 0x2009,
DW_AT_MIPS_clone_origin = 0x200a,
DW_AT_MIPS_has_inlines = 0x200b,
DW_AT_HP_block_index = 0x2000,
DW_AT_HP_unmodifiable = 0x2001,
DW_AT_HP_prologue = 0x2005,
DW_AT_HP_epilogue = 0x2008,
DW_AT_HP_actuals_stmt_list = 0x2010,
DW_AT_HP_proc_per_section = 0x2011,
DW_AT_HP_raw_data_ptr = 0x2012,
DW_AT_HP_pass_by_reference = 0x2013,
DW_AT_HP_opt_level = 0x2014,
DW_AT_HP_prof_version_id = 0x2015,
DW_AT_HP_opt_flags = 0x2016,
DW_AT_HP_cold_region_low_pc = 0x2017,
DW_AT_HP_cold_region_high_pc = 0x2018,
DW_AT_HP_all_variables_modifiable = 0x2019,
DW_AT_HP_linkage_name = 0x201a,
DW_AT_HP_prof_flags = 0x201b,
DW_AT_HP_unit_name = 0x201f,
DW_AT_HP_unit_size = 0x2020,
DW_AT_HP_widened_byte_size = 0x2021,
DW_AT_HP_definition_points = 0x2022,
DW_AT_HP_default_location = 0x2023,
DW_AT_HP_is_result_param = 0x2029,
DW_AT_sf_names = 0x2101,
DW_AT_src_info = 0x2102,
DW_AT_mac_info = 0x2103,
DW_AT_src_coords = 0x2104,
DW_AT_body_begin = 0x2105,
DW_AT_body_end = 0x2106,
DW_AT_GNU_vector = 0x2107,
DW_AT_GNU_guarded_by = 0x2108,
DW_AT_GNU_pt_guarded_by = 0x2109,
DW_AT_GNU_guarded = 0x210a,
DW_AT_GNU_pt_guarded = 0x210b,
DW_AT_GNU_locks_excluded = 0x210c,
DW_AT_GNU_exclusive_locks_required = 0x210d,
DW_AT_GNU_shared_locks_required = 0x210e,
DW_AT_GNU_odr_signature = 0x210f,
DW_AT_GNU_template_name = 0x2110,
DW_AT_GNU_call_site_value = 0x2111,
DW_AT_GNU_call_site_data_value = 0x2112,
DW_AT_GNU_call_site_target = 0x2113,
DW_AT_GNU_call_site_target_clobbered = 0x2114,
DW_AT_GNU_tail_call = 0x2115,
DW_AT_GNU_all_tail_call_sites = 0x2116,
DW_AT_GNU_all_call_sites = 0x2117,
DW_AT_GNU_all_source_call_sites = 0x2118,
DW_AT_GNU_macros = 0x2119,
DW_AT_GNU_deleted = 0x211a,
DW_AT_GNU_dwo_name = 0x2130,
DW_AT_GNU_dwo_id = 0x2131,
DW_AT_GNU_ranges_base = 0x2132,
DW_AT_GNU_addr_base = 0x2133,
DW_AT_GNU_pubnames = 0x2134,
DW_AT_GNU_pubtypes = 0x2135,
DW_AT_GNU_discriminator = 0x2136,
DW_AT_GNU_locviews = 0x2137,
DW_AT_GNU_entry_view = 0x2138,
DW_AT_VMS_rtnbeg_pd_address = 0x2201,
DW_AT_use_GNAT_descriptive_type = 0x2301,
DW_AT_GNAT_descriptive_type = 0x2302,
DW_AT_GNU_numerator = 0x2303,
DW_AT_GNU_denominator = 0x2304,
DW_AT_GNU_bias = 0x2305,
DW_AT_upc_threads_scaled = 0x3210,
DW_AT_PGI_lbase = 0x3a00,
DW_AT_PGI_soffset = 0x3a01,
DW_AT_PGI_lstride = 0x3a02,
DW_AT_APPLE_optimized = 0x3fe1,
DW_AT_APPLE_flags = 0x3fe2,
DW_AT_APPLE_isa = 0x3fe3,
DW_AT_APPLE_block = 0x3fe4,
DW_AT_APPLE_major_runtime_vers = 0x3fe5,
DW_AT_APPLE_runtime_class = 0x3fe6,
DW_AT_APPLE_omit_frame_ptr = 0x3fe7,
DW_AT_APPLE_property_name = 0x3fe8,
DW_AT_APPLE_property_getter = 0x3fe9,
DW_AT_APPLE_property_setter = 0x3fea,
DW_AT_APPLE_property_attribute = 0x3feb,
DW_AT_APPLE_objc_complete_type = 0x3fec,
DW_AT_APPLE_property = 0x3fed
};
enum dwarf_line_number_op {
DW_LNS_extended_op = 0x0,
DW_LNS_copy = 0x1,
DW_LNS_advance_pc = 0x2,
DW_LNS_advance_line = 0x3,
DW_LNS_set_file = 0x4,
DW_LNS_set_column = 0x5,
DW_LNS_negate_stmt = 0x6,
DW_LNS_set_basic_block = 0x7,
DW_LNS_const_add_pc = 0x8,
DW_LNS_fixed_advance_pc = 0x9,
DW_LNS_set_prologue_end = 0xa,
DW_LNS_set_epilogue_begin = 0xb,
DW_LNS_set_isa = 0xc,
};
enum dwarf_extended_line_number_op {
DW_LNE_end_sequence = 0x1,
DW_LNE_set_address = 0x2,
DW_LNE_define_file = 0x3,
DW_LNE_set_discriminator = 0x4,
};
enum dwarf_line_number_content_type {
DW_LNCT_path = 0x1,
DW_LNCT_directory_index = 0x2,
DW_LNCT_timestamp = 0x3,
DW_LNCT_size = 0x4,
DW_LNCT_MD5 = 0x5,
DW_LNCT_lo_user = 0x2000,
DW_LNCT_hi_user = 0x3fff
};
enum dwarf_range_list_entry {
DW_RLE_end_of_list = 0x00,
DW_RLE_base_addressx = 0x01,
DW_RLE_startx_endx = 0x02,
DW_RLE_startx_length = 0x03,
DW_RLE_offset_pair = 0x04,
DW_RLE_base_address = 0x05,
DW_RLE_start_end = 0x06,
DW_RLE_start_length = 0x07
};
enum dwarf_unit_type {
DW_UT_compile = 0x01,
DW_UT_type = 0x02,
DW_UT_partial = 0x03,
DW_UT_skeleton = 0x04,
DW_UT_split_compile = 0x05,
DW_UT_split_type = 0x06,
DW_UT_lo_user = 0x80,
DW_UT_hi_user = 0xff
};
#if !defined(HAVE_DECL_STRNLEN) || !HAVE_DECL_STRNLEN
/* If strnlen is not declared, provide our own version. */
static size_t
xstrnlen (const char *s, size_t maxlen)
{
size_t i;
for (i = 0; i < maxlen; ++i)
if (s[i] == '\0')
break;
return i;
}
#define strnlen xstrnlen
#endif
/* A buffer to read DWARF info. */
struct dwarf_buf
{
/* Buffer name for error messages. */
const char *name;
/* Start of the buffer. */
const unsigned char *start;
/* Next byte to read. */
const unsigned char *buf;
/* The number of bytes remaining. */
size_t left;
/* Whether the data is big-endian. */
int is_bigendian;
/* Error callback routine. */
backtrace_error_callback error_callback;
/* Data for error_callback. */
void *data;
/* Non-zero if we've reported an underflow error. */
int reported_underflow;
};
/* A single attribute in a DWARF abbreviation. */
struct attr
{
/* The attribute name. */
enum dwarf_attribute name;
/* The attribute form. */
enum dwarf_form form;
/* The attribute value, for DW_FORM_implicit_const. */
int64_t val;
};
/* A single DWARF abbreviation. */
struct abbrev
{
/* The abbrev code--the number used to refer to the abbrev. */
uint64_t code;
/* The entry tag. */
enum dwarf_tag tag;
/* Non-zero if this abbrev has child entries. */
int has_children;
/* The number of attributes. */
size_t num_attrs;
/* The attributes. */
struct attr *attrs;
};
/* The DWARF abbreviations for a compilation unit. This structure
only exists while reading the compilation unit. Most DWARF readers
seem to a hash table to map abbrev ID's to abbrev entries.
However, we primarily care about GCC, and GCC simply issues ID's in
numerical order starting at 1. So we simply keep a sorted vector,
and try to just look up the code. */
struct abbrevs
{
/* The number of abbrevs in the vector. */
size_t num_abbrevs;
/* The abbrevs, sorted by the code field. */
struct abbrev *abbrevs;
};
/* The different kinds of attribute values. */
enum attr_val_encoding
{
/* No attribute value. */
ATTR_VAL_NONE,
/* An address. */
ATTR_VAL_ADDRESS,
/* An index into the .debug_addr section, whose value is relative to
* the DW_AT_addr_base attribute of the compilation unit. */
ATTR_VAL_ADDRESS_INDEX,
/* A unsigned integer. */
ATTR_VAL_UINT,
/* A sigd integer. */
ATTR_VAL_SINT,
/* A string. */
ATTR_VAL_STRING,
/* An index into the .debug_str_offsets section. */
ATTR_VAL_STRING_INDEX,
/* An offset to other data in the containing unit. */
ATTR_VAL_REF_UNIT,
/* An offset to other data within the .debug_info section. */
ATTR_VAL_REF_INFO,
/* An offset to other data within the alt .debug_info section. */
ATTR_VAL_REF_ALT_INFO,
/* An offset to data in some other section. */
ATTR_VAL_REF_SECTION,
/* A type signature. */
ATTR_VAL_REF_TYPE,
/* An index into the .debug_rnglists section. */
ATTR_VAL_RNGLISTS_INDEX,
/* A block of data (not represented). */
ATTR_VAL_BLOCK,
/* An expression (not represented). */
ATTR_VAL_EXPR,
};
/* An attribute value. */
struct attr_val
{
/* How the value is stored in the field u. */
enum attr_val_encoding encoding;
union
{
/* ATTR_VAL_ADDRESS*, ATTR_VAL_UINT, ATTR_VAL_REF*. */
uint64_t uint;
/* ATTR_VAL_SINT. */
int64_t sint;
/* ATTR_VAL_STRING. */
const char *string;
/* ATTR_VAL_BLOCK not stored. */
} u;
};
/* The line number program header. */
struct line_header
{
/* The version of the line number information. */
int version;
/* Address size. */
int addrsize;
/* The minimum instruction length. */
unsigned int min_insn_len;
/* The maximum number of ops per instruction. */
unsigned int max_ops_per_insn;
/* The line base for special opcodes. */
int line_base;
/* The line range for special opcodes. */
unsigned int line_range;
/* The opcode base--the first special opcode. */
unsigned int opcode_base;
/* Opcode lengths, indexed by opcode - 1. */
const unsigned char *opcode_lengths;
/* The number of directory entries. */
size_t dirs_count;
/* The directory entries. */
const char **dirs;
/* The number of filenames. */
size_t filenames_count;
/* The filenames. */
const char **filenames;
};
/* A format description from a line header. */
struct line_header_format
{
int lnct; /* LNCT code. */
enum dwarf_form form; /* Form of entry data. */
};
/* Map a single PC value to a file/line. We will keep a vector of
these sorted by PC value. Each file/line will be correct from the
PC up to the PC of the next entry if there is one. We allocate one
extra entry at the end so that we can use bsearch. */
struct line
{
/* PC. */
uintptr_t pc;
/* File name. Many entries in the array are expected to point to
the same file name. */
const char *filename;
/* Line number. */
int lineno;
/* Index of the object in the original array read from the DWARF
section, before it has been sorted. The index makes it possible
to use Quicksort and maintain stability. */
int idx;
};
/* A growable vector of line number information. This is used while
reading the line numbers. */
struct line_vector
{
/* Memory. This is an array of struct line. */
struct backtrace_vector vec;
/* Number of valid mappings. */
size_t count;
};
/* A function described in the debug info. */
struct function
{
/* The name of the function. */
const char *name;
/* If this is an inlined function, the filename of the call
site. */
const char *caller_filename;
/* If this is an inlined function, the line number of the call
site. */
int caller_lineno;
/* Map PC ranges to inlined functions. */
struct function_addrs *function_addrs;
size_t function_addrs_count;
};
/* An address range for a function. This maps a PC value to a
specific function. */
struct function_addrs
{
/* Range is LOW <= PC < HIGH. */
uint64_t low;
uint64_t high;
/* Function for this address range. */
struct function *function;
};
/* A growable vector of function address ranges. */
struct function_vector
{
/* Memory. This is an array of struct function_addrs. */
struct backtrace_vector vec;
/* Number of address ranges present. */
size_t count;
};
/* A DWARF compilation unit. This only holds the information we need
to map a PC to a file and line. */
struct unit
{
/* The first entry for this compilation unit. */
const unsigned char *unit_data;
/* The length of the data for this compilation unit. */
size_t unit_data_len;
/* The offset of UNIT_DATA from the start of the information for
this compilation unit. */
size_t unit_data_offset;
/* Offset of the start of the compilation unit from the start of the
.debug_info section. */
size_t low_offset;
/* Offset of the end of the compilation unit from the start of the
.debug_info section. */
size_t high_offset;
/* DWARF version. */
int version;
/* Whether unit is DWARF64. */
int is_dwarf64;
/* Address size. */
int addrsize;
/* Offset into line number information. */
off_t lineoff;
/* Offset of compilation unit in .debug_str_offsets. */
uint64_t str_offsets_base;
/* Offset of compilation unit in .debug_addr. */
uint64_t addr_base;
/* Offset of compilation unit in .debug_rnglists. */
uint64_t rnglists_base;
/* Primary source file. */
const char *filename;
/* Compilation command working directory. */
const char *comp_dir;
/* Absolute file name, only set if needed. */
const char *abs_filename;
/* The abbreviations for this unit. */
struct abbrevs abbrevs;
/* The fields above this point are read in during initialization and
may be accessed freely. The fields below this point are read in
as needed, and therefore require care, as different threads may
try to initialize them simultaneously. */
/* PC to line number mapping. This is NULL if the values have not
been read. This is (struct line *) -1 if there was an error
reading the values. */
struct line *lines;
/* Number of entries in lines. */
size_t lines_count;
/* PC ranges to function. */
struct function_addrs *function_addrs;
size_t function_addrs_count;
};
/* An address range for a compilation unit. This maps a PC value to a
specific compilation unit. Note that we invert the representation
in DWARF: instead of listing the units and attaching a list of
ranges, we list the ranges and have each one point to the unit.
This lets us do a binary search to find the unit. */
struct unit_addrs
{
/* Range is LOW <= PC < HIGH. */
uint64_t low;
uint64_t high;
/* Compilation unit for this address range. */
struct unit *u;
};
/* A growable vector of compilation unit address ranges. */
struct unit_addrs_vector
{
/* Memory. This is an array of struct unit_addrs. */
struct backtrace_vector vec;
/* Number of address ranges present. */
size_t count;
};
/* A growable vector of compilation unit pointer. */
struct unit_vector
{
struct backtrace_vector vec;
size_t count;
};
/* The information we need to map a PC to a file and line. */
struct dwarf_data
{
/* The data for the next file we know about. */
struct dwarf_data *next;
/* The data for .gnu_debugaltlink. */
struct dwarf_data *altlink;
/* The base address for this file. */
uintptr_t base_address;
/* A sorted list of address ranges. */
struct unit_addrs *addrs;
/* Number of address ranges in list. */
size_t addrs_count;
/* A sorted list of units. */
struct unit **units;
/* Number of units in the list. */
size_t units_count;
/* The unparsed DWARF debug data. */
struct dwarf_sections dwarf_sections;
/* Whether the data is big-endian or not. */
int is_bigendian;
/* A vector used for function addresses. We keep this here so that
we can grow the vector as we read more functions. */
struct function_vector fvec;
};
/* Report an error for a DWARF buffer. */
static void
dwarf_buf_error (struct dwarf_buf *buf, const char *msg, int errnum)
{
char b[200];
snprintf (b, sizeof b, "%s in %s at %d",
msg, buf->name, (int) (buf->buf - buf->start));
buf->error_callback (buf->data, b, errnum);
}
/* Require at least COUNT bytes in BUF. Return 1 if all is well, 0 on
error. */
static int
require (struct dwarf_buf *buf, size_t count)
{
if (buf->left >= count)
return 1;
if (!buf->reported_underflow)
{
dwarf_buf_error (buf, "DWARF underflow", 0);
buf->reported_underflow = 1;
}
return 0;
}
/* Advance COUNT bytes in BUF. Return 1 if all is well, 0 on
error. */
static int
advance (struct dwarf_buf *buf, size_t count)
{
if (!require (buf, count))
return 0;
buf->buf += count;
buf->left -= count;
return 1;
}
/* Read one zero-terminated string from BUF and advance past the string. */
static const char *
read_string (struct dwarf_buf *buf)
{
const char *p = (const char *)buf->buf;
size_t len = strnlen (p, buf->left);
/* - If len == left, we ran out of buffer before finding the zero terminator.
Generate an error by advancing len + 1.
- If len < left, advance by len + 1 to skip past the zero terminator. */
size_t count = len + 1;
if (!advance (buf, count))
return NULL;
return p;
}
/* Read one byte from BUF and advance 1 byte. */
static unsigned char
read_byte (struct dwarf_buf *buf)
{
const unsigned char *p = buf->buf;
if (!advance (buf, 1))
return 0;
return p[0];
}
/* Read a signed char from BUF and advance 1 byte. */
static signed char
read_sbyte (struct dwarf_buf *buf)
{
const unsigned char *p = buf->buf;
if (!advance (buf, 1))
return 0;
return (*p ^ 0x80) - 0x80;
}
/* Read a uint16 from BUF and advance 2 bytes. */
static uint16_t
read_uint16 (struct dwarf_buf *buf)
{
const unsigned char *p = buf->buf;
if (!advance (buf, 2))
return 0;
if (buf->is_bigendian)
return ((uint16_t) p[0] << 8) | (uint16_t) p[1];
else
return ((uint16_t) p[1] << 8) | (uint16_t) p[0];
}
/* Read a 24 bit value from BUF and advance 3 bytes. */
static uint32_t
read_uint24 (struct dwarf_buf *buf)
{
const unsigned char *p = buf->buf;
if (!advance (buf, 3))
return 0;
if (buf->is_bigendian)
return (((uint32_t) p[0] << 16) | ((uint32_t) p[1] << 8)
| (uint32_t) p[2]);
else
return (((uint32_t) p[2] << 16) | ((uint32_t) p[1] << 8)
| (uint32_t) p[0]);
}
/* Read a uint32 from BUF and advance 4 bytes. */
static uint32_t
read_uint32 (struct dwarf_buf *buf)
{
const unsigned char *p = buf->buf;
if (!advance (buf, 4))
return 0;
if (buf->is_bigendian)
return (((uint32_t) p[0] << 24) | ((uint32_t) p[1] << 16)
| ((uint32_t) p[2] << 8) | (uint32_t) p[3]);
else
return (((uint32_t) p[3] << 24) | ((uint32_t) p[2] << 16)
| ((uint32_t) p[1] << 8) | (uint32_t) p[0]);
}
/* Read a uint64 from BUF and advance 8 bytes. */
static uint64_t
read_uint64 (struct dwarf_buf *buf)
{
const unsigned char *p = buf->buf;
if (!advance (buf, 8))
return 0;
if (buf->is_bigendian)
return (((uint64_t) p[0] << 56) | ((uint64_t) p[1] << 48)
| ((uint64_t) p[2] << 40) | ((uint64_t) p[3] << 32)
| ((uint64_t) p[4] << 24) | ((uint64_t) p[5] << 16)
| ((uint64_t) p[6] << 8) | (uint64_t) p[7]);
else
return (((uint64_t) p[7] << 56) | ((uint64_t) p[6] << 48)
| ((uint64_t) p[5] << 40) | ((uint64_t) p[4] << 32)
| ((uint64_t) p[3] << 24) | ((uint64_t) p[2] << 16)
| ((uint64_t) p[1] << 8) | (uint64_t) p[0]);
}
/* Read an offset from BUF and advance the appropriate number of
bytes. */
static uint64_t
read_offset (struct dwarf_buf *buf, int is_dwarf64)
{
if (is_dwarf64)
return read_uint64 (buf);
else
return read_uint32 (buf);
}
/* Read an address from BUF and advance the appropriate number of
bytes. */
static uint64_t
read_address (struct dwarf_buf *buf, int addrsize)
{
switch (addrsize)
{
case 1:
return read_byte (buf);
case 2:
return read_uint16 (buf);
case 4:
return read_uint32 (buf);
case 8:
return read_uint64 (buf);
default:
dwarf_buf_error (buf, "unrecognized address size", 0);
return 0;
}
}
/* Return whether a value is the highest possible address, given the
address size. */
static int
is_highest_address (uint64_t address, int addrsize)
{
switch (addrsize)
{
case 1:
return address == (unsigned char) -1;
case 2:
return address == (uint16_t) -1;
case 4:
return address == (uint32_t) -1;
case 8:
return address == (uint64_t) -1;
default:
return 0;
}
}
/* Read an unsigned LEB128 number. */
static uint64_t
read_uleb128 (struct dwarf_buf *buf)
{
uint64_t ret;
unsigned int shift;
int overflow;
unsigned char b;
ret = 0;
shift = 0;
overflow = 0;
do
{
const unsigned char *p;
p = buf->buf;
if (!advance (buf, 1))
return 0;
b = *p;
if (shift < 64)
ret |= ((uint64_t) (b & 0x7f)) << shift;
else if (!overflow)
{
dwarf_buf_error (buf, "LEB128 overflows uint64_t", 0);
overflow = 1;
}
shift += 7;
}
while ((b & 0x80) != 0);
return ret;
}
/* Read a signed LEB128 number. */
static int64_t
read_sleb128 (struct dwarf_buf *buf)
{
uint64_t val;
unsigned int shift;
int overflow;
unsigned char b;
val = 0;
shift = 0;
overflow = 0;
do
{
const unsigned char *p;
p = buf->buf;
if (!advance (buf, 1))
return 0;
b = *p;
if (shift < 64)
val |= ((uint64_t) (b & 0x7f)) << shift;
else if (!overflow)
{
dwarf_buf_error (buf, "signed LEB128 overflows uint64_t", 0);
overflow = 1;
}
shift += 7;
}
while ((b & 0x80) != 0);
if ((b & 0x40) != 0 && shift < 64)
val |= ((uint64_t) -1) << shift;
return (int64_t) val;
}
/* Return the length of an LEB128 number. */
static size_t
leb128_len (const unsigned char *p)
{
size_t ret;
ret = 1;
while ((*p & 0x80) != 0)
{
++p;
++ret;
}
return ret;
}
/* Read initial_length from BUF and advance the appropriate number of bytes. */
static uint64_t
read_initial_length (struct dwarf_buf *buf, int *is_dwarf64)
{
uint64_t len;
len = read_uint32 (buf);
if (len == 0xffffffff)
{
len = read_uint64 (buf);
*is_dwarf64 = 1;
}
else
*is_dwarf64 = 0;
return len;
}
/* Free an abbreviations structure. */
static void
free_abbrevs (struct backtrace_state *state, struct abbrevs *abbrevs,
backtrace_error_callback error_callback, void *data)
{
size_t i;
for (i = 0; i < abbrevs->num_abbrevs; ++i)
backtrace_free (state, abbrevs->abbrevs[i].attrs,
abbrevs->abbrevs[i].num_attrs * sizeof (struct attr),
error_callback, data);
backtrace_free (state, abbrevs->abbrevs,
abbrevs->num_abbrevs * sizeof (struct abbrev),
error_callback, data);
abbrevs->num_abbrevs = 0;
abbrevs->abbrevs = NULL;
}
/* Read an attribute value. Returns 1 on success, 0 on failure. If
the value can be represented as a uint64_t, sets *VAL and sets
*IS_VALID to 1. We don't try to store the value of other attribute
forms, because we don't care about them. */
static int
read_attribute (enum dwarf_form form, uint64_t implicit_val,
struct dwarf_buf *buf, int is_dwarf64, int version,
int addrsize, const struct dwarf_sections *dwarf_sections,
struct dwarf_data *altlink, struct attr_val *val)
{
/* Avoid warnings about val.u.FIELD may be used uninitialized if
this function is inlined. The warnings aren't valid but can
occur because the different fields are set and used
conditionally. */
memset (val, 0, sizeof *val);
switch (form)
{
case DW_FORM_addr:
val->encoding = ATTR_VAL_ADDRESS;
val->u.uint = read_address (buf, addrsize);
return 1;
case DW_FORM_block2:
val->encoding = ATTR_VAL_BLOCK;
return advance (buf, read_uint16 (buf));
case DW_FORM_block4:
val->encoding = ATTR_VAL_BLOCK;
return advance (buf, read_uint32 (buf));
case DW_FORM_data2:
val->encoding = ATTR_VAL_UINT;
val->u.uint = read_uint16 (buf);
return 1;
case DW_FORM_data4:
val->encoding = ATTR_VAL_UINT;
val->u.uint = read_uint32 (buf);
return 1;
case DW_FORM_data8:
val->encoding = ATTR_VAL_UINT;
val->u.uint = read_uint64 (buf);
return 1;
case DW_FORM_data16:
val->encoding = ATTR_VAL_BLOCK;
return advance (buf, 16);
case DW_FORM_string:
val->encoding = ATTR_VAL_STRING;
val->u.string = read_string (buf);
return val->u.string == NULL ? 0 : 1;
case DW_FORM_block:
val->encoding = ATTR_VAL_BLOCK;
return advance (buf, read_uleb128 (buf));
case DW_FORM_block1:
val->encoding = ATTR_VAL_BLOCK;
return advance (buf, read_byte (buf));
case DW_FORM_data1:
val->encoding = ATTR_VAL_UINT;
val->u.uint = read_byte (buf);
return 1;
case DW_FORM_flag:
val->encoding = ATTR_VAL_UINT;
val->u.uint = read_byte (buf);
return 1;
case DW_FORM_sdata:
val->encoding = ATTR_VAL_SINT;
val->u.sint = read_sleb128 (buf);
return 1;
case DW_FORM_strp:
{
uint64_t offset;
offset = read_offset (buf, is_dwarf64);
if (offset >= dwarf_sections->size[DEBUG_STR])
{
dwarf_buf_error (buf, "DW_FORM_strp out of range", 0);
return 0;
}
val->encoding = ATTR_VAL_STRING;
val->u.string =
(const char *) dwarf_sections->data[DEBUG_STR] + offset;
return 1;
}
case DW_FORM_line_strp:
{
uint64_t offset;
offset = read_offset (buf, is_dwarf64);
if (offset >= dwarf_sections->size[DEBUG_LINE_STR])
{
dwarf_buf_error (buf, "DW_FORM_line_strp out of range", 0);
return 0;
}
val->encoding = ATTR_VAL_STRING;
val->u.string =
(const char *) dwarf_sections->data[DEBUG_LINE_STR] + offset;
return 1;
}
case DW_FORM_udata:
val->encoding = ATTR_VAL_UINT;
val->u.uint = read_uleb128 (buf);
return 1;
case DW_FORM_ref_addr:
val->encoding = ATTR_VAL_REF_INFO;
if (version == 2)
val->u.uint = read_address (buf, addrsize);
else
val->u.uint = read_offset (buf, is_dwarf64);
return 1;
case DW_FORM_ref1:
val->encoding = ATTR_VAL_REF_UNIT;
val->u.uint = read_byte (buf);
return 1;
case DW_FORM_ref2:
val->encoding = ATTR_VAL_REF_UNIT;
val->u.uint = read_uint16 (buf);
return 1;
case DW_FORM_ref4:
val->encoding = ATTR_VAL_REF_UNIT;
val->u.uint = read_uint32 (buf);
return 1;
case DW_FORM_ref8:
val->encoding = ATTR_VAL_REF_UNIT;
val->u.uint = read_uint64 (buf);
return 1;
case DW_FORM_ref_udata:
val->encoding = ATTR_VAL_REF_UNIT;
val->u.uint = read_uleb128 (buf);
return 1;
case DW_FORM_indirect:
{
uint64_t form;
form = read_uleb128 (buf);
if (form == DW_FORM_implicit_const)
{
dwarf_buf_error (buf,
"DW_FORM_indirect to DW_FORM_implicit_const",
0);
return 0;
}
return read_attribute ((enum dwarf_form) form, 0, buf, is_dwarf64,
version, addrsize, dwarf_sections, altlink,
val);
}
case DW_FORM_sec_offset:
val->encoding = ATTR_VAL_REF_SECTION;
val->u.uint = read_offset (buf, is_dwarf64);
return 1;
case DW_FORM_exprloc:
val->encoding = ATTR_VAL_EXPR;
return advance (buf, read_uleb128 (buf));
case DW_FORM_flag_present:
val->encoding = ATTR_VAL_UINT;
val->u.uint = 1;
return 1;
case DW_FORM_ref_sig8:
val->encoding = ATTR_VAL_REF_TYPE;
val->u.uint = read_uint64 (buf);
return 1;
case DW_FORM_strx: case DW_FORM_strx1: case DW_FORM_strx2:
case DW_FORM_strx3: case DW_FORM_strx4:
{
uint64_t offset;
switch (form)
{
case DW_FORM_strx:
offset = read_uleb128 (buf);
break;
case DW_FORM_strx1:
offset = read_byte (buf);
break;
case DW_FORM_strx2:
offset = read_uint16 (buf);
break;
case DW_FORM_strx3:
offset = read_uint24 (buf);
break;
case DW_FORM_strx4:
offset = read_uint32 (buf);
break;
default:
/* This case can't happen. */
return 0;
}
val->encoding = ATTR_VAL_STRING_INDEX;
val->u.uint = offset;
return 1;
}
case DW_FORM_addrx: case DW_FORM_addrx1: case DW_FORM_addrx2:
case DW_FORM_addrx3: case DW_FORM_addrx4:
{
uint64_t offset;
switch (form)
{
case DW_FORM_addrx:
offset = read_uleb128 (buf);
break;
case DW_FORM_addrx1:
offset = read_byte (buf);
break;
case DW_FORM_addrx2:
offset = read_uint16 (buf);
break;
case DW_FORM_addrx3:
offset = read_uint24 (buf);
break;
case DW_FORM_addrx4:
offset = read_uint32 (buf);
break;
default:
/* This case can't happen. */
return 0;
}
val->encoding = ATTR_VAL_ADDRESS_INDEX;
val->u.uint = offset;
return 1;
}
case DW_FORM_ref_sup4:
val->encoding = ATTR_VAL_REF_SECTION;
val->u.uint = read_uint32 (buf);
return 1;
case DW_FORM_ref_sup8:
val->encoding = ATTR_VAL_REF_SECTION;
val->u.uint = read_uint64 (buf);
return 1;
case DW_FORM_implicit_const:
val->encoding = ATTR_VAL_UINT;
val->u.uint = implicit_val;
return 1;
case DW_FORM_loclistx:
/* We don't distinguish this from DW_FORM_sec_offset. It
* shouldn't matter since we don't care about loclists. */
val->encoding = ATTR_VAL_REF_SECTION;
val->u.uint = read_uleb128 (buf);
return 1;
case DW_FORM_rnglistx:
val->encoding = ATTR_VAL_RNGLISTS_INDEX;
val->u.uint = read_uleb128 (buf);
return 1;
case DW_FORM_GNU_addr_index:
val->encoding = ATTR_VAL_REF_SECTION;
val->u.uint = read_uleb128 (buf);
return 1;
case DW_FORM_GNU_str_index:
val->encoding = ATTR_VAL_REF_SECTION;
val->u.uint = read_uleb128 (buf);
return 1;
case DW_FORM_GNU_ref_alt:
val->u.uint = read_offset (buf, is_dwarf64);
if (altlink == NULL)
{
val->encoding = ATTR_VAL_NONE;
return 1;
}
val->encoding = ATTR_VAL_REF_ALT_INFO;
return 1;
case DW_FORM_strp_sup: case DW_FORM_GNU_strp_alt:
{
uint64_t offset;
offset = read_offset (buf, is_dwarf64);
if (altlink == NULL)
{
val->encoding = ATTR_VAL_NONE;
return 1;
}
if (offset >= altlink->dwarf_sections.size[DEBUG_STR])
{
dwarf_buf_error (buf, "DW_FORM_strp_sup out of range", 0);
return 0;
}
val->encoding = ATTR_VAL_STRING;
val->u.string =
(const char *) altlink->dwarf_sections.data[DEBUG_STR] + offset;
return 1;
}
default:
dwarf_buf_error (buf, "unrecognized DWARF form", -1);
return 0;
}
}
/* If we can determine the value of a string attribute, set *STRING to
point to the string. Return 1 on success, 0 on error. If we don't
know the value, we consider that a success, and we don't change
*STRING. An error is only reported for some sort of out of range
offset. */
static int
resolve_string (const struct dwarf_sections *dwarf_sections, int is_dwarf64,
int is_bigendian, uint64_t str_offsets_base,
const struct attr_val *val,
backtrace_error_callback error_callback, void *data,
const char **string)
{
switch (val->encoding)
{
case ATTR_VAL_STRING:
*string = val->u.string;
return 1;
case ATTR_VAL_STRING_INDEX:
{
uint64_t offset;
struct dwarf_buf offset_buf;
offset = val->u.uint * (is_dwarf64 ? 8 : 4) + str_offsets_base;
if (offset + (is_dwarf64 ? 8 : 4)
> dwarf_sections->size[DEBUG_STR_OFFSETS])
{
error_callback (data, "DW_FORM_strx value out of range", 0);
return 0;
}
offset_buf.name = ".debug_str_offsets";
offset_buf.start = dwarf_sections->data[DEBUG_STR_OFFSETS];
offset_buf.buf = dwarf_sections->data[DEBUG_STR_OFFSETS] + offset;
offset_buf.left = dwarf_sections->size[DEBUG_STR_OFFSETS] - offset;
offset_buf.is_bigendian = is_bigendian;
offset_buf.error_callback = error_callback;
offset_buf.data = data;
offset_buf.reported_underflow = 0;
offset = read_offset (&offset_buf, is_dwarf64);
if (offset >= dwarf_sections->size[DEBUG_STR])
{
dwarf_buf_error (&offset_buf,
"DW_FORM_strx offset out of range",
0);
return 0;
}
*string = (const char *) dwarf_sections->data[DEBUG_STR] + offset;
return 1;
}
default:
return 1;
}
}
/* Set *ADDRESS to the real address for a ATTR_VAL_ADDRESS_INDEX.
Return 1 on success, 0 on error. */
static int
resolve_addr_index (const struct dwarf_sections *dwarf_sections,
uint64_t addr_base, int addrsize, int is_bigendian,
uint64_t addr_index,
backtrace_error_callback error_callback, void *data,
uint64_t *address)
{
uint64_t offset;
struct dwarf_buf addr_buf;
offset = addr_index * addrsize + addr_base;
if (offset + addrsize > dwarf_sections->size[DEBUG_ADDR])
{
error_callback (data, "DW_FORM_addrx value out of range", 0);
return 0;
}
addr_buf.name = ".debug_addr";
addr_buf.start = dwarf_sections->data[DEBUG_ADDR];
addr_buf.buf = dwarf_sections->data[DEBUG_ADDR] + offset;
addr_buf.left = dwarf_sections->size[DEBUG_ADDR] - offset;
addr_buf.is_bigendian = is_bigendian;
addr_buf.error_callback = error_callback;
addr_buf.data = data;
addr_buf.reported_underflow = 0;
*address = read_address (&addr_buf, addrsize);
return 1;
}
/* Compare a unit offset against a unit for bsearch. */
static int
units_search (const void *vkey, const void *ventry)
{
const size_t *key = (const size_t *) vkey;
const struct unit *entry = *((const struct unit *const *) ventry);
size_t offset;
offset = *key;
if (offset < entry->low_offset)
return -1;
else if (offset >= entry->high_offset)
return 1;
else
return 0;
}
/* Find a unit in PU containing OFFSET. */
static struct unit *
find_unit (struct unit **pu, size_t units_count, size_t offset)
{
struct unit **u;
u = (struct unit**)bsearch (&offset, pu, units_count, sizeof (struct unit *), units_search);
return u == NULL ? NULL : *u;
}
/* Compare function_addrs for qsort. When ranges are nested, make the
smallest one sort last. */
static int
function_addrs_compare (const void *v1, const void *v2)
{
const struct function_addrs *a1 = (const struct function_addrs *) v1;
const struct function_addrs *a2 = (const struct function_addrs *) v2;
if (a1->low < a2->low)
return -1;
if (a1->low > a2->low)
return 1;
if (a1->high < a2->high)
return 1;
if (a1->high > a2->high)
return -1;
return strcmp (a1->function->name, a2->function->name);
}
/* Compare a PC against a function_addrs for bsearch. We always
allocate an entra entry at the end of the vector, so that this
routine can safely look at the next entry. Note that if there are
multiple ranges containing PC, which one will be returned is
unpredictable. We compensate for that in dwarf_fileline. */
static int
function_addrs_search (const void *vkey, const void *ventry)
{
const uintptr_t *key = (const uintptr_t *) vkey;
const struct function_addrs *entry = (const struct function_addrs *) ventry;
uintptr_t pc;
pc = *key;
if (pc < entry->low)
return -1;
else if (pc > (entry + 1)->low)
return 1;
else
return 0;
}
/* Add a new compilation unit address range to a vector. This is
called via add_ranges. Returns 1 on success, 0 on failure. */
static int
add_unit_addr (struct backtrace_state *state, void *rdata,
uint64_t lowpc, uint64_t highpc,
backtrace_error_callback error_callback, void *data,
void *pvec)
{
struct unit *u = (struct unit *) rdata;
struct unit_addrs_vector *vec = (struct unit_addrs_vector *) pvec;
struct unit_addrs *p;
/* Try to merge with the last entry. */
if (vec->count > 0)
{
p = (struct unit_addrs *) vec->vec.base + (vec->count - 1);
if ((lowpc == p->high || lowpc == p->high + 1)
&& u == p->u)
{
if (highpc > p->high)
p->high = highpc;
return 1;
}
}
p = ((struct unit_addrs *)
backtrace_vector_grow (state, sizeof (struct unit_addrs),
error_callback, data, &vec->vec));
if (p == NULL)
return 0;
p->low = lowpc;
p->high = highpc;
p->u = u;
++vec->count;
return 1;
}
/* Compare unit_addrs for qsort. When ranges are nested, make the
smallest one sort last. */
static int
unit_addrs_compare (const void *v1, const void *v2)
{
const struct unit_addrs *a1 = (const struct unit_addrs *) v1;
const struct unit_addrs *a2 = (const struct unit_addrs *) v2;
if (a1->low < a2->low)
return -1;
if (a1->low > a2->low)
return 1;
if (a1->high < a2->high)
return 1;
if (a1->high > a2->high)
return -1;
if (a1->u->lineoff < a2->u->lineoff)
return -1;
if (a1->u->lineoff > a2->u->lineoff)
return 1;
return 0;
}
/* Compare a PC against a unit_addrs for bsearch. We always allocate
an entry entry at the end of the vector, so that this routine can
safely look at the next entry. Note that if there are multiple
ranges containing PC, which one will be returned is unpredictable.
We compensate for that in dwarf_fileline. */
static int
unit_addrs_search (const void *vkey, const void *ventry)
{
const uintptr_t *key = (const uintptr_t *) vkey;
const struct unit_addrs *entry = (const struct unit_addrs *) ventry;
uintptr_t pc;
pc = *key;
if (pc < entry->low)
return -1;
else if (pc > (entry + 1)->low)
return 1;
else
return 0;
}
/* Sort the line vector by PC. We want a stable sort here to maintain
the order of lines for the same PC values. Since the sequence is
being sorted in place, their addresses cannot be relied on to
maintain stability. That is the purpose of the index member. */
static int
line_compare (const void *v1, const void *v2)
{
const struct line *ln1 = (const struct line *) v1;
const struct line *ln2 = (const struct line *) v2;
if (ln1->pc < ln2->pc)
return -1;
else if (ln1->pc > ln2->pc)
return 1;
else if (ln1->idx < ln2->idx)
return -1;
else if (ln1->idx > ln2->idx)
return 1;
else
return 0;
}
/* Find a PC in a line vector. We always allocate an extra entry at
the end of the lines vector, so that this routine can safely look
at the next entry. Note that when there are multiple mappings for
the same PC value, this will return the last one. */
static int
line_search (const void *vkey, const void *ventry)
{
const uintptr_t *key = (const uintptr_t *) vkey;
const struct line *entry = (const struct line *) ventry;
uintptr_t pc;
pc = *key;
if (pc < entry->pc)
return -1;
else if (pc >= (entry + 1)->pc)
return 1;
else
return 0;
}
/* Sort the abbrevs by the abbrev code. This function is passed to
both qsort and bsearch. */
static int
abbrev_compare (const void *v1, const void *v2)
{
const struct abbrev *a1 = (const struct abbrev *) v1;
const struct abbrev *a2 = (const struct abbrev *) v2;
if (a1->code < a2->code)
return -1;
else if (a1->code > a2->code)
return 1;
else
{
/* This really shouldn't happen. It means there are two
different abbrevs with the same code, and that means we don't
know which one lookup_abbrev should return. */
return 0;
}
}
/* Read the abbreviation table for a compilation unit. Returns 1 on
success, 0 on failure. */
static int
read_abbrevs (struct backtrace_state *state, uint64_t abbrev_offset,
const unsigned char *dwarf_abbrev, size_t dwarf_abbrev_size,
int is_bigendian, backtrace_error_callback error_callback,
void *data, struct abbrevs *abbrevs)
{
struct dwarf_buf abbrev_buf;
struct dwarf_buf count_buf;
size_t num_abbrevs;
abbrevs->num_abbrevs = 0;
abbrevs->abbrevs = NULL;
if (abbrev_offset >= dwarf_abbrev_size)
{
error_callback (data, "abbrev offset out of range", 0);
return 0;
}
abbrev_buf.name = ".debug_abbrev";
abbrev_buf.start = dwarf_abbrev;
abbrev_buf.buf = dwarf_abbrev + abbrev_offset;
abbrev_buf.left = dwarf_abbrev_size - abbrev_offset;
abbrev_buf.is_bigendian = is_bigendian;
abbrev_buf.error_callback = error_callback;
abbrev_buf.data = data;
abbrev_buf.reported_underflow = 0;
/* Count the number of abbrevs in this list. */
count_buf = abbrev_buf;
num_abbrevs = 0;
while (read_uleb128 (&count_buf) != 0)
{
if (count_buf.reported_underflow)
return 0;
++num_abbrevs;
// Skip tag.
read_uleb128 (&count_buf);
// Skip has_children.
read_byte (&count_buf);
// Skip attributes.
while (read_uleb128 (&count_buf) != 0)
{
uint64_t form;
form = read_uleb128 (&count_buf);
if ((enum dwarf_form) form == DW_FORM_implicit_const)
read_sleb128 (&count_buf);
}
// Skip form of last attribute.
read_uleb128 (&count_buf);
}
if (count_buf.reported_underflow)
return 0;
if (num_abbrevs == 0)
return 1;
abbrevs->abbrevs = ((struct abbrev *)
backtrace_alloc (state,
num_abbrevs * sizeof (struct abbrev),
error_callback, data));
if (abbrevs->abbrevs == NULL)
return 0;
abbrevs->num_abbrevs = num_abbrevs;
memset (abbrevs->abbrevs, 0, num_abbrevs * sizeof (struct abbrev));
num_abbrevs = 0;
while (1)
{
uint64_t code;
struct abbrev a;
size_t num_attrs;
struct attr *attrs;
if (abbrev_buf.reported_underflow)
goto fail;
code = read_uleb128 (&abbrev_buf);
if (code == 0)
break;
a.code = code;
a.tag = (enum dwarf_tag) read_uleb128 (&abbrev_buf);
a.has_children = read_byte (&abbrev_buf);
count_buf = abbrev_buf;
num_attrs = 0;
while (read_uleb128 (&count_buf) != 0)
{
uint64_t form;
++num_attrs;
form = read_uleb128 (&count_buf);
if ((enum dwarf_form) form == DW_FORM_implicit_const)
read_sleb128 (&count_buf);
}
if (num_attrs == 0)
{
attrs = NULL;
read_uleb128 (&abbrev_buf);
read_uleb128 (&abbrev_buf);
}
else
{
attrs = ((struct attr *)
backtrace_alloc (state, num_attrs * sizeof *attrs,
error_callback, data));
if (attrs == NULL)
goto fail;
num_attrs = 0;
while (1)
{
uint64_t name;
uint64_t form;
name = read_uleb128 (&abbrev_buf);
form = read_uleb128 (&abbrev_buf);
if (name == 0)
break;
attrs[num_attrs].name = (enum dwarf_attribute) name;
attrs[num_attrs].form = (enum dwarf_form) form;
if ((enum dwarf_form) form == DW_FORM_implicit_const)
attrs[num_attrs].val = read_sleb128 (&abbrev_buf);
else
attrs[num_attrs].val = 0;
++num_attrs;
}
}
a.num_attrs = num_attrs;
a.attrs = attrs;
abbrevs->abbrevs[num_abbrevs] = a;
++num_abbrevs;
}
backtrace_qsort (abbrevs->abbrevs, abbrevs->num_abbrevs,
sizeof (struct abbrev), abbrev_compare);
return 1;
fail:
free_abbrevs (state, abbrevs, error_callback, data);
return 0;
}
/* Return the abbrev information for an abbrev code. */
static const struct abbrev *
lookup_abbrev (struct abbrevs *abbrevs, uint64_t code,
backtrace_error_callback error_callback, void *data)
{
struct abbrev key;
void *p;
/* With GCC, where abbrevs are simply numbered in order, we should
be able to just look up the entry. */
if (code - 1 < abbrevs->num_abbrevs
&& abbrevs->abbrevs[code - 1].code == code)
return &abbrevs->abbrevs[code - 1];
/* Otherwise we have to search. */
memset (&key, 0, sizeof key);
key.code = code;
p = bsearch (&key, abbrevs->abbrevs, abbrevs->num_abbrevs,
sizeof (struct abbrev), abbrev_compare);
if (p == NULL)
{
error_callback (data, "invalid abbreviation code", 0);
return NULL;
}
return (const struct abbrev *) p;
}
/* This struct is used to gather address range information while
reading attributes. We use this while building a mapping from
address ranges to compilation units and then again while mapping
from address ranges to function entries. Normally either
lowpc/highpc is set or ranges is set. */
struct pcrange {
uint64_t lowpc; /* The low PC value. */
int have_lowpc; /* Whether a low PC value was found. */
int lowpc_is_addr_index; /* Whether lowpc is in .debug_addr. */
uint64_t highpc; /* The high PC value. */
int have_highpc; /* Whether a high PC value was found. */
int highpc_is_relative; /* Whether highpc is relative to lowpc. */
int highpc_is_addr_index; /* Whether highpc is in .debug_addr. */
uint64_t ranges; /* Offset in ranges section. */
int have_ranges; /* Whether ranges is valid. */
int ranges_is_index; /* Whether ranges is DW_FORM_rnglistx. */
};
/* Update PCRANGE from an attribute value. */
static void
update_pcrange (const struct attr* attr, const struct attr_val* val,
struct pcrange *pcrange)
{
switch (attr->name)
{
case DW_AT_low_pc:
if (val->encoding == ATTR_VAL_ADDRESS)
{
pcrange->lowpc = val->u.uint;
pcrange->have_lowpc = 1;
}
else if (val->encoding == ATTR_VAL_ADDRESS_INDEX)
{
pcrange->lowpc = val->u.uint;
pcrange->have_lowpc = 1;
pcrange->lowpc_is_addr_index = 1;
}
break;
case DW_AT_high_pc:
if (val->encoding == ATTR_VAL_ADDRESS)
{
pcrange->highpc = val->u.uint;
pcrange->have_highpc = 1;
}
else if (val->encoding == ATTR_VAL_UINT)
{
pcrange->highpc = val->u.uint;
pcrange->have_highpc = 1;
pcrange->highpc_is_relative = 1;
}
else if (val->encoding == ATTR_VAL_ADDRESS_INDEX)
{
pcrange->highpc = val->u.uint;
pcrange->have_highpc = 1;
pcrange->highpc_is_addr_index = 1;
}
break;
case DW_AT_ranges:
if (val->encoding == ATTR_VAL_UINT
|| val->encoding == ATTR_VAL_REF_SECTION)
{
pcrange->ranges = val->u.uint;
pcrange->have_ranges = 1;
}
else if (val->encoding == ATTR_VAL_RNGLISTS_INDEX)
{
pcrange->ranges = val->u.uint;
pcrange->have_ranges = 1;
pcrange->ranges_is_index = 1;
}
break;
default:
break;
}
}
/* Call ADD_RANGE for a low/high PC pair. Returns 1 on success, 0 on
error. */
static int
add_low_high_range (struct backtrace_state *state,
const struct dwarf_sections *dwarf_sections,
uintptr_t base_address, int is_bigendian,
struct unit *u, const struct pcrange *pcrange,
int (*add_range) (struct backtrace_state *state,
void *rdata, uint64_t lowpc,
uint64_t highpc,
backtrace_error_callback error_callback,
void *data, void *vec),
void *rdata,
backtrace_error_callback error_callback, void *data,
void *vec)
{
uint64_t lowpc;
uint64_t highpc;
lowpc = pcrange->lowpc;
if (pcrange->lowpc_is_addr_index)
{
if (!resolve_addr_index (dwarf_sections, u->addr_base, u->addrsize,
is_bigendian, lowpc, error_callback, data,
&lowpc))
return 0;
}
highpc = pcrange->highpc;
if (pcrange->highpc_is_addr_index)
{
if (!resolve_addr_index (dwarf_sections, u->addr_base, u->addrsize,
is_bigendian, highpc, error_callback, data,
&highpc))
return 0;
}
if (pcrange->highpc_is_relative)
highpc += lowpc;
/* Add in the base address of the module when recording PC values,
so that we can look up the PC directly. */
lowpc += base_address;
highpc += base_address;
return add_range (state, rdata, lowpc, highpc, error_callback, data, vec);
}
/* Call ADD_RANGE for each range read from .debug_ranges, as used in
DWARF versions 2 through 4. */
static int
add_ranges_from_ranges (
struct backtrace_state *state,
const struct dwarf_sections *dwarf_sections,
uintptr_t base_address, int is_bigendian,
struct unit *u, uint64_t base,
const struct pcrange *pcrange,
int (*add_range) (struct backtrace_state *state, void *rdata,
uint64_t lowpc, uint64_t highpc,
backtrace_error_callback error_callback, void *data,
void *vec),
void *rdata,
backtrace_error_callback error_callback, void *data,
void *vec)
{
struct dwarf_buf ranges_buf;
if (pcrange->ranges >= dwarf_sections->size[DEBUG_RANGES])
{
error_callback (data, "ranges offset out of range", 0);
return 0;
}
ranges_buf.name = ".debug_ranges";
ranges_buf.start = dwarf_sections->data[DEBUG_RANGES];
ranges_buf.buf = dwarf_sections->data[DEBUG_RANGES] + pcrange->ranges;
ranges_buf.left = dwarf_sections->size[DEBUG_RANGES] - pcrange->ranges;
ranges_buf.is_bigendian = is_bigendian;
ranges_buf.error_callback = error_callback;
ranges_buf.data = data;
ranges_buf.reported_underflow = 0;
while (1)
{
uint64_t low;
uint64_t high;
if (ranges_buf.reported_underflow)
return 0;
low = read_address (&ranges_buf, u->addrsize);
high = read_address (&ranges_buf, u->addrsize);
if (low == 0 && high == 0)
break;
if (is_highest_address (low, u->addrsize))
base = high;
else
{
if (!add_range (state, rdata,
low + base + base_address,
high + base + base_address,
error_callback, data, vec))
return 0;
}
}
if (ranges_buf.reported_underflow)
return 0;
return 1;
}
/* Call ADD_RANGE for each range read from .debug_rnglists, as used in
DWARF version 5. */
static int
add_ranges_from_rnglists (
struct backtrace_state *state,
const struct dwarf_sections *dwarf_sections,
uintptr_t base_address, int is_bigendian,
struct unit *u, uint64_t base,
const struct pcrange *pcrange,
int (*add_range) (struct backtrace_state *state, void *rdata,
uint64_t lowpc, uint64_t highpc,
backtrace_error_callback error_callback, void *data,
void *vec),
void *rdata,
backtrace_error_callback error_callback, void *data,
void *vec)
{
uint64_t offset;
struct dwarf_buf rnglists_buf;
if (!pcrange->ranges_is_index)
offset = pcrange->ranges;
else
offset = u->rnglists_base + pcrange->ranges * (u->is_dwarf64 ? 8 : 4);
if (offset >= dwarf_sections->size[DEBUG_RNGLISTS])
{
error_callback (data, "rnglists offset out of range", 0);
return 0;
}
rnglists_buf.name = ".debug_rnglists";
rnglists_buf.start = dwarf_sections->data[DEBUG_RNGLISTS];
rnglists_buf.buf = dwarf_sections->data[DEBUG_RNGLISTS] + offset;
rnglists_buf.left = dwarf_sections->size[DEBUG_RNGLISTS] - offset;
rnglists_buf.is_bigendian = is_bigendian;
rnglists_buf.error_callback = error_callback;
rnglists_buf.data = data;
rnglists_buf.reported_underflow = 0;
if (pcrange->ranges_is_index)
{
offset = read_offset (&rnglists_buf, u->is_dwarf64);
offset += u->rnglists_base;
if (offset >= dwarf_sections->size[DEBUG_RNGLISTS])
{
error_callback (data, "rnglists index offset out of range", 0);
return 0;
}
rnglists_buf.buf = dwarf_sections->data[DEBUG_RNGLISTS] + offset;
rnglists_buf.left = dwarf_sections->size[DEBUG_RNGLISTS] - offset;
}
while (1)
{
unsigned char rle;
rle = read_byte (&rnglists_buf);
if (rle == DW_RLE_end_of_list)
break;
switch (rle)
{
case DW_RLE_base_addressx:
{
uint64_t index;
index = read_uleb128 (&rnglists_buf);
if (!resolve_addr_index (dwarf_sections, u->addr_base,
u->addrsize, is_bigendian, index,
error_callback, data, &base))
return 0;
}
break;
case DW_RLE_startx_endx:
{
uint64_t index;
uint64_t low;
uint64_t high;
index = read_uleb128 (&rnglists_buf);
if (!resolve_addr_index (dwarf_sections, u->addr_base,
u->addrsize, is_bigendian, index,
error_callback, data, &low))
return 0;
index = read_uleb128 (&rnglists_buf);
if (!resolve_addr_index (dwarf_sections, u->addr_base,
u->addrsize, is_bigendian, index,
error_callback, data, &high))
return 0;
if (!add_range (state, rdata, low + base_address,
high + base_address, error_callback, data,
vec))
return 0;
}
break;
case DW_RLE_startx_length:
{
uint64_t index;
uint64_t low;
uint64_t length;
index = read_uleb128 (&rnglists_buf);
if (!resolve_addr_index (dwarf_sections, u->addr_base,
u->addrsize, is_bigendian, index,
error_callback, data, &low))
return 0;
length = read_uleb128 (&rnglists_buf);
low += base_address;
if (!add_range (state, rdata, low, low + length,
error_callback, data, vec))
return 0;
}
break;
case DW_RLE_offset_pair:
{
uint64_t low;
uint64_t high;
low = read_uleb128 (&rnglists_buf);
high = read_uleb128 (&rnglists_buf);
if (!add_range (state, rdata, low + base + base_address,
high + base + base_address,
error_callback, data, vec))
return 0;
}
break;
case DW_RLE_base_address:
base = read_address (&rnglists_buf, u->addrsize);
break;
case DW_RLE_start_end:
{
uint64_t low;
uint64_t high;
low = read_address (&rnglists_buf, u->addrsize);
high = read_address (&rnglists_buf, u->addrsize);
if (!add_range (state, rdata, low + base_address,
high + base_address, error_callback, data,
vec))
return 0;
}
break;
case DW_RLE_start_length:
{
uint64_t low;
uint64_t length;
low = read_address (&rnglists_buf, u->addrsize);
length = read_uleb128 (&rnglists_buf);
low += base_address;
if (!add_range (state, rdata, low, low + length,
error_callback, data, vec))
return 0;
}
break;
default:
dwarf_buf_error (&rnglists_buf, "unrecognized DW_RLE value", -1);
return 0;
}
}
if (rnglists_buf.reported_underflow)
return 0;
return 1;
}
/* Call ADD_RANGE for each lowpc/highpc pair in PCRANGE. RDATA is
passed to ADD_RANGE, and is either a struct unit * or a struct
function *. VEC is the vector we are adding ranges to, and is
either a struct unit_addrs_vector * or a struct function_vector *.
Returns 1 on success, 0 on error. */
static int
add_ranges (struct backtrace_state *state,
const struct dwarf_sections *dwarf_sections,
uintptr_t base_address, int is_bigendian,
struct unit *u, uint64_t base, const struct pcrange *pcrange,
int (*add_range) (struct backtrace_state *state, void *rdata,
uint64_t lowpc, uint64_t highpc,
backtrace_error_callback error_callback,
void *data, void *vec),
void *rdata,
backtrace_error_callback error_callback, void *data,
void *vec)
{
if (pcrange->have_lowpc && pcrange->have_highpc)
return add_low_high_range (state, dwarf_sections, base_address,
is_bigendian, u, pcrange, add_range, rdata,
error_callback, data, vec);
if (!pcrange->have_ranges)
{
/* Did not find any address ranges to add. */
return 1;
}
if (u->version < 5)
return add_ranges_from_ranges (state, dwarf_sections, base_address,
is_bigendian, u, base, pcrange, add_range,
rdata, error_callback, data, vec);
else
return add_ranges_from_rnglists (state, dwarf_sections, base_address,
is_bigendian, u, base, pcrange, add_range,
rdata, error_callback, data, vec);
}
/* Find the address range covered by a compilation unit, reading from
UNIT_BUF and adding values to U. Returns 1 if all data could be
read, 0 if there is some error. */
static int
find_address_ranges (struct backtrace_state *state, uintptr_t base_address,
struct dwarf_buf *unit_buf,
const struct dwarf_sections *dwarf_sections,
int is_bigendian, struct dwarf_data *altlink,
backtrace_error_callback error_callback, void *data,
struct unit *u, struct unit_addrs_vector *addrs,
enum dwarf_tag *unit_tag)
{
while (unit_buf->left > 0)
{
uint64_t code;
const struct abbrev *abbrev;
struct pcrange pcrange;
struct attr_val name_val;
int have_name_val;
struct attr_val comp_dir_val;
int have_comp_dir_val;
size_t i;
code = read_uleb128 (unit_buf);
if (code == 0)
return 1;
abbrev = lookup_abbrev (&u->abbrevs, code, error_callback, data);
if (abbrev == NULL)
return 0;
if (unit_tag != NULL)
*unit_tag = abbrev->tag;
memset (&pcrange, 0, sizeof pcrange);
memset (&name_val, 0, sizeof name_val);
have_name_val = 0;
memset (&comp_dir_val, 0, sizeof comp_dir_val);
have_comp_dir_val = 0;
for (i = 0; i < abbrev->num_attrs; ++i)
{
struct attr_val val;
if (!read_attribute (abbrev->attrs[i].form, abbrev->attrs[i].val,
unit_buf, u->is_dwarf64, u->version,
u->addrsize, dwarf_sections, altlink, &val))
return 0;
switch (abbrev->attrs[i].name)
{
case DW_AT_low_pc: case DW_AT_high_pc: case DW_AT_ranges:
update_pcrange (&abbrev->attrs[i], &val, &pcrange);
break;
case DW_AT_stmt_list:
if ((abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_skeleton_unit)
&& (val.encoding == ATTR_VAL_UINT
|| val.encoding == ATTR_VAL_REF_SECTION))
u->lineoff = val.u.uint;
break;
case DW_AT_name:
if (abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_skeleton_unit)
{
name_val = val;
have_name_val = 1;
}
break;
case DW_AT_comp_dir:
if (abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_skeleton_unit)
{
comp_dir_val = val;
have_comp_dir_val = 1;
}
break;
case DW_AT_str_offsets_base:
if ((abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_skeleton_unit)
&& val.encoding == ATTR_VAL_REF_SECTION)
u->str_offsets_base = val.u.uint;
break;
case DW_AT_addr_base:
if ((abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_skeleton_unit)
&& val.encoding == ATTR_VAL_REF_SECTION)
u->addr_base = val.u.uint;
break;
case DW_AT_rnglists_base:
if ((abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_skeleton_unit)
&& val.encoding == ATTR_VAL_REF_SECTION)
u->rnglists_base = val.u.uint;
break;
default:
break;
}
}
// Resolve strings after we're sure that we have seen
// DW_AT_str_offsets_base.
if (have_name_val)
{
if (!resolve_string (dwarf_sections, u->is_dwarf64, is_bigendian,
u->str_offsets_base, &name_val,
error_callback, data, &u->filename))
return 0;
}
if (have_comp_dir_val)
{
if (!resolve_string (dwarf_sections, u->is_dwarf64, is_bigendian,
u->str_offsets_base, &comp_dir_val,
error_callback, data, &u->comp_dir))
return 0;
}
if (abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_subprogram
|| abbrev->tag == DW_TAG_skeleton_unit)
{
if (!add_ranges (state, dwarf_sections, base_address,
is_bigendian, u, pcrange.lowpc, &pcrange,
add_unit_addr, (void *) u, error_callback, data,
(void *) addrs))
return 0;
/* If we found the PC range in the DW_TAG_compile_unit or
DW_TAG_skeleton_unit, we can stop now. */
if ((abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_skeleton_unit)
&& (pcrange.have_ranges
|| (pcrange.have_lowpc && pcrange.have_highpc)))
return 1;
}
if (abbrev->has_children)
{
if (!find_address_ranges (state, base_address, unit_buf,
dwarf_sections, is_bigendian, altlink,
error_callback, data, u, addrs, NULL))
return 0;
}
}
return 1;
}
/* Build a mapping from address ranges to the compilation units where
the line number information for that range can be found. Returns 1
on success, 0 on failure. */
static int
build_address_map (struct backtrace_state *state, uintptr_t base_address,
const struct dwarf_sections *dwarf_sections,
int is_bigendian, struct dwarf_data *altlink,
backtrace_error_callback error_callback, void *data,
struct unit_addrs_vector *addrs,
struct unit_vector *unit_vec)
{
struct dwarf_buf info;
struct backtrace_vector units;
size_t units_count;
size_t i;
struct unit **pu;
size_t unit_offset = 0;
struct unit_addrs *pa;
memset (&addrs->vec, 0, sizeof addrs->vec);
memset (&unit_vec->vec, 0, sizeof unit_vec->vec);
addrs->count = 0;
unit_vec->count = 0;
/* Read through the .debug_info section. FIXME: Should we use the
.debug_aranges section? gdb and addr2line don't use it, but I'm
not sure why. */
info.name = ".debug_info";
info.start = dwarf_sections->data[DEBUG_INFO];
info.buf = info.start;
info.left = dwarf_sections->size[DEBUG_INFO];
info.is_bigendian = is_bigendian;
info.error_callback = error_callback;
info.data = data;
info.reported_underflow = 0;
memset (&units, 0, sizeof units);
units_count = 0;
while (info.left > 0)
{
const unsigned char *unit_data_start;
uint64_t len;
int is_dwarf64;
struct dwarf_buf unit_buf;
int version;
int unit_type;
uint64_t abbrev_offset;
int addrsize;
struct unit *u;
enum dwarf_tag unit_tag;
if (info.reported_underflow)
goto fail;
unit_data_start = info.buf;
len = read_initial_length (&info, &is_dwarf64);
unit_buf = info;
unit_buf.left = len;
if (!advance (&info, len))
goto fail;
version = read_uint16 (&unit_buf);
if (version < 2 || version > 5)
{
dwarf_buf_error (&unit_buf, "unrecognized DWARF version", -1);
goto fail;
}
if (version < 5)
unit_type = 0;
else
{
unit_type = read_byte (&unit_buf);
if (unit_type == DW_UT_type || unit_type == DW_UT_split_type)
{
/* This unit doesn't have anything we need. */
continue;
}
}
pu = ((struct unit **)
backtrace_vector_grow (state, sizeof (struct unit *),
error_callback, data, &units));
if (pu == NULL)
goto fail;
u = ((struct unit *)
backtrace_alloc (state, sizeof *u, error_callback, data));
if (u == NULL)
goto fail;
*pu = u;
++units_count;
if (version < 5)
addrsize = 0; /* Set below. */
else
addrsize = read_byte (&unit_buf);
memset (&u->abbrevs, 0, sizeof u->abbrevs);
abbrev_offset = read_offset (&unit_buf, is_dwarf64);
if (!read_abbrevs (state, abbrev_offset,
dwarf_sections->data[DEBUG_ABBREV],
dwarf_sections->size[DEBUG_ABBREV],
is_bigendian, error_callback, data, &u->abbrevs))
goto fail;
if (version < 5)
addrsize = read_byte (&unit_buf);
switch (unit_type)
{
case 0:
break;
case DW_UT_compile: case DW_UT_partial:
break;
case DW_UT_skeleton: case DW_UT_split_compile:
read_uint64 (&unit_buf); /* dwo_id */
break;
default:
break;
}
u->low_offset = unit_offset;
unit_offset += len + (is_dwarf64 ? 12 : 4);
u->high_offset = unit_offset;
u->unit_data = unit_buf.buf;
u->unit_data_len = unit_buf.left;
u->unit_data_offset = unit_buf.buf - unit_data_start;
u->version = version;
u->is_dwarf64 = is_dwarf64;
u->addrsize = addrsize;
u->filename = NULL;
u->comp_dir = NULL;
u->abs_filename = NULL;
u->lineoff = 0;
u->str_offsets_base = 0;
u->addr_base = 0;
u->rnglists_base = 0;
/* The actual line number mappings will be read as needed. */
u->lines = NULL;
u->lines_count = 0;
u->function_addrs = NULL;
u->function_addrs_count = 0;
if (!find_address_ranges (state, base_address, &unit_buf, dwarf_sections,
is_bigendian, altlink, error_callback, data,
u, addrs, &unit_tag))
goto fail;
if (unit_buf.reported_underflow)
goto fail;
}
if (info.reported_underflow)
goto fail;
/* Add a trailing addrs entry, but don't include it in addrs->count. */
pa = ((struct unit_addrs *)
backtrace_vector_grow (state, sizeof (struct unit_addrs),
error_callback, data, &addrs->vec));
if (pa == NULL)
goto fail;
pa->low = 0;
--pa->low;
pa->high = pa->low;
pa->u = NULL;
unit_vec->vec = units;
unit_vec->count = units_count;
return 1;
fail:
if (units_count > 0)
{
pu = (struct unit **) units.base;
for (i = 0; i < units_count; i++)
{
free_abbrevs (state, &pu[i]->abbrevs, error_callback, data);
backtrace_free (state, pu[i], sizeof **pu, error_callback, data);
}
backtrace_vector_free (state, &units, error_callback, data);
}
if (addrs->count > 0)
{
backtrace_vector_free (state, &addrs->vec, error_callback, data);
addrs->count = 0;
}
return 0;
}
/* Add a new mapping to the vector of line mappings that we are
building. Returns 1 on success, 0 on failure. */
static int
add_line (struct backtrace_state *state, struct dwarf_data *ddata,
uintptr_t pc, const char *filename, int lineno,
backtrace_error_callback error_callback, void *data,
struct line_vector *vec)
{
struct line *ln;
/* If we are adding the same mapping, ignore it. This can happen
when using discriminators. */
if (vec->count > 0)
{
ln = (struct line *) vec->vec.base + (vec->count - 1);
if (pc == ln->pc && filename == ln->filename && lineno == ln->lineno)
return 1;
}
ln = ((struct line *)
backtrace_vector_grow (state, sizeof (struct line), error_callback,
data, &vec->vec));
if (ln == NULL)
return 0;
/* Add in the base address here, so that we can look up the PC
directly. */
ln->pc = pc + ddata->base_address;
ln->filename = filename;
ln->lineno = lineno;
ln->idx = vec->count;
++vec->count;
return 1;
}
/* Free the line header information. */
static void
free_line_header (struct backtrace_state *state, struct line_header *hdr,
backtrace_error_callback error_callback, void *data)
{
if (hdr->dirs_count != 0)
backtrace_free (state, hdr->dirs, hdr->dirs_count * sizeof (const char *),
error_callback, data);
backtrace_free (state, hdr->filenames,
hdr->filenames_count * sizeof (char *),
error_callback, data);
}
/* Read the directories and file names for a line header for version
2, setting fields in HDR. Return 1 on success, 0 on failure. */
static int
read_v2_paths (struct backtrace_state *state, struct unit *u,
struct dwarf_buf *hdr_buf, struct line_header *hdr)
{
const unsigned char *p;
const unsigned char *pend;
size_t i;
/* Count the number of directory entries. */
hdr->dirs_count = 0;
p = hdr_buf->buf;
pend = p + hdr_buf->left;
while (p < pend && *p != '\0')
{
p += strnlen((const char *) p, pend - p) + 1;
++hdr->dirs_count;
}
/* The index of the first entry in the list of directories is 1. Index 0 is
used for the current directory of the compilation. To simplify index
handling, we set entry 0 to the compilation unit directory. */
++hdr->dirs_count;
hdr->dirs = ((const char **)
backtrace_alloc (state,
hdr->dirs_count * sizeof (const char *),
hdr_buf->error_callback,
hdr_buf->data));
if (hdr->dirs == NULL)
return 0;
hdr->dirs[0] = u->comp_dir;
i = 1;
while (*hdr_buf->buf != '\0')
{
if (hdr_buf->reported_underflow)
return 0;
hdr->dirs[i] = read_string (hdr_buf);
if (hdr->dirs[i] == NULL)
return 0;
++i;
}
if (!advance (hdr_buf, 1))
return 0;
/* Count the number of file entries. */
hdr->filenames_count = 0;
p = hdr_buf->buf;
pend = p + hdr_buf->left;
while (p < pend && *p != '\0')
{
p += strnlen ((const char *) p, pend - p) + 1;
p += leb128_len (p);
p += leb128_len (p);
p += leb128_len (p);
++hdr->filenames_count;
}
/* The index of the first entry in the list of file names is 1. Index 0 is
used for the DW_AT_name of the compilation unit. To simplify index
handling, we set entry 0 to the compilation unit file name. */
++hdr->filenames_count;
hdr->filenames = ((const char **)
backtrace_alloc (state,
hdr->filenames_count * sizeof (char *),
hdr_buf->error_callback,
hdr_buf->data));
if (hdr->filenames == NULL)
return 0;
hdr->filenames[0] = u->filename;
i = 1;
while (*hdr_buf->buf != '\0')
{
const char *filename;
uint64_t dir_index;
if (hdr_buf->reported_underflow)
return 0;
filename = read_string (hdr_buf);
if (filename == NULL)
return 0;
dir_index = read_uleb128 (hdr_buf);
if (IS_ABSOLUTE_PATH (filename)
|| (dir_index < hdr->dirs_count && hdr->dirs[dir_index] == NULL))
hdr->filenames[i] = filename;
else
{
const char *dir;
size_t dir_len;
size_t filename_len;
char *s;
if (dir_index < hdr->dirs_count)
dir = hdr->dirs[dir_index];
else
{
dwarf_buf_error (hdr_buf,
("invalid directory index in "
"line number program header"),
0);
return 0;
}
dir_len = strlen (dir);
filename_len = strlen (filename);
s = ((char *) backtrace_alloc (state, dir_len + filename_len + 2,
hdr_buf->error_callback,
hdr_buf->data));
if (s == NULL)
return 0;
memcpy (s, dir, dir_len);
/* FIXME: If we are on a DOS-based file system, and the
directory or the file name use backslashes, then we
should use a backslash here. */
s[dir_len] = '/';
memcpy (s + dir_len + 1, filename, filename_len + 1);
hdr->filenames[i] = s;
}
/* Ignore the modification time and size. */
read_uleb128 (hdr_buf);
read_uleb128 (hdr_buf);
++i;
}
return 1;
}
/* Read a single version 5 LNCT entry for a directory or file name in a
line header. Sets *STRING to the resulting name, ignoring other
data. Return 1 on success, 0 on failure. */
static int
read_lnct (struct backtrace_state *state, struct dwarf_data *ddata,
struct unit *u, struct dwarf_buf *hdr_buf,
const struct line_header *hdr, size_t formats_count,
const struct line_header_format *formats, const char **string)
{
size_t i;
const char *dir;
const char *path;
dir = NULL;
path = NULL;
for (i = 0; i < formats_count; i++)
{
struct attr_val val;
if (!read_attribute (formats[i].form, 0, hdr_buf, u->is_dwarf64,
u->version, hdr->addrsize, &ddata->dwarf_sections,
ddata->altlink, &val))
return 0;
switch (formats[i].lnct)
{
case DW_LNCT_path:
if (!resolve_string (&ddata->dwarf_sections, u->is_dwarf64,
ddata->is_bigendian, u->str_offsets_base,
&val, hdr_buf->error_callback, hdr_buf->data,
&path))
return 0;
break;
case DW_LNCT_directory_index:
if (val.encoding == ATTR_VAL_UINT)
{
if (val.u.uint >= hdr->dirs_count)
{
dwarf_buf_error (hdr_buf,
("invalid directory index in "
"line number program header"),
0);
return 0;
}
dir = hdr->dirs[val.u.uint];
}
break;
default:
/* We don't care about timestamps or sizes or hashes. */
break;
}
}
if (path == NULL)
{
dwarf_buf_error (hdr_buf,
"missing file name in line number program header",
0);
return 0;
}
if (dir == NULL)
*string = path;
else
{
size_t dir_len;
size_t path_len;
char *s;
dir_len = strlen (dir);
path_len = strlen (path);
s = (char *) backtrace_alloc (state, dir_len + path_len + 2,
hdr_buf->error_callback, hdr_buf->data);
if (s == NULL)
return 0;
memcpy (s, dir, dir_len);
/* FIXME: If we are on a DOS-based file system, and the
directory or the path name use backslashes, then we should
use a backslash here. */
s[dir_len] = '/';
memcpy (s + dir_len + 1, path, path_len + 1);
*string = s;
}
return 1;
}
/* Read a set of DWARF 5 line header format entries, setting *PCOUNT
and *PPATHS. Return 1 on success, 0 on failure. */
static int
read_line_header_format_entries (struct backtrace_state *state,
struct dwarf_data *ddata,
struct unit *u,
struct dwarf_buf *hdr_buf,
struct line_header *hdr,
size_t *pcount,
const char ***ppaths)
{
size_t formats_count;
struct line_header_format *formats;
size_t paths_count;
const char **paths;
size_t i;
int ret;
formats_count = read_byte (hdr_buf);
if (formats_count == 0)
formats = NULL;
else
{
formats = ((struct line_header_format *)
backtrace_alloc (state,
(formats_count
* sizeof (struct line_header_format)),
hdr_buf->error_callback,
hdr_buf->data));
if (formats == NULL)
return 0;
for (i = 0; i < formats_count; i++)
{
formats[i].lnct = (int) read_uleb128(hdr_buf);
formats[i].form = (enum dwarf_form) read_uleb128 (hdr_buf);
}
}
paths_count = read_uleb128 (hdr_buf);
if (paths_count == 0)
{
*pcount = 0;
*ppaths = NULL;
ret = 1;
goto exit;
}
paths = ((const char **)
backtrace_alloc (state, paths_count * sizeof (const char *),
hdr_buf->error_callback, hdr_buf->data));
if (paths == NULL)
{
ret = 0;
goto exit;
}
for (i = 0; i < paths_count; i++)
{
if (!read_lnct (state, ddata, u, hdr_buf, hdr, formats_count,
formats, &paths[i]))
{
backtrace_free (state, paths,
paths_count * sizeof (const char *),
hdr_buf->error_callback, hdr_buf->data);
ret = 0;
goto exit;
}
}
*pcount = paths_count;
*ppaths = paths;
ret = 1;
exit:
if (formats != NULL)
backtrace_free (state, formats,
formats_count * sizeof (struct line_header_format),
hdr_buf->error_callback, hdr_buf->data);
return ret;
}
/* Read the line header. Return 1 on success, 0 on failure. */
static int
read_line_header (struct backtrace_state *state, struct dwarf_data *ddata,
struct unit *u, int is_dwarf64, struct dwarf_buf *line_buf,
struct line_header *hdr)
{
uint64_t hdrlen;
struct dwarf_buf hdr_buf;
hdr->version = read_uint16 (line_buf);
if (hdr->version < 2 || hdr->version > 5)
{
dwarf_buf_error (line_buf, "unsupported line number version", -1);
return 0;
}
if (hdr->version < 5)
hdr->addrsize = u->addrsize;
else
{
hdr->addrsize = read_byte (line_buf);
/* We could support a non-zero segment_selector_size but I doubt
we'll ever see it. */
if (read_byte (line_buf) != 0)
{
dwarf_buf_error (line_buf,
"non-zero segment_selector_size not supported",
-1);
return 0;
}
}
hdrlen = read_offset (line_buf, is_dwarf64);
hdr_buf = *line_buf;
hdr_buf.left = hdrlen;
if (!advance (line_buf, hdrlen))
return 0;
hdr->min_insn_len = read_byte (&hdr_buf);
if (hdr->version < 4)
hdr->max_ops_per_insn = 1;
else
hdr->max_ops_per_insn = read_byte (&hdr_buf);
/* We don't care about default_is_stmt. */
read_byte (&hdr_buf);
hdr->line_base = read_sbyte (&hdr_buf);
hdr->line_range = read_byte (&hdr_buf);
hdr->opcode_base = read_byte (&hdr_buf);
hdr->opcode_lengths = hdr_buf.buf;
if (!advance (&hdr_buf, hdr->opcode_base - 1))
return 0;
if (hdr->version < 5)
{
if (!read_v2_paths (state, u, &hdr_buf, hdr))
return 0;
}
else
{
if (!read_line_header_format_entries (state, ddata, u, &hdr_buf, hdr,
&hdr->dirs_count,
&hdr->dirs))
return 0;
if (!read_line_header_format_entries (state, ddata, u, &hdr_buf, hdr,
&hdr->filenames_count,
&hdr->filenames))
return 0;
}
if (hdr_buf.reported_underflow)
return 0;
return 1;
}
/* Read the line program, adding line mappings to VEC. Return 1 on
success, 0 on failure. */
static int
read_line_program (struct backtrace_state *state, struct dwarf_data *ddata,
const struct line_header *hdr, struct dwarf_buf *line_buf,
struct line_vector *vec)
{
uint64_t address;
unsigned int op_index;
const char *reset_filename;
const char *filename;
int lineno;
address = 0;
op_index = 0;
if (hdr->filenames_count > 1)
reset_filename = hdr->filenames[1];
else
reset_filename = "";
filename = reset_filename;
lineno = 1;
while (line_buf->left > 0)
{
unsigned int op;
op = read_byte (line_buf);
if (op >= hdr->opcode_base)
{
unsigned int advance;
/* Special opcode. */
op -= hdr->opcode_base;
advance = op / hdr->line_range;
address += (hdr->min_insn_len * (op_index + advance)
/ hdr->max_ops_per_insn);
op_index = (op_index + advance) % hdr->max_ops_per_insn;
lineno += hdr->line_base + (int) (op % hdr->line_range);
add_line (state, ddata, address, filename, lineno,
line_buf->error_callback, line_buf->data, vec);
}
else if (op == DW_LNS_extended_op)
{
uint64_t len;
len = read_uleb128 (line_buf);
op = read_byte (line_buf);
switch (op)
{
case DW_LNE_end_sequence:
/* FIXME: Should we mark the high PC here? It seems
that we already have that information from the
compilation unit. */
address = 0;
op_index = 0;
filename = reset_filename;
lineno = 1;
break;
case DW_LNE_set_address:
address = read_address (line_buf, hdr->addrsize);
break;
case DW_LNE_define_file:
{
const char *f;
unsigned int dir_index;
f = read_string (line_buf);
if (f == NULL)
return 0;
dir_index = read_uleb128 (line_buf);
/* Ignore that time and length. */
read_uleb128 (line_buf);
read_uleb128 (line_buf);
if (IS_ABSOLUTE_PATH (f))
filename = f;
else
{
const char *dir;
size_t dir_len;
size_t f_len;
char *p;
if (dir_index < hdr->dirs_count)
dir = hdr->dirs[dir_index];
else
{
dwarf_buf_error (line_buf,
("invalid directory index "
"in line number program"),
0);
return 0;
}
dir_len = strlen (dir);
f_len = strlen (f);
p = ((char *)
backtrace_alloc (state, dir_len + f_len + 2,
line_buf->error_callback,
line_buf->data));
if (p == NULL)
return 0;
memcpy (p, dir, dir_len);
/* FIXME: If we are on a DOS-based file system,
and the directory or the file name use
backslashes, then we should use a backslash
here. */
p[dir_len] = '/';
memcpy (p + dir_len + 1, f, f_len + 1);
filename = p;
}
}
break;
case DW_LNE_set_discriminator:
/* We don't care about discriminators. */
read_uleb128 (line_buf);
break;
default:
if (!advance (line_buf, len - 1))
return 0;
break;
}
}
else
{
switch (op)
{
case DW_LNS_copy:
add_line (state, ddata, address, filename, lineno,
line_buf->error_callback, line_buf->data, vec);
break;
case DW_LNS_advance_pc:
{
uint64_t advance;
advance = read_uleb128 (line_buf);
address += (hdr->min_insn_len * (op_index + advance)
/ hdr->max_ops_per_insn);
op_index = (op_index + advance) % hdr->max_ops_per_insn;
}
break;
case DW_LNS_advance_line:
lineno += (int) read_sleb128 (line_buf);
break;
case DW_LNS_set_file:
{
uint64_t fileno;
fileno = read_uleb128 (line_buf);
if (fileno >= hdr->filenames_count)
{
dwarf_buf_error (line_buf,
("invalid file number in "
"line number program"),
0);
return 0;
}
filename = hdr->filenames[fileno];
}
break;
case DW_LNS_set_column:
read_uleb128 (line_buf);
break;
case DW_LNS_negate_stmt:
break;
case DW_LNS_set_basic_block:
break;
case DW_LNS_const_add_pc:
{
unsigned int advance;
op = 255 - hdr->opcode_base;
advance = op / hdr->line_range;
address += (hdr->min_insn_len * (op_index + advance)
/ hdr->max_ops_per_insn);
op_index = (op_index + advance) % hdr->max_ops_per_insn;
}
break;
case DW_LNS_fixed_advance_pc:
address += read_uint16 (line_buf);
op_index = 0;
break;
case DW_LNS_set_prologue_end:
break;
case DW_LNS_set_epilogue_begin:
break;
case DW_LNS_set_isa:
read_uleb128 (line_buf);
break;
default:
{
unsigned int i;
for (i = hdr->opcode_lengths[op - 1]; i > 0; --i)
read_uleb128 (line_buf);
}
break;
}
}
}
return 1;
}
/* Read the line number information for a compilation unit. Returns 1
on success, 0 on failure. */
static int
read_line_info (struct backtrace_state *state, struct dwarf_data *ddata,
backtrace_error_callback error_callback, void *data,
struct unit *u, struct line_header *hdr, struct line **lines,
size_t *lines_count)
{
struct line_vector vec;
struct dwarf_buf line_buf;
uint64_t len;
int is_dwarf64;
struct line *ln;
memset (&vec.vec, 0, sizeof vec.vec);
vec.count = 0;
memset (hdr, 0, sizeof *hdr);
if (u->lineoff != (off_t) (size_t) u->lineoff
|| (size_t) u->lineoff >= ddata->dwarf_sections.size[DEBUG_LINE])
{
error_callback (data, "unit line offset out of range", 0);
goto fail;
}
line_buf.name = ".debug_line";
line_buf.start = ddata->dwarf_sections.data[DEBUG_LINE];
line_buf.buf = ddata->dwarf_sections.data[DEBUG_LINE] + u->lineoff;
line_buf.left = ddata->dwarf_sections.size[DEBUG_LINE] - u->lineoff;
line_buf.is_bigendian = ddata->is_bigendian;
line_buf.error_callback = error_callback;
line_buf.data = data;
line_buf.reported_underflow = 0;
len = read_initial_length (&line_buf, &is_dwarf64);
line_buf.left = len;
if (!read_line_header (state, ddata, u, is_dwarf64, &line_buf, hdr))
goto fail;
if (!read_line_program (state, ddata, hdr, &line_buf, &vec))
goto fail;
if (line_buf.reported_underflow)
goto fail;
if (vec.count == 0)
{
/* This is not a failure in the sense of a generating an error,
but it is a failure in that sense that we have no useful
information. */
goto fail;
}
/* Allocate one extra entry at the end. */
ln = ((struct line *)
backtrace_vector_grow (state, sizeof (struct line), error_callback,
data, &vec.vec));
if (ln == NULL)
goto fail;
ln->pc = (uintptr_t) -1;
ln->filename = NULL;
ln->lineno = 0;
ln->idx = 0;
if (!backtrace_vector_release (state, &vec.vec, error_callback, data))
goto fail;
ln = (struct line *) vec.vec.base;
backtrace_qsort (ln, vec.count, sizeof (struct line), line_compare);
*lines = ln;
*lines_count = vec.count;
return 1;
fail:
backtrace_vector_free (state, &vec.vec, error_callback, data);
free_line_header (state, hdr, error_callback, data);
*lines = (struct line *) (uintptr_t) -1;
*lines_count = 0;
return 0;
}
static const char *read_referenced_name (struct dwarf_data *, struct unit *,
uint64_t, backtrace_error_callback,
void *);
/* Read the name of a function from a DIE referenced by ATTR with VAL. */
static const char *
read_referenced_name_from_attr (struct dwarf_data *ddata, struct unit *u,
struct attr *attr, struct attr_val *val,
backtrace_error_callback error_callback,
void *data)
{
switch (attr->name)
{
case DW_AT_abstract_origin:
case DW_AT_specification:
break;
default:
return NULL;
}
if (attr->form == DW_FORM_ref_sig8)
return NULL;
if (val->encoding == ATTR_VAL_REF_INFO)
{
struct unit *unit
= find_unit (ddata->units, ddata->units_count,
val->u.uint);
if (unit == NULL)
return NULL;
uint64_t offset = val->u.uint - unit->low_offset;
return read_referenced_name (ddata, unit, offset, error_callback, data);
}
if (val->encoding == ATTR_VAL_UINT
|| val->encoding == ATTR_VAL_REF_UNIT)
return read_referenced_name (ddata, u, val->u.uint, error_callback, data);
if (val->encoding == ATTR_VAL_REF_ALT_INFO)
{
struct unit *alt_unit
= find_unit (ddata->altlink->units, ddata->altlink->units_count,
val->u.uint);
if (alt_unit == NULL)
return NULL;
uint64_t offset = val->u.uint - alt_unit->low_offset;
return read_referenced_name (ddata->altlink, alt_unit, offset,
error_callback, data);
}
return NULL;
}
/* Read the name of a function from a DIE referenced by a
DW_AT_abstract_origin or DW_AT_specification tag. OFFSET is within
the same compilation unit. */
static const char *
read_referenced_name (struct dwarf_data *ddata, struct unit *u,
uint64_t offset, backtrace_error_callback error_callback,
void *data)
{
struct dwarf_buf unit_buf;
uint64_t code;
const struct abbrev *abbrev;
const char *ret;
size_t i;
/* OFFSET is from the start of the data for this compilation unit.
U->unit_data is the data, but it starts U->unit_data_offset bytes
from the beginning. */
if (offset < u->unit_data_offset
|| offset - u->unit_data_offset >= u->unit_data_len)
{
error_callback (data,
"abstract origin or specification out of range",
0);
return NULL;
}
offset -= u->unit_data_offset;
unit_buf.name = ".debug_info";
unit_buf.start = ddata->dwarf_sections.data[DEBUG_INFO];
unit_buf.buf = u->unit_data + offset;
unit_buf.left = u->unit_data_len - offset;
unit_buf.is_bigendian = ddata->is_bigendian;
unit_buf.error_callback = error_callback;
unit_buf.data = data;
unit_buf.reported_underflow = 0;
code = read_uleb128 (&unit_buf);
if (code == 0)
{
dwarf_buf_error (&unit_buf,
"invalid abstract origin or specification",
0);
return NULL;
}
abbrev = lookup_abbrev (&u->abbrevs, code, error_callback, data);
if (abbrev == NULL)
return NULL;
ret = NULL;
for (i = 0; i < abbrev->num_attrs; ++i)
{
struct attr_val val;
if (!read_attribute (abbrev->attrs[i].form, abbrev->attrs[i].val,
&unit_buf, u->is_dwarf64, u->version, u->addrsize,
&ddata->dwarf_sections, ddata->altlink, &val))
return NULL;
switch (abbrev->attrs[i].name)
{
case DW_AT_name:
/* Third name preference: don't override. A name we found in some
other way, will normally be more useful -- e.g., this name is
normally not mangled. */
if (ret != NULL)
break;
if (!resolve_string (&ddata->dwarf_sections, u->is_dwarf64,
ddata->is_bigendian, u->str_offsets_base,
&val, error_callback, data, &ret))
return NULL;
break;
case DW_AT_linkage_name:
case DW_AT_MIPS_linkage_name:
/* First name preference: override all. */
{
const char *s;
s = NULL;
if (!resolve_string (&ddata->dwarf_sections, u->is_dwarf64,
ddata->is_bigendian, u->str_offsets_base,
&val, error_callback, data, &s))
return NULL;
if (s != NULL)
return s;
}
break;
case DW_AT_specification:
/* Second name preference: override DW_AT_name, don't override
DW_AT_linkage_name. */
{
const char *name;
name = read_referenced_name_from_attr (ddata, u, &abbrev->attrs[i],
&val, error_callback, data);
if (name != NULL)
ret = name;
}
break;
default:
break;
}
}
return ret;
}
/* Add a range to a unit that maps to a function. This is called via
add_ranges. Returns 1 on success, 0 on error. */
static int
add_function_range (struct backtrace_state *state, void *rdata,
uint64_t lowpc, uint64_t highpc,
backtrace_error_callback error_callback, void *data,
void *pvec)
{
struct function *function = (struct function *) rdata;
struct function_vector *vec = (struct function_vector *) pvec;
struct function_addrs *p;
if (vec->count > 0)
{
p = (struct function_addrs *) vec->vec.base + (vec->count - 1);
if ((lowpc == p->high || lowpc == p->high + 1)
&& function == p->function)
{
if (highpc > p->high)
p->high = highpc;
return 1;
}
}
p = ((struct function_addrs *)
backtrace_vector_grow (state, sizeof (struct function_addrs),
error_callback, data, &vec->vec));
if (p == NULL)
return 0;
p->low = lowpc;
p->high = highpc;
p->function = function;
++vec->count;
return 1;
}
/* Read one entry plus all its children. Add function addresses to
VEC. Returns 1 on success, 0 on error. */
static int
read_function_entry (struct backtrace_state *state, struct dwarf_data *ddata,
struct unit *u, uint64_t base, struct dwarf_buf *unit_buf,
const struct line_header *lhdr,
backtrace_error_callback error_callback, void *data,
struct function_vector *vec_function,
struct function_vector *vec_inlined)
{
while (unit_buf->left > 0)
{
uint64_t code;
const struct abbrev *abbrev;
int is_function;
struct function *function;
struct function_vector *vec;
size_t i;
struct pcrange pcrange;
int have_linkage_name;
code = read_uleb128 (unit_buf);
if (code == 0)
return 1;
abbrev = lookup_abbrev (&u->abbrevs, code, error_callback, data);
if (abbrev == NULL)
return 0;
is_function = (abbrev->tag == DW_TAG_subprogram
|| abbrev->tag == DW_TAG_entry_point
|| abbrev->tag == DW_TAG_inlined_subroutine);
if (abbrev->tag == DW_TAG_inlined_subroutine)
vec = vec_inlined;
else
vec = vec_function;
function = NULL;
if (is_function)
{
function = ((struct function *)
backtrace_alloc (state, sizeof *function,
error_callback, data));
if (function == NULL)
return 0;
memset (function, 0, sizeof *function);
}
memset (&pcrange, 0, sizeof pcrange);
have_linkage_name = 0;
for (i = 0; i < abbrev->num_attrs; ++i)
{
struct attr_val val;
if (!read_attribute (abbrev->attrs[i].form, abbrev->attrs[i].val,
unit_buf, u->is_dwarf64, u->version,
u->addrsize, &ddata->dwarf_sections,
ddata->altlink, &val))
return 0;
/* The compile unit sets the base address for any address
ranges in the function entries. */
if ((abbrev->tag == DW_TAG_compile_unit
|| abbrev->tag == DW_TAG_skeleton_unit)
&& abbrev->attrs[i].name == DW_AT_low_pc)
{
if (val.encoding == ATTR_VAL_ADDRESS)
base = val.u.uint;
else if (val.encoding == ATTR_VAL_ADDRESS_INDEX)
{
if (!resolve_addr_index (&ddata->dwarf_sections,
u->addr_base, u->addrsize,
ddata->is_bigendian, val.u.uint,
error_callback, data, &base))
return 0;
}
}
if (is_function)
{
switch (abbrev->attrs[i].name)
{
case DW_AT_call_file:
if (val.encoding == ATTR_VAL_UINT)
{
if (val.u.uint >= lhdr->filenames_count)
{
dwarf_buf_error (unit_buf,
("invalid file number in "
"DW_AT_call_file attribute"),
0);
return 0;
}
function->caller_filename = lhdr->filenames[val.u.uint];
}
break;
case DW_AT_call_line:
if (val.encoding == ATTR_VAL_UINT)
function->caller_lineno = val.u.uint;
break;
case DW_AT_abstract_origin:
case DW_AT_specification:
/* Second name preference: override DW_AT_name, don't override
DW_AT_linkage_name. */
if (have_linkage_name)
break;
{
const char *name;
name
= read_referenced_name_from_attr (ddata, u,
&abbrev->attrs[i], &val,
error_callback, data);
if (name != NULL)
function->name = name;
}
break;
case DW_AT_name:
/* Third name preference: don't override. */
if (function->name != NULL)
break;
if (!resolve_string (&ddata->dwarf_sections, u->is_dwarf64,
ddata->is_bigendian,
u->str_offsets_base, &val,
error_callback, data, &function->name))
return 0;
break;
case DW_AT_linkage_name:
case DW_AT_MIPS_linkage_name:
/* First name preference: override all. */
{
const char *s;
s = NULL;
if (!resolve_string (&ddata->dwarf_sections, u->is_dwarf64,
ddata->is_bigendian,
u->str_offsets_base, &val,
error_callback, data, &s))
return 0;
if (s != NULL)
{
function->name = s;
have_linkage_name = 1;
}
}
break;
case DW_AT_low_pc: case DW_AT_high_pc: case DW_AT_ranges:
update_pcrange (&abbrev->attrs[i], &val, &pcrange);
break;
default:
break;
}
}
}
/* If we couldn't find a name for the function, we have no use
for it. */
if (is_function && function->name == NULL)
{
backtrace_free (state, function, sizeof *function,
error_callback, data);
is_function = 0;
}
if (is_function)
{
if (pcrange.have_ranges
|| (pcrange.have_lowpc && pcrange.have_highpc))
{
if (!add_ranges (state, &ddata->dwarf_sections,
ddata->base_address, ddata->is_bigendian,
u, base, &pcrange, add_function_range,
(void *) function, error_callback, data,
(void *) vec))
return 0;
}
else
{
backtrace_free (state, function, sizeof *function,
error_callback, data);
is_function = 0;
}
}
if (abbrev->has_children)
{
if (!is_function)
{
if (!read_function_entry (state, ddata, u, base, unit_buf, lhdr,
error_callback, data, vec_function,
vec_inlined))
return 0;
}
else
{
struct function_vector fvec;
/* Gather any information for inlined functions in
FVEC. */
memset (&fvec, 0, sizeof fvec);
if (!read_function_entry (state, ddata, u, base, unit_buf, lhdr,
error_callback, data, vec_function,
&fvec))
return 0;
if (fvec.count > 0)
{
struct function_addrs *p;
struct function_addrs *faddrs;
/* Allocate a trailing entry, but don't include it
in fvec.count. */
p = ((struct function_addrs *)
backtrace_vector_grow (state,
sizeof (struct function_addrs),
error_callback, data,
&fvec.vec));
if (p == NULL)
return 0;
p->low = 0;
--p->low;
p->high = p->low;
p->function = NULL;
if (!backtrace_vector_release (state, &fvec.vec,
error_callback, data))
return 0;
faddrs = (struct function_addrs *) fvec.vec.base;
backtrace_qsort (faddrs, fvec.count,
sizeof (struct function_addrs),
function_addrs_compare);
function->function_addrs = faddrs;
function->function_addrs_count = fvec.count;
}
}
}
}
return 1;
}
/* Read function name information for a compilation unit. We look
through the whole unit looking for function tags. */
static void
read_function_info (struct backtrace_state *state, struct dwarf_data *ddata,
const struct line_header *lhdr,
backtrace_error_callback error_callback, void *data,
struct unit *u, struct function_vector *fvec,
struct function_addrs **ret_addrs,
size_t *ret_addrs_count)
{
struct function_vector lvec;
struct function_vector *pfvec;
struct dwarf_buf unit_buf;
struct function_addrs *p;
struct function_addrs *addrs;
size_t addrs_count;
/* Use FVEC if it is not NULL. Otherwise use our own vector. */
if (fvec != NULL)
pfvec = fvec;
else
{
memset (&lvec, 0, sizeof lvec);
pfvec = &lvec;
}
unit_buf.name = ".debug_info";
unit_buf.start = ddata->dwarf_sections.data[DEBUG_INFO];
unit_buf.buf = u->unit_data;
unit_buf.left = u->unit_data_len;
unit_buf.is_bigendian = ddata->is_bigendian;
unit_buf.error_callback = error_callback;
unit_buf.data = data;
unit_buf.reported_underflow = 0;
while (unit_buf.left > 0)
{
if (!read_function_entry (state, ddata, u, 0, &unit_buf, lhdr,
error_callback, data, pfvec, pfvec))
return;
}
if (pfvec->count == 0)
return;
/* Allocate a trailing entry, but don't include it in
pfvec->count. */
p = ((struct function_addrs *)
backtrace_vector_grow (state, sizeof (struct function_addrs),
error_callback, data, &pfvec->vec));
if (p == NULL)
return;
p->low = 0;
--p->low;
p->high = p->low;
p->function = NULL;
addrs_count = pfvec->count;
if (fvec == NULL)
{
if (!backtrace_vector_release (state, &lvec.vec, error_callback, data))
return;
addrs = (struct function_addrs *) pfvec->vec.base;
}
else
{
/* Finish this list of addresses, but leave the remaining space in
the vector available for the next function unit. */
addrs = ((struct function_addrs *)
backtrace_vector_finish (state, &fvec->vec,
error_callback, data));
if (addrs == NULL)
return;
fvec->count = 0;
}
backtrace_qsort (addrs, addrs_count, sizeof (struct function_addrs),
function_addrs_compare);
*ret_addrs = addrs;
*ret_addrs_count = addrs_count;
}
/* See if PC is inlined in FUNCTION. If it is, print out the inlined
information, and update FILENAME and LINENO for the caller.
Returns whatever CALLBACK returns, or 0 to keep going. */
static int
report_inlined_functions (uintptr_t pc, struct function *function, const char* comp_dir,
backtrace_full_callback callback, void *data,
const char **filename, int *lineno)
{
struct function_addrs *p;
struct function_addrs *match;
struct function *inlined;
int ret;
if (function->function_addrs_count == 0)
return 0;
/* Our search isn't safe if pc == -1, as that is the sentinel
value. */
if (pc + 1 == 0)
return 0;
p = ((struct function_addrs *)
bsearch (&pc, function->function_addrs,
function->function_addrs_count,
sizeof (struct function_addrs),
function_addrs_search));
if (p == NULL)
return 0;
/* Here pc >= p->low && pc < (p + 1)->low. The function_addrs are
sorted by low, so if pc > p->low we are at the end of a range of
function_addrs with the same low value. If pc == p->low walk
forward to the end of the range with that low value. Then walk
backward and use the first range that includes pc. */
while (pc == (p + 1)->low)
++p;
match = NULL;
while (1)
{
if (pc < p->high)
{
match = p;
break;
}
if (p == function->function_addrs)
break;
if ((p - 1)->low < p->low)
break;
--p;
}
if (match == NULL)
return 0;
/* We found an inlined call. */
inlined = match->function;
/* Report any calls inlined into this one. */
ret = report_inlined_functions (pc, inlined, comp_dir, callback, data,
filename, lineno);
if (ret != 0)
return ret;
/* Report this inlined call. */
if (*filename[0] != '/' && comp_dir)
{
char buf[1024];
snprintf (buf, 1024, "%s/%s", comp_dir, *filename);
ret = callback (data, pc, match->low, buf, *lineno, inlined->name);
}
else
{
ret = callback (data, pc, match->low, *filename, *lineno, inlined->name);
}
if (ret != 0)
return ret;
/* Our caller will report the caller of the inlined function; tell
it the appropriate filename and line number. */
*filename = inlined->caller_filename;
*lineno = inlined->caller_lineno;
return 0;
}
/* Look for a PC in the DWARF mapping for one module. On success,
call CALLBACK and return whatever it returns. On error, call
ERROR_CALLBACK and return 0. Sets *FOUND to 1 if the PC is found,
0 if not. */
static int
dwarf_lookup_pc (struct backtrace_state *state, struct dwarf_data *ddata,
uintptr_t pc, backtrace_full_callback callback,
backtrace_error_callback error_callback, void *data,
int *found)
{
struct unit_addrs *entry;
int found_entry;
struct unit *u;
int new_data;
struct line *lines;
struct line *ln;
struct function_addrs *p;
struct function_addrs *fmatch;
struct function *function;
const char *filename;
int lineno;
int ret;
*found = 1;
/* Find an address range that includes PC. Our search isn't safe if
PC == -1, as we use that as a sentinel value, so skip the search
in that case. */
entry = (ddata->addrs_count == 0 || pc + 1 == 0
? NULL
: (struct unit_addrs*)bsearch (&pc, ddata->addrs, ddata->addrs_count,
sizeof (struct unit_addrs), unit_addrs_search));
if (entry == NULL)
{
*found = 0;
return 0;
}
/* Here pc >= entry->low && pc < (entry + 1)->low. The unit_addrs
are sorted by low, so if pc > p->low we are at the end of a range
of unit_addrs with the same low value. If pc == p->low walk
forward to the end of the range with that low value. Then walk
backward and use the first range that includes pc. */
while (pc == (entry + 1)->low)
++entry;
found_entry = 0;
while (1)
{
if (pc < entry->high)
{
found_entry = 1;
break;
}
if (entry == ddata->addrs)
break;
if ((entry - 1)->low < entry->low)
break;
--entry;
}
if (!found_entry)
{
*found = 0;
return 0;
}
/* We need the lines, lines_count, function_addrs,
function_addrs_count fields of u. If they are not set, we need
to set them. When running in threaded mode, we need to allow for
the possibility that some other thread is setting them
simultaneously. */
u = entry->u;
lines = u->lines;
/* Skip units with no useful line number information by walking
backward. Useless line number information is marked by setting
lines == -1. */
while (entry > ddata->addrs
&& pc >= (entry - 1)->low
&& pc < (entry - 1)->high)
{
if (state->threaded)
lines = (struct line *) backtrace_atomic_load_pointer (&u->lines);
if (lines != (struct line *) (uintptr_t) -1)
break;
--entry;
u = entry->u;
lines = u->lines;
}
if (state->threaded)
lines = backtrace_atomic_load_pointer (&u->lines);
new_data = 0;
if (lines == NULL)
{
struct function_addrs *function_addrs;
size_t function_addrs_count;
struct line_header lhdr;
size_t count;
/* We have never read the line information for this unit. Read
it now. */
function_addrs = NULL;
function_addrs_count = 0;
if (read_line_info (state, ddata, error_callback, data, entry->u, &lhdr,
&lines, &count))
{
struct function_vector *pfvec;
/* If not threaded, reuse DDATA->FVEC for better memory
consumption. */
if (state->threaded)
pfvec = NULL;
else
pfvec = &ddata->fvec;
read_function_info (state, ddata, &lhdr, error_callback, data,
entry->u, pfvec, &function_addrs,
&function_addrs_count);
free_line_header (state, &lhdr, error_callback, data);
new_data = 1;
}
/* Atomically store the information we just read into the unit.
If another thread is simultaneously writing, it presumably
read the same information, and we don't care which one we
wind up with; we just leak the other one. We do have to
write the lines field last, so that the acquire-loads above
ensure that the other fields are set. */
if (!state->threaded)
{
u->lines_count = count;
u->function_addrs = function_addrs;
u->function_addrs_count = function_addrs_count;
u->lines = lines;
}
else
{
backtrace_atomic_store_size_t (&u->lines_count, count);
backtrace_atomic_store_pointer (&u->function_addrs, function_addrs);
backtrace_atomic_store_size_t (&u->function_addrs_count,
function_addrs_count);
backtrace_atomic_store_pointer (&u->lines, lines);
}
}
/* Now all fields of U have been initialized. */
if (lines == (struct line *) (uintptr_t) -1)
{
/* If reading the line number information failed in some way,
try again to see if there is a better compilation unit for
this PC. */
if (new_data)
return dwarf_lookup_pc (state, ddata, pc, callback, error_callback,
data, found);
return callback (data, pc, 0, NULL, 0, NULL);
}
/* Search for PC within this unit. */
ln = (struct line *) bsearch (&pc, lines, entry->u->lines_count,
sizeof (struct line), line_search);
if (ln == NULL)
{
/* The PC is between the low_pc and high_pc attributes of the
compilation unit, but no entry in the line table covers it.
This implies that the start of the compilation unit has no
line number information. */
if (entry->u->abs_filename == NULL)
{
const char *filename;
filename = entry->u->filename;
if (filename != NULL
&& !IS_ABSOLUTE_PATH (filename)
&& entry->u->comp_dir != NULL)
{
size_t filename_len;
const char *dir;
size_t dir_len;
char *s;
filename_len = strlen (filename);
dir = entry->u->comp_dir;
dir_len = strlen (dir);
s = (char *) backtrace_alloc (state, dir_len + filename_len + 2,
error_callback, data);
if (s == NULL)
{
*found = 0;
return 0;
}
memcpy (s, dir, dir_len);
/* FIXME: Should use backslash if DOS file system. */
s[dir_len] = '/';
memcpy (s + dir_len + 1, filename, filename_len + 1);
filename = s;
}
entry->u->abs_filename = filename;
}
return callback (data, pc, 0, entry->u->abs_filename, 0, NULL);
}
/* Search for function name within this unit. */
if (entry->u->function_addrs_count == 0)
return callback (data, pc, 0, ln->filename, ln->lineno, NULL);
p = ((struct function_addrs *)
bsearch (&pc, entry->u->function_addrs,
entry->u->function_addrs_count,
sizeof (struct function_addrs),
function_addrs_search));
if (p == NULL)
return callback (data, pc, 0, ln->filename, ln->lineno, NULL);
/* Here pc >= p->low && pc < (p + 1)->low. The function_addrs are
sorted by low, so if pc > p->low we are at the end of a range of
function_addrs with the same low value. If pc == p->low walk
forward to the end of the range with that low value. Then walk
backward and use the first range that includes pc. */
while (pc == (p + 1)->low)
++p;
fmatch = NULL;
while (1)
{
if (pc < p->high)
{
fmatch = p;
break;
}
if (p == entry->u->function_addrs)
break;
if ((p - 1)->low < p->low)
break;
--p;
}
if (fmatch == NULL)
return callback (data, pc, 0, ln->filename, ln->lineno, NULL);
function = fmatch->function;
filename = ln->filename;
lineno = ln->lineno;
ret = report_inlined_functions (pc, function, entry->u->comp_dir, callback, data,
&filename, &lineno);
if (ret != 0)
return ret;
if (filename[0] != '/' && entry->u->comp_dir)
{
char buf[1024];
snprintf (buf, 1024, "%s/%s", entry->u->comp_dir, filename);
return callback (data, pc, fmatch->low, buf, lineno, function->name);
}
else
{
return callback (data, pc, fmatch->low, filename, lineno, function->name);
}
}
/* Return the file/line information for a PC using the DWARF mapping
we built earlier. */
static int
dwarf_fileline (struct backtrace_state *state, uintptr_t pc,
backtrace_full_callback callback,
backtrace_error_callback error_callback, void *data)
{
struct dwarf_data *ddata;
int found;
int ret;
if (!state->threaded)
{
for (ddata = (struct dwarf_data *) state->fileline_data;
ddata != NULL;
ddata = ddata->next)
{
ret = dwarf_lookup_pc (state, ddata, pc, callback, error_callback,
data, &found);
if (ret != 0 || found)
return ret;
}
}
else
{
struct dwarf_data **pp;
pp = (struct dwarf_data **) (void *) &state->fileline_data;
while (1)
{
ddata = backtrace_atomic_load_pointer (pp);
if (ddata == NULL)
break;
ret = dwarf_lookup_pc (state, ddata, pc, callback, error_callback,
data, &found);
if (ret != 0 || found)
return ret;
pp = &ddata->next;
}
}
/* FIXME: See if any libraries have been dlopen'ed. */
return callback (data, pc, 0, NULL, 0, NULL);
}
/* Initialize our data structures from the DWARF debug info for a
file. Return NULL on failure. */
static struct dwarf_data *
build_dwarf_data (struct backtrace_state *state,
uintptr_t base_address,
const struct dwarf_sections *dwarf_sections,
int is_bigendian,
struct dwarf_data *altlink,
backtrace_error_callback error_callback,
void *data)
{
struct unit_addrs_vector addrs_vec;
struct unit_addrs *addrs;
size_t addrs_count;
struct unit_vector units_vec;
struct unit **units;
size_t units_count;
struct dwarf_data *fdata;
if (!build_address_map (state, base_address, dwarf_sections, is_bigendian,
altlink, error_callback, data, &addrs_vec,
&units_vec))
return NULL;
if (!backtrace_vector_release (state, &addrs_vec.vec, error_callback, data))
return NULL;
if (!backtrace_vector_release (state, &units_vec.vec, error_callback, data))
return NULL;
addrs = (struct unit_addrs *) addrs_vec.vec.base;
units = (struct unit **) units_vec.vec.base;
addrs_count = addrs_vec.count;
units_count = units_vec.count;
backtrace_qsort (addrs, addrs_count, sizeof (struct unit_addrs),
unit_addrs_compare);
/* No qsort for units required, already sorted. */
fdata = ((struct dwarf_data *)
backtrace_alloc (state, sizeof (struct dwarf_data),
error_callback, data));
if (fdata == NULL)
return NULL;
fdata->next = NULL;
fdata->altlink = altlink;
fdata->base_address = base_address;
fdata->addrs = addrs;
fdata->addrs_count = addrs_count;
fdata->units = units;
fdata->units_count = units_count;
fdata->dwarf_sections = *dwarf_sections;
fdata->is_bigendian = is_bigendian;
memset (&fdata->fvec, 0, sizeof fdata->fvec);
return fdata;
}
/* Build our data structures from the DWARF sections for a module.
Set FILELINE_FN and STATE->FILELINE_DATA. Return 1 on success, 0
on failure. */
int
backtrace_dwarf_add (struct backtrace_state *state,
uintptr_t base_address,
const struct dwarf_sections *dwarf_sections,
int is_bigendian,
struct dwarf_data *fileline_altlink,
backtrace_error_callback error_callback,
void *data, fileline *fileline_fn,
struct dwarf_data **fileline_entry)
{
struct dwarf_data *fdata;
fdata = build_dwarf_data (state, base_address, dwarf_sections, is_bigendian,
fileline_altlink, error_callback, data);
if (fdata == NULL)
return 0;
if (fileline_entry != NULL)
*fileline_entry = fdata;
if (!state->threaded)
{
struct dwarf_data **pp;
for (pp = (struct dwarf_data **) (void *) &state->fileline_data;
*pp != NULL;
pp = &(*pp)->next)
;
*pp = fdata;
}
else
{
while (1)
{
struct dwarf_data **pp;
pp = (struct dwarf_data **) (void *) &state->fileline_data;
while (1)
{
struct dwarf_data *p;
p = backtrace_atomic_load_pointer (pp);
if (p == NULL)
break;
pp = &p->next;
}
if (__sync_bool_compare_and_swap (pp, NULL, fdata))
break;
}
}
*fileline_fn = dwarf_fileline;
return 1;
}
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/elf.cpp | /* elf.c -- Get debug data from an ELF file for backtraces.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#ifdef HAVE_DL_ITERATE_PHDR
#include <link.h>
#endif
#include "backtrace.hpp"
#include "internal.hpp"
#include "../client/TracyFastVector.hpp"
#include "../common/TracyAlloc.hpp"
#ifndef S_ISLNK
#ifndef S_IFLNK
#define S_IFLNK 0120000
#endif
#ifndef S_IFMT
#define S_IFMT 0170000
#endif
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
#endif
#ifndef __GNUC__
#define __builtin_prefetch(p, r, l)
#ifndef unlikely
#define unlikely(x) (x)
#endif
#else
#ifndef unlikely
#define unlikely(x) __builtin_expect(!!(x), 0)
#endif
#endif
namespace tracy
{
#ifdef TRACY_DEBUGINFOD
int GetDebugInfoDescriptor( const char* buildid_data, size_t buildid_size );
#endif
#if !defined(HAVE_DECL_STRNLEN) || !HAVE_DECL_STRNLEN
/* If strnlen is not declared, provide our own version. */
static size_t
xstrnlen (const char *s, size_t maxlen)
{
size_t i;
for (i = 0; i < maxlen; ++i)
if (s[i] == '\0')
break;
return i;
}
#define strnlen xstrnlen
#endif
#ifndef HAVE_LSTAT
/* Dummy version of lstat for systems that don't have it. */
static int
xlstat (const char *path ATTRIBUTE_UNUSED, struct stat *st ATTRIBUTE_UNUSED)
{
return -1;
}
#define lstat xlstat
#endif
#ifndef HAVE_READLINK
/* Dummy version of readlink for systems that don't have it. */
static ssize_t
xreadlink (const char *path ATTRIBUTE_UNUSED, char *buf ATTRIBUTE_UNUSED,
size_t bufsz ATTRIBUTE_UNUSED)
{
return -1;
}
#define readlink xreadlink
#endif
#ifndef HAVE_DL_ITERATE_PHDR
/* Dummy version of dl_iterate_phdr for systems that don't have it. */
#define dl_phdr_info x_dl_phdr_info
#define dl_iterate_phdr x_dl_iterate_phdr
struct dl_phdr_info
{
uintptr_t dlpi_addr;
const char *dlpi_name;
};
static int
dl_iterate_phdr (int (*callback) (struct dl_phdr_info *,
size_t, void *) ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
return 0;
}
#endif /* ! defined (HAVE_DL_ITERATE_PHDR) */
/* The configure script must tell us whether we are 32-bit or 64-bit
ELF. We could make this code test and support either possibility,
but there is no point. This code only works for the currently
running executable, which means that we know the ELF mode at
configure time. */
#if BACKTRACE_ELF_SIZE != 32 && BACKTRACE_ELF_SIZE != 64
#error "Unknown BACKTRACE_ELF_SIZE"
#endif
/* <link.h> might #include <elf.h> which might define our constants
with slightly different values. Undefine them to be safe. */
#undef EI_NIDENT
#undef EI_MAG0
#undef EI_MAG1
#undef EI_MAG2
#undef EI_MAG3
#undef EI_CLASS
#undef EI_DATA
#undef EI_VERSION
#undef ELF_MAG0
#undef ELF_MAG1
#undef ELF_MAG2
#undef ELF_MAG3
#undef ELFCLASS32
#undef ELFCLASS64
#undef ELFDATA2LSB
#undef ELFDATA2MSB
#undef EV_CURRENT
#undef ET_DYN
#undef EM_PPC64
#undef EF_PPC64_ABI
#undef SHN_LORESERVE
#undef SHN_XINDEX
#undef SHN_UNDEF
#undef SHT_PROGBITS
#undef SHT_SYMTAB
#undef SHT_STRTAB
#undef SHT_DYNSYM
#undef SHF_COMPRESSED
#undef STT_OBJECT
#undef STT_FUNC
#undef NT_GNU_BUILD_ID
#undef ELFCOMPRESS_ZLIB
/* Basic types. */
typedef uint16_t b_elf_half; /* Elf_Half. */
typedef uint32_t b_elf_word; /* Elf_Word. */
typedef int32_t b_elf_sword; /* Elf_Sword. */
#if BACKTRACE_ELF_SIZE == 32
typedef uint32_t b_elf_addr; /* Elf_Addr. */
typedef uint32_t b_elf_off; /* Elf_Off. */
typedef uint32_t b_elf_wxword; /* 32-bit Elf_Word, 64-bit ELF_Xword. */
#else
typedef uint64_t b_elf_addr; /* Elf_Addr. */
typedef uint64_t b_elf_off; /* Elf_Off. */
typedef uint64_t b_elf_xword; /* Elf_Xword. */
typedef int64_t b_elf_sxword; /* Elf_Sxword. */
typedef uint64_t b_elf_wxword; /* 32-bit Elf_Word, 64-bit ELF_Xword. */
#endif
/* Data structures and associated constants. */
#define EI_NIDENT 16
typedef struct {
unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */
b_elf_half e_type; /* Identifies object file type */
b_elf_half e_machine; /* Specifies required architecture */
b_elf_word e_version; /* Identifies object file version */
b_elf_addr e_entry; /* Entry point virtual address */
b_elf_off e_phoff; /* Program header table file offset */
b_elf_off e_shoff; /* Section header table file offset */
b_elf_word e_flags; /* Processor-specific flags */
b_elf_half e_ehsize; /* ELF header size in bytes */
b_elf_half e_phentsize; /* Program header table entry size */
b_elf_half e_phnum; /* Program header table entry count */
b_elf_half e_shentsize; /* Section header table entry size */
b_elf_half e_shnum; /* Section header table entry count */
b_elf_half e_shstrndx; /* Section header string table index */
} b_elf_ehdr; /* Elf_Ehdr. */
#define EI_MAG0 0
#define EI_MAG1 1
#define EI_MAG2 2
#define EI_MAG3 3
#define EI_CLASS 4
#define EI_DATA 5
#define EI_VERSION 6
#define ELFMAG0 0x7f
#define ELFMAG1 'E'
#define ELFMAG2 'L'
#define ELFMAG3 'F'
#define ELFCLASS32 1
#define ELFCLASS64 2
#define ELFDATA2LSB 1
#define ELFDATA2MSB 2
#define EV_CURRENT 1
#define ET_DYN 3
#define EM_PPC64 21
#define EF_PPC64_ABI 3
typedef struct {
b_elf_word sh_name; /* Section name, index in string tbl */
b_elf_word sh_type; /* Type of section */
b_elf_wxword sh_flags; /* Miscellaneous section attributes */
b_elf_addr sh_addr; /* Section virtual addr at execution */
b_elf_off sh_offset; /* Section file offset */
b_elf_wxword sh_size; /* Size of section in bytes */
b_elf_word sh_link; /* Index of another section */
b_elf_word sh_info; /* Additional section information */
b_elf_wxword sh_addralign; /* Section alignment */
b_elf_wxword sh_entsize; /* Entry size if section holds table */
} b_elf_shdr; /* Elf_Shdr. */
#define SHN_UNDEF 0x0000 /* Undefined section */
#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */
#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */
#define SHT_PROGBITS 1
#define SHT_SYMTAB 2
#define SHT_STRTAB 3
#define SHT_DYNSYM 11
#define SHF_COMPRESSED 0x800
#if BACKTRACE_ELF_SIZE == 32
typedef struct
{
b_elf_word st_name; /* Symbol name, index in string tbl */
b_elf_addr st_value; /* Symbol value */
b_elf_word st_size; /* Symbol size */
unsigned char st_info; /* Symbol binding and type */
unsigned char st_other; /* Visibility and other data */
b_elf_half st_shndx; /* Symbol section index */
} b_elf_sym; /* Elf_Sym. */
#else /* BACKTRACE_ELF_SIZE != 32 */
typedef struct
{
b_elf_word st_name; /* Symbol name, index in string tbl */
unsigned char st_info; /* Symbol binding and type */
unsigned char st_other; /* Visibility and other data */
b_elf_half st_shndx; /* Symbol section index */
b_elf_addr st_value; /* Symbol value */
b_elf_xword st_size; /* Symbol size */
} b_elf_sym; /* Elf_Sym. */
#endif /* BACKTRACE_ELF_SIZE != 32 */
#define STT_OBJECT 1
#define STT_FUNC 2
typedef struct
{
uint32_t namesz;
uint32_t descsz;
uint32_t type;
char name[1];
} b_elf_note;
#define NT_GNU_BUILD_ID 3
#if BACKTRACE_ELF_SIZE == 32
typedef struct
{
b_elf_word ch_type; /* Compresstion algorithm */
b_elf_word ch_size; /* Uncompressed size */
b_elf_word ch_addralign; /* Alignment for uncompressed data */
} b_elf_chdr; /* Elf_Chdr */
#else /* BACKTRACE_ELF_SIZE != 32 */
typedef struct
{
b_elf_word ch_type; /* Compression algorithm */
b_elf_word ch_reserved; /* Reserved */
b_elf_xword ch_size; /* Uncompressed size */
b_elf_xword ch_addralign; /* Alignment for uncompressed data */
} b_elf_chdr; /* Elf_Chdr */
#endif /* BACKTRACE_ELF_SIZE != 32 */
#define ELFCOMPRESS_ZLIB 1
/* Names of sections, indexed by enum dwarf_section in internal.h. */
static const char * const dwarf_section_names[DEBUG_MAX] =
{
".debug_info",
".debug_line",
".debug_abbrev",
".debug_ranges",
".debug_str",
".debug_addr",
".debug_str_offsets",
".debug_line_str",
".debug_rnglists"
};
/* Information we gather for the sections we care about. */
struct debug_section_info
{
/* Section file offset. */
off_t offset;
/* Section size. */
size_t size;
/* Section contents, after read from file. */
const unsigned char *data;
/* Whether the SHF_COMPRESSED flag is set for the section. */
int compressed;
};
/* Information we keep for an ELF symbol. */
struct elf_symbol
{
/* The name of the symbol. */
const char *name;
/* The address of the symbol. */
uintptr_t address;
/* The size of the symbol. */
size_t size;
};
/* Information to pass to elf_syminfo. */
struct elf_syminfo_data
{
/* Symbols for the next module. */
struct elf_syminfo_data *next;
/* The ELF symbols, sorted by address. */
struct elf_symbol *symbols;
/* The number of symbols. */
size_t count;
};
/* A view that works for either a file or memory. */
struct elf_view
{
struct backtrace_view view;
int release; /* If non-zero, must call backtrace_release_view. */
};
/* Information about PowerPC64 ELFv1 .opd section. */
struct elf_ppc64_opd_data
{
/* Address of the .opd section. */
b_elf_addr addr;
/* Section data. */
const char *data;
/* Size of the .opd section. */
size_t size;
/* Corresponding section view. */
struct elf_view view;
};
/* Create a view of SIZE bytes from DESCRIPTOR/MEMORY at OFFSET. */
static int
elf_get_view (struct backtrace_state *state, int descriptor,
const unsigned char *memory, size_t memory_size, off_t offset,
uint64_t size, backtrace_error_callback error_callback,
void *data, struct elf_view *view)
{
if (memory == NULL)
{
view->release = 1;
return backtrace_get_view (state, descriptor, offset, size,
error_callback, data, &view->view);
}
else
{
if ((uint64_t) offset + size > (uint64_t) memory_size)
{
error_callback (data, "out of range for in-memory file", 0);
return 0;
}
view->view.data = (const void *) (memory + offset);
view->view.base = NULL;
view->view.len = size;
view->release = 0;
return 1;
}
}
/* Release a view read by elf_get_view. */
static void
elf_release_view (struct backtrace_state *state, struct elf_view *view,
backtrace_error_callback error_callback, void *data)
{
if (view->release)
backtrace_release_view (state, &view->view, error_callback, data);
}
/* Compute the CRC-32 of BUF/LEN. This uses the CRC used for
.gnu_debuglink files. */
static uint32_t
elf_crc32 (uint32_t crc, const unsigned char *buf, size_t len)
{
static const uint32_t crc32_table[256] =
{
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
0x2d02ef8d
};
const unsigned char *end;
crc = ~crc;
for (end = buf + len; buf < end; ++ buf)
crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
return ~crc;
}
/* Return the CRC-32 of the entire file open at DESCRIPTOR. */
static uint32_t
elf_crc32_file (struct backtrace_state *state, int descriptor,
backtrace_error_callback error_callback, void *data)
{
struct stat st;
struct backtrace_view file_view;
uint32_t ret;
if (fstat (descriptor, &st) < 0)
{
error_callback (data, "fstat", errno);
return 0;
}
if (!backtrace_get_view (state, descriptor, 0, st.st_size, error_callback,
data, &file_view))
return 0;
ret = elf_crc32 (0, (const unsigned char *) file_view.data, st.st_size);
backtrace_release_view (state, &file_view, error_callback, data);
return ret;
}
/* A dummy callback function used when we can't find a symbol
table. */
static void
elf_nosyms (struct backtrace_state *state ATTRIBUTE_UNUSED,
uintptr_t addr ATTRIBUTE_UNUSED,
backtrace_syminfo_callback callback ATTRIBUTE_UNUSED,
backtrace_error_callback error_callback, void *data)
{
error_callback (data, "no symbol table in ELF executable", -1);
}
/* A callback function used when we can't find any debug info. */
static int
elf_nodebug (struct backtrace_state *state, uintptr_t pc,
backtrace_full_callback callback,
backtrace_error_callback error_callback, void *data)
{
if (state->syminfo_fn != NULL && state->syminfo_fn != elf_nosyms)
{
struct backtrace_call_full bdata;
/* Fetch symbol information so that we can least get the
function name. */
bdata.full_callback = callback;
bdata.full_error_callback = error_callback;
bdata.full_data = data;
bdata.ret = 0;
state->syminfo_fn (state, pc, backtrace_syminfo_to_full_callback,
backtrace_syminfo_to_full_error_callback, &bdata);
return bdata.ret;
}
error_callback (data, "no debug info in ELF executable", -1);
return 0;
}
/* Compare struct elf_symbol for qsort. */
static int
elf_symbol_compare (const void *v1, const void *v2)
{
const struct elf_symbol *e1 = (const struct elf_symbol *) v1;
const struct elf_symbol *e2 = (const struct elf_symbol *) v2;
if (e1->address < e2->address)
return -1;
else if (e1->address > e2->address)
return 1;
else
return 0;
}
/* Compare an ADDR against an elf_symbol for bsearch. We allocate one
extra entry in the array so that this can look safely at the next
entry. */
static int
elf_symbol_search (const void *vkey, const void *ventry)
{
const uintptr_t *key = (const uintptr_t *) vkey;
const struct elf_symbol *entry = (const struct elf_symbol *) ventry;
uintptr_t addr;
addr = *key;
if (addr < entry->address)
return -1;
else if (addr >= entry->address + entry->size)
return 1;
else
return 0;
}
/* Initialize the symbol table info for elf_syminfo. */
static int
elf_initialize_syminfo (struct backtrace_state *state,
uintptr_t base_address,
const unsigned char *symtab_data, size_t symtab_size,
const unsigned char *strtab, size_t strtab_size,
backtrace_error_callback error_callback,
void *data, struct elf_syminfo_data *sdata,
struct elf_ppc64_opd_data *opd)
{
size_t sym_count;
const b_elf_sym *sym;
size_t elf_symbol_count;
size_t elf_symbol_size;
struct elf_symbol *elf_symbols;
size_t i;
unsigned int j;
sym_count = symtab_size / sizeof (b_elf_sym);
/* We only care about function symbols. Count them. */
sym = (const b_elf_sym *) symtab_data;
elf_symbol_count = 0;
for (i = 0; i < sym_count; ++i, ++sym)
{
int info;
info = sym->st_info & 0xf;
if ((info == STT_FUNC || info == STT_OBJECT)
&& sym->st_shndx != SHN_UNDEF)
++elf_symbol_count;
}
elf_symbol_size = elf_symbol_count * sizeof (struct elf_symbol);
elf_symbols = ((struct elf_symbol *)
backtrace_alloc (state, elf_symbol_size, error_callback,
data));
if (elf_symbols == NULL)
return 0;
sym = (const b_elf_sym *) symtab_data;
j = 0;
for (i = 0; i < sym_count; ++i, ++sym)
{
int info;
info = sym->st_info & 0xf;
if (info != STT_FUNC && info != STT_OBJECT)
continue;
if (sym->st_shndx == SHN_UNDEF)
continue;
if (sym->st_name >= strtab_size)
{
error_callback (data, "symbol string index out of range", 0);
backtrace_free (state, elf_symbols, elf_symbol_size, error_callback,
data);
return 0;
}
elf_symbols[j].name = (const char *) strtab + sym->st_name;
/* Special case PowerPC64 ELFv1 symbols in .opd section, if the symbol
is a function descriptor, read the actual code address from the
descriptor. */
if (opd
&& sym->st_value >= opd->addr
&& sym->st_value < opd->addr + opd->size)
elf_symbols[j].address
= *(const b_elf_addr *) (opd->data + (sym->st_value - opd->addr));
else
elf_symbols[j].address = sym->st_value;
elf_symbols[j].address += base_address;
elf_symbols[j].size = sym->st_size;
++j;
}
backtrace_qsort (elf_symbols, elf_symbol_count, sizeof (struct elf_symbol),
elf_symbol_compare);
sdata->next = NULL;
sdata->symbols = elf_symbols;
sdata->count = elf_symbol_count;
return 1;
}
/* Add EDATA to the list in STATE. */
static void
elf_add_syminfo_data (struct backtrace_state *state,
struct elf_syminfo_data *edata)
{
if (!state->threaded)
{
struct elf_syminfo_data **pp;
for (pp = (struct elf_syminfo_data **) (void *) &state->syminfo_data;
*pp != NULL;
pp = &(*pp)->next)
;
*pp = edata;
}
else
{
while (1)
{
struct elf_syminfo_data **pp;
pp = (struct elf_syminfo_data **) (void *) &state->syminfo_data;
while (1)
{
struct elf_syminfo_data *p;
p = backtrace_atomic_load_pointer (pp);
if (p == NULL)
break;
pp = &p->next;
}
if (__sync_bool_compare_and_swap (pp, NULL, edata))
break;
}
}
}
/* Return the symbol name and value for an ADDR. */
static void
elf_syminfo (struct backtrace_state *state, uintptr_t addr,
backtrace_syminfo_callback callback,
backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
void *data)
{
struct elf_syminfo_data *edata;
struct elf_symbol *sym = NULL;
if (!state->threaded)
{
for (edata = (struct elf_syminfo_data *) state->syminfo_data;
edata != NULL;
edata = edata->next)
{
sym = ((struct elf_symbol *)
bsearch (&addr, edata->symbols, edata->count,
sizeof (struct elf_symbol), elf_symbol_search));
if (sym != NULL)
break;
}
}
else
{
struct elf_syminfo_data **pp;
pp = (struct elf_syminfo_data **) (void *) &state->syminfo_data;
while (1)
{
edata = backtrace_atomic_load_pointer (pp);
if (edata == NULL)
break;
sym = ((struct elf_symbol *)
bsearch (&addr, edata->symbols, edata->count,
sizeof (struct elf_symbol), elf_symbol_search));
if (sym != NULL)
break;
pp = &edata->next;
}
}
if (sym == NULL)
callback (data, addr, NULL, 0, 0);
else
callback (data, addr, sym->name, sym->address, sym->size);
}
/* Return whether FILENAME is a symlink. */
static int
elf_is_symlink (const char *filename)
{
struct stat st;
if (lstat (filename, &st) < 0)
return 0;
return S_ISLNK (st.st_mode);
}
/* Return the results of reading the symlink FILENAME in a buffer
allocated by backtrace_alloc. Return the length of the buffer in
*LEN. */
static char *
elf_readlink (struct backtrace_state *state, const char *filename,
backtrace_error_callback error_callback, void *data,
size_t *plen)
{
size_t len;
char *buf;
len = 128;
while (1)
{
ssize_t rl;
buf = (char*)backtrace_alloc (state, len, error_callback, data);
if (buf == NULL)
return NULL;
rl = readlink (filename, buf, len);
if (rl < 0)
{
backtrace_free (state, buf, len, error_callback, data);
return NULL;
}
if ((size_t) rl < len - 1)
{
buf[rl] = '\0';
*plen = len;
return buf;
}
backtrace_free (state, buf, len, error_callback, data);
len *= 2;
}
}
#define SYSTEM_BUILD_ID_DIR "/usr/lib/debug/.build-id/"
/* Open a separate debug info file, using the build ID to find it.
Returns an open file descriptor, or -1.
The GDB manual says that the only place gdb looks for a debug file
when the build ID is known is in /usr/lib/debug/.build-id. */
static int
elf_open_debugfile_by_buildid (struct backtrace_state *state,
const char *buildid_data, size_t buildid_size,
const char *filename,
backtrace_error_callback error_callback,
void *data)
{
const char * const prefix = SYSTEM_BUILD_ID_DIR;
const size_t prefix_len = strlen (prefix);
const char * const suffix = ".debug";
const size_t suffix_len = strlen (suffix);
size_t len;
char *bd_filename;
char *t;
size_t i;
int ret;
int does_not_exist;
len = prefix_len + buildid_size * 2 + suffix_len + 2;
bd_filename = (char*)backtrace_alloc (state, len, error_callback, data);
if (bd_filename == NULL)
return -1;
t = bd_filename;
memcpy (t, prefix, prefix_len);
t += prefix_len;
for (i = 0; i < buildid_size; i++)
{
unsigned char b;
unsigned char nib;
b = (unsigned char) buildid_data[i];
nib = (b & 0xf0) >> 4;
*t++ = nib < 10 ? '0' + nib : 'a' + nib - 10;
nib = b & 0x0f;
*t++ = nib < 10 ? '0' + nib : 'a' + nib - 10;
if (i == 0)
*t++ = '/';
}
memcpy (t, suffix, suffix_len);
t[suffix_len] = '\0';
ret = backtrace_open (bd_filename, error_callback, data, &does_not_exist);
backtrace_free (state, bd_filename, len, error_callback, data);
/* gdb checks that the debuginfo file has the same build ID note.
That seems kind of pointless to me--why would it have the right
name but not the right build ID?--so skipping the check. */
#ifdef TRACY_DEBUGINFOD
if (ret == -1)
return GetDebugInfoDescriptor( buildid_data, buildid_size, filename );
else
return ret;
#else
return ret;
#endif
}
/* Try to open a file whose name is PREFIX (length PREFIX_LEN)
concatenated with PREFIX2 (length PREFIX2_LEN) concatenated with
DEBUGLINK_NAME. Returns an open file descriptor, or -1. */
static int
elf_try_debugfile (struct backtrace_state *state, const char *prefix,
size_t prefix_len, const char *prefix2, size_t prefix2_len,
const char *debuglink_name,
backtrace_error_callback error_callback, void *data)
{
size_t debuglink_len;
size_t try_len;
char *Try;
int does_not_exist;
int ret;
debuglink_len = strlen (debuglink_name);
try_len = prefix_len + prefix2_len + debuglink_len + 1;
Try = (char*)backtrace_alloc (state, try_len, error_callback, data);
if (Try == NULL)
return -1;
memcpy (Try, prefix, prefix_len);
memcpy (Try + prefix_len, prefix2, prefix2_len);
memcpy (Try + prefix_len + prefix2_len, debuglink_name, debuglink_len);
Try[prefix_len + prefix2_len + debuglink_len] = '\0';
ret = backtrace_open (Try, error_callback, data, &does_not_exist);
backtrace_free (state, Try, try_len, error_callback, data);
return ret;
}
/* Find a separate debug info file, using the debuglink section data
to find it. Returns an open file descriptor, or -1. */
static int
elf_find_debugfile_by_debuglink (struct backtrace_state *state,
const char *filename,
const char *debuglink_name,
backtrace_error_callback error_callback,
void *data)
{
int ret;
char *alc;
size_t alc_len;
const char *slash;
int ddescriptor;
const char *prefix;
size_t prefix_len;
/* Resolve symlinks in FILENAME. Since FILENAME is fairly likely to
be /proc/self/exe, symlinks are common. We don't try to resolve
the whole path name, just the base name. */
ret = -1;
alc = NULL;
alc_len = 0;
while (elf_is_symlink (filename))
{
char *new_buf;
size_t new_len;
new_buf = elf_readlink (state, filename, error_callback, data, &new_len);
if (new_buf == NULL)
break;
if (new_buf[0] == '/')
filename = new_buf;
else
{
slash = strrchr (filename, '/');
if (slash == NULL)
filename = new_buf;
else
{
size_t clen;
char *c;
slash++;
clen = slash - filename + strlen (new_buf) + 1;
c = (char*)backtrace_alloc (state, clen, error_callback, data);
if (c == NULL)
goto done;
memcpy (c, filename, slash - filename);
memcpy (c + (slash - filename), new_buf, strlen (new_buf));
c[slash - filename + strlen (new_buf)] = '\0';
backtrace_free (state, new_buf, new_len, error_callback, data);
filename = c;
new_buf = c;
new_len = clen;
}
}
if (alc != NULL)
backtrace_free (state, alc, alc_len, error_callback, data);
alc = new_buf;
alc_len = new_len;
}
/* Look for DEBUGLINK_NAME in the same directory as FILENAME. */
slash = strrchr (filename, '/');
if (slash == NULL)
{
prefix = "";
prefix_len = 0;
}
else
{
slash++;
prefix = filename;
prefix_len = slash - filename;
}
ddescriptor = elf_try_debugfile (state, prefix, prefix_len, "", 0,
debuglink_name, error_callback, data);
if (ddescriptor >= 0)
{
ret = ddescriptor;
goto done;
}
/* Look for DEBUGLINK_NAME in a .debug subdirectory of FILENAME. */
ddescriptor = elf_try_debugfile (state, prefix, prefix_len, ".debug/",
strlen (".debug/"), debuglink_name,
error_callback, data);
if (ddescriptor >= 0)
{
ret = ddescriptor;
goto done;
}
/* Look for DEBUGLINK_NAME in /usr/lib/debug. */
ddescriptor = elf_try_debugfile (state, "/usr/lib/debug/",
strlen ("/usr/lib/debug/"), prefix,
prefix_len, debuglink_name,
error_callback, data);
if (ddescriptor >= 0)
ret = ddescriptor;
done:
if (alc != NULL && alc_len > 0)
backtrace_free (state, alc, alc_len, error_callback, data);
return ret;
}
/* Open a separate debug info file, using the debuglink section data
to find it. Returns an open file descriptor, or -1. */
static int
elf_open_debugfile_by_debuglink (struct backtrace_state *state,
const char *filename,
const char *debuglink_name,
uint32_t debuglink_crc,
backtrace_error_callback error_callback,
void *data)
{
int ddescriptor;
ddescriptor = elf_find_debugfile_by_debuglink (state, filename,
debuglink_name,
error_callback, data);
if (ddescriptor < 0)
return -1;
if (debuglink_crc != 0)
{
uint32_t got_crc;
got_crc = elf_crc32_file (state, ddescriptor, error_callback, data);
if (got_crc != debuglink_crc)
{
backtrace_close (ddescriptor, error_callback, data);
return -1;
}
}
return ddescriptor;
}
/* A function useful for setting a breakpoint for an inflation failure
when this code is compiled with -g. */
static void
elf_uncompress_failed(void)
{
}
/* *PVAL is the current value being read from the stream, and *PBITS
is the number of valid bits. Ensure that *PVAL holds at least 15
bits by reading additional bits from *PPIN, up to PINEND, as
needed. Updates *PPIN, *PVAL and *PBITS. Returns 1 on success, 0
on error. */
static int
elf_zlib_fetch (const unsigned char **ppin, const unsigned char *pinend,
uint64_t *pval, unsigned int *pbits)
{
unsigned int bits;
const unsigned char *pin;
uint64_t val;
uint32_t next;
bits = *pbits;
if (bits >= 15)
return 1;
pin = *ppin;
val = *pval;
if (unlikely (pinend - pin < 4))
{
elf_uncompress_failed ();
return 0;
}
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) \
&& defined(__ORDER_BIG_ENDIAN__) \
&& (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ \
|| __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
/* We've ensured that PIN is aligned. */
next = *(const uint32_t *)pin;
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
next = __builtin_bswap32 (next);
#endif
#else
next = pin[0] | (pin[1] << 8) | (pin[2] << 16) | (pin[3] << 24);
#endif
val |= (uint64_t)next << bits;
bits += 32;
pin += 4;
/* We will need the next four bytes soon. */
__builtin_prefetch (pin, 0, 0);
*ppin = pin;
*pval = val;
*pbits = bits;
return 1;
}
/* Huffman code tables, like the rest of the zlib format, are defined
by RFC 1951. We store a Huffman code table as a series of tables
stored sequentially in memory. Each entry in a table is 16 bits.
The first, main, table has 256 entries. It is followed by a set of
secondary tables of length 2 to 128 entries. The maximum length of
a code sequence in the deflate format is 15 bits, so that is all we
need. Each secondary table has an index, which is the offset of
the table in the overall memory storage.
The deflate format says that all codes of a given bit length are
lexicographically consecutive. Perhaps we could have 130 values
that require a 15-bit code, perhaps requiring three secondary
tables of size 128. I don't know if this is actually possible, but
it suggests that the maximum size required for secondary tables is
3 * 128 + 3 * 64 ... == 768. The zlib enough program reports 660
as the maximum. We permit 768, since in addition to the 256 for
the primary table, with two bytes per entry, and with the two
tables we need, that gives us a page.
A single table entry needs to store a value or (for the main table
only) the index and size of a secondary table. Values range from 0
to 285, inclusive. Secondary table indexes, per above, range from
0 to 510. For a value we need to store the number of bits we need
to determine that value (one value may appear multiple times in the
table), which is 1 to 8. For a secondary table we need to store
the number of bits used to index into the table, which is 1 to 7.
And of course we need 1 bit to decide whether we have a value or a
secondary table index. So each entry needs 9 bits for value/table
index, 3 bits for size, 1 bit what it is. For simplicity we use 16
bits per entry. */
/* Number of entries we allocate to for one code table. We get a page
for the two code tables we need. */
#define HUFFMAN_TABLE_SIZE (1024)
/* Bit masks and shifts for the values in the table. */
#define HUFFMAN_VALUE_MASK 0x01ff
#define HUFFMAN_BITS_SHIFT 9
#define HUFFMAN_BITS_MASK 0x7
#define HUFFMAN_SECONDARY_SHIFT 12
/* For working memory while inflating we need two code tables, we need
an array of code lengths (max value 15, so we use unsigned char),
and an array of unsigned shorts used while building a table. The
latter two arrays must be large enough to hold the maximum number
of code lengths, which RFC 1951 defines as 286 + 30. */
#define ZDEBUG_TABLE_SIZE \
(2 * HUFFMAN_TABLE_SIZE * sizeof (uint16_t) \
+ (286 + 30) * sizeof (uint16_t) \
+ (286 + 30) * sizeof (unsigned char))
#define ZDEBUG_TABLE_CODELEN_OFFSET \
(2 * HUFFMAN_TABLE_SIZE * sizeof (uint16_t) \
+ (286 + 30) * sizeof (uint16_t))
#define ZDEBUG_TABLE_WORK_OFFSET \
(2 * HUFFMAN_TABLE_SIZE * sizeof (uint16_t))
#ifdef BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE
/* Used by the main function that generates the fixed table to learn
the table size. */
static size_t final_next_secondary;
#endif
/* Build a Huffman code table from an array of lengths in CODES of
length CODES_LEN. The table is stored into *TABLE. ZDEBUG_TABLE
is the same as for elf_zlib_inflate, used to find some work space.
Returns 1 on success, 0 on error. */
static int
elf_zlib_inflate_table (unsigned char *codes, size_t codes_len,
uint16_t *zdebug_table, uint16_t *table)
{
uint16_t count[16];
uint16_t start[16];
uint16_t prev[16];
uint16_t firstcode[7];
uint16_t *next;
size_t i;
size_t j;
unsigned int code;
size_t next_secondary;
/* Count the number of code of each length. Set NEXT[val] to be the
next value after VAL with the same bit length. */
next = (uint16_t *) (((unsigned char *) zdebug_table)
+ ZDEBUG_TABLE_WORK_OFFSET);
memset (&count[0], 0, 16 * sizeof (uint16_t));
for (i = 0; i < codes_len; ++i)
{
if (unlikely (codes[i] >= 16))
{
elf_uncompress_failed ();
return 0;
}
if (count[codes[i]] == 0)
{
start[codes[i]] = i;
prev[codes[i]] = i;
}
else
{
next[prev[codes[i]]] = i;
prev[codes[i]] = i;
}
++count[codes[i]];
}
/* For each length, fill in the table for the codes of that
length. */
memset (table, 0, HUFFMAN_TABLE_SIZE * sizeof (uint16_t));
/* Handle the values that do not require a secondary table. */
code = 0;
for (j = 1; j <= 8; ++j)
{
unsigned int jcnt;
unsigned int val;
jcnt = count[j];
if (jcnt == 0)
continue;
if (unlikely (jcnt > (1U << j)))
{
elf_uncompress_failed ();
return 0;
}
/* There are JCNT values that have this length, the values
starting from START[j] continuing through NEXT[VAL]. Those
values are assigned consecutive values starting at CODE. */
val = start[j];
for (i = 0; i < jcnt; ++i)
{
uint16_t tval;
size_t ind;
unsigned int incr;
/* In the compressed bit stream, the value VAL is encoded as
J bits with the value C. */
if (unlikely ((val & ~HUFFMAN_VALUE_MASK) != 0))
{
elf_uncompress_failed ();
return 0;
}
tval = val | ((j - 1) << HUFFMAN_BITS_SHIFT);
/* The table lookup uses 8 bits. If J is less than 8, we
don't know what the other bits will be. We need to fill
in all possibilities in the table. Since the Huffman
code is unambiguous, those entries can't be used for any
other code. */
for (ind = code; ind < 0x100; ind += 1 << j)
{
if (unlikely (table[ind] != 0))
{
elf_uncompress_failed ();
return 0;
}
table[ind] = tval;
}
/* Advance to the next value with this length. */
if (i + 1 < jcnt)
val = next[val];
/* The Huffman codes are stored in the bitstream with the
most significant bit first, as is required to make them
unambiguous. The effect is that when we read them from
the bitstream we see the bit sequence in reverse order:
the most significant bit of the Huffman code is the least
significant bit of the value we read from the bitstream.
That means that to make our table lookups work, we need
to reverse the bits of CODE. Since reversing bits is
tedious and in general requires using a table, we instead
increment CODE in reverse order. That is, if the number
of bits we are currently using, here named J, is 3, we
count as 000, 100, 010, 110, 001, 101, 011, 111, which is
to say the numbers from 0 to 7 but with the bits
reversed. Going to more bits, aka incrementing J,
effectively just adds more zero bits as the beginning,
and as such does not change the numeric value of CODE.
To increment CODE of length J in reverse order, find the
most significant zero bit and set it to one while
clearing all higher bits. In other words, add 1 modulo
2^J, only reversed. */
incr = 1U << (j - 1);
while ((code & incr) != 0)
incr >>= 1;
if (incr == 0)
code = 0;
else
{
code &= incr - 1;
code += incr;
}
}
}
/* Handle the values that require a secondary table. */
/* Set FIRSTCODE, the number at which the codes start, for each
length. */
for (j = 9; j < 16; j++)
{
unsigned int jcnt;
unsigned int k;
jcnt = count[j];
if (jcnt == 0)
continue;
/* There are JCNT values that have this length, the values
starting from START[j]. Those values are assigned
consecutive values starting at CODE. */
firstcode[j - 9] = code;
/* Reverse add JCNT to CODE modulo 2^J. */
for (k = 0; k < j; ++k)
{
if ((jcnt & (1U << k)) != 0)
{
unsigned int m;
unsigned int bit;
bit = 1U << (j - k - 1);
for (m = 0; m < j - k; ++m, bit >>= 1)
{
if ((code & bit) == 0)
{
code += bit;
break;
}
code &= ~bit;
}
jcnt &= ~(1U << k);
}
}
if (unlikely (jcnt != 0))
{
elf_uncompress_failed ();
return 0;
}
}
/* For J from 9 to 15, inclusive, we store COUNT[J] consecutive
values starting at START[J] with consecutive codes starting at
FIRSTCODE[J - 9]. In the primary table we need to point to the
secondary table, and the secondary table will be indexed by J - 9
bits. We count down from 15 so that we install the larger
secondary tables first, as the smaller ones may be embedded in
the larger ones. */
next_secondary = 0; /* Index of next secondary table (after primary). */
for (j = 15; j >= 9; j--)
{
unsigned int jcnt;
unsigned int val;
size_t primary; /* Current primary index. */
size_t secondary; /* Offset to current secondary table. */
size_t secondary_bits; /* Bit size of current secondary table. */
jcnt = count[j];
if (jcnt == 0)
continue;
val = start[j];
code = firstcode[j - 9];
primary = 0x100;
secondary = 0;
secondary_bits = 0;
for (i = 0; i < jcnt; ++i)
{
uint16_t tval;
size_t ind;
unsigned int incr;
if ((code & 0xff) != primary)
{
uint16_t tprimary;
/* Fill in a new primary table entry. */
primary = code & 0xff;
tprimary = table[primary];
if (tprimary == 0)
{
/* Start a new secondary table. */
if (unlikely ((next_secondary & HUFFMAN_VALUE_MASK)
!= next_secondary))
{
elf_uncompress_failed ();
return 0;
}
secondary = next_secondary;
secondary_bits = j - 8;
next_secondary += 1 << secondary_bits;
table[primary] = (secondary
+ ((j - 8) << HUFFMAN_BITS_SHIFT)
+ (1U << HUFFMAN_SECONDARY_SHIFT));
}
else
{
/* There is an existing entry. It had better be a
secondary table with enough bits. */
if (unlikely ((tprimary & (1U << HUFFMAN_SECONDARY_SHIFT))
== 0))
{
elf_uncompress_failed ();
return 0;
}
secondary = tprimary & HUFFMAN_VALUE_MASK;
secondary_bits = ((tprimary >> HUFFMAN_BITS_SHIFT)
& HUFFMAN_BITS_MASK);
if (unlikely (secondary_bits < j - 8))
{
elf_uncompress_failed ();
return 0;
}
}
}
/* Fill in secondary table entries. */
tval = val | ((j - 8) << HUFFMAN_BITS_SHIFT);
for (ind = code >> 8;
ind < (1U << secondary_bits);
ind += 1U << (j - 8))
{
if (unlikely (table[secondary + 0x100 + ind] != 0))
{
elf_uncompress_failed ();
return 0;
}
table[secondary + 0x100 + ind] = tval;
}
if (i + 1 < jcnt)
val = next[val];
incr = 1U << (j - 1);
while ((code & incr) != 0)
incr >>= 1;
if (incr == 0)
code = 0;
else
{
code &= incr - 1;
code += incr;
}
}
}
#ifdef BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE
final_next_secondary = next_secondary;
#endif
return 1;
}
#ifdef BACKTRACE_GENERATE_FIXED_HUFFMAN_TABLE
/* Used to generate the fixed Huffman table for block type 1. */
#include <stdio.h>
static uint16_t table[ZDEBUG_TABLE_SIZE];
static unsigned char codes[288];
int
main ()
{
size_t i;
for (i = 0; i <= 143; ++i)
codes[i] = 8;
for (i = 144; i <= 255; ++i)
codes[i] = 9;
for (i = 256; i <= 279; ++i)
codes[i] = 7;
for (i = 280; i <= 287; ++i)
codes[i] = 8;
if (!elf_zlib_inflate_table (&codes[0], 288, &table[0], &table[0]))
{
fprintf (stderr, "elf_zlib_inflate_table failed\n");
exit (EXIT_FAILURE);
}
printf ("static const uint16_t elf_zlib_default_table[%#zx] =\n",
final_next_secondary + 0x100);
printf ("{\n");
for (i = 0; i < final_next_secondary + 0x100; i += 8)
{
size_t j;
printf (" ");
for (j = i; j < final_next_secondary + 0x100 && j < i + 8; ++j)
printf (" %#x,", table[j]);
printf ("\n");
}
printf ("};\n");
printf ("\n");
for (i = 0; i < 32; ++i)
codes[i] = 5;
if (!elf_zlib_inflate_table (&codes[0], 32, &table[0], &table[0]))
{
fprintf (stderr, "elf_zlib_inflate_table failed\n");
exit (EXIT_FAILURE);
}
printf ("static const uint16_t elf_zlib_default_dist_table[%#zx] =\n",
final_next_secondary + 0x100);
printf ("{\n");
for (i = 0; i < final_next_secondary + 0x100; i += 8)
{
size_t j;
printf (" ");
for (j = i; j < final_next_secondary + 0x100 && j < i + 8; ++j)
printf (" %#x,", table[j]);
printf ("\n");
}
printf ("};\n");
return 0;
}
#endif
/* The fixed tables generated by the #ifdef'ed out main function
above. */
static const uint16_t elf_zlib_default_table[0x170] =
{
0xd00, 0xe50, 0xe10, 0xf18, 0xd10, 0xe70, 0xe30, 0x1230,
0xd08, 0xe60, 0xe20, 0x1210, 0xe00, 0xe80, 0xe40, 0x1250,
0xd04, 0xe58, 0xe18, 0x1200, 0xd14, 0xe78, 0xe38, 0x1240,
0xd0c, 0xe68, 0xe28, 0x1220, 0xe08, 0xe88, 0xe48, 0x1260,
0xd02, 0xe54, 0xe14, 0xf1c, 0xd12, 0xe74, 0xe34, 0x1238,
0xd0a, 0xe64, 0xe24, 0x1218, 0xe04, 0xe84, 0xe44, 0x1258,
0xd06, 0xe5c, 0xe1c, 0x1208, 0xd16, 0xe7c, 0xe3c, 0x1248,
0xd0e, 0xe6c, 0xe2c, 0x1228, 0xe0c, 0xe8c, 0xe4c, 0x1268,
0xd01, 0xe52, 0xe12, 0xf1a, 0xd11, 0xe72, 0xe32, 0x1234,
0xd09, 0xe62, 0xe22, 0x1214, 0xe02, 0xe82, 0xe42, 0x1254,
0xd05, 0xe5a, 0xe1a, 0x1204, 0xd15, 0xe7a, 0xe3a, 0x1244,
0xd0d, 0xe6a, 0xe2a, 0x1224, 0xe0a, 0xe8a, 0xe4a, 0x1264,
0xd03, 0xe56, 0xe16, 0xf1e, 0xd13, 0xe76, 0xe36, 0x123c,
0xd0b, 0xe66, 0xe26, 0x121c, 0xe06, 0xe86, 0xe46, 0x125c,
0xd07, 0xe5e, 0xe1e, 0x120c, 0xd17, 0xe7e, 0xe3e, 0x124c,
0xd0f, 0xe6e, 0xe2e, 0x122c, 0xe0e, 0xe8e, 0xe4e, 0x126c,
0xd00, 0xe51, 0xe11, 0xf19, 0xd10, 0xe71, 0xe31, 0x1232,
0xd08, 0xe61, 0xe21, 0x1212, 0xe01, 0xe81, 0xe41, 0x1252,
0xd04, 0xe59, 0xe19, 0x1202, 0xd14, 0xe79, 0xe39, 0x1242,
0xd0c, 0xe69, 0xe29, 0x1222, 0xe09, 0xe89, 0xe49, 0x1262,
0xd02, 0xe55, 0xe15, 0xf1d, 0xd12, 0xe75, 0xe35, 0x123a,
0xd0a, 0xe65, 0xe25, 0x121a, 0xe05, 0xe85, 0xe45, 0x125a,
0xd06, 0xe5d, 0xe1d, 0x120a, 0xd16, 0xe7d, 0xe3d, 0x124a,
0xd0e, 0xe6d, 0xe2d, 0x122a, 0xe0d, 0xe8d, 0xe4d, 0x126a,
0xd01, 0xe53, 0xe13, 0xf1b, 0xd11, 0xe73, 0xe33, 0x1236,
0xd09, 0xe63, 0xe23, 0x1216, 0xe03, 0xe83, 0xe43, 0x1256,
0xd05, 0xe5b, 0xe1b, 0x1206, 0xd15, 0xe7b, 0xe3b, 0x1246,
0xd0d, 0xe6b, 0xe2b, 0x1226, 0xe0b, 0xe8b, 0xe4b, 0x1266,
0xd03, 0xe57, 0xe17, 0xf1f, 0xd13, 0xe77, 0xe37, 0x123e,
0xd0b, 0xe67, 0xe27, 0x121e, 0xe07, 0xe87, 0xe47, 0x125e,
0xd07, 0xe5f, 0xe1f, 0x120e, 0xd17, 0xe7f, 0xe3f, 0x124e,
0xd0f, 0xe6f, 0xe2f, 0x122e, 0xe0f, 0xe8f, 0xe4f, 0x126e,
0x290, 0x291, 0x292, 0x293, 0x294, 0x295, 0x296, 0x297,
0x298, 0x299, 0x29a, 0x29b, 0x29c, 0x29d, 0x29e, 0x29f,
0x2a0, 0x2a1, 0x2a2, 0x2a3, 0x2a4, 0x2a5, 0x2a6, 0x2a7,
0x2a8, 0x2a9, 0x2aa, 0x2ab, 0x2ac, 0x2ad, 0x2ae, 0x2af,
0x2b0, 0x2b1, 0x2b2, 0x2b3, 0x2b4, 0x2b5, 0x2b6, 0x2b7,
0x2b8, 0x2b9, 0x2ba, 0x2bb, 0x2bc, 0x2bd, 0x2be, 0x2bf,
0x2c0, 0x2c1, 0x2c2, 0x2c3, 0x2c4, 0x2c5, 0x2c6, 0x2c7,
0x2c8, 0x2c9, 0x2ca, 0x2cb, 0x2cc, 0x2cd, 0x2ce, 0x2cf,
0x2d0, 0x2d1, 0x2d2, 0x2d3, 0x2d4, 0x2d5, 0x2d6, 0x2d7,
0x2d8, 0x2d9, 0x2da, 0x2db, 0x2dc, 0x2dd, 0x2de, 0x2df,
0x2e0, 0x2e1, 0x2e2, 0x2e3, 0x2e4, 0x2e5, 0x2e6, 0x2e7,
0x2e8, 0x2e9, 0x2ea, 0x2eb, 0x2ec, 0x2ed, 0x2ee, 0x2ef,
0x2f0, 0x2f1, 0x2f2, 0x2f3, 0x2f4, 0x2f5, 0x2f6, 0x2f7,
0x2f8, 0x2f9, 0x2fa, 0x2fb, 0x2fc, 0x2fd, 0x2fe, 0x2ff,
};
static const uint16_t elf_zlib_default_dist_table[0x100] =
{
0x800, 0x810, 0x808, 0x818, 0x804, 0x814, 0x80c, 0x81c,
0x802, 0x812, 0x80a, 0x81a, 0x806, 0x816, 0x80e, 0x81e,
0x801, 0x811, 0x809, 0x819, 0x805, 0x815, 0x80d, 0x81d,
0x803, 0x813, 0x80b, 0x81b, 0x807, 0x817, 0x80f, 0x81f,
0x800, 0x810, 0x808, 0x818, 0x804, 0x814, 0x80c, 0x81c,
0x802, 0x812, 0x80a, 0x81a, 0x806, 0x816, 0x80e, 0x81e,
0x801, 0x811, 0x809, 0x819, 0x805, 0x815, 0x80d, 0x81d,
0x803, 0x813, 0x80b, 0x81b, 0x807, 0x817, 0x80f, 0x81f,
0x800, 0x810, 0x808, 0x818, 0x804, 0x814, 0x80c, 0x81c,
0x802, 0x812, 0x80a, 0x81a, 0x806, 0x816, 0x80e, 0x81e,
0x801, 0x811, 0x809, 0x819, 0x805, 0x815, 0x80d, 0x81d,
0x803, 0x813, 0x80b, 0x81b, 0x807, 0x817, 0x80f, 0x81f,
0x800, 0x810, 0x808, 0x818, 0x804, 0x814, 0x80c, 0x81c,
0x802, 0x812, 0x80a, 0x81a, 0x806, 0x816, 0x80e, 0x81e,
0x801, 0x811, 0x809, 0x819, 0x805, 0x815, 0x80d, 0x81d,
0x803, 0x813, 0x80b, 0x81b, 0x807, 0x817, 0x80f, 0x81f,
0x800, 0x810, 0x808, 0x818, 0x804, 0x814, 0x80c, 0x81c,
0x802, 0x812, 0x80a, 0x81a, 0x806, 0x816, 0x80e, 0x81e,
0x801, 0x811, 0x809, 0x819, 0x805, 0x815, 0x80d, 0x81d,
0x803, 0x813, 0x80b, 0x81b, 0x807, 0x817, 0x80f, 0x81f,
0x800, 0x810, 0x808, 0x818, 0x804, 0x814, 0x80c, 0x81c,
0x802, 0x812, 0x80a, 0x81a, 0x806, 0x816, 0x80e, 0x81e,
0x801, 0x811, 0x809, 0x819, 0x805, 0x815, 0x80d, 0x81d,
0x803, 0x813, 0x80b, 0x81b, 0x807, 0x817, 0x80f, 0x81f,
0x800, 0x810, 0x808, 0x818, 0x804, 0x814, 0x80c, 0x81c,
0x802, 0x812, 0x80a, 0x81a, 0x806, 0x816, 0x80e, 0x81e,
0x801, 0x811, 0x809, 0x819, 0x805, 0x815, 0x80d, 0x81d,
0x803, 0x813, 0x80b, 0x81b, 0x807, 0x817, 0x80f, 0x81f,
0x800, 0x810, 0x808, 0x818, 0x804, 0x814, 0x80c, 0x81c,
0x802, 0x812, 0x80a, 0x81a, 0x806, 0x816, 0x80e, 0x81e,
0x801, 0x811, 0x809, 0x819, 0x805, 0x815, 0x80d, 0x81d,
0x803, 0x813, 0x80b, 0x81b, 0x807, 0x817, 0x80f, 0x81f,
};
/* Inflate a zlib stream from PIN/SIN to POUT/SOUT. Return 1 on
success, 0 on some error parsing the stream. */
static int
elf_zlib_inflate (const unsigned char *pin, size_t sin, uint16_t *zdebug_table,
unsigned char *pout, size_t sout)
{
unsigned char *porigout;
const unsigned char *pinend;
unsigned char *poutend;
/* We can apparently see multiple zlib streams concatenated
together, so keep going as long as there is something to read.
The last 4 bytes are the checksum. */
porigout = pout;
pinend = pin + sin;
poutend = pout + sout;
while ((pinend - pin) > 4)
{
uint64_t val;
unsigned int bits;
int last;
/* Read the two byte zlib header. */
if (unlikely ((pin[0] & 0xf) != 8)) /* 8 is zlib encoding. */
{
/* Unknown compression method. */
elf_uncompress_failed ();
return 0;
}
if (unlikely ((pin[0] >> 4) > 7))
{
/* Window size too large. Other than this check, we don't
care about the window size. */
elf_uncompress_failed ();
return 0;
}
if (unlikely ((pin[1] & 0x20) != 0))
{
/* Stream expects a predefined dictionary, but we have no
dictionary. */
elf_uncompress_failed ();
return 0;
}
val = (pin[0] << 8) | pin[1];
if (unlikely (val % 31 != 0))
{
/* Header check failure. */
elf_uncompress_failed ();
return 0;
}
pin += 2;
/* Align PIN to a 32-bit boundary. */
val = 0;
bits = 0;
while ((((uintptr_t) pin) & 3) != 0)
{
val |= (uint64_t)*pin << bits;
bits += 8;
++pin;
}
/* Read blocks until one is marked last. */
last = 0;
while (!last)
{
unsigned int type;
const uint16_t *tlit;
const uint16_t *tdist;
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
last = val & 1;
type = (val >> 1) & 3;
val >>= 3;
bits -= 3;
if (unlikely (type == 3))
{
/* Invalid block type. */
elf_uncompress_failed ();
return 0;
}
if (type == 0)
{
uint16_t len;
uint16_t lenc;
/* An uncompressed block. */
/* If we've read ahead more than a byte, back up. */
while (bits >= 8)
{
--pin;
bits -= 8;
}
val = 0;
bits = 0;
if (unlikely ((pinend - pin) < 4))
{
/* Missing length. */
elf_uncompress_failed ();
return 0;
}
len = pin[0] | (pin[1] << 8);
lenc = pin[2] | (pin[3] << 8);
pin += 4;
lenc = ~lenc;
if (unlikely (len != lenc))
{
/* Corrupt data. */
elf_uncompress_failed ();
return 0;
}
if (unlikely (len > (unsigned int) (pinend - pin)
|| len > (unsigned int) (poutend - pout)))
{
/* Not enough space in buffers. */
elf_uncompress_failed ();
return 0;
}
memcpy (pout, pin, len);
pout += len;
pin += len;
/* Align PIN. */
while ((((uintptr_t) pin) & 3) != 0)
{
val |= (uint64_t)*pin << bits;
bits += 8;
++pin;
}
/* Go around to read the next block. */
continue;
}
if (type == 1)
{
tlit = elf_zlib_default_table;
tdist = elf_zlib_default_dist_table;
}
else
{
unsigned int nlit;
unsigned int ndist;
unsigned int nclen;
unsigned char codebits[19];
unsigned char *plenbase;
unsigned char *plen;
unsigned char *plenend;
/* Read a Huffman encoding table. The various magic
numbers here are from RFC 1951. */
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
nlit = (val & 0x1f) + 257;
val >>= 5;
ndist = (val & 0x1f) + 1;
val >>= 5;
nclen = (val & 0xf) + 4;
val >>= 4;
bits -= 14;
if (unlikely (nlit > 286 || ndist > 30))
{
/* Values out of range. */
elf_uncompress_failed ();
return 0;
}
/* Read and build the table used to compress the
literal, length, and distance codes. */
memset(&codebits[0], 0, 19);
/* There are always at least 4 elements in the
table. */
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
codebits[16] = val & 7;
codebits[17] = (val >> 3) & 7;
codebits[18] = (val >> 6) & 7;
codebits[0] = (val >> 9) & 7;
val >>= 12;
bits -= 12;
if (nclen == 4)
goto codebitsdone;
codebits[8] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 5)
goto codebitsdone;
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
codebits[7] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 6)
goto codebitsdone;
codebits[9] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 7)
goto codebitsdone;
codebits[6] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 8)
goto codebitsdone;
codebits[10] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 9)
goto codebitsdone;
codebits[5] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 10)
goto codebitsdone;
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
codebits[11] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 11)
goto codebitsdone;
codebits[4] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 12)
goto codebitsdone;
codebits[12] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 13)
goto codebitsdone;
codebits[3] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 14)
goto codebitsdone;
codebits[13] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 15)
goto codebitsdone;
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
codebits[2] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 16)
goto codebitsdone;
codebits[14] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 17)
goto codebitsdone;
codebits[1] = val & 7;
val >>= 3;
bits -= 3;
if (nclen == 18)
goto codebitsdone;
codebits[15] = val & 7;
val >>= 3;
bits -= 3;
codebitsdone:
if (!elf_zlib_inflate_table (codebits, 19, zdebug_table,
zdebug_table))
return 0;
/* Read the compressed bit lengths of the literal,
length, and distance codes. We have allocated space
at the end of zdebug_table to hold them. */
plenbase = (((unsigned char *) zdebug_table)
+ ZDEBUG_TABLE_CODELEN_OFFSET);
plen = plenbase;
plenend = plen + nlit + ndist;
while (plen < plenend)
{
uint16_t t;
unsigned int b;
uint16_t v;
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
t = zdebug_table[val & 0xff];
/* The compression here uses bit lengths up to 7, so
a secondary table is never necessary. */
if (unlikely ((t & (1U << HUFFMAN_SECONDARY_SHIFT)) != 0))
{
elf_uncompress_failed ();
return 0;
}
b = (t >> HUFFMAN_BITS_SHIFT) & HUFFMAN_BITS_MASK;
val >>= b + 1;
bits -= b + 1;
v = t & HUFFMAN_VALUE_MASK;
if (v < 16)
*plen++ = v;
else if (v == 16)
{
unsigned int c;
unsigned int prev;
/* Copy previous entry 3 to 6 times. */
if (unlikely (plen == plenbase))
{
elf_uncompress_failed ();
return 0;
}
/* We used up to 7 bits since the last
elf_zlib_fetch, so we have at least 8 bits
available here. */
c = 3 + (val & 0x3);
val >>= 2;
bits -= 2;
if (unlikely ((unsigned int) (plenend - plen) < c))
{
elf_uncompress_failed ();
return 0;
}
prev = plen[-1];
switch (c)
{
case 6:
*plen++ = prev;
ATTRIBUTE_FALLTHROUGH;
case 5:
*plen++ = prev;
ATTRIBUTE_FALLTHROUGH;
case 4:
*plen++ = prev;
}
*plen++ = prev;
*plen++ = prev;
*plen++ = prev;
}
else if (v == 17)
{
unsigned int c;
/* Store zero 3 to 10 times. */
/* We used up to 7 bits since the last
elf_zlib_fetch, so we have at least 8 bits
available here. */
c = 3 + (val & 0x7);
val >>= 3;
bits -= 3;
if (unlikely ((unsigned int) (plenend - plen) < c))
{
elf_uncompress_failed ();
return 0;
}
switch (c)
{
case 10:
*plen++ = 0;
ATTRIBUTE_FALLTHROUGH;
case 9:
*plen++ = 0;
ATTRIBUTE_FALLTHROUGH;
case 8:
*plen++ = 0;
ATTRIBUTE_FALLTHROUGH;
case 7:
*plen++ = 0;
ATTRIBUTE_FALLTHROUGH;
case 6:
*plen++ = 0;
ATTRIBUTE_FALLTHROUGH;
case 5:
*plen++ = 0;
ATTRIBUTE_FALLTHROUGH;
case 4:
*plen++ = 0;
}
*plen++ = 0;
*plen++ = 0;
*plen++ = 0;
}
else if (v == 18)
{
unsigned int c;
/* Store zero 11 to 138 times. */
/* We used up to 7 bits since the last
elf_zlib_fetch, so we have at least 8 bits
available here. */
c = 11 + (val & 0x7f);
val >>= 7;
bits -= 7;
if (unlikely ((unsigned int) (plenend - plen) < c))
{
elf_uncompress_failed ();
return 0;
}
memset (plen, 0, c);
plen += c;
}
else
{
elf_uncompress_failed ();
return 0;
}
}
/* Make sure that the stop code can appear. */
plen = plenbase;
if (unlikely (plen[256] == 0))
{
elf_uncompress_failed ();
return 0;
}
/* Build the decompression tables. */
if (!elf_zlib_inflate_table (plen, nlit, zdebug_table,
zdebug_table))
return 0;
if (!elf_zlib_inflate_table (plen + nlit, ndist, zdebug_table,
zdebug_table + HUFFMAN_TABLE_SIZE))
return 0;
tlit = zdebug_table;
tdist = zdebug_table + HUFFMAN_TABLE_SIZE;
}
/* Inflate values until the end of the block. This is the
main loop of the inflation code. */
while (1)
{
uint16_t t;
unsigned int b;
uint16_t v;
unsigned int lit;
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
t = tlit[val & 0xff];
b = (t >> HUFFMAN_BITS_SHIFT) & HUFFMAN_BITS_MASK;
v = t & HUFFMAN_VALUE_MASK;
if ((t & (1U << HUFFMAN_SECONDARY_SHIFT)) == 0)
{
lit = v;
val >>= b + 1;
bits -= b + 1;
}
else
{
t = tlit[v + 0x100 + ((val >> 8) & ((1U << b) - 1))];
b = (t >> HUFFMAN_BITS_SHIFT) & HUFFMAN_BITS_MASK;
lit = t & HUFFMAN_VALUE_MASK;
val >>= b + 8;
bits -= b + 8;
}
if (lit < 256)
{
if (unlikely (pout == poutend))
{
elf_uncompress_failed ();
return 0;
}
*pout++ = lit;
/* We will need to write the next byte soon. We ask
for high temporal locality because we will write
to the whole cache line soon. */
__builtin_prefetch (pout, 1, 3);
}
else if (lit == 256)
{
/* The end of the block. */
break;
}
else
{
unsigned int dist;
unsigned int len;
/* Convert lit into a length. */
if (lit < 265)
len = lit - 257 + 3;
else if (lit == 285)
len = 258;
else if (unlikely (lit > 285))
{
elf_uncompress_failed ();
return 0;
}
else
{
unsigned int extra;
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
/* This is an expression for the table of length
codes in RFC 1951 3.2.5. */
lit -= 265;
extra = (lit >> 2) + 1;
len = (lit & 3) << extra;
len += 11;
len += ((1U << (extra - 1)) - 1) << 3;
len += val & ((1U << extra) - 1);
val >>= extra;
bits -= extra;
}
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
t = tdist[val & 0xff];
b = (t >> HUFFMAN_BITS_SHIFT) & HUFFMAN_BITS_MASK;
v = t & HUFFMAN_VALUE_MASK;
if ((t & (1U << HUFFMAN_SECONDARY_SHIFT)) == 0)
{
dist = v;
val >>= b + 1;
bits -= b + 1;
}
else
{
t = tdist[v + 0x100 + ((val >> 8) & ((1U << b) - 1))];
b = (t >> HUFFMAN_BITS_SHIFT) & HUFFMAN_BITS_MASK;
dist = t & HUFFMAN_VALUE_MASK;
val >>= b + 8;
bits -= b + 8;
}
/* Convert dist to a distance. */
if (dist == 0)
{
/* A distance of 1. A common case, meaning
repeat the last character LEN times. */
if (unlikely (pout == porigout))
{
elf_uncompress_failed ();
return 0;
}
if (unlikely ((unsigned int) (poutend - pout) < len))
{
elf_uncompress_failed ();
return 0;
}
memset (pout, pout[-1], len);
pout += len;
}
else if (unlikely (dist > 29))
{
elf_uncompress_failed ();
return 0;
}
else
{
if (dist < 4)
dist = dist + 1;
else
{
unsigned int extra;
if (!elf_zlib_fetch (&pin, pinend, &val, &bits))
return 0;
/* This is an expression for the table of
distance codes in RFC 1951 3.2.5. */
dist -= 4;
extra = (dist >> 1) + 1;
dist = (dist & 1) << extra;
dist += 5;
dist += ((1U << (extra - 1)) - 1) << 2;
dist += val & ((1U << extra) - 1);
val >>= extra;
bits -= extra;
}
/* Go back dist bytes, and copy len bytes from
there. */
if (unlikely ((unsigned int) (pout - porigout) < dist))
{
elf_uncompress_failed ();
return 0;
}
if (unlikely ((unsigned int) (poutend - pout) < len))
{
elf_uncompress_failed ();
return 0;
}
if (dist >= len)
{
memcpy (pout, pout - dist, len);
pout += len;
}
else
{
while (len > 0)
{
unsigned int copy;
copy = len < dist ? len : dist;
memcpy (pout, pout - dist, copy);
len -= copy;
pout += copy;
}
}
}
}
}
}
}
/* We should have filled the output buffer. */
if (unlikely (pout != poutend))
{
elf_uncompress_failed ();
return 0;
}
return 1;
}
/* Verify the zlib checksum. The checksum is in the 4 bytes at
CHECKBYTES, and the uncompressed data is at UNCOMPRESSED /
UNCOMPRESSED_SIZE. Returns 1 on success, 0 on failure. */
static int
elf_zlib_verify_checksum (const unsigned char *checkbytes,
const unsigned char *uncompressed,
size_t uncompressed_size)
{
unsigned int i;
unsigned int cksum;
const unsigned char *p;
uint32_t s1;
uint32_t s2;
size_t hsz;
cksum = 0;
for (i = 0; i < 4; i++)
cksum = (cksum << 8) | checkbytes[i];
s1 = 1;
s2 = 0;
/* Minimize modulo operations. */
p = uncompressed;
hsz = uncompressed_size;
while (hsz >= 5552)
{
for (i = 0; i < 5552; i += 16)
{
/* Manually unroll loop 16 times. */
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
}
hsz -= 5552;
s1 %= 65521;
s2 %= 65521;
}
while (hsz >= 16)
{
/* Manually unroll loop 16 times. */
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
s1 = s1 + *p++;
s2 = s2 + s1;
hsz -= 16;
}
for (i = 0; i < hsz; ++i)
{
s1 = s1 + *p++;
s2 = s2 + s1;
}
s1 %= 65521;
s2 %= 65521;
if (unlikely ((s2 << 16) + s1 != cksum))
{
elf_uncompress_failed ();
return 0;
}
return 1;
}
/* Inflate a zlib stream from PIN/SIN to POUT/SOUT, and verify the
checksum. Return 1 on success, 0 on error. */
static int
elf_zlib_inflate_and_verify (const unsigned char *pin, size_t sin,
uint16_t *zdebug_table, unsigned char *pout,
size_t sout)
{
if (!elf_zlib_inflate (pin, sin, zdebug_table, pout, sout))
return 0;
if (!elf_zlib_verify_checksum (pin + sin - 4, pout, sout))
return 0;
return 1;
}
/* Uncompress the old compressed debug format, the one emitted by
--compress-debug-sections=zlib-gnu. The compressed data is in
COMPRESSED / COMPRESSED_SIZE, and the function writes to
*UNCOMPRESSED / *UNCOMPRESSED_SIZE. ZDEBUG_TABLE is work space to
hold Huffman tables. Returns 0 on error, 1 on successful
decompression or if something goes wrong. In general we try to
carry on, by returning 1, even if we can't decompress. */
static int
elf_uncompress_zdebug (struct backtrace_state *state,
const unsigned char *compressed, size_t compressed_size,
uint16_t *zdebug_table,
backtrace_error_callback error_callback, void *data,
unsigned char **uncompressed, size_t *uncompressed_size)
{
size_t sz;
size_t i;
unsigned char *po;
*uncompressed = NULL;
*uncompressed_size = 0;
/* The format starts with the four bytes ZLIB, followed by the 8
byte length of the uncompressed data in big-endian order,
followed by a zlib stream. */
if (compressed_size < 12 || memcmp (compressed, "ZLIB", 4) != 0)
return 1;
sz = 0;
for (i = 0; i < 8; i++)
sz = (sz << 8) | compressed[i + 4];
if (*uncompressed != NULL && *uncompressed_size >= sz)
po = *uncompressed;
else
{
po = (unsigned char *) backtrace_alloc (state, sz, error_callback, data);
if (po == NULL)
return 0;
}
if (!elf_zlib_inflate_and_verify (compressed + 12, compressed_size - 12,
zdebug_table, po, sz))
return 1;
*uncompressed = po;
*uncompressed_size = sz;
return 1;
}
/* Uncompress the new compressed debug format, the official standard
ELF approach emitted by --compress-debug-sections=zlib-gabi. The
compressed data is in COMPRESSED / COMPRESSED_SIZE, and the
function writes to *UNCOMPRESSED / *UNCOMPRESSED_SIZE.
ZDEBUG_TABLE is work space as for elf_uncompress_zdebug. Returns 0
on error, 1 on successful decompression or if something goes wrong.
In general we try to carry on, by returning 1, even if we can't
decompress. */
static int
elf_uncompress_chdr (struct backtrace_state *state,
const unsigned char *compressed, size_t compressed_size,
uint16_t *zdebug_table,
backtrace_error_callback error_callback, void *data,
unsigned char **uncompressed, size_t *uncompressed_size)
{
const b_elf_chdr *chdr;
unsigned char *po;
*uncompressed = NULL;
*uncompressed_size = 0;
/* The format starts with an ELF compression header. */
if (compressed_size < sizeof (b_elf_chdr))
return 1;
chdr = (const b_elf_chdr *) compressed;
if (chdr->ch_type != ELFCOMPRESS_ZLIB)
{
/* Unsupported compression algorithm. */
return 1;
}
if (*uncompressed != NULL && *uncompressed_size >= chdr->ch_size)
po = *uncompressed;
else
{
po = (unsigned char *) backtrace_alloc (state, chdr->ch_size,
error_callback, data);
if (po == NULL)
return 0;
}
if (!elf_zlib_inflate_and_verify (compressed + sizeof (b_elf_chdr),
compressed_size - sizeof (b_elf_chdr),
zdebug_table, po, chdr->ch_size))
return 1;
*uncompressed = po;
*uncompressed_size = chdr->ch_size;
return 1;
}
/* This function is a hook for testing the zlib support. It is only
used by tests. */
int
backtrace_uncompress_zdebug (struct backtrace_state *state,
const unsigned char *compressed,
size_t compressed_size,
backtrace_error_callback error_callback,
void *data, unsigned char **uncompressed,
size_t *uncompressed_size)
{
uint16_t *zdebug_table;
int ret;
zdebug_table = ((uint16_t *) backtrace_alloc (state, ZDEBUG_TABLE_SIZE,
error_callback, data));
if (zdebug_table == NULL)
return 0;
ret = elf_uncompress_zdebug (state, compressed, compressed_size,
zdebug_table, error_callback, data,
uncompressed, uncompressed_size);
backtrace_free (state, zdebug_table, ZDEBUG_TABLE_SIZE,
error_callback, data);
return ret;
}
/* Number of LZMA states. */
#define LZMA_STATES (12)
/* Number of LZMA position states. The pb value of the property byte
is the number of bits to include in these states, and the maximum
value of pb is 4. */
#define LZMA_POS_STATES (16)
/* Number of LZMA distance states. These are used match distances
with a short match length: up to 4 bytes. */
#define LZMA_DIST_STATES (4)
/* Number of LZMA distance slots. LZMA uses six bits to encode larger
match lengths, so 1 << 6 possible probabilities. */
#define LZMA_DIST_SLOTS (64)
/* LZMA distances 0 to 3 are encoded directly, larger values use a
probability model. */
#define LZMA_DIST_MODEL_START (4)
/* The LZMA probability model ends at 14. */
#define LZMA_DIST_MODEL_END (14)
/* LZMA distance slots for distances less than 127. */
#define LZMA_FULL_DISTANCES (128)
/* LZMA uses four alignment bits. */
#define LZMA_ALIGN_SIZE (16)
/* LZMA match length is encoded with 4, 5, or 10 bits, some of which
are already known. */
#define LZMA_LEN_LOW_SYMBOLS (8)
#define LZMA_LEN_MID_SYMBOLS (8)
#define LZMA_LEN_HIGH_SYMBOLS (256)
/* LZMA literal encoding. */
#define LZMA_LITERAL_CODERS_MAX (16)
#define LZMA_LITERAL_CODER_SIZE (0x300)
/* LZMA is based on a large set of probabilities, each managed
independently. Each probability is an 11 bit number that we store
in a uint16_t. We use a single large array of probabilities. */
/* Lengths of entries in the LZMA probabilities array. The names used
here are copied from the Linux kernel implementation. */
#define LZMA_PROB_IS_MATCH_LEN (LZMA_STATES * LZMA_POS_STATES)
#define LZMA_PROB_IS_REP_LEN LZMA_STATES
#define LZMA_PROB_IS_REP0_LEN LZMA_STATES
#define LZMA_PROB_IS_REP1_LEN LZMA_STATES
#define LZMA_PROB_IS_REP2_LEN LZMA_STATES
#define LZMA_PROB_IS_REP0_LONG_LEN (LZMA_STATES * LZMA_POS_STATES)
#define LZMA_PROB_DIST_SLOT_LEN (LZMA_DIST_STATES * LZMA_DIST_SLOTS)
#define LZMA_PROB_DIST_SPECIAL_LEN (LZMA_FULL_DISTANCES - LZMA_DIST_MODEL_END)
#define LZMA_PROB_DIST_ALIGN_LEN LZMA_ALIGN_SIZE
#define LZMA_PROB_MATCH_LEN_CHOICE_LEN 1
#define LZMA_PROB_MATCH_LEN_CHOICE2_LEN 1
#define LZMA_PROB_MATCH_LEN_LOW_LEN (LZMA_POS_STATES * LZMA_LEN_LOW_SYMBOLS)
#define LZMA_PROB_MATCH_LEN_MID_LEN (LZMA_POS_STATES * LZMA_LEN_MID_SYMBOLS)
#define LZMA_PROB_MATCH_LEN_HIGH_LEN LZMA_LEN_HIGH_SYMBOLS
#define LZMA_PROB_REP_LEN_CHOICE_LEN 1
#define LZMA_PROB_REP_LEN_CHOICE2_LEN 1
#define LZMA_PROB_REP_LEN_LOW_LEN (LZMA_POS_STATES * LZMA_LEN_LOW_SYMBOLS)
#define LZMA_PROB_REP_LEN_MID_LEN (LZMA_POS_STATES * LZMA_LEN_MID_SYMBOLS)
#define LZMA_PROB_REP_LEN_HIGH_LEN LZMA_LEN_HIGH_SYMBOLS
#define LZMA_PROB_LITERAL_LEN \
(LZMA_LITERAL_CODERS_MAX * LZMA_LITERAL_CODER_SIZE)
/* Offsets into the LZMA probabilities array. This is mechanically
generated from the above lengths. */
#define LZMA_PROB_IS_MATCH_OFFSET 0
#define LZMA_PROB_IS_REP_OFFSET \
(LZMA_PROB_IS_MATCH_OFFSET + LZMA_PROB_IS_MATCH_LEN)
#define LZMA_PROB_IS_REP0_OFFSET \
(LZMA_PROB_IS_REP_OFFSET + LZMA_PROB_IS_REP_LEN)
#define LZMA_PROB_IS_REP1_OFFSET \
(LZMA_PROB_IS_REP0_OFFSET + LZMA_PROB_IS_REP0_LEN)
#define LZMA_PROB_IS_REP2_OFFSET \
(LZMA_PROB_IS_REP1_OFFSET + LZMA_PROB_IS_REP1_LEN)
#define LZMA_PROB_IS_REP0_LONG_OFFSET \
(LZMA_PROB_IS_REP2_OFFSET + LZMA_PROB_IS_REP2_LEN)
#define LZMA_PROB_DIST_SLOT_OFFSET \
(LZMA_PROB_IS_REP0_LONG_OFFSET + LZMA_PROB_IS_REP0_LONG_LEN)
#define LZMA_PROB_DIST_SPECIAL_OFFSET \
(LZMA_PROB_DIST_SLOT_OFFSET + LZMA_PROB_DIST_SLOT_LEN)
#define LZMA_PROB_DIST_ALIGN_OFFSET \
(LZMA_PROB_DIST_SPECIAL_OFFSET + LZMA_PROB_DIST_SPECIAL_LEN)
#define LZMA_PROB_MATCH_LEN_CHOICE_OFFSET \
(LZMA_PROB_DIST_ALIGN_OFFSET + LZMA_PROB_DIST_ALIGN_LEN)
#define LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET \
(LZMA_PROB_MATCH_LEN_CHOICE_OFFSET + LZMA_PROB_MATCH_LEN_CHOICE_LEN)
#define LZMA_PROB_MATCH_LEN_LOW_OFFSET \
(LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET + LZMA_PROB_MATCH_LEN_CHOICE2_LEN)
#define LZMA_PROB_MATCH_LEN_MID_OFFSET \
(LZMA_PROB_MATCH_LEN_LOW_OFFSET + LZMA_PROB_MATCH_LEN_LOW_LEN)
#define LZMA_PROB_MATCH_LEN_HIGH_OFFSET \
(LZMA_PROB_MATCH_LEN_MID_OFFSET + LZMA_PROB_MATCH_LEN_MID_LEN)
#define LZMA_PROB_REP_LEN_CHOICE_OFFSET \
(LZMA_PROB_MATCH_LEN_HIGH_OFFSET + LZMA_PROB_MATCH_LEN_HIGH_LEN)
#define LZMA_PROB_REP_LEN_CHOICE2_OFFSET \
(LZMA_PROB_REP_LEN_CHOICE_OFFSET + LZMA_PROB_REP_LEN_CHOICE_LEN)
#define LZMA_PROB_REP_LEN_LOW_OFFSET \
(LZMA_PROB_REP_LEN_CHOICE2_OFFSET + LZMA_PROB_REP_LEN_CHOICE2_LEN)
#define LZMA_PROB_REP_LEN_MID_OFFSET \
(LZMA_PROB_REP_LEN_LOW_OFFSET + LZMA_PROB_REP_LEN_LOW_LEN)
#define LZMA_PROB_REP_LEN_HIGH_OFFSET \
(LZMA_PROB_REP_LEN_MID_OFFSET + LZMA_PROB_REP_LEN_MID_LEN)
#define LZMA_PROB_LITERAL_OFFSET \
(LZMA_PROB_REP_LEN_HIGH_OFFSET + LZMA_PROB_REP_LEN_HIGH_LEN)
#define LZMA_PROB_TOTAL_COUNT \
(LZMA_PROB_LITERAL_OFFSET + LZMA_PROB_LITERAL_LEN)
/* Check that the number of LZMA probabilities is the same as the
Linux kernel implementation. */
#if LZMA_PROB_TOTAL_COUNT != 1846 + (1 << 4) * 0x300
#error Wrong number of LZMA probabilities
#endif
/* Expressions for the offset in the LZMA probabilities array of a
specific probability. */
#define LZMA_IS_MATCH(state, pos) \
(LZMA_PROB_IS_MATCH_OFFSET + (state) * LZMA_POS_STATES + (pos))
#define LZMA_IS_REP(state) \
(LZMA_PROB_IS_REP_OFFSET + (state))
#define LZMA_IS_REP0(state) \
(LZMA_PROB_IS_REP0_OFFSET + (state))
#define LZMA_IS_REP1(state) \
(LZMA_PROB_IS_REP1_OFFSET + (state))
#define LZMA_IS_REP2(state) \
(LZMA_PROB_IS_REP2_OFFSET + (state))
#define LZMA_IS_REP0_LONG(state, pos) \
(LZMA_PROB_IS_REP0_LONG_OFFSET + (state) * LZMA_POS_STATES + (pos))
#define LZMA_DIST_SLOT(dist, slot) \
(LZMA_PROB_DIST_SLOT_OFFSET + (dist) * LZMA_DIST_SLOTS + (slot))
#define LZMA_DIST_SPECIAL(dist) \
(LZMA_PROB_DIST_SPECIAL_OFFSET + (dist))
#define LZMA_DIST_ALIGN(dist) \
(LZMA_PROB_DIST_ALIGN_OFFSET + (dist))
#define LZMA_MATCH_LEN_CHOICE \
LZMA_PROB_MATCH_LEN_CHOICE_OFFSET
#define LZMA_MATCH_LEN_CHOICE2 \
LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET
#define LZMA_MATCH_LEN_LOW(pos, sym) \
(LZMA_PROB_MATCH_LEN_LOW_OFFSET + (pos) * LZMA_LEN_LOW_SYMBOLS + (sym))
#define LZMA_MATCH_LEN_MID(pos, sym) \
(LZMA_PROB_MATCH_LEN_MID_OFFSET + (pos) * LZMA_LEN_MID_SYMBOLS + (sym))
#define LZMA_MATCH_LEN_HIGH(sym) \
(LZMA_PROB_MATCH_LEN_HIGH_OFFSET + (sym))
#define LZMA_REP_LEN_CHOICE \
LZMA_PROB_REP_LEN_CHOICE_OFFSET
#define LZMA_REP_LEN_CHOICE2 \
LZMA_PROB_REP_LEN_CHOICE2_OFFSET
#define LZMA_REP_LEN_LOW(pos, sym) \
(LZMA_PROB_REP_LEN_LOW_OFFSET + (pos) * LZMA_LEN_LOW_SYMBOLS + (sym))
#define LZMA_REP_LEN_MID(pos, sym) \
(LZMA_PROB_REP_LEN_MID_OFFSET + (pos) * LZMA_LEN_MID_SYMBOLS + (sym))
#define LZMA_REP_LEN_HIGH(sym) \
(LZMA_PROB_REP_LEN_HIGH_OFFSET + (sym))
#define LZMA_LITERAL(code, size) \
(LZMA_PROB_LITERAL_OFFSET + (code) * LZMA_LITERAL_CODER_SIZE + (size))
/* Read an LZMA varint from BUF, reading and updating *POFFSET,
setting *VAL. Returns 0 on error, 1 on success. */
static int
elf_lzma_varint (const unsigned char *compressed, size_t compressed_size,
size_t *poffset, uint64_t *val)
{
size_t off;
int i;
uint64_t v;
unsigned char b;
off = *poffset;
i = 0;
v = 0;
while (1)
{
if (unlikely (off >= compressed_size))
{
elf_uncompress_failed ();
return 0;
}
b = compressed[off];
v |= (b & 0x7f) << (i * 7);
++off;
if ((b & 0x80) == 0)
{
*poffset = off;
*val = v;
return 1;
}
++i;
if (unlikely (i >= 9))
{
elf_uncompress_failed ();
return 0;
}
}
}
/* Normalize the LZMA range decoder, pulling in an extra input byte if
needed. */
static void
elf_lzma_range_normalize (const unsigned char *compressed,
size_t compressed_size, size_t *poffset,
uint32_t *prange, uint32_t *pcode)
{
if (*prange < (1U << 24))
{
if (unlikely (*poffset >= compressed_size))
{
/* We assume this will be caught elsewhere. */
elf_uncompress_failed ();
return;
}
*prange <<= 8;
*pcode <<= 8;
*pcode += compressed[*poffset];
++*poffset;
}
}
/* Read and return a single bit from the LZMA stream, reading and
updating *PROB. Each bit comes from the range coder. */
static int
elf_lzma_bit (const unsigned char *compressed, size_t compressed_size,
uint16_t *prob, size_t *poffset, uint32_t *prange,
uint32_t *pcode)
{
uint32_t bound;
elf_lzma_range_normalize (compressed, compressed_size, poffset,
prange, pcode);
bound = (*prange >> 11) * (uint32_t) *prob;
if (*pcode < bound)
{
*prange = bound;
*prob += ((1U << 11) - *prob) >> 5;
return 0;
}
else
{
*prange -= bound;
*pcode -= bound;
*prob -= *prob >> 5;
return 1;
}
}
/* Read an integer of size BITS from the LZMA stream, most significant
bit first. The bits are predicted using PROBS. */
static uint32_t
elf_lzma_integer (const unsigned char *compressed, size_t compressed_size,
uint16_t *probs, uint32_t bits, size_t *poffset,
uint32_t *prange, uint32_t *pcode)
{
uint32_t sym;
uint32_t i;
sym = 1;
for (i = 0; i < bits; i++)
{
int bit;
bit = elf_lzma_bit (compressed, compressed_size, probs + sym, poffset,
prange, pcode);
sym <<= 1;
sym += bit;
}
return sym - (1 << bits);
}
/* Read an integer of size BITS from the LZMA stream, least
significant bit first. The bits are predicted using PROBS. */
static uint32_t
elf_lzma_reverse_integer (const unsigned char *compressed,
size_t compressed_size, uint16_t *probs,
uint32_t bits, size_t *poffset, uint32_t *prange,
uint32_t *pcode)
{
uint32_t sym;
uint32_t val;
uint32_t i;
sym = 1;
val = 0;
for (i = 0; i < bits; i++)
{
int bit;
bit = elf_lzma_bit (compressed, compressed_size, probs + sym, poffset,
prange, pcode);
sym <<= 1;
sym += bit;
val += bit << i;
}
return val;
}
/* Read a length from the LZMA stream. IS_REP picks either LZMA_MATCH
or LZMA_REP probabilities. */
static uint32_t
elf_lzma_len (const unsigned char *compressed, size_t compressed_size,
uint16_t *probs, int is_rep, unsigned int pos_state,
size_t *poffset, uint32_t *prange, uint32_t *pcode)
{
uint16_t *probs_choice;
uint16_t *probs_sym;
uint32_t bits;
uint32_t len;
probs_choice = probs + (is_rep
? LZMA_REP_LEN_CHOICE
: LZMA_MATCH_LEN_CHOICE);
if (elf_lzma_bit (compressed, compressed_size, probs_choice, poffset,
prange, pcode))
{
probs_choice = probs + (is_rep
? LZMA_REP_LEN_CHOICE2
: LZMA_MATCH_LEN_CHOICE2);
if (elf_lzma_bit (compressed, compressed_size, probs_choice,
poffset, prange, pcode))
{
probs_sym = probs + (is_rep
? LZMA_REP_LEN_HIGH (0)
: LZMA_MATCH_LEN_HIGH (0));
bits = 8;
len = 2 + 8 + 8;
}
else
{
probs_sym = probs + (is_rep
? LZMA_REP_LEN_MID (pos_state, 0)
: LZMA_MATCH_LEN_MID (pos_state, 0));
bits = 3;
len = 2 + 8;
}
}
else
{
probs_sym = probs + (is_rep
? LZMA_REP_LEN_LOW (pos_state, 0)
: LZMA_MATCH_LEN_LOW (pos_state, 0));
bits = 3;
len = 2;
}
len += elf_lzma_integer (compressed, compressed_size, probs_sym, bits,
poffset, prange, pcode);
return len;
}
/* Uncompress one LZMA block from a minidebug file. The compressed
data is at COMPRESSED + *POFFSET. Update *POFFSET. Store the data
into the memory at UNCOMPRESSED, size UNCOMPRESSED_SIZE. CHECK is
the stream flag from the xz header. Return 1 on successful
decompression. */
static int
elf_uncompress_lzma_block (const unsigned char *compressed,
size_t compressed_size, unsigned char check,
uint16_t *probs, unsigned char *uncompressed,
size_t uncompressed_size, size_t *poffset)
{
size_t off;
size_t block_header_offset;
size_t block_header_size;
unsigned char block_flags;
uint64_t header_compressed_size;
uint64_t header_uncompressed_size;
unsigned char lzma2_properties;
uint32_t computed_crc;
uint32_t stream_crc;
size_t uncompressed_offset;
size_t dict_start_offset;
unsigned int lc;
unsigned int lp;
unsigned int pb;
uint32_t range;
uint32_t code;
uint32_t lstate;
uint32_t dist[4];
off = *poffset;
block_header_offset = off;
/* Block header size is a single byte. */
if (unlikely (off >= compressed_size))
{
elf_uncompress_failed ();
return 0;
}
block_header_size = (compressed[off] + 1) * 4;
if (unlikely (off + block_header_size > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
/* Block flags. */
block_flags = compressed[off + 1];
if (unlikely ((block_flags & 0x3c) != 0))
{
elf_uncompress_failed ();
return 0;
}
off += 2;
/* Optional compressed size. */
header_compressed_size = 0;
if ((block_flags & 0x40) != 0)
{
*poffset = off;
if (!elf_lzma_varint (compressed, compressed_size, poffset,
&header_compressed_size))
return 0;
off = *poffset;
}
/* Optional uncompressed size. */
header_uncompressed_size = 0;
if ((block_flags & 0x80) != 0)
{
*poffset = off;
if (!elf_lzma_varint (compressed, compressed_size, poffset,
&header_uncompressed_size))
return 0;
off = *poffset;
}
/* The recipe for creating a minidebug file is to run the xz program
with no arguments, so we expect exactly one filter: lzma2. */
if (unlikely ((block_flags & 0x3) != 0))
{
elf_uncompress_failed ();
return 0;
}
if (unlikely (off + 2 >= block_header_offset + block_header_size))
{
elf_uncompress_failed ();
return 0;
}
/* The filter ID for LZMA2 is 0x21. */
if (unlikely (compressed[off] != 0x21))
{
elf_uncompress_failed ();
return 0;
}
++off;
/* The size of the filter properties for LZMA2 is 1. */
if (unlikely (compressed[off] != 1))
{
elf_uncompress_failed ();
return 0;
}
++off;
lzma2_properties = compressed[off];
++off;
if (unlikely (lzma2_properties > 40))
{
elf_uncompress_failed ();
return 0;
}
/* The properties describe the dictionary size, but we don't care
what that is. */
/* Block header padding. */
if (unlikely (off + 4 > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
off = (off + 3) &~ (size_t) 3;
if (unlikely (off + 4 > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
/* Block header CRC. */
computed_crc = elf_crc32 (0, compressed + block_header_offset,
block_header_size - 4);
stream_crc = (compressed[off]
| (compressed[off + 1] << 8)
| (compressed[off + 2] << 16)
| (compressed[off + 3] << 24));
if (unlikely (computed_crc != stream_crc))
{
elf_uncompress_failed ();
return 0;
}
off += 4;
/* Read a sequence of LZMA2 packets. */
uncompressed_offset = 0;
dict_start_offset = 0;
lc = 0;
lp = 0;
pb = 0;
lstate = 0;
while (off < compressed_size)
{
unsigned char control;
range = 0xffffffff;
code = 0;
control = compressed[off];
++off;
if (unlikely (control == 0))
{
/* End of packets. */
break;
}
if (control == 1 || control >= 0xe0)
{
/* Reset dictionary to empty. */
dict_start_offset = uncompressed_offset;
}
if (control < 0x80)
{
size_t chunk_size;
/* The only valid values here are 1 or 2. A 1 means to
reset the dictionary (done above). Then we see an
uncompressed chunk. */
if (unlikely (control > 2))
{
elf_uncompress_failed ();
return 0;
}
/* An uncompressed chunk is a two byte size followed by
data. */
if (unlikely (off + 2 > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
chunk_size = compressed[off] << 8;
chunk_size += compressed[off + 1];
++chunk_size;
off += 2;
if (unlikely (off + chunk_size > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
if (unlikely (uncompressed_offset + chunk_size > uncompressed_size))
{
elf_uncompress_failed ();
return 0;
}
memcpy (uncompressed + uncompressed_offset, compressed + off,
chunk_size);
uncompressed_offset += chunk_size;
off += chunk_size;
}
else
{
size_t uncompressed_chunk_start;
size_t uncompressed_chunk_size;
size_t compressed_chunk_size;
size_t limit;
/* An LZMA chunk. This starts with an uncompressed size and
a compressed size. */
if (unlikely (off + 4 >= compressed_size))
{
elf_uncompress_failed ();
return 0;
}
uncompressed_chunk_start = uncompressed_offset;
uncompressed_chunk_size = (control & 0x1f) << 16;
uncompressed_chunk_size += compressed[off] << 8;
uncompressed_chunk_size += compressed[off + 1];
++uncompressed_chunk_size;
compressed_chunk_size = compressed[off + 2] << 8;
compressed_chunk_size += compressed[off + 3];
++compressed_chunk_size;
off += 4;
/* Bit 7 (0x80) is set.
Bits 6 and 5 (0x40 and 0x20) are as follows:
0: don't reset anything
1: reset state
2: reset state, read properties
3: reset state, read properties, reset dictionary (done above) */
if (control >= 0xc0)
{
unsigned char props;
/* Bit 6 is set, read properties. */
if (unlikely (off >= compressed_size))
{
elf_uncompress_failed ();
return 0;
}
props = compressed[off];
++off;
if (unlikely (props > (4 * 5 + 4) * 9 + 8))
{
elf_uncompress_failed ();
return 0;
}
pb = 0;
while (props >= 9 * 5)
{
props -= 9 * 5;
++pb;
}
lp = 0;
while (props > 9)
{
props -= 9;
++lp;
}
lc = props;
if (unlikely (lc + lp > 4))
{
elf_uncompress_failed ();
return 0;
}
}
if (control >= 0xa0)
{
size_t i;
/* Bit 5 or 6 is set, reset LZMA state. */
lstate = 0;
memset (&dist, 0, sizeof dist);
for (i = 0; i < LZMA_PROB_TOTAL_COUNT; i++)
probs[i] = 1 << 10;
range = 0xffffffff;
code = 0;
}
/* Read the range code. */
if (unlikely (off + 5 > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
/* The byte at compressed[off] is ignored for some
reason. */
code = ((compressed[off + 1] << 24)
+ (compressed[off + 2] << 16)
+ (compressed[off + 3] << 8)
+ compressed[off + 4]);
off += 5;
/* This is the main LZMA decode loop. */
limit = off + compressed_chunk_size;
*poffset = off;
while (*poffset < limit)
{
unsigned int pos_state;
if (unlikely (uncompressed_offset
== (uncompressed_chunk_start
+ uncompressed_chunk_size)))
{
/* We've decompressed all the expected bytes. */
break;
}
pos_state = ((uncompressed_offset - dict_start_offset)
& ((1 << pb) - 1));
if (elf_lzma_bit (compressed, compressed_size,
probs + LZMA_IS_MATCH (lstate, pos_state),
poffset, &range, &code))
{
uint32_t len;
if (elf_lzma_bit (compressed, compressed_size,
probs + LZMA_IS_REP (lstate),
poffset, &range, &code))
{
int short_rep;
uint32_t next_dist;
/* Repeated match. */
short_rep = 0;
if (elf_lzma_bit (compressed, compressed_size,
probs + LZMA_IS_REP0 (lstate),
poffset, &range, &code))
{
if (elf_lzma_bit (compressed, compressed_size,
probs + LZMA_IS_REP1 (lstate),
poffset, &range, &code))
{
if (elf_lzma_bit (compressed, compressed_size,
probs + LZMA_IS_REP2 (lstate),
poffset, &range, &code))
{
next_dist = dist[3];
dist[3] = dist[2];
}
else
{
next_dist = dist[2];
}
dist[2] = dist[1];
}
else
{
next_dist = dist[1];
}
dist[1] = dist[0];
dist[0] = next_dist;
}
else
{
if (!elf_lzma_bit (compressed, compressed_size,
(probs
+ LZMA_IS_REP0_LONG (lstate,
pos_state)),
poffset, &range, &code))
short_rep = 1;
}
if (lstate < 7)
lstate = short_rep ? 9 : 8;
else
lstate = 11;
if (short_rep)
len = 1;
else
len = elf_lzma_len (compressed, compressed_size,
probs, 1, pos_state, poffset,
&range, &code);
}
else
{
uint32_t dist_state;
uint32_t dist_slot;
uint16_t *probs_dist;
/* Match. */
if (lstate < 7)
lstate = 7;
else
lstate = 10;
dist[3] = dist[2];
dist[2] = dist[1];
dist[1] = dist[0];
len = elf_lzma_len (compressed, compressed_size,
probs, 0, pos_state, poffset,
&range, &code);
if (len < 4 + 2)
dist_state = len - 2;
else
dist_state = 3;
probs_dist = probs + LZMA_DIST_SLOT (dist_state, 0);
dist_slot = elf_lzma_integer (compressed,
compressed_size,
probs_dist, 6,
poffset, &range,
&code);
if (dist_slot < LZMA_DIST_MODEL_START)
dist[0] = dist_slot;
else
{
uint32_t limit;
limit = (dist_slot >> 1) - 1;
dist[0] = 2 + (dist_slot & 1);
if (dist_slot < LZMA_DIST_MODEL_END)
{
dist[0] <<= limit;
probs_dist = (probs
+ LZMA_DIST_SPECIAL(dist[0]
- dist_slot
- 1));
dist[0] +=
elf_lzma_reverse_integer (compressed,
compressed_size,
probs_dist,
limit, poffset,
&range, &code);
}
else
{
uint32_t dist0;
uint32_t i;
dist0 = dist[0];
for (i = 0; i < limit - 4; i++)
{
uint32_t mask;
elf_lzma_range_normalize (compressed,
compressed_size,
poffset,
&range, &code);
range >>= 1;
code -= range;
mask = -(code >> 31);
code += range & mask;
dist0 <<= 1;
dist0 += mask + 1;
}
dist0 <<= 4;
probs_dist = probs + LZMA_DIST_ALIGN (0);
dist0 +=
elf_lzma_reverse_integer (compressed,
compressed_size,
probs_dist, 4,
poffset,
&range, &code);
dist[0] = dist0;
}
}
}
if (unlikely (uncompressed_offset
- dict_start_offset < dist[0] + 1))
{
elf_uncompress_failed ();
return 0;
}
if (unlikely (uncompressed_offset + len > uncompressed_size))
{
elf_uncompress_failed ();
return 0;
}
if (dist[0] == 0)
{
/* A common case, meaning repeat the last
character LEN times. */
memset (uncompressed + uncompressed_offset,
uncompressed[uncompressed_offset - 1],
len);
uncompressed_offset += len;
}
else if (dist[0] + 1 >= len)
{
memcpy (uncompressed + uncompressed_offset,
uncompressed + uncompressed_offset - dist[0] - 1,
len);
uncompressed_offset += len;
}
else
{
while (len > 0)
{
uint32_t copy;
copy = len < dist[0] + 1 ? len : dist[0] + 1;
memcpy (uncompressed + uncompressed_offset,
(uncompressed + uncompressed_offset
- dist[0] - 1),
copy);
len -= copy;
uncompressed_offset += copy;
}
}
}
else
{
unsigned char prev;
unsigned char low;
size_t high;
uint16_t *lit_probs;
unsigned int sym;
/* Literal value. */
if (uncompressed_offset > 0)
prev = uncompressed[uncompressed_offset - 1];
else
prev = 0;
low = prev >> (8 - lc);
high = (((uncompressed_offset - dict_start_offset)
& ((1 << lp) - 1))
<< lc);
lit_probs = probs + LZMA_LITERAL (low + high, 0);
if (lstate < 7)
sym = elf_lzma_integer (compressed, compressed_size,
lit_probs, 8, poffset, &range,
&code);
else
{
unsigned int match;
unsigned int bit;
unsigned int match_bit;
unsigned int idx;
sym = 1;
if (uncompressed_offset >= dist[0] + 1)
match = uncompressed[uncompressed_offset - dist[0] - 1];
else
match = 0;
match <<= 1;
bit = 0x100;
do
{
match_bit = match & bit;
match <<= 1;
idx = bit + match_bit + sym;
sym <<= 1;
if (elf_lzma_bit (compressed, compressed_size,
lit_probs + idx, poffset,
&range, &code))
{
++sym;
bit &= match_bit;
}
else
{
bit &= ~ match_bit;
}
}
while (sym < 0x100);
}
if (unlikely (uncompressed_offset >= uncompressed_size))
{
elf_uncompress_failed ();
return 0;
}
uncompressed[uncompressed_offset] = (unsigned char) sym;
++uncompressed_offset;
if (lstate <= 3)
lstate = 0;
else if (lstate <= 9)
lstate -= 3;
else
lstate -= 6;
}
}
elf_lzma_range_normalize (compressed, compressed_size, poffset,
&range, &code);
off = *poffset;
}
}
/* We have reached the end of the block. Pad to four byte
boundary. */
off = (off + 3) &~ (size_t) 3;
if (unlikely (off > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
switch (check)
{
case 0:
/* No check. */
break;
case 1:
/* CRC32 */
if (unlikely (off + 4 > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
computed_crc = elf_crc32 (0, uncompressed, uncompressed_offset);
stream_crc = (compressed[off]
| (compressed[off + 1] << 8)
| (compressed[off + 2] << 16)
| (compressed[off + 3] << 24));
if (computed_crc != stream_crc)
{
elf_uncompress_failed ();
return 0;
}
off += 4;
break;
case 4:
/* CRC64. We don't bother computing a CRC64 checksum. */
if (unlikely (off + 8 > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
off += 8;
break;
case 10:
/* SHA. We don't bother computing a SHA checksum. */
if (unlikely (off + 32 > compressed_size))
{
elf_uncompress_failed ();
return 0;
}
off += 32;
break;
default:
elf_uncompress_failed ();
return 0;
}
*poffset = off;
return 1;
}
/* Uncompress LZMA data found in a minidebug file. The minidebug
format is described at
https://sourceware.org/gdb/current/onlinedocs/gdb/MiniDebugInfo.html.
Returns 0 on error, 1 on successful decompression. For this
function we return 0 on failure to decompress, as the calling code
will carry on in that case. */
static int
elf_uncompress_lzma (struct backtrace_state *state,
const unsigned char *compressed, size_t compressed_size,
backtrace_error_callback error_callback, void *data,
unsigned char **uncompressed, size_t *uncompressed_size)
{
size_t header_size;
size_t footer_size;
unsigned char check;
uint32_t computed_crc;
uint32_t stream_crc;
size_t offset;
size_t index_size;
size_t footer_offset;
size_t index_offset;
uint64_t index_compressed_size;
uint64_t index_uncompressed_size;
unsigned char *mem;
uint16_t *probs;
size_t compressed_block_size;
/* The format starts with a stream header and ends with a stream
footer. */
header_size = 12;
footer_size = 12;
if (unlikely (compressed_size < header_size + footer_size))
{
elf_uncompress_failed ();
return 0;
}
/* The stream header starts with a magic string. */
if (unlikely (memcmp (compressed, "\375" "7zXZ\0", 6) != 0))
{
elf_uncompress_failed ();
return 0;
}
/* Next come stream flags. The first byte is zero, the second byte
is the check. */
if (unlikely (compressed[6] != 0))
{
elf_uncompress_failed ();
return 0;
}
check = compressed[7];
if (unlikely ((check & 0xf8) != 0))
{
elf_uncompress_failed ();
return 0;
}
/* Next comes a CRC of the stream flags. */
computed_crc = elf_crc32 (0, compressed + 6, 2);
stream_crc = (compressed[8]
| (compressed[9] << 8)
| (compressed[10] << 16)
| (compressed[11] << 24));
if (unlikely (computed_crc != stream_crc))
{
elf_uncompress_failed ();
return 0;
}
/* Now that we've parsed the header, parse the footer, so that we
can get the uncompressed size. */
/* The footer ends with two magic bytes. */
offset = compressed_size;
if (unlikely (memcmp (compressed + offset - 2, "YZ", 2) != 0))
{
elf_uncompress_failed ();
return 0;
}
offset -= 2;
/* Before that are the stream flags, which should be the same as the
flags in the header. */
if (unlikely (compressed[offset - 2] != 0
|| compressed[offset - 1] != check))
{
elf_uncompress_failed ();
return 0;
}
offset -= 2;
/* Before that is the size of the index field, which precedes the
footer. */
index_size = (compressed[offset - 4]
| (compressed[offset - 3] << 8)
| (compressed[offset - 2] << 16)
| (compressed[offset - 1] << 24));
index_size = (index_size + 1) * 4;
offset -= 4;
/* Before that is a footer CRC. */
computed_crc = elf_crc32 (0, compressed + offset, 6);
stream_crc = (compressed[offset - 4]
| (compressed[offset - 3] << 8)
| (compressed[offset - 2] << 16)
| (compressed[offset - 1] << 24));
if (unlikely (computed_crc != stream_crc))
{
elf_uncompress_failed ();
return 0;
}
offset -= 4;
/* The index comes just before the footer. */
if (unlikely (offset < index_size + header_size))
{
elf_uncompress_failed ();
return 0;
}
footer_offset = offset;
offset -= index_size;
index_offset = offset;
/* The index starts with a zero byte. */
if (unlikely (compressed[offset] != 0))
{
elf_uncompress_failed ();
return 0;
}
++offset;
/* Next is the number of blocks. We expect zero blocks for an empty
stream, and otherwise a single block. */
if (unlikely (compressed[offset] == 0))
{
*uncompressed = NULL;
*uncompressed_size = 0;
return 1;
}
if (unlikely (compressed[offset] != 1))
{
elf_uncompress_failed ();
return 0;
}
++offset;
/* Next is the compressed size and the uncompressed size. */
if (!elf_lzma_varint (compressed, compressed_size, &offset,
&index_compressed_size))
return 0;
if (!elf_lzma_varint (compressed, compressed_size, &offset,
&index_uncompressed_size))
return 0;
/* Pad to a four byte boundary. */
offset = (offset + 3) &~ (size_t) 3;
/* Next is a CRC of the index. */
computed_crc = elf_crc32 (0, compressed + index_offset,
offset - index_offset);
stream_crc = (compressed[offset]
| (compressed[offset + 1] << 8)
| (compressed[offset + 2] << 16)
| (compressed[offset + 3] << 24));
if (unlikely (computed_crc != stream_crc))
{
elf_uncompress_failed ();
return 0;
}
offset += 4;
/* We should now be back at the footer. */
if (unlikely (offset != footer_offset))
{
elf_uncompress_failed ();
return 0;
}
/* Allocate space to hold the uncompressed data. If we succeed in
uncompressing the LZMA data, we never free this memory. */
mem = (unsigned char *) backtrace_alloc (state, index_uncompressed_size,
error_callback, data);
if (unlikely (mem == NULL))
return 0;
*uncompressed = mem;
*uncompressed_size = index_uncompressed_size;
/* Allocate space for probabilities. */
probs = ((uint16_t *)
backtrace_alloc (state,
LZMA_PROB_TOTAL_COUNT * sizeof (uint16_t),
error_callback, data));
if (unlikely (probs == NULL))
{
backtrace_free (state, mem, index_uncompressed_size, error_callback,
data);
return 0;
}
/* Uncompress the block, which follows the header. */
offset = 12;
if (!elf_uncompress_lzma_block (compressed, compressed_size, check, probs,
mem, index_uncompressed_size, &offset))
{
backtrace_free (state, mem, index_uncompressed_size, error_callback,
data);
return 0;
}
compressed_block_size = offset - 12;
if (unlikely (compressed_block_size
!= ((index_compressed_size + 3) &~ (size_t) 3)))
{
elf_uncompress_failed ();
backtrace_free (state, mem, index_uncompressed_size, error_callback,
data);
return 0;
}
offset = (offset + 3) &~ (size_t) 3;
if (unlikely (offset != index_offset))
{
elf_uncompress_failed ();
backtrace_free (state, mem, index_uncompressed_size, error_callback,
data);
return 0;
}
return 1;
}
/* This function is a hook for testing the LZMA support. It is only
used by tests. */
int
backtrace_uncompress_lzma (struct backtrace_state *state,
const unsigned char *compressed,
size_t compressed_size,
backtrace_error_callback error_callback,
void *data, unsigned char **uncompressed,
size_t *uncompressed_size)
{
return elf_uncompress_lzma (state, compressed, compressed_size,
error_callback, data, uncompressed,
uncompressed_size);
}
/* Add the backtrace data for one ELF file. Returns 1 on success,
0 on failure (in both cases descriptor is closed) or -1 if exe
is non-zero and the ELF file is ET_DYN, which tells the caller that
elf_add will need to be called on the descriptor again after
base_address is determined. */
static int
elf_add (struct backtrace_state *state, const char *filename, int descriptor,
const unsigned char *memory, size_t memory_size,
uintptr_t base_address, backtrace_error_callback error_callback,
void *data, fileline *fileline_fn, int *found_sym, int *found_dwarf,
struct dwarf_data **fileline_entry, int exe, int debuginfo,
const char *with_buildid_data, uint32_t with_buildid_size)
{
struct elf_view ehdr_view;
b_elf_ehdr ehdr;
off_t shoff;
unsigned int shnum;
unsigned int shstrndx;
struct elf_view shdrs_view;
int shdrs_view_valid;
const b_elf_shdr *shdrs;
const b_elf_shdr *shstrhdr;
size_t shstr_size;
off_t shstr_off;
struct elf_view names_view;
int names_view_valid;
const char *names;
unsigned int symtab_shndx;
unsigned int dynsym_shndx;
unsigned int i;
struct debug_section_info sections[DEBUG_MAX];
struct debug_section_info zsections[DEBUG_MAX];
struct elf_view symtab_view;
int symtab_view_valid;
struct elf_view strtab_view;
int strtab_view_valid;
struct elf_view buildid_view;
int buildid_view_valid;
const char *buildid_data;
uint32_t buildid_size;
struct elf_view debuglink_view;
int debuglink_view_valid;
const char *debuglink_name;
uint32_t debuglink_crc;
struct elf_view debugaltlink_view;
int debugaltlink_view_valid;
const char *debugaltlink_name;
const char *debugaltlink_buildid_data;
uint32_t debugaltlink_buildid_size;
struct elf_view gnu_debugdata_view;
int gnu_debugdata_view_valid;
size_t gnu_debugdata_size;
unsigned char *gnu_debugdata_uncompressed;
size_t gnu_debugdata_uncompressed_size;
off_t min_offset;
off_t max_offset;
off_t debug_size;
struct elf_view debug_view;
int debug_view_valid;
unsigned int using_debug_view;
uint16_t *zdebug_table;
struct elf_view split_debug_view[DEBUG_MAX];
unsigned char split_debug_view_valid[DEBUG_MAX];
struct elf_ppc64_opd_data opd_data, *opd;
struct dwarf_sections dwarf_sections;
struct dwarf_data *fileline_altlink = NULL;
if (!debuginfo)
{
*found_sym = 0;
*found_dwarf = 0;
}
shdrs_view_valid = 0;
names_view_valid = 0;
symtab_view_valid = 0;
strtab_view_valid = 0;
buildid_view_valid = 0;
buildid_data = NULL;
buildid_size = 0;
debuglink_view_valid = 0;
debuglink_name = NULL;
debuglink_crc = 0;
debugaltlink_view_valid = 0;
debugaltlink_name = NULL;
debugaltlink_buildid_data = NULL;
debugaltlink_buildid_size = 0;
gnu_debugdata_view_valid = 0;
gnu_debugdata_size = 0;
debug_view_valid = 0;
memset (&split_debug_view_valid[0], 0, sizeof split_debug_view_valid);
opd = NULL;
if (!elf_get_view (state, descriptor, memory, memory_size, 0, sizeof ehdr,
error_callback, data, &ehdr_view))
goto fail;
memcpy (&ehdr, ehdr_view.view.data, sizeof ehdr);
elf_release_view (state, &ehdr_view, error_callback, data);
if (ehdr.e_ident[EI_MAG0] != ELFMAG0
|| ehdr.e_ident[EI_MAG1] != ELFMAG1
|| ehdr.e_ident[EI_MAG2] != ELFMAG2
|| ehdr.e_ident[EI_MAG3] != ELFMAG3)
{
error_callback (data, "executable file is not ELF", 0);
goto fail;
}
if (ehdr.e_ident[EI_VERSION] != EV_CURRENT)
{
error_callback (data, "executable file is unrecognized ELF version", 0);
goto fail;
}
#if BACKTRACE_ELF_SIZE == 32
#define BACKTRACE_ELFCLASS ELFCLASS32
#else
#define BACKTRACE_ELFCLASS ELFCLASS64
#endif
if (ehdr.e_ident[EI_CLASS] != BACKTRACE_ELFCLASS)
{
error_callback (data, "executable file is unexpected ELF class", 0);
goto fail;
}
if (ehdr.e_ident[EI_DATA] != ELFDATA2LSB
&& ehdr.e_ident[EI_DATA] != ELFDATA2MSB)
{
error_callback (data, "executable file has unknown endianness", 0);
goto fail;
}
/* If the executable is ET_DYN, it is either a PIE, or we are running
directly a shared library with .interp. We need to wait for
dl_iterate_phdr in that case to determine the actual base_address. */
if (exe && ehdr.e_type == ET_DYN)
return -1;
shoff = ehdr.e_shoff;
shnum = ehdr.e_shnum;
shstrndx = ehdr.e_shstrndx;
if ((shnum == 0 || shstrndx == SHN_XINDEX)
&& shoff != 0)
{
struct elf_view shdr_view;
const b_elf_shdr *shdr;
if (!elf_get_view (state, descriptor, memory, memory_size, shoff,
sizeof shdr, error_callback, data, &shdr_view))
goto fail;
shdr = (const b_elf_shdr *) shdr_view.view.data;
if (shnum == 0)
shnum = shdr->sh_size;
if (shstrndx == SHN_XINDEX)
{
shstrndx = shdr->sh_link;
/* Versions of the GNU binutils between 2.12 and 2.18 did
not handle objects with more than SHN_LORESERVE sections
correctly. All large section indexes were offset by
0x100. There is more information at
http://sourceware.org/bugzilla/show_bug.cgi?id-5900 .
Fortunately these object files are easy to detect, as the
GNU binutils always put the section header string table
near the end of the list of sections. Thus if the
section header string table index is larger than the
number of sections, then we know we have to subtract
0x100 to get the real section index. */
if (shstrndx >= shnum && shstrndx >= SHN_LORESERVE + 0x100)
shstrndx -= 0x100;
}
elf_release_view (state, &shdr_view, error_callback, data);
}
if (shnum == 0 || shstrndx == 0)
goto fail;
/* To translate PC to file/line when using DWARF, we need to find
the .debug_info and .debug_line sections. */
/* Read the section headers, skipping the first one. */
if (!elf_get_view (state, descriptor, memory, memory_size,
shoff + sizeof (b_elf_shdr),
(shnum - 1) * sizeof (b_elf_shdr),
error_callback, data, &shdrs_view))
goto fail;
shdrs_view_valid = 1;
shdrs = (const b_elf_shdr *) shdrs_view.view.data;
/* Read the section names. */
shstrhdr = &shdrs[shstrndx - 1];
shstr_size = shstrhdr->sh_size;
shstr_off = shstrhdr->sh_offset;
if (!elf_get_view (state, descriptor, memory, memory_size, shstr_off,
shstrhdr->sh_size, error_callback, data, &names_view))
goto fail;
names_view_valid = 1;
names = (const char *) names_view.view.data;
symtab_shndx = 0;
dynsym_shndx = 0;
memset (sections, 0, sizeof sections);
memset (zsections, 0, sizeof zsections);
/* Look for the symbol table. */
for (i = 1; i < shnum; ++i)
{
const b_elf_shdr *shdr;
unsigned int sh_name;
const char *name;
int j;
shdr = &shdrs[i - 1];
if (shdr->sh_type == SHT_SYMTAB)
symtab_shndx = i;
else if (shdr->sh_type == SHT_DYNSYM)
dynsym_shndx = i;
sh_name = shdr->sh_name;
if (sh_name >= shstr_size)
{
error_callback (data, "ELF section name out of range", 0);
goto fail;
}
name = names + sh_name;
for (j = 0; j < (int) DEBUG_MAX; ++j)
{
if (strcmp (name, dwarf_section_names[j]) == 0)
{
sections[j].offset = shdr->sh_offset;
sections[j].size = shdr->sh_size;
sections[j].compressed = (shdr->sh_flags & SHF_COMPRESSED) != 0;
break;
}
}
if (name[0] == '.' && name[1] == 'z')
{
for (j = 0; j < (int) DEBUG_MAX; ++j)
{
if (strcmp (name + 2, dwarf_section_names[j] + 1) == 0)
{
zsections[j].offset = shdr->sh_offset;
zsections[j].size = shdr->sh_size;
break;
}
}
}
/* Read the build ID if present. This could check for any
SHT_NOTE section with the right note name and type, but gdb
looks for a specific section name. */
if ((!debuginfo || with_buildid_data != NULL)
&& !buildid_view_valid
&& strcmp (name, ".note.gnu.build-id") == 0)
{
const b_elf_note *note;
if (!elf_get_view (state, descriptor, memory, memory_size,
shdr->sh_offset, shdr->sh_size, error_callback,
data, &buildid_view))
goto fail;
buildid_view_valid = 1;
note = (const b_elf_note *) buildid_view.view.data;
if (note->type == NT_GNU_BUILD_ID
&& note->namesz == 4
&& strncmp (note->name, "GNU", 4) == 0
&& shdr->sh_size <= 12 + ((note->namesz + 3) & ~ 3) + note->descsz)
{
buildid_data = ¬e->name[0] + ((note->namesz + 3) & ~ 3);
buildid_size = note->descsz;
}
if (with_buildid_size != 0)
{
if (buildid_size != with_buildid_size)
goto fail;
if (memcmp (buildid_data, with_buildid_data, buildid_size) != 0)
goto fail;
}
}
/* Read the debuglink file if present. */
if (!debuginfo
&& !debuglink_view_valid
&& strcmp (name, ".gnu_debuglink") == 0)
{
const char *debuglink_data;
size_t crc_offset;
if (!elf_get_view (state, descriptor, memory, memory_size,
shdr->sh_offset, shdr->sh_size, error_callback,
data, &debuglink_view))
goto fail;
debuglink_view_valid = 1;
debuglink_data = (const char *) debuglink_view.view.data;
crc_offset = strnlen (debuglink_data, shdr->sh_size);
crc_offset = (crc_offset + 3) & ~3;
if (crc_offset + 4 <= shdr->sh_size)
{
debuglink_name = debuglink_data;
debuglink_crc = *(const uint32_t*)(debuglink_data + crc_offset);
}
}
if (!debugaltlink_view_valid
&& strcmp (name, ".gnu_debugaltlink") == 0)
{
const char *debugaltlink_data;
size_t debugaltlink_name_len;
if (!elf_get_view (state, descriptor, memory, memory_size,
shdr->sh_offset, shdr->sh_size, error_callback,
data, &debugaltlink_view))
goto fail;
debugaltlink_view_valid = 1;
debugaltlink_data = (const char *) debugaltlink_view.view.data;
debugaltlink_name = debugaltlink_data;
debugaltlink_name_len = strnlen (debugaltlink_data, shdr->sh_size);
if (debugaltlink_name_len < shdr->sh_size)
{
/* Include terminating zero. */
debugaltlink_name_len += 1;
debugaltlink_buildid_data
= debugaltlink_data + debugaltlink_name_len;
debugaltlink_buildid_size = shdr->sh_size - debugaltlink_name_len;
}
}
if (!gnu_debugdata_view_valid
&& strcmp (name, ".gnu_debugdata") == 0)
{
if (!elf_get_view (state, descriptor, memory, memory_size,
shdr->sh_offset, shdr->sh_size, error_callback,
data, &gnu_debugdata_view))
goto fail;
gnu_debugdata_size = shdr->sh_size;
gnu_debugdata_view_valid = 1;
}
/* Read the .opd section on PowerPC64 ELFv1. */
if (ehdr.e_machine == EM_PPC64
&& (ehdr.e_flags & EF_PPC64_ABI) < 2
&& shdr->sh_type == SHT_PROGBITS
&& strcmp (name, ".opd") == 0)
{
if (!elf_get_view (state, descriptor, memory, memory_size,
shdr->sh_offset, shdr->sh_size, error_callback,
data, &opd_data.view))
goto fail;
opd = &opd_data;
opd->addr = shdr->sh_addr;
opd->data = (const char *) opd_data.view.view.data;
opd->size = shdr->sh_size;
}
}
if (symtab_shndx == 0)
symtab_shndx = dynsym_shndx;
if (symtab_shndx != 0 && !debuginfo)
{
const b_elf_shdr *symtab_shdr;
unsigned int strtab_shndx;
const b_elf_shdr *strtab_shdr;
struct elf_syminfo_data *sdata;
symtab_shdr = &shdrs[symtab_shndx - 1];
strtab_shndx = symtab_shdr->sh_link;
if (strtab_shndx >= shnum)
{
error_callback (data,
"ELF symbol table strtab link out of range", 0);
goto fail;
}
strtab_shdr = &shdrs[strtab_shndx - 1];
if (!elf_get_view (state, descriptor, memory, memory_size,
symtab_shdr->sh_offset, symtab_shdr->sh_size,
error_callback, data, &symtab_view))
goto fail;
symtab_view_valid = 1;
if (!elf_get_view (state, descriptor, memory, memory_size,
strtab_shdr->sh_offset, strtab_shdr->sh_size,
error_callback, data, &strtab_view))
goto fail;
strtab_view_valid = 1;
sdata = ((struct elf_syminfo_data *)
backtrace_alloc (state, sizeof *sdata, error_callback, data));
if (sdata == NULL)
goto fail;
if (!elf_initialize_syminfo (state, base_address,
(const unsigned char*)symtab_view.view.data, symtab_shdr->sh_size,
(const unsigned char*)strtab_view.view.data, strtab_shdr->sh_size,
error_callback, data, sdata, opd))
{
backtrace_free (state, sdata, sizeof *sdata, error_callback, data);
goto fail;
}
/* We no longer need the symbol table, but we hold on to the
string table permanently. */
elf_release_view (state, &symtab_view, error_callback, data);
symtab_view_valid = 0;
strtab_view_valid = 0;
*found_sym = 1;
elf_add_syminfo_data (state, sdata);
}
elf_release_view (state, &shdrs_view, error_callback, data);
shdrs_view_valid = 0;
elf_release_view (state, &names_view, error_callback, data);
names_view_valid = 0;
/* If the debug info is in a separate file, read that one instead. */
if (buildid_data != NULL)
{
int d;
d = elf_open_debugfile_by_buildid (state, buildid_data, buildid_size,
filename, error_callback, data);
if (d >= 0)
{
int ret;
elf_release_view (state, &buildid_view, error_callback, data);
if (debuglink_view_valid)
elf_release_view (state, &debuglink_view, error_callback, data);
if (debugaltlink_view_valid)
elf_release_view (state, &debugaltlink_view, error_callback, data);
ret = elf_add (state, "", d, NULL, 0, base_address, error_callback,
data, fileline_fn, found_sym, found_dwarf, NULL, 0,
1, NULL, 0);
if (ret < 0)
backtrace_close (d, error_callback, data);
else if (descriptor >= 0)
backtrace_close (descriptor, error_callback, data);
return ret;
}
}
if (buildid_view_valid)
{
elf_release_view (state, &buildid_view, error_callback, data);
buildid_view_valid = 0;
}
if (opd)
{
elf_release_view (state, &opd->view, error_callback, data);
opd = NULL;
}
if (debuglink_name != NULL)
{
int d;
d = elf_open_debugfile_by_debuglink (state, filename, debuglink_name,
debuglink_crc, error_callback,
data);
if (d >= 0)
{
int ret;
elf_release_view (state, &debuglink_view, error_callback, data);
if (debugaltlink_view_valid)
elf_release_view (state, &debugaltlink_view, error_callback, data);
ret = elf_add (state, "", d, NULL, 0, base_address, error_callback,
data, fileline_fn, found_sym, found_dwarf, NULL, 0,
1, NULL, 0);
if (ret < 0)
backtrace_close (d, error_callback, data);
else if (descriptor >= 0)
backtrace_close(descriptor, error_callback, data);
return ret;
}
}
if (debuglink_view_valid)
{
elf_release_view (state, &debuglink_view, error_callback, data);
debuglink_view_valid = 0;
}
if (debugaltlink_name != NULL)
{
int d;
d = elf_open_debugfile_by_debuglink (state, filename, debugaltlink_name,
0, error_callback, data);
if (d >= 0)
{
int ret;
ret = elf_add (state, filename, d, NULL, 0, base_address,
error_callback, data, fileline_fn, found_sym,
found_dwarf, &fileline_altlink, 0, 1,
debugaltlink_buildid_data, debugaltlink_buildid_size);
elf_release_view (state, &debugaltlink_view, error_callback, data);
debugaltlink_view_valid = 0;
if (ret < 0)
{
backtrace_close (d, error_callback, data);
return ret;
}
}
}
if (debugaltlink_view_valid)
{
elf_release_view (state, &debugaltlink_view, error_callback, data);
debugaltlink_view_valid = 0;
}
if (gnu_debugdata_view_valid)
{
int ret;
ret = elf_uncompress_lzma (state,
((const unsigned char *)
gnu_debugdata_view.view.data),
gnu_debugdata_size, error_callback, data,
&gnu_debugdata_uncompressed,
&gnu_debugdata_uncompressed_size);
elf_release_view (state, &gnu_debugdata_view, error_callback, data);
gnu_debugdata_view_valid = 0;
if (ret)
{
ret = elf_add (state, filename, -1, gnu_debugdata_uncompressed,
gnu_debugdata_uncompressed_size, base_address,
error_callback, data, fileline_fn, found_sym,
found_dwarf, NULL, 0, 0, NULL, 0);
if (ret >= 0 && descriptor >= 0)
backtrace_close(descriptor, error_callback, data);
return ret;
}
}
/* Read all the debug sections in a single view, since they are
probably adjacent in the file. If any of sections are
uncompressed, we never release this view. */
min_offset = 0;
max_offset = 0;
debug_size = 0;
for (i = 0; i < (int) DEBUG_MAX; ++i)
{
off_t end;
if (sections[i].size != 0)
{
if (min_offset == 0 || sections[i].offset < min_offset)
min_offset = sections[i].offset;
end = sections[i].offset + sections[i].size;
if (end > max_offset)
max_offset = end;
debug_size += sections[i].size;
}
if (zsections[i].size != 0)
{
if (min_offset == 0 || zsections[i].offset < min_offset)
min_offset = zsections[i].offset;
end = zsections[i].offset + zsections[i].size;
if (end > max_offset)
max_offset = end;
debug_size += zsections[i].size;
}
}
if (min_offset == 0 || max_offset == 0)
{
if (descriptor >= 0)
{
if (!backtrace_close (descriptor, error_callback, data))
goto fail;
}
return 1;
}
/* If the total debug section size is large, assume that there are
gaps between the sections, and read them individually. */
if (max_offset - min_offset < 0x20000000
|| max_offset - min_offset < debug_size + 0x10000)
{
if (!elf_get_view (state, descriptor, memory, memory_size, min_offset,
max_offset - min_offset, error_callback, data,
&debug_view))
goto fail;
debug_view_valid = 1;
}
else
{
memset (&split_debug_view[0], 0, sizeof split_debug_view);
for (i = 0; i < (int) DEBUG_MAX; ++i)
{
struct debug_section_info *dsec;
if (sections[i].size != 0)
dsec = §ions[i];
else if (zsections[i].size != 0)
dsec = &zsections[i];
else
continue;
if (!elf_get_view (state, descriptor, memory, memory_size,
dsec->offset, dsec->size, error_callback, data,
&split_debug_view[i]))
goto fail;
split_debug_view_valid[i] = 1;
if (sections[i].size != 0)
sections[i].data = ((const unsigned char *)
split_debug_view[i].view.data);
else
zsections[i].data = ((const unsigned char *)
split_debug_view[i].view.data);
}
}
/* We've read all we need from the executable. */
if (descriptor >= 0)
{
if (!backtrace_close (descriptor, error_callback, data))
goto fail;
descriptor = -1;
}
using_debug_view = 0;
if (debug_view_valid)
{
for (i = 0; i < (int) DEBUG_MAX; ++i)
{
if (sections[i].size == 0)
sections[i].data = NULL;
else
{
sections[i].data = ((const unsigned char *) debug_view.view.data
+ (sections[i].offset - min_offset));
++using_debug_view;
}
if (zsections[i].size == 0)
zsections[i].data = NULL;
else
zsections[i].data = ((const unsigned char *) debug_view.view.data
+ (zsections[i].offset - min_offset));
}
}
/* Uncompress the old format (--compress-debug-sections=zlib-gnu). */
zdebug_table = NULL;
for (i = 0; i < (int) DEBUG_MAX; ++i)
{
if (sections[i].size == 0 && zsections[i].size > 0)
{
unsigned char *uncompressed_data;
size_t uncompressed_size;
if (zdebug_table == NULL)
{
zdebug_table = ((uint16_t *)
backtrace_alloc (state, ZDEBUG_TABLE_SIZE,
error_callback, data));
if (zdebug_table == NULL)
goto fail;
}
uncompressed_data = NULL;
uncompressed_size = 0;
if (!elf_uncompress_zdebug (state, zsections[i].data,
zsections[i].size, zdebug_table,
error_callback, data,
&uncompressed_data, &uncompressed_size))
goto fail;
sections[i].data = uncompressed_data;
sections[i].size = uncompressed_size;
sections[i].compressed = 0;
if (split_debug_view_valid[i])
{
elf_release_view (state, &split_debug_view[i],
error_callback, data);
split_debug_view_valid[i] = 0;
}
}
}
/* Uncompress the official ELF format
(--compress-debug-sections=zlib-gabi). */
for (i = 0; i < (int) DEBUG_MAX; ++i)
{
unsigned char *uncompressed_data;
size_t uncompressed_size;
if (sections[i].size == 0 || !sections[i].compressed)
continue;
if (zdebug_table == NULL)
{
zdebug_table = ((uint16_t *)
backtrace_alloc (state, ZDEBUG_TABLE_SIZE,
error_callback, data));
if (zdebug_table == NULL)
goto fail;
}
uncompressed_data = NULL;
uncompressed_size = 0;
if (!elf_uncompress_chdr (state, sections[i].data, sections[i].size,
zdebug_table, error_callback, data,
&uncompressed_data, &uncompressed_size))
goto fail;
sections[i].data = uncompressed_data;
sections[i].size = uncompressed_size;
sections[i].compressed = 0;
if (debug_view_valid)
--using_debug_view;
else if (split_debug_view_valid[i])
{
elf_release_view (state, &split_debug_view[i], error_callback, data);
split_debug_view_valid[i] = 0;
}
}
if (zdebug_table != NULL)
backtrace_free (state, zdebug_table, ZDEBUG_TABLE_SIZE,
error_callback, data);
if (debug_view_valid && using_debug_view == 0)
{
elf_release_view (state, &debug_view, error_callback, data);
debug_view_valid = 0;
}
for (i = 0; i < (int) DEBUG_MAX; ++i)
{
dwarf_sections.data[i] = sections[i].data;
dwarf_sections.size[i] = sections[i].size;
}
if (!backtrace_dwarf_add (state, base_address, &dwarf_sections,
ehdr.e_ident[EI_DATA] == ELFDATA2MSB,
fileline_altlink,
error_callback, data, fileline_fn,
fileline_entry))
goto fail;
*found_dwarf = 1;
return 1;
fail:
if (shdrs_view_valid)
elf_release_view (state, &shdrs_view, error_callback, data);
if (names_view_valid)
elf_release_view (state, &names_view, error_callback, data);
if (symtab_view_valid)
elf_release_view (state, &symtab_view, error_callback, data);
if (strtab_view_valid)
elf_release_view (state, &strtab_view, error_callback, data);
if (debuglink_view_valid)
elf_release_view (state, &debuglink_view, error_callback, data);
if (debugaltlink_view_valid)
elf_release_view (state, &debugaltlink_view, error_callback, data);
if (gnu_debugdata_view_valid)
elf_release_view (state, &gnu_debugdata_view, error_callback, data);
if (buildid_view_valid)
elf_release_view (state, &buildid_view, error_callback, data);
if (debug_view_valid)
elf_release_view (state, &debug_view, error_callback, data);
for (i = 0; i < (int) DEBUG_MAX; ++i)
{
if (split_debug_view_valid[i])
elf_release_view (state, &split_debug_view[i], error_callback, data);
}
if (opd)
elf_release_view (state, &opd->view, error_callback, data);
if (descriptor >= 0)
backtrace_close (descriptor, error_callback, data);
return 0;
}
/* Data passed to phdr_callback. */
struct phdr_data
{
struct backtrace_state *state;
backtrace_error_callback error_callback;
void *data;
fileline *fileline_fn;
int *found_sym;
int *found_dwarf;
const char *exe_filename;
int exe_descriptor;
};
/* Callback passed to dl_iterate_phdr. Load debug info from shared
libraries. */
struct PhdrIterate
{
char* dlpi_name;
ElfW(Addr) dlpi_addr;
};
FastVector<PhdrIterate> s_phdrData(16);
static int
phdr_callback_mock (struct dl_phdr_info *info, size_t size ATTRIBUTE_UNUSED,
void *pdata)
{
auto ptr = s_phdrData.push_next();
if (info->dlpi_name)
{
size_t sz = strlen (info->dlpi_name) + 1;
ptr->dlpi_name = (char*)tracy_malloc (sz);
memcpy (ptr->dlpi_name, info->dlpi_name, sz);
}
else ptr->dlpi_name = nullptr;
ptr->dlpi_addr = info->dlpi_addr;
return 0;
}
static int
#ifdef __i386__
__attribute__ ((__force_align_arg_pointer__))
#endif
phdr_callback (struct PhdrIterate *info, void *pdata)
{
struct phdr_data *pd = (struct phdr_data *) pdata;
const char *filename;
int descriptor;
int does_not_exist;
fileline elf_fileline_fn;
int found_dwarf;
/* There is not much we can do if we don't have the module name,
unless executable is ET_DYN, where we expect the very first
phdr_callback to be for the PIE. */
if (info->dlpi_name == NULL || info->dlpi_name[0] == '\0')
{
if (pd->exe_descriptor == -1)
return 0;
filename = pd->exe_filename;
descriptor = pd->exe_descriptor;
pd->exe_descriptor = -1;
}
else
{
if (pd->exe_descriptor != -1)
{
backtrace_close (pd->exe_descriptor, pd->error_callback, pd->data);
pd->exe_descriptor = -1;
}
filename = info->dlpi_name;
descriptor = backtrace_open (info->dlpi_name, pd->error_callback,
pd->data, &does_not_exist);
if (descriptor < 0)
return 0;
}
if (elf_add (pd->state, filename, descriptor, NULL, 0, info->dlpi_addr,
pd->error_callback, pd->data, &elf_fileline_fn, pd->found_sym,
&found_dwarf, NULL, 0, 0, NULL, 0))
{
if (found_dwarf)
{
*pd->found_dwarf = 1;
*pd->fileline_fn = elf_fileline_fn;
}
}
return 0;
}
/* Initialize the backtrace data we need from an ELF executable. At
the ELF level, all we need to do is find the debug info
sections. */
int
backtrace_initialize (struct backtrace_state *state, const char *filename,
int descriptor, backtrace_error_callback error_callback,
void *data, fileline *fileline_fn)
{
int ret;
int found_sym;
int found_dwarf;
fileline elf_fileline_fn = elf_nodebug;
struct phdr_data pd;
ret = elf_add (state, filename, descriptor, NULL, 0, 0, error_callback, data,
&elf_fileline_fn, &found_sym, &found_dwarf, NULL, 1, 0, NULL,
0);
if (!ret)
return 0;
pd.state = state;
pd.error_callback = error_callback;
pd.data = data;
pd.fileline_fn = &elf_fileline_fn;
pd.found_sym = &found_sym;
pd.found_dwarf = &found_dwarf;
pd.exe_filename = filename;
pd.exe_descriptor = ret < 0 ? descriptor : -1;
assert (s_phdrData.empty());
dl_iterate_phdr (phdr_callback_mock, nullptr);
for (auto& v : s_phdrData)
{
phdr_callback (&v, (void *) &pd);
tracy_free (v.dlpi_name);
}
s_phdrData.clear();
if (!state->threaded)
{
if (found_sym)
state->syminfo_fn = elf_syminfo;
else if (state->syminfo_fn == NULL)
state->syminfo_fn = elf_nosyms;
}
else
{
if (found_sym)
backtrace_atomic_store_pointer (&state->syminfo_fn, &elf_syminfo);
else
(void) __sync_bool_compare_and_swap (&state->syminfo_fn, NULL,
elf_nosyms);
}
if (!state->threaded)
*fileline_fn = state->fileline_fn;
else
*fileline_fn = backtrace_atomic_load_pointer (&state->fileline_fn);
if (*fileline_fn == NULL || *fileline_fn == elf_nodebug)
*fileline_fn = elf_fileline_fn;
return 1;
}
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/filenames.hpp | /* btest.c -- Filename header for libbacktrace library
Copyright (C) 2012-2018 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#ifndef GCC_VERSION
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif
#if (GCC_VERSION < 2007)
# define __attribute__(x)
#endif
#ifndef ATTRIBUTE_UNUSED
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif
#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
# define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == '\\')
# define HAS_DRIVE_SPEC(f) ((f)[0] != '\0' && (f)[1] == ':')
# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || HAS_DRIVE_SPEC(f))
#else
# define IS_DIR_SEPARATOR(c) ((c) == '/')
# define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]))
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/alloc.cpp | /* alloc.c -- Memory allocation without mmap.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
#include "backtrace.hpp"
#include "internal.hpp"
#include "../common/TracyAlloc.hpp"
namespace tracy
{
/* Allocation routines to use on systems that do not support anonymous
mmap. This implementation just uses malloc, which means that the
backtrace functions may not be safely invoked from a signal
handler. */
/* Allocate memory like malloc. If ERROR_CALLBACK is NULL, don't
report an error. */
void *
backtrace_alloc (struct backtrace_state *state ATTRIBUTE_UNUSED,
size_t size, backtrace_error_callback error_callback,
void *data)
{
void *ret;
ret = tracy_malloc (size);
if (ret == NULL)
{
if (error_callback)
error_callback (data, "malloc", errno);
}
return ret;
}
/* Free memory. */
void
backtrace_free (struct backtrace_state *state ATTRIBUTE_UNUSED,
void *p, size_t size ATTRIBUTE_UNUSED,
backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
tracy_free (p);
}
/* Grow VEC by SIZE bytes. */
void *
backtrace_vector_grow (struct backtrace_state *state ATTRIBUTE_UNUSED,
size_t size, backtrace_error_callback error_callback,
void *data, struct backtrace_vector *vec)
{
void *ret;
if (size > vec->alc)
{
size_t alc;
void *base;
if (vec->size == 0)
alc = 32 * size;
else if (vec->size >= 4096)
alc = vec->size + 4096;
else
alc = 2 * vec->size;
if (alc < vec->size + size)
alc = vec->size + size;
base = tracy_realloc (vec->base, alc);
if (base == NULL)
{
error_callback (data, "realloc", errno);
return NULL;
}
vec->base = base;
vec->alc = alc - vec->size;
}
ret = (char *) vec->base + vec->size;
vec->size += size;
vec->alc -= size;
return ret;
}
/* Finish the current allocation on VEC. */
void *
backtrace_vector_finish (struct backtrace_state *state,
struct backtrace_vector *vec,
backtrace_error_callback error_callback,
void *data)
{
void *ret;
/* With this allocator we call realloc in backtrace_vector_grow,
which means we can't easily reuse the memory here. So just
release it. */
if (!backtrace_vector_release (state, vec, error_callback, data))
return NULL;
ret = vec->base;
vec->base = NULL;
vec->size = 0;
vec->alc = 0;
return ret;
}
/* Release any extra space allocated for VEC. */
int
backtrace_vector_release (struct backtrace_state *state ATTRIBUTE_UNUSED,
struct backtrace_vector *vec,
backtrace_error_callback error_callback,
void *data)
{
vec->alc = 0;
if (vec->size == 0)
{
/* As of C17, realloc with size 0 is marked as an obsolescent feature, use
free instead. */
tracy_free (vec->base);
vec->base = NULL;
return 1;
}
vec->base = tracy_realloc (vec->base, vec->size);
if (vec->base == NULL)
{
error_callback (data, "realloc", errno);
return 0;
}
return 1;
}
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/backtrace.hpp | /* backtrace.h -- Public header file for stack backtrace library.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#ifndef BACKTRACE_H
#define BACKTRACE_H
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
namespace tracy
{
/* The backtrace state. This struct is intentionally not defined in
the public interface. */
struct backtrace_state;
/* The type of the error callback argument to backtrace functions.
This function, if not NULL, will be called for certain error cases.
The DATA argument is passed to the function that calls this one.
The MSG argument is an error message. The ERRNUM argument, if
greater than 0, holds an errno value. The MSG buffer may become
invalid after this function returns.
As a special case, the ERRNUM argument will be passed as -1 if no
debug info can be found for the executable, or if the debug info
exists but has an unsupported version, but the function requires
debug info (e.g., backtrace_full, backtrace_pcinfo). The MSG in
this case will be something along the lines of "no debug info".
Similarly, ERRNUM will be passed as -1 if there is no symbol table,
but the function requires a symbol table (e.g., backtrace_syminfo).
This may be used as a signal that some other approach should be
tried. */
typedef void (*backtrace_error_callback) (void *data, const char *msg,
int errnum);
/* Create state information for the backtrace routines. This must be
called before any of the other routines, and its return value must
be passed to all of the other routines. FILENAME is the path name
of the executable file; if it is NULL the library will try
system-specific path names. If not NULL, FILENAME must point to a
permanent buffer. If THREADED is non-zero the state may be
accessed by multiple threads simultaneously, and the library will
use appropriate atomic operations. If THREADED is zero the state
may only be accessed by one thread at a time. This returns a state
pointer on success, NULL on error. If an error occurs, this will
call the ERROR_CALLBACK routine.
Calling this function allocates resources that cannot be freed.
There is no backtrace_free_state function. The state is used to
cache information that is expensive to recompute. Programs are
expected to call this function at most once and to save the return
value for all later calls to backtrace functions. */
extern struct backtrace_state *backtrace_create_state (
const char *filename, int threaded,
backtrace_error_callback error_callback, void *data);
/* The type of the callback argument to the backtrace_full function.
DATA is the argument passed to backtrace_full. PC is the program
counter. FILENAME is the name of the file containing PC, or NULL
if not available. LINENO is the line number in FILENAME containing
PC, or 0 if not available. FUNCTION is the name of the function
containing PC, or NULL if not available. This should return 0 to
continuing tracing. The FILENAME and FUNCTION buffers may become
invalid after this function returns. */
typedef int (*backtrace_full_callback) (void *data, uintptr_t pc, uintptr_t lowaddr,
const char *filename, int lineno,
const char *function);
/* Get a full stack backtrace. SKIP is the number of frames to skip;
passing 0 will start the trace with the function calling
backtrace_full. DATA is passed to the callback routine. If any
call to CALLBACK returns a non-zero value, the stack backtrace
stops, and backtrace returns that value; this may be used to limit
the number of stack frames desired. If all calls to CALLBACK
return 0, backtrace returns 0. The backtrace_full function will
make at least one call to either CALLBACK or ERROR_CALLBACK. This
function requires debug info for the executable. */
extern int backtrace_full (struct backtrace_state *state, int skip,
backtrace_full_callback callback,
backtrace_error_callback error_callback,
void *data);
/* The type of the callback argument to the backtrace_simple function.
DATA is the argument passed to simple_backtrace. PC is the program
counter. This should return 0 to continue tracing. */
typedef int (*backtrace_simple_callback) (void *data, uintptr_t pc);
/* Get a simple backtrace. SKIP is the number of frames to skip, as
in backtrace. DATA is passed to the callback routine. If any call
to CALLBACK returns a non-zero value, the stack backtrace stops,
and backtrace_simple returns that value. Otherwise
backtrace_simple returns 0. The backtrace_simple function will
make at least one call to either CALLBACK or ERROR_CALLBACK. This
function does not require any debug info for the executable. */
extern int backtrace_simple (struct backtrace_state *state, int skip,
backtrace_simple_callback callback,
backtrace_error_callback error_callback,
void *data);
/* Print the current backtrace in a user readable format to a FILE.
SKIP is the number of frames to skip, as in backtrace_full. Any
error messages are printed to stderr. This function requires debug
info for the executable. */
extern void backtrace_print (struct backtrace_state *state, int skip, FILE *);
/* Given PC, a program counter in the current program, call the
callback function with filename, line number, and function name
information. This will normally call the callback function exactly
once. However, if the PC happens to describe an inlined call, and
the debugging information contains the necessary information, then
this may call the callback function multiple times. This will make
at least one call to either CALLBACK or ERROR_CALLBACK. This
returns the first non-zero value returned by CALLBACK, or 0. */
extern int backtrace_pcinfo (struct backtrace_state *state, uintptr_t pc,
backtrace_full_callback callback,
backtrace_error_callback error_callback,
void *data);
/* The type of the callback argument to backtrace_syminfo. DATA and
PC are the arguments passed to backtrace_syminfo. SYMNAME is the
name of the symbol for the corresponding code. SYMVAL is the
value and SYMSIZE is the size of the symbol. SYMNAME will be NULL
if no error occurred but the symbol could not be found. */
typedef void (*backtrace_syminfo_callback) (void *data, uintptr_t pc,
const char *symname,
uintptr_t symval,
uintptr_t symsize);
/* Given ADDR, an address or program counter in the current program,
call the callback information with the symbol name and value
describing the function or variable in which ADDR may be found.
This will call either CALLBACK or ERROR_CALLBACK exactly once.
This returns 1 on success, 0 on failure. This function requires
the symbol table but does not require the debug info. Note that if
the symbol table is present but ADDR could not be found in the
table, CALLBACK will be called with a NULL SYMNAME argument.
Returns 1 on success, 0 on error. */
extern int backtrace_syminfo (struct backtrace_state *state, uintptr_t addr,
backtrace_syminfo_callback callback,
backtrace_error_callback error_callback,
void *data);
}
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/mmapio.cpp | /* mmapio.c -- File views using mmap.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <errno.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#include "backtrace.hpp"
#include "internal.hpp"
#ifndef HAVE_DECL_GETPAGESIZE
extern int getpagesize (void);
#endif
#ifndef MAP_FAILED
#define MAP_FAILED ((void *)-1)
#endif
namespace tracy
{
/* This file implements file views and memory allocation when mmap is
available. */
/* Create a view of SIZE bytes from DESCRIPTOR at OFFSET. */
int
backtrace_get_view (struct backtrace_state *state ATTRIBUTE_UNUSED,
int descriptor, off_t offset, uint64_t size,
backtrace_error_callback error_callback,
void *data, struct backtrace_view *view)
{
size_t pagesize;
unsigned int inpage;
off_t pageoff;
void *map;
if ((uint64_t) (size_t) size != size)
{
error_callback (data, "file size too large", 0);
return 0;
}
pagesize = getpagesize ();
inpage = offset % pagesize;
pageoff = offset - inpage;
size += inpage;
size = (size + (pagesize - 1)) & ~ (pagesize - 1);
map = mmap (NULL, size, PROT_READ, MAP_PRIVATE, descriptor, pageoff);
if (map == MAP_FAILED)
{
error_callback (data, "mmap", errno);
return 0;
}
view->data = (char *) map + inpage;
view->base = map;
view->len = size;
return 1;
}
/* Release a view read by backtrace_get_view. */
void
backtrace_release_view (struct backtrace_state *state ATTRIBUTE_UNUSED,
struct backtrace_view *view,
backtrace_error_callback error_callback,
void *data)
{
union {
const void *cv;
void *v;
} cc;
cc.cv = view->base;
if (munmap (cc.v, view->len) < 0)
error_callback (data, "munmap", errno);
}
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/posix.cpp | /* posix.c -- POSIX file I/O routines for the backtrace library.
Copyright (C) 2012-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "backtrace.hpp"
#include "internal.hpp"
#ifndef O_BINARY
#define O_BINARY 0
#endif
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
#ifndef FD_CLOEXEC
#define FD_CLOEXEC 1
#endif
namespace tracy
{
/* Open a file for reading. */
int
backtrace_open (const char *filename, backtrace_error_callback error_callback,
void *data, int *does_not_exist)
{
int descriptor;
if (does_not_exist != NULL)
*does_not_exist = 0;
descriptor = open (filename, (int) (O_RDONLY | O_BINARY | O_CLOEXEC));
if (descriptor < 0)
{
/* If DOES_NOT_EXIST is not NULL, then don't call ERROR_CALLBACK
if the file does not exist. We treat lacking permission to
open the file as the file not existing; this case arises when
running the libgo syscall package tests as root. */
if (does_not_exist != NULL && (errno == ENOENT || errno == EACCES))
*does_not_exist = 1;
else
error_callback (data, filename, errno);
return -1;
}
#ifdef HAVE_FCNTL
/* Set FD_CLOEXEC just in case the kernel does not support
O_CLOEXEC. It doesn't matter if this fails for some reason.
FIXME: At some point it should be safe to only do this if
O_CLOEXEC == 0. */
fcntl (descriptor, F_SETFD, FD_CLOEXEC);
#endif
return descriptor;
}
/* Close DESCRIPTOR. */
int
backtrace_close (int descriptor, backtrace_error_callback error_callback,
void *data)
{
if (close (descriptor) < 0)
{
error_callback (data, "close", errno);
return 0;
}
return 1;
}
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/libbacktrace/macho.cpp | /* elf.c -- Get debug data from a Mach-O file for backtraces.
Copyright (C) 2020-2021 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
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) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */
#include "config.h"
#include <sys/types.h>
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_MACH_O_DYLD_H
#include <mach-o/dyld.h>
#endif
#include "backtrace.hpp"
#include "internal.hpp"
namespace tracy
{
/* Mach-O file header for a 32-bit executable. */
struct macho_header_32
{
uint32_t magic; /* Magic number (MACH_O_MAGIC_32) */
uint32_t cputype; /* CPU type */
uint32_t cpusubtype; /* CPU subtype */
uint32_t filetype; /* Type of file (object, executable) */
uint32_t ncmds; /* Number of load commands */
uint32_t sizeofcmds; /* Total size of load commands */
uint32_t flags; /* Flags for special features */
};
/* Mach-O file header for a 64-bit executable. */
struct macho_header_64
{
uint32_t magic; /* Magic number (MACH_O_MAGIC_64) */
uint32_t cputype; /* CPU type */
uint32_t cpusubtype; /* CPU subtype */
uint32_t filetype; /* Type of file (object, executable) */
uint32_t ncmds; /* Number of load commands */
uint32_t sizeofcmds; /* Total size of load commands */
uint32_t flags; /* Flags for special features */
uint32_t reserved; /* Reserved */
};
/* Mach-O file header for a fat executable. */
struct macho_header_fat
{
uint32_t magic; /* Magic number (MACH_O_MH_(MAGIC|CIGAM)_FAT(_64)?) */
uint32_t nfat_arch; /* Number of components */
};
/* Values for the header magic field. */
#define MACH_O_MH_MAGIC_32 0xfeedface
#define MACH_O_MH_MAGIC_64 0xfeedfacf
#define MACH_O_MH_MAGIC_FAT 0xcafebabe
#define MACH_O_MH_CIGAM_FAT 0xbebafeca
#define MACH_O_MH_MAGIC_FAT_64 0xcafebabf
#define MACH_O_MH_CIGAM_FAT_64 0xbfbafeca
/* Value for the header filetype field. */
#define MACH_O_MH_EXECUTE 0x02
#define MACH_O_MH_DYLIB 0x06
#define MACH_O_MH_DSYM 0x0a
/* A component of a fat file. A fat file starts with a
macho_header_fat followed by nfat_arch instances of this
struct. */
struct macho_fat_arch
{
uint32_t cputype; /* CPU type */
uint32_t cpusubtype; /* CPU subtype */
uint32_t offset; /* File offset of this entry */
uint32_t size; /* Size of this entry */
uint32_t align; /* Alignment of this entry */
};
/* A component of a 64-bit fat file. This is used if the magic field
is MAGIC_FAT_64. This is only used when some file size or file
offset is too large to represent in the 32-bit format. */
struct macho_fat_arch_64
{
uint32_t cputype; /* CPU type */
uint32_t cpusubtype; /* CPU subtype */
uint64_t offset; /* File offset of this entry */
uint64_t size; /* Size of this entry */
uint32_t align; /* Alignment of this entry */
uint32_t reserved; /* Reserved */
};
/* Values for the fat_arch cputype field (and the header cputype
field). */
#define MACH_O_CPU_ARCH_ABI64 0x01000000
#define MACH_O_CPU_TYPE_X86 7
#define MACH_O_CPU_TYPE_ARM 12
#define MACH_O_CPU_TYPE_PPC 18
#define MACH_O_CPU_TYPE_X86_64 (MACH_O_CPU_TYPE_X86 | MACH_O_CPU_ARCH_ABI64)
#define MACH_O_CPU_TYPE_ARM64 (MACH_O_CPU_TYPE_ARM | MACH_O_CPU_ARCH_ABI64)
#define MACH_O_CPU_TYPE_PPC64 (MACH_O_CPU_TYPE_PPC | MACH_O_CPU_ARCH_ABI64)
/* The header of a load command. */
struct macho_load_command
{
uint32_t cmd; /* The type of load command */
uint32_t cmdsize; /* Size in bytes of the entire command */
};
/* Values for the load_command cmd field. */
#define MACH_O_LC_SEGMENT 0x01
#define MACH_O_LC_SYMTAB 0x02
#define MACH_O_LC_SEGMENT_64 0x19
#define MACH_O_LC_UUID 0x1b
/* The length of a section of segment name. */
#define MACH_O_NAMELEN (16)
/* LC_SEGMENT load command. */
struct macho_segment_command
{
uint32_t cmd; /* The type of load command (LC_SEGMENT) */
uint32_t cmdsize; /* Size in bytes of the entire command */
char segname[MACH_O_NAMELEN]; /* Segment name */
uint32_t vmaddr; /* Virtual memory address */
uint32_t vmsize; /* Virtual memory size */
uint32_t fileoff; /* Offset of data to be mapped */
uint32_t filesize; /* Size of data in file */
uint32_t maxprot; /* Maximum permitted virtual protection */
uint32_t initprot; /* Initial virtual memory protection */
uint32_t nsects; /* Number of sections in this segment */
uint32_t flags; /* Flags */
};
/* LC_SEGMENT_64 load command. */
struct macho_segment_64_command
{
uint32_t cmd; /* The type of load command (LC_SEGMENT) */
uint32_t cmdsize; /* Size in bytes of the entire command */
char segname[MACH_O_NAMELEN]; /* Segment name */
uint64_t vmaddr; /* Virtual memory address */
uint64_t vmsize; /* Virtual memory size */
uint64_t fileoff; /* Offset of data to be mapped */
uint64_t filesize; /* Size of data in file */
uint32_t maxprot; /* Maximum permitted virtual protection */
uint32_t initprot; /* Initial virtual memory protection */
uint32_t nsects; /* Number of sections in this segment */
uint32_t flags; /* Flags */
};
/* LC_SYMTAB load command. */
struct macho_symtab_command
{
uint32_t cmd; /* The type of load command (LC_SEGMENT) */
uint32_t cmdsize; /* Size in bytes of the entire command */
uint32_t symoff; /* File offset of symbol table */
uint32_t nsyms; /* Number of symbols */
uint32_t stroff; /* File offset of string table */
uint32_t strsize; /* String table size */
};
/* The length of a Mach-O uuid. */
#define MACH_O_UUID_LEN (16)
/* LC_UUID load command. */
struct macho_uuid_command
{
uint32_t cmd; /* Type of load command (LC_UUID) */
uint32_t cmdsize; /* Size in bytes of command */
unsigned char uuid[MACH_O_UUID_LEN]; /* UUID */
};
/* 32-bit section header within a LC_SEGMENT segment. */
struct macho_section
{
char sectname[MACH_O_NAMELEN]; /* Section name */
char segment[MACH_O_NAMELEN]; /* Segment of this section */
uint32_t addr; /* Address in memory */
uint32_t size; /* Section size */
uint32_t offset; /* File offset */
uint32_t align; /* Log2 of section alignment */
uint32_t reloff; /* File offset of relocations */
uint32_t nreloc; /* Number of relocs for this section */
uint32_t flags; /* Flags */
uint32_t reserved1;
uint32_t reserved2;
};
/* 64-bit section header within a LC_SEGMENT_64 segment. */
struct macho_section_64
{
char sectname[MACH_O_NAMELEN]; /* Section name */
char segment[MACH_O_NAMELEN]; /* Segment of this section */
uint64_t addr; /* Address in memory */
uint64_t size; /* Section size */
uint32_t offset; /* File offset */
uint32_t align; /* Log2 of section alignment */
uint32_t reloff; /* File offset of section relocations */
uint32_t nreloc; /* Number of relocs for this section */
uint32_t flags; /* Flags */
uint32_t reserved1;
uint32_t reserved2;
uint32_t reserved3;
};
/* 32-bit symbol data. */
struct macho_nlist
{
uint32_t n_strx; /* Index of name in string table */
uint8_t n_type; /* Type flag */
uint8_t n_sect; /* Section number */
uint16_t n_desc; /* Stabs description field */
uint32_t n_value; /* Value */
};
/* 64-bit symbol data. */
struct macho_nlist_64
{
uint32_t n_strx; /* Index of name in string table */
uint8_t n_type; /* Type flag */
uint8_t n_sect; /* Section number */
uint16_t n_desc; /* Stabs description field */
uint64_t n_value; /* Value */
};
/* Value found in nlist n_type field. */
#define MACH_O_N_EXT 0x01 /* Extern symbol */
#define MACH_O_N_ABS 0x02 /* Absolute symbol */
#define MACH_O_N_SECT 0x0e /* Defined in section */
#define MACH_O_N_TYPE 0x0e /* Mask for type bits */
#define MACH_O_N_STAB 0xe0 /* Stabs debugging symbol */
/* Information we keep for a Mach-O symbol. */
struct macho_symbol
{
const char *name; /* Symbol name */
uintptr_t address; /* Symbol address */
};
/* Information to pass to macho_syminfo. */
struct macho_syminfo_data
{
struct macho_syminfo_data *next; /* Next module */
struct macho_symbol *symbols; /* Symbols sorted by address */
size_t count; /* Number of symbols */
};
/* Names of sections, indexed by enum dwarf_section in internal.h. */
static const char * const dwarf_section_names[DEBUG_MAX] =
{
"__debug_info",
"__debug_line",
"__debug_abbrev",
"__debug_ranges",
"__debug_str",
"", /* DEBUG_ADDR */
"__debug_str_offs",
"", /* DEBUG_LINE_STR */
"__debug_rnglists"
};
/* Forward declaration. */
static int macho_add (struct backtrace_state *, const char *, int, off_t,
const unsigned char *, uintptr_t, int,
backtrace_error_callback, void *, fileline *, int *);
/* A dummy callback function used when we can't find any debug info. */
static int
macho_nodebug (struct backtrace_state *state ATTRIBUTE_UNUSED,
uintptr_t pc ATTRIBUTE_UNUSED,
backtrace_full_callback callback ATTRIBUTE_UNUSED,
backtrace_error_callback error_callback, void *data)
{
error_callback (data, "no debug info in Mach-O executable", -1);
return 0;
}
/* A dummy callback function used when we can't find a symbol
table. */
static void
macho_nosyms (struct backtrace_state *state ATTRIBUTE_UNUSED,
uintptr_t addr ATTRIBUTE_UNUSED,
backtrace_syminfo_callback callback ATTRIBUTE_UNUSED,
backtrace_error_callback error_callback, void *data)
{
error_callback (data, "no symbol table in Mach-O executable", -1);
}
/* Add a single DWARF section to DWARF_SECTIONS, if we need the
section. Returns 1 on success, 0 on failure. */
static int
macho_add_dwarf_section (struct backtrace_state *state, int descriptor,
const char *sectname, uint32_t offset, uint64_t size,
backtrace_error_callback error_callback, void *data,
struct dwarf_sections *dwarf_sections)
{
int i;
for (i = 0; i < (int) DEBUG_MAX; ++i)
{
if (dwarf_section_names[i][0] != '\0'
&& strncmp (sectname, dwarf_section_names[i], MACH_O_NAMELEN) == 0)
{
struct backtrace_view section_view;
/* FIXME: Perhaps it would be better to try to use a single
view to read all the DWARF data, as we try to do for
ELF. */
if (!backtrace_get_view (state, descriptor, offset, size,
error_callback, data, §ion_view))
return 0;
dwarf_sections->data[i] = (const unsigned char *) section_view.data;
dwarf_sections->size[i] = size;
break;
}
}
return 1;
}
/* Collect DWARF sections from a DWARF segment. Returns 1 on success,
0 on failure. */
static int
macho_add_dwarf_segment (struct backtrace_state *state, int descriptor,
off_t offset, unsigned int cmd, const char *psecs,
size_t sizesecs, unsigned int nsects,
backtrace_error_callback error_callback, void *data,
struct dwarf_sections *dwarf_sections)
{
size_t sec_header_size;
size_t secoffset;
unsigned int i;
switch (cmd)
{
case MACH_O_LC_SEGMENT:
sec_header_size = sizeof (struct macho_section);
break;
case MACH_O_LC_SEGMENT_64:
sec_header_size = sizeof (struct macho_section_64);
break;
default:
abort ();
}
secoffset = 0;
for (i = 0; i < nsects; ++i)
{
if (secoffset + sec_header_size > sizesecs)
{
error_callback (data, "section overflow withing segment", 0);
return 0;
}
switch (cmd)
{
case MACH_O_LC_SEGMENT:
{
struct macho_section section;
memcpy (§ion, psecs + secoffset, sizeof section);
macho_add_dwarf_section (state, descriptor, section.sectname,
offset + section.offset, section.size,
error_callback, data, dwarf_sections);
}
break;
case MACH_O_LC_SEGMENT_64:
{
struct macho_section_64 section;
memcpy (§ion, psecs + secoffset, sizeof section);
macho_add_dwarf_section (state, descriptor, section.sectname,
offset + section.offset, section.size,
error_callback, data, dwarf_sections);
}
break;
default:
abort ();
}
secoffset += sec_header_size;
}
return 1;
}
/* Compare struct macho_symbol for qsort. */
static int
macho_symbol_compare (const void *v1, const void *v2)
{
const struct macho_symbol *m1 = (const struct macho_symbol *) v1;
const struct macho_symbol *m2 = (const struct macho_symbol *) v2;
if (m1->address < m2->address)
return -1;
else if (m1->address > m2->address)
return 1;
else
return 0;
}
/* Compare an address against a macho_symbol for bsearch. We allocate
one extra entry in the array so that this can safely look at the
next entry. */
static int
macho_symbol_search (const void *vkey, const void *ventry)
{
const uintptr_t *key = (const uintptr_t *) vkey;
const struct macho_symbol *entry = (const struct macho_symbol *) ventry;
uintptr_t addr;
addr = *key;
if (addr < entry->address)
return -1;
else if (entry->name[0] == '\0'
&& entry->address == ~(uintptr_t) 0)
return -1;
else if ((entry + 1)->name[0] == '\0'
&& (entry + 1)->address == ~(uintptr_t) 0)
return -1;
else if (addr >= (entry + 1)->address)
return 1;
else
return 0;
}
/* Return whether the symbol type field indicates a symbol table entry
that we care about: a function or data symbol. */
static int
macho_defined_symbol (uint8_t type)
{
if ((type & MACH_O_N_STAB) != 0)
return 0;
if ((type & MACH_O_N_EXT) != 0)
return 0;
switch (type & MACH_O_N_TYPE)
{
case MACH_O_N_ABS:
return 1;
case MACH_O_N_SECT:
return 1;
default:
return 0;
}
}
/* Add symbol table information for a Mach-O file. */
static int
macho_add_symtab (struct backtrace_state *state, int descriptor,
uintptr_t base_address, int is_64,
off_t symoff, unsigned int nsyms, off_t stroff,
unsigned int strsize,
backtrace_error_callback error_callback, void *data)
{
size_t symsize;
struct backtrace_view sym_view;
int sym_view_valid;
struct backtrace_view str_view;
int str_view_valid;
size_t ndefs;
size_t symtaboff;
unsigned int i;
size_t macho_symbol_size;
struct macho_symbol *macho_symbols;
unsigned int j;
struct macho_syminfo_data *sdata;
sym_view_valid = 0;
str_view_valid = 0;
macho_symbol_size = 0;
macho_symbols = NULL;
if (is_64)
symsize = sizeof (struct macho_nlist_64);
else
symsize = sizeof (struct macho_nlist);
if (!backtrace_get_view (state, descriptor, symoff, nsyms * symsize,
error_callback, data, &sym_view))
goto fail;
sym_view_valid = 1;
if (!backtrace_get_view (state, descriptor, stroff, strsize,
error_callback, data, &str_view))
return 0;
str_view_valid = 1;
ndefs = 0;
symtaboff = 0;
for (i = 0; i < nsyms; ++i, symtaboff += symsize)
{
if (is_64)
{
struct macho_nlist_64 nlist;
memcpy (&nlist, (const char *) sym_view.data + symtaboff,
sizeof nlist);
if (macho_defined_symbol (nlist.n_type))
++ndefs;
}
else
{
struct macho_nlist nlist;
memcpy (&nlist, (const char *) sym_view.data + symtaboff,
sizeof nlist);
if (macho_defined_symbol (nlist.n_type))
++ndefs;
}
}
/* Add 1 to ndefs to make room for a sentinel. */
macho_symbol_size = (ndefs + 1) * sizeof (struct macho_symbol);
macho_symbols = ((struct macho_symbol *)
backtrace_alloc (state, macho_symbol_size, error_callback,
data));
if (macho_symbols == NULL)
goto fail;
j = 0;
symtaboff = 0;
for (i = 0; i < nsyms; ++i, symtaboff += symsize)
{
uint32_t strx;
uint64_t value;
const char *name;
strx = 0;
value = 0;
if (is_64)
{
struct macho_nlist_64 nlist;
memcpy (&nlist, (const char *) sym_view.data + symtaboff,
sizeof nlist);
if (!macho_defined_symbol (nlist.n_type))
continue;
strx = nlist.n_strx;
value = nlist.n_value;
}
else
{
struct macho_nlist nlist;
memcpy (&nlist, (const char *) sym_view.data + symtaboff,
sizeof nlist);
if (!macho_defined_symbol (nlist.n_type))
continue;
strx = nlist.n_strx;
value = nlist.n_value;
}
if (strx >= strsize)
{
error_callback (data, "symbol string index out of range", 0);
goto fail;
}
name = (const char *) str_view.data + strx;
if (name[0] == '_')
++name;
macho_symbols[j].name = name;
macho_symbols[j].address = value + base_address;
++j;
}
sdata = ((struct macho_syminfo_data *)
backtrace_alloc (state, sizeof *sdata, error_callback, data));
if (sdata == NULL)
goto fail;
/* We need to keep the string table since it holds the names, but we
can release the symbol table. */
backtrace_release_view (state, &sym_view, error_callback, data);
sym_view_valid = 0;
str_view_valid = 0;
/* Add a trailing sentinel symbol. */
macho_symbols[j].name = "";
macho_symbols[j].address = ~(uintptr_t) 0;
backtrace_qsort (macho_symbols, ndefs + 1, sizeof (struct macho_symbol),
macho_symbol_compare);
sdata->next = NULL;
sdata->symbols = macho_symbols;
sdata->count = ndefs;
if (!state->threaded)
{
struct macho_syminfo_data **pp;
for (pp = (struct macho_syminfo_data **) (void *) &state->syminfo_data;
*pp != NULL;
pp = &(*pp)->next)
;
*pp = sdata;
}
else
{
while (1)
{
struct macho_syminfo_data **pp;
pp = (struct macho_syminfo_data **) (void *) &state->syminfo_data;
while (1)
{
struct macho_syminfo_data *p;
p = backtrace_atomic_load_pointer (pp);
if (p == NULL)
break;
pp = &p->next;
}
if (__sync_bool_compare_and_swap (pp, NULL, sdata))
break;
}
}
return 1;
fail:
if (macho_symbols != NULL)
backtrace_free (state, macho_symbols, macho_symbol_size,
error_callback, data);
if (sym_view_valid)
backtrace_release_view (state, &sym_view, error_callback, data);
if (str_view_valid)
backtrace_release_view (state, &str_view, error_callback, data);
return 0;
}
/* Return the symbol name and value for an ADDR. */
static void
macho_syminfo (struct backtrace_state *state, uintptr_t addr,
backtrace_syminfo_callback callback,
backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
void *data)
{
struct macho_syminfo_data *sdata;
struct macho_symbol *sym;
sym = NULL;
if (!state->threaded)
{
for (sdata = (struct macho_syminfo_data *) state->syminfo_data;
sdata != NULL;
sdata = sdata->next)
{
sym = ((struct macho_symbol *)
bsearch (&addr, sdata->symbols, sdata->count,
sizeof (struct macho_symbol), macho_symbol_search));
if (sym != NULL)
break;
}
}
else
{
struct macho_syminfo_data **pp;
pp = (struct macho_syminfo_data **) (void *) &state->syminfo_data;
while (1)
{
sdata = backtrace_atomic_load_pointer (pp);
if (sdata == NULL)
break;
sym = ((struct macho_symbol *)
bsearch (&addr, sdata->symbols, sdata->count,
sizeof (struct macho_symbol), macho_symbol_search));
if (sym != NULL)
break;
pp = &sdata->next;
}
}
if (sym == NULL)
callback (data, addr, NULL, 0, 0);
else
callback (data, addr, sym->name, sym->address, 0);
}
/* Look through a fat file to find the relevant executable. Returns 1
on success, 0 on failure (in both cases descriptor is closed). */
static int
macho_add_fat (struct backtrace_state *state, const char *filename,
int descriptor, int swapped, off_t offset,
const unsigned char *match_uuid, uintptr_t base_address,
int skip_symtab, uint32_t nfat_arch, int is_64,
backtrace_error_callback error_callback, void *data,
fileline *fileline_fn, int *found_sym)
{
int arch_view_valid;
unsigned int cputype;
size_t arch_size;
struct backtrace_view arch_view;
unsigned int i;
arch_view_valid = 0;
#if defined (__x86_64__)
cputype = MACH_O_CPU_TYPE_X86_64;
#elif defined (__i386__)
cputype = MACH_O_CPU_TYPE_X86;
#elif defined (__aarch64__)
cputype = MACH_O_CPU_TYPE_ARM64;
#elif defined (__arm__)
cputype = MACH_O_CPU_TYPE_ARM;
#elif defined (__ppc__)
cputype = MACH_O_CPU_TYPE_PPC;
#elif defined (__ppc64__)
cputype = MACH_O_CPU_TYPE_PPC64;
#else
error_callback (data, "unknown Mach-O architecture", 0);
goto fail;
#endif
if (is_64)
arch_size = sizeof (struct macho_fat_arch_64);
else
arch_size = sizeof (struct macho_fat_arch);
if (!backtrace_get_view (state, descriptor, offset,
nfat_arch * arch_size,
error_callback, data, &arch_view))
goto fail;
for (i = 0; i < nfat_arch; ++i)
{
uint32_t fcputype;
uint64_t foffset;
if (is_64)
{
struct macho_fat_arch_64 fat_arch_64;
memcpy (&fat_arch_64,
(const char *) arch_view.data + i * arch_size,
arch_size);
fcputype = fat_arch_64.cputype;
foffset = fat_arch_64.offset;
if (swapped)
{
fcputype = __builtin_bswap32 (fcputype);
foffset = __builtin_bswap64 (foffset);
}
}
else
{
struct macho_fat_arch fat_arch_32;
memcpy (&fat_arch_32,
(const char *) arch_view.data + i * arch_size,
arch_size);
fcputype = fat_arch_32.cputype;
foffset = (uint64_t) fat_arch_32.offset;
if (swapped)
{
fcputype = __builtin_bswap32 (fcputype);
foffset = (uint64_t) __builtin_bswap32 ((uint32_t) foffset);
}
}
if (fcputype == cputype)
{
/* FIXME: What about cpusubtype? */
backtrace_release_view (state, &arch_view, error_callback, data);
return macho_add (state, filename, descriptor, foffset, match_uuid,
base_address, skip_symtab, error_callback, data,
fileline_fn, found_sym);
}
}
error_callback (data, "could not find executable in fat file", 0);
fail:
if (arch_view_valid)
backtrace_release_view (state, &arch_view, error_callback, data);
if (descriptor != -1)
backtrace_close (descriptor, error_callback, data);
return 0;
}
/* Look for the dsym file for FILENAME. This is called if FILENAME
does not have debug info or a symbol table. Returns 1 on success,
0 on failure. */
static int
macho_add_dsym (struct backtrace_state *state, const char *filename,
uintptr_t base_address, const unsigned char *uuid,
backtrace_error_callback error_callback, void *data,
fileline* fileline_fn)
{
const char *p;
const char *dirname;
char *diralc;
size_t dirnamelen;
const char *basename;
size_t basenamelen;
const char *dsymsuffixdir;
size_t dsymsuffixdirlen;
size_t dsymlen;
char *dsym;
char *ps;
int d;
int does_not_exist;
int dummy_found_sym;
diralc = NULL;
dirnamelen = 0;
dsym = NULL;
dsymlen = 0;
p = strrchr (filename, '/');
if (p == NULL)
{
dirname = ".";
dirnamelen = 1;
basename = filename;
basenamelen = strlen (basename);
diralc = NULL;
}
else
{
dirnamelen = p - filename;
diralc = (char*)backtrace_alloc (state, dirnamelen + 1, error_callback, data);
if (diralc == NULL)
goto fail;
memcpy (diralc, filename, dirnamelen);
diralc[dirnamelen] = '\0';
dirname = diralc;
basename = p + 1;
basenamelen = strlen (basename);
}
dsymsuffixdir = ".dSYM/Contents/Resources/DWARF/";
dsymsuffixdirlen = strlen (dsymsuffixdir);
dsymlen = (dirnamelen
+ 1
+ basenamelen
+ dsymsuffixdirlen
+ basenamelen
+ 1);
dsym = (char*)backtrace_alloc (state, dsymlen, error_callback, data);
if (dsym == NULL)
goto fail;
ps = dsym;
memcpy (ps, dirname, dirnamelen);
ps += dirnamelen;
*ps++ = '/';
memcpy (ps, basename, basenamelen);
ps += basenamelen;
memcpy (ps, dsymsuffixdir, dsymsuffixdirlen);
ps += dsymsuffixdirlen;
memcpy (ps, basename, basenamelen);
ps += basenamelen;
*ps = '\0';
if (diralc != NULL)
{
backtrace_free (state, diralc, dirnamelen + 1, error_callback, data);
diralc = NULL;
}
d = backtrace_open (dsym, error_callback, data, &does_not_exist);
if (d < 0)
{
/* The file does not exist, so we can't read the debug info.
Just return success. */
backtrace_free (state, dsym, dsymlen, error_callback, data);
return 1;
}
if (!macho_add (state, dsym, d, 0, uuid, base_address, 1,
error_callback, data, fileline_fn, &dummy_found_sym))
goto fail;
backtrace_free (state, dsym, dsymlen, error_callback, data);
return 1;
fail:
if (dsym != NULL)
backtrace_free (state, dsym, dsymlen, error_callback, data);
if (diralc != NULL)
backtrace_free (state, diralc, dirnamelen, error_callback, data);
return 0;
}
/* Add the backtrace data for a Macho-O file. Returns 1 on success, 0
on failure (in both cases descriptor is closed).
FILENAME: the name of the executable.
DESCRIPTOR: an open descriptor for the executable, closed here.
OFFSET: the offset within the file of this executable, for fat files.
MATCH_UUID: if not NULL, UUID that must match.
BASE_ADDRESS: the load address of the executable.
SKIP_SYMTAB: if non-zero, ignore the symbol table; used for dSYM files.
FILELINE_FN: set to the fileline function, by backtrace_dwarf_add.
FOUND_SYM: set to non-zero if we found the symbol table.
*/
static int
macho_add (struct backtrace_state *state, const char *filename, int descriptor,
off_t offset, const unsigned char *match_uuid,
uintptr_t base_address, int skip_symtab,
backtrace_error_callback error_callback, void *data,
fileline *fileline_fn, int *found_sym)
{
struct backtrace_view header_view;
struct macho_header_32 header;
off_t hdroffset;
int is_64;
struct backtrace_view cmds_view;
int cmds_view_valid;
struct dwarf_sections dwarf_sections;
int have_dwarf;
unsigned char uuid[MACH_O_UUID_LEN];
int have_uuid;
size_t cmdoffset;
unsigned int i;
*found_sym = 0;
cmds_view_valid = 0;
/* The 32-bit and 64-bit file headers start out the same, so we can
just always read the 32-bit version. A fat header is shorter but
it will always be followed by data, so it's OK to read extra. */
if (!backtrace_get_view (state, descriptor, offset,
sizeof (struct macho_header_32),
error_callback, data, &header_view))
goto fail;
memcpy (&header, header_view.data, sizeof header);
backtrace_release_view (state, &header_view, error_callback, data);
switch (header.magic)
{
case MACH_O_MH_MAGIC_32:
is_64 = 0;
hdroffset = offset + sizeof (struct macho_header_32);
break;
case MACH_O_MH_MAGIC_64:
is_64 = 1;
hdroffset = offset + sizeof (struct macho_header_64);
break;
case MACH_O_MH_MAGIC_FAT:
case MACH_O_MH_MAGIC_FAT_64:
{
struct macho_header_fat fat_header;
hdroffset = offset + sizeof (struct macho_header_fat);
memcpy (&fat_header, &header, sizeof fat_header);
return macho_add_fat (state, filename, descriptor, 0, hdroffset,
match_uuid, base_address, skip_symtab,
fat_header.nfat_arch,
header.magic == MACH_O_MH_MAGIC_FAT_64,
error_callback, data, fileline_fn, found_sym);
}
case MACH_O_MH_CIGAM_FAT:
case MACH_O_MH_CIGAM_FAT_64:
{
struct macho_header_fat fat_header;
uint32_t nfat_arch;
hdroffset = offset + sizeof (struct macho_header_fat);
memcpy (&fat_header, &header, sizeof fat_header);
nfat_arch = __builtin_bswap32 (fat_header.nfat_arch);
return macho_add_fat (state, filename, descriptor, 1, hdroffset,
match_uuid, base_address, skip_symtab,
nfat_arch,
header.magic == MACH_O_MH_CIGAM_FAT_64,
error_callback, data, fileline_fn, found_sym);
}
default:
error_callback (data, "executable file is not in Mach-O format", 0);
goto fail;
}
switch (header.filetype)
{
case MACH_O_MH_EXECUTE:
case MACH_O_MH_DYLIB:
case MACH_O_MH_DSYM:
break;
default:
error_callback (data, "executable file is not an executable", 0);
goto fail;
}
if (!backtrace_get_view (state, descriptor, hdroffset, header.sizeofcmds,
error_callback, data, &cmds_view))
goto fail;
cmds_view_valid = 1;
memset (&dwarf_sections, 0, sizeof dwarf_sections);
have_dwarf = 0;
memset (&uuid, 0, sizeof uuid);
have_uuid = 0;
cmdoffset = 0;
for (i = 0; i < header.ncmds; ++i)
{
const char *pcmd;
struct macho_load_command load_command;
if (cmdoffset + sizeof load_command > header.sizeofcmds)
break;
pcmd = (const char *) cmds_view.data + cmdoffset;
memcpy (&load_command, pcmd, sizeof load_command);
switch (load_command.cmd)
{
case MACH_O_LC_SEGMENT:
{
struct macho_segment_command segcmd;
memcpy (&segcmd, pcmd, sizeof segcmd);
if (memcmp (segcmd.segname,
"__DWARF\0\0\0\0\0\0\0\0\0",
MACH_O_NAMELEN) == 0)
{
if (!macho_add_dwarf_segment (state, descriptor, offset,
load_command.cmd,
pcmd + sizeof segcmd,
(load_command.cmdsize
- sizeof segcmd),
segcmd.nsects, error_callback,
data, &dwarf_sections))
goto fail;
have_dwarf = 1;
}
}
break;
case MACH_O_LC_SEGMENT_64:
{
struct macho_segment_64_command segcmd;
memcpy (&segcmd, pcmd, sizeof segcmd);
if (memcmp (segcmd.segname,
"__DWARF\0\0\0\0\0\0\0\0\0",
MACH_O_NAMELEN) == 0)
{
if (!macho_add_dwarf_segment (state, descriptor, offset,
load_command.cmd,
pcmd + sizeof segcmd,
(load_command.cmdsize
- sizeof segcmd),
segcmd.nsects, error_callback,
data, &dwarf_sections))
goto fail;
have_dwarf = 1;
}
}
break;
case MACH_O_LC_SYMTAB:
if (!skip_symtab)
{
struct macho_symtab_command symcmd;
memcpy (&symcmd, pcmd, sizeof symcmd);
if (!macho_add_symtab (state, descriptor, base_address, is_64,
offset + symcmd.symoff, symcmd.nsyms,
offset + symcmd.stroff, symcmd.strsize,
error_callback, data))
goto fail;
*found_sym = 1;
}
break;
case MACH_O_LC_UUID:
{
struct macho_uuid_command uuidcmd;
memcpy (&uuidcmd, pcmd, sizeof uuidcmd);
memcpy (&uuid[0], &uuidcmd.uuid[0], MACH_O_UUID_LEN);
have_uuid = 1;
}
break;
default:
break;
}
cmdoffset += load_command.cmdsize;
}
if (!backtrace_close (descriptor, error_callback, data))
goto fail;
descriptor = -1;
backtrace_release_view (state, &cmds_view, error_callback, data);
cmds_view_valid = 0;
if (match_uuid != NULL)
{
/* If we don't have a UUID, or it doesn't match, just ignore
this file. */
if (!have_uuid
|| memcmp (match_uuid, &uuid[0], MACH_O_UUID_LEN) != 0)
return 1;
}
if (have_dwarf)
{
int is_big_endian;
is_big_endian = 0;
#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
is_big_endian = 1;
#endif
#endif
if (!backtrace_dwarf_add (state, base_address, &dwarf_sections,
is_big_endian, NULL, error_callback, data,
fileline_fn, NULL))
goto fail;
}
if (!have_dwarf && have_uuid)
{
if (!macho_add_dsym (state, filename, base_address, &uuid[0],
error_callback, data, fileline_fn))
goto fail;
}
return 1;
fail:
if (cmds_view_valid)
backtrace_release_view (state, &cmds_view, error_callback, data);
if (descriptor != -1)
backtrace_close (descriptor, error_callback, data);
return 0;
}
#ifdef HAVE_MACH_O_DYLD_H
/* Initialize the backtrace data we need from a Mach-O executable
using the dyld support functions. This closes descriptor. */
int
backtrace_initialize (struct backtrace_state *state, const char *filename,
int descriptor, backtrace_error_callback error_callback,
void *data, fileline *fileline_fn)
{
uint32_t c;
uint32_t i;
int closed_descriptor;
int found_sym;
fileline macho_fileline_fn;
closed_descriptor = 0;
found_sym = 0;
macho_fileline_fn = macho_nodebug;
c = _dyld_image_count ();
for (i = 0; i < c; ++i)
{
uintptr_t base_address;
const char *name;
int d;
fileline mff;
int mfs;
name = _dyld_get_image_name (i);
if (name == NULL)
continue;
if (strcmp (name, filename) == 0 && !closed_descriptor)
{
d = descriptor;
closed_descriptor = 1;
}
else
{
int does_not_exist;
d = backtrace_open (name, error_callback, data, &does_not_exist);
if (d < 0)
continue;
}
base_address = _dyld_get_image_vmaddr_slide (i);
mff = macho_nodebug;
if (!macho_add (state, name, d, 0, NULL, base_address, 0,
error_callback, data, &mff, &mfs))
continue;
if (mff != macho_nodebug)
macho_fileline_fn = mff;
if (mfs)
found_sym = 1;
}
if (!closed_descriptor)
backtrace_close (descriptor, error_callback, data);
if (!state->threaded)
{
if (found_sym)
state->syminfo_fn = macho_syminfo;
else if (state->syminfo_fn == NULL)
state->syminfo_fn = macho_nosyms;
}
else
{
if (found_sym)
backtrace_atomic_store_pointer (&state->syminfo_fn, &macho_syminfo);
else
(void) __sync_bool_compare_and_swap (&state->syminfo_fn, NULL,
macho_nosyms);
}
if (!state->threaded)
*fileline_fn = state->fileline_fn;
else
*fileline_fn = backtrace_atomic_load_pointer (&state->fileline_fn);
if (*fileline_fn == NULL || *fileline_fn == macho_nodebug)
*fileline_fn = macho_fileline_fn;
return 1;
}
#else /* !defined (HAVE_MACH_O_DYLD_H) */
/* Initialize the backtrace data we need from a Mach-O executable
without using the dyld support functions. This closes
descriptor. */
int
backtrace_initialize (struct backtrace_state *state, const char *filename,
int descriptor, backtrace_error_callback error_callback,
void *data, fileline *fileline_fn)
{
fileline macho_fileline_fn;
int found_sym;
macho_fileline_fn = macho_nodebug;
if (!macho_add (state, filename, descriptor, 0, NULL, 0, 0,
error_callback, data, &macho_fileline_fn, &found_sym))
return 0;
if (!state->threaded)
{
if (found_sym)
state->syminfo_fn = macho_syminfo;
else if (state->syminfo_fn == NULL)
state->syminfo_fn = macho_nosyms;
}
else
{
if (found_sym)
backtrace_atomic_store_pointer (&state->syminfo_fn, &macho_syminfo);
else
(void) __sync_bool_compare_and_swap (&state->syminfo_fn, NULL,
macho_nosyms);
}
if (!state->threaded)
*fileline_fn = state->fileline_fn;
else
*fileline_fn = backtrace_atomic_load_pointer (&state->fileline_fn);
if (*fileline_fn == NULL || *fileline_fn == macho_nodebug)
*fileline_fn = macho_fileline_fn;
return 1;
}
#endif /* !defined (HAVE_MACH_O_DYLD_H) */
}
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/client/TracySysTrace.cpp | #include "TracyDebug.hpp"
#include "TracyStringHelpers.hpp"
#include "TracySysTrace.hpp"
#include "../common/TracySystem.hpp"
#ifdef TRACY_HAS_SYSTEM_TRACING
#ifndef TRACY_SAMPLING_HZ
# if defined _WIN32
# define TRACY_SAMPLING_HZ 8000
# elif defined __linux__
# define TRACY_SAMPLING_HZ 10000
# endif
#endif
namespace tracy
{
static constexpr int GetSamplingFrequency()
{
#if defined _WIN32
return TRACY_SAMPLING_HZ > 8000 ? 8000 : ( TRACY_SAMPLING_HZ < 1 ? 1 : TRACY_SAMPLING_HZ );
#else
return TRACY_SAMPLING_HZ > 1000000 ? 1000000 : ( TRACY_SAMPLING_HZ < 1 ? 1 : TRACY_SAMPLING_HZ );
#endif
}
static constexpr int GetSamplingPeriod()
{
return 1000000000 / GetSamplingFrequency();
}
}
# if defined _WIN32
# ifndef NOMINMAX
# define NOMINMAX
# endif
# define INITGUID
# include <assert.h>
# include <string.h>
# include <windows.h>
# include <dbghelp.h>
# include <evntrace.h>
# include <evntcons.h>
# include <psapi.h>
# include <winternl.h>
# include "../common/TracyAlloc.hpp"
# include "../common/TracySystem.hpp"
# include "TracyProfiler.hpp"
# include "TracyThread.hpp"
namespace tracy
{
static const GUID PerfInfoGuid = { 0xce1dbfb4, 0x137e, 0x4da6, { 0x87, 0xb0, 0x3f, 0x59, 0xaa, 0x10, 0x2c, 0xbc } };
static const GUID DxgKrnlGuid = { 0x802ec45a, 0x1e99, 0x4b83, { 0x99, 0x20, 0x87, 0xc9, 0x82, 0x77, 0xba, 0x9d } };
static const GUID ThreadV2Guid = { 0x3d6fa8d1, 0xfe05, 0x11d0, { 0x9d, 0xda, 0x00, 0xc0, 0x4f, 0xd7, 0xba, 0x7c } };
static TRACEHANDLE s_traceHandle;
static TRACEHANDLE s_traceHandle2;
static EVENT_TRACE_PROPERTIES* s_prop;
static DWORD s_pid;
static EVENT_TRACE_PROPERTIES* s_propVsync;
static TRACEHANDLE s_traceHandleVsync;
static TRACEHANDLE s_traceHandleVsync2;
Thread* s_threadVsync = nullptr;
struct CSwitch
{
uint32_t newThreadId;
uint32_t oldThreadId;
int8_t newThreadPriority;
int8_t oldThreadPriority;
uint8_t previousCState;
int8_t spareByte;
int8_t oldThreadWaitReason;
int8_t oldThreadWaitMode;
int8_t oldThreadState;
int8_t oldThreadWaitIdealProcessor;
uint32_t newThreadWaitTime;
uint32_t reserved;
};
struct ReadyThread
{
uint32_t threadId;
int8_t adjustReason;
int8_t adjustIncrement;
int8_t flag;
int8_t reserverd;
};
struct ThreadTrace
{
uint32_t processId;
uint32_t threadId;
uint32_t stackBase;
uint32_t stackLimit;
uint32_t userStackBase;
uint32_t userStackLimit;
uint32_t startAddr;
uint32_t win32StartAddr;
uint32_t tebBase;
uint32_t subProcessTag;
};
struct StackWalkEvent
{
uint64_t eventTimeStamp;
uint32_t stackProcess;
uint32_t stackThread;
uint64_t stack[192];
};
struct VSyncInfo
{
void* dxgAdapter;
uint32_t vidPnTargetId;
uint64_t scannedPhysicalAddress;
uint32_t vidPnSourceId;
uint32_t frameNumber;
int64_t frameQpcTime;
void* hFlipDevice;
uint32_t flipType;
uint64_t flipFenceId;
};
extern "C" typedef NTSTATUS (WINAPI *t_NtQueryInformationThread)( HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG );
extern "C" typedef BOOL (WINAPI *t_EnumProcessModules)( HANDLE, HMODULE*, DWORD, LPDWORD );
extern "C" typedef BOOL (WINAPI *t_GetModuleInformation)( HANDLE, HMODULE, LPMODULEINFO, DWORD );
extern "C" typedef DWORD (WINAPI *t_GetModuleBaseNameA)( HANDLE, HMODULE, LPSTR, DWORD );
extern "C" typedef HRESULT (WINAPI *t_GetThreadDescription)( HANDLE, PWSTR* );
t_NtQueryInformationThread NtQueryInformationThread = (t_NtQueryInformationThread)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "NtQueryInformationThread" );
t_EnumProcessModules _EnumProcessModules = (t_EnumProcessModules)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "K32EnumProcessModules" );
t_GetModuleInformation _GetModuleInformation = (t_GetModuleInformation)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "K32GetModuleInformation" );
t_GetModuleBaseNameA _GetModuleBaseNameA = (t_GetModuleBaseNameA)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "K32GetModuleBaseNameA" );
static t_GetThreadDescription _GetThreadDescription = 0;
void WINAPI EventRecordCallback( PEVENT_RECORD record )
{
#ifdef TRACY_ON_DEMAND
if( !GetProfiler().IsConnected() ) return;
#endif
const auto& hdr = record->EventHeader;
switch( hdr.ProviderId.Data1 )
{
case 0x3d6fa8d1: // Thread Guid
if( hdr.EventDescriptor.Opcode == 36 )
{
const auto cswitch = (const CSwitch*)record->UserData;
TracyLfqPrepare( QueueType::ContextSwitch );
MemWrite( &item->contextSwitch.time, hdr.TimeStamp.QuadPart );
MemWrite( &item->contextSwitch.oldThread, cswitch->oldThreadId );
MemWrite( &item->contextSwitch.newThread, cswitch->newThreadId );
MemWrite( &item->contextSwitch.cpu, record->BufferContext.ProcessorNumber );
MemWrite( &item->contextSwitch.reason, cswitch->oldThreadWaitReason );
MemWrite( &item->contextSwitch.state, cswitch->oldThreadState );
TracyLfqCommit;
}
else if( hdr.EventDescriptor.Opcode == 50 )
{
const auto rt = (const ReadyThread*)record->UserData;
TracyLfqPrepare( QueueType::ThreadWakeup );
MemWrite( &item->threadWakeup.time, hdr.TimeStamp.QuadPart );
MemWrite( &item->threadWakeup.thread, rt->threadId );
TracyLfqCommit;
}
else if( hdr.EventDescriptor.Opcode == 1 || hdr.EventDescriptor.Opcode == 3 )
{
const auto tt = (const ThreadTrace*)record->UserData;
uint64_t tid = tt->threadId;
if( tid == 0 ) return;
uint64_t pid = tt->processId;
TracyLfqPrepare( QueueType::TidToPid );
MemWrite( &item->tidToPid.tid, tid );
MemWrite( &item->tidToPid.pid, pid );
TracyLfqCommit;
}
break;
case 0xdef2fe46: // StackWalk Guid
if( hdr.EventDescriptor.Opcode == 32 )
{
const auto sw = (const StackWalkEvent*)record->UserData;
if( sw->stackProcess == s_pid )
{
const uint64_t sz = ( record->UserDataLength - 16 ) / 8;
if( sz > 0 )
{
auto trace = (uint64_t*)tracy_malloc( ( 1 + sz ) * sizeof( uint64_t ) );
memcpy( trace, &sz, sizeof( uint64_t ) );
memcpy( trace+1, sw->stack, sizeof( uint64_t ) * sz );
TracyLfqPrepare( QueueType::CallstackSample );
MemWrite( &item->callstackSampleFat.time, sw->eventTimeStamp );
MemWrite( &item->callstackSampleFat.thread, sw->stackThread );
MemWrite( &item->callstackSampleFat.ptr, (uint64_t)trace );
TracyLfqCommit;
}
}
}
break;
default:
break;
}
}
void WINAPI EventRecordCallbackVsync( PEVENT_RECORD record )
{
#ifdef TRACY_ON_DEMAND
if( !GetProfiler().IsConnected() ) return;
#endif
const auto& hdr = record->EventHeader;
assert( hdr.ProviderId.Data1 == 0x802EC45A );
assert( hdr.EventDescriptor.Id == 0x0011 );
const auto vs = (const VSyncInfo*)record->UserData;
TracyLfqPrepare( QueueType::FrameVsync );
MemWrite( &item->frameVsync.time, hdr.TimeStamp.QuadPart );
MemWrite( &item->frameVsync.id, vs->vidPnTargetId );
TracyLfqCommit;
}
static void SetupVsync()
{
#if _WIN32_WINNT >= _WIN32_WINNT_WINBLUE && !defined(__MINGW32__)
const auto psz = sizeof( EVENT_TRACE_PROPERTIES ) + MAX_PATH;
s_propVsync = (EVENT_TRACE_PROPERTIES*)tracy_malloc( psz );
memset( s_propVsync, 0, sizeof( EVENT_TRACE_PROPERTIES ) );
s_propVsync->LogFileMode = EVENT_TRACE_REAL_TIME_MODE;
s_propVsync->Wnode.BufferSize = psz;
#ifdef TRACY_TIMER_QPC
s_propVsync->Wnode.ClientContext = 1;
#else
s_propVsync->Wnode.ClientContext = 3;
#endif
s_propVsync->LoggerNameOffset = sizeof( EVENT_TRACE_PROPERTIES );
strcpy( ((char*)s_propVsync) + sizeof( EVENT_TRACE_PROPERTIES ), "TracyVsync" );
auto backup = tracy_malloc( psz );
memcpy( backup, s_propVsync, psz );
const auto controlStatus = ControlTraceA( 0, "TracyVsync", s_propVsync, EVENT_TRACE_CONTROL_STOP );
if( controlStatus != ERROR_SUCCESS && controlStatus != ERROR_WMI_INSTANCE_NOT_FOUND )
{
tracy_free( backup );
tracy_free( s_propVsync );
return;
}
memcpy( s_propVsync, backup, psz );
tracy_free( backup );
const auto startStatus = StartTraceA( &s_traceHandleVsync, "TracyVsync", s_propVsync );
if( startStatus != ERROR_SUCCESS )
{
tracy_free( s_propVsync );
return;
}
EVENT_FILTER_EVENT_ID fe = {};
fe.FilterIn = TRUE;
fe.Count = 1;
fe.Events[0] = 0x0011; // VSyncDPC_Info
EVENT_FILTER_DESCRIPTOR desc = {};
desc.Ptr = (ULONGLONG)&fe;
desc.Size = sizeof( fe );
desc.Type = EVENT_FILTER_TYPE_EVENT_ID;
ENABLE_TRACE_PARAMETERS params = {};
params.Version = ENABLE_TRACE_PARAMETERS_VERSION_2;
params.EnableProperty = EVENT_ENABLE_PROPERTY_IGNORE_KEYWORD_0;
params.SourceId = s_propVsync->Wnode.Guid;
params.EnableFilterDesc = &desc;
params.FilterDescCount = 1;
uint64_t mask = 0x4000000000000001; // Microsoft_Windows_DxgKrnl_Performance | Base
if( EnableTraceEx2( s_traceHandleVsync, &DxgKrnlGuid, EVENT_CONTROL_CODE_ENABLE_PROVIDER, TRACE_LEVEL_INFORMATION, mask, mask, 0, ¶ms ) != ERROR_SUCCESS )
{
tracy_free( s_propVsync );
return;
}
char loggerName[MAX_PATH];
strcpy( loggerName, "TracyVsync" );
EVENT_TRACE_LOGFILEA log = {};
log.LoggerName = loggerName;
log.ProcessTraceMode = PROCESS_TRACE_MODE_REAL_TIME | PROCESS_TRACE_MODE_EVENT_RECORD | PROCESS_TRACE_MODE_RAW_TIMESTAMP;
log.EventRecordCallback = EventRecordCallbackVsync;
s_traceHandleVsync2 = OpenTraceA( &log );
if( s_traceHandleVsync2 == (TRACEHANDLE)INVALID_HANDLE_VALUE )
{
CloseTrace( s_traceHandleVsync );
tracy_free( s_propVsync );
return;
}
s_threadVsync = (Thread*)tracy_malloc( sizeof( Thread ) );
new(s_threadVsync) Thread( [] (void*) {
ThreadExitHandler threadExitHandler;
SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL );
SetThreadName( "Tracy Vsync" );
ProcessTrace( &s_traceHandleVsync2, 1, nullptr, nullptr );
}, nullptr );
#endif
}
static constexpr int GetSamplingInterval()
{
return GetSamplingPeriod() / 100;
}
bool SysTraceStart( int64_t& samplingPeriod )
{
if( !_GetThreadDescription ) _GetThreadDescription = (t_GetThreadDescription)GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetThreadDescription" );
s_pid = GetCurrentProcessId();
#if defined _WIN64
constexpr bool isOs64Bit = true;
#else
BOOL _iswow64;
IsWow64Process( GetCurrentProcess(), &_iswow64 );
const bool isOs64Bit = _iswow64;
#endif
TOKEN_PRIVILEGES priv = {};
priv.PrivilegeCount = 1;
priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if( LookupPrivilegeValue( nullptr, SE_SYSTEM_PROFILE_NAME, &priv.Privileges[0].Luid ) == 0 ) return false;
HANDLE pt;
if( OpenProcessToken( GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &pt ) == 0 ) return false;
const auto adjust = AdjustTokenPrivileges( pt, FALSE, &priv, 0, nullptr, nullptr );
CloseHandle( pt );
if( adjust == 0 ) return false;
const auto status = GetLastError();
if( status != ERROR_SUCCESS ) return false;
if( isOs64Bit )
{
TRACE_PROFILE_INTERVAL interval = {};
interval.Interval = GetSamplingInterval();
const auto intervalStatus = TraceSetInformation( 0, TraceSampledProfileIntervalInfo, &interval, sizeof( interval ) );
if( intervalStatus != ERROR_SUCCESS ) return false;
samplingPeriod = GetSamplingPeriod();
}
const auto psz = sizeof( EVENT_TRACE_PROPERTIES ) + sizeof( KERNEL_LOGGER_NAME );
s_prop = (EVENT_TRACE_PROPERTIES*)tracy_malloc( psz );
memset( s_prop, 0, sizeof( EVENT_TRACE_PROPERTIES ) );
ULONG flags = 0;
#ifndef TRACY_NO_CONTEXT_SWITCH
flags = EVENT_TRACE_FLAG_CSWITCH | EVENT_TRACE_FLAG_DISPATCHER | EVENT_TRACE_FLAG_THREAD;
#endif
#ifndef TRACY_NO_SAMPLING
if( isOs64Bit ) flags |= EVENT_TRACE_FLAG_PROFILE;
#endif
s_prop->EnableFlags = flags;
s_prop->LogFileMode = EVENT_TRACE_REAL_TIME_MODE;
s_prop->Wnode.BufferSize = psz;
s_prop->Wnode.Flags = WNODE_FLAG_TRACED_GUID;
#ifdef TRACY_TIMER_QPC
s_prop->Wnode.ClientContext = 1;
#else
s_prop->Wnode.ClientContext = 3;
#endif
s_prop->Wnode.Guid = SystemTraceControlGuid;
s_prop->BufferSize = 1024;
s_prop->MinimumBuffers = std::thread::hardware_concurrency() * 4;
s_prop->MaximumBuffers = std::thread::hardware_concurrency() * 6;
s_prop->LoggerNameOffset = sizeof( EVENT_TRACE_PROPERTIES );
memcpy( ((char*)s_prop) + sizeof( EVENT_TRACE_PROPERTIES ), KERNEL_LOGGER_NAME, sizeof( KERNEL_LOGGER_NAME ) );
auto backup = tracy_malloc( psz );
memcpy( backup, s_prop, psz );
const auto controlStatus = ControlTrace( 0, KERNEL_LOGGER_NAME, s_prop, EVENT_TRACE_CONTROL_STOP );
if( controlStatus != ERROR_SUCCESS && controlStatus != ERROR_WMI_INSTANCE_NOT_FOUND )
{
tracy_free( backup );
tracy_free( s_prop );
return false;
}
memcpy( s_prop, backup, psz );
tracy_free( backup );
const auto startStatus = StartTrace( &s_traceHandle, KERNEL_LOGGER_NAME, s_prop );
if( startStatus != ERROR_SUCCESS )
{
tracy_free( s_prop );
return false;
}
if( isOs64Bit )
{
CLASSIC_EVENT_ID stackId[2] = {};
stackId[0].EventGuid = PerfInfoGuid;
stackId[0].Type = 46;
stackId[1].EventGuid = ThreadV2Guid;
stackId[1].Type = 36;
const auto stackStatus = TraceSetInformation( s_traceHandle, TraceStackTracingInfo, &stackId, sizeof( stackId ) );
if( stackStatus != ERROR_SUCCESS )
{
tracy_free( s_prop );
return false;
}
}
#ifdef UNICODE
WCHAR KernelLoggerName[sizeof( KERNEL_LOGGER_NAME )];
#else
char KernelLoggerName[sizeof( KERNEL_LOGGER_NAME )];
#endif
memcpy( KernelLoggerName, KERNEL_LOGGER_NAME, sizeof( KERNEL_LOGGER_NAME ) );
EVENT_TRACE_LOGFILE log = {};
log.LoggerName = KernelLoggerName;
log.ProcessTraceMode = PROCESS_TRACE_MODE_REAL_TIME | PROCESS_TRACE_MODE_EVENT_RECORD | PROCESS_TRACE_MODE_RAW_TIMESTAMP;
log.EventRecordCallback = EventRecordCallback;
s_traceHandle2 = OpenTrace( &log );
if( s_traceHandle2 == (TRACEHANDLE)INVALID_HANDLE_VALUE )
{
CloseTrace( s_traceHandle );
tracy_free( s_prop );
return false;
}
#ifndef TRACY_NO_VSYNC_CAPTURE
SetupVsync();
#endif
return true;
}
void SysTraceStop()
{
if( s_threadVsync )
{
CloseTrace( s_traceHandleVsync2 );
CloseTrace( s_traceHandleVsync );
s_threadVsync->~Thread();
tracy_free( s_threadVsync );
}
CloseTrace( s_traceHandle2 );
CloseTrace( s_traceHandle );
}
void SysTraceWorker( void* ptr )
{
ThreadExitHandler threadExitHandler;
SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL );
SetThreadName( "Tracy SysTrace" );
ProcessTrace( &s_traceHandle2, 1, 0, 0 );
ControlTrace( 0, KERNEL_LOGGER_NAME, s_prop, EVENT_TRACE_CONTROL_STOP );
tracy_free( s_prop );
}
void SysTraceGetExternalName( uint64_t thread, const char*& threadName, const char*& name )
{
bool threadSent = false;
auto hnd = OpenThread( THREAD_QUERY_INFORMATION, FALSE, DWORD( thread ) );
if( hnd == 0 )
{
hnd = OpenThread( THREAD_QUERY_LIMITED_INFORMATION, FALSE, DWORD( thread ) );
}
if( hnd != 0 )
{
if( _GetThreadDescription )
{
PWSTR tmp;
_GetThreadDescription( hnd, &tmp );
char buf[256];
if( tmp )
{
auto ret = wcstombs( buf, tmp, 256 );
if( ret != 0 )
{
threadName = CopyString( buf, ret );
threadSent = true;
}
}
}
const auto pid = GetProcessIdOfThread( hnd );
if( !threadSent && NtQueryInformationThread && _EnumProcessModules && _GetModuleInformation && _GetModuleBaseNameA )
{
void* ptr;
ULONG retlen;
auto status = NtQueryInformationThread( hnd, (THREADINFOCLASS)9 /*ThreadQuerySetWin32StartAddress*/, &ptr, sizeof( &ptr ), &retlen );
if( status == 0 )
{
const auto phnd = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid );
if( phnd != INVALID_HANDLE_VALUE )
{
HMODULE modules[1024];
DWORD needed;
if( _EnumProcessModules( phnd, modules, 1024 * sizeof( HMODULE ), &needed ) != 0 )
{
const auto sz = std::min( DWORD( needed / sizeof( HMODULE ) ), DWORD( 1024 ) );
for( DWORD i=0; i<sz; i++ )
{
MODULEINFO info;
if( _GetModuleInformation( phnd, modules[i], &info, sizeof( info ) ) != 0 )
{
if( (uint64_t)ptr >= (uint64_t)info.lpBaseOfDll && (uint64_t)ptr <= (uint64_t)info.lpBaseOfDll + (uint64_t)info.SizeOfImage )
{
char buf2[1024];
const auto modlen = _GetModuleBaseNameA( phnd, modules[i], buf2, 1024 );
if( modlen != 0 )
{
threadName = CopyString( buf2, modlen );
threadSent = true;
}
}
}
}
}
CloseHandle( phnd );
}
}
}
CloseHandle( hnd );
if( !threadSent )
{
threadName = CopyString( "???", 3 );
threadSent = true;
}
if( pid != 0 )
{
{
uint64_t _pid = pid;
TracyLfqPrepare( QueueType::TidToPid );
MemWrite( &item->tidToPid.tid, thread );
MemWrite( &item->tidToPid.pid, _pid );
TracyLfqCommit;
}
if( pid == 4 )
{
name = CopyStringFast( "System", 6 );
return;
}
else
{
const auto phnd = OpenProcess( PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid );
if( phnd != INVALID_HANDLE_VALUE )
{
char buf2[1024];
const auto sz = GetProcessImageFileNameA( phnd, buf2, 1024 );
CloseHandle( phnd );
if( sz != 0 )
{
auto ptr = buf2 + sz - 1;
while( ptr > buf2 && *ptr != '\\' ) ptr--;
if( *ptr == '\\' ) ptr++;
name = CopyStringFast( ptr );
return;
}
}
}
}
}
if( !threadSent )
{
threadName = CopyString( "???", 3 );
}
name = CopyStringFast( "???", 3 );
}
}
# elif defined __linux__
# include <sys/types.h>
# include <sys/stat.h>
# include <sys/wait.h>
# include <fcntl.h>
# include <inttypes.h>
# include <limits>
# include <poll.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <unistd.h>
# include <atomic>
# include <thread>
# include <linux/perf_event.h>
# include <linux/version.h>
# include <sys/mman.h>
# include <sys/ioctl.h>
# include <sys/syscall.h>
# if defined __i386 || defined __x86_64__
# include "TracyCpuid.hpp"
# endif
# include "TracyProfiler.hpp"
# include "TracyRingBuffer.hpp"
# include "TracyThread.hpp"
namespace tracy
{
static std::atomic<bool> traceActive { false };
static int s_numCpus = 0;
static int s_numBuffers = 0;
static int s_ctxBufferIdx = 0;
static RingBuffer* s_ring = nullptr;
static const int ThreadHashSize = 4 * 1024;
static uint32_t s_threadHash[ThreadHashSize] = {};
static bool CurrentProcOwnsThread( uint32_t tid )
{
const auto hash = tid & ( ThreadHashSize-1 );
const auto hv = s_threadHash[hash];
if( hv == tid ) return true;
if( hv == -tid ) return false;
char path[256];
sprintf( path, "/proc/self/task/%d", tid );
struct stat st;
if( stat( path, &st ) == 0 )
{
s_threadHash[hash] = tid;
return true;
}
else
{
s_threadHash[hash] = -tid;
return false;
}
}
static int perf_event_open( struct perf_event_attr* hw_event, pid_t pid, int cpu, int group_fd, unsigned long flags )
{
return syscall( __NR_perf_event_open, hw_event, pid, cpu, group_fd, flags );
}
enum TraceEventId
{
EventCallstack,
EventCpuCycles,
EventInstructionsRetired,
EventCacheReference,
EventCacheMiss,
EventBranchRetired,
EventBranchMiss,
EventVsync,
EventContextSwitch,
EventWakeup,
};
static void ProbePreciseIp( perf_event_attr& pe, unsigned long long config0, unsigned long long config1, pid_t pid )
{
pe.config = config1;
pe.precise_ip = 3;
while( pe.precise_ip != 0 )
{
const int fd = perf_event_open( &pe, pid, 0, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
close( fd );
break;
}
pe.precise_ip--;
}
pe.config = config0;
while( pe.precise_ip != 0 )
{
const int fd = perf_event_open( &pe, pid, 0, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
close( fd );
break;
}
pe.precise_ip--;
}
TracyDebug( " Probed precise_ip: %i\n", pe.precise_ip );
}
static void ProbePreciseIp( perf_event_attr& pe, pid_t pid )
{
pe.precise_ip = 3;
while( pe.precise_ip != 0 )
{
const int fd = perf_event_open( &pe, pid, 0, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
close( fd );
break;
}
pe.precise_ip--;
}
TracyDebug( " Probed precise_ip: %i\n", pe.precise_ip );
}
static bool IsGenuineIntel()
{
#if defined __i386 || defined __x86_64__
uint32_t regs[4] = {};
__get_cpuid( 0, regs, regs+1, regs+2, regs+3 );
char manufacturer[12];
memcpy( manufacturer, regs+1, 4 );
memcpy( manufacturer+4, regs+3, 4 );
memcpy( manufacturer+8, regs+2, 4 );
return memcmp( manufacturer, "GenuineIntel", 12 ) == 0;
#else
return false;
#endif
}
static const char* ReadFile( const char* path )
{
int fd = open( path, O_RDONLY );
if( fd < 0 ) return nullptr;
static char tmp[64];
const auto cnt = read( fd, tmp, 63 );
close( fd );
if( cnt < 0 ) return nullptr;
tmp[cnt] = '\0';
return tmp;
}
bool SysTraceStart( int64_t& samplingPeriod )
{
#ifndef CLOCK_MONOTONIC_RAW
return false;
#endif
const auto paranoidLevelStr = ReadFile( "/proc/sys/kernel/perf_event_paranoid" );
if( !paranoidLevelStr ) return false;
#ifdef TRACY_VERBOSE
int paranoidLevel = 2;
paranoidLevel = atoi( paranoidLevelStr );
TracyDebug( "perf_event_paranoid: %i\n", paranoidLevel );
#endif
int switchId = -1, wakeupId = -1, vsyncId = -1;
const auto switchIdStr = ReadFile( "/sys/kernel/debug/tracing/events/sched/sched_switch/id" );
if( switchIdStr ) switchId = atoi( switchIdStr );
const auto wakeupIdStr = ReadFile( "/sys/kernel/debug/tracing/events/sched/sched_wakeup/id" );
if( wakeupIdStr ) wakeupId = atoi( wakeupIdStr );
const auto vsyncIdStr = ReadFile( "/sys/kernel/debug/tracing/events/drm/drm_vblank_event/id" );
if( vsyncIdStr ) vsyncId = atoi( vsyncIdStr );
TracyDebug( "sched_switch id: %i\n", switchId );
TracyDebug( "sched_wakeup id: %i\n", wakeupId );
TracyDebug( "drm_vblank_event id: %i\n", vsyncId );
#ifdef TRACY_NO_SAMPLE_RETIREMENT
const bool noRetirement = true;
#else
const char* noRetirementEnv = GetEnvVar( "TRACY_NO_SAMPLE_RETIREMENT" );
const bool noRetirement = noRetirementEnv && noRetirementEnv[0] == '1';
#endif
#ifdef TRACY_NO_SAMPLE_CACHE
const bool noCache = true;
#else
const char* noCacheEnv = GetEnvVar( "TRACY_NO_SAMPLE_CACHE" );
const bool noCache = noCacheEnv && noCacheEnv[0] == '1';
#endif
#ifdef TRACY_NO_SAMPLE_BRANCH
const bool noBranch = true;
#else
const char* noBranchEnv = GetEnvVar( "TRACY_NO_SAMPLE_BRANCH" );
const bool noBranch = noBranchEnv && noBranchEnv[0] == '1';
#endif
#ifdef TRACY_NO_CONTEXT_SWITCH
const bool noCtxSwitch = true;
#else
const char* noCtxSwitchEnv = GetEnvVar( "TRACY_NO_CONTEXT_SWITCH" );
const bool noCtxSwitch = noCtxSwitchEnv && noCtxSwitchEnv[0] == '1';
#endif
#ifdef TRACY_NO_VSYNC_CAPTURE
const bool noVsync = true;
#else
const char* noVsyncEnv = GetEnvVar( "TRACY_NO_VSYNC_CAPTURE" );
const bool noVsync = noVsyncEnv && noVsyncEnv[0] == '1';
#endif
samplingPeriod = GetSamplingPeriod();
uint32_t currentPid = (uint32_t)getpid();
s_numCpus = (int)std::thread::hardware_concurrency();
const auto maxNumBuffers = s_numCpus * (
1 + // software sampling
2 + // CPU cycles + instructions retired
2 + // cache reference + miss
2 + // branch retired + miss
2 + // context switches + wakeups
1 // vsync
);
s_ring = (RingBuffer*)tracy_malloc( sizeof( RingBuffer ) * maxNumBuffers );
s_numBuffers = 0;
// software sampling
perf_event_attr pe = {};
pe.type = PERF_TYPE_SOFTWARE;
pe.size = sizeof( perf_event_attr );
pe.config = PERF_COUNT_SW_CPU_CLOCK;
pe.sample_freq = GetSamplingFrequency();
pe.sample_type = PERF_SAMPLE_TID | PERF_SAMPLE_TIME | PERF_SAMPLE_CALLCHAIN;
#if LINUX_VERSION_CODE >= KERNEL_VERSION( 4, 8, 0 )
pe.sample_max_stack = 127;
#endif
pe.disabled = 1;
pe.freq = 1;
pe.inherit = 1;
#if !defined TRACY_HW_TIMER || !( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
pe.use_clockid = 1;
pe.clockid = CLOCK_MONOTONIC_RAW;
#endif
TracyDebug( "Setup software sampling\n" );
ProbePreciseIp( pe, currentPid );
for( int i=0; i<s_numCpus; i++ )
{
int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd == -1 )
{
pe.exclude_kernel = 1;
ProbePreciseIp( pe, currentPid );
fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd == -1 )
{
TracyDebug( " Failed to setup!\n");
break;
}
TracyDebug( " No access to kernel samples\n" );
}
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventCallstack );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
// CPU cycles + instructions retired
pe = {};
pe.type = PERF_TYPE_HARDWARE;
pe.size = sizeof( perf_event_attr );
pe.sample_freq = 5000;
pe.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TIME;
pe.disabled = 1;
pe.exclude_kernel = 1;
pe.exclude_guest = 1;
pe.exclude_hv = 1;
pe.freq = 1;
pe.inherit = 1;
#if !defined TRACY_HW_TIMER || !( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
pe.use_clockid = 1;
pe.clockid = CLOCK_MONOTONIC_RAW;
#endif
if( !noRetirement )
{
TracyDebug( "Setup sampling cycles + retirement\n" );
ProbePreciseIp( pe, PERF_COUNT_HW_CPU_CYCLES, PERF_COUNT_HW_INSTRUCTIONS, currentPid );
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventCpuCycles );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
pe.config = PERF_COUNT_HW_INSTRUCTIONS;
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventInstructionsRetired );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
}
// cache reference + miss
if( !noCache )
{
TracyDebug( "Setup sampling CPU cache references + misses\n" );
ProbePreciseIp( pe, PERF_COUNT_HW_CACHE_REFERENCES, PERF_COUNT_HW_CACHE_MISSES, currentPid );
if( IsGenuineIntel() )
{
pe.precise_ip = 0;
TracyDebug( " CPU is GenuineIntel, forcing precise_ip down to 0\n" );
}
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventCacheReference );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
pe.config = PERF_COUNT_HW_CACHE_MISSES;
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventCacheMiss );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
}
// branch retired + miss
if( !noBranch )
{
TracyDebug( "Setup sampling CPU branch retirements + misses\n" );
ProbePreciseIp( pe, PERF_COUNT_HW_BRANCH_INSTRUCTIONS, PERF_COUNT_HW_BRANCH_MISSES, currentPid );
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventBranchRetired );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
pe.config = PERF_COUNT_HW_BRANCH_MISSES;
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, currentPid, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventBranchMiss );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
}
s_ctxBufferIdx = s_numBuffers;
// vsync
if( !noVsync && vsyncId != -1 )
{
pe = {};
pe.type = PERF_TYPE_TRACEPOINT;
pe.size = sizeof( perf_event_attr );
pe.sample_period = 1;
pe.sample_type = PERF_SAMPLE_TIME | PERF_SAMPLE_RAW;
pe.disabled = 1;
pe.config = vsyncId;
#if !defined TRACY_HW_TIMER || !( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
pe.use_clockid = 1;
pe.clockid = CLOCK_MONOTONIC_RAW;
#endif
TracyDebug( "Setup vsync capture\n" );
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, -1, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventVsync, i );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
}
// context switches
if( !noCtxSwitch && switchId != -1 )
{
pe = {};
pe.type = PERF_TYPE_TRACEPOINT;
pe.size = sizeof( perf_event_attr );
pe.sample_period = 1;
pe.sample_type = PERF_SAMPLE_TIME | PERF_SAMPLE_RAW | PERF_SAMPLE_CALLCHAIN;
#if LINUX_VERSION_CODE >= KERNEL_VERSION( 4, 8, 0 )
pe.sample_max_stack = 127;
#endif
pe.disabled = 1;
pe.inherit = 1;
pe.config = switchId;
#if !defined TRACY_HW_TIMER || !( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
pe.use_clockid = 1;
pe.clockid = CLOCK_MONOTONIC_RAW;
#endif
TracyDebug( "Setup context switch capture\n" );
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, -1, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 256*1024, fd, EventContextSwitch, i );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
if( wakeupId != -1 )
{
pe.config = wakeupId;
pe.config &= ~PERF_SAMPLE_CALLCHAIN;
TracyDebug( "Setup wakeup capture\n" );
for( int i=0; i<s_numCpus; i++ )
{
const int fd = perf_event_open( &pe, -1, i, -1, PERF_FLAG_FD_CLOEXEC );
if( fd != -1 )
{
new( s_ring+s_numBuffers ) RingBuffer( 64*1024, fd, EventWakeup, i );
if( s_ring[s_numBuffers].IsValid() )
{
s_numBuffers++;
TracyDebug( " Core %i ok\n", i );
}
}
}
}
}
TracyDebug( "Ringbuffers in use: %i\n", s_numBuffers );
traceActive.store( true, std::memory_order_relaxed );
return true;
}
void SysTraceStop()
{
traceActive.store( false, std::memory_order_relaxed );
}
static uint64_t* GetCallstackBlock( uint64_t cnt, RingBuffer& ring, uint64_t offset )
{
auto trace = (uint64_t*)tracy_malloc_fast( ( 1 + cnt ) * sizeof( uint64_t ) );
ring.Read( trace+1, offset, sizeof( uint64_t ) * cnt );
#if defined __x86_64__ || defined _M_X64
// remove non-canonical pointers
do
{
const auto test = (int64_t)trace[cnt];
const auto m1 = test >> 63;
const auto m2 = test >> 47;
if( m1 == m2 ) break;
}
while( --cnt > 0 );
for( uint64_t j=1; j<cnt; j++ )
{
const auto test = (int64_t)trace[j];
const auto m1 = test >> 63;
const auto m2 = test >> 47;
if( m1 != m2 ) trace[j] = 0;
}
#endif
for( uint64_t j=1; j<=cnt; j++ )
{
if( trace[j] >= (uint64_t)-4095 ) // PERF_CONTEXT_MAX
{
memmove( trace+j, trace+j+1, sizeof( uint64_t ) * ( cnt - j ) );
cnt--;
}
}
memcpy( trace, &cnt, sizeof( uint64_t ) );
return trace;
}
void SysTraceWorker( void* ptr )
{
ThreadExitHandler threadExitHandler;
SetThreadName( "Tracy Sampling" );
InitRpmalloc();
sched_param sp = { 99 };
if( pthread_setschedparam( pthread_self(), SCHED_FIFO, &sp ) != 0 ) TracyDebug( "Failed to increase SysTraceWorker thread priority!\n" );
auto ctxBufferIdx = s_ctxBufferIdx;
auto ringArray = s_ring;
auto numBuffers = s_numBuffers;
for( int i=0; i<numBuffers; i++ ) ringArray[i].Enable();
for(;;)
{
#ifdef TRACY_ON_DEMAND
if( !GetProfiler().IsConnected() )
{
if( !traceActive.load( std::memory_order_relaxed ) ) break;
for( int i=0; i<numBuffers; i++ )
{
auto& ring = ringArray[i];
const auto head = ring.LoadHead();
const auto tail = ring.GetTail();
if( head != tail )
{
const auto end = head - tail;
ring.Advance( end );
}
}
if( !traceActive.load( std::memory_order_relaxed ) ) break;
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
continue;
}
#endif
bool hadData = false;
for( int i=0; i<ctxBufferIdx; i++ )
{
if( !traceActive.load( std::memory_order_relaxed ) ) break;
auto& ring = ringArray[i];
const auto head = ring.LoadHead();
const auto tail = ring.GetTail();
if( head == tail ) continue;
assert( head > tail );
hadData = true;
const auto id = ring.GetId();
assert( id != EventContextSwitch );
const auto end = head - tail;
uint64_t pos = 0;
if( id == EventCallstack )
{
while( pos < end )
{
perf_event_header hdr;
ring.Read( &hdr, pos, sizeof( perf_event_header ) );
if( hdr.type == PERF_RECORD_SAMPLE )
{
auto offset = pos + sizeof( perf_event_header );
// Layout:
// u32 pid, tid
// u64 time
// u64 cnt
// u64 ip[cnt]
uint32_t tid;
uint64_t t0;
uint64_t cnt;
offset += sizeof( uint32_t );
ring.Read( &tid, offset, sizeof( uint32_t ) );
offset += sizeof( uint32_t );
ring.Read( &t0, offset, sizeof( uint64_t ) );
offset += sizeof( uint64_t );
ring.Read( &cnt, offset, sizeof( uint64_t ) );
offset += sizeof( uint64_t );
if( cnt > 0 )
{
#if defined TRACY_HW_TIMER && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
t0 = ring.ConvertTimeToTsc( t0 );
#endif
auto trace = GetCallstackBlock( cnt, ring, offset );
TracyLfqPrepare( QueueType::CallstackSample );
MemWrite( &item->callstackSampleFat.time, t0 );
MemWrite( &item->callstackSampleFat.thread, tid );
MemWrite( &item->callstackSampleFat.ptr, (uint64_t)trace );
TracyLfqCommit;
}
}
pos += hdr.size;
}
}
else
{
while( pos < end )
{
perf_event_header hdr;
ring.Read( &hdr, pos, sizeof( perf_event_header ) );
if( hdr.type == PERF_RECORD_SAMPLE )
{
auto offset = pos + sizeof( perf_event_header );
// Layout:
// u64 ip
// u64 time
uint64_t ip, t0;
ring.Read( &ip, offset, sizeof( uint64_t ) );
offset += sizeof( uint64_t );
ring.Read( &t0, offset, sizeof( uint64_t ) );
#if defined TRACY_HW_TIMER && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
t0 = ring.ConvertTimeToTsc( t0 );
#endif
QueueType type;
switch( id )
{
case EventCpuCycles:
type = QueueType::HwSampleCpuCycle;
break;
case EventInstructionsRetired:
type = QueueType::HwSampleInstructionRetired;
break;
case EventCacheReference:
type = QueueType::HwSampleCacheReference;
break;
case EventCacheMiss:
type = QueueType::HwSampleCacheMiss;
break;
case EventBranchRetired:
type = QueueType::HwSampleBranchRetired;
break;
case EventBranchMiss:
type = QueueType::HwSampleBranchMiss;
break;
default:
assert( false );
break;
}
TracyLfqPrepare( type );
MemWrite( &item->hwSample.ip, ip );
MemWrite( &item->hwSample.time, t0 );
TracyLfqCommit;
}
pos += hdr.size;
}
}
assert( pos == end );
ring.Advance( end );
}
if( !traceActive.load( std::memory_order_relaxed ) ) break;
if( ctxBufferIdx != numBuffers )
{
const auto ctxBufNum = numBuffers - ctxBufferIdx;
int activeNum = 0;
uint16_t active[512];
uint32_t end[512];
uint32_t pos[512];
for( int i=0; i<ctxBufNum; i++ )
{
const auto rbIdx = ctxBufferIdx + i;
const auto rbHead = ringArray[rbIdx].LoadHead();
const auto rbTail = ringArray[rbIdx].GetTail();
const auto rbActive = rbHead != rbTail;
if( rbActive )
{
active[activeNum] = (uint16_t)i;
activeNum++;
end[i] = rbHead - rbTail;
pos[i] = 0;
}
else
{
end[i] = 0;
}
}
if( activeNum > 0 )
{
hadData = true;
while( activeNum > 0 )
{
int sel = -1;
int selPos;
int64_t t0 = std::numeric_limits<int64_t>::max();
for( int i=0; i<activeNum; i++ )
{
auto idx = active[i];
auto rbPos = pos[idx];
assert( rbPos < end[idx] );
const auto rbIdx = ctxBufferIdx + idx;
perf_event_header hdr;
ringArray[rbIdx].Read( &hdr, rbPos, sizeof( perf_event_header ) );
if( hdr.type == PERF_RECORD_SAMPLE )
{
int64_t rbTime;
ringArray[rbIdx].Read( &rbTime, rbPos + sizeof( perf_event_header ), sizeof( int64_t ) );
if( rbTime < t0 )
{
t0 = rbTime;
sel = idx;
selPos = i;
}
}
else
{
rbPos += hdr.size;
if( rbPos == end[idx] )
{
memmove( active+i, active+i+1, sizeof(*active) * ( activeNum - i - 1 ) );
activeNum--;
i--;
}
else
{
pos[idx] = rbPos;
}
}
}
if( sel >= 0 )
{
auto& ring = ringArray[ctxBufferIdx + sel];
auto rbPos = pos[sel];
auto offset = rbPos;
perf_event_header hdr;
ring.Read( &hdr, offset, sizeof( perf_event_header ) );
#if defined TRACY_HW_TIMER && ( defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 )
t0 = ring.ConvertTimeToTsc( t0 );
#endif
const auto rid = ring.GetId();
if( rid == EventContextSwitch )
{
// Layout:
// u64 time
// u64 cnt
// u64 ip[cnt]
// u32 size
// u8 data[size]
// Data (not ABI stable, but has not changed since it was added, in 2009):
// u8 hdr[8]
// u8 prev_comm[16]
// u32 prev_pid
// u32 prev_prio
// lng prev_state
// u8 next_comm[16]
// u32 next_pid
// u32 next_prio
offset += sizeof( perf_event_header ) + sizeof( uint64_t );
uint64_t cnt;
ring.Read( &cnt, offset, sizeof( uint64_t ) );
offset += sizeof( uint64_t );
const auto traceOffset = offset;
offset += sizeof( uint64_t ) * cnt + sizeof( uint32_t ) + 8 + 16;
uint32_t prev_pid, next_pid;
long prev_state;
ring.Read( &prev_pid, offset, sizeof( uint32_t ) );
offset += sizeof( uint32_t ) + sizeof( uint32_t );
ring.Read( &prev_state, offset, sizeof( long ) );
offset += sizeof( long ) + 16;
ring.Read( &next_pid, offset, sizeof( uint32_t ) );
uint8_t reason = 100;
uint8_t state;
if( prev_state & 0x0001 ) state = 104;
else if( prev_state & 0x0002 ) state = 101;
else if( prev_state & 0x0004 ) state = 105;
else if( prev_state & 0x0008 ) state = 106;
else if( prev_state & 0x0010 ) state = 108;
else if( prev_state & 0x0020 ) state = 109;
else if( prev_state & 0x0040 ) state = 110;
else if( prev_state & 0x0080 ) state = 102;
else state = 103;
TracyLfqPrepare( QueueType::ContextSwitch );
MemWrite( &item->contextSwitch.time, t0 );
MemWrite( &item->contextSwitch.oldThread, prev_pid );
MemWrite( &item->contextSwitch.newThread, next_pid );
MemWrite( &item->contextSwitch.cpu, uint8_t( ring.GetCpu() ) );
MemWrite( &item->contextSwitch.reason, reason );
MemWrite( &item->contextSwitch.state, state );
TracyLfqCommit;
if( cnt > 0 && prev_pid != 0 && CurrentProcOwnsThread( prev_pid ) )
{
auto trace = GetCallstackBlock( cnt, ring, traceOffset );
TracyLfqPrepare( QueueType::CallstackSampleContextSwitch );
MemWrite( &item->callstackSampleFat.time, t0 );
MemWrite( &item->callstackSampleFat.thread, prev_pid );
MemWrite( &item->callstackSampleFat.ptr, (uint64_t)trace );
TracyLfqCommit;
}
}
else if( rid == EventWakeup )
{
// Layout:
// u64 time
// u32 size
// u8 data[size]
// Data:
// u8 hdr[8]
// u8 comm[16]
// u32 pid
// u32 prio
// u64 target_cpu
offset += sizeof( perf_event_header ) + sizeof( uint64_t ) + sizeof( uint32_t ) + 8 + 16;
uint32_t pid;
ring.Read( &pid, offset, sizeof( uint32_t ) );
TracyLfqPrepare( QueueType::ThreadWakeup );
MemWrite( &item->threadWakeup.time, t0 );
MemWrite( &item->threadWakeup.thread, pid );
TracyLfqCommit;
}
else
{
assert( rid == EventVsync );
// Layout:
// u64 time
// u32 size
// u8 data[size]
// Data (not ABI stable):
// u8 hdr[8]
// i32 crtc
// u32 seq
// i64 ktime
// u8 high precision
offset += sizeof( perf_event_header ) + sizeof( uint64_t ) + sizeof( uint32_t ) + 8;
int32_t crtc;
ring.Read( &crtc, offset, sizeof( int32_t ) );
// Note: The timestamp value t0 might be off by a number of microseconds from the
// true hardware vblank event. The ktime value should be used instead, but it is
// measured in CLOCK_MONOTONIC time. Tracy only supports the timestamp counter
// register (TSC) or CLOCK_MONOTONIC_RAW clock.
#if 0
offset += sizeof( uint32_t ) * 2;
int64_t ktime;
ring.Read( &ktime, offset, sizeof( int64_t ) );
#endif
TracyLfqPrepare( QueueType::FrameVsync );
MemWrite( &item->frameVsync.id, crtc );
MemWrite( &item->frameVsync.time, t0 );
TracyLfqCommit;
}
rbPos += hdr.size;
if( rbPos == end[sel] )
{
memmove( active+selPos, active+selPos+1, sizeof(*active) * ( activeNum - selPos - 1 ) );
activeNum--;
}
else
{
pos[sel] = rbPos;
}
}
}
for( int i=0; i<ctxBufNum; i++ )
{
if( end[i] != 0 ) ringArray[ctxBufferIdx + i].Advance( end[i] );
}
}
}
if( !traceActive.load( std::memory_order_relaxed ) ) break;
if( !hadData )
{
std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
}
}
for( int i=0; i<numBuffers; i++ ) ringArray[i].~RingBuffer();
tracy_free_fast( ringArray );
}
void SysTraceGetExternalName( uint64_t thread, const char*& threadName, const char*& name )
{
FILE* f;
char fn[256];
sprintf( fn, "/proc/%" PRIu64 "/comm", thread );
f = fopen( fn, "rb" );
if( f )
{
char buf[256];
const auto sz = fread( buf, 1, 256, f );
if( sz > 0 && buf[sz-1] == '\n' ) buf[sz-1] = '\0';
threadName = CopyString( buf );
fclose( f );
}
else
{
threadName = CopyString( "???", 3 );
}
sprintf( fn, "/proc/%" PRIu64 "/status", thread );
f = fopen( fn, "rb" );
if( f )
{
char* tmp = (char*)tracy_malloc_fast( 8*1024 );
const auto fsz = (ptrdiff_t)fread( tmp, 1, 8*1024, f );
fclose( f );
int pid = -1;
auto line = tmp;
for(;;)
{
if( memcmp( "Tgid:\t", line, 6 ) == 0 )
{
pid = atoi( line + 6 );
break;
}
while( line - tmp < fsz && *line != '\n' ) line++;
if( *line != '\n' ) break;
line++;
}
tracy_free_fast( tmp );
if( pid >= 0 )
{
{
uint64_t _pid = pid;
TracyLfqPrepare( QueueType::TidToPid );
MemWrite( &item->tidToPid.tid, thread );
MemWrite( &item->tidToPid.pid, _pid );
TracyLfqCommit;
}
sprintf( fn, "/proc/%i/comm", pid );
f = fopen( fn, "rb" );
if( f )
{
char buf[256];
const auto sz = fread( buf, 1, 256, f );
if( sz > 0 && buf[sz-1] == '\n' ) buf[sz-1] = '\0';
name = CopyStringFast( buf );
fclose( f );
return;
}
}
}
name = CopyStringFast( "???", 3 );
}
}
# endif
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/client/TracyDxt1.hpp | #ifndef __TRACYDXT1_HPP__
#define __TRACYDXT1_HPP__
namespace tracy
{
void CompressImageDxt1( const char* src, char* dst, int w, int h );
}
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/client/TracyScoped.hpp | #ifndef __TRACYSCOPED_HPP__
#define __TRACYSCOPED_HPP__
#include <limits>
#include <stdint.h>
#include <string.h>
#include "../common/TracySystem.hpp"
#include "../common/TracyAlign.hpp"
#include "../common/TracyAlloc.hpp"
#include "TracyProfiler.hpp"
namespace tracy
{
class ScopedZone
{
public:
ScopedZone( const ScopedZone& ) = delete;
ScopedZone( ScopedZone&& ) = delete;
ScopedZone& operator=( const ScopedZone& ) = delete;
ScopedZone& operator=( ScopedZone&& ) = delete;
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, bool is_active = true )
#ifdef TRACY_ON_DEMAND
: m_active( is_active && GetProfiler().IsConnected() )
#else
: m_active( is_active )
#endif
{
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
m_connectionId = GetProfiler().ConnectionId();
#endif
TracyQueuePrepare( QueueType::ZoneBegin );
MemWrite( &item->zoneBegin.time, Profiler::GetTime() );
MemWrite( &item->zoneBegin.srcloc, (uint64_t)srcloc );
TracyQueueCommit( zoneBeginThread );
}
tracy_force_inline ScopedZone( const SourceLocationData* srcloc, int depth, bool is_active = true )
#ifdef TRACY_ON_DEMAND
: m_active( is_active && GetProfiler().IsConnected() )
#else
: m_active( is_active )
#endif
{
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
m_connectionId = GetProfiler().ConnectionId();
#endif
GetProfiler().SendCallstack( depth );
TracyQueuePrepare( QueueType::ZoneBeginCallstack );
MemWrite( &item->zoneBegin.time, Profiler::GetTime() );
MemWrite( &item->zoneBegin.srcloc, (uint64_t)srcloc );
TracyQueueCommit( zoneBeginThread );
}
tracy_force_inline ScopedZone( uint32_t line, const char* source, size_t sourceSz, const char* function, size_t functionSz, const char* name, size_t nameSz, bool is_active = true )
#ifdef TRACY_ON_DEMAND
: m_active( is_active && GetProfiler().IsConnected() )
#else
: m_active( is_active )
#endif
{
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
m_connectionId = GetProfiler().ConnectionId();
#endif
TracyQueuePrepare( QueueType::ZoneBeginAllocSrcLoc );
const auto srcloc = Profiler::AllocSourceLocation( line, source, sourceSz, function, functionSz, name, nameSz );
MemWrite( &item->zoneBegin.time, Profiler::GetTime() );
MemWrite( &item->zoneBegin.srcloc, srcloc );
TracyQueueCommit( zoneBeginThread );
}
tracy_force_inline ScopedZone( uint32_t line, const char* source, size_t sourceSz, const char* function, size_t functionSz, const char* name, size_t nameSz, int depth, bool is_active = true )
#ifdef TRACY_ON_DEMAND
: m_active( is_active && GetProfiler().IsConnected() )
#else
: m_active( is_active )
#endif
{
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
m_connectionId = GetProfiler().ConnectionId();
#endif
GetProfiler().SendCallstack( depth );
TracyQueuePrepare( QueueType::ZoneBeginAllocSrcLocCallstack );
const auto srcloc = Profiler::AllocSourceLocation( line, source, sourceSz, function, functionSz, name, nameSz );
MemWrite( &item->zoneBegin.time, Profiler::GetTime() );
MemWrite( &item->zoneBegin.srcloc, srcloc );
TracyQueueCommit( zoneBeginThread );
}
tracy_force_inline ~ScopedZone()
{
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
if( GetProfiler().ConnectionId() != m_connectionId ) return;
#endif
TracyQueuePrepare( QueueType::ZoneEnd );
MemWrite( &item->zoneEnd.time, Profiler::GetTime() );
TracyQueueCommit( zoneEndThread );
}
tracy_force_inline void Text( const char* txt, size_t size )
{
assert( size < std::numeric_limits<uint16_t>::max() );
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
if( GetProfiler().ConnectionId() != m_connectionId ) return;
#endif
auto ptr = (char*)tracy_malloc( size );
memcpy( ptr, txt, size );
TracyQueuePrepare( QueueType::ZoneText );
MemWrite( &item->zoneTextFat.text, (uint64_t)ptr );
MemWrite( &item->zoneTextFat.size, (uint16_t)size );
TracyQueueCommit( zoneTextFatThread );
}
tracy_force_inline void Name( const char* txt, size_t size )
{
assert( size < std::numeric_limits<uint16_t>::max() );
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
if( GetProfiler().ConnectionId() != m_connectionId ) return;
#endif
auto ptr = (char*)tracy_malloc( size );
memcpy( ptr, txt, size );
TracyQueuePrepare( QueueType::ZoneName );
MemWrite( &item->zoneTextFat.text, (uint64_t)ptr );
MemWrite( &item->zoneTextFat.size, (uint16_t)size );
TracyQueueCommit( zoneTextFatThread );
}
tracy_force_inline void Color( uint32_t color )
{
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
if( GetProfiler().ConnectionId() != m_connectionId ) return;
#endif
TracyQueuePrepare( QueueType::ZoneColor );
MemWrite( &item->zoneColor.r, uint8_t( ( color ) & 0xFF ) );
MemWrite( &item->zoneColor.g, uint8_t( ( color >> 8 ) & 0xFF ) );
MemWrite( &item->zoneColor.b, uint8_t( ( color >> 16 ) & 0xFF ) );
TracyQueueCommit( zoneColorThread );
}
tracy_force_inline void Value( uint64_t value )
{
if( !m_active ) return;
#ifdef TRACY_ON_DEMAND
if( GetProfiler().ConnectionId() != m_connectionId ) return;
#endif
TracyQueuePrepare( QueueType::ZoneValue );
MemWrite( &item->zoneValue.value, value );
TracyQueueCommit( zoneValueThread );
}
tracy_force_inline bool IsActive() const { return m_active; }
private:
const bool m_active;
#ifdef TRACY_ON_DEMAND
uint64_t m_connectionId;
#endif
};
}
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/client/TracyCpuid.hpp | #ifndef __TRACYCPUID_HPP__
#define __TRACYCPUID_HPP__
// Prior to GCC 11 the cpuid.h header did not have any include guards and thus
// including it more than once would cause a compiler error due to symbol
// redefinitions. In order to support older GCC versions, we have to wrap this
// include between custom include guards to prevent this issue.
// See also https://github.com/wolfpld/tracy/issues/452
#include <cpuid.h>
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/client/tracy_SPSCQueue.h | /*
Copyright (c) 2020 Erik Rigtorp <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#pragma once
#include <atomic>
#include <cassert>
#include <cstddef>
#include <stdexcept>
#include <type_traits> // std::enable_if, std::is_*_constructible
#include "../common/TracyAlloc.hpp"
#if defined (_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4324)
#endif
namespace tracy {
template <typename T> class SPSCQueue {
public:
explicit SPSCQueue(const size_t capacity)
: capacity_(capacity) {
capacity_++; // Needs one slack element
slots_ = (T*)tracy_malloc(sizeof(T) * (capacity_ + 2 * kPadding));
static_assert(alignof(SPSCQueue<T>) == kCacheLineSize, "");
static_assert(sizeof(SPSCQueue<T>) >= 3 * kCacheLineSize, "");
assert(reinterpret_cast<char *>(&readIdx_) -
reinterpret_cast<char *>(&writeIdx_) >=
static_cast<std::ptrdiff_t>(kCacheLineSize));
}
~SPSCQueue() {
while (front()) {
pop();
}
tracy_free(slots_);
}
// non-copyable and non-movable
SPSCQueue(const SPSCQueue &) = delete;
SPSCQueue &operator=(const SPSCQueue &) = delete;
template <typename... Args>
void emplace(Args &&...args) noexcept(
std::is_nothrow_constructible<T, Args &&...>::value) {
static_assert(std::is_constructible<T, Args &&...>::value,
"T must be constructible with Args&&...");
auto const writeIdx = writeIdx_.load(std::memory_order_relaxed);
auto nextWriteIdx = writeIdx + 1;
if (nextWriteIdx == capacity_) {
nextWriteIdx = 0;
}
while (nextWriteIdx == readIdxCache_) {
readIdxCache_ = readIdx_.load(std::memory_order_acquire);
}
new (&slots_[writeIdx + kPadding]) T(std::forward<Args>(args)...);
writeIdx_.store(nextWriteIdx, std::memory_order_release);
}
T *front() noexcept {
auto const readIdx = readIdx_.load(std::memory_order_relaxed);
if (readIdx == writeIdxCache_) {
writeIdxCache_ = writeIdx_.load(std::memory_order_acquire);
if (writeIdxCache_ == readIdx) {
return nullptr;
}
}
return &slots_[readIdx + kPadding];
}
void pop() noexcept {
static_assert(std::is_nothrow_destructible<T>::value,
"T must be nothrow destructible");
auto const readIdx = readIdx_.load(std::memory_order_relaxed);
assert(writeIdx_.load(std::memory_order_acquire) != readIdx);
slots_[readIdx + kPadding].~T();
auto nextReadIdx = readIdx + 1;
if (nextReadIdx == capacity_) {
nextReadIdx = 0;
}
readIdx_.store(nextReadIdx, std::memory_order_release);
}
size_t size() const noexcept {
std::ptrdiff_t diff = writeIdx_.load(std::memory_order_acquire) -
readIdx_.load(std::memory_order_acquire);
if (diff < 0) {
diff += capacity_;
}
return static_cast<size_t>(diff);
}
bool empty() const noexcept {
return writeIdx_.load(std::memory_order_acquire) ==
readIdx_.load(std::memory_order_acquire);
}
size_t capacity() const noexcept { return capacity_ - 1; }
private:
static constexpr size_t kCacheLineSize = 64;
// Padding to avoid false sharing between slots_ and adjacent allocations
static constexpr size_t kPadding = (kCacheLineSize - 1) / sizeof(T) + 1;
private:
size_t capacity_;
T *slots_;
// Align to cache line size in order to avoid false sharing
// readIdxCache_ and writeIdxCache_ is used to reduce the amount of cache
// coherency traffic
alignas(kCacheLineSize) std::atomic<size_t> writeIdx_ = {0};
alignas(kCacheLineSize) size_t readIdxCache_ = 0;
alignas(kCacheLineSize) std::atomic<size_t> readIdx_ = {0};
alignas(kCacheLineSize) size_t writeIdxCache_ = 0;
// Padding to avoid adjacent allocations to share cache line with
// writeIdxCache_
char padding_[kCacheLineSize - sizeof(SPSCQueue<T>::writeIdxCache_)];
};
} // namespace rigtorp
#if defined (_MSC_VER)
#pragma warning(pop)
#endif
|
0 | repos/zig_vulkan/deps/ztracy/libs/tracy | repos/zig_vulkan/deps/ztracy/libs/tracy/client/TracySysTime.hpp | #ifndef __TRACYSYSTIME_HPP__
#define __TRACYSYSTIME_HPP__
#if defined _WIN32 || defined __linux__ || defined __APPLE__
# define TRACY_HAS_SYSTIME
#else
# include <sys/param.h>
#endif
#ifdef BSD
# define TRACY_HAS_SYSTIME
#endif
#ifdef TRACY_HAS_SYSTIME
#include <stdint.h>
namespace tracy
{
class SysTime
{
public:
SysTime();
float Get();
void ReadTimes();
private:
uint64_t idle, used;
};
}
#endif
#endif
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.