update codegen

This commit is contained in:
Matthew 2025-08-16 08:55:25 +10:00
parent 169b2bf98c
commit 8075575a05

View File

@ -12,21 +12,21 @@ void main(string[] argv)
string p = __FILE__.absolutePath;
string codegen_name = chomp(p, baseName(p)) ~ "vulkan_shader.d";
writefln("%s %s", p, codegen_name);
auto f = File(codegen_name);
auto f = File(codegen_name, "w");
f.writeln("const u8[] CONVERT_SHADER_BYTES = [");
f.write("const u8[] CONVERT_SHADER_BYTES = [");
foreach(i, b; shader_bytes)
{
if (i % 50 == 0)
{
f.writefln("");
f.write("\n\t");
}
f.write("%d, ", b);
}
f.writeln("];");
f.writeln("\n];");
f.close();
}