summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-17 16:41:00 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-17 16:41:00 +0000
commit31443aba7aeee91f553cd3d440bb971e51f90974 (patch)
tree4badb5aeff5f78d2221948bd793f4f56af7a63f6 /Graphics/GraphicsEngineD3D11
parentA bunch of updates to specify minimum feature level for D3D11/D3D12 backends ... (diff)
downloadDiligentCore-31443aba7aeee91f553cd3d440bb971e51f90974.tar.gz
DiligentCore-31443aba7aeee91f553cd3d440bb971e51f90974.zip
Updated d3d backend initialization + d3d shader model selection
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rw-r--r--Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp7
-rw-r--r--Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp4
2 files changed, 9 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
index 3a845241..c6868207 100644
--- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp
@@ -87,8 +87,13 @@ RenderDeviceD3D11Impl :: RenderDeviceD3D11Impl(IReferenceCounters* pRef
default:
UNEXPECTED("Unexpected D3D feature level");
}
- m_DeviceCaps.bSeparableProgramSupported = True;
+ m_DeviceCaps.bSeparableProgramSupported = True;
m_DeviceCaps.bMultithreadedResourceCreationSupported = True;
+
+ // 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.bBindlessSupported = False;
}
void RenderDeviceD3D11Impl::TestTextureFormat( TEXTURE_FORMAT TexFormat )
diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp
index 46adc289..996b2af5 100644
--- a/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp
+++ b/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp
@@ -35,7 +35,9 @@ static const char* GetD3D11ShaderModel(ID3D11Device* pd3d11Device)
auto d3dDeviceFeatureLevel = pd3d11Device->GetFeatureLevel();
switch(d3dDeviceFeatureLevel)
{
- // ID3D11Device::Create*Shader methods support DXBC only up to 5.0 version
+ // Direct3D11 only supports shader model 5.0 even if the device feature level is
+ // above 11.0 (for example, 11.1 or 12.0).
+ // https://docs.microsoft.com/en-us/windows/win32/direct3d11/overviews-direct3d-11-devices-downlevel-intro#overview-for-each-feature-level
#if defined(_WIN32_WINNT_WIN10) && (_WIN32_WINNT >=_WIN32_WINNT_WIN10)
case D3D_FEATURE_LEVEL_12_1:
case D3D_FEATURE_LEVEL_12_0: