mirror of
				https://github.com/yuzu-emu/yuzu.git
				synced 2025-11-03 23:43:41 +00:00 
			
		
		
		
	gl_shader_cache: Dehardcode constant in CalculateProgramSize()
This constant is related to the size of the instruction.
This commit is contained in:
		
							parent
							
								
									861bfdbf5d
								
							
						
					
					
						commit
						4c2b94559b
					
				@ -153,7 +153,7 @@ static bool IsSchedInstruction(std::size_t offset, std::size_t main_offset) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static std::size_t CalculateProgramSize(const GLShader::ProgramCode& program) {
 | 
			
		||||
    const std::size_t start_offset = 10;
 | 
			
		||||
    constexpr std::size_t start_offset = 10;
 | 
			
		||||
    std::size_t offset = start_offset;
 | 
			
		||||
    std::size_t size = start_offset * sizeof(u64);
 | 
			
		||||
    while (offset < program.size()) {
 | 
			
		||||
@ -163,7 +163,7 @@ static std::size_t CalculateProgramSize(const GLShader::ProgramCode& program) {
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        size += 8;
 | 
			
		||||
        size += sizeof(inst);
 | 
			
		||||
        offset++;
 | 
			
		||||
    }
 | 
			
		||||
    return size;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user