mirror of
https://github.com/amerkoleci/Vortice.Win32.git
synced 2026-01-14 16:16:04 +08:00
FIX OptimizationLevel2 generation.
This commit is contained in:
@@ -28,6 +28,10 @@ public static class Program
|
||||
"Graphics.DirectWrite.json",
|
||||
"Graphics.Direct2D.json",
|
||||
"Graphics.Imaging.D2D.json",
|
||||
|
||||
// Media
|
||||
//"Media.Audio.json",
|
||||
//"Media.Audio.XAudio2.json",
|
||||
};
|
||||
|
||||
private static readonly Dictionary<string, string> s_csNameMappings = new()
|
||||
@@ -1665,6 +1669,15 @@ public static class Program
|
||||
}
|
||||
|
||||
writer.WriteLine($"{enumValueName} = {enumItem.Value},");
|
||||
|
||||
// We need to manually add D3DCOMPILE_OPTIMIZATION_LEVEL2
|
||||
if (autoGenerated &&
|
||||
enumType.Name == "D3DCOMPILE" &&
|
||||
enumValueName == "OptimizationLevel1")
|
||||
{
|
||||
writer.WriteLine("/// <unmanaged>D3DCOMPILE_OPTIMIZATION_LEVEL2</unmanaged>");
|
||||
writer.WriteLine($"OptimizationLevel2 = 49152,");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user