Skip to content

Commit

Permalink
DXC: Annotate new struct fields and enums
Browse files Browse the repository at this point in the history
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);
```
  • Loading branch information
MarijnS95 committed Sep 2, 2024
1 parent 17452d6 commit c287037
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 14 deletions.
3 changes: 3 additions & 0 deletions generation/WinSDK/emitter.settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,9 @@ ICreateWithTransactionEx::CreateInstance::pObject=[ComOutPtr]
IClassFactory2::CreateInstanceLic::ppvObj=[ComOutPtr]
DxcCreateInstance::ppv=[ComOutPtr]
DxcCreateInstance2::ppv=[ComOutPtr]
IDxcContainerReflection::GetPartReflection::ppvObject=[ComOutPtr]
IDxcUtils::CreateReflection::ppvReflection=[ComOutPtr]
IDxcUtils::GetDxilContainerPart::ppPartData=[NativeArrayInfo(CountFieldName = "pPartSizeInBytes")]
IWbemServices::CreateInstanceEnum::ppEnum=[ComOutPtr]
StiCreateInstanceW::ppSti=[ComOutPtr]
IMFImageSharingEngineClassFactory::CreateInstanceFromUDN::ppEngine=[ComOutPtr]
Expand Down
140 changes: 126 additions & 14 deletions generation/WinSDK/enums.json
Original file line number Diff line number Diff line change
Expand Up @@ -28759,20 +28759,6 @@
"filter": "DXC_CP_",
"header": "dxcapi.h"
},
"members": [
{
"name": "DXC_CP_ACP",
"value": "0"
},
{
"name": "DXC_CP_UTF16",
"value": "1200"
},
{
"name": "DXC_CP_UTF8",
"value": "65001"
}
],
"uses": [
{
"interface": "IDxcBlobEncoding",
Expand Down Expand Up @@ -28818,6 +28804,132 @@
"interface": "IDxcUtils",
"method": "LoadFile",
"parameter": "pCodePage"
},
{
"struct": "DxcBuffer",
"field": "Encoding"
}
]
},
{
"name": "DxcValidatorFlags",
"flags": true,
"autoPopulate": {
"filter": "DxcValidatorFlags_",
"header": "dxcapi.h"
},
"uses": [
{
"interface": "IDxcValidator",
"method": "Validate",
"parameter": "Flags"
},
{
"interface": "IDxcValidator2",
"method": "ValidateWithDebug",
"parameter": "Flags"
}
]
},
{
"name": "DxcVersionInfoFlags",
"flags": true,
"autoPopulate": {
"filter": "DxcVersionInfoFlags_",
"header": "dxcapi.h"
},
"uses": [
{
"interface": "IDxcVersionInfo",
"method": "GetFlags",
"parameter": "pFlags"
}
]
},
{
"name": "DXC_HASHFLAG",
"flags": true,
"autoPopulate": {
"filter": "DXC_HASHFLAG_",
"header": "dxcapi.h"
},
"uses": [
{
"struct": "DxcShaderHash",
"field": "Flags"
}
]
},
{
"name": "DXC_PART",
"flags": false,
"members": [
{
"name": "DXC_PART_PDB",
"value": "('I' | ('L' << 8) | ('D' << 16) | ('B' << 24))"
},
{
"name": "DXC_PART_PDB_NAME",
"value": "('I' | ('L' << 8) | ('D' << 16) | ('N' << 24))"
},
{
"name": "DXC_PART_PRIVATE_DATA",
"value": "('P' | ('R' << 8) | ('I' << 16) | ('V' << 24))"
},
{
"name": "DXC_PART_ROOT_SIGNATURE",
"value": "('R' | ('T' << 8) | ('S' << 16) | ('0' << 24))"
},
{
"name": "DXC_PART_DXIL",
"value": "('D' | ('X' << 8) | ('I' << 16) | ('L' << 24))"
},
{
"name": "DXC_PART_REFLECTION_DATA",
"value": "('S' | ('T' << 8) | ('A' << 16) | ('T' << 24))"
},
{
"name": "DXC_PART_SHADER_HASH",
"value": "('H' | ('A' << 8) | ('S' << 16) | ('H' << 24))"
},
{
"name": "DXC_PART_INPUT_SIGNATURE",
"value": "('I' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
},
{
"name": "DXC_PART_OUTPUT_SIGNATURE",
"value": "('O' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
},
{
"name": "DXC_PART_PATCH_CONSTANT_SIGNATURE",
"value": "('P' | ('S' << 8) | ('G' << 16) | ('1' << 24))"
}
],
"uses": [
{
"interface": "IDxcUtils",
"method": "GetDxilContainerPart",
"parameter": "DxcPart"
},
{
"interface": "IDxcContainerBuilder",
"method": "AddPart",
"parameter": "fourCC"
},
{
"interface": "IDxcContainerBuilder",
"method": "RemovePart",
"parameter": "fourCC"
},
{
"interface": "IDxcContainerReflection",
"method": "GetPartKind",
"parameter": "pResult"
},
{
"interface": "IDxcContainerReflection",
"method": "FindFirstPartKind",
"parameter": "kind"
}
]
},
Expand Down
25 changes: 25 additions & 0 deletions scripts/ChangesSinceLastRelease.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,28 @@ Windows.Win32.System.LibraryLoader.Apis.QueryOptionalDelayLoadedAPI added
# Correct PMPRADMINCONNECTIONHANGUPNOTIFICATION3 parameter 4
Windows.Win32.NetworkManagement.Rras.PMPRADMINCONNECTIONHANGUPNOTIFICATION3.Invoke : param3 : [In] => [In,Out]
Windows.Win32.NetworkManagement.Rras.PMPRADMINCONNECTIONHANGUPNOTIFICATION3.Invoke : param3...RAS_CONNECTION_3 => RAS_CONNECTION_3*
# DXC: Annotate new struct fields and enums
Windows.Win32.Graphics.Direct3D.Dxc.Apis.DXC_HASHFLAG_INCLUDES_SOURCE removed
Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG.DXC_HASHFLAG_INCLUDES_SOURCE added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_DXIL added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_INPUT_SIGNATURE added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_OUTPUT_SIGNATURE added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PATCH_CONSTANT_SIGNATURE added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PDB added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PDB_NAME added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_PRIVATE_DATA added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_REFLECTION_DATA added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_ROOT_SIGNATURE added
Windows.Win32.Graphics.Direct3D.Dxc.DXC_PART.DXC_PART_SHADER_HASH added
Windows.Win32.Graphics.Direct3D.Dxc.DxcBuffer.Encoding...System.UInt32 => Windows.Win32.Graphics.Direct3D.Dxc.DXC_CP
Windows.Win32.Graphics.Direct3D.Dxc.DxcShaderHash.Flags...System.UInt32 => Windows.Win32.Graphics.Direct3D.Dxc.DXC_HASHFLAG
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerBuilder.AddPart : fourCC...UInt32 => DXC_PART
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerBuilder.RemovePart : fourCC...UInt32 => DXC_PART
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.FindFirstPartKind : kind...UInt32 => DXC_PART
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.GetPartKind : pResult...UInt32* => DXC_PART*
Windows.Win32.Graphics.Direct3D.Dxc.IDxcContainerReflection.GetPartReflection : ppvObject : [In,Out] => [ComOutPtr,Out]
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.CreateReflection : ppvReflection : [In,Out] => [ComOutPtr,Out]
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.GetDxilContainerPart : DxcPart...UInt32 => DXC_PART
Windows.Win32.Graphics.Direct3D.Dxc.IDxcUtils.GetDxilContainerPart : ppPartData : [Out] => [NativeArrayInfo(CountFieldName=pPartSizeInBytes),Out]

0 comments on commit c287037

Please sign in to comment.