diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-10-26 03:58:06 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-10-26 03:58:06 +0000 |
| commit | fa7dbbfaf8819f55926285a27f92dfac3fd62a10 (patch) | |
| tree | 347d6776ea516dc3e61a6fe44666374c7bc37def /Graphics/GLSLTools | |
| parent | Implemented HLSL to SPIRV compilation and HLSL-style combined samplers in Vulkan (diff) | |
| download | DiligentCore-fa7dbbfaf8819f55926285a27f92dfac3fd62a10.tar.gz DiligentCore-fa7dbbfaf8819f55926285a27f92dfac3fd62a10.zip | |
Fixed false warning about missing static samplers in VK
Diffstat (limited to 'Graphics/GLSLTools')
| -rw-r--r-- | Graphics/GLSLTools/src/SPIRVShaderResources.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp index 6b348981..b0b7055f 100644 --- a/Graphics/GLSLTools/src/SPIRVShaderResources.cpp +++ b/Graphics/GLSLTools/src/SPIRVShaderResources.cpp @@ -330,22 +330,21 @@ SPIRVShaderResources::SPIRVShaderResources(IMemoryAllocator& Allocator, { const auto* SamName = shaderDesc.StaticSamplers[s].SamplerOrTextureName; bool SamplerFound = false; - if (CombinedSamplerSuffix != nullptr) + + for (Uint32 i = 0; i < GetNumSmpldImgs(); ++i) { - for (Uint32 i = 0; i < GetNumSmpldImgs(); ++i) - { - const auto& SmplImg = GetSmpldImg(i); - SamplerFound = (strcmp(SmplImg.Name, SamName) == 0); - if (SamplerFound) - break; - } + const auto& SmplImg = GetSmpldImg(i); + SamplerFound = (strcmp(SmplImg.Name, SamName) == 0); + if (SamplerFound) + break; } - else + + if (!SamplerFound) { for (Uint32 i = 0; i < GetNumSepSmplrs(); ++i) { const auto& SepSmpl = GetSepSmplr(i); - SamplerFound = (strcmp(SepSmpl.Name, SamName) == 0); + SamplerFound = StreqSuff(SepSmpl.Name, SamName, CombinedSamplerSuffix); if (SamplerFound) break; } |
