Skip to content

Commit

Permalink
Merge ocornut/imgui#3957 Vulkan validation fix (nonCoherentAtomSize)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajweeks committed Sep 11, 2021
1 parent d6fe04d commit 6e46baa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions FlexEngine/dependencies/imgui/imgui_impl_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static void CreateOrResizeBuffer(VkBuffer& buffer, VkDeviceMemory& buffer_memory

err = vkBindBufferMemory(g_Device, buffer, buffer_memory, 0);
check_vk_result(err);
p_buffer_size = new_size;
p_buffer_size = req.size;
}

// Render function
Expand Down Expand Up @@ -225,9 +225,9 @@ void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer comm
{
ImDrawVert* vtx_dst = NULL;
ImDrawIdx* idx_dst = NULL;
err = vkMapMemory(g_Device, fd->VertexBufferMemory, 0, vertex_size, 0, (void**)(&vtx_dst));
err = vkMapMemory(g_Device, fd->VertexBufferMemory, 0, fd->VertexBufferSize, 0, (void**)(&vtx_dst));
check_vk_result(err);
err = vkMapMemory(g_Device, fd->IndexBufferMemory, 0, index_size, 0, (void**)(&idx_dst));
err = vkMapMemory(g_Device, fd->IndexBufferMemory, 0, fd->IndexBufferSize, 0, (void**)(&idx_dst));
check_vk_result(err);
for (int n = 0; n < draw_data->CmdListsCount; n++)
{
Expand Down

0 comments on commit 6e46baa

Please sign in to comment.