More code style tweaks
このコミットが含まれているのは:
1 親
aa2614d011
コミット
41384e347c
12ファイル変更
+176
-176
検索条件に一致するファイルはありません
@@ -133,15 +133,15 @@ namespace ComputeSharp.Graphics.Helpers
|
||||
if (FX.SUCCEEDED(createDeviceResult) &&
|
||||
this.predicate(new GraphicsDeviceInfo(&dxgiDescription1)))
|
||||
{
|
||||
using ComPtr<ID3D12Device> d3d12device = default;
|
||||
using ComPtr<ID3D12Device> d3D12Device = default;
|
||||
|
||||
FX.D3D12CreateDevice(
|
||||
dxgiAdapter1.AsIUnknown().Get(),
|
||||
D3D_FEATURE_LEVEL.D3D_FEATURE_LEVEL_12_0,
|
||||
FX.__uuidof<ID3D12Device>(),
|
||||
d3d12device.GetVoidAddressOf()).Assert();
|
||||
d3D12Device.GetVoidAddressOf()).Assert();
|
||||
|
||||
this.graphicsDevice = GetOrCreateDevice(d3d12device.Move(), &dxgiDescription1);
|
||||
this.graphicsDevice = GetOrCreateDevice(d3D12Device.Move(), &dxgiDescription1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,13 +48,13 @@ namespace ComputeSharp.Graphics.Helpers
|
||||
/// <exception cref="NotSupportedException">Thrown when a default device is not available.</exception>
|
||||
public static unsafe GraphicsDevice GetDefaultDevice()
|
||||
{
|
||||
using ComPtr<ID3D12Device> d3d12device = default;
|
||||
using ComPtr<ID3D12Device> d3D12Device = default;
|
||||
|
||||
DXGI_ADAPTER_DESC1 dxgiDescription1;
|
||||
|
||||
if (TryGetDefaultDevice(d3d12device.GetAddressOf(), &dxgiDescription1))
|
||||
if (TryGetDefaultDevice(d3D12Device.GetAddressOf(), &dxgiDescription1))
|
||||
{
|
||||
return GetOrCreateDevice(d3d12device.Move(), &dxgiDescription1);
|
||||
return GetOrCreateDevice(d3D12Device.Move(), &dxgiDescription1);
|
||||
}
|
||||
|
||||
return ThrowHelper.ThrowNotSupportedException<GraphicsDevice>("There isn't a supported GPU device on the current machine");
|
||||
@@ -63,10 +63,10 @@ namespace ComputeSharp.Graphics.Helpers
|
||||
/// <summary>
|
||||
/// Tries to check or create a default <see cref="ID3D12Device"/> object.
|
||||
/// </summary>
|
||||
/// <param name="d3d12device">A pointer to the <see cref="ID3D12Device"/> object to create, or <see langword="null"/>.</param>
|
||||
/// <param name="d3D12Device">A pointer to the <see cref="ID3D12Device"/> object to create, or <see langword="null"/>.</param>
|
||||
/// <param name="dxgiDescription1">A pointer to the <see cref="DXGI_ADAPTER_DESC1"/> value for the device found.</param>
|
||||
/// <returns>Whether a default device was found with the requested feature level.</returns>
|
||||
private static unsafe bool TryGetDefaultDevice(ID3D12Device** d3d12device, DXGI_ADAPTER_DESC1* dxgiDescription1)
|
||||
private static unsafe bool TryGetDefaultDevice(ID3D12Device** d3D12Device, DXGI_ADAPTER_DESC1* dxgiDescription1)
|
||||
{
|
||||
using ComPtr<IDXGIFactory4> dxgiFactory4 = default;
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace ComputeSharp.Graphics.Helpers
|
||||
dxgiAdapter1.AsIUnknown().Get(),
|
||||
D3D_FEATURE_LEVEL.D3D_FEATURE_LEVEL_12_0,
|
||||
FX.__uuidof<ID3D12Device>(),
|
||||
(void**)d3d12device);
|
||||
(void**)d3D12Device);
|
||||
|
||||
if (FX.SUCCEEDED(createDeviceResult))
|
||||
{
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする