summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-10-25 15:44:11 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-10-25 15:44:11 +0000
commitb1bac52d792f348c8a5be7d85bae070d2322479d (patch)
tree57e96aa61f3fe7210605f9201ac315089192f567 /Graphics/GraphicsEngineD3D12
parentExcluded from build unused targets generated by SPIRV-Tools repo (diff)
downloadDiligentCore-b1bac52d792f348c8a5be7d85bae070d2322479d.tar.gz
DiligentCore-b1bac52d792f348c8a5be7d85bae070d2322479d.zip
Some improvements D3D shader resource management
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
index 8d167663..c1f29af4 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
@@ -271,7 +271,11 @@ void ShaderResourceLayoutD3D12::Initialize(ID3D12Device*
if (strcmp(Sampler.Attribs.Name, SamplerAttribs.Name) == 0)
break;
}
- VERIFY(SamplerId < SamplerCount, "Unable to find assigned sampler");
+ if (SamplerId == SamplerCount)
+ {
+ LOG_ERROR("Unable to find sampler '", SamplerAttribs.Name, "' assigned to texture SRV '", TexSRV.Name, "' in the list of already created resources. This seems to be a bug.");
+ SamplerId = D3D12Resource::InvalidSamplerId;
+ }
VERIFY(SamplerId <= D3D12Resource::MaxSamplerId, "Sampler index excceeds allowed limit");
}
}