diff options
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
| -rw-r--r-- | Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp | 6 |
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"); } } |
