Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Issue 1776453003: Added initial implementation of Vulkan Render Passes. (Closed)

Created:
4 years, 9 months ago by David Yen
Modified:
4 years, 8 months ago
Reviewers:
jchen10, piman
CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@gn_vulkan
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added initial implementation of Vulkan Render Passes. An initial implementation for various Vulkan rendering objects has been done here. I tried to do the minimal amount of work which would still compile/run but that ended up being quite a bit of work. We have now have Vulkan implementations of command buffers, swap chains, render passes, and surfaces. A Vulkan test has also been added which tests that all these functionalities run and return expected return values. BUG=582558 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Committed: https://crrev.com/4ec04eccd55ebfabc916eae2f417e5fa483e1c3e Cr-Commit-Position: refs/heads/master@{#384125}

Patch Set 1 #

Patch Set 2 : Added command buffer files #

Patch Set 3 : format #

Patch Set 4 : Ensure vulkan handles all initialized to null, check destruction in destructor #

Total comments: 71

Patch Set 5 : Separated out command pool, implemented SwapBuffer() #

Patch Set 6 : rebase #

Total comments: 2

Patch Set 7 : Fix SwapBuffers() present layout, test in unittests instead of injections #

Total comments: 16

Patch Set 8 : Layout transitions done through render passes #

Total comments: 4

Patch Set 9 : Use vkResetCommandBuffer for command buffer resets #

Patch Set 10 : removed unnecessary dependency #

Total comments: 27

Patch Set 11 : applied fixes #

Patch Set 12 : Fixed depth stencil reference #

Patch Set 13 : Added submission fence #

Patch Set 14 : Put back in present semaphore #

Total comments: 7

Patch Set 15 : added fence to command buffer #

Total comments: 7

Patch Set 16 : Moved reset fences to submit. #

Patch Set 17 : Adding logging/macros headers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2009 lines, -41 lines) Patch
M content/gpu/gpu_main.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -9 lines 0 comments Download
M gpu/vulkan/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +58 lines, -24 lines 0 comments Download
A gpu/vulkan/tests/native_window.h View 1 2 3 4 5 6 1 chunk +16 lines, -0 lines 0 comments Download
A gpu/vulkan/tests/native_window_x11.cc View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A gpu/vulkan/tests/vulkan_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +120 lines, -0 lines 0 comments Download
A gpu/vulkan/tests/vulkan_tests_main.cc View 1 2 3 4 5 6 1 chunk +27 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_command_buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +133 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_command_buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +164 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_command_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +46 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_command_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +75 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_image_view.h View 1 2 3 4 5 6 7 1 chunk +63 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_image_view.cc View 1 2 3 4 5 6 7 1 chunk +89 lines, -0 lines 0 comments Download
M gpu/vulkan/vulkan_implementation.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M gpu/vulkan/vulkan_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +29 lines, -4 lines 0 comments Download
A gpu/vulkan/vulkan_platform.h View 1 2 3 4 5 6 7 1 chunk +68 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_render_pass.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +127 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_render_pass.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +399 lines, -0 lines 0 comments Download
M gpu/vulkan/vulkan_surface.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +34 lines, -3 lines 0 comments Download
M gpu/vulkan/vulkan_surface.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +128 lines, -1 line 0 comments Download
A gpu/vulkan/vulkan_swap_chain.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +87 lines, -0 lines 0 comments Download
A gpu/vulkan/vulkan_swap_chain.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +296 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (7 generated)
David Yen
Sorry for the biggish change, I kind of had to put all of it together ...
4 years, 9 months ago (2016-03-08 01:23:22 UTC) #3
piman
https://codereview.chromium.org/1776453003/diff/60001/content/common/gpu/gpu_command_buffer_stub.h File content/common/gpu/gpu_command_buffer_stub.h (right): https://codereview.chromium.org/1776453003/diff/60001/content/common/gpu/gpu_command_buffer_stub.h#newcode270 content/common/gpu/gpu_command_buffer_stub.h:270: #endif I don't think we should be touching GpuCommandBufferStub. ...
4 years, 9 months ago (2016-03-09 01:25:35 UTC) #4
David Yen
Thank you for the review. I've changed everything to DLOG(ERROR) from LOG(ERROR), but I wish ...
4 years, 9 months ago (2016-03-10 01:39:50 UTC) #5
David Yen
https://codereview.chromium.org/1776453003/diff/100001/gpu/vulkan/vulkan_swap_chain.cc File gpu/vulkan/vulkan_swap_chain.cc (right): https://codereview.chromium.org/1776453003/diff/100001/gpu/vulkan/vulkan_swap_chain.cc#newcode101 gpu/vulkan/vulkan_swap_chain.cc:101: current_image_data->present_semaphore, Hmm... looking at this code again I'm unclear ...
4 years, 9 months ago (2016-03-10 02:19:38 UTC) #6
David Yen
I've added "vulkan_tests" which is an end to end test similar to "gl_tests". Currently I ...
4 years, 9 months ago (2016-03-11 00:59:47 UTC) #7
David Yen
https://codereview.chromium.org/1776453003/diff/60001/content/common/gpu/gpu_command_buffer_stub.h File content/common/gpu/gpu_command_buffer_stub.h (right): https://codereview.chromium.org/1776453003/diff/60001/content/common/gpu/gpu_command_buffer_stub.h#newcode270 content/common/gpu/gpu_command_buffer_stub.h:270: #endif On 2016/03/10 01:39:48, David Yen wrote: > On ...
4 years, 9 months ago (2016-03-11 01:01:16 UTC) #8
piman
https://codereview.chromium.org/1776453003/diff/120001/gpu/vulkan/vulkan_command_buffer.cc File gpu/vulkan/vulkan_command_buffer.cc (right): https://codereview.chromium.org/1776453003/diff/120001/gpu/vulkan/vulkan_command_buffer.cc#newcode60 gpu/vulkan/vulkan_command_buffer.cc:60: if (num_wait_semaphores) { nit: the if here and below ...
4 years, 9 months ago (2016-03-11 03:07:53 UTC) #9
David Yen
Since a lot of the comments were around fixing the layout transition code, I went ...
4 years, 9 months ago (2016-03-21 18:26:32 UTC) #10
jchen10
https://codereview.chromium.org/1776453003/diff/140001/gpu/vulkan/vulkan_command_buffer.cc File gpu/vulkan/vulkan_command_buffer.cc (right): https://codereview.chromium.org/1776453003/diff/140001/gpu/vulkan/vulkan_command_buffer.cc#newcode93 gpu/vulkan/vulkan_command_buffer.cc:93: vkResetCommandPool(GetVulkanDevice(), command_pool_->handle(), Would it be impertinent to ask whether ...
4 years, 9 months ago (2016-03-23 07:12:57 UTC) #13
David Yen
https://codereview.chromium.org/1776453003/diff/140001/gpu/vulkan/vulkan_command_buffer.cc File gpu/vulkan/vulkan_command_buffer.cc (right): https://codereview.chromium.org/1776453003/diff/140001/gpu/vulkan/vulkan_command_buffer.cc#newcode93 gpu/vulkan/vulkan_command_buffer.cc:93: vkResetCommandPool(GetVulkanDevice(), command_pool_->handle(), On 2016/03/23 07:12:57, jchen10 wrote: > Would ...
4 years, 9 months ago (2016-03-23 18:19:29 UTC) #14
piman
https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/tests/vulkan_test.cc File gpu/vulkan/tests/vulkan_test.cc (right): https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/tests/vulkan_test.cc#newcode115 gpu/vulkan/tests/vulkan_test.cc:115: render_pass.Destroy(); You need to wait for the RenderPass to ...
4 years, 9 months ago (2016-03-25 02:01:27 UTC) #15
David Yen
https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/tests/vulkan_test.cc File gpu/vulkan/tests/vulkan_test.cc (right): https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/tests/vulkan_test.cc#newcode115 gpu/vulkan/tests/vulkan_test.cc:115: render_pass.Destroy(); On 2016/03/25 02:01:26, piman wrote: > You need ...
4 years, 9 months ago (2016-03-25 17:36:14 UTC) #16
piman
https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/vulkan_render_pass.cc File gpu/vulkan/vulkan_render_pass.cc (right): https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/vulkan_render_pass.cc#newcode266 gpu/vulkan/vulkan_render_pass.cc:266: subpass_desc.pDepthStencilAttachment = &depth_stencil_ref; On 2016/03/25 17:36:14, David Yen wrote: ...
4 years, 9 months ago (2016-03-25 21:13:22 UTC) #17
David Yen
https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/vulkan_render_pass.h File gpu/vulkan/vulkan_render_pass.h (right): https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/vulkan_render_pass.h#newcode52 gpu/vulkan/vulkan_render_pass.h:52: uint32_t num_image_views; // If more than 1, must match ...
4 years, 9 months ago (2016-03-26 00:33:30 UTC) #18
piman
https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/vulkan_swap_chain.cc File gpu/vulkan/vulkan_swap_chain.cc (right): https://codereview.chromium.org/1776453003/diff/180001/gpu/vulkan/vulkan_swap_chain.cc#newcode50 gpu/vulkan/vulkan_swap_chain.cc:50: &current_image_data->render_semaphore)) { On 2016/03/26 00:33:30, David Yen wrote: > ...
4 years, 9 months ago (2016-03-26 01:38:01 UTC) #19
jchen10
I have just started to learn Vulkan. I roughly went through the Spec and samples ...
4 years, 8 months ago (2016-03-28 07:47:23 UTC) #20
piman
https://codereview.chromium.org/1776453003/diff/250001/gpu/vulkan/vulkan_swap_chain.cc File gpu/vulkan/vulkan_swap_chain.cc (right): https://codereview.chromium.org/1776453003/diff/250001/gpu/vulkan/vulkan_swap_chain.cc#newcode191 gpu/vulkan/vulkan_swap_chain.cc:191: image_memory_barrier.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; On 2016/03/28 07:47:23, jchen10 wrote: > ...
4 years, 8 months ago (2016-03-28 16:48:48 UTC) #21
David Yen
https://codereview.chromium.org/1776453003/diff/250001/gpu/vulkan/vulkan_swap_chain.cc File gpu/vulkan/vulkan_swap_chain.cc (right): https://codereview.chromium.org/1776453003/diff/250001/gpu/vulkan/vulkan_swap_chain.cc#newcode51 gpu/vulkan/vulkan_swap_chain.cc:51: // Make sure the current command buffer is not ...
4 years, 8 months ago (2016-03-28 18:31:12 UTC) #22
David Yen
On 2016/03/28 07:47:23, jchen10 wrote: > I have just started to learn Vulkan. I roughly ...
4 years, 8 months ago (2016-03-28 18:37:28 UTC) #23
David Yen
Whoops, forgot to upload the patch. Patch #15 contains the changes.
4 years, 8 months ago (2016-03-29 16:54:17 UTC) #24
piman
One last thing and then I think it's good to go. https://codereview.chromium.org/1776453003/diff/270001/gpu/vulkan/vulkan_command_buffer.cc File gpu/vulkan/vulkan_command_buffer.cc (right): ...
4 years, 8 months ago (2016-03-29 19:09:21 UTC) #25
David Yen
https://codereview.chromium.org/1776453003/diff/270001/gpu/vulkan/vulkan_command_buffer.cc File gpu/vulkan/vulkan_command_buffer.cc (right): https://codereview.chromium.org/1776453003/diff/270001/gpu/vulkan/vulkan_command_buffer.cc#newcode45 gpu/vulkan/vulkan_command_buffer.cc:45: fence_create_info.flags = VK_FENCE_CREATE_SIGNALED_BIT; On 2016/03/29 19:09:21, piman wrote: > ...
4 years, 8 months ago (2016-03-29 19:27:31 UTC) #26
piman
https://codereview.chromium.org/1776453003/diff/270001/gpu/vulkan/vulkan_command_buffer.cc File gpu/vulkan/vulkan_command_buffer.cc (right): https://codereview.chromium.org/1776453003/diff/270001/gpu/vulkan/vulkan_command_buffer.cc#newcode45 gpu/vulkan/vulkan_command_buffer.cc:45: fence_create_info.flags = VK_FENCE_CREATE_SIGNALED_BIT; On 2016/03/29 19:27:31, David Yen wrote: ...
4 years, 8 months ago (2016-03-29 20:42:39 UTC) #27
David Yen
https://codereview.chromium.org/1776453003/diff/270001/gpu/vulkan/vulkan_command_buffer.cc File gpu/vulkan/vulkan_command_buffer.cc (right): https://codereview.chromium.org/1776453003/diff/270001/gpu/vulkan/vulkan_command_buffer.cc#newcode45 gpu/vulkan/vulkan_command_buffer.cc:45: fence_create_info.flags = VK_FENCE_CREATE_SIGNALED_BIT; On 2016/03/29 20:42:39, piman wrote: > ...
4 years, 8 months ago (2016-03-29 21:26:43 UTC) #28
piman
Ok, LGTM.
4 years, 8 months ago (2016-03-30 21:17:40 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1776453003/310001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1776453003/310001
4 years, 8 months ago (2016-03-30 21:25:48 UTC) #31
commit-bot: I haz the power
Committed patchset #17 (id:310001)
4 years, 8 months ago (2016-03-30 22:45:57 UTC) #33
commit-bot: I haz the power
4 years, 8 months ago (2016-03-30 22:47:16 UTC) #35
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/4ec04eccd55ebfabc916eae2f417e5fa483e1c3e
Cr-Commit-Position: refs/heads/master@{#384125}

Powered by Google App Engine
This is Rietveld 408576698