Skip to content

Commit fe5f8fb

Browse files
committed
DXC: Annotate new struct fields and enums
For `DXC_FOURCC` it would have been awesome if we could have something like the following, if `const` methods were supported: ```cs public static const uint DXC_FOURCC(char ch0, char ch1, char ch2, char ch3) => ch0 | (ch1 << 8) | (ch2 << 16) | (ch3 << 24); ```
1 parent de9da38 commit fe5f8fb

3 files changed

Lines changed: 154 additions & 14 deletions

File tree

generation/WinSDK/emitter.settings.rsp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@ ICreateWithTransactionEx::CreateInstance::pObject=[ComOutPtr]
706706
IClassFactory2::CreateInstanceLic::ppvObj=[ComOutPtr]
707707
DxcCreateInstance::ppv=[ComOutPtr]
708708
DxcCreateInstance2::ppv=[ComOutPtr]
709+
IDxcContainerReflection::GetPartReflection::ppvObject=[ComOutPtr]
710+
IDxcUtils::CreateReflection::ppvReflection=[ComOutPtr]
711+
IDxcUtils::GetDxilContainerPart::ppPartData=[NativeArrayInfo(CountFieldName = "pPartSizeInBytes")]
709712
IWbemServices::CreateInstanceEnum::ppEnum=[ComOutPtr]
710713
StiCreateInstanceW::ppSti=[ComOutPtr]
711714
IMFImageSharingEngineClassFactory::CreateInstanceFromUDN::ppEngine=[ComOutPtr]

generation/WinSDK/enums.json

Lines changed: 126 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28760,20 +28760,6 @@
2876028760
"filter": "DXC_CP_",
2876128761
"header": "dxcapi.h"
2876228762
},
28763-
"members": [
28764-
{
28765-
"name": "DXC_CP_ACP",
28766-
"value": "0"
28767-
},
28768-
{
28769-
"name": "DXC_CP_UTF16",
28770-
"value": "1200"
28771-
},
28772-
{
28773-
"name": "DXC_CP_UTF8",
28774-
"value": "65001"
28775-
}
28776-
],
2877728763
"uses": [
2877828764
{
2877928765
"interface": "IDxcBlobEncoding",
@@ -28819,6 +28805,132 @@
2881928805
"interface": "IDxcUtils",
2882028806
"method": "LoadFile",
2882128807
"parameter": "pCodePage"
28808+
},
28809+
{
28810+
"struct": "DxcBuffer",
28811+
"field": "Encoding"
28812+
}
28813+
]
28814+
},
28815+
{
28816+
"name": "DxcValidatorFlags",
28817+
"flags": true,
28818+
"autoPopulate": {
28819+
"filter": "DxcValidatorFlags_",
28820+
"header": "dxcapi.h"
28821+
},
28822+
"uses": [
28823+
{
28824+
"interface": "IDxcValidator",
28825+
"method": "Validate",
28826+
"parameter": "Flags"
28827+
},
28828+
{
28829+
"interface": "IDxcValidator2",
28830+
"method": "ValidateWithDebug",
28831+
"parameter": "Flags"
28832+
}
28833+
]
28834+
},
28835+
{
28836+
"name": "DxcVersionInfoFlags",
28837+
"flags": true,
28838+
"autoPopulate": {
28839+
"filter": "DxcVersionInfoFlags_",
28840+
"header": "dxcapi.h"
28841+
},
28842+
"uses": [
28843+
{
28844+
"interface": "IDxcVersionInfo",
28845+
"method": "GetFlags",
28846+
"parameter": "pFlags"
28847+
}
28848+
]
28849+
},
28850+
{
28851+
"name": "DXC_HASHFLAG",
28852+
"flags": true,
28853+
"autoPopulate": {
28854+
"filter": "DXC_HASHFLAG_",
28855+
"header": "dxcapi.h"
28856+
},
28857+
"uses": [
28858+
{
28859+
"struct": "DxcShaderHash",
28860+
"field": "Flags"
28861+
}
28862+
]
28863+
},
28864+
{
28865+
"name": "DXC_PART",
28866+
"flags": false,
28867+
"members": [
28868+
{
28869+
"name": "DXC_PART_PDB",
28870+
"value": "('I' | ('L' << 8) | ('D' << 16) | ('B' << 24))"
28871+
},
28872+
{
28873+
"name": "DXC_PART_PDB_NAME",
28874+
"value": "('I' | ('L' << 8) | ('D' << 16) | ('N' << 24))"
28875+
},
28876+
{
28877+
"name": "DXC_PART_PRIVATE_DATA",
28878+
"value": "('P' | ('R' << 8) | ('I' << 16) | ('V' << 24))"
28879+
},
28880+
{
28881+
"name": "DXC_PART_ROOT_SIGNATURE",
28882+
"value": "('R' | ('T' << 8) | ('S' << 16) | ('0' << 24))"
28883+
},
28884+
{
28885+
"name": "DXC_PART_DXIL",
28886+
"value": "('D' | ('X' << 8) | ('I' << 16) | ('L' << 24))"
28887+
},
28888+
{
28889+
"name": "DXC_PART_REFLECTION_DATA",
28890+
"value": "('S' | ('T' << 8) | ('A' << 16) | ('T' << 24))"
28891+
},
28892+
{
28893+
"name": "DXC_PART_SHADER_HASH",
28894+
"value": "('H' | ('A' << 8) | ('S' << 16) | ('H' << 24))"
28895+
},
28896+
{
28897+
"name": "DXC_PART_INPUT_SIGNATURE",
28898+
"value": "('I' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
28899+
},
28900+
{
28901+
"name": "DXC_PART_OUTPUT_SIGNATURE",
28902+
"value": "('O' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
28903+
},
28904+
{
28905+
"name": "DXC_PART_PATCH_CONSTANT_SIGNATURE",
28906+
"value": "('P' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
28907+
}
28908+
],
28909+
"uses": [
28910+
{
28911+
"interface": "IDxcUtils",
28912+
"method": "GetDxilContainerPart",
28913+
"parameter": "DxcPart"
28914+
},
28915+
{
28916+
"interface": "IDxcContainerBuilder",
28917+
"method": "AddPart",
28918+
"parameter": "fourCC"
28919+
},
28920+
{
28921+
"interface": "IDxcContainerBuilder",
28922+
"method": "RemovePart",
28923+
"parameter": "fourCC"
28924+
},
28925+
{
28926+
"interface": "IDxcContainerReflection",
28927+
"method": "GetPartKind",
28928+
"parameter": "pResult"
28929+
},
28930+
{
28931+
"interface": "IDxcContainerReflection",
28932+
"method": "FindFirstPartKind",
28933+
"parameter": "kind"
2882228934
}
2882328935
]
2882428936
},

