X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fprogram_backend.cpp;h=0c30b99e72ffad596614eec86a1eee69702cb336;hb=370eb9e6a1e54da52047ba843e25c36be9789209;hp=68ade90c7f2ef8e15f1f14298877c6d47d59b3f4;hpb=89347a620294a1136ee111edeadec68390654f78;p=libs%2Fgl.git diff --git a/source/backends/vulkan/program_backend.cpp b/source/backends/vulkan/program_backend.cpp index 68ade90c..0c30b99e 100644 --- a/source/backends/vulkan/program_backend.cpp +++ b/source/backends/vulkan/program_backend.cpp @@ -22,7 +22,8 @@ VulkanProgram::VulkanProgram(VulkanProgram &&other): stage_flags(other.stage_flags), creation_info(move(other.creation_info)), desc_set_layout_handles(move(other.desc_set_layout_handles)), - layout_handle(other.layout_handle) + layout_handle(other.layout_handle), + debug_name(move(other.debug_name)) { other.desc_set_layout_handles.clear(); other.layout_handle = 0; @@ -99,6 +100,12 @@ void VulkanProgram::add_spirv_stages(const SpirVModule &mod, const map(this)->specialized_spirv) + spirv->set_debug_name(debug_name); +#endif } void VulkanProgram::finalize_uniforms() @@ -119,7 +126,7 @@ void VulkanProgram::finalize_uniforms() bindings.emplace_back(); VkDescriptorSetLayoutBinding &binding = bindings.back(); binding.binding = b.bind_point; - binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC; + binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; binding.descriptorCount = 1; binding.stageFlags = VK_SHADER_STAGE_ALL; binding.pImmutableSamplers = 0; @@ -160,5 +167,16 @@ void VulkanProgram::finalize_uniforms() vk.CreatePipelineLayout(layout_info, layout_handle); } +void VulkanProgram::set_debug_name(const string &name) +{ +#ifdef DEBUG + debug_name = name; + if(SpirVModule *spirv = static_cast(this)->specialized_spirv) + spirv->set_debug_name(debug_name); +#else + (void)name; +#endif +} + } // namespace GL } // namespace Msp