diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2021-03-02 05:32:11 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2021-03-19 00:38:13 +0000 |
| commit | 7b35bc8486edb3605876e16ee794bee8c7077bcf (patch) | |
| tree | c1067bf21aeb7f5379d2cecaf81b2c076e97c011 /Graphics/GraphicsEngineD3DBase | |
| parent | Fixed few issues with run-time sized arrays in D3D12; enabled test. (diff) | |
| download | DiligentCore-7b35bc8486edb3605876e16ee794bee8c7077bcf.tar.gz DiligentCore-7b35bc8486edb3605876e16ee794bee8c7077bcf.zip | |
RunTimeResourceArray: added constant buffers
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
| -rw-r--r-- | Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp b/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp index 1bd4678d..d5cf7e6e 100644 --- a/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp +++ b/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp @@ -102,6 +102,15 @@ void LoadD3DShaderResources(TShaderReflection* pShaderReflection, SkipCount = 1; UINT BindCount = BindingDesc.BindCount; + if (BindCount == UINT_MAX) + { + // For some reason + // Texture2D g_Textures[] + // produces BindCount == 0, but + // ConstantBuffer<CBData> g_ConstantBuffers[] + // produces BindCount == UINT_MAX + BindCount = 0; + } // Handle arrays // For shader models 5_0 and before, every resource array element is enumerated individually. |
