yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

gl_shader_cache: Fixup GLSL unique identifiers

This commit is contained in:
ReinUsesLisp 2019-01-31 16:44:11 -03:00
parent 4ffb487251
commit e147ed4fc0
2 changed files with 3 additions and 3 deletions

View File

@ -136,12 +136,12 @@ u64 GetUniqueIdentifier(Maxwell::ShaderProgram program_type, const ProgramCode&
/// Creates an unspecialized program from code streams /// Creates an unspecialized program from code streams
GLShader::ProgramResult CreateProgram(Maxwell::ShaderProgram program_type, ProgramCode program_code, GLShader::ProgramResult CreateProgram(Maxwell::ShaderProgram program_type, ProgramCode program_code,
ProgramCode program_code_b) { ProgramCode program_code_b) {
GLShader::ShaderSetup setup(std::move(program_code)); GLShader::ShaderSetup setup(program_code);
if (program_type == Maxwell::ShaderProgram::VertexA) { if (program_type == Maxwell::ShaderProgram::VertexA) {
// VertexB is always enabled, so when VertexA is enabled, we have two vertex shaders. // VertexB is always enabled, so when VertexA is enabled, we have two vertex shaders.
// Conventional HW does not support this, so we combine VertexA and VertexB into one // Conventional HW does not support this, so we combine VertexA and VertexB into one
// stage here. // stage here.
setup.SetProgramB(std::move(program_code_b)); setup.SetProgramB(program_code_b);
} }
setup.program.unique_identifier = setup.program.unique_identifier =
GetUniqueIdentifier(program_type, program_code, program_code_b); GetUniqueIdentifier(program_type, program_code, program_code_b);

View File

@ -29,7 +29,7 @@ struct ShaderSetup {
} program; } program;
/// Used in scenarios where we have a dual vertex shaders /// Used in scenarios where we have a dual vertex shaders
void SetProgramB(ProgramCode&& program_b) { void SetProgramB(ProgramCode program_b) {
program.code_b = std::move(program_b); program.code_b = std::move(program_b);
has_program_b = true; has_program_b = true;
} }