diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2021-02-04 05:12:38 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2021-02-04 05:12:38 +0000 |
| commit | 2a2a6c842cccb60ab4c67d31b3d26f74816fb3ac (patch) | |
| tree | 8e0746be933fe595f7de1c2304f150fa5d97f23a /Graphics | |
| parent | update for vulkan PRS (diff) | |
| download | DiligentCore-2a2a6c842cccb60ab4c67d31b3d26f74816fb3ac.tar.gz DiligentCore-2a2a6c842cccb60ab4c67d31b3d26f74816fb3ac.zip | |
PipelineResourceSignatureVkImpl: removed methods and members that were moved to PipelineResourceSignatureBase
Diffstat (limited to 'Graphics')
3 files changed, 5 insertions, 35 deletions
diff --git a/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp b/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp index ceb70688..c0cd6b94 100644 --- a/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp +++ b/Graphics/GraphicsEngine/include/PipelineResourceSignatureBase.hpp @@ -101,6 +101,8 @@ public: return std::pair<Uint32, Uint32>{m_ResourceOffsets[VarType], m_ResourceOffsets[VarType + 1]}; } + SHADER_TYPE GetActiveShaderStages() const { return m_ShaderStages; } + // Returns the number of shader stages that have resources. Uint32 GetNumActiveShaderStages() const { return m_NumShaderStages; } @@ -274,15 +276,15 @@ protected: protected: size_t m_Hash = 0; + std::array<Uint16, SHADER_RESOURCE_VARIABLE_TYPE_NUM_TYPES + 1> m_ResourceOffsets = {}; + // Shader stages that have resources. SHADER_TYPE m_ShaderStages = SHADER_TYPE_UNKNOWN; - std::array<Uint16, SHADER_RESOURCE_VARIABLE_TYPE_NUM_TYPES + 1> m_ResourceOffsets = {}; - PIPELINE_TYPE m_PipelineType = PIPELINE_TYPE_INVALID; // The number of shader stages that have resources. - Uint8 m_NumShaderStages = 0; // AZ TODO: remove ? + Uint8 m_NumShaderStages = 0; #ifdef DILIGENT_DEBUG bool m_IsDestructed = false; diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp index 7628be28..56a07507 100644 --- a/Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp +++ b/Graphics/GraphicsEngineVulkan/include/PipelineResourceSignatureVkImpl.hpp @@ -104,15 +104,6 @@ public: return (HasDescriptorSet(DESCRIPTOR_SET_ID_STATIC_MUTABLE) ? 1 : 0) + (HasDescriptorSet(DESCRIPTOR_SET_ID_DYNAMIC) ? 1 : 0); } - // Returns shader stages that have resources. - SHADER_TYPE GetActiveShaderStages() const { return m_ShaderStages; } - - // Returns the number of shader stages that have resources. - Uint32 GetNumActiveShaderStages() const { return m_NumShaderStages; } - - // Returns the type of the active shader stage with the given index. - SHADER_TYPE GetActiveShaderStageType(Uint32 StageIndex) const; - enum class CacheContentType { Signature = 0, // only static resources @@ -331,9 +322,6 @@ private: ResourceAttribs* m_pResourceAttribs = nullptr; // [m_Desc.NumResources] - // Shader stages that have resources. - SHADER_TYPE m_ShaderStages = SHADER_TYPE_UNKNOWN; - // The total number of uniform buffers with dynamic offsets in both descriptor sets, // accounting for array size. Uint16 m_DynamicUniformBufferCount = 0; @@ -346,9 +334,6 @@ private: std::array<Int8, MAX_SHADERS_IN_PIPELINE> m_StaticVarIndex = {-1, -1, -1, -1, -1, -1}; static_assert(MAX_SHADERS_IN_PIPELINE == 6, "Please update the initializer list above"); - // The number of shader stages that have resources. - Uint8 m_NumShaderStages = 0; - // Static resource cache for all static resources ShaderResourceCacheVk* m_pStaticResCache = nullptr; // Static variables manager for every shader stage diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp index ae8d2a5b..72e3e8e3 100644 --- a/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/PipelineResourceSignatureVkImpl.cpp @@ -908,23 +908,6 @@ void PipelineResourceSignatureVkImpl::InitSRBResourceCache(ShaderResourceCacheVk } } -SHADER_TYPE PipelineResourceSignatureVkImpl::GetActiveShaderStageType(Uint32 StageIndex) const -{ - VERIFY_EXPR(StageIndex < m_NumShaderStages); - - SHADER_TYPE Stages = m_ShaderStages; - for (Uint32 Index = 0; Stages != SHADER_TYPE_UNKNOWN; ++Index) - { - auto StageBit = ExtractLSB(Stages); - - if (Index == StageIndex) - return StageBit; - } - - UNEXPECTED("Index is out of range"); - return SHADER_TYPE_UNKNOWN; -} - void PipelineResourceSignatureVkImpl::InitializeStaticSRBResources(ShaderResourceCacheVk& DstResourceCache) const { if (!HasDescriptorSet(DESCRIPTOR_SET_ID_STATIC_MUTABLE) || m_pStaticResCache == nullptr) |
