mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	gpu: add comments for TextureCopy
This commit is contained in:
		
							parent
							
								
									bf16c73260
								
							
						
					
					
						commit
						85a448d405
					
				@ -334,25 +334,25 @@ static void TextureCopy(const Regs::DisplayTransferConfig& config) {
 | 
				
			|||||||
    u32 remaining_size = Common::AlignDown(config.texture_copy.size, 16);
 | 
					    u32 remaining_size = Common::AlignDown(config.texture_copy.size, 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (remaining_size == 0) {
 | 
					    if (remaining_size == 0) {
 | 
				
			||||||
        // Real hardware freeze on this
 | 
					        LOG_CRITICAL(HW_GPU, "zero size. Real hardware freezes on this.");
 | 
				
			||||||
        LOG_CRITICAL(HW_GPU, "zero size");
 | 
					 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    u32 input_gap = config.texture_copy.input_gap * 16;
 | 
					    u32 input_gap = config.texture_copy.input_gap * 16;
 | 
				
			||||||
    u32 input_width = input_gap == 0 ? remaining_size : config.texture_copy.input_width * 16;
 | 
					 | 
				
			||||||
    u32 output_gap = config.texture_copy.output_gap * 16;
 | 
					    u32 output_gap = config.texture_copy.output_gap * 16;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Zero gap means contiguous input/output even if width = 0. To avoid infinite loop below, width
 | 
				
			||||||
 | 
					    // is assigned with the total size if gap = 0.
 | 
				
			||||||
 | 
					    u32 input_width = input_gap == 0 ? remaining_size : config.texture_copy.input_width * 16;
 | 
				
			||||||
    u32 output_width = output_gap == 0 ? remaining_size : config.texture_copy.output_width * 16;
 | 
					    u32 output_width = output_gap == 0 ? remaining_size : config.texture_copy.output_width * 16;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (input_width == 0) {
 | 
					    if (input_width == 0) {
 | 
				
			||||||
        // Real hardware freeze on this
 | 
					        LOG_CRITICAL(HW_GPU, "zero input width. Real hardware freezes on this.");
 | 
				
			||||||
        LOG_CRITICAL(HW_GPU, "zero input width");
 | 
					 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (output_width == 0) {
 | 
					    if (output_width == 0) {
 | 
				
			||||||
        // Real hardware freeze on this
 | 
					        LOG_CRITICAL(HW_GPU, "zero output width. Real hardware freezes on this.");
 | 
				
			||||||
        LOG_CRITICAL(HW_GPU, "zero output width");
 | 
					 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -225,7 +225,7 @@ struct Regs {
 | 
				
			|||||||
        INSERT_PADDING_WORDS(0x1);
 | 
					        INSERT_PADDING_WORDS(0x1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        struct {
 | 
					        struct {
 | 
				
			||||||
            u32 size;
 | 
					            u32 size; // The lower 4 bits are ignored
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            union {
 | 
					            union {
 | 
				
			||||||
                u32 input_size;
 | 
					                u32 input_size;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user