This commit is contained in:
2026-05-29 18:01:29 +02:00
parent 8af4d8be84
commit 66d930e7eb
3 changed files with 455 additions and 443 deletions

View File

@@ -138,8 +138,7 @@ static class Metadata
strBuffer.Clear();
var iter = sig.sig.Split(' ');
StringView type = iter.GetNext();
bool string = false;
if (type == "String") { type = "StringView"; string = true; }
if (type == "String") type = "StringView";
StringView name = iter.GetNext();
strBuffer.Append("""
@@ -150,7 +149,6 @@ static class Metadata
Self output = 0;
""");
if (string) strBuffer.Append("\t\tint hash = val.GetHashCode();\n");
for (let kv in this)
{
if (kv.value.predicate != null && *kv.value.predicate != .AlreadyWritten)
@@ -158,8 +156,6 @@ static class Metadata
let val = kv.value.underlying.[Friend]mVal[@sig.Index];
if (val == null) continue;
strBuffer.Append("\t\tif (");
if (string)
strBuffer.AppendF($"hash == {val.GetHashCode()} && ");
strBuffer.Append("val == ", val, ") output = ", kv.key, ";\n");
}
strBuffer.Append("""
@@ -1834,6 +1830,13 @@ class Program
""");
LoadFunc("vkGetInstanceProcAddr", "instance", .Instance);
LoadFunc("vkGetInstanceProcAddr", "instance", .Device);
writer.Write("""
}
public void PromoteInstanceFunctions(VulkanApiVersion apiVersion)
{
""");
writer.Write("""
}
}