Bump D3D12MA to version 2.0.0-beta3.1463073211
このコミットが含まれているのは:
1 親
e17f622032
コミット
87343a3137
18ファイル変更
+71
-71
検索条件に一致するファイルはありません
@@ -123,7 +123,7 @@ internal sealed class SwapChainApplication<T> : Win32Application
|
||||
{
|
||||
using ComPtr<IDXGIFactory2> dxgiFactory2 = default;
|
||||
|
||||
_ = DirectX.CreateDXGIFactory2(DirectX.DXGI_CREATE_FACTORY_DEBUG, Windows.__uuidof<IDXGIFactory2>(), (void**)dxgiFactory2.GetAddressOf());
|
||||
_ = DirectX.CreateDXGIFactory2(DXGI.DXGI_CREATE_FACTORY_DEBUG, Windows.__uuidof<IDXGIFactory2>(), (void**)dxgiFactory2.GetAddressOf());
|
||||
|
||||
DXGI_SWAP_CHAIN_DESC1 dxgiSwapChainDesc1 = default;
|
||||
dxgiSwapChainDesc1.AlphaMode = DXGI_ALPHA_MODE.DXGI_ALPHA_MODE_IGNORE;
|
||||
|
||||
@@ -60,10 +60,10 @@ internal unsafe static class Win32ApplicationRunner
|
||||
WNDCLASSEXW windowClassEx = new()
|
||||
{
|
||||
cbSize = (uint)sizeof(WNDCLASSEXW),
|
||||
style = Windows.CS_HREDRAW | Windows.CS_VREDRAW,
|
||||
style = CS.CS_HREDRAW | CS.CS_VREDRAW,
|
||||
lpfnWndProc = (delegate* unmanaged<HWND, uint, WPARAM, LPARAM, LRESULT>)(delegate* unmanaged<IntPtr, uint, nuint, nint, nint>)&WindowProc,
|
||||
hInstance = hInstance,
|
||||
hCursor = Windows.LoadCursorW(HINSTANCE.NULL, Windows.IDC_ARROW),
|
||||
hCursor = Windows.LoadCursorW(HINSTANCE.NULL, IDC.IDC_ARROW),
|
||||
lpszClassName = (ushort*)name
|
||||
};
|
||||
|
||||
@@ -107,7 +107,7 @@ internal unsafe static class Win32ApplicationRunner
|
||||
application.OnInitialize(hwnd);
|
||||
|
||||
// Display the window
|
||||
_ = Windows.ShowWindow(hwnd, Windows.SW_SHOWDEFAULT);
|
||||
_ = Windows.ShowWindow(hwnd, SW.SW_SHOWDEFAULT);
|
||||
|
||||
MSG msg = default;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Toolkit.Diagnostics" Version="7.1.1" />
|
||||
<PackageReference Include="TerraFX.Interop.D3D12MemoryAllocator" Version="2.0.0-beta3.1459250354" />
|
||||
<PackageReference Include="TerraFX.Interop.D3D12MemoryAllocator" Version="2.0.0-beta3.1463073211" />
|
||||
</ItemGroup>
|
||||
|
||||
<Choose>
|
||||
|
||||
@@ -176,7 +176,7 @@ internal static unsafe class ID3D12DeviceExtensions
|
||||
{
|
||||
D3D12_SHADER_RESOURCE_VIEW_DESC d3D12ShaderResourceViewDescription = default;
|
||||
d3D12ShaderResourceViewDescription.ViewDimension = D3D12_SRV_DIMENSION_BUFFER;
|
||||
d3D12ShaderResourceViewDescription.Shader4ComponentMapping = DirectX.D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
|
||||
d3D12ShaderResourceViewDescription.Shader4ComponentMapping = D3D12.D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
|
||||
d3D12ShaderResourceViewDescription.Buffer.NumElements = bufferSize;
|
||||
d3D12ShaderResourceViewDescription.Buffer.StructureByteStride = elementSize;
|
||||
|
||||
@@ -201,7 +201,7 @@ internal static unsafe class ID3D12DeviceExtensions
|
||||
D3D12_SHADER_RESOURCE_VIEW_DESC d3D12ShaderResourceViewDescription = default;
|
||||
d3D12ShaderResourceViewDescription.ViewDimension = d3D12SrvDimension;
|
||||
d3D12ShaderResourceViewDescription.Format = dxgiFormat;
|
||||
d3D12ShaderResourceViewDescription.Shader4ComponentMapping = DirectX.D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
|
||||
d3D12ShaderResourceViewDescription.Shader4ComponentMapping = D3D12.D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
|
||||
d3D12ShaderResourceViewDescription.Texture2D.MipLevels = uint.MaxValue;
|
||||
|
||||
d3D12Device.CreateShaderResourceView(d3D12Resource, &d3D12ShaderResourceViewDescription, d3D12CpuDescriptorHandle);
|
||||
|
||||
@@ -51,7 +51,7 @@ internal static class D3D12FeatureHelper
|
||||
&d3D12Options7,
|
||||
(uint)sizeof(D3D12_FEATURE_DATA_D3D12_OPTIONS7));
|
||||
|
||||
if (result == Windows.S_OK)
|
||||
if (result == S.S_OK)
|
||||
{
|
||||
return D3D12_HEAP_FLAGS.D3D12_HEAP_FLAG_CREATE_NOT_ZEROED;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ internal static partial class DeviceHelper
|
||||
Windows.__uuidof<IDXGIAdapter1>(),
|
||||
dxgiAdapter1.GetVoidAddressOf());
|
||||
|
||||
if (enumAdapters1Result == Windows.DXGI_ERROR_NOT_FOUND)
|
||||
if (enumAdapters1Result == DXGI.DXGI_ERROR_NOT_FOUND)
|
||||
{
|
||||
this.dxgiFactory6.Get()->EnumWarpAdapter(Windows.__uuidof<IDXGIAdapter1>(), dxgiAdapter1.GetVoidAddressOf()).Assert();
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ internal static partial class DeviceHelper
|
||||
/// </summary>
|
||||
private const uint IDXGIFactoryCreationFlags =
|
||||
#if DEBUG
|
||||
DirectX.DXGI_CREATE_FACTORY_DEBUG;
|
||||
DXGI.DXGI_CREATE_FACTORY_DEBUG;
|
||||
#else
|
||||
0;
|
||||
#endif
|
||||
@@ -37,7 +37,7 @@ internal static partial class DeviceHelper
|
||||
|
||||
HRESULT result = dxgiFactory4.CopyTo(dxgiFactory6);
|
||||
|
||||
if (result == Windows.S_OK)
|
||||
if (result == S.S_OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ internal static partial class DeviceHelper
|
||||
Windows.__uuidof<IDXGIAdapter1>(),
|
||||
dxgiAdapter1.GetVoidAddressOf());
|
||||
|
||||
if (enumAdapters1Result == Windows.DXGI_ERROR_NOT_FOUND)
|
||||
if (enumAdapters1Result == DXGI.DXGI_ERROR_NOT_FOUND)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,11 +23,11 @@ internal static class WICFormatHelper
|
||||
public static Guid GetForType<T>()
|
||||
where T : unmanaged
|
||||
{
|
||||
if (typeof(T) == typeof(Bgra32)) return Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba32)) return Windows.GUID_WICPixelFormat32bppRGBA;
|
||||
else if (typeof(T) == typeof(Rgba64)) return Windows.GUID_WICPixelFormat64bppRGBA;
|
||||
else if (typeof(T) == typeof(R8)) return Windows.GUID_WICPixelFormat8bppGray;
|
||||
else if (typeof(T) == typeof(R16)) return Windows.GUID_WICPixelFormat16bppGray;
|
||||
if (typeof(T) == typeof(Bgra32)) return GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba32)) return GUID.GUID_WICPixelFormat32bppRGBA;
|
||||
else if (typeof(T) == typeof(Rgba64)) return GUID.GUID_WICPixelFormat64bppRGBA;
|
||||
else if (typeof(T) == typeof(R8)) return GUID.GUID_WICPixelFormat8bppGray;
|
||||
else if (typeof(T) == typeof(R16)) return GUID.GUID_WICPixelFormat16bppGray;
|
||||
else return ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
}
|
||||
|
||||
@@ -42,58 +42,58 @@ internal static class WICFormatHelper
|
||||
public static bool TryGetIntermediateFormatForType<T>(Guid containerFormat, out Guid intermediateFormat)
|
||||
where T : unmanaged
|
||||
{
|
||||
if (containerFormat == Windows.GUID_ContainerFormatBmp)
|
||||
if (containerFormat == GUID.GUID_ContainerFormatBmp)
|
||||
{
|
||||
if (typeof(T) == typeof(Bgra32)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = Windows.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = Windows.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = GUID.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = GUID.GUID_WICPixelFormat24bppBGR;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
}
|
||||
else if (containerFormat == Windows.GUID_ContainerFormatPng)
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatPng)
|
||||
{
|
||||
if (typeof(T) == typeof(Bgra32)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = Windows.GUID_WICPixelFormat8bppGray;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = GUID.GUID_WICPixelFormat8bppGray;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
}
|
||||
else if (containerFormat == Windows.GUID_ContainerFormatJpeg)
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatJpeg)
|
||||
{
|
||||
if (typeof(T) == typeof(Bgra32)) intermediateFormat = Windows.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = Windows.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = Windows.GUID_WICPixelFormat24bppBGR;
|
||||
if (typeof(T) == typeof(Bgra32)) intermediateFormat = GUID.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = GUID.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = GUID.GUID_WICPixelFormat24bppBGR;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = Windows.GUID_WICPixelFormat8bppGray;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = GUID.GUID_WICPixelFormat8bppGray;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
}
|
||||
else if (containerFormat == Windows.GUID_ContainerFormatWmp)
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatWmp)
|
||||
{
|
||||
if (typeof(T) == typeof(Bgra32)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = default;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
}
|
||||
else if (containerFormat == Windows.GUID_ContainerFormatTiff)
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatTiff)
|
||||
{
|
||||
if (typeof(T) == typeof(Bgra32)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = default;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
}
|
||||
else if (containerFormat == Windows.GUID_ContainerFormatDds)
|
||||
else if (containerFormat == GUID.GUID_ContainerFormatDds)
|
||||
{
|
||||
if (typeof(T) == typeof(Bgra32)) intermediateFormat = default;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = Windows.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba32)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(Rgba64)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R8)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else if (typeof(T) == typeof(R16)) intermediateFormat = GUID.GUID_WICPixelFormat32bppBGRA;
|
||||
else intermediateFormat = ThrowHelper.ThrowArgumentException<Guid>("Invalid texture type");
|
||||
}
|
||||
else
|
||||
@@ -115,16 +115,16 @@ internal static class WICFormatHelper
|
||||
{
|
||||
return Path.GetExtension(filename).ToString() switch
|
||||
{
|
||||
".bmp" => Windows.GUID_ContainerFormatBmp,
|
||||
".png" => Windows.GUID_ContainerFormatPng,
|
||||
".bmp" => GUID.GUID_ContainerFormatBmp,
|
||||
".png" => GUID.GUID_ContainerFormatPng,
|
||||
".jpg" or
|
||||
".jpeg" => Windows.GUID_ContainerFormatJpeg,
|
||||
".jpeg" => GUID.GUID_ContainerFormatJpeg,
|
||||
".jxr" or
|
||||
".hdp" or
|
||||
".wdp" or
|
||||
".wmp" => Windows.GUID_ContainerFormatWmp,
|
||||
".tiff" => Windows.GUID_ContainerFormatTiff,
|
||||
".dds" => Windows.GUID_ContainerFormatDds,
|
||||
".wmp" => GUID.GUID_ContainerFormatWmp,
|
||||
".tiff" => GUID.GUID_ContainerFormatTiff,
|
||||
".dds" => GUID.GUID_ContainerFormatDds,
|
||||
_ => ThrowHelper.ThrowArgumentException<Guid>("Invalid filename"),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public unsafe abstract class Buffer<T> : NativeObject
|
||||
|
||||
if (resourceType == ResourceType.Constant)
|
||||
{
|
||||
Guard.IsBetweenOrEqualTo(length, 1, DirectX.D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT, nameof(length));
|
||||
Guard.IsBetweenOrEqualTo(length, 1, D3D12.D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT, nameof(length));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -75,7 +75,7 @@ public unsafe abstract class Buffer<T> : NativeObject
|
||||
}
|
||||
|
||||
nint usableSizeInBytes = checked((nint)(length * elementSizeInBytes));
|
||||
nint effectiveSizeInBytes = resourceType == ResourceType.Constant ? AlignmentHelper.Pad(usableSizeInBytes, DirectX.D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT) : usableSizeInBytes;
|
||||
nint effectiveSizeInBytes = resourceType == ResourceType.Constant ? AlignmentHelper.Pad(usableSizeInBytes, D3D12.D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT) : usableSizeInBytes;
|
||||
|
||||
SizeInBytes = usableSizeInBytes;
|
||||
GraphicsDevice = device;
|
||||
|
||||
@@ -74,8 +74,8 @@ public unsafe abstract class Texture2D<T> : NativeObject, GraphicsResourceHelper
|
||||
{
|
||||
device.ThrowIfDisposed();
|
||||
|
||||
Guard.IsBetweenOrEqualTo(width, 1, DirectX.D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, nameof(width));
|
||||
Guard.IsBetweenOrEqualTo(height, 1, DirectX.D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, nameof(height));
|
||||
Guard.IsBetweenOrEqualTo(width, 1, D3D12.D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, nameof(width));
|
||||
Guard.IsBetweenOrEqualTo(height, 1, D3D12.D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, nameof(height));
|
||||
|
||||
if (!device.D3D12Device->IsDxgiFormatSupported(DXGIFormatHelper.GetForType<T>(), d3D12FormatSupport))
|
||||
{
|
||||
|
||||
@@ -75,9 +75,9 @@ public unsafe abstract class Texture3D<T> : NativeObject, GraphicsResourceHelper
|
||||
{
|
||||
device.ThrowIfDisposed();
|
||||
|
||||
Guard.IsBetweenOrEqualTo(width, 1, DirectX.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(width));
|
||||
Guard.IsBetweenOrEqualTo(height, 1, DirectX.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(height));
|
||||
Guard.IsBetweenOrEqualTo(depth, 1, DirectX.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(depth));
|
||||
Guard.IsBetweenOrEqualTo(width, 1, D3D12.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(width));
|
||||
Guard.IsBetweenOrEqualTo(height, 1, D3D12.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(height));
|
||||
Guard.IsBetweenOrEqualTo(depth, 1, D3D12.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(depth));
|
||||
|
||||
if (!device.D3D12Device->IsDxgiFormatSupported(DXGIFormatHelper.GetForType<T>(), d3D12FormatSupport))
|
||||
{
|
||||
|
||||
@@ -50,8 +50,8 @@ public unsafe abstract class TransferTexture2D<T> : NativeObject
|
||||
{
|
||||
device.ThrowIfDisposed();
|
||||
|
||||
Guard.IsBetweenOrEqualTo(width, 1, DirectX.D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, nameof(width));
|
||||
Guard.IsBetweenOrEqualTo(height, 1, DirectX.D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, nameof(height));
|
||||
Guard.IsBetweenOrEqualTo(width, 1, D3D12.D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, nameof(width));
|
||||
Guard.IsBetweenOrEqualTo(height, 1, D3D12.D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION, nameof(height));
|
||||
|
||||
if (!device.D3D12Device->IsDxgiFormatSupported(DXGIFormatHelper.GetForType<T>(), D3D12_FORMAT_SUPPORT1_TEXTURE2D))
|
||||
{
|
||||
|
||||
@@ -51,9 +51,9 @@ public unsafe abstract class TransferTexture3D<T> : NativeObject
|
||||
{
|
||||
device.ThrowIfDisposed();
|
||||
|
||||
Guard.IsBetweenOrEqualTo(width, 1, DirectX.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(width));
|
||||
Guard.IsBetweenOrEqualTo(height, 1, DirectX.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(height));
|
||||
Guard.IsBetweenOrEqualTo(depth, 1, DirectX.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(depth));
|
||||
Guard.IsBetweenOrEqualTo(width, 1, D3D12.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(width));
|
||||
Guard.IsBetweenOrEqualTo(height, 1, D3D12.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(height));
|
||||
Guard.IsBetweenOrEqualTo(depth, 1, D3D12.D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION, nameof(depth));
|
||||
|
||||
if (!device.D3D12Device->IsDxgiFormatSupported(DXGIFormatHelper.GetForType<T>(), D3D12_FORMAT_SUPPORT1_TEXTURE3D))
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ public sealed class ConstantBuffer<T> : Buffer<T>
|
||||
/// <summary>
|
||||
/// The alignment boundary for elements in a constant buffer.
|
||||
/// </summary>
|
||||
private const int ElementAlignment = DirectX.D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT;
|
||||
private const int ElementAlignment = D3D12.D3D12_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ConstantBuffer{T}"/> instance with the specified parameters.
|
||||
|
||||
@@ -45,6 +45,6 @@ public struct ResourceDescriptor
|
||||
descriptor.BaseShaderRegister = offset;
|
||||
descriptor.RegisterSpace = 0;
|
||||
descriptor.Flags = D3D12_DESCRIPTOR_RANGE_FLAG_NONE;
|
||||
descriptor.OffsetInDescriptorsFromTableStart = DirectX.D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
|
||||
descriptor.OffsetInDescriptorsFromTableStart = D3D12.D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
|
||||
}
|
||||
}
|
||||
@@ -119,9 +119,9 @@ internal static class ShaderRunner<T>
|
||||
int groupsY = Math.DivRem(y, threadsY, out int modY) + (modY == 0 ? 0 : 1);
|
||||
int groupsZ = Math.DivRem(z, threadsZ, out int modZ) + (modZ == 0 ? 0 : 1);
|
||||
|
||||
Guard.IsBetweenOrEqualTo(groupsX, 1, DirectX.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
Guard.IsBetweenOrEqualTo(groupsY, 1, DirectX.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
Guard.IsBetweenOrEqualTo(groupsZ, 1, DirectX.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
Guard.IsBetweenOrEqualTo(groupsX, 1, D3D11.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
Guard.IsBetweenOrEqualTo(groupsY, 1, D3D11.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
Guard.IsBetweenOrEqualTo(groupsZ, 1, D3D11.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
|
||||
ShaderKey key = new(shader.GetDispatchId(), threadsX, threadsY, threadsZ);
|
||||
PipelineData? pipelineData;
|
||||
@@ -174,8 +174,8 @@ internal static class ShaderRunner<T>
|
||||
int groupsX = Math.DivRem(x, threadsX, out int modX) + (modX == 0 ? 0 : 1);
|
||||
int groupsY = Math.DivRem(y, threadsY, out int modY) + (modY == 0 ? 0 : 1);
|
||||
|
||||
Guard.IsBetweenOrEqualTo(groupsX, 1, DirectX.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
Guard.IsBetweenOrEqualTo(groupsY, 1, DirectX.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
Guard.IsBetweenOrEqualTo(groupsX, 1, D3D11.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
Guard.IsBetweenOrEqualTo(groupsY, 1, D3D11.D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION, nameof(groupsX));
|
||||
|
||||
ShaderKey key = new(shader.GetDispatchId(), threadsX, threadsY, 1);
|
||||
PipelineData? pipelineData;
|
||||
|
||||
@@ -32,7 +32,7 @@ public unsafe partial class InteropServicesTests
|
||||
|
||||
int hResult = InteropServices.TryGetID3D12Device(device.Get(), Windows.__uuidof<ID3D12Device>(), (void**)d3D12Device.GetAddressOf());
|
||||
|
||||
Assert.AreEqual(hResult, Windows.S_OK);
|
||||
Assert.AreEqual(hResult, S.S_OK);
|
||||
Assert.IsTrue(d3D12Device.Get() != null);
|
||||
|
||||
luid = d3D12Device.Get()->GetAdapterLuid();
|
||||
@@ -60,7 +60,7 @@ public unsafe partial class InteropServicesTests
|
||||
|
||||
int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof<ID3D12Resource>(), (void**)d3D12Resource.GetAddressOf());
|
||||
|
||||
Assert.AreEqual(hResult, Windows.S_OK);
|
||||
Assert.AreEqual(hResult, S.S_OK);
|
||||
Assert.IsTrue(d3D12Resource.Get() != null);
|
||||
Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public unsafe partial class InteropServicesTests
|
||||
|
||||
int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof<ID3D12Resource>(), (void**)d3D12Resource.GetAddressOf());
|
||||
|
||||
Assert.AreEqual(hResult, Windows.S_OK);
|
||||
Assert.AreEqual(hResult, S.S_OK);
|
||||
Assert.IsTrue(d3D12Resource.Get() != null);
|
||||
Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_TEXTURE2D);
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public unsafe partial class InteropServicesTests
|
||||
|
||||
int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof<ID3D12Resource>(), (void**)d3D12Resource.GetAddressOf());
|
||||
|
||||
Assert.AreEqual(hResult, Windows.S_OK);
|
||||
Assert.AreEqual(hResult, S.S_OK);
|
||||
Assert.IsTrue(d3D12Resource.Get() != null);
|
||||
Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_TEXTURE3D);
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public unsafe partial class InteropServicesTests
|
||||
|
||||
int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof<ID3D12Resource>(), (void**)d3D12Resource.GetAddressOf());
|
||||
|
||||
Assert.AreEqual(hResult, Windows.S_OK);
|
||||
Assert.AreEqual(hResult, S.S_OK);
|
||||
Assert.IsTrue(d3D12Resource.Get() != null);
|
||||
Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public unsafe partial class InteropServicesTests
|
||||
|
||||
int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof<ID3D12Resource>(), (void**)d3D12Resource.GetAddressOf());
|
||||
|
||||
Assert.AreEqual(hResult, Windows.S_OK);
|
||||
Assert.AreEqual(hResult, S.S_OK);
|
||||
Assert.IsTrue(d3D12Resource.Get() != null);
|
||||
Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER);
|
||||
}
|
||||
@@ -180,7 +180,7 @@ public unsafe partial class InteropServicesTests
|
||||
|
||||
int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof<ID3D12Resource>(), (void**)d3D12Resource.GetAddressOf());
|
||||
|
||||
Assert.AreEqual(hResult, Windows.S_OK);
|
||||
Assert.AreEqual(hResult, S.S_OK);
|
||||
Assert.IsTrue(d3D12Resource.Get() != null);
|
||||
Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER);
|
||||
}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする