Files
LibretroAdmin 0cb6ba6596 Video: build the EFB conversion, reinterpret and restore shaders by calls
The rest of the framebuffer stages move to the builder: the EFB format
conversion pixel stages (every conversion, with and without multisampling
and sample shading), the texture reinterpret stages between the formats
there is one for, and the EFB restore stage. Each compiles to the same
SPIR-V and DXBC words as its GLSL did; a pair of formats with no
reinterpret stage builds none, as before. FramebufferShaderGen writes no
GLSL now.
2026-11-10 05:21:51 +01:00

39 lines
1.5 KiB
C++

// Copyright 2019 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "Common/CommonTypes.h"
enum class EFBReinterpretType;
enum class TextureFormat;
struct shader_build;
namespace FramebufferShaderGen
{
/* Stages built by calls: for AbstractGfx::CreateShaderFromBuild. */
bool BuildScreenQuadVertexShader(struct shader_build* sb, const void* arg);
/* arg: u32[2], the texture and color varyings */
bool BuildPassthroughGeometryShader(struct shader_build* sb, const void* arg);
bool BuildTextureCopyVertexShader(struct shader_build* sb, const void* arg);
bool BuildTextureCopyPixelShader(struct shader_build* sb, const void* arg);
/* arg: u32, the samples */
bool BuildResolveColorPixelShader(struct shader_build* sb, const void* arg);
bool BuildResolveDepthPixelShader(struct shader_build* sb, const void* arg);
bool BuildClearVertexShader(struct shader_build* sb, const void* arg);
bool BuildEFBPokeVertexShader(struct shader_build* sb, const void* arg);
bool BuildColorPixelShader(struct shader_build* sb, const void* arg);
struct FormatConversionArgs
{
EFBReinterpretType convtype;
u32 samples;
};
bool BuildFormatConversionShader(struct shader_build* sb, const void* arg);
/* arg: TextureFormat[2], from and to; false for a pair there is no shader for */
bool BuildTextureReinterpretShader(struct shader_build* sb, const void* arg);
bool BuildEFBRestorePixelShader(struct shader_build* sb, const void* arg);
} // namespace FramebufferShaderGen