summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_cache.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-11-10 06:41:33 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2018-11-10 07:10:50 +0100
commit8d4bb10d443060dc56d6c6ddd9b84bbea00874d3 (patch)
treee171445255a669bf311468f0c005fe2045802627 /src/video_core/renderer_opengl/gl_shader_cache.cpp
parentgl_resource_manager: Amend clang-format discrepancies (diff)
downloadyuzu-8d4bb10d443060dc56d6c6ddd9b84bbea00874d3.tar
yuzu-8d4bb10d443060dc56d6c6ddd9b84bbea00874d3.tar.gz
yuzu-8d4bb10d443060dc56d6c6ddd9b84bbea00874d3.tar.bz2
yuzu-8d4bb10d443060dc56d6c6ddd9b84bbea00874d3.tar.lz
yuzu-8d4bb10d443060dc56d6c6ddd9b84bbea00874d3.tar.xz
yuzu-8d4bb10d443060dc56d6c6ddd9b84bbea00874d3.tar.zst
yuzu-8d4bb10d443060dc56d6c6ddd9b84bbea00874d3.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp8
1 files changed, 6 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 9522fd344..31ccf4ab8 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -121,12 +121,16 @@ GLint CachedShader::GetUniformLocation(const GLShader::SamplerEntry& sampler) {
}
GLuint CachedShader::LazyGeometryProgram(OGLProgram& target_program,
- const std::string& glsl_topology,
+ const std::string& glsl_topology, u32 max_vertices,
const std::string& debug_name) {
if (target_program.handle != 0) {
return target_program.handle;
}
- const std::string source{geometry_programs.code + "layout (" + glsl_topology + ") in;\n"};
+ std::string source = "#version 430 core\n";
+ source += "layout (" + glsl_topology + ") in;\n";
+ source += "#define MAX_VERTEX_INPUT " + std::to_string(max_vertices) + '\n';
+ source += geometry_programs.code;
+
OGLShader shader;
shader.Create(source.c_str(), GL_GEOMETRY_SHADER);
target_program.Create(true, shader.handle);