File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ bool CommandEncoderVk::finish() {
208208
209209 // In case we need to clear a framebuffer even when nothing is drawn.
210210 // This is to keep consistency with OpenGL.
211- if (pass_has_draw_call && render_pass_vk->get_attachment_load_op () == AttachmentLoadOp::Clear) {
211+ if (! pass_has_draw_call && render_pass_vk->get_attachment_load_op () == AttachmentLoadOp::Clear) {
212212 std::array<VkClearAttachment, 1 > clear_attachments{};
213213
214214 clear_attachments[0 ] = {VK_IMAGE_ASPECT_COLOR_BIT, 0 , clearValues[0 ]};
@@ -219,6 +219,7 @@ bool CommandEncoderVk::finish() {
219219 0 ,
220220 1 };
221221
222+ // Note: this operation is really performance-heavy.
222223 vkCmdClearAttachments (vk_command_buffer_,
223224 clear_attachments.size (),
224225 clear_attachments.data (),
Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ VkPresentModeKHR choose_swap_present_mode(const std::vector<VkPresentModeKHR> &a
337337 }
338338
339339 // Traditional V-Sync
340- return VK_PRESENT_MODE_FIFO_KHR ;
340+ return VK_PRESENT_MODE_IMMEDIATE_KHR ;
341341}
342342
343343QueueFamilyIndices find_queue_families (VkPhysicalDevice physical_device, VkSurfaceKHR surface) {
You can’t perform that action at this time.
0 commit comments