From 4ca219323ca2bb0f092ffa76a580523d787feaba Mon Sep 17 00:00:00 2001 From: Tony Barbour Date: Wed, 14 Jun 2017 11:59:55 -0600 Subject: [PATCH] demos: Modify correct uniform buffer for next frame Change-Id: I78b8f5ef63fb2c14a3ce431f3e6f6a809e65972f --- demos/cube.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index a0c6dde6c5..ba6d53e59d 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -957,8 +957,6 @@ static void demo_draw(struct demo *demo) { vkWaitForFences(demo->device, 1, &demo->fences[demo->frame_index], VK_TRUE, UINT64_MAX); vkResetFences(demo->device, 1, &demo->fences[demo->frame_index]); - demo_update_data_buffer(demo); - err = !(VK_SUCCESS); while (err != VK_SUCCESS) { // Get the index of the next available swapchain image: @@ -979,6 +977,8 @@ static void demo_draw(struct demo *demo) { } } + demo_update_data_buffer(demo); + if (demo->VK_GOOGLE_display_timing_enabled) { // Look at what happened to previous presents, and make appropriate // adjustments in timing: