summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp9
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.