summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/PrivateConstants.h5
-rw-r--r--Graphics/GraphicsEngine/src/PipelineResourceSignatureBase.cpp3
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)