Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan: State rebuilding optimization reduce the number of commands #2044

Merged
merged 3 commits into from
Jul 11, 2018

Conversation

Qining
Copy link
Contributor

@Qining Qining commented Jul 9, 2018

This CL does:

  1. Lazily reserve 128MB device memory for the use of scratch buffers.

  2. Batch buffer->image copy commands, defer the command submissions until
    the reserved scratch memory is full. This reduces the number of
    VkCommandBufferBegin/End, VkQueueSubmit, VkQueueWaitIdle calls.

  3. Batch the commands for 'priming by rendering' and 'priming by imageStore' in the similar way.

  4. Track image last bound queue at 'ImageLevel' level.

For now, on a typical Vulkan app, this reduce 30% of the initial
commands. For gapit report, saves ~10% of time.

@Qining Qining requested review from AWoloszyn and ben-clayton July 9, 2018 22:12
@Qining Qining force-pushed the command-opt-2-squash branch from b2009ef to fb446c0 Compare July 9, 2018 22:13
@Qining Qining changed the title WIP: Vulkan: State rebuilding optimization reduce the number of commands Vulkan: State rebuilding optimization reduce the number of commands Jul 10, 2018
@Qining
Copy link
Contributor Author

Qining commented Jul 10, 2018

Ready for review

@Qining Qining force-pushed the command-opt-2-squash branch from 0e8cc38 to a3fb87d Compare July 10, 2018 21:27
Qining added 3 commits July 11, 2018 11:27
This CL does:

1) Batch buffer->image copy commands, defer the command submission until
a scratch memory is full. This reduces the number of
VkCommandBufferBegin/End, VkQueueSubmit, VkQueueWaitIdle calls.

2) Batch the commands for 'priming by rendering' in the similar way.

3) Track image last bound queue at 'ImageLevel' level.

For now, on a typical Vulkan app, this reduce 30% of the initial
commands. For `gapit report`, saves ~10% of time.
@Qining Qining force-pushed the command-opt-2-squash branch from a3fb87d to 18e4079 Compare July 11, 2018 15:28
@Qining Qining merged commit 5a7c803 into google:master Jul 11, 2018
@Qining Qining deleted the command-opt-2-squash branch October 23, 2018 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants