3#include "spark/render/Export.h"
4#include "spark/render/PushConstantsRange.h"
23 [[nodiscard]]
virtual unsigned int size() const noexcept = 0;
38 [[nodiscard]] std::vector<const
IPushConstantsRange*> ranges() const noexcept {
return genericRanges(); }
42 [[nodiscard]]
virtual std::vector<const IPushConstantsRange*> genericRanges() const noexcept = 0;
63 template <typename PushConstantsRangeType>
67 using PushConstantsRange = PushConstantsRangeType;
71 [[nodiscard]]
const PushConstantsRangeType&
range(ShaderStage stage)
const override = 0;
74 [[nodiscard]]
virtual std::vector<const PushConstantsRangeType*>
ranges() const noexcept = 0;
77 [[nodiscard]] virtual std::vector<const
IPushConstantsRange*> genericRanges() const noexcept final
79 std::vector<const IPushConstantsRange*> ranges_vector;
80 ranges_vector.reserve(ranges().size());
81 std::ranges::transform(ranges(), std::back_inserter(ranges_vector), [](
const auto& range) {
return static_cast<const IPushConstantsRange*
>(range); });
Interface for a push constants layout.
Definition PushConstantsLayout.h:15
virtual unsigned int size() const noexcept=0
Get the size (in bytes) of the push constants backing memory.
Interface for a push constants range in a push constants layout .
Definition PushConstantsRange.h:12
Describes the layout of the pipelines push constant ranges.
Definition PushConstantsLayout.h:65
virtual std::vector< const PushConstantsRangeType * > ranges() const noexcept=0
Get all push constants ranges .
const PushConstantsRangeType & range(ShaderStage stage) const override=0
Get the push constants range associated with the shader stage provided.