Transition images to general layout for vaapi

This commit is contained in:
Patrick Nicolas
2024-08-16 10:43:12 +02:00
parent 7e2d0cecc4
commit 8e157e5153
@@ -434,6 +434,20 @@ void video_encoder_va::PresentImage(yuv_converter & src_yuv, vk::raii::CommandBu
.height = rect.extent.height / 2,
.depth = 1,
}});
for (auto & b: im_barriers)
{
b.oldLayout = vk::ImageLayout::eTransferDstOptimal;
b.newLayout = vk::ImageLayout::eGeneral;
}
cmd_buf.pipelineBarrier(
vk::PipelineStageFlagBits::eTransfer,
vk::PipelineStageFlagBits::eAllCommands,
{},
nullptr,
nullptr,
im_barriers);
}
void video_encoder_va::PushFrame(bool idr, std::chrono::steady_clock::time_point pts)