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.DirectWrite.json",
|
||||||
"Graphics.Direct2D.json",
|
"Graphics.Direct2D.json",
|
||||||
"Graphics.Imaging.D2D.json",
|
"Graphics.Imaging.D2D.json",
|
||||||
|
|
||||||
|
// Media
|
||||||
|
//"Media.Audio.json",
|
||||||
|
//"Media.Audio.XAudio2.json",
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly Dictionary<string, string> s_csNameMappings = new()
|
private static readonly Dictionary<string, string> s_csNameMappings = new()
|
||||||
@@ -1665,6 +1669,15 @@ public static class Program
|
|||||||
}
|
}
|
||||||
|
|
||||||
writer.WriteLine($"{enumValueName} = {enumItem.Value},");
|
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,");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,8 @@ public enum CompileFlags : uint
|
|||||||
OptimizationLevel0 = 16384,
|
OptimizationLevel0 = 16384,
|
||||||
/// <unmanaged>D3DCOMPILE_OPTIMIZATION_LEVEL1</unmanaged>
|
/// <unmanaged>D3DCOMPILE_OPTIMIZATION_LEVEL1</unmanaged>
|
||||||
OptimizationLevel1 = 0,
|
OptimizationLevel1 = 0,
|
||||||
|
/// <unmanaged>D3DCOMPILE_OPTIMIZATION_LEVEL2</unmanaged>
|
||||||
|
OptimizationLevel2 = 49152,
|
||||||
/// <unmanaged>D3DCOMPILE_OPTIMIZATION_LEVEL3</unmanaged>
|
/// <unmanaged>D3DCOMPILE_OPTIMIZATION_LEVEL3</unmanaged>
|
||||||
OptimizationLevel3 = 32768,
|
OptimizationLevel3 = 32768,
|
||||||
/// <unmanaged>D3DCOMPILE_RESERVED16</unmanaged>
|
/// <unmanaged>D3DCOMPILE_RESERVED16</unmanaged>
|
||||||
|
|||||||
Reference in New Issue
Block a user