mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-25 11:41:20 -08:00
gl_shader_cache: Fix newline on buffer preprocessor definitions
This commit is contained in:
parent
e7bdf8b22a
commit
87909d327f
@ -218,17 +218,21 @@ CachedProgram SpecializeShader(const std::string& code, const GLShader::ShaderEn
|
|||||||
if (!texture_buffer_usage.test(i)) {
|
if (!texture_buffer_usage.test(i)) {
|
||||||
continue;
|
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) {
|
if (program_type == Maxwell::ShaderProgram::Geometry) {
|
||||||
const auto [glsl_topology, debug_name, max_vertices] =
|
const auto [glsl_topology, debug_name, max_vertices] =
|
||||||
GetPrimitiveDescription(primitive_mode);
|
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 += "#define MAX_VERTEX_INPUT " + std::to_string(max_vertices) + '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
source += '\n';
|
||||||
source += code;
|
source += code;
|
||||||
|
|
||||||
OGLShader shader;
|
OGLShader shader;
|
||||||
|
Loading…
Reference in New Issue
Block a user