mirror of
https://github.com/amerkoleci/Vortice.Win32.git
synced 2026-01-14 08:06:02 +08:00
Update to official .NET 7 SDK and improve bindings.
This commit is contained in:
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@@ -5,15 +5,16 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
- '*.md'
|
- '*.md'
|
||||||
- 'LICENSE'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
- '*.md'
|
- '*.md'
|
||||||
- 'LICENSE'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: false
|
DOTNET_CLI_TELEMETRY_OPTOUT: false
|
||||||
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -22,18 +23,21 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install .NET 7.0.x
|
- name: Add msbuild to PATH
|
||||||
|
uses: microsoft/setup-msbuild@v1.1
|
||||||
|
|
||||||
|
- name: Install .NET 7 SDK
|
||||||
uses: actions/setup-dotnet@v2
|
uses: actions/setup-dotnet@v2
|
||||||
with:
|
with:
|
||||||
dotnet-version: 7.0.x
|
dotnet-version: 7.0.100
|
||||||
include-prerelease: true
|
|
||||||
|
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: dotnet pack Vortice.Win32.sln --configuration Release --output build/packages
|
run: dotnet pack Vortice.Win32.sln --configuration Release --output artifacts
|
||||||
|
|
||||||
- name: Publish to NuGet
|
- name: Upload Package Artifacts
|
||||||
if: github.event_name == 'push'
|
uses: actions/upload-artifact@v3
|
||||||
run: dotnet nuget push build/packages/**/*.nupkg -k ${{secrets.NUGET_TOKEN}} --skip-duplicate --source https://api.nuget.org/v3/index.json
|
with:
|
||||||
|
name: Packages
|
||||||
|
path: artifacts\*.nupkg
|
||||||
|
if-no-files-found: error
|
||||||
|
|||||||
@@ -1,31 +1,38 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LangVersion>preview</LangVersion>
|
<RepositoryUrl>https://github.com/amerkoleci/Vortice.Win32</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
<LangVersion>11.0</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<DebugType>embedded</DebugType>
|
||||||
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
|
<Features>strict</Features>
|
||||||
|
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||||
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||||
|
<RestoreConfigFile>$(MSBuildThisFileDirectory)NuGet.config</RestoreConfigFile>
|
||||||
|
|
||||||
<VersionPrefix>1.8.4</VersionPrefix>
|
<VersionPrefix>1.8.5</VersionPrefix>
|
||||||
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
|
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
|
||||||
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<NoWarn>$(NoWarn);AD0001;CS1591;CS1701;CA2252;</NoWarn>
|
<NoWarn>$(NoWarn);AD0001;CS1591;CS1701;CA2252;</NoWarn>
|
||||||
<UseSharedCompilation>true</UseSharedCompilation>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||||
|
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RepositoryUrl>https://github.com/amerkoleci/Vortice.Win32</RepositoryUrl>
|
<Authors>Amer Koleci and Contributors</Authors>
|
||||||
<RepositoryType>git</RepositoryType>
|
|
||||||
|
|
||||||
<ProjectUrl>https://github.com/amerkoleci/Vortice.Win32</ProjectUrl>
|
|
||||||
<Authors>Amer Koleci</Authors>
|
|
||||||
<Owners>Amer Koleci</Owners>
|
|
||||||
<Company>Amer Koleci</Company>
|
<Company>Amer Koleci</Company>
|
||||||
<Copyright>Copyright © 2022 Amer Koleci</Copyright>
|
<Copyright>Copyright © Amer Koleci and Contributors</Copyright>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||||
<PackageTags>win32 graphics gamedev core standard game vortice</PackageTags>
|
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- https://github.com/dotnet/sourcelink -->
|
<!-- https://github.com/dotnet/sourcelink -->
|
||||||
@@ -38,10 +45,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
|
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="all" />
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PackageReference Include="PolySharp" PrivateAssets="all" />
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
33
Directory.Packages.props
Normal file
33
Directory.Packages.props
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Directory.Packages.props is automatically picked up and imported by
|
||||||
|
Microsoft.Common.targets. This file needs to exist, even if empty so that
|
||||||
|
files in the parent directory tree, with the same name, are not imported
|
||||||
|
instead. The import fairly late and most other props/targets will have been
|
||||||
|
imported beforehand. We also don't need to add ourselves to
|
||||||
|
MSBuildAllProjects, as that is done by the file that imports us.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Package versions for package references across all projects -->
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
|
||||||
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||||
|
<PackageVersion Include="NUnit" Version="3.13.3" />
|
||||||
|
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||||
|
|
||||||
|
<PackageVersion Include="PolySharp" Version="1.8.0" />
|
||||||
|
<PackageVersion Include="CommunityToolkit.Diagnostics" Version="8.0.0" />
|
||||||
|
|
||||||
|
<PackageVersion Include="System.Memory" Version="4.5.4" />
|
||||||
|
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
||||||
|
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
||||||
|
|
||||||
|
<!-- Generator -->
|
||||||
|
<PackageVersion Include="MessagePack" Version="2.4.35" />
|
||||||
|
<PackageVersion Include="Newtonsoft.Json" Version="13.0.2-beta3" />
|
||||||
|
<PackageVersion Include="Microsoft.Windows.SDK.Win32Docs" Version="0.1.8-alpha" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2022 Amer Koleci
|
Copyright (c) 2022 Amer Koleci and Contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
copy of this software and associated documentation files (the "Software"),
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{065268A8
|
|||||||
.gitignore = .gitignore
|
.gitignore = .gitignore
|
||||||
Directory.Build.props = Directory.Build.props
|
Directory.Build.props = Directory.Build.props
|
||||||
Directory.Build.targets = Directory.Build.targets
|
Directory.Build.targets = Directory.Build.targets
|
||||||
|
Directory.Packages.props = Directory.Packages.props
|
||||||
|
global.json = global.json
|
||||||
LICENSE = LICENSE
|
LICENSE = LICENSE
|
||||||
NuGet.config = NuGet.config
|
NuGet.config = NuGet.config
|
||||||
README.md = README.md
|
README.md = README.md
|
||||||
|
|||||||
9
global.json
Normal file
9
global.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"sdk": {
|
||||||
|
"version": "7.0.100",
|
||||||
|
"rollForward": "latestFeature"
|
||||||
|
},
|
||||||
|
"msbuild-sdks": {
|
||||||
|
"MSBuild.Sdk.Extras": "3.0.44"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MessagePack" Version="2.4.35" />
|
<PackageReference Include="MessagePack" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2-beta2" />
|
<PackageReference Include="Newtonsoft.Json" />
|
||||||
<PackageReference Include="Microsoft.Windows.SDK.Win32Docs" Version="0.1.8-alpha" />
|
<PackageReference Include="Microsoft.Windows.SDK.Win32Docs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public static class Program
|
|||||||
"Graphics.Direct2D.json",
|
"Graphics.Direct2D.json",
|
||||||
"Graphics.Imaging.D2D.json",
|
"Graphics.Imaging.D2D.json",
|
||||||
"Graphics.DirectComposition.json",
|
"Graphics.DirectComposition.json",
|
||||||
"Graphics.Direct3D9.json",
|
//"Graphics.Direct3D9.json",
|
||||||
|
|
||||||
// Media
|
// Media
|
||||||
//"Media.Audio.json",
|
//"Media.Audio.json",
|
||||||
@@ -1117,7 +1117,7 @@ public static class Program
|
|||||||
//DocGenerator.Generate(new[] { "DWRITE" }, Path.Combine(repoRoot, "Generated", "Graphics", "DirectWrite.xml"));
|
//DocGenerator.Generate(new[] { "DWRITE" }, Path.Combine(repoRoot, "Generated", "Graphics", "DirectWrite.xml"));
|
||||||
//DocGenerator.Generate(new[] { "WIC" }, Path.Combine(repoRoot, "Generated", "Graphics", "Imaging.xml"));
|
//DocGenerator.Generate(new[] { "WIC" }, Path.Combine(repoRoot, "Generated", "Graphics", "Imaging.xml"));
|
||||||
|
|
||||||
DocGenerator.Generate(new[] { "D3D9" }, Path.Combine(d3d9Path, "Direct3D9.xml"));
|
//DocGenerator.Generate(new[] { "D3D9" }, Path.Combine(d3d9Path, "Direct3D9.xml"));
|
||||||
//DocGenerator.Generate(new[] { "D3D11" }, Path.Combine(d3d11Path, "Direct3D11.xml"));
|
//DocGenerator.Generate(new[] { "D3D11" }, Path.Combine(d3d11Path, "Direct3D11.xml"));
|
||||||
//DocGenerator.Generate(new[] { "D3D12" }, Path.Combine(d3d12Path, "Direct3D12.xml"));
|
//DocGenerator.Generate(new[] { "D3D12" }, Path.Combine(d3d12Path, "Direct3D12.xml"));
|
||||||
//DocGenerator.Generate(new[] { "DComposition" }, Path.Combine(directCompositionPath, "DirectComposition.xml"));
|
//DocGenerator.Generate(new[] { "DComposition" }, Path.Combine(directCompositionPath, "DirectComposition.xml"));
|
||||||
@@ -2391,9 +2391,10 @@ public static class Program
|
|||||||
out string parameterType,
|
out string parameterType,
|
||||||
out string parameterName);
|
out string parameterName);
|
||||||
|
|
||||||
if (method.Name == "CreateWrappedResource")
|
if (method.Name == "CheckFeatureSupport" &&
|
||||||
|
parameterName == "FeatureSupportDataSize")
|
||||||
{
|
{
|
||||||
|
parameterType = "int";
|
||||||
}
|
}
|
||||||
|
|
||||||
argumentBuilder
|
argumentBuilder
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>Direct2D1 bindings.</Description>
|
<Description>Direct2D1 bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>DXC bindings.</Description>
|
<Description>DXC bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>FXC bindings.</Description>
|
<Description>FXC bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ public unsafe partial struct ID3D11Device : INativeGuid
|
|||||||
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11Device::CheckFeatureSupport"]/*' />
|
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11Device::CheckFeatureSupport"]/*' />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(33)]
|
[VtblIndex(33)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D11Device*, Feature, void*, uint, int>)(lpVtbl[33]))((ID3D11Device*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D11Device*, Feature, void*, int, int>)(lpVtbl[33]))((ID3D11Device*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11Device::GetPrivateData"]/*' />
|
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11Device::GetPrivateData"]/*' />
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ public unsafe partial struct ID3D11Device1 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(33)]
|
[VtblIndex(33)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D11Device1*, Feature, void*, uint, int>)(lpVtbl[33]))((ID3D11Device1*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D11Device1*, Feature, void*, int, int>)(lpVtbl[33]))((ID3D11Device1*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ public unsafe partial struct ID3D11Device2 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(33)]
|
[VtblIndex(33)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D11Device2*, Feature, void*, uint, int>)(lpVtbl[33]))((ID3D11Device2*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D11Device2*, Feature, void*, int, int>)(lpVtbl[33]))((ID3D11Device2*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ public unsafe partial struct ID3D11Device3 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(33)]
|
[VtblIndex(33)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D11Device3*, Feature, void*, uint, int>)(lpVtbl[33]))((ID3D11Device3*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D11Device3*, Feature, void*, int, int>)(lpVtbl[33]))((ID3D11Device3*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ public unsafe partial struct ID3D11Device4 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(33)]
|
[VtblIndex(33)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D11Device4*, Feature, void*, uint, int>)(lpVtbl[33]))((ID3D11Device4*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D11Device4*, Feature, void*, int, int>)(lpVtbl[33]))((ID3D11Device4*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ public unsafe partial struct ID3D11Device5 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D11Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(33)]
|
[VtblIndex(33)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D11Device5*, Feature, void*, uint, int>)(lpVtbl[33]))((ID3D11Device5*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D11Device5*, Feature, void*, int, int>)(lpVtbl[33]))((ID3D11Device5*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
/// <inheritdoc cref="ID3D11Device.GetPrivateData" />
|
||||||
|
|||||||
@@ -245,9 +245,9 @@ public unsafe partial struct ID3D11VideoDevice2 : INativeGuid
|
|||||||
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoDevice2::CheckFeatureSupport"]/*' />
|
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoDevice2::CheckFeatureSupport"]/*' />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(24)]
|
[VtblIndex(24)]
|
||||||
public HResult CheckFeatureSupport(FeatureVideo Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(FeatureVideo Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D11VideoDevice2*, FeatureVideo, void*, uint, int>)(lpVtbl[24]))((ID3D11VideoDevice2*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D11VideoDevice2*, FeatureVideo, void*, int, int>)(lpVtbl[24]))((ID3D11VideoDevice2*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoDevice2::NegotiateCryptoSessionKeyExchangeMT"]/*' />
|
/// <include file='../Direct3D11.xml' path='doc/member[@name="ID3D11VideoDevice2::NegotiateCryptoSessionKeyExchangeMT"]/*' />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>Direct3D11 bindings.</Description>
|
<Description>Direct3D11 bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>Direct3D11on12 bindings.</Description>
|
<Description>Direct3D11on12 bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public static unsafe partial class Apis
|
|||||||
PlaneCount = 0,
|
PlaneCount = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (device->CheckFeatureSupport(Feature.FormatInfo, &formatInfo, (uint)(sizeof(FeatureDataFormatInfo))).Failure)
|
if (device->CheckFeatureSupport(Feature.FormatInfo, &formatInfo, sizeof(FeatureDataFormatInfo)).Failure)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// Copyright © Amer Koleci and Contributors.
|
||||||
|
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
|
||||||
|
|
||||||
|
using static Win32.Graphics.Direct3D12.Apis;
|
||||||
|
|
||||||
|
namespace Win32.Graphics.Direct3D12;
|
||||||
|
|
||||||
|
public partial struct CommandQueueDescription
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="CommandQueueDescription"/> struct.
|
||||||
|
/// </summary>
|
||||||
|
public CommandQueueDescription(CommandListType type, int priority = 0, CommandQueueFlags flags = CommandQueueFlags.None, uint nodeMask = 0)
|
||||||
|
{
|
||||||
|
Type = type;
|
||||||
|
Priority = priority;
|
||||||
|
Flags = flags;
|
||||||
|
NodeMask = nodeMask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="CommandQueueDescription"/> struct.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type">The queue type.</param>
|
||||||
|
/// <param name="priority">The priority.</param>
|
||||||
|
/// <param name="flags">Options flags.</param>
|
||||||
|
/// <param name="nodeMask">Node mask.</param>
|
||||||
|
public CommandQueueDescription(CommandListType type, CommandQueuePriority priority, CommandQueueFlags flags = CommandQueueFlags.None, uint nodeMask = 0)
|
||||||
|
{
|
||||||
|
Type = type;
|
||||||
|
Priority = (int)priority;
|
||||||
|
Flags = flags;
|
||||||
|
NodeMask = nodeMask;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ using static Win32.Graphics.Direct3D12.Apis;
|
|||||||
|
|
||||||
namespace Win32.Graphics.Direct3D12;
|
namespace Win32.Graphics.Direct3D12;
|
||||||
|
|
||||||
public unsafe partial struct DepthStencilDescription
|
public partial struct DepthStencilDescription
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A built-in description with settings for not using a depth stencil buffer.
|
/// A built-in description with settings for not using a depth stencil buffer.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using static Win32.Graphics.Direct3D12.Apis;
|
|||||||
|
|
||||||
namespace Win32.Graphics.Direct3D12;
|
namespace Win32.Graphics.Direct3D12;
|
||||||
|
|
||||||
public unsafe partial struct DepthStencilDescription1
|
public partial struct DepthStencilDescription1
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A built-in description with settings for not using a depth stencil buffer.
|
/// A built-in description with settings for not using a depth stencil buffer.
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device : INativeGuid
|
|||||||
/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12Device::CheckFeatureSupport"]/*' />
|
/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12Device::CheckFeatureSupport"]/*' />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12Device::CreateDescriptorHeap"]/*' />
|
/// <include file='../Direct3D12.xml' path='doc/member[@name="ID3D12Device::CreateDescriptorHeap"]/*' />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device1 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device1*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device1*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device1*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device1*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device2 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device2*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device2*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device2*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device2*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device3 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device3*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device3*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device3*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device3*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device4 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device4*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device4*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device4*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device4*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device5 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device5*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device5*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device5*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device5*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device6 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device6*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device6*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device6*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device6*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device7 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device7*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device7*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device7*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device7*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device8 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device8*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device8*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device8*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device8*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ public unsafe partial struct ID3D12Device9 : INativeGuid
|
|||||||
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
/// <inheritdoc cref="ID3D12Device.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(13)]
|
[VtblIndex(13)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<ID3D12Device9*, Feature, void*, uint, int>)(lpVtbl[13]))((ID3D12Device9*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<ID3D12Device9*, Feature, void*, int, int>)(lpVtbl[13]))((ID3D12Device9*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
/// <inheritdoc cref="ID3D12Device.CreateDescriptorHeap" />
|
||||||
|
|||||||
@@ -11,10 +11,19 @@ public unsafe partial struct ID3D12Device
|
|||||||
where TFeature : unmanaged
|
where TFeature : unmanaged
|
||||||
{
|
{
|
||||||
TFeature featureData = default;
|
TFeature featureData = default;
|
||||||
CheckFeatureSupport(feature, &featureData, (uint)sizeof(TFeature)).ThrowIfFailed();
|
CheckFeatureSupport(feature, &featureData, sizeof(TFeature)).ThrowIfFailed();
|
||||||
return featureData;
|
return featureData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HResult CheckFeatureSupport<TFeature>(Feature feature, ref TFeature featureData)
|
||||||
|
where TFeature : unmanaged
|
||||||
|
{
|
||||||
|
fixed (TFeature* featureDataPtr = &featureData)
|
||||||
|
{
|
||||||
|
return CheckFeatureSupport(feature, featureDataPtr, sizeof(TFeature));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public HResult CreateCommittedResource(HeapType heapType, ResourceDescription* pDesc, ResourceStates InitialResourceState, ClearValue* pOptimizedClearValue, Guid* riidResource, void** ppvResource)
|
public HResult CreateCommittedResource(HeapType heapType, ResourceDescription* pDesc, ResourceStates InitialResourceState, ClearValue* pOptimizedClearValue, Guid* riidResource, void** ppvResource)
|
||||||
{
|
{
|
||||||
HeapProperties heapProperties = new(heapType);
|
HeapProperties heapProperties = new(heapType);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public unsafe partial struct ResourceDescription : IEquatable<ResourceDescriptio
|
|||||||
flags);
|
flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ResourceDescription Texture3D(Format format,
|
public static ResourceDescription Tex3D(Format format,
|
||||||
ulong width,
|
ulong width,
|
||||||
uint height,
|
uint height,
|
||||||
ushort depth,
|
ushort depth,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using static Win32.Graphics.Direct3D12.Apis;
|
|||||||
|
|
||||||
namespace Win32.Graphics.Direct3D12;
|
namespace Win32.Graphics.Direct3D12;
|
||||||
|
|
||||||
public unsafe partial struct SamplerDescription
|
public partial struct SamplerDescription
|
||||||
{
|
{
|
||||||
public static readonly SamplerDescription PointWrap = new(Filter.MinMagMipPoint, TextureAddressMode.Wrap);
|
public static readonly SamplerDescription PointWrap = new(Filter.MinMagMipPoint, TextureAddressMode.Wrap);
|
||||||
public static readonly SamplerDescription PointClamp = new(Filter.MinMagMipPoint, TextureAddressMode.Clamp);
|
public static readonly SamplerDescription PointClamp = new(Filter.MinMagMipPoint, TextureAddressMode.Clamp);
|
||||||
@@ -29,7 +29,7 @@ public unsafe partial struct SamplerDescription
|
|||||||
/// <param name="borderColor">Border color to use if <see cref="TextureAddressMode.Border"/> is specified for AddressU, AddressV, or AddressW.</param>
|
/// <param name="borderColor">Border color to use if <see cref="TextureAddressMode.Border"/> is specified for AddressU, AddressV, or AddressW.</param>
|
||||||
/// <param name="minLOD">Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.</param>
|
/// <param name="minLOD">Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.</param>
|
||||||
/// <param name="maxLOD">Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. </param>
|
/// <param name="maxLOD">Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. </param>
|
||||||
public SamplerDescription(
|
public unsafe SamplerDescription(
|
||||||
Filter filter,
|
Filter filter,
|
||||||
TextureAddressMode addressU,
|
TextureAddressMode addressU,
|
||||||
TextureAddressMode addressV,
|
TextureAddressMode addressV,
|
||||||
@@ -68,7 +68,7 @@ public unsafe partial struct SamplerDescription
|
|||||||
/// <param name="comparisonFunction">A function that compares sampled data against existing sampled data. </param>
|
/// <param name="comparisonFunction">A function that compares sampled data against existing sampled data. </param>
|
||||||
/// <param name="minLOD">Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.</param>
|
/// <param name="minLOD">Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.</param>
|
||||||
/// <param name="maxLOD">Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. </param>
|
/// <param name="maxLOD">Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. </param>
|
||||||
public SamplerDescription(
|
public unsafe SamplerDescription(
|
||||||
Filter filter,
|
Filter filter,
|
||||||
TextureAddressMode addressU,
|
TextureAddressMode addressU,
|
||||||
TextureAddressMode addressV,
|
TextureAddressMode addressV,
|
||||||
@@ -104,7 +104,7 @@ public unsafe partial struct SamplerDescription
|
|||||||
/// <param name="comparisonFunction">A function that compares sampled data against existing sampled data. </param>
|
/// <param name="comparisonFunction">A function that compares sampled data against existing sampled data. </param>
|
||||||
/// <param name="minLOD">Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.</param>
|
/// <param name="minLOD">Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.</param>
|
||||||
/// <param name="maxLOD">Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. </param>
|
/// <param name="maxLOD">Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. </param>
|
||||||
public SamplerDescription(
|
public unsafe SamplerDescription(
|
||||||
Filter filter,
|
Filter filter,
|
||||||
TextureAddressMode address,
|
TextureAddressMode address,
|
||||||
float mipLODBias = 0.0f,
|
float mipLODBias = 0.0f,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>Direct3D12 bindings.</Description>
|
<Description>Direct3D12 bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>DirectComposition bindings.</Description>
|
<Description>DirectComposition bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>DirectWrite bindings.</Description>
|
<Description>DirectWrite bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public static unsafe class IDXGIFactory5Extensions
|
|||||||
where TFeature : unmanaged
|
where TFeature : unmanaged
|
||||||
{
|
{
|
||||||
TFeature featureData = default;
|
TFeature featureData = default;
|
||||||
factory.CheckFeatureSupport(feature, &featureData, (uint)sizeof(TFeature)).ThrowIfFailed();
|
factory.CheckFeatureSupport(feature, &featureData, sizeof(TFeature)).ThrowIfFailed();
|
||||||
return featureData;
|
return featureData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,9 +277,9 @@ public unsafe partial struct IDXGIFactory5 : INativeGuid
|
|||||||
/// <include file='../Dxgi.xml' path='doc/member[@name="IDXGIFactory5::CheckFeatureSupport"]/*' />
|
/// <include file='../Dxgi.xml' path='doc/member[@name="IDXGIFactory5::CheckFeatureSupport"]/*' />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(28)]
|
[VtblIndex(28)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<IDXGIFactory5*, Feature, void*, uint, int>)(lpVtbl[28]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<IDXGIFactory5*, Feature, void*, int, int>)(lpVtbl[28]))((IDXGIFactory5*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -277,9 +277,9 @@ public unsafe partial struct IDXGIFactory6 : INativeGuid
|
|||||||
/// <inheritdoc cref="IDXGIFactory5.CheckFeatureSupport" />
|
/// <inheritdoc cref="IDXGIFactory5.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(28)]
|
[VtblIndex(28)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<IDXGIFactory6*, Feature, void*, uint, int>)(lpVtbl[28]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<IDXGIFactory6*, Feature, void*, int, int>)(lpVtbl[28]))((IDXGIFactory6*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <include file='../Dxgi.xml' path='doc/member[@name="IDXGIFactory6::EnumAdapterByGpuPreference"]/*' />
|
/// <include file='../Dxgi.xml' path='doc/member[@name="IDXGIFactory6::EnumAdapterByGpuPreference"]/*' />
|
||||||
|
|||||||
@@ -277,9 +277,9 @@ public unsafe partial struct IDXGIFactory7 : INativeGuid
|
|||||||
/// <inheritdoc cref="IDXGIFactory5.CheckFeatureSupport" />
|
/// <inheritdoc cref="IDXGIFactory5.CheckFeatureSupport" />
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
[VtblIndex(28)]
|
[VtblIndex(28)]
|
||||||
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, uint FeatureSupportDataSize)
|
public HResult CheckFeatureSupport(Feature Feature, void* pFeatureSupportData, int FeatureSupportDataSize)
|
||||||
{
|
{
|
||||||
return ((delegate* unmanaged[Stdcall]<IDXGIFactory7*, Feature, void*, uint, int>)(lpVtbl[28]))((IDXGIFactory7*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
return ((delegate* unmanaged[Stdcall]<IDXGIFactory7*, Feature, void*, int, int>)(lpVtbl[28]))((IDXGIFactory7*)Unsafe.AsPointer(ref this), Feature, pFeatureSupportData, FeatureSupportDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IDXGIFactory6.EnumAdapterByGpuPreference" />
|
/// <inheritdoc cref="IDXGIFactory6.EnumAdapterByGpuPreference" />
|
||||||
|
|||||||
9
src/Vortice.Win32.Graphics.Dxgi/IDXGIInfoQueue.cs
Normal file
9
src/Vortice.Win32.Graphics.Dxgi/IDXGIInfoQueue.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// Copyright © Amer Koleci and Contributors.
|
||||||
|
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
|
||||||
|
|
||||||
|
namespace Win32.Graphics.Dxgi;
|
||||||
|
|
||||||
|
public partial struct IDXGIInfoQueue
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>Dxgi bindings.</Description>
|
<Description>Dxgi bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>DXC bindings.</Description>
|
<Description>DXC bindings.</Description>
|
||||||
|
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
|
|||||||
31
src/Vortice.Win32/Graphics/Gdi/PaletteEntry.cs
Normal file
31
src/Vortice.Win32/Graphics/Gdi/PaletteEntry.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
// Copyright © Amer Koleci and Contributors.
|
||||||
|
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
|
||||||
|
|
||||||
|
namespace Win32.Graphics.Gdi;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies the color and usage of an entry in a logical palette.
|
||||||
|
/// </summary>
|
||||||
|
/// <unmanaged>PALETTEENTRY</unmanaged>
|
||||||
|
public partial struct PaletteEntry
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The red intensity value for the palette entry.
|
||||||
|
/// </summary>
|
||||||
|
public byte Red;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The green intensity value for the palette entry.
|
||||||
|
/// </summary>
|
||||||
|
public byte Green;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The blue intensity value for the palette entry.
|
||||||
|
/// </summary>
|
||||||
|
public byte Blue;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The alpha intensity value for the palette entry. Note that as of DirectX 8, this member is treated differently than documented for Windows.
|
||||||
|
/// </summary>
|
||||||
|
public byte Flags;
|
||||||
|
}
|
||||||
20
src/Vortice.Win32/Graphics/Gdi/RgnData.cs
Normal file
20
src/Vortice.Win32/Graphics/Gdi/RgnData.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
// Copyright © Amer Koleci and Contributors.
|
||||||
|
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
|
||||||
|
|
||||||
|
namespace Win32.Graphics.Gdi;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The RGNDATA structure contains a header and an array of rectangles that compose a region.
|
||||||
|
/// The rectangles are sorted top to bottom, left to right. They do not overlap.
|
||||||
|
/// </summary>
|
||||||
|
/// <unmanaged>RGNDATA</unmanaged>
|
||||||
|
public unsafe partial struct RgnData
|
||||||
|
{
|
||||||
|
public RgnDataHeader rdh;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies an arbitrary-size buffer that contains the RECT structures that make up the region.
|
||||||
|
/// </summary>
|
||||||
|
[NativeTypeName("char[1]")]
|
||||||
|
public fixed sbyte Buffer[1];
|
||||||
|
}
|
||||||
34
src/Vortice.Win32/Graphics/Gdi/RgnDataHeader.cs
Normal file
34
src/Vortice.Win32/Graphics/Gdi/RgnDataHeader.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
// Copyright © Amer Koleci and Contributors.
|
||||||
|
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
|
||||||
|
|
||||||
|
namespace Win32.Graphics.Gdi;
|
||||||
|
|
||||||
|
/// <unmanaged>RGNDATAHEADER</unmanaged>
|
||||||
|
public partial struct RgnDataHeader
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The size, in bytes, of the header.
|
||||||
|
/// </summary>
|
||||||
|
public uint Size;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The type of region. This value must be RDH_RECTANGLES.
|
||||||
|
/// </summary>
|
||||||
|
public uint iType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The number of rectangles that make up the region.
|
||||||
|
/// </summary>
|
||||||
|
public uint nCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The size of the <see cref="RgnData"/> buffer required to receive the <see cref="RawRect"/> structures that make up the region.
|
||||||
|
/// If the size is not known, this member can be zero.
|
||||||
|
/// </summary>
|
||||||
|
public uint nRgnSize;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A bounding rectangle for the region in logical units.
|
||||||
|
/// </summary>
|
||||||
|
public RawRect rcBound;
|
||||||
|
}
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
// Licensed to the .NET Foundation under one or more agreements.
|
|
||||||
// The .NET Foundation licenses this file to you under the MIT license.
|
|
||||||
|
|
||||||
namespace System.Diagnostics.CodeAnalysis;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Used to indicate a byref escapes and is not scoped.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// <para>
|
|
||||||
/// There are several cases where the C# compiler treats a <see langword="ref"/> as implicitly
|
|
||||||
/// <see langword="scoped"/> - where the compiler does not allow the <see langword="ref"/> to escape the method.
|
|
||||||
/// </para>
|
|
||||||
/// <para>
|
|
||||||
/// For example:
|
|
||||||
/// <list type="number">
|
|
||||||
/// <item><see langword="this"/> for <see langword="struct"/> instance methods.</item>
|
|
||||||
/// <item><see langword="ref"/> parameters that refer to <see langword="ref"/> <see langword="struct"/> types.</item>
|
|
||||||
/// <item><see langword="out"/> parameters.</item>
|
|
||||||
/// </list>
|
|
||||||
/// </para>
|
|
||||||
/// <para>
|
|
||||||
/// This attribute is used in those instances where the <see langword="ref"/> should be allowed to escape.
|
|
||||||
/// </para>
|
|
||||||
/// <para>
|
|
||||||
/// Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for
|
|
||||||
/// API authors to understand the lifetime implications of applying this attribute and how it may impact their users.
|
|
||||||
/// </para>
|
|
||||||
/// </remarks>
|
|
||||||
[AttributeUsage(
|
|
||||||
AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter,
|
|
||||||
AllowMultiple = false,
|
|
||||||
Inherited = false)]
|
|
||||||
internal sealed class UnscopedRefAttribute : Attribute
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
|
||||||
<Description>Windows API low level bindings.</Description>
|
<Description>Windows API low level bindings.</Description>
|
||||||
|
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
|
||||||
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
<NoWarn>$(NoWarn);CS0419;IDE0017</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -17,18 +17,13 @@
|
|||||||
<Using Include="System.Diagnostics.CodeAnalysis" />
|
<Using Include="System.Diagnostics.CodeAnalysis" />
|
||||||
<Using Include="Win32.Numerics" />
|
<Using Include="Win32.Numerics" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
|
||||||
<Compile Remove="UnscopedRefAttribute.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
<PackageReference Include="System.Memory" />
|
||||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
<PackageReference Include="Microsoft.Bcl.HashCode" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1'">
|
||||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user