Skip to content

Commit

Permalink
Merge pull request #361 from tannergooding/main
Browse files Browse the repository at this point in the history
Update the repo to target .NET 8 and take advantage of new language/interop features
  • Loading branch information
tannergooding authored Oct 16, 2023
2 parents fadce5a + 1b87ebf commit 728755d
Show file tree
Hide file tree
Showing 13,838 changed files with 130,012 additions and 358,539 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
spelling_error_severity = information
spelling_exclusion_path = exclusion.dic
spelling_languages = en-us
tab_width = 4
trim_trailing_whitespace = true

Expand Down
10 changes: 6 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- Default settings that explicitly differ from the Sdk.props defaults -->
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AnalysisLevel>preview</AnalysisLevel>
<AnalysisLevel>preview-all</AnalysisLevel>
<BaseIntermediateOutputPath>$(BaseArtifactsPath)obj/$(BaseArtifactsPathSuffix)/</BaseIntermediateOutputPath>
<DebugType>embedded</DebugType>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
Expand All @@ -42,11 +42,13 @@
<BaseOutputPath>$(BaseArtifactsPath)bin/$(BaseArtifactsPathSuffix)/</BaseOutputPath>
<Company>TerraFX</Company>
<ContinuousIntegrationBuild Condition="'$(GITHUB_RUN_ID)' != ''">true</ContinuousIntegrationBuild>
<IsAotCompatible>true</IsAotCompatible>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
<Product>TerraFX.Interop.Windows</Product>
<RootNamespace>TerraFX.Interop</RootNamespace>
<VersionPrefix>10.0.22621.2</VersionPrefix>
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc3</VersionSuffix>
<VersionPrefix>10.0.22621.3</VersionPrefix>
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc1</VersionSuffix>
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
</PropertyGroup>

Expand All @@ -59,7 +61,7 @@
<Features>strict</Features>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<HighEntropyVA>true</HighEntropyVA>
<LangVersion>latest</LangVersion>
<LangVersion>preview</LangVersion>
<MinClientVersion>4.3</MinClientVersion>
<NeutralLanguage>en-US</NeutralLanguage>
<OverwriteReadOnlyFiles>true</OverwriteReadOnlyFiles>
Expand Down
5 changes: 2 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@

