Only blit useful part of the stream

With odd image size, encoders may add black borders. We need to properly
ignore it on the headset side
This commit is contained in:
Patrick Nicolas
2022-11-28 22:35:10 +01:00
committed by Guillaume Meunier
parent 21311baf8e
commit b1cb28200d
3 changed files with 26 additions and 6 deletions
+1 -1
View File
@@ -150,10 +150,10 @@ static void create_encoders(wivrn_comp_target * cn, std::vector<encoder_settings
for (auto & settings: _settings)
{
desc.items.push_back(settings);
uint8_t stream_index = cn->encoders.size();
auto & encoder = cn->encoders.emplace_back(
VideoEncoder::Create(vk, settings, stream_index, desc.width, desc.height, desc.fps));
desc.items.push_back(settings);
std::vector<VkImage> images(cn->image_count);
std::vector<VkDeviceMemory> memory(cn->image_count);