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;
return n_stages;
}
-void VulkanProgram::add_glsl_stages(const GlslModule &, const map<string, int> &, TransientData &)
+void VulkanProgram::add_glsl_stages(const GlslModule &, const map<string, int> &)
{
throw invalid_operation("VulkanProgram::add_glsl_stages");
}
stage_infos[i].pSpecializationInfo = spec_info;
++i;
}
+
+#if DEBUG
+ if(!debug_name.empty())
+ if(SpirVModule *spirv = static_cast<Program *>(this)->specialized_spirv)
+ spirv->set_debug_name(debug_name);
+#endif
}
void VulkanProgram::finalize_uniforms()
{
bindings.emplace_back();
VkDescriptorSetLayoutBinding &binding = bindings.back();
- binding.binding = b.bind_point;
+ binding.binding = b.bind_point&0xFFFFF;
binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
binding.descriptorCount = 1;
binding.stageFlags = VK_SHADER_STAGE_ALL;
{
bindings.emplace_back();
VkDescriptorSetLayoutBinding &binding = bindings.back();
- binding.binding = u.binding;
+ binding.binding = u.binding&0xFFFFF;
binding.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
binding.descriptorCount = 1;
binding.stageFlags = VK_SHADER_STAGE_ALL;
vk.CreatePipelineLayout(layout_info, layout_handle);
}
+void VulkanProgram::set_debug_name(const string &name)
+{
+#ifdef DEBUG
+ debug_name = name;
+ if(SpirVModule *spirv = static_cast<Program *>(this)->specialized_spirv)
+ spirv->set_debug_name(debug_name);
+#else
+ (void)name;
+#endif
+}
+
} // namespace GL
} // namespace Msp