2018-03-20 01:55:14 +01:00
|
|
|
// Copyright 2018 yuzu Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-04-15 09:32:12 +02:00
|
|
|
#include <vector>
|
2018-08-23 23:30:27 +02:00
|
|
|
|
2018-04-07 10:51:42 +02:00
|
|
|
#include "common/common_types.h"
|
2018-12-26 05:57:14 +01:00
|
|
|
#include "video_core/renderer_opengl/gl_shader_decompiler.h"
|
2018-12-21 02:29:15 +01:00
|
|
|
#include "video_core/shader/shader_ir.h"
|
2018-03-20 01:55:14 +01:00
|
|
|
|
2019-04-10 23:03:52 +02:00
|
|
|
namespace OpenGL {
|
|
|
|
class Device;
|
|
|
|
}
|
|
|
|
|
2018-08-21 10:18:27 +02:00
|
|
|
namespace OpenGL::GLShader {
|
2018-03-20 01:55:14 +01:00
|
|
|
|
2018-12-21 02:29:15 +01:00
|
|
|
using VideoCommon::Shader::ProgramCode;
|
2019-09-25 04:34:18 +02:00
|
|
|
using VideoCommon::Shader::ShaderIR;
|
2018-03-20 01:55:14 +01:00
|
|
|
|
2019-04-10 23:03:52 +02:00
|
|
|
/// Generates the GLSL vertex shader program source code for the given VS program
|
2019-09-25 04:34:18 +02:00
|
|
|
std::string GenerateVertexShader(const Device& device, const ShaderIR& ir, const ShaderIR* ir_b);
|
2019-04-10 23:03:52 +02:00
|
|
|
|
|
|
|
/// Generates the GLSL geometry shader program source code for the given GS program
|
2019-09-25 04:34:18 +02:00
|
|
|
std::string GenerateGeometryShader(const Device& device, const ShaderIR& ir);
|
2019-04-10 23:03:52 +02:00
|
|
|
|
|
|
|
/// Generates the GLSL fragment shader program source code for the given FS program
|
2019-09-25 04:34:18 +02:00
|
|
|
std::string GenerateFragmentShader(const Device& device, const ShaderIR& ir);
|
2018-03-20 01:55:14 +01:00
|
|
|
|
2019-07-15 03:25:13 +02:00
|
|
|
/// Generates the GLSL compute shader program source code for the given CS program
|
2019-09-25 04:34:18 +02:00
|
|
|
std::string GenerateComputeShader(const Device& device, const ShaderIR& ir);
|
2019-07-15 03:25:13 +02:00
|
|
|
|
2018-08-21 10:18:27 +02:00
|
|
|
} // namespace OpenGL::GLShader
|