<!-- Package versions for package references across all projects -->
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageVersion Include="NUnit" Version="3.13.3" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions TerraFX.Interop.Windows.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".root", ".root", "{2F337CB6
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
exclusion.dic = exclusion.dic
global.json = global.json
LICENSE.md = LICENSE.md
NuGet.config = NuGet.config
Expand Down
61 changes: 61 additions & 0 deletions exclusion.dic
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
abst
amvideo
antialias
antialiased
barycentrics
cbr
cpst
dcommon
descs
deserializer
dest
dont
dxcore
dxgi
dxgicommon
dxgiformat
hlsl
hwnd
IID_DirectML
IID_OpenCL
IID_OpenGL
infos
intracoded
gdiplus
lpsz
luid
memcpy
microsoft
mips
movc
msaa
multisample
noexcept
nothrow
nums
offsetted
pinnable
postbuild
rclsid
rects
riid
sdklayers
stdcall
subobject
subobjects
subresource
subresources
swapchain
tessellator
texels
tilings
unmap
unknwnbase
vtbl
wchar
winioctl
winrt
xffff
xfffffff
xfffffffe
xffffffff
3 changes: 3 additions & 0 deletions generation/DirectX/headers/d3dx12/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ D3DX12ParsePipelineStream(const D3D12_PIPELINE_STATE_STREAM_DESC &, ID3DX12Pipel
D3DX12SerializeVersionedRootSignature(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *, D3D_ROOT_SIGNATURE_VERSION, ID3DBlob **, ID3DBlob **):HRESULT
GetRequiredIntermediateSize(ID3D12Resource *, UINT, UINT):UINT64
MemcpySubresource(const D3D12_MEMCPY_DEST *, const D3D12_SUBRESOURCE_DATA *, SIZE_T, UINT, UINT):void
MemcpySubresource(const D3D12_MEMCPY_DEST *, const void *, const D3D12_SUBRESOURCE_INFO *, SIZE_T, UINT, UINT):void
operator!=(const D3D12_BOX &, const D3D12_BOX &):bool
operator!=(const D3D12_HEAP_DESC &, const D3D12_HEAP_DESC &):bool
operator!=(const D3D12_HEAP_PROPERTIES &, const D3D12_HEAP_PROPERTIES &):bool
Expand All @@ -85,7 +86,9 @@ operator==(const D3D12_RENDER_PASS_RENDER_TARGET_DESC &, const D3D12_RENDER_PASS
operator==(const D3D12_RESOURCE_DESC &, const D3D12_RESOURCE_DESC &):bool
operator==(const D3D12_RESOURCE_DESC1 &, const D3D12_RESOURCE_DESC1 &):bool
operator==(const D3D12_VIEWPORT &, const D3D12_VIEWPORT &):bool
UpdateSubresources(ID3D12GraphicsCommandList *, ID3D12Resource *, ID3D12Resource *, UINT, UINT, UINT64, const D3D12_PLACED_SUBRESOURCE_FOOTPRINT *, const UINT *, const UINT64 *, const void *, const D3D12_SUBRESOURCE_INFO *):UINT64
UpdateSubresources(ID3D12GraphicsCommandList *, ID3D12Resource *, ID3D12Resource *, UINT64, UINT, UINT, const D3D12_SUBRESOURCE_DATA *):UINT64
UpdateSubresources(ID3D12GraphicsCommandList *, ID3D12Resource *, ID3D12Resource *, UINT64, UINT, UINT, const void *, const D3D12_SUBRESOURCE_INFO *):UINT64
__noop():int
--file
headers-d3dx12.h
Expand Down
49 changes: 49 additions & 0 deletions generation/DirectX/um/dinput/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,58 @@ DIDFT_GETTYPE
DIDFT_MAKEINSTANCE
DIEFT_GETTYPE
DIJOFS_BUTTON
DIJOFS_BUTTON0
DIJOFS_BUTTON1
DIJOFS_BUTTON2
DIJOFS_BUTTON3
DIJOFS_BUTTON4
DIJOFS_BUTTON5
DIJOFS_BUTTON6
DIJOFS_BUTTON7
DIJOFS_BUTTON8
DIJOFS_BUTTON9
DIJOFS_BUTTON10
DIJOFS_BUTTON11
DIJOFS_BUTTON12
DIJOFS_BUTTON13
DIJOFS_BUTTON14
DIJOFS_BUTTON15
DIJOFS_BUTTON16
DIJOFS_BUTTON17
DIJOFS_BUTTON18
DIJOFS_BUTTON19
DIJOFS_BUTTON20
DIJOFS_BUTTON21
DIJOFS_BUTTON22
DIJOFS_BUTTON23
DIJOFS_BUTTON24
DIJOFS_BUTTON25
DIJOFS_BUTTON26
DIJOFS_BUTTON27
DIJOFS_BUTTON28
DIJOFS_BUTTON29
DIJOFS_BUTTON30
DIJOFS_BUTTON31
DIJOFS_POV
DIJOFS_RX
DIJOFS_RY
DIJOFS_RZ
DIJOFS_SLIDER
DIJOFS_X
DIJOFS_Y
DIJOFS_Z
DIMAKEUSAGEDWORD
DIMOFS_BUTTON0
DIMOFS_BUTTON1
DIMOFS_BUTTON2
DIMOFS_BUTTON3
DIMOFS_BUTTON4
DIMOFS_BUTTON5
DIMOFS_BUTTON6
DIMOFS_BUTTON7
DIMOFS_X
DIMOFS_Y
DIMOFS_Z
DIMOUSE_BUTTON0
DIMOUSE_BUTTON1
DIMOUSE_BUTTON2
Expand Down
2 changes: 1 addition & 1 deletion generation/Gdiplus/um/gdiplusmetaheader/generate.rsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@../../../settings.rsp
@../../../remap.rsp
--exclude
Gdiplus.MetafileHeader.GetEmfHeader():const Gdiplus.ENHMETAHEADER3 *
Gdiplus.MetafileHeader.GetEmfHeader():const ENHMETAHEADER3 *
Gdiplus.MetafileHeader.GetWmfHeader():const METAHEADER *
Gdiplus.MetafileHeader.IsEmfOrEmfPlus():BOOL
Gdiplus.MetafileHeader.IsEmfPlus():BOOL
Expand Down
10 changes: 5 additions & 5 deletions generation/Gdiplus/um/gdiplustypes/generate.rsp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@../../../settings.rsp
@../../../remap.rsp
--exclude
Gdiplus.PathData.PathData(const Gdiplus.PathData &):void
Gdiplus.PathData.PathData(const PathData &):void
Gdiplus.PathData.Dispose():void
Gdiplus.Rect.Clone():Gdiplus.Rect *
Gdiplus.Rect.Intersect(const Gdiplus.Rect &):BOOL
Gdiplus.RectF.Clone():Gdiplus.RectF *
Gdiplus.RectF.Intersect(const Gdiplus.RectF &):BOOL
Gdiplus.Rect.Clone():Rect *
Gdiplus.Rect.Intersect(const Rect &):BOOL
Gdiplus.RectF.Clone():RectF *
Gdiplus.RectF.Intersect(const RectF &):BOOL
GDIPLUS_MAX
GDIPLUS_MIN
operator+
Expand Down
3 changes: 3 additions & 0 deletions generation/Windows/shared/ipmib/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ANY_SIZE
ICMP4_ISTYPEERROR
ICMP6_ISTYPEERROR
ICMP6_ISTYPEINFORMATIONAL
SIZEOF_BASIC_MIB_MFE
SIZEOF_BASIC_MIB_MFE_STATS
SIZEOF_BASIC_MIB_MFE_STATS_EX
SIZEOF_IPADDRTABLE
SIZEOF_IPFORWARDTABLE
SIZEOF_IPNETTABLE
Expand Down
3 changes: 3 additions & 0 deletions generation/Windows/um/ShlObj_core/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ ILLoadFromStream
ILNext
ILSkip
SHCreateFileExtractIconA
SHELLSTATE_SIZE_WIN95
SHELLSTATE_SIZE_NT4
SHELLSTATE_SIZE_IE4
Shell_GetCachedImageIndex(PCWSTR, int, UINT):int
SHStartNetConnectionDialogA
SHSTDDOCAPI_
Expand Down
1 change: 1 addition & 0 deletions generation/Windows/um/icm/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
CMGetPS2ColorRenderingDictionary(HPROFILE, DWORD, LPBYTE, LPDWORD, LPBOOL):BOOL
CMGetPS2ColorRenderingIntent(HPROFILE, DWORD, LPBYTE, LPDWORD):BOOL
CMGetPS2ColorSpaceArray(HPROFILE, DWORD, DWORD, LPBYTE, LPDWORD, LPBOOL):BOOL
ColorProfileGetDeviceCapabilities(WCS_PROFILE_MANAGEMENT_SCOPE, LUID, UINT32, WCS_DEVICE_CAPABILITIES_TYPE, PVOID):HRESULT
--file
um-icm.h
--methodClassName
Expand Down
2 changes: 2 additions & 0 deletions generation/settings.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ exclude-com-proxies
exclude-empty-records
exclude-enum-operators
generate-aggressive-inlining
generate-callconv-member-function
generate-cpp-attributes
generate-disable-runtime-marshalling
generate-doc-includes
generate-file-scoped-namespaces
generate-guid-member
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "8.0.100-preview",
"allowPrerelease": true,
"rollForward": "latestFeature"
}
Expand Down
7 changes: 4 additions & 3 deletions samples/DirectX/D3D11/HelloTriangle11.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ protected override void CreateAssets()
{
var entryPoint = 0x00006E69614D5356; // VSMain
var target = 0x0000305F345F7376; // vs_4_0
ThrowIfFailed(D3DCompileFromFile((ushort*)fileName, null, null, (sbyte*)&entryPoint, (sbyte*)&target, 0, 0, vertexShaderBlob.GetAddressOf(), null));
ThrowIfFailed(D3DCompileFromFile(fileName, null, null, (sbyte*)&entryPoint, (sbyte*)&target, 0, 0, vertexShaderBlob.GetAddressOf(), null));

ThrowIfFailed(D3DDevice->CreateVertexShader(vertexShaderBlob.Get()->GetBufferPointer(), vertexShaderBlob.Get()->GetBufferSize(), pClassLinkage: null, vertexShader));

entryPoint = 0x00006E69614D5350; // PSMain
target = 0x0000305F345F7370; // ps_4_0
ThrowIfFailed(D3DCompileFromFile((ushort*)fileName, null, null, (sbyte*)&entryPoint, (sbyte*)&target, 0, 0, pixelShaderBlob.GetAddressOf(), null));
ThrowIfFailed(D3DCompileFromFile(fileName, null, null, (sbyte*)&entryPoint, (sbyte*)&target, 0, 0, pixelShaderBlob.GetAddressOf(), null));

ThrowIfFailed(D3DDevice->CreatePixelShader(pixelShaderBlob.Get()->GetBufferPointer(), pixelShaderBlob.Get()->GetBufferSize(), pClassLinkage: null, pixelShader));
}
Expand Down Expand Up @@ -89,7 +89,8 @@ protected override void CreateAssets()

protected virtual void CreateBuffers()
{
_vertexBuffer = CreateVertexBuffer();
var vertexBuffer = CreateVertexBuffer();
_vertexBuffer = vertexBuffer;
}

protected virtual ID3D11Buffer* CreateVertexBuffer()
Expand Down
2 changes: 1 addition & 1 deletion samples/DirectX/D3D11/Shared/DX11Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public abstract unsafe class DX11Sample : DXSample
private D3D11_VIEWPORT _viewport;
private RECT _scissorRect;

public DX11Sample(string name) : base(name)
protected DX11Sample(string name) : base(name)
{
}

Expand Down
5 changes: 1 addition & 4 deletions samples/DirectX/D3D12/HelloBundles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,5 @@ void DestroyBundleAllocator()
}

