diff options
author | Lioncash <mathew1800@gmail.com> | 2019-02-19 23:00:03 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-02-20 00:27:16 +0100 |
commit | 8d5d369b54f063606b7c21b2041c4d32154838d6 (patch) | |
tree | e33ff3d783d351e6d737e3554d3478630ce44af8 /src/core/hle/service/vi | |
parent | Merge pull request #2122 from ReinUsesLisp/vulkan-resource-manager (diff) | |
download | yuzu-8d5d369b54f063606b7c21b2041c4d32154838d6.tar yuzu-8d5d369b54f063606b7c21b2041c4d32154838d6.tar.gz yuzu-8d5d369b54f063606b7c21b2041c4d32154838d6.tar.bz2 yuzu-8d5d369b54f063606b7c21b2041c4d32154838d6.tar.lz yuzu-8d5d369b54f063606b7c21b2041c4d32154838d6.tar.xz yuzu-8d5d369b54f063606b7c21b2041c4d32154838d6.tar.zst yuzu-8d5d369b54f063606b7c21b2041c4d32154838d6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.cpp | 22 | ||||
-rw-r--r-- | src/core/hle/service/vi/display/vi_display.h | 28 | ||||
-rw-r--r-- | src/core/hle/service/vi/layer/vi_layer.cpp | 14 | ||||
-rw-r--r-- | src/core/hle/service/vi/layer/vi_layer.h | 25 |
4 files changed, 89 insertions, 0 deletions
diff --git a/src/core/hle/service/vi/display/vi_display.cpp b/src/core/hle/service/vi/display/vi_display.cpp new file mode 100644 index 000000000..a108e468f --- /dev/null +++ b/src/core/hle/service/vi/display/vi_display.cpp @@ -0,0 +1,22 @@ +// Copyright 2019 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include <fmt/format.h> + +#include "core/core.h" +#include "core/hle/kernel/readable_event.h" +#include "core/hle/service/vi/display/vi_display.h" +#include "core/hle/service/vi/layer/vi_layer.h" + +namespace Service::VI { + +Display::Display(u64 id, std::string name) : id{id}, name{std::move(name)} { + auto& kernel = Core::System::GetInstance().Kernel(); + vsync_event = Kernel::WritableEvent::CreateEventPair(kernel, Kernel::ResetType::Sticky, + fmt::format("Display VSync Event {}", id)); +} + +Display::~Display() = default; + +} // namespace Service::VI diff --git a/src/core/hle/service/vi/display/vi_display.h b/src/core/hle/service/vi/display/vi_display.h new file mode 100644 index 000000000..df44db306 --- /dev/null +++ b/src/core/hle/service/vi/display/vi_display.h @@ -0,0 +1,28 @@ +// Copyright 2019 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <string> +#include <vector> + +#include "common/common_types.h" +#include "core/hle/kernel/writable_event.h" + +namespace Service::VI { + +struct Layer; + +struct Display { + Display(u64 id, std::string name); + ~Display(); + + u64 id; + std::string name; + + std::vector<Layer> layers; + Kernel::EventPair vsync_event; +}; + +} // namespace Service::VI diff --git a/src/core/hle/service/vi/layer/vi_layer.cpp b/src/core/hle/service/vi/layer/vi_layer.cpp new file mode 100644 index 000000000..3a83e5b95 --- /dev/null +++ b/src/core/hle/service/vi/layer/vi_layer.cpp @@ -0,0 +1,14 @@ +// Copyright 2019 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/vi/layer/vi_layer.h" + +namespace Service::VI { + +Layer::Layer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> queue) + : id{id}, buffer_queue{std::move(queue)} {} + +Layer::~Layer() = default; + +} // namespace Service::VI diff --git a/src/core/hle/service/vi/layer/vi_layer.h b/src/core/hle/service/vi/layer/vi_layer.h new file mode 100644 index 000000000..df328e09f --- /dev/null +++ b/src/core/hle/service/vi/layer/vi_layer.h @@ -0,0 +1,25 @@ +// Copyright 2019 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <memory> + +#include "common/common_types.h" + +namespace Service::NVFlinger { +class BufferQueue; +} + +namespace Service::VI { + +struct Layer { + Layer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> queue); + ~Layer(); + + u64 id; + std::shared_ptr<NVFlinger::BufferQueue> buffer_queue; +}; + +} // namespace Service::VI |