Skip to content

Commit 478cef8

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 a4418f7 commit 478cef8

File tree

3 files changed

+154
-14
lines changed

3 files changed

+154
-14
lines changed

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
@@ -28765,20 +28765,6 @@
2876528765
"filter": "DXC_CP_",
2876628766
"header": "dxcapi.h"
2876728767
},
28768-
"members": [
28769-
{
28770-
"name": "DXC_CP_ACP",
28771-
"value": "0"
28772-
},
28773-
{
28774-
"name": "DXC_CP_UTF16",
28775-
"value": "1200"
28776-
},
28777-
{
28778-
"name": "DXC_CP_UTF8",
28779-
"value": "65001"
28780-
}
28781-
],
2878228768
"uses": [
2878328769
{
2878428770
"interface": "IDxcBlobEncoding",
@@ -28824,6 +28810,132 @@
2882428810
"interface": "IDxcUtils",
2882528811
"method": "LoadFile",
2882628812
"parameter": "pCodePage"
28813+
},
28814+
{
28815+
"struct": "DxcBuffer",
28816+
"field": "Encoding"
28817+
}
28818+
]
28819+
},
28820+
{
28821+
"name": "DxcValidatorFlags",
28822+
"flags": true,
28823+
"autoPopulate": {
28824+
"filter": "DxcValidatorFlags_",
28825+
"header": "dxcapi.h"
28826+
},
28827+
"uses": [
28828+
{
28829+
"interface": "IDxcValidator",
28830+
"method": "Validate",
28831+
"parameter": "Flags"
28832+
},
28833+
{
28834+
"interface": "IDxcValidator2",
28835+
"method": "ValidateWithDebug",
28836+
"parameter": "Flags"
28837+
}
28838+
]
28839+
},
28840+
{
28841+
"name": "DxcVersionInfoFlags",
28842+
"flags": true,
28843+
"autoPopulate": {
28844+
"filter": "DxcVersionInfoFlags_",
28845+
"header": "dxcapi.h"
28846+
},
28847+
"uses": [
28848+
{
28849+
"interface": "IDxcVersionInfo",
28850+
"method": "GetFlags",
28851+
"parameter": "pFlags"
28852+
}
28853+
]
28854+
},
28855+
{
28856+
"name": "DXC_HASHFLAG",
28857+
"flags": true,
28858+
"autoPopulate": {
28859+
"filter": "DXC_HASHFLAG_",
28860+
"header": "dxcapi.h"
28861+
},
28862+
"uses": [
28863+
{
28864+
"struct": "DxcShaderHash",
28865+
"field": "Flags"
28866+
}
28867+
]
28868+
},
28869+
{
28870+
"name": "DXC_PART",
28871+
"flags": false,
28872+
"members": [
28873+
{
28874+
"name": "DXC_PART_PDB",
28875+
"value": "('I' | ('L' << 8) | ('D' << 16) | ('B' << 24))"
28876+
},
28877+
{
28878+
"name": "DXC_PART_PDB_NAME",
28879+
"value": "('I' | ('L' << 8) | ('D' << 16) | ('N' << 24))"
28880+
},
28881+
{
28882+
"name": "DXC_PART_PRIVATE_DATA",
28883+
"value": "('P' | ('R' << 8) | ('I' << 16) | ('V' << 24))"
28884+
},
28885+
{
28886+
"name": "DXC_PART_ROOT_SIGNATURE",
28887+
"value": "('R' | ('T' << 8) | ('S' << 16) | ('0' << 24))"
28888+
},
28889+
{
28890+
"name": "DXC_PART_DXIL",
28891+
"value": "('D' | ('X' << 8) | ('I' << 16) | ('L' << 24))"
28892+
},
28893+
{
28894+
"name": "DXC_PART_REFLECTION_DATA",
28895+
"value": "('S' | ('T' << 8) | ('A' << 16) | ('T' << 24))"
28896+
},
28897+
{
28898+
"name": "DXC_PART_SHADER_HASH",
28899+
"value": "('H' | ('A' << 8) | ('S' << 16) | ('H' << 24))"
28900+
},
28901+
{
28902+
"name": "DXC_PART_INPUT_SIGNATURE",
28903+
"value": "('I' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
28904+
},
28905+
{
28906+
"name": "DXC_PART_OUTPUT_SIGNATURE",
28907+
"value": "('O' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
28908+
},
28909+
{
28910+
"name": "DXC_PART_PATCH_CONSTANT_SIGNATURE",
28911+
"value": "('P' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
28912+
}
28913+
],
28914+
"uses": [
28915+
{
28916+
"interface": "IDxcUtils",
28917+
"method": "GetDxilContainerPart",
28918+
"parameter": "DxcPart"
28919+
},
28920+
{
28921+
"interface": "IDxcContainerBuilder",
28922+
"method": "AddPart",
28923+
"parameter": "fourCC"
28924+
},
28925+
{
28926+
"interface": "IDxcContainerBuilder",
28927+
"method": "RemovePart",
28928+
"parameter": "fourCC"
28929+
},
28930+
{
28931+
"interface": "IDxcContainerReflection",
28932+
"method": "GetPartKind",
28933+
"parameter": "pResult"
28934+
},
28935+
{
28936+
"interface": "IDxcContainerReflection",
28937+
"method": "FindFirstPartKind",
28938+
"parameter": "kind"
2882728939
}
2882828940
]
2882928941
},

