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

Method recreate_swapchain

samples/performance/afbc/afbc.cpp:101–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void AFBCSample::recreate_swapchain()
102{
103 std::set<VkImageUsageFlagBits> image_usage_flags = {VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT};
104
105 if (!afbc_enabled)
106 {
107 // To force-disable AFBC, set an invalid image usage flag
108 image_usage_flags.insert(VK_IMAGE_USAGE_STORAGE_BIT);
109 }
110
111 get_device().wait_idle();
112
113 get_render_context().update_swapchain(image_usage_flags);
114}
115
116void AFBCSample::draw_gui()
117{

Callers

nothing calls this directly

Calls 3

update_swapchainMethod · 0.80
insertMethod · 0.45
wait_idleMethod · 0.45

Tested by

no test coverage detected