Replace MVP uniform buffer with push constants

UBO should be used for large data. MVP should be
push constants, since it's a small amount of data
updated every frame

Signed-off-by: Piotr Krygier <piotrkrygier@everyonecancode@xyz>
This commit is contained in:
Piotr Krygier committed 2026-02-10 14:34:11 +01:00
1 parent b8509a9a68
commit b8fc36910f
7 files changed
+106 -71

No files matched your search

+12
View File
@@ -92,6 +92,18 @@ rse_err_t pipeline_add_dynamic_state(struct pipeline_t* pipeline, const VkDynami
rse_err_t pipeline_add_descriptor_sets(struct graphics_context_t* context,
struct pipeline_t* pipeline,
uint32_t descriptor_set_id);
/**
* @brief Add push constants to pipeline
*
* @return RSE_ERROR_NO_ERROR on success
*
*/
rse_err_t pipeline_add_push_constants(struct pipeline_t* pipeline,
VkShaderStageFlagBits shader_stage,
uint32_t offset,
uint32_t size);
/**
* @brief Build pipeline from added components. This function should be called after adding all necessary components.
* After call, pipeline is ready to be used and all added components are cleared, ready for next pipeline to be built.