MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / update_pipelines

Method update_pipelines

samples/performance/msaa/msaa.cpp:299–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299void 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
325void MSAASample::update_for_scene_only(bool msaa_enabled)
326{

Callers

nothing calls this directly

Calls 3

update_swapchainMethod · 0.80
insertMethod · 0.45
wait_idleMethod · 0.45

Tested by

no test coverage detected