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

Method reset_pool

framework/core/command_pool_base.cpp:138–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void CommandPoolBase::reset_pool()
139{
140 switch (reset_mode)
141 {
142 case vkb::CommandBufferResetMode::ResetIndividually:
143 for (auto &cmd_buf : primary_command_buffers)
144 {
145 cmd_buf->reset(reset_mode);
146 }
147 active_primary_command_buffer_count = 0;
148
149 for (auto &cmd_buf : secondary_command_buffers)
150 {
151 cmd_buf->reset(reset_mode);
152 }
153 active_secondary_command_buffer_count = 0;
154 break;
155
156 case vkb::CommandBufferResetMode::ResetPool:
157 device.get_handle().resetCommandPool(handle);
158 active_primary_command_buffer_count = 0;
159 active_secondary_command_buffer_count = 0;
160 break;
161
162 case vkb::CommandBufferResetMode::AlwaysAllocate:
163 primary_command_buffers.clear();
164 active_primary_command_buffer_count = 0;
165 secondary_command_buffers.clear();
166 active_secondary_command_buffer_count = 0;
167 break;
168
169 default:
170 throw std::runtime_error("Unknown reset mode for command pools");
171 }
172}
173
174} // namespace core
175} // namespace vkb

Callers

nothing calls this directly

Calls 3

resetMethod · 0.45
get_handleMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected