Mark command pools as transient
This commit is contained in:
@@ -320,7 +320,7 @@ xrt_result_t compositor::layer_commit(xrt_graphics_sync_handle_t sync_handle)
|
||||
|
||||
session.dump_time("begin", frame.rendering.id, os_monotonic_get_ns());
|
||||
|
||||
cmd.reset();
|
||||
cmd_pool.reset();
|
||||
cmd.begin({.flags = vk::CommandBufferUsageFlagBits::eOneTimeSubmit});
|
||||
|
||||
cmd.resetQueryPool(*query_pool, 0, 3);
|
||||
@@ -629,7 +629,7 @@ compositor::compositor(wivrn_session & session) :
|
||||
log_level(debug_get_log_option_log()),
|
||||
session(session),
|
||||
cmd_pool(vk.device, vk::CommandPoolCreateInfo{
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
|
||||
.flags = vk::CommandPoolCreateFlagBits::eTransient,
|
||||
.queueFamilyIndex = vk.queue_family_index,
|
||||
}),
|
||||
query_pool(vk.device, vk::QueryPoolCreateInfo{
|
||||
|
||||
@@ -157,7 +157,7 @@ vk::raii::CommandPool make_cmd_pool(wivrn::vk_bundle & vk, uint8_t stream_idx)
|
||||
{
|
||||
auto res = vk.device.createCommandPool(vk::CommandPoolCreateInfo{
|
||||
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer | vk::CommandPoolCreateFlagBits::eTransient,
|
||||
.queueFamilyIndex = vk.queue_family_index,
|
||||
});
|
||||
vk.name(res, std::format("vaapi encoder {} command pool", stream_idx));
|
||||
|
||||
@@ -152,7 +152,7 @@ static vk::raii::CommandPool make_cmd_pool(wivrn::vk_bundle & vk, uint8_t stream
|
||||
{
|
||||
auto res = vk.device.createCommandPool(vk::CommandPoolCreateInfo{
|
||||
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer | vk::CommandPoolCreateFlagBits::eTransient,
|
||||
.queueFamilyIndex = vk.queue_family_index,
|
||||
});
|
||||
vk.name(res, std::format("nvenc encoder {} command pool", stream_idx));
|
||||
|
||||
@@ -38,7 +38,7 @@ vk::raii::CommandPool make_cmd_pool(wivrn::vk_bundle & vk, uint8_t stream_idx)
|
||||
{
|
||||
auto res = vk.device.createCommandPool(vk::CommandPoolCreateInfo{
|
||||
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer | vk::CommandPoolCreateFlagBits::eTransient,
|
||||
.queueFamilyIndex = *vk.transfer_queue ? vk.transfer_queue_family_index : vk.queue_family_index,
|
||||
});
|
||||
vk.name(res, std::format("raw encoder {} command pool", stream_idx));
|
||||
|
||||
@@ -499,7 +499,7 @@ void wivrn::video_encoder_vulkan::init(const vk::VideoCapabilitiesKHR & video_ca
|
||||
{
|
||||
video_command_pool = vk.device.createCommandPool(
|
||||
vk::CommandPoolCreateInfo{
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer | vk::CommandPoolCreateFlagBits::eTransient,
|
||||
.queueFamilyIndex = vk.encode_queue_family_index,
|
||||
});
|
||||
vk.name(video_command_pool, std::format("vulkan encoder {} video command pool", stream_idx));
|
||||
@@ -520,7 +520,7 @@ void wivrn::video_encoder_vulkan::init(const vk::VideoCapabilitiesKHR & video_ca
|
||||
{
|
||||
transfer_command_pool = vk.device.createCommandPool(
|
||||
vk::CommandPoolCreateInfo{
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer | vk::CommandPoolCreateFlagBits::eTransient,
|
||||
.queueFamilyIndex = vk.transfer_queue_family_index,
|
||||
});
|
||||
vk.name(transfer_command_pool, std::format("vulkan encoder {} transfer command pool", stream_idx));
|
||||
|
||||
@@ -92,7 +92,7 @@ vk::raii::CommandPool make_cmd_pool(wivrn::vk_bundle & vk, uint8_t stream_idx)
|
||||
{
|
||||
auto res = vk.device.createCommandPool(vk::CommandPoolCreateInfo{
|
||||
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
|
||||
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer | vk::CommandPoolCreateFlagBits::eTransient,
|
||||
.queueFamilyIndex = *vk.transfer_queue ? vk.transfer_queue_family_index : vk.queue_family_index,
|
||||
});
|
||||
vk.name(res, std::format("x264 encoder {} command pool", stream_idx));
|
||||
|
||||
Reference in New Issue
Block a user