summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-07 17:14:11 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-07 17:14:11 +0000
commitf92524a49f7397c26b10109b1cad1cfede7095ff (patch)
treefb03eb91d3325a4464ea18adfec15b7cac19bfc5 /Graphics/GraphicsEngineD3D11
parentVulkan backend: fixed issues with occlusion and pipeline stats queries if the... (diff)
downloadDiligentCore-f92524a49f7397c26b10109b1cad1cfede7095ff.tar.gz
DiligentCore-f92524a49f7397c26b10109b1cad1cfede7095ff.zip
Improved reporting of device capabilities (fixed https://github.com/DiligentGraphics/DiligentCore/issues/109)
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rw-r--r--Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
index 1b072658..87a56ef7 100644
--- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
@@ -124,11 +124,6 @@ RenderDeviceD3D11Impl::RenderDeviceD3D11Impl(IReferenceCounters* pRefCo
UNEXPECTED("Unexpected D3D feature level");
}
- // Direct3D11 only supports shader model 5.0 even if the device feature level is
- // above 11.0 (for example, 11.1 or 12.0), so bindless resources are never available.
- // https://docs.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-downlevel-intro#overview-for-each-feature-level
- m_DeviceCaps.Features.BindlessResources = False;
-
if (auto pDXGIAdapter1 = DXGIAdapterFromD3D11Device(pd3d11Device))
{
DXGI_ADAPTER_DESC1 AdapterDesc = {};
@@ -143,6 +138,30 @@ RenderDeviceD3D11Impl::RenderDeviceD3D11Impl(IReferenceCounters* pRefCo
LOG_ERROR_MESSAGE("Failed to get DXGIDevice adapter desc. Adapter type will be unknown.");
}
}
+
+ // Direct3D11 only supports shader model 5.0 even if the device feature level is
+ // above 11.0 (for example, 11.1 or 12.0), so bindless resources are never available.
+ // https://docs.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-downlevel-intro#overview-for-each-feature-level
+ m_DeviceCaps.Features.BindlessResources = False;
+
+ auto& TexCaps = m_DeviceCaps.TexCaps;
+
+ TexCaps.MaxTexture1DDimension = D3D11_REQ_TEXTURE1D_U_DIMENSION;
+ TexCaps.MaxTexture1DArraySlices = D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION;
+ TexCaps.MaxTexture2DDimension = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION;
+ TexCaps.MaxTexture2DArraySlices = D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION;
+ TexCaps.MaxTexture3DDimension = D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION;
+ TexCaps.MaxTextureCubeDimension = D3D11_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;
}
void RenderDeviceD3D11Impl::TestTextureFormat(TEXTURE_FORMAT TexFormat)