2022-04-23 10:59:50 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-12-30 06:25:23 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "video_core/engines/fermi_2d.h"
|
|
|
|
#include "video_core/engines/maxwell_3d.h"
|
2022-03-27 05:05:57 +02:00
|
|
|
#include "video_core/engines/maxwell_dma.h"
|
2020-12-30 06:25:23 +01:00
|
|
|
#include "video_core/surface.h"
|
|
|
|
#include "video_core/texture_cache/types.h"
|
|
|
|
|
|
|
|
namespace VideoCommon {
|
|
|
|
|
|
|
|
using Tegra::Texture::TICEntry;
|
|
|
|
using VideoCore::Surface::PixelFormat;
|
|
|
|
|
|
|
|
struct ImageInfo {
|
2021-07-18 18:40:14 +02:00
|
|
|
ImageInfo() = default;
|
2020-12-30 06:25:23 +01:00
|
|
|
explicit ImageInfo(const TICEntry& config) noexcept;
|
2023-03-14 15:36:34 +01:00
|
|
|
explicit ImageInfo(const Tegra::Engines::Maxwell3D::Regs::RenderTargetConfig& ct,
|
|
|
|
Tegra::Texture::MsaaMode msaa_mode) noexcept;
|
|
|
|
explicit ImageInfo(const Tegra::Engines::Maxwell3D::Regs::Zeta& zt,
|
|
|
|
const Tegra::Engines::Maxwell3D::Regs::ZetaSize& zt_size,
|
|
|
|
Tegra::Texture::MsaaMode msaa_mode) noexcept;
|
2020-12-30 06:25:23 +01:00
|
|
|
explicit ImageInfo(const Tegra::Engines::Fermi2D::Surface& config) noexcept;
|
2022-03-27 05:05:57 +02:00
|
|
|
explicit ImageInfo(const Tegra::DMA::ImageOperand& config) noexcept;
|
2020-12-30 06:25:23 +01:00
|
|
|
|
|
|
|
PixelFormat format = PixelFormat::Invalid;
|
|
|
|
ImageType type = ImageType::e1D;
|
|
|
|
SubresourceExtent resources;
|
|
|
|
Extent3D size{1, 1, 1};
|
|
|
|
union {
|
|
|
|
Extent3D block{0, 0, 0};
|
|
|
|
u32 pitch;
|
|
|
|
};
|
|
|
|
u32 layer_stride = 0;
|
|
|
|
u32 maybe_unaligned_layer_stride = 0;
|
|
|
|
u32 num_samples = 1;
|
|
|
|
u32 tile_width_spacing = 0;
|
2021-07-27 01:29:55 +02:00
|
|
|
bool rescaleable = false;
|
2021-10-15 22:59:16 +02:00
|
|
|
bool downscaleable = false;
|
2020-12-30 06:25:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace VideoCommon
|