forked from mirror/vulkan-zig
CI: Upload vk.zig as artifact
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -38,3 +38,9 @@ jobs:
|
|||||||
- name: Build with latest zig & vk.xml
|
- name: Build with latest zig & vk.xml
|
||||||
run: |
|
run: |
|
||||||
zig build -Dvulkan-registry=./vk.xml
|
zig build -Dvulkan-registry=./vk.xml
|
||||||
|
|
||||||
|
- name: Archive vk.xml
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: vk.zig
|
||||||
|
path: zig-cache/vk.zig
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const IdRenderer = id_render.IdRenderer;
|
|||||||
|
|
||||||
const preamble =
|
const preamble =
|
||||||
\\
|
\\
|
||||||
\\// This file is generated from the Khronos Vulkan XML API registry
|
\\// This file is generated from the Khronos Vulkan XML API registry by vulkan-zig.
|
||||||
\\
|
\\
|
||||||
\\const std = @import("std");
|
\\const std = @import("std");
|
||||||
\\const builtin = @import("builtin");
|
\\const builtin = @import("builtin");
|
||||||
@@ -444,7 +444,7 @@ fn Renderer(comptime WriterType: type) type {
|
|||||||
.device => "Device",
|
.device => "Device",
|
||||||
};
|
};
|
||||||
|
|
||||||
try self.writer.print("\npub const {s}Command = enum {{\n", .{dispatch_type_name});
|
try self.writer.print("pub const {s}Command = enum {{\n", .{dispatch_type_name});
|
||||||
for (self.registry.decls) |decl| {
|
for (self.registry.decls) |decl| {
|
||||||
if (decl.decl_type == .command) {
|
if (decl.decl_type == .command) {
|
||||||
const command = decl.decl_type.command;
|
const command = decl.decl_type.command;
|
||||||
@@ -453,7 +453,7 @@ fn Renderer(comptime WriterType: type) type {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try self.writer.writeAll("};\n\n");
|
try self.writer.writeAll("};\n");
|
||||||
try self.writer.print(
|
try self.writer.print(
|
||||||
\\fn {s}CommandToString(cmd: {s}Command) []const u8 {{
|
\\fn {s}CommandToString(cmd: {s}Command) []const u8 {{
|
||||||
\\ return std.meta.tagName(cmd);
|
\\ return std.meta.tagName(cmd);
|
||||||
|
|||||||
Reference in New Issue
Block a user