mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Fix Disk shader cache when accurate multiplication is off (#5711)
* renderer_opengl.cpp: fix sanitize_mul check for disk shader cache
* Partially revert "Band-aid solution for 'Disk Shader Cache' (#5188)"
This reverts commit 2e0ce86c9e.
* Disable `disk_shader_cache` checkbox when `hw_renderer` is off
			
			
This commit is contained in:
		
							parent
							
								
									82aedb9900
								
							
						
					
					
						commit
						842031a2eb
					
				
					 4 changed files with 12 additions and 17 deletions
				
			
		|  | @ -106,8 +106,8 @@ ShaderDiskCache::ShaderDiskCache(bool separable) : separable{separable} {} | |||
| 
 | ||||
| std::optional<std::vector<ShaderDiskCacheRaw>> ShaderDiskCache::LoadTransferable() { | ||||
|     const bool has_title_id = GetProgramID() != 0; | ||||
|     if (!Settings::values.use_hw_shader || !Settings::values.shaders_accurate_mul || | ||||
|         !Settings::values.use_disk_shader_cache || !has_title_id) { | ||||
|     if (!Settings::values.use_hw_shader || !Settings::values.use_disk_shader_cache || | ||||
|         !has_title_id) { | ||||
|         return std::nullopt; | ||||
|     } | ||||
|     tried_to_load = true; | ||||
|  |  | |||
|  | @ -496,7 +496,8 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading, | |||
| 
 | ||||
|                 if (dump != dump_map.end() && decomp != decompiled_map.end()) { | ||||
|                     // Only load this shader if its sanitize_mul setting matches
 | ||||
|                     if (decomp->second.sanitize_mul == VideoCore::g_hw_shader_accurate_mul) { | ||||
|                     if (raw.GetProgramType() == ProgramType::VS && | ||||
|                         decomp->second.sanitize_mul != VideoCore::g_hw_shader_accurate_mul) { | ||||
|                         continue; | ||||
|                     } | ||||
| 
 | ||||
|  | @ -617,6 +618,6 @@ void ShaderProgramManager::LoadDiskCache(const std::atomic_bool& stop_loading, | |||
|     if (precompiled_cache_altered) { | ||||
|         disk_cache.SaveVirtualPrecompiledFile(); | ||||
|     } | ||||
| } // namespace OpenGL
 | ||||
| } | ||||
| 
 | ||||
| } // namespace OpenGL
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue