Skip to content

Commit

Permalink
demos: Modify correct uniform buffer for next frame
Browse files Browse the repository at this point in the history
Change-Id: I78b8f5ef63fb2c14a3ce431f3e6f6a809e65972f
  • Loading branch information
TonyBarbour committed Jun 15, 2017
1 parent 3c54a3b commit 4ca2193
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demos/cube.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 4ca2193

Please sign in to comment.