protected override void Draw()
{
// Execute the commands stored in the bundle.
GraphicsCommandList->ExecuteBundle(_bundle);
}
=> GraphicsCommandList->ExecuteBundle(_bundle);
}
6 changes: 3 additions & 3 deletions samples/DirectX/D3D12/HelloConstBuffer12.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from D3D12HelloConstBuffor in https://github.com/Microsoft/DirectX-Graphics-Samples
// Ported from D3D12HelloConstBuffer in https://github.com/Microsoft/DirectX-Graphics-Samples
// Original source is Copyright © Microsoft. All rights reserved. Licensed under the MIT License (MIT).

using System;
Expand Down Expand Up @@ -124,11 +124,11 @@ protected override void CreateDescriptorHeaps()
{
var entryPoint = 0x00006E69614D5356; // VSMain
var target = 0x0000305F355F7376; // vs_5_0
ThrowIfFailed(D3DCompileFromFile((ushort*)fileName, pDefines: null, pInclude: null, (sbyte*)&entryPoint, (sbyte*)&target, compileFlags, Flags2: 0, vertexShader.GetAddressOf(), ppErrorMsgs: null));
ThrowIfFailed(D3DCompileFromFile(fileName, pDefines: null, pInclude: null, (sbyte*)&entryPoint, (sbyte*)&target, compileFlags, Flags2: 0, vertexShader.GetAddressOf(), ppErrorMsgs: null));

entryPoint = 0x00006E69614D5350; // PSMain
target = 0x0000305F355F7370; // ps_5_0
ThrowIfFailed(D3DCompileFromFile((ushort*)fileName, pDefines: null, pInclude: null, (sbyte*)&entryPoint, (sbyte*)&target, compileFlags, Flags2: 0, pixelShader.GetAddressOf(), ppErrorMsgs: null));
ThrowIfFailed(D3DCompileFromFile(fileName, pDefines: null, pInclude: null, (sbyte*)&entryPoint, (sbyte*)&target, compileFlags, Flags2: 0, pixelShader.GetAddressOf(), ppErrorMsgs: null));
}

