forked from mirror/vulkan-zig
Implement initial suggestions on PR
This commit is contained in:
@@ -1063,29 +1063,12 @@ fn Renderer(comptime WriterType: type) type {
|
|||||||
const class = classifyCommandDispatch(command_name, command);
|
const class = classifyCommandDispatch(command_name, command);
|
||||||
switch (class) {
|
switch (class) {
|
||||||
// Vulkan extensions cannot add base functions.
|
// Vulkan extensions cannot add base functions.
|
||||||
.base => continue,
|
.base => return error.InvalidRegistry,
|
||||||
// TODO: some extensions have multiple separate requirements.
|
|
||||||
// For example, "VK_KHR_push_descriptor" depends on either "VK_VERSION_1_1" or "VK_KHR_descriptor_update_template",
|
|
||||||
// which causes the same function to be mentioned twice; once for each requirement.
|
|
||||||
// For now, duplicate functions are just removed,
|
|
||||||
// However in the future it might be worth exposing these separate requirements somehow.
|
|
||||||
.instance => {
|
.instance => {
|
||||||
var duplicate = false;
|
try instance_commands.append(command_name);
|
||||||
for(instance_commands.items) |cmd| {
|
|
||||||
if(std.mem.eql(u8, cmd, command_name)) {
|
|
||||||
duplicate = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!duplicate) try instance_commands.append(command_name);
|
|
||||||
},
|
},
|
||||||
.device => {
|
.device => {
|
||||||
var duplicate = false;
|
try device_commands.append(command_name);
|
||||||
for(device_commands.items) |cmd| {
|
|
||||||
if(std.mem.eql(u8, cmd, command_name)) {
|
|
||||||
duplicate = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!duplicate) try device_commands.append(command_name);
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user