2022-12-04 11:03:45 +00:00
|
|
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
|
2019-09-12 02:53:04 +00:00
|
|
|
#pragma once
|
2023-08-13 03:42:02 +00:00
|
|
|
|
2019-09-12 02:53:04 +00:00
|
|
|
#include "gpu.h"
|
2023-08-13 03:42:02 +00:00
|
|
|
#include "texture_replacements.h"
|
|
|
|
|
|
|
|
#include "util/gpu_device.h"
|
|
|
|
|
|
|
|
#include "common/dimensional_array.h"
|
|
|
|
#include "common/heap_array.h"
|
|
|
|
|
2019-09-13 16:07:31 +00:00
|
|
|
#include <sstream>
|
2019-09-14 06:27:24 +00:00
|
|
|
#include <string>
|
2019-10-03 06:46:13 +00:00
|
|
|
#include <tuple>
|
2020-01-15 07:35:36 +00:00
|
|
|
#include <utility>
|
2019-09-12 02:53:04 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2021-05-19 03:43:49 +00:00
|
|
|
class GPU_SW_Backend;
|
|
|
|
struct GPUBackendCommand;
|
|
|
|
struct GPUBackendDrawCommand;
|
|
|
|
|
2023-08-13 03:42:02 +00:00
|
|
|
class GPU_HW final : public GPU
|
2019-09-12 02:53:04 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-11-03 03:36:54 +00:00
|
|
|
enum class BatchRenderMode : u8
|
2019-11-01 11:47:45 +00:00
|
|
|
{
|
|
|
|
TransparencyDisabled,
|
|
|
|
TransparentAndOpaque,
|
|
|
|
OnlyOpaque,
|
2024-03-08 11:14:35 +00:00
|
|
|
OnlyTransparent,
|
|
|
|
ShaderBlend
|
2019-11-01 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2024-06-16 09:06:46 +00:00
|
|
|
enum class BatchTextureMode : u8
|
|
|
|
{
|
|
|
|
Palette4Bit,
|
|
|
|
Palette8Bit,
|
|
|
|
Direct16Bit,
|
|
|
|
Disabled,
|
|
|
|
|
2024-06-17 05:49:55 +00:00
|
|
|
SpritePalette4Bit,
|
|
|
|
SpritePalette8Bit,
|
|
|
|
SpriteDirect16Bit,
|
|
|
|
|
2024-06-16 09:06:46 +00:00
|
|
|
MaxCount,
|
2024-06-17 05:49:55 +00:00
|
|
|
|
|
|
|
SpriteStart = SpritePalette4Bit,
|
2024-06-16 09:06:46 +00:00
|
|
|
};
|
|
|
|
static_assert(static_cast<u8>(BatchTextureMode::Palette4Bit) == static_cast<u8>(GPUTextureMode::Palette4Bit) &&
|
|
|
|
static_cast<u8>(BatchTextureMode::Palette8Bit) == static_cast<u8>(GPUTextureMode::Palette8Bit) &&
|
|
|
|
static_cast<u8>(BatchTextureMode::Direct16Bit) == static_cast<u8>(GPUTextureMode::Direct16Bit));
|
|
|
|
|
2019-11-03 03:36:54 +00:00
|
|
|
GPU_HW();
|
2023-08-13 03:42:02 +00:00
|
|
|
~GPU_HW() override;
|
2019-11-03 03:36:54 +00:00
|
|
|
|
2022-08-10 04:33:20 +00:00
|
|
|
const Threading::Thread* GetSWThread() const override;
|
2023-08-13 03:42:02 +00:00
|
|
|
bool IsHardwareRenderer() const override;
|
|
|
|
|
|
|
|
bool Initialize() override;
|
|
|
|
void Reset(bool clear_vram) override;
|
|
|
|
bool DoState(StateWrapper& sw, GPUTexture** host_texture, bool update_display) override;
|
2022-08-05 07:17:29 +00:00
|
|
|
|
2023-09-03 03:13:17 +00:00
|
|
|
void RestoreDeviceContext() override;
|
2020-10-30 14:38:06 +00:00
|
|
|
|
2023-08-31 13:37:17 +00:00
|
|
|
void UpdateSettings(const Settings& old_settings) override;
|
2020-08-15 14:17:10 +00:00
|
|
|
void UpdateResolutionScale() override final;
|
2024-05-01 03:51:01 +00:00
|
|
|
std::tuple<u32, u32> GetEffectiveDisplayResolution(bool scaled = true) override;
|
|
|
|
std::tuple<u32, u32> GetFullDisplayResolution(bool scaled = true) override;
|
2019-11-03 03:36:54 +00:00
|
|
|
|
2023-09-20 08:53:29 +00:00
|
|
|
void UpdateDisplay() override;
|
|
|
|
|
2023-08-13 03:42:02 +00:00
|
|
|
private:
|
2019-11-05 09:44:17 +00:00
|
|
|
enum : u32
|
|
|
|
{
|
2020-05-03 07:11:28 +00:00
|
|
|
MAX_BATCH_VERTEX_COUNTER_IDS = 65536 - 2,
|
|
|
|
MAX_VERTICES_FOR_RECTANGLE = 6 * (((MAX_PRIMITIVE_WIDTH + (TEXTURE_PAGE_WIDTH - 1)) / TEXTURE_PAGE_WIDTH) + 1u) *
|
2024-06-16 06:58:50 +00:00
|
|
|
(((MAX_PRIMITIVE_HEIGHT + (TEXTURE_PAGE_HEIGHT - 1)) / TEXTURE_PAGE_HEIGHT) + 1u),
|
2024-06-16 09:06:46 +00:00
|
|
|
NUM_TEXTURE_MODES = static_cast<u32>(BatchTextureMode::MaxCount),
|
2019-11-05 09:44:17 +00:00
|
|
|
};
|
2023-12-14 09:01:24 +00:00
|
|
|
enum : u8
|
|
|
|
{
|
|
|
|
TEXPAGE_DIRTY_DRAWN_RECT = (1 << 0),
|
|
|
|
TEXPAGE_DIRTY_WRITTEN_RECT = (1 << 1),
|
|
|
|
};
|
|
|
|
|
2023-10-07 15:10:52 +00:00
|
|
|
static_assert(GPUDevice::MIN_TEXEL_BUFFER_ELEMENTS >= (VRAM_WIDTH * VRAM_HEIGHT));
|
2019-11-05 09:44:17 +00:00
|
|
|
|
2019-11-03 03:36:54 +00:00
|
|
|
struct BatchVertex
|
2019-09-12 02:53:04 +00:00
|
|
|
{
|
2020-08-01 14:25:07 +00:00
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float z;
|
|
|
|
float w;
|
2019-09-12 02:53:04 +00:00
|
|
|
u32 color;
|
2019-09-27 11:20:35 +00:00
|
|
|
u32 texpage;
|
2020-03-27 16:24:22 +00:00
|
|
|
u16 u; // 16-bit texcoords are needed for 256 extent rectangles
|
|
|
|
u16 v;
|
2020-08-10 12:37:07 +00:00
|
|
|
u32 uv_limits;
|
2019-10-29 13:42:08 +00:00
|
|
|
|
2023-09-20 08:53:29 +00:00
|
|
|
void Set(float x_, float y_, float z_, float w_, u32 color_, u32 texpage_, u16 packed_texcoord, u32 uv_limits_);
|
|
|
|
void Set(float x_, float y_, float z_, float w_, u32 color_, u32 texpage_, u16 u_, u16 v_, u32 uv_limits_);
|
|
|
|
static u32 PackUVLimits(u32 min_u, u32 max_u, u32 min_v, u32 max_v);
|
|
|
|
void SetUVLimits(u32 min_u, u32 max_u, u32 min_v, u32 max_v);
|
2019-09-12 02:53:04 +00:00
|
|
|
};
|
|
|
|
|
2019-11-03 03:36:54 +00:00
|
|
|
struct BatchConfig
|
2019-09-25 14:15:21 +00:00
|
|
|
{
|
2024-06-16 09:06:46 +00:00
|
|
|
BatchTextureMode texture_mode = BatchTextureMode::Disabled;
|
2021-07-12 04:55:02 +00:00
|
|
|
GPUTransparencyMode transparency_mode = GPUTransparencyMode::Disabled;
|
|
|
|
bool dithering = false;
|
|
|
|
bool interlacing = false;
|
|
|
|
bool set_mask_while_drawing = false;
|
|
|
|
bool check_mask_before_draw = false;
|
|
|
|
bool use_depth_buffer = false;
|
2024-06-17 05:49:55 +00:00
|
|
|
bool sprite_mode = false;
|
2019-09-25 14:15:21 +00:00
|
|
|
|
2019-11-01 11:47:45 +00:00
|
|
|
// Returns the render mode for this batch.
|
2023-09-20 08:53:29 +00:00
|
|
|
BatchRenderMode GetRenderMode() const;
|
2019-10-06 03:09:03 +00:00
|
|
|
};
|
|
|
|
|
2019-11-03 03:36:54 +00:00
|
|
|
struct BatchUBOData
|
2019-11-03 03:15:17 +00:00
|
|
|
{
|
2020-09-20 11:28:45 +00:00
|
|
|
u32 u_texture_window_and[2];
|
|
|
|
u32 u_texture_window_or[2];
|
2019-11-03 03:15:17 +00:00
|
|
|
float u_src_alpha_factor;
|
|
|
|
float u_dst_alpha_factor;
|
2020-04-03 14:11:33 +00:00
|
|
|
u32 u_interlaced_displayed_field;
|
2020-05-03 07:11:28 +00:00
|
|
|
u32 u_set_mask_while_drawing;
|
|
|
|
};
|
|
|
|
|
2019-11-05 09:44:17 +00:00
|
|
|
struct RendererStats
|
|
|
|
{
|
|
|
|
u32 num_batches;
|
|
|
|
u32 num_vram_read_texture_updates;
|
|
|
|
u32 num_uniform_buffer_updates;
|
|
|
|
};
|
2019-09-14 15:18:58 +00:00
|
|
|
|
2024-03-08 11:14:35 +00:00
|
|
|
/// Returns true if a depth buffer should be created.
|
|
|
|
bool NeedsDepthBuffer() const;
|
|
|
|
|
2023-08-13 03:42:02 +00:00
|
|
|
bool CreateBuffers();
|
|
|
|
void ClearFramebuffer();
|
|
|
|
void DestroyBuffers();
|
2019-09-14 06:43:39 +00:00
|
|
|
|
2023-08-13 03:42:02 +00:00
|
|
|
bool CompilePipelines();
|
|
|
|
void DestroyPipelines();
|
2020-08-10 12:37:30 +00:00
|
|
|
|
2023-09-20 08:53:29 +00:00
|
|
|
void LoadVertices();
|
|
|
|
|
|
|
|
void PrintSettingsToLog();
|
|
|
|
void CheckSettings();
|
|
|
|
|
2024-05-01 04:11:20 +00:00
|
|
|
void SetClampedDrawingArea();
|
2023-12-14 09:01:24 +00:00
|
|
|
void UpdateVRAMReadTexture(bool drawn, bool written);
|
2023-08-13 03:42:02 +00:00
|
|
|
void UpdateDepthBufferFromMaskBit();
|
|
|
|
void ClearDepthBuffer();
|
|
|
|
void SetScissor();
|
2024-03-08 11:14:35 +00:00
|
|
|
void SetVRAMRenderTarget();
|
2024-03-01 05:33:00 +00:00
|
|
|
void MapGPUBuffer(u32 required_vertices, u32 required_indices);
|
|
|
|
void UnmapGPUBuffer(u32 used_vertices, u32 used_indices);
|
|
|
|
void DrawBatchVertices(BatchRenderMode render_mode, u32 num_indices, u32 base_index, u32 base_vertex);
|
2019-11-05 12:34:27 +00:00
|
|
|
|
2020-08-02 17:06:03 +00:00
|
|
|
u32 CalculateResolutionScale() const;
|
2020-12-30 06:26:20 +00:00
|
|
|
GPUDownsampleMode GetDownsampleMode(u32 resolution_scale) const;
|
2020-08-02 17:06:03 +00:00
|
|
|
|
2023-08-13 03:42:02 +00:00
|
|
|
bool IsUsingMultisampling() const;
|
|
|
|
bool IsUsingDownsampling() const;
|
|
|
|
|
|
|
|
void SetFullVRAMDirtyRectangle();
|
|
|
|
void ClearVRAMDirtyRectangle();
|
2023-12-14 09:01:24 +00:00
|
|
|
void IncludeVRAMDirtyRectangle(Common::Rectangle<u32>& rect, const Common::Rectangle<u32>& new_rect);
|
2024-05-01 04:11:20 +00:00
|
|
|
void IncludeDrawnDirtyRectangle(s32 min_x, s32 min_y, s32 max_x, s32 max_y);
|
2023-11-26 05:15:58 +00:00
|
|
|
void CheckForTexPageOverlap(u32 texpage, u32 min_u, u32 min_v, u32 max_u, u32 max_v);
|
2023-08-13 03:42:02 +00:00
|
|
|
|
2023-09-20 08:53:29 +00:00
|
|
|
bool IsFlushed() const;
|
2024-03-01 05:33:00 +00:00
|
|
|
void EnsureVertexBufferSpace(u32 required_vertices, u32 required_indices);
|
2020-05-03 07:11:28 +00:00
|
|
|
void EnsureVertexBufferSpaceForCurrentCommand();
|
2020-06-20 10:21:32 +00:00
|
|
|
void ResetBatchVertexDepth();
|
2019-09-13 16:07:31 +00:00
|
|
|
|
2020-05-03 07:11:28 +00:00
|
|
|
/// Returns the value to be written to the depth buffer for the current operation for mask bit emulation.
|
2023-09-20 08:53:29 +00:00
|
|
|
float GetCurrentNormalizedVertexDepth() const;
|
2019-09-13 16:07:31 +00:00
|
|
|
|
2023-09-20 08:53:29 +00:00
|
|
|
/// Returns if the draw needs to be broken into opaque/transparent passes.
|
|
|
|
bool NeedsTwoPassRendering() const;
|
2021-02-06 10:05:57 +00:00
|
|
|
|
2023-09-20 10:47:42 +00:00
|
|
|
/// Returns true if the draw is going to use shader blending/framebuffer fetch.
|
2024-03-08 11:14:35 +00:00
|
|
|
bool NeedsShaderBlending(GPUTransparencyMode transparency, bool check_mask) const;
|
2023-09-20 10:47:42 +00:00
|
|
|
|
2021-05-19 03:43:49 +00:00
|
|
|
void FillBackendCommandParameters(GPUBackendCommand* cmd) const;
|
|
|
|
void FillDrawCommand(GPUBackendDrawCommand* cmd, GPURenderCommand rc) const;
|
|
|
|
void UpdateSoftwareRenderer(bool copy_vram_from_hw);
|
|
|
|
|
2019-11-05 12:12:37 +00:00
|
|
|
void FillVRAM(u32 x, u32 y, u32 width, u32 height, u32 color) override;
|
2023-08-13 03:42:02 +00:00
|
|
|
void ReadVRAM(u32 x, u32 y, u32 width, u32 height) override;
|
2020-12-14 16:19:28 +00:00
|
|
|
void UpdateVRAM(u32 x, u32 y, u32 width, u32 height, const void* data, bool set_mask, bool check_mask) override;
|
2019-11-05 12:12:37 +00:00
|
|
|
void CopyVRAM(u32 src_x, u32 src_y, u32 dst_x, u32 dst_y, u32 width, u32 height) override;
|
2020-04-18 15:16:58 +00:00
|
|
|
void DispatchRenderCommand() override;
|
2024-05-01 03:51:01 +00:00
|
|
|
void UpdateCLUT(GPUTexturePaletteReg reg, bool clut_is_8bit) override;
|
2020-04-18 05:30:46 +00:00
|
|
|
void FlushRender() override;
|
2024-01-21 09:37:29 +00:00
|
|
|
void DrawRendererStats() override;
|
2019-09-12 02:53:04 +00:00
|
|
|
|
2023-08-13 03:42:02 +00:00
|
|
|
bool BlitVRAMReplacementTexture(const TextureReplacementTexture* tex, u32 dst_x, u32 dst_y, u32 width, u32 height);
|
2020-06-18 14:18:17 +00:00
|
|
|
|
2020-08-02 07:17:05 +00:00
|
|
|
/// Expands a line into two triangles.
|
|
|
|
void DrawLine(float x0, float y0, u32 col0, float x1, float y1, u32 col1, float depth);
|
|
|
|
|
2020-03-27 16:24:22 +00:00
|
|
|
/// Handles quads with flipped texture coordinate directions.
|
2024-03-02 05:50:46 +00:00
|
|
|
void HandleFlippedQuadTextureCoordinates(BatchVertex* vertices);
|
2024-06-17 05:49:55 +00:00
|
|
|
bool IsPossibleSpritePolygon(const BatchVertex* vertices) const;
|
2024-03-02 05:50:46 +00:00
|
|
|
void ExpandLineTriangles(BatchVertex* vertices, u32 base_vertex);
|
2020-03-27 16:24:22 +00:00
|
|
|
|
2020-08-10 12:37:07 +00:00
|
|
|
/// Computes polygon U/V boundaries.
|
2023-11-26 05:15:58 +00:00
|
|
|
void ComputePolygonUVLimits(u32 texpage, BatchVertex* vertices, u32 num_vertices);
|
2020-12-22 15:10:49 +00:00
|
|
|
|
|
|
|
/// Sets the depth test flag for PGXP depth buffering.
|
|
|
|
void SetBatchDepthBuffer(bool enabled);
|
|
|
|
void CheckForDepthClear(const BatchVertex* vertices, u32 num_vertices);
|
2024-06-17 05:49:55 +00:00
|
|
|
void SetBatchSpriteMode(bool enabled);
|
2020-08-10 12:37:07 +00:00
|
|
|
|
2024-06-17 03:16:19 +00:00
|
|
|
void UpdateDownsamplingLevels();
|
2024-06-28 05:37:26 +00:00
|
|
|
|
|
|
|
void DownsampleFramebuffer();
|
2023-08-13 03:42:02 +00:00
|
|
|
void DownsampleFramebufferAdaptive(GPUTexture* source, u32 left, u32 top, u32 width, u32 height);
|
|
|
|
void DownsampleFramebufferBoxFilter(GPUTexture* source, u32 left, u32 top, u32 width, u32 height);
|
|
|
|
|
|
|
|
std::unique_ptr<GPUTexture> m_vram_texture;
|
|
|
|
std::unique_ptr<GPUTexture> m_vram_depth_texture;
|
|
|
|
std::unique_ptr<GPUTexture> m_vram_read_texture;
|
|
|
|
std::unique_ptr<GPUTexture> m_vram_readback_texture;
|
2024-02-28 06:13:50 +00:00
|
|
|
std::unique_ptr<GPUDownloadTexture> m_vram_readback_download_texture;
|
2023-08-13 03:42:02 +00:00
|
|
|
std::unique_ptr<GPUTexture> m_vram_replacement_texture;
|
|
|
|
|
|
|
|
std::unique_ptr<GPUTextureBuffer> m_vram_upload_buffer;
|
|
|
|
std::unique_ptr<GPUTexture> m_vram_write_texture;
|
2020-12-30 06:26:20 +00:00
|
|
|
|
2021-05-19 03:43:49 +00:00
|
|
|
std::unique_ptr<GPU_SW_Backend> m_sw_renderer;
|
2019-11-14 06:58:27 +00:00
|
|
|
|
2024-03-01 05:33:00 +00:00
|
|
|
BatchVertex* m_batch_vertex_ptr = nullptr;
|
|
|
|
u16* m_batch_index_ptr = nullptr;
|
2019-11-02 12:21:56 +00:00
|
|
|
u32 m_batch_base_vertex = 0;
|
2024-03-01 05:33:00 +00:00
|
|
|
u32 m_batch_base_index = 0;
|
|
|
|
u16 m_batch_vertex_count = 0;
|
|
|
|
u16 m_batch_index_count = 0;
|
|
|
|
u16 m_batch_vertex_space = 0;
|
|
|
|
u16 m_batch_index_space = 0;
|
2020-06-20 10:21:32 +00:00
|
|
|
s32 m_current_depth = 0;
|
2020-12-22 15:10:49 +00:00
|
|
|
float m_last_depth_z = 1.0f;
|
2019-11-02 12:21:56 +00:00
|
|
|
|
2024-03-01 03:51:16 +00:00
|
|
|
u8 m_resolution_scale = 1;
|
|
|
|
u8 m_multisamples = 1;
|
2020-12-30 06:26:20 +00:00
|
|
|
|
2020-09-11 12:20:19 +00:00
|
|
|
GPUTextureFilter m_texture_filtering = GPUTextureFilter::Nearest;
|
2024-06-17 05:49:55 +00:00
|
|
|
GPUTextureFilter m_sprite_texture_filtering = GPUTextureFilter::Nearest;
|
2024-03-02 05:50:46 +00:00
|
|
|
GPULineDetectMode m_line_detect_mode = GPULineDetectMode::Disabled;
|
2020-12-30 06:26:20 +00:00
|
|
|
GPUDownsampleMode m_downsample_mode = GPUDownsampleMode::Disabled;
|
2023-09-02 12:26:03 +00:00
|
|
|
GPUWireframeMode m_wireframe_mode = GPUWireframeMode::Disabled;
|
2024-06-17 03:16:19 +00:00
|
|
|
|
|
|
|
bool m_supports_dual_source_blend : 1 = false;
|
|
|
|
bool m_supports_framebuffer_fetch : 1 = false;
|
2024-03-01 03:51:16 +00:00
|
|
|
bool m_true_color : 1 = true;
|
2024-06-17 03:16:19 +00:00
|
|
|
bool m_pgxp_depth_buffer : 1 = false;
|
2024-03-01 03:51:16 +00:00
|
|
|
bool m_clamp_uvs : 1 = false;
|
|
|
|
bool m_compute_uv_range : 1 = false;
|
2024-06-17 05:49:55 +00:00
|
|
|
bool m_allow_sprite_mode : 1 = false;
|
2024-03-08 11:14:35 +00:00
|
|
|
bool m_allow_shader_blend : 1 = false;
|
2024-06-17 03:16:19 +00:00
|
|
|
|
2023-12-14 09:01:24 +00:00
|
|
|
u8 m_texpage_dirty = 0;
|
2019-09-13 16:07:31 +00:00
|
|
|
|
2021-07-12 04:55:02 +00:00
|
|
|
BatchConfig m_batch;
|
2023-11-26 05:15:58 +00:00
|
|
|
|
|
|
|
// Changed state
|
|
|
|
bool m_batch_ubo_dirty = true;
|
2019-11-03 03:36:54 +00:00
|
|
|
BatchUBOData m_batch_ubo_data = {};
|
2019-11-03 03:15:17 +00:00
|
|
|
|
2019-11-05 09:19:49 +00:00
|
|
|
// Bounding box of VRAM area that the GPU has drawn into.
|
2024-05-01 04:11:20 +00:00
|
|
|
GPUDrawingArea m_clamped_drawing_area = {};
|
2023-12-14 09:01:24 +00:00
|
|
|
Common::Rectangle<u32> m_vram_dirty_draw_rect;
|
|
|
|
Common::Rectangle<u32> m_vram_dirty_write_rect;
|
2023-11-26 05:15:58 +00:00
|
|
|
Common::Rectangle<u32> m_current_uv_range;
|
2023-08-13 03:42:02 +00:00
|
|
|
|
2023-09-02 12:26:03 +00:00
|
|
|
std::unique_ptr<GPUPipeline> m_wireframe_pipeline;
|
2023-08-13 03:42:02 +00:00
|
|
|
|
|
|
|
// [wrapped][interlaced]
|
|
|
|
DimensionalArray<std::unique_ptr<GPUPipeline>, 2, 2> m_vram_fill_pipelines{};
|
|
|
|
|
|
|
|
// [depth_test]
|
|
|
|
std::array<std::unique_ptr<GPUPipeline>, 2> m_vram_write_pipelines{};
|
|
|
|
std::array<std::unique_ptr<GPUPipeline>, 2> m_vram_copy_pipelines{};
|
|
|
|
|
|
|
|
std::unique_ptr<GPUPipeline> m_vram_readback_pipeline;
|
|
|
|
std::unique_ptr<GPUPipeline> m_vram_update_depth_pipeline;
|
2024-01-21 13:19:11 +00:00
|
|
|
std::unique_ptr<GPUPipeline> m_vram_write_replacement_pipeline;
|
2023-08-13 03:42:02 +00:00
|
|
|
|
2024-03-15 16:02:03 +00:00
|
|
|
std::array<std::unique_ptr<GPUPipeline>, 2> m_vram_extract_pipeline; // [24bit]
|
|
|
|
std::unique_ptr<GPUTexture> m_vram_extract_texture;
|
|
|
|
|
2023-08-13 03:42:02 +00:00
|
|
|
std::unique_ptr<GPUTexture> m_downsample_texture;
|
|
|
|
std::unique_ptr<GPUPipeline> m_downsample_first_pass_pipeline;
|
|
|
|
std::unique_ptr<GPUPipeline> m_downsample_mid_pass_pipeline;
|
|
|
|
std::unique_ptr<GPUPipeline> m_downsample_blur_pass_pipeline;
|
|
|
|
std::unique_ptr<GPUPipeline> m_downsample_composite_pass_pipeline;
|
|
|
|
std::unique_ptr<GPUSampler> m_downsample_lod_sampler;
|
|
|
|
std::unique_ptr<GPUSampler> m_downsample_composite_sampler;
|
2023-12-08 07:35:34 +00:00
|
|
|
u32 m_downsample_scale_or_levels = 0;
|
2024-04-05 15:40:36 +00:00
|
|
|
|
|
|
|
// [depth_test][transparency_mode][render_mode][texture_mode][dithering][interlacing][check_mask]
|
2024-06-16 07:51:00 +00:00
|
|
|
DimensionalArray<std::unique_ptr<GPUPipeline>, 2, 2, 2, NUM_TEXTURE_MODES, 5, 5, 2> m_batch_pipelines{};
|
2019-09-12 02:53:04 +00:00
|
|
|
};
|