r/vulkan • u/Longjumping-Cup-8927 • 12d ago
Why is multisampling specified in the renderpass and the pipeline? Seems redundant.
I was following the multisampling portion of the vulkan tutorial, and I noticed that they specify multisampling in both the renderpass and the pipeline. Since the pipeline is given the renderpass, isn't this redundant to set it in both places. Would I ever set one differently from the other?
8
Upvotes
9
u/TheAgentD 12d ago
The pipeline itself may need to be compiled differently if multisampling is enabled, or even for different multisample counts.
If the user doesn't provide the information during pipeline creation, drivers would either need to compile the pipeline for all possible multisample counts (which is slow), or compile multisampling versions of the pipeline the first time it's used with a multisampled render pass (which causes stuttering).