Vulkan best way of updating pipeline viewport I have discovered that there are two ways to update the viewport (might be more, but not sure). Currently I am rebuilding the Pipeline when I resize my screen but there is a noticeable stutter as it rebuilds, but I have also found out that you can use vkCmdSetViewport when building/rebuilding your command buffers. But is this the right way to do it? And if I used vkCmdSetViewport, what should be put into the VkGraphicsPipelineCreateInfo pViewportState?

If there is an even better way of handling screen resizing please let me know.
Both suggested methods are fine, but they should be preferred in certain situations.

Dynamic state should be preferred in situations where you have many, perhaps thousands of, pipeline objects or you need to change the resolution often (such as in some sort of windowed tool. The downside to this is that it may reduce runtime performance since the driver may not be able apply optimizations for this.

Having the viewport only defined when building the pipeline objects might be more appropriate for games or simulators where you don't change the resolution often. Of course, when the viewport does change, it hits performance hard during resizing. This also has the drawback of needing to generate new pipeline objects, which could be especially problematic if you cache pipelines in a hash table of something similar.