citra/src/video_core/renderer_opengl/gl_shader_decompiler.h
Lioncash 7a3d4d7642 video_core: Add missing header guards
Ensures errors related to multiple inclusions never happen.
2020-04-18 22:06:37 -04:00

30 lines
895 B
C++

// Copyright 2017 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <array>
#include <functional>
#include <optional>
#include <string>
#include "common/common_types.h"
#include "video_core/shader/shader.h"
namespace OpenGL::ShaderDecompiler {
using RegGetter = std::function<std::string(u32)>;
struct ProgramResult {
std::string code;
};
std::string GetCommonDeclarations();
std::optional<ProgramResult> DecompileProgram(const Pica::Shader::ProgramCode& program_code,
const Pica::Shader::SwizzleData& swizzle_data,
u32 main_offset, const RegGetter& inputreg_getter,
const RegGetter& outputreg_getter, bool sanitize_mul);
} // namespace OpenGL::ShaderDecompiler