Skip to content

Commit

Permalink
Moved the precomputed_sky index and vertex buffer initialization to t…
Browse files Browse the repository at this point in the history
…he graphics queue as an easy fix for #105
  • Loading branch information
apanteleev committed Mar 22, 2021
1 parent 4deec72 commit 92c7faa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/refresh/vkpt/precomputed_sky.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ struct ShadowmapGeometry FillVertexAndIndexBuffers(const char* FileName, unsigne
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
ATTACH_LABEL_VARIABLE_NAME(result.Indexes.buffer, BUFFER, "Shadowmap Index Buffer");

VkCommandBuffer cmd_buf = vkpt_begin_command_buffer(&qvk.cmd_buffers_transfer);
VkCommandBuffer cmd_buf = vkpt_begin_command_buffer(&qvk.cmd_buffers_graphics);

BUFFER_BARRIER(cmd_buf,
.buffer = upload_buffer.buffer,
Expand Down Expand Up @@ -834,9 +834,9 @@ struct ShadowmapGeometry FillVertexAndIndexBuffers(const char* FileName, unsigne
.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED,
.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);

vkpt_submit_command_buffer_simple(cmd_buf, qvk.queue_transfer, qtrue);
vkpt_submit_command_buffer_simple(cmd_buf, qvk.queue_graphics, qtrue);

vkQueueWaitIdle(qvk.queue_transfer);
vkQueueWaitIdle(qvk.queue_graphics);
buffer_destroy(&upload_buffer);

done:
Expand Down

0 comments on commit 92c7faa

Please sign in to comment.