mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-04 00:49:02 -06:00 
			
		
		
		
	Merge pull request #10840 from Kelebek1/unbug_blinks_brain
Use current GPU address when unmapping GPU pages, not the base
This commit is contained in:
		@@ -111,7 +111,7 @@ GPUVAddr MemoryManager::PageTableOp(GPUVAddr gpu_addr, [[maybe_unused]] VAddr cp
 | 
				
			|||||||
        [[maybe_unused]] const auto current_entry_type = GetEntry<false>(current_gpu_addr);
 | 
					        [[maybe_unused]] const auto current_entry_type = GetEntry<false>(current_gpu_addr);
 | 
				
			||||||
        SetEntry<false>(current_gpu_addr, entry_type);
 | 
					        SetEntry<false>(current_gpu_addr, entry_type);
 | 
				
			||||||
        if (current_entry_type != entry_type) {
 | 
					        if (current_entry_type != entry_type) {
 | 
				
			||||||
            rasterizer->ModifyGPUMemory(unique_identifier, gpu_addr, page_size);
 | 
					            rasterizer->ModifyGPUMemory(unique_identifier, current_gpu_addr, page_size);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if constexpr (entry_type == EntryType::Mapped) {
 | 
					        if constexpr (entry_type == EntryType::Mapped) {
 | 
				
			||||||
            const VAddr current_cpu_addr = cpu_addr + offset;
 | 
					            const VAddr current_cpu_addr = cpu_addr + offset;
 | 
				
			||||||
@@ -134,7 +134,7 @@ GPUVAddr MemoryManager::BigPageTableOp(GPUVAddr gpu_addr, [[maybe_unused]] VAddr
 | 
				
			|||||||
        [[maybe_unused]] const auto current_entry_type = GetEntry<true>(current_gpu_addr);
 | 
					        [[maybe_unused]] const auto current_entry_type = GetEntry<true>(current_gpu_addr);
 | 
				
			||||||
        SetEntry<true>(current_gpu_addr, entry_type);
 | 
					        SetEntry<true>(current_gpu_addr, entry_type);
 | 
				
			||||||
        if (current_entry_type != entry_type) {
 | 
					        if (current_entry_type != entry_type) {
 | 
				
			||||||
            rasterizer->ModifyGPUMemory(unique_identifier, gpu_addr, big_page_size);
 | 
					            rasterizer->ModifyGPUMemory(unique_identifier, current_gpu_addr, big_page_size);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if constexpr (entry_type == EntryType::Mapped) {
 | 
					        if constexpr (entry_type == EntryType::Mapped) {
 | 
				
			||||||
            const VAddr current_cpu_addr = cpu_addr + offset;
 | 
					            const VAddr current_cpu_addr = cpu_addr + offset;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user