forked from eden-emu/eden
		
	Address feedback, add CR notice, etc
This commit is contained in:
		
							parent
							
								
									dffc48b942
								
							
						
					
					
						commit
						134c14f089
					
				
					 5 changed files with 18 additions and 10 deletions
				
			
		|  | @ -20,7 +20,6 @@ | ||||||
| #include "video_core/gpu.h" | #include "video_core/gpu.h" | ||||||
| #include "video_core/rasterizer_download_area.h" | #include "video_core/rasterizer_download_area.h" | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| namespace Core::Memory { | namespace Core::Memory { | ||||||
| 
 | 
 | ||||||
| // Implementation class used to keep the specifics of the memory subsystem hidden
 | // Implementation class used to keep the specifics of the memory subsystem hidden
 | ||||||
|  | @ -465,7 +464,8 @@ struct Memory::Impl { | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         if (Settings::IsFastmemEnabled()) { |         if (Settings::IsFastmemEnabled()) { | ||||||
|             const bool is_read_enable = !Settings::values.use_reactive_flushing.GetValue() || !cached; |             const bool is_read_enable = | ||||||
|  |                 !Settings::values.use_reactive_flushing.GetValue() || !cached; | ||||||
|             system.DeviceMemory().buffer.Protect(vaddr, size, is_read_enable, !cached); |             system.DeviceMemory().buffer.Protect(vaddr, size, is_read_enable, !cached); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | @ -654,9 +654,7 @@ struct Memory::Impl { | ||||||
|                 LOG_ERROR(HW_Memory, "Unmapped Read{} @ 0x{:016X}", sizeof(T) * 8, |                 LOG_ERROR(HW_Memory, "Unmapped Read{} @ 0x{:016X}", sizeof(T) * 8, | ||||||
|                           GetInteger(vaddr)); |                           GetInteger(vaddr)); | ||||||
|             }, |             }, | ||||||
|             [&]() { |             [&]() { HandleRasterizerDownload(GetInteger(vaddr), sizeof(T)); }); | ||||||
|                 HandleRasterizerDownload(GetInteger(vaddr), sizeof(T)); |  | ||||||
|             }); |  | ||||||
|         if (ptr) { |         if (ptr) { | ||||||
|             std::memcpy(&result, ptr, sizeof(T)); |             std::memcpy(&result, ptr, sizeof(T)); | ||||||
|         } |         } | ||||||
|  | @ -721,7 +719,8 @@ struct Memory::Impl { | ||||||
|         const size_t core = system.GetCurrentHostThreadID(); |         const size_t core = system.GetCurrentHostThreadID(); | ||||||
|         auto& current_area = rasterizer_areas[core]; |         auto& current_area = rasterizer_areas[core]; | ||||||
|         const VAddr end_address = address + size; |         const VAddr end_address = address + size; | ||||||
|         if (current_area.start_address <= address && end_address <= current_area.end_address) [[likely]] { |         if (current_area.start_address <= address && end_address <= current_area.end_address) | ||||||
|  |             [[likely]] { | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         current_area = system.GPU().OnCPURead(address, size); |         current_area = system.GPU().OnCPURead(address, size); | ||||||
|  |  | ||||||
|  | @ -55,7 +55,12 @@ public: | ||||||
| 
 | 
 | ||||||
|     // Unlike other fences, this one doesn't
 |     // Unlike other fences, this one doesn't
 | ||||||
|     void SignalOrdering() { |     void SignalOrdering() { | ||||||
|         std::function<void()> do_nothing([]{}); |         std::scoped_lock lock{buffer_cache.mutex}; | ||||||
|  |         buffer_cache.AccumulateFlushes(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     void SignalReference() { | ||||||
|  |         std::function<void()> do_nothing([] {}); | ||||||
|         SignalFence(std::move(do_nothing)); |         SignalFence(std::move(do_nothing)); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,3 +1,6 @@ | ||||||
|  | // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
 | ||||||
|  | // SPDX-License-Identifier: GPL-3.0-or-later
 | ||||||
|  | 
 | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include "common/common_types.h" | #include "common/common_types.h" | ||||||
|  |  | ||||||
|  | @ -621,7 +621,7 @@ void RasterizerVulkan::SignalSyncPoint(u32 value) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void RasterizerVulkan::SignalReference() { | void RasterizerVulkan::SignalReference() { | ||||||
|     fence_manager.SignalOrdering(); |     fence_manager.SignalReference(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void RasterizerVulkan::ReleaseFences() { | void RasterizerVulkan::ReleaseFences() { | ||||||
|  | @ -654,7 +654,7 @@ void RasterizerVulkan::WaitForIdle() { | ||||||
|         cmdbuf.SetEvent(event, flags); |         cmdbuf.SetEvent(event, flags); | ||||||
|         cmdbuf.WaitEvents(event, flags, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, {}, {}, {}); |         cmdbuf.WaitEvents(event, flags, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, {}, {}, {}); | ||||||
|     }); |     }); | ||||||
|     SignalReference(); |     fence_manager.SignalOrdering(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void RasterizerVulkan::FragmentBarrier() { | void RasterizerVulkan::FragmentBarrier() { | ||||||
|  |  | ||||||
|  | @ -26,7 +26,8 @@ ImageViewBase::ImageViewBase(const ImageViewInfo& info, const ImageInfo& image_i | ||||||
|     ASSERT_MSG(VideoCore::Surface::IsViewCompatible(image_info.format, info.format, false, true), |     ASSERT_MSG(VideoCore::Surface::IsViewCompatible(image_info.format, info.format, false, true), | ||||||
|                "Image view format {} is incompatible with image format {}", info.format, |                "Image view format {} is incompatible with image format {}", info.format, | ||||||
|                image_info.format); |                image_info.format); | ||||||
|     const bool preemptive = !Settings::values.use_reactive_flushing.GetValue() && image_info.type == ImageType::Linear; |     const bool preemptive = | ||||||
|  |         !Settings::values.use_reactive_flushing.GetValue() && image_info.type == ImageType::Linear; | ||||||
|     if (image_info.forced_flushed || preemptive) { |     if (image_info.forced_flushed || preemptive) { | ||||||
|         flags |= ImageViewFlagBits::PreemtiveDownload; |         flags |= ImageViewFlagBits::PreemtiveDownload; | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fernando Sahmkow
						Fernando Sahmkow