2022-11-05 13:58:44 +01:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "shader_recompiler/environment.h"
|
|
|
|
#include "shader_recompiler/frontend/ir/program.h"
|
|
|
|
|
2022-11-05 19:21:57 +01:00
|
|
|
namespace Shader {
|
|
|
|
struct HostTranslateInfo;
|
|
|
|
}
|
|
|
|
|
2022-11-05 13:58:44 +01:00
|
|
|
namespace Shader::Optimization {
|
|
|
|
|
|
|
|
void CollectShaderInfoPass(Environment& env, IR::Program& program);
|
2022-12-25 07:12:57 +01:00
|
|
|
void ConstantPropagationPass(Environment& env, IR::Program& program);
|
2022-11-05 13:58:44 +01:00
|
|
|
void DeadCodeEliminationPass(IR::Program& program);
|
2023-01-08 21:39:56 +01:00
|
|
|
void GlobalMemoryToStorageBufferPass(IR::Program& program);
|
2022-11-05 13:58:44 +01:00
|
|
|
void IdentityRemovalPass(IR::Program& program);
|
|
|
|
void LowerFp16ToFp32(IR::Program& program);
|
|
|
|
void LowerInt64ToInt32(IR::Program& program);
|
|
|
|
void RescalingPass(IR::Program& program);
|
|
|
|
void SsaRewritePass(IR::Program& program);
|
2022-11-05 19:21:57 +01:00
|
|
|
void PositionPass(Environment& env, IR::Program& program);
|
|
|
|
void TexturePass(Environment& env, IR::Program& program, const HostTranslateInfo& host_info);
|
2022-12-01 02:28:19 +01:00
|
|
|
void LayerPass(IR::Program& program, const HostTranslateInfo& host_info);
|
2022-11-05 13:58:44 +01:00
|
|
|
void VerificationPass(const IR::Program& program);
|
|
|
|
|
|
|
|
// Dual Vertex
|
|
|
|
void VertexATransformPass(IR::Program& program);
|
|
|
|
void VertexBTransformPass(IR::Program& program);
|
|
|
|
void JoinTextureInfo(Info& base, Info& source);
|
|
|
|
void JoinStorageInfo(Info& base, Info& source);
|
|
|
|
|
|
|
|
} // namespace Shader::Optimization
|