diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-09-17 20:28:10 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-09-17 20:28:10 +0000 |
| commit | 6bccf55c08b641ee2b0ae0df1e5908e28e52e612 (patch) | |
| tree | 7237eed479980235e6987e6868eacb88f9ae96b8 /Graphics/GraphicsEngineOpenGL | |
| parent | Added UnifiedMemoryCPUAccess member to GraphicsAdapterInfo struct (API Versio... (diff) | |
| parent | don't link with vulkan if used volk, added shader name to log message (diff) | |
| download | DiligentCore-6bccf55c08b641ee2b0ae0df1e5908e28e52e612.tar.gz DiligentCore-6bccf55c08b641ee2b0ae0df1e5908e28e52e612.zip | |
Merge branch 'mesh_shader_fix' of https://github.com/azhirnov/DiligentCore into azhirnov-mesh_shader_fix
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp | 11 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/PipelineStateGLImpl.cpp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp b/Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp index cf6a9e86..d3b11a18 100644 --- a/Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp @@ -82,7 +82,10 @@ class GLPipelineResourceLayout public: GLPipelineResourceLayout(IObject& Owner) : m_Owner(Owner) - {} + { + m_ProgramIndex.fill(-1); + } + ~GLPipelineResourceLayout(); // No copies, only moves are allowed @@ -328,9 +331,9 @@ private: /*34*/ OffsetType m_ImageOffset = 0; /*36*/ OffsetType m_StorageBufferOffset = 0; /*38*/ OffsetType m_VariableEndOffset = 0; -/*40*/ std::array<Int8, 6> m_ProgramIndex = {{-1, -1, -1, -1, -1, -1}}; -/*46*/ Uint8 m_NumPrograms = 0; -/*48*/ +/*40*/ std::array<Int8, NUM_SHADER_TYPES> m_ProgramIndex; +/*48*/ Uint8 m_NumPrograms = 0; +/*49*/ // clang-format on template <typename ResourceType> OffsetType GetResourceOffset() const; diff --git a/Graphics/GraphicsEngineOpenGL/src/PipelineStateGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/PipelineStateGLImpl.cpp index bb2201d1..1cc0a1ef 100644 --- a/Graphics/GraphicsEngineOpenGL/src/PipelineStateGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/PipelineStateGLImpl.cpp @@ -102,7 +102,7 @@ PipelineStateGLImpl::PipelineStateGLImpl(IReferenceCounters* pRefCoun } else { - m_GLPrograms.emplace_back(ShaderGLImpl::LinkProgram(m_ppShaders, m_NumShaders, false)); + m_GLPrograms.emplace_back(ShaderGLImpl::LinkProgram(m_ppShaders.data(), m_NumShaders, false)); m_ProgramResources.resize(1); SHADER_TYPE ShaderStages = SHADER_TYPE_UNKNOWN; for (Uint32 i = 0; i < m_NumShaders; ++i) |