// Define the vertex input layout.
Expand Down
2 changes: 1 addition & 1 deletion samples/DirectX/D3D12/HelloMultiSampling12.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public uint MSAACount

// There are 2 special values for quality levels
// * -1 means all samples should be evenly distributed among the pixel
// * -2 means all samples should be in the centre of the pixel
// * -2 means all samples should be in the center of the pixel
_msaaDesc = new DXGI_SAMPLE_DESC(value, msaa.NumQualityLevels - 1);
}
}
Expand Down
6 changes: 3 additions & 3 deletions samples/DirectX/D3D12/HelloTexture12.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ protected override void CreateDescriptorHeaps()
{
var entryPoint = 0x00006E69614D5356; // VSMain
var target = 0x0000305F355F7376; // vs_5_0
ThrowIfFailed(D3DCompileFromFile((ushort*)fileName, pDefines: null, pInclude: null, (sbyte*)&entryPoint, (sbyte*)&target, compileFlags, Flags2: 0, vertexShader.GetAddressOf(), ppErrorMsgs: null));
ThrowIfFailed(D3DCompileFromFile(fileName, pDefines: null, pInclude: null, (sbyte*)&entryPoint, (sbyte*)&target, compileFlags, Flags2: 0, vertexShader.GetAddressOf(), ppErrorMsgs: null));

entryPoint = 0x00006E69614D5350; // PSMain
target = 0x0000305F355F7370; // ps_5_0
ThrowIfFailed(D3DCompileFromFile((ushort*)fileName, pDefines: null, pInclude: null, (sbyte*)&entryPoint, (sbyte*)&target, compileFlags, Flags2: 0, pixelShader.GetAddressOf(), ppErrorMsgs: null));
ThrowIfFailed(D3DCompileFromFile(fileName, pDefines: null, pInclude: null, (sbyte*)&entryPoint, (sbyte*)&target, compileFlags, Flags2: 0, pixelShader.GetAddressOf(), ppErrorMsgs: null));
}

// Define the vertex input layout.
Expand Down Expand Up @@ -422,7 +422,7 @@ protected override void SetGraphicsCommandListState()
GraphicsCommandList->SetGraphicsRootDescriptorTable(0, _srvHeap->GetGPUDescriptorHandleForHeapStart());
}

public new struct Vertex
internal new struct Vertex
{
public Vector3 Position;

Expand Down
Loading

0 comments on commit 728755d

Please sign in to comment.