@@ -185,13 +185,9 @@ CommandEncoderVk::~CommandEncoderVk() {
185185 vk_command_buffer_ = VK_NULL_HANDLE;
186186}
187187
188- VkCommandBuffer CommandEncoderVk::get_vk_handle () const {
189- return vk_command_buffer_;
190- }
191-
192188bool CommandEncoderVk::finish () {
193189 if (finished_) {
194- Logger::error (" Attempted to finished an encoder that's been finished previously!" );
190+ Logger::error (" Attempted to finish an encoder that's been finished previously!" );
195191 return false ;
196192 }
197193
@@ -207,19 +203,19 @@ bool CommandEncoderVk::finish() {
207203
208204 VK_CHECK_RESULT (vkBeginCommandBuffer (vk_command_buffer_, &begin_info))
209205
210- // Start a new debug marker region
206+ // Start a new debug marker region.
211207 DebugMarker::get_singleton ()->begin_region (vk_command_buffer_, label_, ColorF (1 .0f , 0 .78f , 0 .05f , 1 .0f ));
212208
213- for (auto cmd_iter = commands_.begin (); cmd_iter < commands_.end (); cmd_iter++ ) {
214- auto &cmd = *cmd_iter;
209+ for (auto cmd_iter = commands_.begin (); cmd_iter < commands_.end (); ++cmd_iter ) {
210+ auto const &cmd = *cmd_iter;
215211
216212 switch (cmd.type ) {
217213 case CommandType::BeginRenderPass: {
218214 assert (compute_pipeline_ == nullptr );
219215
220216 bool pass_has_draw_call = false ;
221217
222- for (auto pass_cmd_iter = cmd_iter; pass_cmd_iter < commands_.end (); pass_cmd_iter++ ) {
218+ for (auto pass_cmd_iter = cmd_iter; pass_cmd_iter < commands_.end (); ++pass_cmd_iter ) {
223219 if (pass_cmd_iter->type == CommandType::BindDescriptorSet) {
224220 sync_descriptor_set (pass_cmd_iter->args .bind_descriptor_set .descriptor_set );
225221 }
@@ -267,7 +263,7 @@ bool CommandEncoderVk::finish() {
267263 vkCmdBeginRenderPass (vk_command_buffer_, &render_pass_info, VK_SUBPASS_CONTENTS_INLINE);
268264
269265 // In case we need to clear a framebuffer even when nothing is drawn.
270- // This is to keep consistency with OpgnGL .
266+ // This is to keep consistency with OpenGL .
271267 if (pass_has_draw_call && render_pass_vk->get_attachment_load_op () == AttachmentLoadOp::Clear) {
272268 std::array<VkClearAttachment, 1 > clear_attachments{};
273269
@@ -384,7 +380,7 @@ bool CommandEncoderVk::finish() {
384380 case CommandType::BeginComputePass: {
385381 assert (render_pipeline_ == nullptr );
386382
387- for (auto cmd_iter2 = cmd_iter; cmd_iter2 < commands_.end (); cmd_iter2++ ) {
383+ for (auto cmd_iter2 = cmd_iter; cmd_iter2 < commands_.end (); ++cmd_iter2 ) {
388384 if (cmd_iter2->type == CommandType::BindDescriptorSet) {
389385 sync_descriptor_set (cmd_iter2->args .bind_descriptor_set .descriptor_set );
390386 }
@@ -517,7 +513,7 @@ bool CommandEncoderVk::finish() {
517513
518514 // Specify which part of the image we want to copy the pixels.
519515 {
520- // A VkImageSubresourceLayers used to specify the specific image subresources of the image used
516+ // A VkImageSubresourceLayers used to specify the specific image sub-resources of the image used
521517 // for the source or destination image data.
522518 region.imageSubresource .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
523519 region.imageSubresource .mipLevel = 0 ;
@@ -574,7 +570,7 @@ bool CommandEncoderVk::finish() {
574570
575571 // Specify which part of the image we want to copy the pixels.
576572 {
577- // A VkImageSubresourceLayers used to specify the specific image subresources of the image used
573+ // A VkImageSubresourceLayers used to specify the specific image sub-resources of the image used
578574 // for the source or destination image data.
579575 region.imageSubresource .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
580576 region.imageSubresource .mipLevel = 0 ;
0 commit comments