diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-07-18 06:16:15 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-07-18 06:16:15 +0200 |
commit | 87909d327f3625b40d8edc0bcde087306cbc03c7 (patch) | |
tree | 0aea304e6074fd4d2718945a6a144e52b7ded848 | |
parent | textures: Fix texture buffer size calculation (diff) | |
download | yuzu-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 |
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 8 |
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; |