Continue working on pipeline
This commit is contained in:
1 parent
45be08019e
commit
bd05c03a12
28 files changed
+453
-423
No files matched your search
@@ -12,13 +12,33 @@
|
||||
#ifndef DESCRIPTOR_BUILDER_H
|
||||
#define DESCRIPTOR_BUILDER_H
|
||||
|
||||
#include <vulkan/vulkan_core.h>
|
||||
|
||||
#include "src/graphics_context.h"
|
||||
|
||||
struct descriptor_set_handle_t;
|
||||
struct descriptor_set_list_t;
|
||||
|
||||
/**
|
||||
* @brief Initialize new descriptor set handle
|
||||
*
|
||||
* @param descriptor_set_handle Handle to initialize
|
||||
* #return RSE_ERROR_NO_ERROR on success
|
||||
*/
|
||||
rse_err_t descriptor_initialize_handle(struct descriptor_set_handle_t **descriptor_set_handle);
|
||||
|
||||
/**
|
||||
* @brief Destroy descritptor set handle
|
||||
*
|
||||
* @param descriptor_set_handle Handle to destroy
|
||||
* @return RSE_ERROR_NO_ERROR on succes
|
||||
*/
|
||||
rse_err_t descriptor_free_handle(struct descriptor_set_handle_t **descriptor_set_handle);
|
||||
|
||||
/**
|
||||
* @brief Add descriptor set to provided list
|
||||
*
|
||||
* @param descriptor_set_list List to be filled
|
||||
* @param descriptor_set_handle Handle for given descriptor set
|
||||
* @param binding Descriptors binding
|
||||
* @param type Type of descriptors
|
||||
* @param descriptor_count Number of descriptors in this set
|
||||
@@ -26,18 +46,35 @@ struct descriptor_set_list_t;
|
||||
* @param sampler If descriptor set is a sampler, provide it here
|
||||
* @return rse_err_t RSE_ERROR_NO_ERROR on success, error code on failure
|
||||
*/
|
||||
rse_err_t descriptor_add_set(struct descriptor_set_list_t* descriptor_set_list, uint32_t binding, VkDescriptorType type,
|
||||
uint32_t descriptor_count, VkShaderStageFlags shader_stages, VkSampler sampler);
|
||||
rse_err_t descriptor_add_set(struct descriptor_set_handle_t* descriptor_set_handle, uint32_t binding, VkDescriptorType type,
|
||||
uint32_t descriptor_count, VkShaderStageFlags shader_stages, VkSampler* sampler);
|
||||
|
||||
/**
|
||||
* @brief Allocate descriptor sets from provided list. The data will be stored in opaque descriptor handle
|
||||
*
|
||||
* @param context Graphics context
|
||||
* @param descriptors List of descriptors to build descriptor handle from.
|
||||
* @param descriptor_set_handle Opaque descriptor handle object.
|
||||
* @return rse_err_t RSE_ERROR_NO_ERROR on success, error code on failure
|
||||
*/
|
||||
rse_err_t descriptors_build(struct graphics_context_t* context, struct descriptor_set_list_t* descriptors,
|
||||
struct descriptor_set_handle_t* descriptor_set_handle);
|
||||
rse_err_t descriptors_build(struct graphics_context_t* context, struct descriptor_set_handle_t* descriptor_set_handle);
|
||||
|
||||
/**
|
||||
* @brief Return descriptor set layouts from descritptor handle
|
||||
*
|
||||
* @param descriptor_set_handle Handle for descriptor set
|
||||
* @return rse_err_t RSE_ERROR_NO_ERROR on success
|
||||
*/
|
||||
rse_err_t descriptor_get_layout(struct descriptor_set_handle_t* descriptor_set_handle,
|
||||
VkDescriptorSetLayout* descritptor_sets_layout);
|
||||
|
||||
/**
|
||||
* @brief Get VkDescriptorSet from descriptor handle
|
||||
*
|
||||
* @param descriptor_set_handle_t Handle to get VkDescriptorSet from
|
||||
* @return rse_err_t RSE_ERROR_NO_ERROR on success
|
||||
*/
|
||||
rse_err_t descriptor_get_vkhandle(struct descriptor_set_handle_t* descriptor_set_handle, VkDescriptorSet* descriptor_set);
|
||||
|
||||
rse_err_t descriptor_attach_buffer(struct graphics_context_t* context, struct descriptor_set_handle_t* descriptor_set_handle, struct vulkan_buffer_t* buffer, uint32_t binding, VkDescriptorType type);
|
||||
|
||||
#endif // !DESCRIPTOR_BUILDER_H
|
||||
Reference in new issue
Block a user