| 297 | } |
| 298 | |
| 299 | void MSAASample::update_pipelines() |
| 300 | { |
| 301 | bool msaa_enabled = sample_count != VK_SAMPLE_COUNT_1_BIT; |
| 302 | if (run_postprocessing) |
| 303 | { |
| 304 | update_for_scene_and_postprocessing(msaa_enabled); |
| 305 | } |
| 306 | else |
| 307 | { |
| 308 | update_for_scene_only(msaa_enabled); |
| 309 | } |
| 310 | |
| 311 | // Default swapchain usage flags |
| 312 | std::set<VkImageUsageFlagBits> swapchain_usage = {VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT}; |
| 313 | if (ColorResolve::SeparatePass == color_resolve_method && !run_postprocessing) |
| 314 | { |
| 315 | // The multisampled color image will be resolved |
| 316 | // to the swapchain with a transfer operation |
| 317 | swapchain_usage.insert(VK_IMAGE_USAGE_TRANSFER_DST_BIT); |
| 318 | } |
| 319 | |
| 320 | get_device().wait_idle(); |
| 321 | |
| 322 | get_render_context().update_swapchain(swapchain_usage); |
| 323 | } |
| 324 | |
| 325 | void MSAASample::update_for_scene_only(bool msaa_enabled) |
| 326 | { |
nothing calls this directly
no test coverage detected