diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-02-11 20:58:28 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-11 20:58:28 -0600 |
commit | 2ff45cd0da941dce2564f5c18c580d0283da27bf (patch) | |
tree | 81fea8c23f9afa39c167288e03ff57eb25413ee4 /src/video_core/capture.h | |
parent | b6b56f48b7eedd44cdbb03b3a3ef82b7bedc7081 (diff) | |
parent | 4677fd3f64dd51c7419e0268df9fe10f8f6ce0fd (diff) |
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 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/alignment.h" +#include "common/bit_util.h" +#include "common/common_types.h" +#include "core/frontend/framebuffer_layout.h" +#include "video_core/surface.h" + +namespace VideoCore::Capture { + +constexpr u32 BlockHeight = 4; +constexpr u32 BlockDepth = 0; +constexpr u32 BppLog2 = 2; + +constexpr auto PixelFormat = Surface::PixelFormat::B8G8R8A8_UNORM; + +constexpr auto LinearWidth = Layout::ScreenUndocked::Width; +constexpr auto LinearHeight = Layout::ScreenUndocked::Height; +constexpr auto LinearDepth = 1U; +constexpr auto BytesPerPixel = 4U; + +constexpr auto TiledWidth = LinearWidth; +constexpr auto TiledHeight = Common::AlignUpLog2(LinearHeight, BlockHeight + BlockDepth + BppLog2); +constexpr auto TiledSize = TiledWidth * TiledHeight * (1 << BppLog2); + +constexpr Layout::FramebufferLayout Layout{ + .width = LinearWidth, + .height = LinearHeight, + .screen = {0, 0, LinearWidth, LinearHeight}, + .is_srgb = false, +}; + +} // namespace VideoCore::Capture |