diff --git a/include/merian/vk/shader/shader_module.hpp b/include/merian/vk/shader/shader_module.hpp index 766af92..8a8a3d4 100644 --- a/include/merian/vk/shader/shader_module.hpp +++ b/include/merian/vk/shader/shader_module.hpp @@ -51,7 +51,7 @@ class ShaderModule : public std::enable_shared_from_this { operator ShaderStageCreateInfo(); ShaderStageCreateInfo get_shader_stage_create_info( - const SpecializationInfoHandle specialization_info = MERIAN_SPECIALIZATION_INFO_NONE, + const SpecializationInfoHandle& specialization_info = MERIAN_SPECIALIZATION_INFO_NONE, const char* entry_point = "main", const vk::PipelineShaderStageCreateFlags flags = {}); @@ -72,7 +72,7 @@ class ShaderStageCreateInfo { ShaderStageCreateInfo( const ShaderModuleHandle& shader_module, const SpecializationInfoHandle& specialization_info = MERIAN_SPECIALIZATION_INFO_NONE, - const std::string entry_point = "main", + const std::string& entry_point = "main", const vk::PipelineShaderStageCreateFlags flags = {}); operator vk::PipelineShaderStageCreateInfo() const; diff --git a/src/merian/vk/shader/shader_module.cpp b/src/merian/vk/shader/shader_module.cpp index f3b4446..73664b3 100644 --- a/src/merian/vk/shader/shader_module.cpp +++ b/src/merian/vk/shader/shader_module.cpp @@ -57,7 +57,7 @@ ShaderModule::operator ShaderStageCreateInfo() { } ShaderStageCreateInfo -ShaderModule::get_shader_stage_create_info(const SpecializationInfoHandle specialization_info, +ShaderModule::get_shader_stage_create_info(const SpecializationInfoHandle& specialization_info, const char* entry_point, const vk::PipelineShaderStageCreateFlags flags) { return ShaderStageCreateInfo(shared_from_this(), specialization_info, entry_point, flags); @@ -71,7 +71,7 @@ ShaderModuleHandle ShaderModule::fullscreen_triangle(const ContextHandle& contex ShaderStageCreateInfo::ShaderStageCreateInfo(const ShaderModuleHandle& shader_module, const SpecializationInfoHandle& specialization_info, - const std::string entry_point, + const std::string& entry_point, const vk::PipelineShaderStageCreateFlags flags) : shader_module(shader_module), specialization_info(specialization_info), entry_point(entry_point), flags(flags) {}