mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	gpu: Correct display transfer output with vertical flip+crop lines (#6952)
This commit is contained in:
		
							parent
							
								
									6aa31d6ec2
								
							
						
					
					
						commit
						0b0d3a4ac3
					
				
					 2 changed files with 17 additions and 1 deletions
				
			
		|  | @ -272,6 +272,14 @@ bool RasterizerCache<T>::AccelerateDisplayTransfer(const GPU::Regs::DisplayTrans | |||
|     dst_params.pixel_format = PixelFormatFromGPUPixelFormat(config.output_format); | ||||
|     dst_params.UpdateParams(); | ||||
| 
 | ||||
|     // Using flip_vertically alongside crop_input_lines produces skewed output on hardware.
 | ||||
|     // We have to emulate this because some games rely on this behaviour to render correctly.
 | ||||
|     if (config.flip_vertically && config.crop_input_lines && | ||||
|         config.input_width > config.output_width) { | ||||
|         dst_params.addr += (config.input_width - config.output_width) * (config.output_height - 1) * | ||||
|                            GPU::Regs::BytesPerPixel(config.output_format); | ||||
|     } | ||||
| 
 | ||||
|     auto [src_surface_id, src_rect] = GetSurfaceSubRect(src_params, ScaleMatch::Ignore, true); | ||||
|     if (!src_surface_id) { | ||||
|         return false; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue