diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-11-09 17:01:53 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-11-09 17:01:53 +0000 |
| commit | 5874e6b071ffbb9cc73f96bb7bf6afff5a532ff9 (patch) | |
| tree | 9ad0d6c4146948b1add3bc1c7762d452e340088c /Graphics/GraphicsEngineVulkan | |
| parent | Fixed cmake 3.13 policy CMP0077 warnings (diff) | |
| download | DiligentCore-5874e6b071ffbb9cc73f96bb7bf6afff5a532ff9.tar.gz DiligentCore-5874e6b071ffbb9cc73f96bb7bf6afff5a532ff9.zip | |
Using entry point name from SPIRV bytecode (fixed https://github.com/DiligentGraphics/DiligentCore/issues/39)
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h index adcc6a31..d42973c2 100644 --- a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h +++ b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h @@ -96,7 +96,7 @@ private: ShaderResourceCacheVk m_StaticResCache; ShaderVariableManagerVk m_StaticVarsMgr; - const std::string m_EntryPoint; + std::string m_EntryPoint; std::vector<uint32_t> m_SPIRV; }; diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp index 56e32ed1..54ce0030 100644 --- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp @@ -38,8 +38,7 @@ ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl* TShaderBase (pRefCounters, pRenderDeviceVk, CreationAttribs.Desc), m_StaticResLayout (*this, pRenderDeviceVk->GetLogicalDevice()), m_StaticResCache (ShaderResourceCacheVk::DbgCacheContentType::StaticShaderResources), - m_StaticVarsMgr (*this), - m_EntryPoint (CreationAttribs.EntryPoint) + m_StaticVarsMgr (*this) { if (CreationAttribs.Source != nullptr || CreationAttribs.FilePath != nullptr) { @@ -80,7 +79,7 @@ ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl* auto& Allocator = GetRawAllocator(); auto* pRawMem = ALLOCATE(Allocator, "Allocator for ShaderResources", sizeof(SPIRVShaderResources)); bool IsHLSLVertexShader = CreationAttribs.SourceLanguage == SHADER_SOURCE_LANGUAGE_HLSL && m_Desc.ShaderType == SHADER_TYPE_VERTEX; - auto* pResources = new (pRawMem) SPIRVShaderResources(Allocator, pRenderDeviceVk, m_SPIRV, m_Desc, CreationAttribs.UseCombinedTextureSamplers ? CreationAttribs.CombinedSamplerSuffix : nullptr, IsHLSLVertexShader); + auto* pResources = new (pRawMem) SPIRVShaderResources(Allocator, pRenderDeviceVk, m_SPIRV, m_Desc, CreationAttribs.UseCombinedTextureSamplers ? CreationAttribs.CombinedSamplerSuffix : nullptr, IsHLSLVertexShader, m_EntryPoint); m_pShaderResources.reset(pResources, STDDeleterRawMem<SPIRVShaderResources>(Allocator)); if (IsHLSLVertexShader) |
