summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-07-18 06:16:15 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-07-18 06:16:15 +0200
commit87909d327f3625b40d8edc0bcde087306cbc03c7 (patch)
tree0aea304e6074fd4d2718945a6a144e52b7ded848 /src/video_core
parenttextures: Fix texture buffer size calculation (diff)
downloadyuzu-87909d327f3625b40d8edc0bcde087306cbc03c7.tar
yuzu-87909d327f3625b40d8edc0bcde087306cbc03c7.tar.gz
yuzu-87909d327f3625b40d8edc0bcde087306cbc03c7.tar.bz2
yuzu-87909d327f3625b40d8edc0bcde087306cbc03c7.tar.lz
yuzu-87909d327f3625b40d8edc0bcde087306cbc03c7.tar.xz
yuzu-87909d327f3625b40d8edc0bcde087306cbc03c7.tar.zst
yuzu-87909d327f3625b40d8edc0bcde087306cbc03c7.zip
Diffstat (limited to 'src/video_core')
-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 32dd9eae7..ca2c43494 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -218,17 +218,21 @@ CachedProgram SpecializeShader(const std::string& code, const GLShader::ShaderEn
if (!texture_buffer_usage.test(i)) {
continue;
}
- source += fmt::format("#define SAMPLER_{}_IS_BUFFER", i);
+ source += fmt::format("#define SAMPLER_{}_IS_BUFFER\n", i);
+ }
+ if (texture_buffer_usage.any()) {
+ source += '\n';
}
if (program_type == Maxwell::ShaderProgram::Geometry) {
const auto [glsl_topology, debug_name, max_vertices] =
GetPrimitiveDescription(primitive_mode);
- source += "layout (" + std::string(glsl_topology) + ") in;\n";
+ source += "layout (" + std::string(glsl_topology) + ") in;\n\n";
source += "#define MAX_VERTEX_INPUT " + std::to_string(max_vertices) + '\n';
}
+ source += '\n';
source += code;
OGLShader shader;