WIP: fixed encoder layout
This commit is contained in:
+5
-13
@@ -24,7 +24,6 @@
|
||||
#include "decoder/shard_accumulator.h"
|
||||
#include "render/imgui_impl.h"
|
||||
#include "scene.h"
|
||||
#include "scenes/blitter.h"
|
||||
#include "scenes/input_profile.h"
|
||||
#include "stream_defoveator.h"
|
||||
#include "utils/thread_safe.h"
|
||||
@@ -55,8 +54,6 @@ public:
|
||||
private:
|
||||
static const size_t view_count = 2;
|
||||
|
||||
using stream_description = wivrn::to_headset::video_stream_description::item;
|
||||
|
||||
struct accumulator_images
|
||||
{
|
||||
std::unique_ptr<wivrn::shard_accumulator> decoder;
|
||||
@@ -64,7 +61,6 @@ private:
|
||||
std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, image_buffer_size> latest_frames;
|
||||
|
||||
std::shared_ptr<wivrn::shard_accumulator::blit_handle> frame(uint64_t id) const;
|
||||
bool alpha() const;
|
||||
bool empty() const;
|
||||
};
|
||||
|
||||
@@ -72,7 +68,7 @@ private:
|
||||
|
||||
// for frames inside accumulator images
|
||||
std::mutex frames_mutex;
|
||||
std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> common_frame(XrTime display_time);
|
||||
std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, view_count + 1> common_frame(XrTime display_time);
|
||||
|
||||
std::unique_ptr<wivrn_session> network_session;
|
||||
std::atomic<bool> exiting = false;
|
||||
@@ -90,9 +86,7 @@ private:
|
||||
|
||||
std::shared_mutex decoder_mutex;
|
||||
std::optional<to_headset::video_stream_description> video_stream_description;
|
||||
std::vector<accumulator_images> decoders; // Locked by decoder_mutex
|
||||
|
||||
std::array<blitter, view_count> blitters;
|
||||
std::array<accumulator_images, view_count + 1> decoders; // Locked by decoder_mutex
|
||||
|
||||
std::optional<stream_defoveator> defoveator;
|
||||
|
||||
@@ -168,7 +162,7 @@ private:
|
||||
void update_gui_position(xr::spaces controller);
|
||||
|
||||
// Keep a reference to the resources needed to blit the images until vkWaitForFences
|
||||
std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> current_blit_handles;
|
||||
std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, view_count + 1> current_blit_handles;
|
||||
|
||||
XrTime running_application_req = 0;
|
||||
thread_safe<to_headset::running_applications> running_applications;
|
||||
@@ -257,13 +251,11 @@ private:
|
||||
|
||||
struct gpu_timestamps
|
||||
{
|
||||
float gpu_barrier = 0;
|
||||
float gpu_time = 0;
|
||||
};
|
||||
|
||||
struct global_metric //: gpu_timestamps
|
||||
struct global_metric
|
||||
{
|
||||
float gpu_barrier;
|
||||
float gpu_time;
|
||||
float cpu_time = 0;
|
||||
float bandwidth_rx = 0;
|
||||
@@ -312,7 +304,7 @@ private:
|
||||
float compact_cpu_time = 0;
|
||||
float compact_gpu_time = 0;
|
||||
|
||||
void accumulate_metrics(XrTime predicted_display_time, const std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> & blit_handles, const gpu_timestamps & timestamps);
|
||||
void accumulate_metrics(XrTime predicted_display_time, const std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, view_count + 1> & blit_handles, const gpu_timestamps & timestamps);
|
||||
void gui_performance_metrics();
|
||||
void gui_compact_view();
|
||||
void gui_settings(float predicted_display_period);
|
||||
|
||||
Reference in New Issue
Block a user