scripts/ChangesSinceLastRelease.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7074,3 +7074,28 @@ Windows.Win32.UI.Input.GameInput.IGameInputReading added
70747074
Windows.Win32.Storage.FileSystem.Apis.GetFileInformationByName added
70757075
# Namespace of IsCharLowerW seems wrong #2030
70767076
Windows.Win32.UI.Controls.Apis.IsCharLowerW => Windows.Win32.UI.WindowsAndMessaging.Apis.IsCharLowerW
7077+
# DXC: Annotate new struct fields and enums
7078+
Windows.Win32.Graphics.Direct3D.Dxc.Apis.DXC_HASHFLAG_INCLUDES_SOURCE removed
7079+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG added
7080+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG.DXC_HASHFLAG_INCLUDES_SOURCE added
7081+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART added
7082+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_DXIL added
7083+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_INPUT_SIGNATURE added
7084+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_OUTPUT_SIGNATURE added
7085+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PATCH_CONSTANT_SIGNATURE added
7086+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PDB added
7087+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PDB_NAME added
7088+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PRIVATE_DATA added
7089+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_REFLECTION_DATA added
7090+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_ROOT_SIGNATURE added
7091+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_SHADER_HASH added
7092+
Windows.Win32.Graphics.Direct3D.Dxc.DxcBuffer.Encoding...System.UInt32 => Windows.Win32.Graphics.Direct3D.Dxc.DXC_CP
7093+
Windows.Win32.Graphics.Direct3D.Dxc.DxcShaderHash.Flags...System.UInt32 => Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG
7094+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerBuilder.AddPart : fourCC...UInt32 => DXC_PART
7095+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerBuilder.RemovePart : fourCC...UInt32 => DXC_PART
7096+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.FindFirstPartKind : kind...UInt32 => DXC_PART
7097+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.GetPartKind : pResult...UInt32* => DXC_PART*
7098+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.GetPartReflection : ppvObject : [In,Out] => [ComOutPtr,Out]
7099+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.CreateReflection : ppvReflection : [In,Out] => [ComOutPtr,Out]
7100+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.GetDxilContainerPart : DxcPart...UInt32 => DXC_PART
7101+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.GetDxilContainerPart : ppPartData : [Out] => [NativeArrayInfo(CountFieldName=pPartSizeInBytes),Out]

0 commit comments

Comments
 (0)