summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_cache.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-20 03:58:32 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:35 +0200
commiteaff1030de07f3739794207403ea833ee91c0034 (patch)
treec2e6650ba13f55854b5cba9a79d9afc01528eb96 /src/video_core/renderer_opengl/gl_shader_cache.cpp
parentspirv: Reduce log severity of mismatching denorm rules (diff)
downloadyuzu-eaff1030de07f3739794207403ea833ee91c0034.tar
yuzu-eaff1030de07f3739794207403ea833ee91c0034.tar.gz
yuzu-eaff1030de07f3739794207403ea833ee91c0034.tar.bz2
yuzu-eaff1030de07f3739794207403ea833ee91c0034.tar.lz
yuzu-eaff1030de07f3739794207403ea833ee91c0034.tar.xz
yuzu-eaff1030de07f3739794207403ea833ee91c0034.tar.zst
yuzu-eaff1030de07f3739794207403ea833ee91c0034.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index 9391a4cd9..4387532ab 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -19,6 +19,7 @@
#include "core/core.h"
#include "core/frontend/emu_window.h"
#include "shader_recompiler/backend/glasm/emit_glasm.h"
+#include "shader_recompiler/backend/glsl/emit_glsl.h"
#include "shader_recompiler/backend/spirv/emit_spirv.h"
#include "shader_recompiler/frontend/ir/program.h"
#include "shader_recompiler/frontend/maxwell/control_flow.h"
@@ -40,6 +41,7 @@
namespace OpenGL {
namespace {
using Shader::Backend::GLASM::EmitGLASM;
+using Shader::Backend::GLSL::EmitGLSL;
using Shader::Backend::SPIRV::EmitSPIRV;
using Shader::Maxwell::MergeDualVertexPrograms;
using Shader::Maxwell::TranslateProgram;
@@ -435,7 +437,8 @@ std::unique_ptr<GraphicsPipeline> ShaderCache::CreateGraphicsPipeline(
const std::string code{EmitGLASM(profile, runtime_info, program, binding)};
assembly_programs[stage_index] = CompileProgram(code, AssemblyStage(stage_index));
} else {
- const std::vector<u32> code{EmitSPIRV(profile, runtime_info, program, binding)};
+ const auto code{EmitGLSL(profile, program, binding)};
+ OGLShader shader;
AttachShader(Stage(stage_index), source_program.handle, code);
}
}
@@ -489,7 +492,7 @@ std::unique_ptr<ComputePipeline> ShaderCache::CreateComputePipeline(ShaderPools&
const std::string code{EmitGLASM(profile, info, program)};
asm_program = CompileProgram(code, GL_COMPUTE_PROGRAM_NV);
} else {
- const std::vector<u32> code{EmitSPIRV(profile, program)};
+ const auto code{EmitGLSL(profile, program)};
source_program.handle = glCreateProgram();
AttachShader(GL_COMPUTE_SHADER, source_program.handle, code);
LinkProgram(source_program.handle);