diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2021-01-28 04:39:30 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2021-01-28 04:39:30 +0000 |
| commit | 104ffa2f0b42be3fde1606cfb84883c912f41f3c (patch) | |
| tree | 31365b2d81c88b117ac4e65844017c93d94da4be /Graphics/GraphicsEngine | |
| parent | Added dynamic vertex buffer and dynamic index buffer update tests (diff) | |
| download | DiligentCore-104ffa2f0b42be3fde1606cfb84883c912f41f3c.tar.gz DiligentCore-104ffa2f0b42be3fde1606cfb84883c912f41f3c.zip | |
More refactorin of PipelineResourceSignatureVkImpl
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/PrivateConstants.h | 5 | ||||
| -rw-r--r-- | Graphics/GraphicsEngine/src/PipelineResourceSignatureBase.cpp | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngine/include/PrivateConstants.h b/Graphics/GraphicsEngine/include/PrivateConstants.h index e84e7992..ca25e180 100644 --- a/Graphics/GraphicsEngine/include/PrivateConstants.h +++ b/Graphics/GraphicsEngine/include/PrivateConstants.h @@ -39,10 +39,7 @@ namespace Diligent /// (Vertex, Hull, Domain, Geometry, Pixel) or (Amplification, Mesh, Pixel), or (Compute) or (RayGen, Miss, ClosestHit, AnyHit, Intersection, Callable) static constexpr Uint32 MAX_SHADERS_IN_PIPELINE = 6; -// Static/mutable and dynamic descriptor sets (Vulkan only) -static constexpr Uint32 MAX_DESCR_SET_PER_SIGNATURE = 2; - // The maximum number of resources in pipeline resources signature. -static constexpr Uint32 MAX_RESOURCES_IN_SIGNATURE = 1u << 16; +static constexpr Uint32 MAX_RESOURCES_IN_SIGNATURE = (1u << 16u) - 1u; } // namespace Diligent diff --git a/Graphics/GraphicsEngine/src/PipelineResourceSignatureBase.cpp b/Graphics/GraphicsEngine/src/PipelineResourceSignatureBase.cpp index cf2cff2e..a1f0556b 100644 --- a/Graphics/GraphicsEngine/src/PipelineResourceSignatureBase.cpp +++ b/Graphics/GraphicsEngine/src/PipelineResourceSignatureBase.cpp @@ -41,6 +41,9 @@ void ValidatePipelineResourceSignatureDesc(const PipelineResourceSignatureDesc& if (Desc.BindingIndex >= MAX_RESOURCE_SIGNATURES) LOG_PRS_ERROR_AND_THROW("Desc.BindingIndex (", Uint32{Desc.BindingIndex}, ") exceeds the maximum allowed value (", MAX_RESOURCE_SIGNATURES - 1, ")."); + if (Desc.NumResources > MAX_RESOURCES_IN_SIGNATURE) + LOG_PRS_ERROR_AND_THROW("Desc.NumResources (", Uint32{Desc.NumResources}, ") exceeds the maximum allowed value (", MAX_RESOURCES_IN_SIGNATURE, ")."); + std::unordered_map<HashMapStringKey, SHADER_TYPE, HashMapStringKey::Hasher> ResourceShaderStages; for (Uint32 i = 0; i < Desc.NumResources; ++i) |
