From d4e1960c9c411ad3e7c4db928491a380107012dd Mon Sep 17 00:00:00 2001 From: Amer Koleci Date: Thu, 1 Sep 2022 14:52:52 +0200 Subject: [PATCH] More generation and WIP DXGI generation. --- src/Generator/CodeWriter.cs | 4 + src/Generator/Program.cs | 76 +- .../Generated/Graphics/Dxgi.Common.cs | 8 +- src/Vortice.Win32/Generated/Graphics/Dxgi.cs | 1441 +++++++++++++++++ src/Vortice.Win32/LargeInterger.cs | 72 + src/Vortice.Win32/Luid.cs | 91 ++ src/Vortice.Win32/NetStandard.cs | 39 + src/Vortice.Win32/RawRect.cs | 63 + 8 files changed, 1776 insertions(+), 18 deletions(-) create mode 100644 src/Vortice.Win32/Generated/Graphics/Dxgi.cs create mode 100644 src/Vortice.Win32/LargeInterger.cs create mode 100644 src/Vortice.Win32/Luid.cs create mode 100644 src/Vortice.Win32/NetStandard.cs create mode 100644 src/Vortice.Win32/RawRect.cs diff --git a/src/Generator/CodeWriter.cs b/src/Generator/CodeWriter.cs index d04b57d..1b335f6 100644 --- a/src/Generator/CodeWriter.cs +++ b/src/Generator/CodeWriter.cs @@ -42,7 +42,11 @@ public sealed class CodeWriter : IDisposable { _writer.WriteLine($"using {usingNamespace};"); } + _writer.WriteLine(); + _writer.WriteLine("#if NETSTANDARD2_0"); + _writer.WriteLine("using MemoryMarshal = Win32.MemoryMarshal;"); + _writer.WriteLine("#endif"); _writer.WriteLine(); _writer.WriteLine($"namespace {ns};"); diff --git a/src/Generator/Program.cs b/src/Generator/Program.cs index 0229914..f07a502 100644 --- a/src/Generator/Program.cs +++ b/src/Generator/Program.cs @@ -10,7 +10,8 @@ public static class Program { private static readonly string[] jsons = new[] { - "Graphics.Dxgi.Common.json" + "Graphics.Dxgi.Common.json", + "Graphics.Dxgi.json" }; private static readonly Dictionary s_csNameMappings = new() @@ -29,12 +30,26 @@ public static class Program {"Single", "float" }, {"Double", "double" }, + {"IntPtr", "nint" }, + {"UIntPtr", "nuint" }, + { "Foundation.BOOL", "Bool32" }, + { "Foundation.HRESULT", "HResult" }, + { "Foundation.LUID", "Luid" }, + { "Foundation.LARGE_INTEGER", "LargeInterger" }, + + // TODO: Understand those -> + { "Foundation.HWND", "IntPtr" }, + { "Foundation.HANDLE", "IntPtr" }, + { "Foundation.POINT", "System.Drawing.Point" }, + { "Foundation.RECT", "RawRect" }, + { "Graphics.Gdi.HMONITOR", "IntPtr" }, }; private static readonly Dictionary s_knownTypesPrefixes = new() { { "DXGI_COLOR_SPACE_TYPE", "DXGI_COLOR_SPACE" }, + { "DXGI_COMPUTE_PREEMPTION_GRANULARITY", "DXGI_COMPUTE_PREEMPTION" }, }; private static readonly Dictionary s_knownEnumValueNames = new() @@ -122,8 +137,19 @@ public static class Program if (ShouldSkipConstant(constant)) continue; - string typeName = GetTypeName(constant.ValueType); - writer.WriteLine($"public const {typeName} {constant.Name} = {constant.Value};"); + string typeName = GetTypeName(constant.Type); + if (typeName == "Guid") + { + writer.WriteLine($"public static readonly Guid {constant.Name} = {FormatGuid(constant.Value.ToString())};"); + } + else if (typeName == "HResult") + { + writer.WriteLine($"public static readonly HResult {constant.Name} = {constant.Value};"); + } + else + { + writer.WriteLine($"public const {typeName} {constant.Name} = {constant.Value};"); + } } } writer.WriteLine(); @@ -150,16 +176,16 @@ public static class Program private static void GenerateEnum(CodeWriter writer, ApiType enumType) { - if (enumType.Flags) - { - writer.WriteLine("[Flags]"); - } - string csTypeName = GetDataTypeName(enumType.Name, out string enumPrefix); string baseTypeName = GetTypeName(enumType.IntegerBase); AddCsMapping(writer.Api, enumType.Name, csTypeName); writer.WriteLine($"/// {enumType.Name}"); + + if (enumType.Flags) + { + writer.WriteLine("[Flags]"); + } using (writer.PushBlock($"public enum {csTypeName} : {baseTypeName}")) { foreach (ApiEnumValue value in enumType.Values) @@ -237,19 +263,21 @@ public static class Program writer.WriteLine("[MethodImpl(MethodImplOptions.AggressiveInlining)]"); using (writer.PushBlock($"public Span<{fieldTypeName}> AsSpan()")) { - writer.WriteUndindented("#if NET6_0_OR_GREATER"); writer.WriteLine($"return MemoryMarshal.CreateSpan(ref e0, {field.Type.Shape.Size});"); - writer.WriteUndindented("#else"); - writer.WriteLine($"return new(Unsafe.AsPointer(ref e0), {field.Type.Shape.Size});"); - writer.WriteUndindented("#endif"); } } } } else { + string unsafePrefix = string.Empty; fieldTypeName = NormalizeTypeName(writer.Api, fieldTypeName); - writer.WriteLine($"public {fieldTypeName} {fieldValueName};"); + if(fieldTypeName.EndsWith("*")) + { + unsafePrefix += "unsafe "; + } + + writer.WriteLine($"public {unsafePrefix}{fieldTypeName} {fieldValueName};"); } } } @@ -434,6 +462,26 @@ public static class Program return (char.IsNumber(prettyName[0])) ? "_" + prettyName : prettyName; } + private static string FormatGuid(string value) + { + var guid = Guid.Parse(value).ToString("N"); + + var a = "0x" + guid.Substring(0, 8); + var b = "0x" + guid.Substring(8, 4); + var c = "0x" + guid.Substring(12, 4); + var d = "0x" + guid.Substring(16, 2); + var e = "0x" + guid.Substring(18, 2); + var f = "0x" + guid.Substring(20, 2); + var g = "0x" + guid.Substring(22, 2); + var h = "0x" + guid.Substring(24, 2); + var i = "0x" + guid.Substring(26, 2); + var j = "0x" + guid.Substring(28, 2); + var k = "0x" + guid.Substring(30, 2); + + return $"new Guid({a}, {b}, {c}, {d}, {e}, {f}, {g}, {h}, {i}, {j}, {k})"; + } + + private static string GetTypeName(ApiDataType dataType) { if (dataType.Kind == "ApiRef") @@ -446,7 +494,7 @@ public static class Program } else if (dataType.Kind == "PointerTo") { - throw new NotImplementedException(); + return GetTypeName(dataType.Child) + "*"; } return GetTypeName(dataType.Name); diff --git a/src/Vortice.Win32/Generated/Graphics/Dxgi.Common.cs b/src/Vortice.Win32/Generated/Graphics/Dxgi.Common.cs index 36e4489..3087010 100644 --- a/src/Vortice.Win32/Generated/Graphics/Dxgi.Common.cs +++ b/src/Vortice.Win32/Generated/Graphics/Dxgi.Common.cs @@ -11,6 +11,10 @@ using System; using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +#if NETSTANDARD2_0 +using MemoryMarshal = Win32.MemoryMarshal; +#endif + namespace Win32.Graphics.Dxgi.Common; public static partial class Apis @@ -1456,11 +1460,7 @@ public partial struct GammaControl [MethodImpl(MethodImplOptions.AggressiveInlining)] public Span AsSpan() { -#if NET6_0_OR_GREATER return MemoryMarshal.CreateSpan(ref e0, 1025); -#else - return new(Unsafe.AsPointer(ref e0), 1025); -#endif } } } diff --git a/src/Vortice.Win32/Generated/Graphics/Dxgi.cs b/src/Vortice.Win32/Generated/Graphics/Dxgi.cs new file mode 100644 index 0000000..448a0fd --- /dev/null +++ b/src/Vortice.Win32/Generated/Graphics/Dxgi.cs @@ -0,0 +1,1441 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +using System; +using System.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; + +#if NETSTANDARD2_0 +using MemoryMarshal = Win32.MemoryMarshal; +#endif + +namespace Win32.Graphics.Dxgi; + +public static partial class Apis +{ + public const uint DXGI_USAGE_SHADER_INPUT = 16; + public const uint DXGI_USAGE_RENDER_TARGET_OUTPUT = 32; + public const uint DXGI_USAGE_BACK_BUFFER = 64; + public const uint DXGI_USAGE_SHARED = 128; + public const uint DXGI_USAGE_READ_ONLY = 256; + public const uint DXGI_USAGE_DISCARD_ON_PRESENT = 512; + public const uint DXGI_USAGE_UNORDERED_ACCESS = 1024; + public const uint DXGI_MAP_READ = 1; + public const uint DXGI_MAP_WRITE = 2; + public const uint DXGI_MAP_DISCARD = 4; + public const uint DXGI_ENUM_MODES_INTERLACED = 1; + public const uint DXGI_ENUM_MODES_SCALING = 2; + public const uint DXGI_MAX_SWAP_CHAIN_BUFFERS = 16; + public const uint DXGI_PRESENT_TEST = 1; + public const uint DXGI_PRESENT_DO_NOT_SEQUENCE = 2; + public const uint DXGI_PRESENT_RESTART = 4; + public const uint DXGI_PRESENT_DO_NOT_WAIT = 8; + public const uint DXGI_PRESENT_STEREO_PREFER_RIGHT = 16; + public const uint DXGI_PRESENT_STEREO_TEMPORARY_MONO = 32; + public const uint DXGI_PRESENT_RESTRICT_TO_OUTPUT = 64; + public const uint DXGI_PRESENT_USE_DURATION = 256; + public const uint DXGI_PRESENT_ALLOW_TEARING = 512; + public const uint DXGI_MWA_NO_WINDOW_CHANGES = 1; + public const uint DXGI_MWA_NO_ALT_ENTER = 2; + public const uint DXGI_MWA_NO_PRINT_SCREEN = 4; + public const uint DXGI_MWA_VALID = 7; + public const uint DXGI_ENUM_MODES_STEREO = 4; + public const uint DXGI_ENUM_MODES_DISABLED_STEREO = 8; + public const uint DXGI_SHARED_RESOURCE_READ = 2147483648; + public const uint DXGI_SHARED_RESOURCE_WRITE = 1; + public const uint DXGI_DEBUG_BINARY_VERSION = 1; + public static readonly Guid DXGI_DEBUG_ALL = new Guid(0xe48ae283, 0xda80, 0x490b, 0x87, 0xe6, 0x43, 0xe9, 0xa9, 0xcf, 0xda, 0x08); + public static readonly Guid DXGI_DEBUG_DX = new Guid(0x35cdd7fc, 0x13b2, 0x421d, 0xa5, 0xd7, 0x7e, 0x44, 0x51, 0x28, 0x7d, 0x64); + public static readonly Guid DXGI_DEBUG_DXGI = new Guid(0x25cddaa4, 0xb1c6, 0x47e1, 0xac, 0x3e, 0x98, 0x87, 0x5b, 0x5a, 0x2e, 0x2a); + public static readonly Guid DXGI_DEBUG_APP = new Guid(0x06cd6e01, 0x4219, 0x4ebd, 0x87, 0x09, 0x27, 0xed, 0x23, 0x36, 0x0c, 0x62); + public const uint DXGI_INFO_QUEUE_MESSAGE_ID_STRING_FROM_APPLICATION = 0; + public const uint DXGI_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT = 1024; + public const uint DXGI_CREATE_FACTORY_DEBUG = 1; + public static readonly HResult DXGI_ERROR_INVALID_CALL = -2005270527; + public static readonly HResult DXGI_ERROR_NOT_FOUND = -2005270526; + public static readonly HResult DXGI_ERROR_MORE_DATA = -2005270525; + public static readonly HResult DXGI_ERROR_UNSUPPORTED = -2005270524; + public static readonly HResult DXGI_ERROR_DEVICE_REMOVED = -2005270523; + public static readonly HResult DXGI_ERROR_DEVICE_HUNG = -2005270522; + public static readonly HResult DXGI_ERROR_DEVICE_RESET = -2005270521; + public static readonly HResult DXGI_ERROR_WAS_STILL_DRAWING = -2005270518; + public static readonly HResult DXGI_ERROR_FRAME_STATISTICS_DISJOINT = -2005270517; + public static readonly HResult DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE = -2005270516; + public static readonly HResult DXGI_ERROR_DRIVER_INTERNAL_ERROR = -2005270496; + public static readonly HResult DXGI_ERROR_NONEXCLUSIVE = -2005270495; + public static readonly HResult DXGI_ERROR_NOT_CURRENTLY_AVAILABLE = -2005270494; + public static readonly HResult DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED = -2005270493; + public static readonly HResult DXGI_ERROR_REMOTE_OUTOFMEMORY = -2005270492; + public static readonly HResult DXGI_ERROR_ACCESS_LOST = -2005270490; + public static readonly HResult DXGI_ERROR_WAIT_TIMEOUT = -2005270489; + public static readonly HResult DXGI_ERROR_SESSION_DISCONNECTED = -2005270488; + public static readonly HResult DXGI_ERROR_RESTRICT_TO_OUTPUT_STALE = -2005270487; + public static readonly HResult DXGI_ERROR_CANNOT_PROTECT_CONTENT = -2005270486; + public static readonly HResult DXGI_ERROR_ACCESS_DENIED = -2005270485; + public static readonly HResult DXGI_ERROR_NAME_ALREADY_EXISTS = -2005270484; + public static readonly HResult DXGI_ERROR_SDK_COMPONENT_MISSING = -2005270483; + public static readonly HResult DXGI_ERROR_NOT_CURRENT = -2005270482; + public static readonly HResult DXGI_ERROR_HW_PROTECTION_OUTOFMEMORY = -2005270480; + public static readonly HResult DXGI_ERROR_DYNAMIC_CODE_POLICY_VIOLATION = -2005270479; + public static readonly HResult DXGI_ERROR_NON_COMPOSITED_UI = -2005270478; + public static readonly HResult DXGI_ERROR_MODE_CHANGE_IN_PROGRESS = -2005270491; + public static readonly HResult DXGI_ERROR_CACHE_CORRUPT = -2005270477; + public static readonly HResult DXGI_ERROR_CACHE_FULL = -2005270476; + public static readonly HResult DXGI_ERROR_CACHE_HASH_COLLISION = -2005270475; + public static readonly HResult DXGI_ERROR_ALREADY_EXISTS = -2005270474; +} + +#region Enums +/// DXGI_RESOURCE_PRIORITY +public enum ResourcePriority : uint +{ + /// DXGI_RESOURCE_PRIORITY_MINIMUM + Minimum = 671088640, + /// DXGI_RESOURCE_PRIORITY_LOW + Low = 1342177280, + /// DXGI_RESOURCE_PRIORITY_NORMAL + Normal = 2013265920, + /// DXGI_RESOURCE_PRIORITY_HIGH + High = 2684354560, + /// DXGI_RESOURCE_PRIORITY_MAXIMUM + Maximum = 3355443200, +} + +/// DXGI_RESIDENCY +public enum Residency : int +{ + /// DXGI_RESIDENCY_FULLY_RESIDENT + FullyResident = 1, + /// DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY + ResidentInSharedMemory = 2, + /// DXGI_RESIDENCY_EVICTED_TO_DISK + EvictedToDisk = 3, +} + +/// DXGI_SWAP_EFFECT +public enum SwapEffect : int +{ + /// DXGI_SWAP_EFFECT_DISCARD + Discard = 0, + /// DXGI_SWAP_EFFECT_SEQUENTIAL + Sequential = 1, + /// DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL + FlipSequential = 3, + /// DXGI_SWAP_EFFECT_FLIP_DISCARD + FlipDiscard = 4, +} + +/// DXGI_SWAP_CHAIN_FLAG +public enum SwapChainFlag : int +{ + /// DXGI_SWAP_CHAIN_FLAG_NONPREROTATED + Nonprerotated = 1, + /// DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH + AllowModeSwitch = 2, + /// DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE + GdiCompatible = 4, + /// DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT + RestrictedContent = 8, + /// DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER + RestrictSharedResourceDriver = 16, + /// DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY + DisplayOnly = 32, + /// DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT + FrameLatencyWaitableObject = 64, + /// DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER + ForegroundLayer = 128, + /// DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO + FullscreenVideo = 256, + /// DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO + YuvVideo = 512, + /// DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED + HwProtected = 1024, + /// DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING + AllowTearing = 2048, + /// DXGI_SWAP_CHAIN_FLAG_RESTRICTED_TO_ALL_HOLOGRAPHIC_DISPLAYS + RestrictedToAllHolographicDisplays = 4096, +} + +/// DXGI_ADAPTER_FLAG +[Flags] +public enum AdapterFlag : uint +{ + /// DXGI_ADAPTER_FLAG_NONE + None = 0, + /// DXGI_ADAPTER_FLAG_REMOTE + Remote = 1, + /// DXGI_ADAPTER_FLAG_SOFTWARE + Software = 2, +} + +/// DXGI_OUTDUPL_POINTER_SHAPE_TYPE +public enum OutduplPointerShapeType : int +{ + /// DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME + Monochrome = 1, + /// DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR + Color = 2, + /// DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR + MaskedColor = 4, +} + +/// DXGI_OFFER_RESOURCE_PRIORITY +public enum OfferResourcePriority : int +{ + /// DXGI_OFFER_RESOURCE_PRIORITY_LOW + Low = 1, + /// DXGI_OFFER_RESOURCE_PRIORITY_NORMAL + Normal = 2, + /// DXGI_OFFER_RESOURCE_PRIORITY_HIGH + High = 3, +} + +/// DXGI_SCALING +public enum Scaling : int +{ + /// DXGI_SCALING_STRETCH + Stretch = 0, + /// DXGI_SCALING_NONE + None = 1, + /// DXGI_SCALING_ASPECT_RATIO_STRETCH + AspectRatioStretch = 2, +} + +/// DXGI_GRAPHICS_PREEMPTION_GRANULARITY +public enum GraphicsPreemptionGranularity : int +{ + /// DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY + DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY = 0, + /// DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY + DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY = 1, + /// DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY + DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY = 2, + /// DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY + DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY = 3, + /// DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY + DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY = 4, +} + +/// DXGI_COMPUTE_PREEMPTION_GRANULARITY +public enum ComputePreemptionGranularity : int +{ + /// DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY + DmaBufferBoundary = 0, + /// DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY + DispatchBoundary = 1, + /// DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY + ThreadGroupBoundary = 2, + /// DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY + ThreadBoundary = 3, + /// DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY + InstructionBoundary = 4, +} + +/// DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS +public enum MultiplaneOverlayYcbcrFlags : int +{ + /// DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE = 1, + /// DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 = 2, + /// DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC = 4, +} + +/// DXGI_FRAME_PRESENTATION_MODE +public enum FramePresentationMode : int +{ + /// DXGI_FRAME_PRESENTATION_MODE_COMPOSED + Composed = 0, + /// DXGI_FRAME_PRESENTATION_MODE_OVERLAY + Overlay = 1, + /// DXGI_FRAME_PRESENTATION_MODE_NONE + None = 2, + /// DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE + CompositionFailure = 3, +} + +/// DXGI_OVERLAY_SUPPORT_FLAG +public enum OverlaySupportFlag : int +{ + /// DXGI_OVERLAY_SUPPORT_FLAG_DIRECT + Direct = 1, + /// DXGI_OVERLAY_SUPPORT_FLAG_SCALING + Scaling = 2, +} + +/// DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG +public enum SwapChainColorSpaceSupportFlag : int +{ + /// DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT + Present = 1, + /// DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT + OverlayPresent = 2, +} + +/// DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG +public enum OverlayColorSpaceSupportFlag : int +{ + /// DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT + Present = 1, +} + +/// DXGI_MEMORY_SEGMENT_GROUP +public enum MemorySegmentGroup : int +{ + /// DXGI_MEMORY_SEGMENT_GROUP_LOCAL + Local = 0, + /// DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL + NonLocal = 1, +} + +/// DXGI_OUTDUPL_FLAG +public enum OutduplFlag : int +{ + /// DXGI_OUTDUPL_COMPOSITED_UI_CAPTURE_ONLY + DXGI_OUTDUPL_COMPOSITED_UI_CAPTURE_ONLY = 1, +} + +/// DXGI_HDR_METADATA_TYPE +public enum HdrMetadataType : int +{ + /// DXGI_HDR_METADATA_TYPE_NONE + None = 0, + /// DXGI_HDR_METADATA_TYPE_HDR10 + Hdr10 = 1, + /// DXGI_HDR_METADATA_TYPE_HDR10PLUS + Hdr10plus = 2, +} + +/// DXGI_OFFER_RESOURCE_FLAGS +public enum OfferResourceFlags : int +{ + /// DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT + DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT = 1, +} + +/// DXGI_RECLAIM_RESOURCE_RESULTS +public enum ReclaimResourceResults : int +{ + /// DXGI_RECLAIM_RESOURCE_RESULT_OK + DXGI_RECLAIM_RESOURCE_RESULT_OK = 0, + /// DXGI_RECLAIM_RESOURCE_RESULT_DISCARDED + DXGI_RECLAIM_RESOURCE_RESULT_DISCARDED = 1, + /// DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED + DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED = 2, +} + +/// DXGI_FEATURE +public enum Feature : int +{ + /// DXGI_FEATURE_PRESENT_ALLOW_TEARING + PresentAllowTearing = 0, +} + +/// DXGI_ADAPTER_FLAG3 +[Flags] +public enum AdapterFlag3 : uint +{ + /// DXGI_ADAPTER_FLAG3_NONE + None = 0, + /// DXGI_ADAPTER_FLAG3_REMOTE + Remote = 1, + /// DXGI_ADAPTER_FLAG3_SOFTWARE + Software = 2, + /// DXGI_ADAPTER_FLAG3_ACG_COMPATIBLE + AcgCompatible = 4, + /// DXGI_ADAPTER_FLAG3_SUPPORT_MONITORED_FENCES + SupportMonitoredFences = 8, + /// DXGI_ADAPTER_FLAG3_SUPPORT_NON_MONITORED_FENCES + SupportNonMonitoredFences = 16, + /// DXGI_ADAPTER_FLAG3_KEYED_MUTEX_CONFORMANCE + KeyedMutexConformance = 32, +} + +/// DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS +[Flags] +public enum HardwareCompositionSupportFlags : uint +{ + /// DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_FULLSCREEN + DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_FULLSCREEN = 1, + /// DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_WINDOWED + DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_WINDOWED = 2, + /// DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_CURSOR_STRETCHED + DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_CURSOR_STRETCHED = 4, +} + +/// DXGI_GPU_PREFERENCE +public enum GpuPreference : int +{ + /// DXGI_GPU_PREFERENCE_UNSPECIFIED + Unspecified = 0, + /// DXGI_GPU_PREFERENCE_MINIMUM_POWER + MinimumPower = 1, + /// DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE + HighPerformance = 2, +} + +/// DXGI_DEBUG_RLO_FLAGS +[Flags] +public enum DebugRloFlags : uint +{ + /// DXGI_DEBUG_RLO_SUMMARY + DXGI_DEBUG_RLO_SUMMARY = 1, + /// DXGI_DEBUG_RLO_DETAIL + DXGI_DEBUG_RLO_DETAIL = 2, + /// DXGI_DEBUG_RLO_IGNORE_INTERNAL + DXGI_DEBUG_RLO_IGNORE_INTERNAL = 4, + /// DXGI_DEBUG_RLO_ALL + DXGI_DEBUG_RLO_ALL = 7, +} + +/// DXGI_INFO_QUEUE_MESSAGE_CATEGORY +public enum InfoQueueMessageCategory : int +{ + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_UNKNOWN + Unknown = 0, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_MISCELLANEOUS + Miscellaneous = 1, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_INITIALIZATION + Initialization = 2, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_CLEANUP + Cleanup = 3, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_COMPILATION + Compilation = 4, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_CREATION + StateCreation = 5, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_SETTING + StateSetting = 6, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_STATE_GETTING + StateGetting = 7, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_RESOURCE_MANIPULATION + ResourceManipulation = 8, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_EXECUTION + Execution = 9, + /// DXGI_INFO_QUEUE_MESSAGE_CATEGORY_SHADER + Shader = 10, +} + +/// DXGI_INFO_QUEUE_MESSAGE_SEVERITY +public enum InfoQueueMessageSeverity : int +{ + /// DXGI_INFO_QUEUE_MESSAGE_SEVERITY_CORRUPTION + Corruption = 0, + /// DXGI_INFO_QUEUE_MESSAGE_SEVERITY_ERROR + Error = 1, + /// DXGI_INFO_QUEUE_MESSAGE_SEVERITY_WARNING + Warning = 2, + /// DXGI_INFO_QUEUE_MESSAGE_SEVERITY_INFO + Info = 3, + /// DXGI_INFO_QUEUE_MESSAGE_SEVERITY_MESSAGE + Message = 4, +} + +/// DXGI_Message_Id +public enum MessageId : int +{ + /// DXGI_MSG_IDXGISwapChain_CreationOrResizeBuffers_InvalidOutputWindow + DXGI_MSG_IDXGISwapChain_CreationOrResizeBuffers_InvalidOutputWindow = 0, + /// DXGI_MSG_IDXGISwapChain_CreationOrResizeBuffers_BufferWidthInferred + DXGI_MSG_IDXGISwapChain_CreationOrResizeBuffers_BufferWidthInferred = 1, + /// DXGI_MSG_IDXGISwapChain_CreationOrResizeBuffers_BufferHeightInferred + DXGI_MSG_IDXGISwapChain_CreationOrResizeBuffers_BufferHeightInferred = 2, + /// DXGI_MSG_IDXGISwapChain_CreationOrResizeBuffers_NoScanoutFlagChanged + DXGI_MSG_IDXGISwapChain_CreationOrResizeBuffers_NoScanoutFlagChanged = 3, + /// DXGI_MSG_IDXGISwapChain_Creation_MaxBufferCountExceeded + DXGI_MSG_IDXGISwapChain_Creation_MaxBufferCountExceeded = 4, + /// DXGI_MSG_IDXGISwapChain_Creation_TooFewBuffers + DXGI_MSG_IDXGISwapChain_Creation_TooFewBuffers = 5, + /// DXGI_MSG_IDXGISwapChain_Creation_NoOutputWindow + DXGI_MSG_IDXGISwapChain_Creation_NoOutputWindow = 6, + /// DXGI_MSG_IDXGISwapChain_Destruction_OtherMethodsCalled + DXGI_MSG_IDXGISwapChain_Destruction_OtherMethodsCalled = 7, + /// DXGI_MSG_IDXGISwapChain_GetDesc_pDescIsNULL + DXGI_MSG_IDXGISwapChain_GetDesc_pDescIsNULL = 8, + /// DXGI_MSG_IDXGISwapChain_GetBuffer_ppSurfaceIsNULL + DXGI_MSG_IDXGISwapChain_GetBuffer_ppSurfaceIsNULL = 9, + /// DXGI_MSG_IDXGISwapChain_GetBuffer_NoAllocatedBuffers + DXGI_MSG_IDXGISwapChain_GetBuffer_NoAllocatedBuffers = 10, + /// DXGI_MSG_IDXGISwapChain_GetBuffer_iBufferMustBeZero + DXGI_MSG_IDXGISwapChain_GetBuffer_iBufferMustBeZero = 11, + /// DXGI_MSG_IDXGISwapChain_GetBuffer_iBufferOOB + DXGI_MSG_IDXGISwapChain_GetBuffer_iBufferOOB = 12, + /// DXGI_MSG_IDXGISwapChain_GetContainingOutput_ppOutputIsNULL + DXGI_MSG_IDXGISwapChain_GetContainingOutput_ppOutputIsNULL = 13, + /// DXGI_MSG_IDXGISwapChain_Present_SyncIntervalOOB + DXGI_MSG_IDXGISwapChain_Present_SyncIntervalOOB = 14, + /// DXGI_MSG_IDXGISwapChain_Present_InvalidNonPreRotatedFlag + DXGI_MSG_IDXGISwapChain_Present_InvalidNonPreRotatedFlag = 15, + /// DXGI_MSG_IDXGISwapChain_Present_NoAllocatedBuffers + DXGI_MSG_IDXGISwapChain_Present_NoAllocatedBuffers = 16, + /// DXGI_MSG_IDXGISwapChain_Present_GetDXGIAdapterFailed + DXGI_MSG_IDXGISwapChain_Present_GetDXGIAdapterFailed = 17, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_BufferCountOOB + DXGI_MSG_IDXGISwapChain_ResizeBuffers_BufferCountOOB = 18, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_UnreleasedReferences + DXGI_MSG_IDXGISwapChain_ResizeBuffers_UnreleasedReferences = 19, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidSwapChainFlag + DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidSwapChainFlag = 20, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidNonPreRotatedFlag + DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidNonPreRotatedFlag = 21, + /// DXGI_MSG_IDXGISwapChain_ResizeTarget_RefreshRateDivideByZero + DXGI_MSG_IDXGISwapChain_ResizeTarget_RefreshRateDivideByZero = 22, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_InvalidTarget + DXGI_MSG_IDXGISwapChain_SetFullscreenState_InvalidTarget = 23, + /// DXGI_MSG_IDXGISwapChain_GetFrameStatistics_pStatsIsNULL + DXGI_MSG_IDXGISwapChain_GetFrameStatistics_pStatsIsNULL = 24, + /// DXGI_MSG_IDXGISwapChain_GetLastPresentCount_pLastPresentCountIsNULL + DXGI_MSG_IDXGISwapChain_GetLastPresentCount_pLastPresentCountIsNULL = 25, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_RemoteNotSupported + DXGI_MSG_IDXGISwapChain_SetFullscreenState_RemoteNotSupported = 26, + /// DXGI_MSG_IDXGIOutput_TakeOwnership_FailedToAcquireFullscreenMutex + DXGI_MSG_IDXGIOutput_TakeOwnership_FailedToAcquireFullscreenMutex = 27, + /// DXGI_MSG_IDXGIFactory_CreateSoftwareAdapter_ppAdapterInterfaceIsNULL + DXGI_MSG_IDXGIFactory_CreateSoftwareAdapter_ppAdapterInterfaceIsNULL = 28, + /// DXGI_MSG_IDXGIFactory_EnumAdapters_ppAdapterInterfaceIsNULL + DXGI_MSG_IDXGIFactory_EnumAdapters_ppAdapterInterfaceIsNULL = 29, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_ppSwapChainIsNULL + DXGI_MSG_IDXGIFactory_CreateSwapChain_ppSwapChainIsNULL = 30, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_pDescIsNULL + DXGI_MSG_IDXGIFactory_CreateSwapChain_pDescIsNULL = 31, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_UnknownSwapEffect + DXGI_MSG_IDXGIFactory_CreateSwapChain_UnknownSwapEffect = 32, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidFlags + DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidFlags = 33, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_NonPreRotatedFlagAndWindowed + DXGI_MSG_IDXGIFactory_CreateSwapChain_NonPreRotatedFlagAndWindowed = 34, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_NullDeviceInterface + DXGI_MSG_IDXGIFactory_CreateSwapChain_NullDeviceInterface = 35, + /// DXGI_MSG_IDXGIFactory_GetWindowAssociation_phWndIsNULL + DXGI_MSG_IDXGIFactory_GetWindowAssociation_phWndIsNULL = 36, + /// DXGI_MSG_IDXGIFactory_MakeWindowAssociation_InvalidFlags + DXGI_MSG_IDXGIFactory_MakeWindowAssociation_InvalidFlags = 37, + /// DXGI_MSG_IDXGISurface_Map_InvalidSurface + DXGI_MSG_IDXGISurface_Map_InvalidSurface = 38, + /// DXGI_MSG_IDXGISurface_Map_FlagsSetToZero + DXGI_MSG_IDXGISurface_Map_FlagsSetToZero = 39, + /// DXGI_MSG_IDXGISurface_Map_DiscardAndReadFlagSet + DXGI_MSG_IDXGISurface_Map_DiscardAndReadFlagSet = 40, + /// DXGI_MSG_IDXGISurface_Map_DiscardButNotWriteFlagSet + DXGI_MSG_IDXGISurface_Map_DiscardButNotWriteFlagSet = 41, + /// DXGI_MSG_IDXGISurface_Map_NoCPUAccess + DXGI_MSG_IDXGISurface_Map_NoCPUAccess = 42, + /// DXGI_MSG_IDXGISurface_Map_ReadFlagSetButCPUAccessIsDynamic + DXGI_MSG_IDXGISurface_Map_ReadFlagSetButCPUAccessIsDynamic = 43, + /// DXGI_MSG_IDXGISurface_Map_DiscardFlagSetButCPUAccessIsNotDynamic + DXGI_MSG_IDXGISurface_Map_DiscardFlagSetButCPUAccessIsNotDynamic = 44, + /// DXGI_MSG_IDXGIOutput_GetDisplayModeList_pNumModesIsNULL + DXGI_MSG_IDXGIOutput_GetDisplayModeList_pNumModesIsNULL = 45, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_ModeHasInvalidWidthOrHeight + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_ModeHasInvalidWidthOrHeight = 46, + /// DXGI_MSG_IDXGIOutput_GetCammaControlCapabilities_NoOwnerDevice + DXGI_MSG_IDXGIOutput_GetCammaControlCapabilities_NoOwnerDevice = 47, + /// DXGI_MSG_IDXGIOutput_TakeOwnership_pDeviceIsNULL + DXGI_MSG_IDXGIOutput_TakeOwnership_pDeviceIsNULL = 48, + /// DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_NoOwnerDevice + DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_NoOwnerDevice = 49, + /// DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_pDestinationIsNULL + DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_pDestinationIsNULL = 50, + /// DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_MapOfDestinationFailed + DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_MapOfDestinationFailed = 51, + /// DXGI_MSG_IDXGIOutput_GetFrameStatistics_NoOwnerDevice + DXGI_MSG_IDXGIOutput_GetFrameStatistics_NoOwnerDevice = 52, + /// DXGI_MSG_IDXGIOutput_GetFrameStatistics_pStatsIsNULL + DXGI_MSG_IDXGIOutput_GetFrameStatistics_pStatsIsNULL = 53, + /// DXGI_MSG_IDXGIOutput_SetGammaControl_NoOwnerDevice + DXGI_MSG_IDXGIOutput_SetGammaControl_NoOwnerDevice = 54, + /// DXGI_MSG_IDXGIOutput_GetGammaControl_NoOwnerDevice + DXGI_MSG_IDXGIOutput_GetGammaControl_NoOwnerDevice = 55, + /// DXGI_MSG_IDXGIOutput_GetGammaControl_NoGammaControls + DXGI_MSG_IDXGIOutput_GetGammaControl_NoGammaControls = 56, + /// DXGI_MSG_IDXGIOutput_SetDisplaySurface_IDXGIResourceNotSupportedBypPrimary + DXGI_MSG_IDXGIOutput_SetDisplaySurface_IDXGIResourceNotSupportedBypPrimary = 57, + /// DXGI_MSG_IDXGIOutput_SetDisplaySurface_pPrimaryIsInvalid + DXGI_MSG_IDXGIOutput_SetDisplaySurface_pPrimaryIsInvalid = 58, + /// DXGI_MSG_IDXGIOutput_SetDisplaySurface_NoOwnerDevice + DXGI_MSG_IDXGIOutput_SetDisplaySurface_NoOwnerDevice = 59, + /// DXGI_MSG_IDXGIOutput_TakeOwnership_RemoteDeviceNotSupported + DXGI_MSG_IDXGIOutput_TakeOwnership_RemoteDeviceNotSupported = 60, + /// DXGI_MSG_IDXGIOutput_GetDisplayModeList_RemoteDeviceNotSupported + DXGI_MSG_IDXGIOutput_GetDisplayModeList_RemoteDeviceNotSupported = 61, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_RemoteDeviceNotSupported + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_RemoteDeviceNotSupported = 62, + /// DXGI_MSG_IDXGIDevice_CreateSurface_InvalidParametersWithpSharedResource + DXGI_MSG_IDXGIDevice_CreateSurface_InvalidParametersWithpSharedResource = 63, + /// DXGI_MSG_IDXGIObject_GetPrivateData_puiDataSizeIsNULL + DXGI_MSG_IDXGIObject_GetPrivateData_puiDataSizeIsNULL = 64, + /// DXGI_MSG_IDXGISwapChain_Creation_InvalidOutputWindow + DXGI_MSG_IDXGISwapChain_Creation_InvalidOutputWindow = 65, + /// DXGI_MSG_IDXGISwapChain_Release_SwapChainIsFullscreen + DXGI_MSG_IDXGISwapChain_Release_SwapChainIsFullscreen = 66, + /// DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_InvalidTargetSurfaceFormat + DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_InvalidTargetSurfaceFormat = 67, + /// DXGI_MSG_IDXGIFactory_CreateSoftwareAdapter_ModuleIsNULL + DXGI_MSG_IDXGIFactory_CreateSoftwareAdapter_ModuleIsNULL = 68, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_IDXGIDeviceNotSupportedBypConcernedDevice + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_IDXGIDeviceNotSupportedBypConcernedDevice = 69, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_pModeToMatchOrpClosestMatchIsNULL + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_pModeToMatchOrpClosestMatchIsNULL = 70, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_ModeHasRefreshRateDenominatorZero + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_ModeHasRefreshRateDenominatorZero = 71, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_UnknownFormatIsInvalidForConfiguration + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_UnknownFormatIsInvalidForConfiguration = 72, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_InvalidDisplayModeScanlineOrdering + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_InvalidDisplayModeScanlineOrdering = 73, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_InvalidDisplayModeScaling + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_InvalidDisplayModeScaling = 74, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_InvalidDisplayModeFormatAndDeviceCombination + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_InvalidDisplayModeFormatAndDeviceCombination = 75, + /// DXGI_MSG_IDXGIFactory_Creation_CalledFromDllMain + DXGI_MSG_IDXGIFactory_Creation_CalledFromDllMain = 76, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_OutputNotOwnedBySwapChainDevice + DXGI_MSG_IDXGISwapChain_SetFullscreenState_OutputNotOwnedBySwapChainDevice = 77, + /// DXGI_MSG_IDXGISwapChain_Creation_InvalidWindowStyle + DXGI_MSG_IDXGISwapChain_Creation_InvalidWindowStyle = 78, + /// DXGI_MSG_IDXGISwapChain_GetFrameStatistics_UnsupportedStatistics + DXGI_MSG_IDXGISwapChain_GetFrameStatistics_UnsupportedStatistics = 79, + /// DXGI_MSG_IDXGISwapChain_GetContainingOutput_SwapchainAdapterDoesNotControlOutput + DXGI_MSG_IDXGISwapChain_GetContainingOutput_SwapchainAdapterDoesNotControlOutput = 80, + /// DXGI_MSG_IDXGIOutput_SetOrGetGammaControl_pArrayIsNULL + DXGI_MSG_IDXGIOutput_SetOrGetGammaControl_pArrayIsNULL = 81, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_FullscreenInvalidForChildWindows + DXGI_MSG_IDXGISwapChain_SetFullscreenState_FullscreenInvalidForChildWindows = 82, + /// DXGI_MSG_IDXGIFactory_Release_CalledFromDllMain + DXGI_MSG_IDXGIFactory_Release_CalledFromDllMain = 83, + /// DXGI_MSG_IDXGISwapChain_Present_UnreleasedHDC + DXGI_MSG_IDXGISwapChain_Present_UnreleasedHDC = 84, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_NonPreRotatedAndGDICompatibleFlags + DXGI_MSG_IDXGISwapChain_ResizeBuffers_NonPreRotatedAndGDICompatibleFlags = 85, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_NonPreRotatedAndGDICompatibleFlags + DXGI_MSG_IDXGIFactory_CreateSwapChain_NonPreRotatedAndGDICompatibleFlags = 86, + /// DXGI_MSG_IDXGISurface1_GetDC_pHdcIsNULL + DXGI_MSG_IDXGISurface1_GetDC_pHdcIsNULL = 87, + /// DXGI_MSG_IDXGISurface1_GetDC_SurfaceNotTexture2D + DXGI_MSG_IDXGISurface1_GetDC_SurfaceNotTexture2D = 88, + /// DXGI_MSG_IDXGISurface1_GetDC_GDICompatibleFlagNotSet + DXGI_MSG_IDXGISurface1_GetDC_GDICompatibleFlagNotSet = 89, + /// DXGI_MSG_IDXGISurface1_GetDC_UnreleasedHDC + DXGI_MSG_IDXGISurface1_GetDC_UnreleasedHDC = 90, + /// DXGI_MSG_IDXGISurface_Map_NoCPUAccess2 + DXGI_MSG_IDXGISurface_Map_NoCPUAccess2 = 91, + /// DXGI_MSG_IDXGISurface1_ReleaseDC_GetDCNotCalled + DXGI_MSG_IDXGISurface1_ReleaseDC_GetDCNotCalled = 92, + /// DXGI_MSG_IDXGISurface1_ReleaseDC_InvalidRectangleDimensions + DXGI_MSG_IDXGISurface1_ReleaseDC_InvalidRectangleDimensions = 93, + /// DXGI_MSG_IDXGIOutput_TakeOwnership_RemoteOutputNotSupported + DXGI_MSG_IDXGIOutput_TakeOwnership_RemoteOutputNotSupported = 94, + /// DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_RemoteOutputNotSupported + DXGI_MSG_IDXGIOutput_FindClosestMatchingMode_RemoteOutputNotSupported = 95, + /// DXGI_MSG_IDXGIOutput_GetDisplayModeList_RemoteOutputNotSupported + DXGI_MSG_IDXGIOutput_GetDisplayModeList_RemoteOutputNotSupported = 96, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_pDeviceHasMismatchedDXGIFactory + DXGI_MSG_IDXGIFactory_CreateSwapChain_pDeviceHasMismatchedDXGIFactory = 97, + /// DXGI_MSG_IDXGISwapChain_Present_NonOptimalFSConfiguration + DXGI_MSG_IDXGISwapChain_Present_NonOptimalFSConfiguration = 98, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_FlipSequentialNotSupportedOnD3D10 + DXGI_MSG_IDXGIFactory_CreateSwapChain_FlipSequentialNotSupportedOnD3D10 = 99, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_BufferCountOOBForFlipSequential + DXGI_MSG_IDXGIFactory_CreateSwapChain_BufferCountOOBForFlipSequential = 100, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidFormatForFlipSequential + DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidFormatForFlipSequential = 101, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_MultiSamplingNotSupportedForFlipSequential + DXGI_MSG_IDXGIFactory_CreateSwapChain_MultiSamplingNotSupportedForFlipSequential = 102, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_BufferCountOOBForFlipSequential + DXGI_MSG_IDXGISwapChain_ResizeBuffers_BufferCountOOBForFlipSequential = 103, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidFormatForFlipSequential + DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidFormatForFlipSequential = 104, + /// DXGI_MSG_IDXGISwapChain_Present_PartialPresentationBeforeStandardPresentation + DXGI_MSG_IDXGISwapChain_Present_PartialPresentationBeforeStandardPresentation = 105, + /// DXGI_MSG_IDXGISwapChain_Present_FullscreenPartialPresentIsInvalid + DXGI_MSG_IDXGISwapChain_Present_FullscreenPartialPresentIsInvalid = 106, + /// DXGI_MSG_IDXGISwapChain_Present_InvalidPresentTestOrDoNotSequenceFlag + DXGI_MSG_IDXGISwapChain_Present_InvalidPresentTestOrDoNotSequenceFlag = 107, + /// DXGI_MSG_IDXGISwapChain_Present_ScrollInfoWithNoDirtyRectsSpecified + DXGI_MSG_IDXGISwapChain_Present_ScrollInfoWithNoDirtyRectsSpecified = 108, + /// DXGI_MSG_IDXGISwapChain_Present_EmptyScrollRect + DXGI_MSG_IDXGISwapChain_Present_EmptyScrollRect = 109, + /// DXGI_MSG_IDXGISwapChain_Present_ScrollRectOutOfBackbufferBounds + DXGI_MSG_IDXGISwapChain_Present_ScrollRectOutOfBackbufferBounds = 110, + /// DXGI_MSG_IDXGISwapChain_Present_ScrollRectOutOfBackbufferBoundsWithOffset + DXGI_MSG_IDXGISwapChain_Present_ScrollRectOutOfBackbufferBoundsWithOffset = 111, + /// DXGI_MSG_IDXGISwapChain_Present_EmptyDirtyRect + DXGI_MSG_IDXGISwapChain_Present_EmptyDirtyRect = 112, + /// DXGI_MSG_IDXGISwapChain_Present_DirtyRectOutOfBackbufferBounds + DXGI_MSG_IDXGISwapChain_Present_DirtyRectOutOfBackbufferBounds = 113, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_UnsupportedBufferUsageFlags + DXGI_MSG_IDXGIFactory_CreateSwapChain_UnsupportedBufferUsageFlags = 114, + /// DXGI_MSG_IDXGISwapChain_Present_DoNotSequenceFlagSetButPreviousBufferIsUndefined + DXGI_MSG_IDXGISwapChain_Present_DoNotSequenceFlagSetButPreviousBufferIsUndefined = 115, + /// DXGI_MSG_IDXGISwapChain_Present_UnsupportedFlags + DXGI_MSG_IDXGISwapChain_Present_UnsupportedFlags = 116, + /// DXGI_MSG_IDXGISwapChain_Present_FlipModelChainMustResizeOrCreateOnFSTransition + DXGI_MSG_IDXGISwapChain_Present_FlipModelChainMustResizeOrCreateOnFSTransition = 117, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_pRestrictToOutputFromOtherIDXGIFactory + DXGI_MSG_IDXGIFactory_CreateSwapChain_pRestrictToOutputFromOtherIDXGIFactory = 118, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_RestrictOutputNotSupportedOnAdapter + DXGI_MSG_IDXGIFactory_CreateSwapChain_RestrictOutputNotSupportedOnAdapter = 119, + /// DXGI_MSG_IDXGISwapChain_Present_RestrictToOutputFlagSetButInvalidpRestrictToOutput + DXGI_MSG_IDXGISwapChain_Present_RestrictToOutputFlagSetButInvalidpRestrictToOutput = 120, + /// DXGI_MSG_IDXGISwapChain_Present_RestrictToOutputFlagdWithFullscreen + DXGI_MSG_IDXGISwapChain_Present_RestrictToOutputFlagdWithFullscreen = 121, + /// DXGI_MSG_IDXGISwapChain_Present_RestrictOutputFlagWithStaleSwapChain + DXGI_MSG_IDXGISwapChain_Present_RestrictOutputFlagWithStaleSwapChain = 122, + /// DXGI_MSG_IDXGISwapChain_Present_OtherFlagsCausingInvalidPresentTestFlag + DXGI_MSG_IDXGISwapChain_Present_OtherFlagsCausingInvalidPresentTestFlag = 123, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_UnavailableInSession0 + DXGI_MSG_IDXGIFactory_CreateSwapChain_UnavailableInSession0 = 124, + /// DXGI_MSG_IDXGIFactory_MakeWindowAssociation_UnavailableInSession0 + DXGI_MSG_IDXGIFactory_MakeWindowAssociation_UnavailableInSession0 = 125, + /// DXGI_MSG_IDXGIFactory_GetWindowAssociation_UnavailableInSession0 + DXGI_MSG_IDXGIFactory_GetWindowAssociation_UnavailableInSession0 = 126, + /// DXGI_MSG_IDXGIAdapter_EnumOutputs_UnavailableInSession0 + DXGI_MSG_IDXGIAdapter_EnumOutputs_UnavailableInSession0 = 127, + /// DXGI_MSG_IDXGISwapChain_CreationOrSetFullscreenState_StereoDisabled + DXGI_MSG_IDXGISwapChain_CreationOrSetFullscreenState_StereoDisabled = 128, + /// DXGI_MSG_IDXGIFactory2_UnregisterStatus_CookieNotFound + DXGI_MSG_IDXGIFactory2_UnregisterStatus_CookieNotFound = 129, + /// DXGI_MSG_IDXGISwapChain_Present_ProtectedContentInWindowedModeWithoutFSOrOverlay + DXGI_MSG_IDXGISwapChain_Present_ProtectedContentInWindowedModeWithoutFSOrOverlay = 130, + /// DXGI_MSG_IDXGISwapChain_Present_ProtectedContentInWindowedModeWithoutFlipSequential + DXGI_MSG_IDXGISwapChain_Present_ProtectedContentInWindowedModeWithoutFlipSequential = 131, + /// DXGI_MSG_IDXGISwapChain_Present_ProtectedContentWithRDPDriver + DXGI_MSG_IDXGISwapChain_Present_ProtectedContentWithRDPDriver = 132, + /// DXGI_MSG_IDXGISwapChain_Present_ProtectedContentInWindowedModeWithDWMOffOrInvalidDisplayAffinity + DXGI_MSG_IDXGISwapChain_Present_ProtectedContentInWindowedModeWithDWMOffOrInvalidDisplayAffinity = 133, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_WidthOrHeightIsZero + DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_WidthOrHeightIsZero = 134, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_OnlyFlipSequentialSupported + DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_OnlyFlipSequentialSupported = 135, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_UnsupportedOnAdapter + DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_UnsupportedOnAdapter = 136, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_UnsupportedOnWindows7 + DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_UnsupportedOnWindows7 = 137, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_FSTransitionWithCompositionSwapChain + DXGI_MSG_IDXGISwapChain_SetFullscreenState_FSTransitionWithCompositionSwapChain = 138, + /// DXGI_MSG_IDXGISwapChain_ResizeTarget_InvalidWithCompositionSwapChain + DXGI_MSG_IDXGISwapChain_ResizeTarget_InvalidWithCompositionSwapChain = 139, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_WidthOrHeightIsZero + DXGI_MSG_IDXGISwapChain_ResizeBuffers_WidthOrHeightIsZero = 140, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_ScalingNoneIsFlipModelOnly + DXGI_MSG_IDXGIFactory_CreateSwapChain_ScalingNoneIsFlipModelOnly = 141, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_ScalingUnrecognized + DXGI_MSG_IDXGIFactory_CreateSwapChain_ScalingUnrecognized = 142, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_DisplayOnlyFullscreenUnsupported + DXGI_MSG_IDXGIFactory_CreateSwapChain_DisplayOnlyFullscreenUnsupported = 143, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_DisplayOnlyUnsupported + DXGI_MSG_IDXGIFactory_CreateSwapChain_DisplayOnlyUnsupported = 144, + /// DXGI_MSG_IDXGISwapChain_Present_RestartIsFullscreenOnly + DXGI_MSG_IDXGISwapChain_Present_RestartIsFullscreenOnly = 145, + /// DXGI_MSG_IDXGISwapChain_Present_ProtectedWindowlessPresentationRequiresDisplayOnly + DXGI_MSG_IDXGISwapChain_Present_ProtectedWindowlessPresentationRequiresDisplayOnly = 146, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_DisplayOnlyUnsupported + DXGI_MSG_IDXGISwapChain_SetFullscreenState_DisplayOnlyUnsupported = 147, + /// DXGI_MSG_IDXGISwapChain1_SetBackgroundColor_OutOfRange + DXGI_MSG_IDXGISwapChain1_SetBackgroundColor_OutOfRange = 148, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_DisplayOnlyFullscreenUnsupported + DXGI_MSG_IDXGISwapChain_ResizeBuffers_DisplayOnlyFullscreenUnsupported = 149, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_DisplayOnlyUnsupported + DXGI_MSG_IDXGISwapChain_ResizeBuffers_DisplayOnlyUnsupported = 150, + /// DXGI_MSG_IDXGISwapchain_Present_ScrollUnsupported + DXGI_MSG_IDXGISwapchain_Present_ScrollUnsupported = 151, + /// DXGI_MSG_IDXGISwapChain1_SetRotation_UnsupportedOS + DXGI_MSG_IDXGISwapChain1_SetRotation_UnsupportedOS = 152, + /// DXGI_MSG_IDXGISwapChain1_GetRotation_UnsupportedOS + DXGI_MSG_IDXGISwapChain1_GetRotation_UnsupportedOS = 153, + /// DXGI_MSG_IDXGISwapchain_Present_FullscreenRotation + DXGI_MSG_IDXGISwapchain_Present_FullscreenRotation = 154, + /// DXGI_MSG_IDXGISwapChain_Present_PartialPresentationWithMSAABuffers + DXGI_MSG_IDXGISwapChain_Present_PartialPresentationWithMSAABuffers = 155, + /// DXGI_MSG_IDXGISwapChain1_SetRotation_FlipSequentialRequired + DXGI_MSG_IDXGISwapChain1_SetRotation_FlipSequentialRequired = 156, + /// DXGI_MSG_IDXGISwapChain1_SetRotation_InvalidRotation + DXGI_MSG_IDXGISwapChain1_SetRotation_InvalidRotation = 157, + /// DXGI_MSG_IDXGISwapChain1_GetRotation_FlipSequentialRequired + DXGI_MSG_IDXGISwapChain1_GetRotation_FlipSequentialRequired = 158, + /// DXGI_MSG_IDXGISwapChain_GetHwnd_WrongType + DXGI_MSG_IDXGISwapChain_GetHwnd_WrongType = 159, + /// DXGI_MSG_IDXGISwapChain_GetCompositionSurface_WrongType + DXGI_MSG_IDXGISwapChain_GetCompositionSurface_WrongType = 160, + /// DXGI_MSG_IDXGISwapChain_GetCoreWindow_WrongType + DXGI_MSG_IDXGISwapChain_GetCoreWindow_WrongType = 161, + /// DXGI_MSG_IDXGISwapChain_GetFullscreenDesc_NonHwnd + DXGI_MSG_IDXGISwapChain_GetFullscreenDesc_NonHwnd = 162, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_CoreWindow + DXGI_MSG_IDXGISwapChain_SetFullscreenState_CoreWindow = 163, + /// DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_UnsupportedOnWindows7 + DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_UnsupportedOnWindows7 = 164, + /// DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_pWindowIsNULL + DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_pWindowIsNULL = 165, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_FSUnsupportedForModernApps + DXGI_MSG_IDXGIFactory_CreateSwapChain_FSUnsupportedForModernApps = 166, + /// DXGI_MSG_IDXGIFactory_MakeWindowAssociation_ModernApp + DXGI_MSG_IDXGIFactory_MakeWindowAssociation_ModernApp = 167, + /// DXGI_MSG_IDXGISwapChain_ResizeTarget_ModernApp + DXGI_MSG_IDXGISwapChain_ResizeTarget_ModernApp = 168, + /// DXGI_MSG_IDXGISwapChain_ResizeTarget_pNewTargetParametersIsNULL + DXGI_MSG_IDXGISwapChain_ResizeTarget_pNewTargetParametersIsNULL = 169, + /// DXGI_MSG_IDXGIOutput_SetDisplaySurface_ModernApp + DXGI_MSG_IDXGIOutput_SetDisplaySurface_ModernApp = 170, + /// DXGI_MSG_IDXGIOutput_TakeOwnership_ModernApp + DXGI_MSG_IDXGIOutput_TakeOwnership_ModernApp = 171, + /// DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_pWindowIsInvalid + DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_pWindowIsInvalid = 172, + /// DXGI_MSG_IDXGIFactory2_CreateSwapChainForCompositionSurface_InvalidHandle + DXGI_MSG_IDXGIFactory2_CreateSwapChainForCompositionSurface_InvalidHandle = 173, + /// DXGI_MSG_IDXGISurface1_GetDC_ModernApp + DXGI_MSG_IDXGISurface1_GetDC_ModernApp = 174, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_ScalingNoneRequiresWindows8OrNewer + DXGI_MSG_IDXGIFactory_CreateSwapChain_ScalingNoneRequiresWindows8OrNewer = 175, + /// DXGI_MSG_IDXGISwapChain_Present_TemporaryMonoAndPreferRight + DXGI_MSG_IDXGISwapChain_Present_TemporaryMonoAndPreferRight = 176, + /// DXGI_MSG_IDXGISwapChain_Present_TemporaryMonoOrPreferRightWithDoNotSequence + DXGI_MSG_IDXGISwapChain_Present_TemporaryMonoOrPreferRightWithDoNotSequence = 177, + /// DXGI_MSG_IDXGISwapChain_Present_TemporaryMonoOrPreferRightWithoutStereo + DXGI_MSG_IDXGISwapChain_Present_TemporaryMonoOrPreferRightWithoutStereo = 178, + /// DXGI_MSG_IDXGISwapChain_Present_TemporaryMonoUnsupported + DXGI_MSG_IDXGISwapChain_Present_TemporaryMonoUnsupported = 179, + /// DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_ArraySizeMismatch + DXGI_MSG_IDXGIOutput_GetDisplaySurfaceData_ArraySizeMismatch = 180, + /// DXGI_MSG_IDXGISwapChain_Present_PartialPresentationWithSwapEffectDiscard + DXGI_MSG_IDXGISwapChain_Present_PartialPresentationWithSwapEffectDiscard = 181, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_AlphaUnrecognized + DXGI_MSG_IDXGIFactory_CreateSwapChain_AlphaUnrecognized = 182, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_AlphaIsWindowlessOnly + DXGI_MSG_IDXGIFactory_CreateSwapChain_AlphaIsWindowlessOnly = 183, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_AlphaIsFlipModelOnly + DXGI_MSG_IDXGIFactory_CreateSwapChain_AlphaIsFlipModelOnly = 184, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_RestrictToOutputAdapterMismatch + DXGI_MSG_IDXGIFactory_CreateSwapChain_RestrictToOutputAdapterMismatch = 185, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_DisplayOnlyOnLegacy + DXGI_MSG_IDXGIFactory_CreateSwapChain_DisplayOnlyOnLegacy = 186, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_DisplayOnlyOnLegacy + DXGI_MSG_IDXGISwapChain_ResizeBuffers_DisplayOnlyOnLegacy = 187, + /// DXGI_MSG_IDXGIResource1_CreateSubresourceSurface_InvalidIndex + DXGI_MSG_IDXGIResource1_CreateSubresourceSurface_InvalidIndex = 188, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_InvalidScaling + DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_InvalidScaling = 189, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainForCoreWindow_InvalidSwapEffect + DXGI_MSG_IDXGIFactory_CreateSwapChainForCoreWindow_InvalidSwapEffect = 190, + /// DXGI_MSG_IDXGIResource1_CreateSharedHandle_UnsupportedOS + DXGI_MSG_IDXGIResource1_CreateSharedHandle_UnsupportedOS = 191, + /// DXGI_MSG_IDXGIFactory2_RegisterOcclusionStatusWindow_UnsupportedOS + DXGI_MSG_IDXGIFactory2_RegisterOcclusionStatusWindow_UnsupportedOS = 192, + /// DXGI_MSG_IDXGIFactory2_RegisterOcclusionStatusEvent_UnsupportedOS + DXGI_MSG_IDXGIFactory2_RegisterOcclusionStatusEvent_UnsupportedOS = 193, + /// DXGI_MSG_IDXGIOutput1_DuplicateOutput_UnsupportedOS + DXGI_MSG_IDXGIOutput1_DuplicateOutput_UnsupportedOS = 194, + /// DXGI_MSG_IDXGIDisplayControl_IsStereoEnabled_UnsupportedOS + DXGI_MSG_IDXGIDisplayControl_IsStereoEnabled_UnsupportedOS = 195, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_InvalidAlphaMode + DXGI_MSG_IDXGIFactory_CreateSwapChainForComposition_InvalidAlphaMode = 196, + /// DXGI_MSG_IDXGIFactory_GetSharedResourceAdapterLuid_InvalidResource + DXGI_MSG_IDXGIFactory_GetSharedResourceAdapterLuid_InvalidResource = 197, + /// DXGI_MSG_IDXGIFactory_GetSharedResourceAdapterLuid_InvalidLUID + DXGI_MSG_IDXGIFactory_GetSharedResourceAdapterLuid_InvalidLUID = 198, + /// DXGI_MSG_IDXGIFactory_GetSharedResourceAdapterLuid_UnsupportedOS + DXGI_MSG_IDXGIFactory_GetSharedResourceAdapterLuid_UnsupportedOS = 199, + /// DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_2DOnly + DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_2DOnly = 200, + /// DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_StagingOnly + DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_StagingOnly = 201, + /// DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_NeedCPUAccessWrite + DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_NeedCPUAccessWrite = 202, + /// DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_NoShared + DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_NoShared = 203, + /// DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_OnlyMipLevels1 + DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_OnlyMipLevels1 = 204, + /// DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_MappedOrOfferedResource + DXGI_MSG_IDXGIOutput1_GetDisplaySurfaceData1_MappedOrOfferedResource = 205, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_FSUnsupportedForModernApps + DXGI_MSG_IDXGISwapChain_SetFullscreenState_FSUnsupportedForModernApps = 206, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_FailedToGoFSButNonPreRotated + DXGI_MSG_IDXGIFactory_CreateSwapChain_FailedToGoFSButNonPreRotated = 207, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainOrRegisterOcclusionStatus_BlitModelUsedWhileRegisteredForOcclusionStatusEvents + DXGI_MSG_IDXGIFactory_CreateSwapChainOrRegisterOcclusionStatus_BlitModelUsedWhileRegisteredForOcclusionStatusEvents = 208, + /// DXGI_MSG_IDXGISwapChain_Present_BlitModelUsedWhileRegisteredForOcclusionStatusEvents + DXGI_MSG_IDXGISwapChain_Present_BlitModelUsedWhileRegisteredForOcclusionStatusEvents = 209, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_WaitableSwapChainsAreFlipModelOnly + DXGI_MSG_IDXGIFactory_CreateSwapChain_WaitableSwapChainsAreFlipModelOnly = 210, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_WaitableSwapChainsAreNotFullscreen + DXGI_MSG_IDXGIFactory_CreateSwapChain_WaitableSwapChainsAreNotFullscreen = 211, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_Waitable + DXGI_MSG_IDXGISwapChain_SetFullscreenState_Waitable = 212, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_CannotAddOrRemoveWaitableFlag + DXGI_MSG_IDXGISwapChain_ResizeBuffers_CannotAddOrRemoveWaitableFlag = 213, + /// DXGI_MSG_IDXGISwapChain_GetFrameLatencyWaitableObject_OnlyWaitable + DXGI_MSG_IDXGISwapChain_GetFrameLatencyWaitableObject_OnlyWaitable = 214, + /// DXGI_MSG_IDXGISwapChain_GetMaximumFrameLatency_OnlyWaitable + DXGI_MSG_IDXGISwapChain_GetMaximumFrameLatency_OnlyWaitable = 215, + /// DXGI_MSG_IDXGISwapChain_GetMaximumFrameLatency_pMaxLatencyIsNULL + DXGI_MSG_IDXGISwapChain_GetMaximumFrameLatency_pMaxLatencyIsNULL = 216, + /// DXGI_MSG_IDXGISwapChain_SetMaximumFrameLatency_OnlyWaitable + DXGI_MSG_IDXGISwapChain_SetMaximumFrameLatency_OnlyWaitable = 217, + /// DXGI_MSG_IDXGISwapChain_SetMaximumFrameLatency_MaxLatencyIsOutOfBounds + DXGI_MSG_IDXGISwapChain_SetMaximumFrameLatency_MaxLatencyIsOutOfBounds = 218, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_ForegroundIsCoreWindowOnly + DXGI_MSG_IDXGIFactory_CreateSwapChain_ForegroundIsCoreWindowOnly = 219, + /// DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_ForegroundUnsupportedOnAdapter + DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_ForegroundUnsupportedOnAdapter = 220, + /// DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_InvalidScaling + DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_InvalidScaling = 221, + /// DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_InvalidAlphaMode + DXGI_MSG_IDXGIFactory2_CreateSwapChainForCoreWindow_InvalidAlphaMode = 222, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_CannotAddOrRemoveForegroundFlag + DXGI_MSG_IDXGISwapChain_ResizeBuffers_CannotAddOrRemoveForegroundFlag = 223, + /// DXGI_MSG_IDXGISwapChain_SetMatrixTransform_MatrixPointerCannotBeNull + DXGI_MSG_IDXGISwapChain_SetMatrixTransform_MatrixPointerCannotBeNull = 224, + /// DXGI_MSG_IDXGISwapChain_SetMatrixTransform_RequiresCompositionSwapChain + DXGI_MSG_IDXGISwapChain_SetMatrixTransform_RequiresCompositionSwapChain = 225, + /// DXGI_MSG_IDXGISwapChain_SetMatrixTransform_MatrixMustBeFinite + DXGI_MSG_IDXGISwapChain_SetMatrixTransform_MatrixMustBeFinite = 226, + /// DXGI_MSG_IDXGISwapChain_SetMatrixTransform_MatrixMustBeTranslateAndOrScale + DXGI_MSG_IDXGISwapChain_SetMatrixTransform_MatrixMustBeTranslateAndOrScale = 227, + /// DXGI_MSG_IDXGISwapChain_GetMatrixTransform_MatrixPointerCannotBeNull + DXGI_MSG_IDXGISwapChain_GetMatrixTransform_MatrixPointerCannotBeNull = 228, + /// DXGI_MSG_IDXGISwapChain_GetMatrixTransform_RequiresCompositionSwapChain + DXGI_MSG_IDXGISwapChain_GetMatrixTransform_RequiresCompositionSwapChain = 229, + /// DXGI_MSG_DXGIGetDebugInterface1_NULL_ppDebug + DXGI_MSG_DXGIGetDebugInterface1_NULL_ppDebug = 230, + /// DXGI_MSG_DXGIGetDebugInterface1_InvalidFlags + DXGI_MSG_DXGIGetDebugInterface1_InvalidFlags = 231, + /// DXGI_MSG_IDXGISwapChain_Present_Decode + DXGI_MSG_IDXGISwapChain_Present_Decode = 232, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_Decode + DXGI_MSG_IDXGISwapChain_ResizeBuffers_Decode = 233, + /// DXGI_MSG_IDXGISwapChain_SetSourceSize_FlipModel + DXGI_MSG_IDXGISwapChain_SetSourceSize_FlipModel = 234, + /// DXGI_MSG_IDXGISwapChain_SetSourceSize_Decode + DXGI_MSG_IDXGISwapChain_SetSourceSize_Decode = 235, + /// DXGI_MSG_IDXGISwapChain_SetSourceSize_WidthHeight + DXGI_MSG_IDXGISwapChain_SetSourceSize_WidthHeight = 236, + /// DXGI_MSG_IDXGISwapChain_GetSourceSize_NullPointers + DXGI_MSG_IDXGISwapChain_GetSourceSize_NullPointers = 237, + /// DXGI_MSG_IDXGISwapChain_GetSourceSize_Decode + DXGI_MSG_IDXGISwapChain_GetSourceSize_Decode = 238, + /// DXGI_MSG_IDXGIDecodeSwapChain_SetColorSpace_InvalidFlags + DXGI_MSG_IDXGIDecodeSwapChain_SetColorSpace_InvalidFlags = 239, + /// DXGI_MSG_IDXGIDecodeSwapChain_SetSourceRect_InvalidRect + DXGI_MSG_IDXGIDecodeSwapChain_SetSourceRect_InvalidRect = 240, + /// DXGI_MSG_IDXGIDecodeSwapChain_SetTargetRect_InvalidRect + DXGI_MSG_IDXGIDecodeSwapChain_SetTargetRect_InvalidRect = 241, + /// DXGI_MSG_IDXGIDecodeSwapChain_SetDestSize_InvalidSize + DXGI_MSG_IDXGIDecodeSwapChain_SetDestSize_InvalidSize = 242, + /// DXGI_MSG_IDXGIDecodeSwapChain_GetSourceRect_InvalidPointer + DXGI_MSG_IDXGIDecodeSwapChain_GetSourceRect_InvalidPointer = 243, + /// DXGI_MSG_IDXGIDecodeSwapChain_GetTargetRect_InvalidPointer + DXGI_MSG_IDXGIDecodeSwapChain_GetTargetRect_InvalidPointer = 244, + /// DXGI_MSG_IDXGIDecodeSwapChain_GetDestSize_InvalidPointer + DXGI_MSG_IDXGIDecodeSwapChain_GetDestSize_InvalidPointer = 245, + /// DXGI_MSG_IDXGISwapChain_PresentBuffer_YUV + DXGI_MSG_IDXGISwapChain_PresentBuffer_YUV = 246, + /// DXGI_MSG_IDXGISwapChain_SetSourceSize_YUV + DXGI_MSG_IDXGISwapChain_SetSourceSize_YUV = 247, + /// DXGI_MSG_IDXGISwapChain_GetSourceSize_YUV + DXGI_MSG_IDXGISwapChain_GetSourceSize_YUV = 248, + /// DXGI_MSG_IDXGISwapChain_SetMatrixTransform_YUV + DXGI_MSG_IDXGISwapChain_SetMatrixTransform_YUV = 249, + /// DXGI_MSG_IDXGISwapChain_GetMatrixTransform_YUV + DXGI_MSG_IDXGISwapChain_GetMatrixTransform_YUV = 250, + /// DXGI_MSG_IDXGISwapChain_Present_PartialPresentation_YUV + DXGI_MSG_IDXGISwapChain_Present_PartialPresentation_YUV = 251, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_CannotAddOrRemoveFlag_YUV + DXGI_MSG_IDXGISwapChain_ResizeBuffers_CannotAddOrRemoveFlag_YUV = 252, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_Alignment_YUV + DXGI_MSG_IDXGISwapChain_ResizeBuffers_Alignment_YUV = 253, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_ShaderInputUnsupported_YUV + DXGI_MSG_IDXGIFactory_CreateSwapChain_ShaderInputUnsupported_YUV = 254, + /// DXGI_MSG_IDXGIOutput3_CheckOverlaySupport_NullPointers + DXGI_MSG_IDXGIOutput3_CheckOverlaySupport_NullPointers = 255, + /// DXGI_MSG_IDXGIOutput3_CheckOverlaySupport_IDXGIDeviceNotSupportedBypConcernedDevice + DXGI_MSG_IDXGIOutput3_CheckOverlaySupport_IDXGIDeviceNotSupportedBypConcernedDevice = 256, + /// DXGI_MSG_IDXGIAdapter_EnumOutputs2_InvalidEnumOutputs2Flag + DXGI_MSG_IDXGIAdapter_EnumOutputs2_InvalidEnumOutputs2Flag = 257, + /// DXGI_MSG_IDXGISwapChain_CreationOrSetFullscreenState_FSUnsupportedForFlipDiscard + DXGI_MSG_IDXGISwapChain_CreationOrSetFullscreenState_FSUnsupportedForFlipDiscard = 258, + /// DXGI_MSG_IDXGIOutput4_CheckOverlayColorSpaceSupport_NullPointers + DXGI_MSG_IDXGIOutput4_CheckOverlayColorSpaceSupport_NullPointers = 259, + /// DXGI_MSG_IDXGIOutput4_CheckOverlayColorSpaceSupport_IDXGIDeviceNotSupportedBypConcernedDevice + DXGI_MSG_IDXGIOutput4_CheckOverlayColorSpaceSupport_IDXGIDeviceNotSupportedBypConcernedDevice = 260, + /// DXGI_MSG_IDXGISwapChain3_CheckColorSpaceSupport_NullPointers + DXGI_MSG_IDXGISwapChain3_CheckColorSpaceSupport_NullPointers = 261, + /// DXGI_MSG_IDXGISwapChain3_SetColorSpace1_InvalidColorSpace + DXGI_MSG_IDXGISwapChain3_SetColorSpace1_InvalidColorSpace = 262, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidHwProtect + DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidHwProtect = 263, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_HwProtectUnsupported + DXGI_MSG_IDXGIFactory_CreateSwapChain_HwProtectUnsupported = 264, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidHwProtect + DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidHwProtect = 265, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_HwProtectUnsupported + DXGI_MSG_IDXGISwapChain_ResizeBuffers_HwProtectUnsupported = 266, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers1_D3D12Only + DXGI_MSG_IDXGISwapChain_ResizeBuffers1_D3D12Only = 267, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers1_FlipModel + DXGI_MSG_IDXGISwapChain_ResizeBuffers1_FlipModel = 268, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers1_NodeMaskAndQueueRequired + DXGI_MSG_IDXGISwapChain_ResizeBuffers1_NodeMaskAndQueueRequired = 269, + /// DXGI_MSG_IDXGISwapChain_CreateSwapChain_InvalidHwProtectGdiFlag + DXGI_MSG_IDXGISwapChain_CreateSwapChain_InvalidHwProtectGdiFlag = 270, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidHwProtectGdiFlag + DXGI_MSG_IDXGISwapChain_ResizeBuffers_InvalidHwProtectGdiFlag = 271, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_10BitFormatNotSupported + DXGI_MSG_IDXGIFactory_CreateSwapChain_10BitFormatNotSupported = 272, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_FlipSwapEffectRequired + DXGI_MSG_IDXGIFactory_CreateSwapChain_FlipSwapEffectRequired = 273, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidDevice + DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidDevice = 274, + /// DXGI_MSG_IDXGIOutput_TakeOwnership_Unsupported + DXGI_MSG_IDXGIOutput_TakeOwnership_Unsupported = 275, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidQueue + DXGI_MSG_IDXGIFactory_CreateSwapChain_InvalidQueue = 276, + /// DXGI_MSG_IDXGISwapChain3_ResizeBuffers1_InvalidQueue + DXGI_MSG_IDXGISwapChain3_ResizeBuffers1_InvalidQueue = 277, + /// DXGI_MSG_IDXGIFactory_CreateSwapChainForHwnd_InvalidScaling + DXGI_MSG_IDXGIFactory_CreateSwapChainForHwnd_InvalidScaling = 278, + /// DXGI_MSG_IDXGISwapChain3_SetHDRMetaData_InvalidSize + DXGI_MSG_IDXGISwapChain3_SetHDRMetaData_InvalidSize = 279, + /// DXGI_MSG_IDXGISwapChain3_SetHDRMetaData_InvalidPointer + DXGI_MSG_IDXGISwapChain3_SetHDRMetaData_InvalidPointer = 280, + /// DXGI_MSG_IDXGISwapChain3_SetHDRMetaData_InvalidType + DXGI_MSG_IDXGISwapChain3_SetHDRMetaData_InvalidType = 281, + /// DXGI_MSG_IDXGISwapChain_Present_FullscreenAllowTearingIsInvalid + DXGI_MSG_IDXGISwapChain_Present_FullscreenAllowTearingIsInvalid = 282, + /// DXGI_MSG_IDXGISwapChain_Present_AllowTearingRequiresPresentIntervalZero + DXGI_MSG_IDXGISwapChain_Present_AllowTearingRequiresPresentIntervalZero = 283, + /// DXGI_MSG_IDXGISwapChain_Present_AllowTearingRequiresCreationFlag + DXGI_MSG_IDXGISwapChain_Present_AllowTearingRequiresCreationFlag = 284, + /// DXGI_MSG_IDXGISwapChain_ResizeBuffers_CannotAddOrRemoveAllowTearingFlag + DXGI_MSG_IDXGISwapChain_ResizeBuffers_CannotAddOrRemoveAllowTearingFlag = 285, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_AllowTearingFlagIsFlipModelOnly + DXGI_MSG_IDXGIFactory_CreateSwapChain_AllowTearingFlagIsFlipModelOnly = 286, + /// DXGI_MSG_IDXGIFactory_CheckFeatureSupport_InvalidFeature + DXGI_MSG_IDXGIFactory_CheckFeatureSupport_InvalidFeature = 287, + /// DXGI_MSG_IDXGIFactory_CheckFeatureSupport_InvalidSize + DXGI_MSG_IDXGIFactory_CheckFeatureSupport_InvalidSize = 288, + /// DXGI_MSG_IDXGIOutput6_CheckHardwareCompositionSupport_NullPointer + DXGI_MSG_IDXGIOutput6_CheckHardwareCompositionSupport_NullPointer = 289, + /// DXGI_MSG_IDXGISwapChain_SetFullscreenState_PerMonitorDpiShimApplied + DXGI_MSG_IDXGISwapChain_SetFullscreenState_PerMonitorDpiShimApplied = 290, + /// DXGI_MSG_IDXGIOutput_DuplicateOutput_PerMonitorDpiShimApplied + DXGI_MSG_IDXGIOutput_DuplicateOutput_PerMonitorDpiShimApplied = 291, + /// DXGI_MSG_IDXGIOutput_DuplicateOutput1_PerMonitorDpiRequired + DXGI_MSG_IDXGIOutput_DuplicateOutput1_PerMonitorDpiRequired = 292, + /// DXGI_MSG_IDXGIFactory7_UnregisterAdaptersChangedEvent_CookieNotFound + DXGI_MSG_IDXGIFactory7_UnregisterAdaptersChangedEvent_CookieNotFound = 293, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_LegacyBltModelSwapEffect + DXGI_MSG_IDXGIFactory_CreateSwapChain_LegacyBltModelSwapEffect = 294, + /// DXGI_MSG_IDXGISwapChain4_SetHDRMetaData_MetadataUnchanged + DXGI_MSG_IDXGISwapChain4_SetHDRMetaData_MetadataUnchanged = 295, + /// DXGI_MSG_IDXGISwapChain_Present_11On12_Released_Resource + DXGI_MSG_IDXGISwapChain_Present_11On12_Released_Resource = 296, + /// DXGI_MSG_IDXGIFactory_CreateSwapChain_MultipleSwapchainRefToSurface_DeferredDtr + DXGI_MSG_IDXGIFactory_CreateSwapChain_MultipleSwapchainRefToSurface_DeferredDtr = 297, + /// DXGI_MSG_IDXGIFactory_MakeWindowAssociation_NoOpBehavior + DXGI_MSG_IDXGIFactory_MakeWindowAssociation_NoOpBehavior = 298, + /// DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_NotForegroundWindow + DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_NotForegroundWindow = 1000, + /// DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_DISCARD_BufferCount + DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_DISCARD_BufferCount = 1001, + /// DXGI_MSG_Phone_IDXGISwapChain_SetFullscreenState_NotAvailable + DXGI_MSG_Phone_IDXGISwapChain_SetFullscreenState_NotAvailable = 1002, + /// DXGI_MSG_Phone_IDXGISwapChain_ResizeBuffers_NotAvailable + DXGI_MSG_Phone_IDXGISwapChain_ResizeBuffers_NotAvailable = 1003, + /// DXGI_MSG_Phone_IDXGISwapChain_ResizeTarget_NotAvailable + DXGI_MSG_Phone_IDXGISwapChain_ResizeTarget_NotAvailable = 1004, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidLayerIndex + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidLayerIndex = 1005, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_MultipleLayerIndex + DXGI_MSG_Phone_IDXGISwapChain_Present_MultipleLayerIndex = 1006, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidLayerFlag + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidLayerFlag = 1007, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidRotation + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidRotation = 1008, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidBlend + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidBlend = 1009, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidResource + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidResource = 1010, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidMultiPlaneOverlayResource + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidMultiPlaneOverlayResource = 1011, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidIndexForPrimary + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidIndexForPrimary = 1012, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidIndexForOverlay + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidIndexForOverlay = 1013, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidSubResourceIndex + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidSubResourceIndex = 1014, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidSourceRect + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidSourceRect = 1015, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidDestinationRect + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidDestinationRect = 1016, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_MultipleResource + DXGI_MSG_Phone_IDXGISwapChain_Present_MultipleResource = 1017, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_NotSharedResource + DXGI_MSG_Phone_IDXGISwapChain_Present_NotSharedResource = 1018, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidFlag + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidFlag = 1019, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidInterval + DXGI_MSG_Phone_IDXGISwapChain_Present_InvalidInterval = 1020, + /// DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_MSAA_NotSupported + DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_MSAA_NotSupported = 1021, + /// DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_ScalingAspectRatioStretch_Supported_ModernApp + DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_ScalingAspectRatioStretch_Supported_ModernApp = 1022, + /// DXGI_MSG_Phone_IDXGISwapChain_GetFrameStatistics_NotAvailable_ModernApp + DXGI_MSG_Phone_IDXGISwapChain_GetFrameStatistics_NotAvailable_ModernApp = 1023, + /// DXGI_MSG_Phone_IDXGISwapChain_Present_ReplaceInterval0With1 + DXGI_MSG_Phone_IDXGISwapChain_Present_ReplaceInterval0With1 = 1024, + /// DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_FailedRegisterWithCompositor + DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_FailedRegisterWithCompositor = 1025, + /// DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_NotForegroundWindow_AtRendering + DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_NotForegroundWindow_AtRendering = 1026, + /// DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_FLIP_SEQUENTIAL_BufferCount + DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_FLIP_SEQUENTIAL_BufferCount = 1027, + /// DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_FLIP_Modern_CoreWindow_Only + DXGI_MSG_Phone_IDXGIFactory_CreateSwapChain_FLIP_Modern_CoreWindow_Only = 1028, + /// DXGI_MSG_Phone_IDXGISwapChain_Present1_RequiresOverlays + DXGI_MSG_Phone_IDXGISwapChain_Present1_RequiresOverlays = 1029, + /// DXGI_MSG_Phone_IDXGISwapChain_SetBackgroundColor_FlipSequentialRequired + DXGI_MSG_Phone_IDXGISwapChain_SetBackgroundColor_FlipSequentialRequired = 1030, + /// DXGI_MSG_Phone_IDXGISwapChain_GetBackgroundColor_FlipSequentialRequired + DXGI_MSG_Phone_IDXGISwapChain_GetBackgroundColor_FlipSequentialRequired = 1031, +} + +#endregion Enums + +#region Structs +/// DXGI_RGBA +public partial struct Rgba +{ + public float r; + public float g; + public float b; + public float a; +} + +/// DXGI_FRAME_STATISTICS +public partial struct FrameStatistics +{ + public uint PresentCount; + public uint PresentRefreshCount; + public uint SyncRefreshCount; + public LargeInterger SyncQPCTime; + public LargeInterger SyncGPUTime; +} + +/// DXGI_MAPPED_RECT +public partial struct MappedRect +{ + public int Pitch; + public unsafe byte* pBits; +} + +/// DXGI_ADAPTER_DESC +public partial struct AdapterDescription +{ + public unsafe fixed Char Description[128]; + public uint VendorId; + public uint DeviceId; + public uint SubSysId; + public uint Revision; + public nuint DedicatedVideoMemory; + public nuint DedicatedSystemMemory; + public nuint SharedSystemMemory; + public Luid AdapterLuid; +} + +/// DXGI_OUTPUT_DESC +public partial struct OutputDescription +{ + public unsafe fixed Char DeviceName[32]; + public RawRect DesktopCoordinates; + public Bool32 AttachedToDesktop; + public Common.ModeRotation Rotation; + public IntPtr Monitor; +} + +/// DXGI_SHARED_RESOURCE +public partial struct SharedResource +{ + public IntPtr Handle; +} + +/// DXGI_SURFACE_DESC +public partial struct SurfaceDescription +{ + public uint Width; + public uint Height; + public Common.Format Format; + public Common.SampleDescription SampleDesc; +} + +/// DXGI_SWAP_CHAIN_DESC +public partial struct SwapChainDescription +{ + public Common.ModeDescription BufferDesc; + public Common.SampleDescription SampleDesc; + public uint BufferUsage; + public uint BufferCount; + public IntPtr OutputWindow; + public Bool32 Windowed; + public SwapEffect SwapEffect; + public uint Flags; +} + +/// DXGI_ADAPTER_DESC1 +public partial struct AdapterDesc1 +{ + public unsafe fixed Char Description[128]; + public uint VendorId; + public uint DeviceId; + public uint SubSysId; + public uint Revision; + public nuint DedicatedVideoMemory; + public nuint DedicatedSystemMemory; + public nuint SharedSystemMemory; + public Luid AdapterLuid; + public uint Flags; +} + +/// DXGI_DISPLAY_COLOR_SPACE +public partial struct DisplayColorSpace +{ + public unsafe fixed float PrimaryCoordinates[16]; + public unsafe fixed float WhitePoints[32]; +} + +/// DXGI_OUTDUPL_MOVE_RECT +public partial struct OutduplMoveRect +{ + public System.Drawing.Point SourcePoint; + public RawRect DestinationRect; +} + +/// DXGI_OUTDUPL_DESC +public partial struct OutduplDescription +{ + public Common.ModeDescription ModeDesc; + public Common.ModeRotation Rotation; + public Bool32 DesktopImageInSystemMemory; +} + +/// DXGI_OUTDUPL_POINTER_POSITION +public partial struct OutduplPointerPosition +{ + public System.Drawing.Point Position; + public Bool32 Visible; +} + +/// DXGI_OUTDUPL_POINTER_SHAPE_INFO +public partial struct OutduplPointerShapeInfo +{ + public uint Type; + public uint Width; + public uint Height; + public uint Pitch; + public System.Drawing.Point HotSpot; +} + +/// DXGI_OUTDUPL_FRAME_INFO +public partial struct OutduplFrameInfo +{ + public LargeInterger LastPresentTime; + public LargeInterger LastMouseUpdateTime; + public uint AccumulatedFrames; + public Bool32 RectsCoalesced; + public Bool32 ProtectedContentMaskedOut; + public OutduplPointerPosition PointerPosition; + public uint TotalMetadataBufferSize; + public uint PointerShapeBufferSize; +} + +/// DXGI_MODE_DESC1 +public partial struct ModeDesc1 +{ + public uint Width; + public uint Height; + public Common.Rational RefreshRate; + public Common.Format Format; + public Common.ModeScanlineOrder ScanlineOrdering; + public Common.ModeScaling Scaling; + public Bool32 Stereo; +} + +/// DXGI_SWAP_CHAIN_DESC1 +public partial struct SwapChainDesc1 +{ + public uint Width; + public uint Height; + public Common.Format Format; + public Bool32 Stereo; + public Common.SampleDescription SampleDesc; + public uint BufferUsage; + public uint BufferCount; + public Scaling Scaling; + public SwapEffect SwapEffect; + public Common.AlphaMode AlphaMode; + public uint Flags; +} + +/// DXGI_SWAP_CHAIN_FULLSCREEN_DESC +public partial struct SwapChainFullscreenDescription +{ + public Common.Rational RefreshRate; + public Common.ModeScanlineOrder ScanlineOrdering; + public Common.ModeScaling Scaling; + public Bool32 Windowed; +} + +/// DXGI_PRESENT_PARAMETERS +public partial struct PresentParameters +{ + public uint DirtyRectsCount; + public unsafe RawRect* pDirtyRects; + public unsafe RawRect* pScrollRect; + public unsafe System.Drawing.Point* pScrollOffset; +} + +/// DXGI_ADAPTER_DESC2 +public partial struct AdapterDesc2 +{ + public unsafe fixed Char Description[128]; + public uint VendorId; + public uint DeviceId; + public uint SubSysId; + public uint Revision; + public nuint DedicatedVideoMemory; + public nuint DedicatedSystemMemory; + public nuint SharedSystemMemory; + public Luid AdapterLuid; + public uint Flags; + public GraphicsPreemptionGranularity GraphicsPreemptionGranularity; + public ComputePreemptionGranularity ComputePreemptionGranularity; +} + +/// DXGI_MATRIX_3X2_F +public partial struct Matrix3x2F +{ + public float _11; + public float _12; + public float _21; + public float _22; + public float _31; + public float _32; +} + +/// DXGI_DECODE_SWAP_CHAIN_DESC +public partial struct DecodeSwapChainDescription +{ + public uint Flags; +} + +/// DXGI_FRAME_STATISTICS_MEDIA +public partial struct FrameStatisticsMedia +{ + public uint PresentCount; + public uint PresentRefreshCount; + public uint SyncRefreshCount; + public LargeInterger SyncQPCTime; + public LargeInterger SyncGPUTime; + public FramePresentationMode CompositionMode; + public uint ApprovedPresentDuration; +} + +/// DXGI_QUERY_VIDEO_MEMORY_INFO +public partial struct QueryVideoMemoryInfo +{ + public ulong Budget; + public ulong CurrentUsage; + public ulong AvailableForReservation; + public ulong CurrentReservation; +} + +/// DXGI_HDR_METADATA_HDR10 +public partial struct HdrMetadataHdr10 +{ + public unsafe fixed ushort RedPrimary[2]; + public unsafe fixed ushort GreenPrimary[2]; + public unsafe fixed ushort BluePrimary[2]; + public unsafe fixed ushort WhitePoint[2]; + public uint MaxMasteringLuminance; + public uint MinMasteringLuminance; + public ushort MaxContentLightLevel; + public ushort MaxFrameAverageLightLevel; +} + +/// DXGI_HDR_METADATA_HDR10PLUS +public partial struct HdrMetadataHdr10plus +{ + public unsafe fixed byte Data[72]; +} + +/// DXGI_ADAPTER_DESC3 +public partial struct AdapterDesc3 +{ + public unsafe fixed Char Description[128]; + public uint VendorId; + public uint DeviceId; + public uint SubSysId; + public uint Revision; + public nuint DedicatedVideoMemory; + public nuint DedicatedSystemMemory; + public nuint SharedSystemMemory; + public Luid AdapterLuid; + public AdapterFlag3 Flags; + public GraphicsPreemptionGranularity GraphicsPreemptionGranularity; + public ComputePreemptionGranularity ComputePreemptionGranularity; +} + +/// DXGI_OUTPUT_DESC1 +public partial struct OutputDesc1 +{ + public unsafe fixed Char DeviceName[32]; + public RawRect DesktopCoordinates; + public Bool32 AttachedToDesktop; + public Common.ModeRotation Rotation; + public IntPtr Monitor; + public uint BitsPerColor; + public Common.ColorSpaceType ColorSpace; + public unsafe fixed float RedPrimary[2]; + public unsafe fixed float GreenPrimary[2]; + public unsafe fixed float BluePrimary[2]; + public unsafe fixed float WhitePoint[2]; + public float MinLuminance; + public float MaxLuminance; + public float MaxFullFrameLuminance; +} + +/// DXGI_INFO_QUEUE_MESSAGE +public partial struct InfoQueueMessage +{ + public Guid Producer; + public InfoQueueMessageCategory Category; + public InfoQueueMessageSeverity Severity; + public int ID; + public unsafe byte* pDescription; + public nuint DescriptionByteLength; +} + +/// DXGI_INFO_QUEUE_FILTER_DESC +public partial struct InfoQueueFilterDescription +{ + public uint NumCategories; + public unsafe InfoQueueMessageCategory* pCategoryList; + public uint NumSeverities; + public unsafe InfoQueueMessageSeverity* pSeverityList; + public uint NumIDs; + public unsafe int* pIDList; +} + +/// DXGI_INFO_QUEUE_FILTER +public partial struct InfoQueueFilter +{ + public InfoQueueFilterDescription AllowList; + public InfoQueueFilterDescription DenyList; +} + +#endregion Structs + diff --git a/src/Vortice.Win32/LargeInterger.cs b/src/Vortice.Win32/LargeInterger.cs new file mode 100644 index 0000000..1819906 --- /dev/null +++ b/src/Vortice.Win32/LargeInterger.cs @@ -0,0 +1,72 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; + +#if NETSTANDARD2_0 +using MemoryMarshal = Win32.MemoryMarshal; +#endif + +namespace Win32; + +[StructLayout(LayoutKind.Explicit)] +[NativeTypeName("LARGE_INTEGER")] +public partial struct LargeInterger +{ + [FieldOffset(0)] + public _Anonymous_e__Struct Anonymous; + + [FieldOffset(0)] + [NativeTypeName("struct (anonymous struct at C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um/winnt.h:879:5)")] + public _u_e__Struct u; + + [FieldOffset(0)] + [NativeTypeName("LONGLONG")] + public long QuadPart; + + [UnscopedRef] + public ref uint LowPart + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { +#if NET7_0_OR_GREATER + return ref Anonymous.LowPart; +#else + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.LowPart, 1)); +#endif + } + } + + [UnscopedRef] + public ref int HighPart + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + get + { +#if NET7_0_OR_GREATER + return ref Anonymous.HighPart; +#else + return ref MemoryMarshal.GetReference(MemoryMarshal.CreateSpan(ref Anonymous.HighPart, 1)); +#endif + } + } + + public partial struct _Anonymous_e__Struct + { + [NativeTypeName("DWORD")] + public uint LowPart; + + [NativeTypeName("LONG")] + public int HighPart; + } + + public partial struct _u_e__Struct + { + [NativeTypeName("DWORD")] + public uint LowPart; + [NativeTypeName("LONG")] + public int HighPart; + } +} diff --git a/src/Vortice.Win32/Luid.cs b/src/Vortice.Win32/Luid.cs new file mode 100644 index 0000000..d0ebf76 --- /dev/null +++ b/src/Vortice.Win32/Luid.cs @@ -0,0 +1,91 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using System.Runtime.CompilerServices; + +namespace Win32; + +/// +/// A locally unique identifier for a graphics device. +/// +public readonly struct Luid : IEquatable +#if NET6_0_OR_GREATER + , ISpanFormattable +#endif +{ + /// + /// The low bits of the luid. + /// + private readonly uint lowPart; + + /// + /// The high bits of the luid. + /// + private readonly int highPart; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public bool Equals(Luid other) + { + return + this.lowPart == other.lowPart && + this.highPart == other.highPart; + } + + /// + public override bool Equals(object? other) + { + return other is Luid luid && Equals(luid); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public override int GetHashCode() + { + return HashCode.Combine(lowPart, highPart); + } + + /// + public override string ToString() + { + return (((long)this.highPart) << 32 | this.lowPart).ToString(); + } + +#if NET6_0_OR_GREATER + /// + public string ToString(string? format, IFormatProvider? formatProvider) + { + return (((long)this.highPart) << 32 | this.lowPart).ToString(format, formatProvider); + } + + /// + public bool TryFormat(Span destination, out int charsWritten, ReadOnlySpan format, IFormatProvider? provider) + { + return (((long)this.highPart) << 32 | this.lowPart).TryFormat(destination, out charsWritten, format, provider); + } +#endif + + /// + /// Check whether two values are equal. + /// + /// The first value to compare. + /// The second value to compare. + /// Whether and are the same. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(Luid a, Luid b) + { + return a.Equals(b); + } + + /// + /// Check whether two values are different. + /// + /// The first value to compare. + /// The second value to compare. + /// Whether and are different. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(Luid a, Luid b) + { + return !a.Equals(b); + } +} diff --git a/src/Vortice.Win32/NetStandard.cs b/src/Vortice.Win32/NetStandard.cs new file mode 100644 index 0000000..227dd0a --- /dev/null +++ b/src/Vortice.Win32/NetStandard.cs @@ -0,0 +1,39 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +#if NETSTANDARD2_0 + +using System.Runtime.CompilerServices; + +namespace Win32; + +internal static class MemoryMarshal +{ + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ref T GetReference(Span span) + { + return ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(span); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ref T GetReference(ReadOnlySpan span) + { + return ref global::System.Runtime.InteropServices.MemoryMarshal.GetReference(span); + } + + /// + /// Creates a new from a given reference. + /// + /// The type of reference to wrap. + /// The target reference. + /// The length of the to create. + /// A new wrapping . + public static unsafe Span CreateSpan(ref T value, int length) + { + return new(Unsafe.AsPointer(ref value), length); + } +} + +#endif diff --git a/src/Vortice.Win32/RawRect.cs b/src/Vortice.Win32/RawRect.cs new file mode 100644 index 0000000..91636eb --- /dev/null +++ b/src/Vortice.Win32/RawRect.cs @@ -0,0 +1,63 @@ +// Copyright © Amer Koleci and Contributors. +// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information. + +using System.Diagnostics; +using System.Drawing; + +namespace Win32; + +/// +/// Defines an integer rectangle (Left, Top, Right, Bottom) +/// +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[DebuggerDisplay("Left: {Left}, Top: {Top}, Right: {Right}, Bottom: {Bottom}")] +public readonly struct RawRect +{ + public RawRect(int left, int top, int right, int bottom) + { + Left = left; + Top = top; + Right = right; + Bottom = bottom; + } + + /// + /// The left position. + /// + public readonly int Left; + + /// + /// The top position. + /// + public readonly int Top; + + /// + /// The right position + /// + public readonly int Right; + + /// + /// The bottom position. + /// + public readonly int Bottom; + + /// + public override string ToString() + { + return $"{nameof(Left)}: {Left}, {nameof(Top)}: {Top}, {nameof(Right)}: {Right}, {nameof(Bottom)}: {Bottom}"; + } + + /// + /// Performs an implicit conversion from to . + /// + /// The value to convert. + /// The result of the conversion. + public static implicit operator Rectangle(RawRect value) => Rectangle.FromLTRB(value.Left, value.Top, value.Right, value.Bottom); + + /// + /// Performs an implicit conversion from to . + /// + /// The value to convert. + /// The result of the conversion. + public static implicit operator RawRect(Rectangle value) => new(value.Left, value.Top, value.Right, value.Bottom); +}