From c0087704ea69eec2d52d4db891309b362a2c2812 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 17 May 2018 21:36:46 -0700 Subject: Reworked SPIRVShaderResources: reduced sizeof(SPIRVShaderResourceAttribs) to 32; packing resource names into the string pool --- Graphics/GraphicsEngineVulkan/src/ShaderResourceLayoutVk.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') 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 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; -- cgit v1.2.3