diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-05-18 04:36:46 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-05-18 04:36:46 +0000 |
| commit | c0087704ea69eec2d52d4db891309b362a2c2812 (patch) | |
| tree | 98f1d5efaaec4a8d57524e7d55714402a862d3c3 /Graphics/GraphicsEngineVulkan | |
| parent | Added texel uniform/storage buffer detection (diff) | |
| download | DiligentCore-c0087704ea69eec2d52d4db891309b362a2c2812.tar.gz DiligentCore-c0087704ea69eec2d52d4db891309b362a2c2812.zip | |
Reworked SPIRVShaderResources: reduced sizeof(SPIRVShaderResourceAttribs) to 32; packing resource names into the string pool
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/ShaderResourceLayoutVk.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderResourceLayoutVk.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderResourceLayoutVk.cpp index ff79ab41..1bfacee3 100644 --- a/Graphics/GraphicsEngineVulkan/src/ShaderResourceLayoutVk.cpp +++ b/Graphics/GraphicsEngineVulkan/src/ShaderResourceLayoutVk.cpp @@ -614,10 +614,10 @@ void ShaderResourceLayoutVk::BindResources( IResourceMapping* pResourceMapping, if( (Flags & BIND_SHADER_RESOURCES_UPDATE_UNRESOLVED) && Res.IsBound(ArrInd) ) return; - const auto& VarName = Res.SpirvAttribs.Name; + const auto* VarName = Res.SpirvAttribs.Name; RefCntAutoPtr<IDeviceObject> pObj; VERIFY_EXPR(pResourceMapping != nullptr); - pResourceMapping->GetResource( VarName.c_str(), &pObj, ArrInd ); + pResourceMapping->GetResource( VarName, &pObj, ArrInd ); if( pObj ) { // Call non-virtual function @@ -645,7 +645,7 @@ IShaderVariable* ShaderResourceLayoutVk::GetShaderVariable(const Char* Name) for(Uint32 r=0; r < TotalResources; ++r) { auto &Res = GetResource(r); - if(Res.SpirvAttribs.Name.compare(Name) == 0) + if(strcmp(Res.SpirvAttribs.Name, Name) == 0) { pVar = &Res; break; |
