Remove CPU sync for vulkan video encode
This commit is contained in:
@@ -223,7 +223,7 @@ void VideoEncoder::SyncNeeded()
|
||||
sync_needed = true;
|
||||
}
|
||||
|
||||
void VideoEncoder::PresentImage(vk::Image y_cbcr, vk::raii::CommandBuffer & cmd_buf)
|
||||
void VideoEncoder::present_image(vk::Image y_cbcr, vk::raii::CommandBuffer & cmd_buf)
|
||||
{
|
||||
// Wait for encoder to be done
|
||||
busy[next_present].wait(true);
|
||||
@@ -233,6 +233,11 @@ void VideoEncoder::PresentImage(vk::Image y_cbcr, vk::raii::CommandBuffer & cmd_
|
||||
next_present = (next_present + 1) % num_slots;
|
||||
}
|
||||
|
||||
void VideoEncoder::present_image(vk::Image y_cbcr, vk::raii::CommandBuffer & video_cmd_buf, vk::Fence fence)
|
||||
{
|
||||
present_image(sync_needed.load(), y_cbcr, video_cmd_buf, fence, next_present);
|
||||
}
|
||||
|
||||
void VideoEncoder::Encode(wivrn_session & cnx,
|
||||
const to_headset::video_stream_data_shard::view_info_t & view_info,
|
||||
uint64_t frame_index)
|
||||
|
||||
Reference in New Issue
Block a user