Files
eden/src/video_core/framebuffer_config.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.6 KiB
C++
Raw Normal View History

2026-07-30 20:34:50 +02:00
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
2026-07-30 20:34:50 +02:00
#include <span>
#include <vector>
2021-10-01 00:57:02 -04:00
#include "common/common_types.h"
#include "common/math_util.h"
2023-02-19 15:05:34 -05:00
#include "core/hle/service/nvnflinger/buffer_transform_flags.h"
2026-07-30 20:34:50 +02:00
#include "core/hle/service/nvnflinger/hwc_layer.h"
2023-02-19 15:05:34 -05:00
#include "core/hle/service/nvnflinger/pixel_format.h"
#include "core/hle/service/nvnflinger/ui/fence.h"
2021-10-01 00:57:02 -04:00
namespace Tegra {
2024-01-22 12:40:50 -05:00
enum class BlendMode {
Opaque,
Premultiplied,
Coverage,
};
/**
* Struct describing framebuffer configuration
*/
struct FramebufferConfig {
2023-12-25 07:32:16 +01:00
DAddr address{};
u32 offset{};
u32 width{};
u32 height{};
u32 stride{};
Service::android::PixelFormat pixel_format{};
Service::android::BufferTransformFlags transform_flags{};
Common::Rectangle<int> crop_rect{};
2024-01-22 12:40:50 -05:00
BlendMode blending{};
2026-07-30 20:34:50 +02:00
u32 layer_stack_mask{Service::Nvnflinger::DefaultLayerStackMask};
};
Common::Rectangle<f32> NormalizeCrop(const FramebufferConfig& framebuffer, u32 texture_width,
u32 texture_height);
2026-07-30 20:34:50 +02:00
/**
* Returns the subset of layers belonging to a stack.
*/
std::span<const FramebufferConfig> FilterLayerStack(std::span<const FramebufferConfig> layers,
Service::Nvnflinger::LayerStackId stack,
std::vector<FramebufferConfig>& scratch);
} // namespace Tegra