scripts/ChangesSinceLastRelease.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6706,3 +6706,28 @@ Windows.Win32.System.WindowsProgramming.Apis.PROCESS_CREATION_MITIGATION_POLICY_
67066706
Windows.Win32.System.WindowsProgramming.Apis.PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE => Windows.Win32.System.Threading.Apis.PROCESS_CREATION_MITIGATION_POLICY_SEHOP_ENABLE
67076707
# DPI_AWARENESS_CONTEXT value -1 is valid but metadata indicates otherwise #2060
67086708
Windows.Win32.UI.HiDpi.DPI_AWARENESS_CONTEXT : [InvalidHandleValue(-1),InvalidHandleValue(0),NativeTypedef] => [InvalidHandleValue(0),NativeTypedef]
6709+
# DXC: Annotate new struct fields and enums
6710+
Windows.Win32.Graphics.Direct3D.Dxc.Apis.DXC_HASHFLAG_INCLUDES_SOURCE removed
6711+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG added
6712+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG.DXC_HASHFLAG_INCLUDES_SOURCE added
6713+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART added
6714+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_DXIL added
6715+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_INPUT_SIGNATURE added
6716+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_OUTPUT_SIGNATURE added
6717+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PATCH_CONSTANT_SIGNATURE added
6718+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PDB added
6719+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PDB_NAME added
6720+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PRIVATE_DATA added
6721+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_REFLECTION_DATA added
6722+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_ROOT_SIGNATURE added
6723+
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_SHADER_HASH added
6724+
Windows.Win32.Graphics.Direct3D.Dxc.DxcBuffer.Encoding...System.UInt32 => Windows.Win32.Graphics.Direct3D.Dxc.DXC_CP
6725+
Windows.Win32.Graphics.Direct3D.Dxc.DxcShaderHash.Flags...System.UInt32 => Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG
6726+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerBuilder.AddPart : fourCC...UInt32 => DXC_PART
6727+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerBuilder.RemovePart : fourCC...UInt32 => DXC_PART
6728+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.FindFirstPartKind : kind...UInt32 => DXC_PART
6729+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.GetPartKind : pResult...UInt32* => DXC_PART*
6730+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.GetPartReflection : ppvObject : [In,Out] => [ComOutPtr,Out]
6731+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.CreateReflection : ppvReflection : [In,Out] => [ComOutPtr,Out]
6732+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.GetDxilContainerPart : DxcPart...UInt32 => DXC_PART
6733+
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.GetDxilContainerPart : ppPartData : [Out] => [NativeArrayInfo(CountFieldName=pPartSizeInBytes),Out]

0 commit comments

Comments
 (0)