Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -1137,8 +1137,10 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
|
||||
{
|
||||
session.set_refresh_rate(description.fps);
|
||||
|
||||
spdlog::info("Creating decoders, size {}x{}", description.width, description.height);
|
||||
std::unique_lock lock(decoder_mutex);
|
||||
if (video_stream_description == description)
|
||||
return;
|
||||
spdlog::info("Creating decoders, size {}x{}", description.width, description.height);
|
||||
video_stream_description = description;
|
||||
|
||||
for (const auto & [stream_index, item]: utils::enumerate(decoders))
|
||||
@@ -1147,6 +1149,9 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
|
||||
.decoder = std::make_unique<shard_accumulator>(device, physical_device, instance, queue_family_index, description, shared_from_this(), stream_index),
|
||||
};
|
||||
}
|
||||
|
||||
if (defoveator)
|
||||
defoveator->reset_pipelines();
|
||||
}
|
||||
|
||||
void scenes::stream::setup_reprojection_swapchain(uint32_t swapchain_width, uint32_t swapchain_height)
|
||||
|
||||
@@ -283,6 +283,14 @@ stream_defoveator::stream_defoveator(
|
||||
}
|
||||
}
|
||||
|
||||
void stream_defoveator::reset_pipelines()
|
||||
{
|
||||
for (auto & p: pipeline_rgb)
|
||||
p = {};
|
||||
for (auto & p: pipeline_a)
|
||||
p = {};
|
||||
}
|
||||
|
||||
static size_t required_vertices(const wivrn::to_headset::foveation_parameter & p)
|
||||
{
|
||||
// strips are constructed like this:
|
||||
|
||||
@@ -81,6 +81,8 @@ public:
|
||||
|
||||
stream_defoveator(const stream_defoveator &) = delete;
|
||||
|
||||
void reset_pipelines();
|
||||
|
||||
void defoveate(
|
||||
vk::raii::CommandBuffer & command_buffer,
|
||||
const std::array<wivrn::to_headset::foveation_parameter, 2> & foveation,
|
||||
|
||||
@@ -659,6 +659,8 @@ struct video_stream_description
|
||||
uint16_t height;
|
||||
std::array<video_codec, 3> codec; // left, right, alpha
|
||||
float fps;
|
||||
|
||||
bool operator==(const video_stream_description &) const = default;
|
||||
};
|
||||
|
||||
class video_stream_data_shard
|
||||
|
||||
Reference in New Issue
Block a user