diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-07 17:14:11 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-07 17:14:11 +0000 |
| commit | f92524a49f7397c26b10109b1cad1cfede7095ff (patch) | |
| tree | fb03eb91d3325a4464ea18adfec15b7cac19bfc5 /Graphics/GraphicsEngineD3D12 | |
| parent | Vulkan backend: fixed issues with occlusion and pipeline stats queries if the... (diff) | |
| download | DiligentCore-f92524a49f7397c26b10109b1cad1cfede7095ff.tar.gz DiligentCore-f92524a49f7397c26b10109b1cad1cfede7095ff.zip | |
Improved reporting of device capabilities (fixed https://github.com/DiligentGraphics/DiligentCore/issues/109)
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp index 09313177..8177f67b 100644 --- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp @@ -159,11 +159,6 @@ RenderDeviceD3D12Impl::RenderDeviceD3D12Impl(IReferenceCounters* pRefCo UNEXPECTED("Unexpected D3D feature level"); } - // Direct3D12 supports shader model 5.1 on all feature levels (even on 11.0), - // so bindless resources are always available. - // https://docs.microsoft.com/en-us/windows/win32/direct3d12/hardware-feature-levels#feature-level-support - m_DeviceCaps.Features.BindlessResources = True; - if (auto pDXGIAdapter1 = DXGIAdapterFromD3D12Device(pd3d12Device)) { DXGI_ADAPTER_DESC1 AdapterDesc = {}; @@ -178,6 +173,30 @@ RenderDeviceD3D12Impl::RenderDeviceD3D12Impl(IReferenceCounters* pRefCo LOG_ERROR_MESSAGE("Failed to get DXGIDevice adapter desc. Adapter type will be unknown."); } } + + // Direct3D12 supports shader model 5.1 on all feature levels (even on 11.0), + // so bindless resources are always available. + // https://docs.microsoft.com/en-us/windows/win32/direct3d12/hardware-feature-levels#feature-level-support + m_DeviceCaps.Features.BindlessResources = True; + + auto& TexCaps = m_DeviceCaps.TexCaps; + + TexCaps.MaxTexture1DDimension = D3D12_REQ_TEXTURE1D_U_DIMENSION; + TexCaps.MaxTexture1DArraySlices = D3D12_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION; + TexCaps.MaxTexture2DDimension = D3D12_REQ_TEXTURE2D_U_OR_V_DIMENSION; + TexCaps.MaxTexture2DArraySlices = D3D12_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION; + TexCaps.MaxTexture3DDimension = D3D12_REQ_TEXTURE3D_U_V_OR_W_DIMENSION; + TexCaps.MaxTextureCubeDimension = D3D12_REQ_TEXTURECUBE_DIMENSION; + TexCaps.Texture2DMSSupported = True; + TexCaps.Texture2DMSArraySupported = True; + TexCaps.TextureViewSupported = True; + TexCaps.CubemapArraysSupported = True; + + auto& SamCaps = m_DeviceCaps.SamCaps; + + SamCaps.BorderSamplingModeSupported = True; + SamCaps.AnisotropicFilteringSupported = True; + SamCaps.LODBiasSupported = True; } RenderDeviceD3D12Impl::~RenderDeviceD3D12Impl() |
