Skip to content

Commit

Permalink
Override D3D headers with those from D3D12 "Agility SDK" nuget package (
Browse files Browse the repository at this point in the history
#1445)

* Use Direct3D12 nuget package for d3d12 headers

* Workaround #1369
  • Loading branch information
damyanp authored Jan 25, 2023
1 parent c7f4a60 commit cd755e4
Show file tree
Hide file tree
Showing 12 changed files with 10,252 additions and 6,667 deletions.
1 change: 1 addition & 0 deletions BuildTools/BuildTools.proj
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="$(LastWin32MetadataReleaseVersion)" GeneratePathProperty="True">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Direct3D.D3D12" Version="1.608.2" GeneratePathProperty="true"/>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions generation/WinSDK/Partitions/Direct3D12/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
<IncludeRoot>/um/d3d12shader.h
--namespace
Windows.Win32.Graphics.Direct3D12
--with-type
D3D12_BARRIER_SYNC=uint
--with-type
D3D12_BARRIER_ACCESS=uint
55 changes: 51 additions & 4 deletions generation/WinSDK/RecompiledIdlHeaders/um/D3DCommon.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Licensed under the MIT license
*
*-------------------------------------------------------------------------------------*/
import "OAIdl.idl";
import "OCIdl.idl";
import "oaidl.idl";
import "ocidl.idl";

//----------------------------------------------------------------------------
//
Expand Down Expand Up @@ -62,7 +62,7 @@ typedef enum D3D_PRIMITIVE_TOPOLOGY
D3D_PRIMITIVE_TOPOLOGY_LINESTRIP = 3,
D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4,
D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5,
// 6 is reserved for legacy triangle fans
D3D_PRIMITIVE_TOPOLOGY_TRIANGLEFAN = 6,
// Adjacency values should be equal to (0x8 & non-adjacency):
D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10,
D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11,
Expand Down Expand Up @@ -153,7 +153,7 @@ typedef enum D3D_PRIMITIVE_TOPOLOGY
D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST
} D3D_PRIMITIVE_TOPOLOGY;

typedef enum D3D_PRIMITIVE
Expand Down Expand Up @@ -327,6 +327,8 @@ cpp_quote("#define D3D_SHADER_FEATURE_RESOURCE_DESCRIPTOR_HEAP_INDEXING
cpp_quote("#define D3D_SHADER_FEATURE_SAMPLER_DESCRIPTOR_HEAP_INDEXING 0x4000000")
cpp_quote("#define D3D_SHADER_FEATURE_WAVE_MMA 0x8000000")
cpp_quote("#define D3D_SHADER_FEATURE_ATOMIC_INT64_ON_DESCRIPTOR_HEAP_RESOURCE 0x10000000")
cpp_quote("#define D3D_SHADER_FEATURE_ADVANCED_TEXTURE_OPS 0x20000000")
cpp_quote("#define D3D_SHADER_FEATURE_WRITEABLE_MSAA_TEXTURES 0x40000000")

// Additional internal shader feature flags are listed in dxbcutils.h (not relevant/useful for public to see)
// When adding entries here, make sure they don't conflict with what's there.
Expand Down Expand Up @@ -891,6 +893,51 @@ typedef enum _D3D_PARAMETER_FLAGS
D3D_PF_FORCE_DWORD = 0x7fffffff
} D3D_PARAMETER_FLAGS;

// Format Layout Properties
typedef enum D3D_FORMAT_LAYOUT
{
D3DFL_STANDARD = 0, // standard layout
D3DFL_CUSTOM = -1 // custom layout
// Note, 1 bit allocated for this in FORMAT_DETAIL below. If you add fields here, add bits...
// NOTE SIGNED VALUES ARE USED SINCE COMPILER MAKES ENUMS SIGNED, AND BITFIELDS ARE SIGN EXTENDED ON READ
} D3D_FORMAT_LAYOUT;

typedef enum D3D_FORMAT_TYPE_LEVEL
{
D3DFTL_NO_TYPE = 0,
D3DFTL_PARTIAL_TYPE = -2,
D3DFTL_FULL_TYPE = -1,
// Note, 2 bits allocated for this in FORMAT_DETAIL below. If you add fields here, add bits...
// NOTE SIGNED VALUES ARE USED SINCE COMPILER MAKES ENUMS SIGNED, AND BITFIELDS ARE SIGN EXTENDED ON READ
} D3D_FORMAT_TYPE_LEVEL;

typedef enum D3D_FORMAT_COMPONENT_NAME
{
D3DFCN_R = -4,
D3DFCN_G = -3,
D3DFCN_B = -2,
D3DFCN_A = -1,
D3DFCN_D = 0,
D3DFCN_S = 1,
D3DFCN_X = 2,
// Note, 3 bits allocated for this in FORMAT_DETAIL below. If you add fields here, add bits...
// NOTE SIGNED VALUES ARE USED SINCE COMPILER MAKES ENUMS SIGNED, AND BITFIELDS ARE SIGN EXTENDED ON READ
} D3D_FORMAT_COMPONENT_NAME;

typedef enum D3D_FORMAT_COMPONENT_INTERPRETATION
{
D3DFCI_TYPELESS = 0,
D3DFCI_FLOAT = -4,
D3DFCI_SNORM = -3,
D3DFCI_UNORM = -2,
D3DFCI_SINT = -1,
D3DFCI_UINT = 1,
D3DFCI_UNORM_SRGB = 2,
D3DFCI_BIASED_FIXED_2_8 = 3,
// Note, 3 bits allocated for this in FORMAT_DETAIL below. If you add fields here, add bits...
// NOTE SIGNED VALUES ARE USED SINCE COMPILER MAKES ENUMS SIGNED, AND BITFIELDS ARE SIGN EXTENDED ON READ
} D3D_FORMAT_COMPONENT_INTERPRETATION;

// Well-Known Private Data IDs (WKPDID_*):

// WKPDID_D3DDebugObjectName provides a unique name to objects in order to assist the developer during debugging.
Expand Down
Loading

0 comments on commit cd755e4

Please sign in to comment.