diff options
| author | 2024-02-11 20:58:28 -0600 | |
|---|---|---|
| committer | 2024-02-11 20:58:28 -0600 | |
| commit | 2ff45cd0da941dce2564f5c18c580d0283da27bf (patch) | |
| tree | 81fea8c23f9afa39c167288e03ff57eb25413ee4 /src/video_core/capture.h | |
| parent | Merge pull request #12991 from german77/news2 (diff) | |
| parent | am: use applet program loading for tested versions (diff) | |
| download | yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.tar.gz yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.tar.xz yuzu-2ff45cd0da941dce2564f5c18c580d0283da27bf.zip | |
Merge pull request #12756 from liamwhite/applet-multiprocess-hwc
general: applet multiprocess
Diffstat (limited to 'src/video_core/capture.h')
| -rw-r--r-- | src/video_core/capture.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/video_core/capture.h b/src/video_core/capture.h new file mode 100644 index 000000000..8db14a8ec --- /dev/null +++ b/src/video_core/capture.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "common/alignment.h" | ||
| 7 | #include "common/bit_util.h" | ||
| 8 | #include "common/common_types.h" | ||
| 9 | #include "core/frontend/framebuffer_layout.h" | ||
| 10 | #include "video_core/surface.h" | ||
| 11 | |||
| 12 | namespace VideoCore::Capture { | ||
| 13 | |||
| 14 | constexpr u32 BlockHeight = 4; | ||
| 15 | constexpr u32 BlockDepth = 0; | ||
| 16 | constexpr u32 BppLog2 = 2; | ||
| 17 | |||
| 18 | constexpr auto PixelFormat = Surface::PixelFormat::B8G8R8A8_UNORM; | ||
| 19 | |||
| 20 | constexpr auto LinearWidth = Layout::ScreenUndocked::Width; | ||
| 21 | constexpr auto LinearHeight = Layout::ScreenUndocked::Height; | ||
| 22 | constexpr auto LinearDepth = 1U; | ||
| 23 | constexpr auto BytesPerPixel = 4U; | ||
| 24 | |||
| 25 | constexpr auto TiledWidth = LinearWidth; | ||
| 26 | constexpr auto TiledHeight = Common::AlignUpLog2(LinearHeight, BlockHeight + BlockDepth + BppLog2); | ||
| 27 | constexpr auto TiledSize = TiledWidth * TiledHeight * (1 << BppLog2); | ||
| 28 | |||
| 29 | constexpr Layout::FramebufferLayout Layout{ | ||
| 30 | .width = LinearWidth, | ||
| 31 | .height = LinearHeight, | ||
| 32 | .screen = {0, 0, LinearWidth, LinearHeight}, | ||
| 33 | .is_srgb = false, | ||
| 34 | }; | ||
| 35 | |||
| 36 | } // namespace VideoCore::Capture | ||