Pipeline to render lines and triangles

I would like to know are there any cases that I can use the same pipeline to render lines and triangles?

Is there any chances to define VkPipelineInputAssemblyStateCreateInfo::topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST | VK_PRIMITIVE_TOPOLOGY_LINE_LIST

Or the only valid case is to create 2 separate pipelines for every type of topology?

You’ll need to create a pipeline where the primitive topology is dynamic state (VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY) and record a vkCmdSetPrimitiveTopology before any draw calls.

GREAT! Thanks a lot @carsten_neumann