OSDN Git Service

CommandPool reset and trim
authorAlexis Hetu <sugoi@google.com>
Fri, 1 Feb 2019 21:47:51 +0000 (16:47 -0500)
committerAlexis Hétu <sugoi@google.com>
Fri, 1 Feb 2019 22:48:07 +0000 (22:48 +0000)
commitcd610c9a9dbc9a827900725a0ae2645e37a8a4b2
tree4dd4bd93354acb57b206a46bf784ce27197371f0
parentdebaacab10b59cdd5a6e636be23e9ab560a7cec7
CommandPool reset and trim

Implemented vkResetCommandPool and vkTrimCommandPool.
The reset command out all command buffers in the command
pool back to the initial state. It also frees up the entire pool.

The trim command is a potential future memory usage optimization.
It is currently a noop.

Passes a few tests in dEQP-VK.api.command_buffers.

Bug b/119827933

Change-Id: Ic974f63a8dfca014462ac904218b9dcc3035fc8a
Reviewed-on: https://swiftshader-review.googlesource.com/c/24370
Tested-by: Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
src/Vulkan/VkCommandPool.cpp
src/Vulkan/VkCommandPool.hpp
src/Vulkan/libVulkan.cpp