Skip to content
Snippets Groups Projects
Verified Commit d566e90a authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Added more doxygen comments to multiple classes

parent cd8bbcb1
No related branches found
No related tags found
1 merge request!97Resolve "Dokumentation vervollständigen"
......@@ -12,6 +12,11 @@
namespace vkcv {
/**
* @brief Template class for buffer management and filling data.
*
* @tparam T Buffer content type
*/
template<typename T>
class Buffer {
friend class Core;
......
......@@ -29,6 +29,10 @@ namespace vkcv
class Core;
/**
* @brief Class to manage the creation, destruction, allocation
* and filling of buffers.
*/
class BufferManager
{
friend class Core;
......
......@@ -11,7 +11,14 @@
namespace vkcv {
/**
* @brief Function to be called for recording a command buffer.
*/
typedef typename event_function<const vk::CommandBuffer&>::type RecordCommandFunction;
/**
* @brief Function to be called after finishing a given process.
*/
typedef typename event_function<>::type FinishCommandFunction;
}
\ No newline at end of file
......@@ -12,6 +12,10 @@
namespace vkcv {
/**
* @brief Structure to store command pools for given queue families
* of a device.
*/
struct CommandResources {
std::vector<vk::CommandPool> cmdPoolPerQueueFamily;
};
......
......@@ -12,6 +12,9 @@
namespace vkcv {
/**
* @brief Structure to configure a compute pipeline before its creation.
*/
struct ComputePipelineConfig {
ShaderProgram& m_ShaderProgram;
std::vector<DescriptorSetLayoutHandle> m_DescriptorSetLayouts;
......
......@@ -14,6 +14,13 @@
namespace vkcv
{
/**
* @brief Class to manage the vulkan resources as an instance,
* a device, a physical device and a memory allocator. Additionally
* instances of this class will hold the feature manager and the
* queue manager.
*/
class Context
{
friend class Core;
......@@ -119,4 +126,5 @@ namespace vkcv
vma::Allocator m_Allocator;
};
}
......@@ -52,6 +52,10 @@ namespace vkcv
std::vector<vk::Semaphore> signalSemaphores;
};
/**
* @brief The class handles the core functionality of the framework with
* most calls addressing resource management via more simplified abstraction.
*/
class Core final
{
private:
......
......@@ -42,6 +42,10 @@ namespace vkcv {
uint32_t binding;
};
/**
* @brief Class to store details about writing to
* a descriptor set and its bindings.
*/
class DescriptorWrites {
private:
std::vector<SampledImageDescriptorWrite> m_sampledImageWrites;
......@@ -52,43 +56,136 @@ namespace vkcv {
std::vector<AccelerationDescriptorWrite> m_accelerationWrites;
public:
/**
* @brief Adds an entry to write an image to a given binding
* of a descriptor set to sample from it using specific details.
*
* @param[in] binding Binding index
* @param[in] image Image handle
* @param[in] mipLevel Mip level index
* @param[in] useGeneralLayout Flag to use a general layout
* @param[in] arrayIndex Image array index
* @return Instance of descriptor writes
*/
DescriptorWrites& writeSampledImage(uint32_t binding,
ImageHandle image,
uint32_t mipLevel = 0,
bool useGeneralLayout = false,
uint32_t arrayIndex = 0);
/**
* @brief Adds an entry to write an image to a given binding
* of a descriptor set to store into it using specific details.
*
* @param[in] binding Binding index
* @param[in,out] image Image handle
* @param[in] mipLevel Mip level index
* @return Instance of descriptor writes
*/
DescriptorWrites& writeStorageImage(uint32_t binding,
ImageHandle image,
uint32_t mipLevel = 0);
/**
* @brief Adds an entry to write a buffer to a given binding
* of a descriptor set as uniform buffer using specific details.
*
* @param[in] binding Binding index
* @param[in] buffer Buffer handle
* @param[in] dynamic Flag to use dynamic access
* @param[in] offset Offset for buffer access range
* @param[in] size Size of the buffer access range
* @return Instance of descriptor writes
*/
DescriptorWrites& writeUniformBuffer(uint32_t binding,
BufferHandle buffer,
bool dynamic = false,
uint32_t offset = 0,
uint32_t size = 0);
/**
* @brief Adds an entry to write a buffer to a given binding
* of a descriptor set as storage buffer using specific details.
*
* @param[in] binding Binding index
* @param[in] buffer Buffer handle
* @param[in,out] dynamic Flag to use dynamic access
* @param[in] offset Offset for buffer access range
* @param[in] size Size of the buffer access range
* @return Instance of descriptor writes
*/
DescriptorWrites& writeStorageBuffer(uint32_t binding,
BufferHandle buffer,
bool dynamic = false,
uint32_t offset = 0,
uint32_t size = 0);
/**
* @brief Adds an entry to write a sampler to a given binding
* of a descriptor set.
*
* @param[in] binding Binding index
* @param[in] sampler Sampler handle
* @return Instance of descriptor writes
*/
DescriptorWrites& writeSampler(uint32_t binding,
SamplerHandle sampler);
/**
* @brief Adds an entry for acceleration to a given binding
* of a descriptor set.
*
* @param[in] binding Binding index
* @return Instance of descriptor writes
*/
DescriptorWrites& writeAcceleration(uint32_t binding);
/**
* @brief Returns the list of stored write entries for sampled images.
*
* @return Sampled image write details
*/
[[nodiscard]]
const std::vector<SampledImageDescriptorWrite>& getSampledImageWrites() const;
/**
* @brief Returns the list of stored write entries for storage images.
*
* @return Storage image write details
*/
[[nodiscard]]
const std::vector<StorageImageDescriptorWrite>& getStorageImageWrites() const;
/**
* @brief Returns the list of stored write entries for uniform buffers.
*
* @return Uniform buffers write details
*/
[[nodiscard]]
const std::vector<BufferDescriptorWrite>& getUniformBufferWrites() const;
/**
* @brief Returns the list of stored write entries for storage buffers.
*
* @return Storage buffers write details
*/
[[nodiscard]]
const std::vector<BufferDescriptorWrite>& getStorageBufferWrites() const;
/**
* @brief Returns the list of stored write entries for samplers.
*
* @return Samplers write details
*/
[[nodiscard]]
const std::vector<SamplerDescriptorWrite>& getSamplerWrites() const;
/**
* @brief Returns the list of stored write entries for accelerations.
*
* @return Accelerations write details
*/
[[nodiscard]]
const std::vector<AccelerationDescriptorWrite>& getAccelerationWrites() const;
};
......
......@@ -22,7 +22,10 @@ namespace vkcv {
// add more as needed
// alternatively we could expose the blend factors directly
enum class BlendMode{ None, Additive };
/**
* @brief Structure to configure a graphics pipeline before its creation.
*/
struct GraphicsPipelineConfig {
ShaderProgram m_ShaderProgram;
uint32_t m_Width;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment