| 136 | } |
| 137 | |
| 138 | void 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 |
nothing calls this directly
no test coverage detected