mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	rasterizer_cache: Remove runtime allocation caching (#6705)
* rasterizer_cache: Sentence surfaces * gl_texture_runtime: Remove runtime side allocation cache * rasterizer_cache: Adjust surface scale during reinterpreration * Fixes pixelated outlines. Also allows to remove the d24s8 specific hack and is more generic in general * rasterizer_cache: Remove Expand flag * Begone! * rasterizer_cache: Cache framebuffers with surface id * rasterizer_cache: Sentence texture cubes * renderer_opengl: Move texture mailbox to separate file * Makes renderer_opengl cleaner overall and allows to report removal threshold from runtime instead of hardcoding. Vulkan requires this * rasterizer_cache: Dont flush cache on layout change * rasterizer_cache: Overhaul framebuffer management * video_core: Remove duplicate * rasterizer_cache: Sentence custom surfaces * Vulkan cannot destroy images immediately so this ensures we use our garbage collector for that purpose
This commit is contained in:
		
							parent
							
								
									3fedc68230
								
							
						
					
					
						commit
						a955f02771
					
				
					 23 changed files with 734 additions and 809 deletions
				
			
		|  | @ -62,12 +62,29 @@ public: | |||
|         return SlotId{index}; | ||||
|     } | ||||
| 
 | ||||
|     template <typename... Args> | ||||
|     [[nodiscard]] SlotId swap_and_insert(SlotId existing_id, Args&&... args) noexcept { | ||||
|         const u32 index = FreeValueIndex(); | ||||
|         T& existing_value = values[existing_id.index].object; | ||||
| 
 | ||||
|         new (&values[index].object) T(std::move(existing_value)); | ||||
|         existing_value.~T(); | ||||
|         new (&values[existing_id.index].object) T(std::forward<Args>(args)...); | ||||
|         SetStorageBit(index); | ||||
| 
 | ||||
|         return SlotId{index}; | ||||
|     } | ||||
| 
 | ||||
|     void erase(SlotId id) noexcept { | ||||
|         values[id.index].object.~T(); | ||||
|         free_list.push_back(id.index); | ||||
|         ResetStorageBit(id.index); | ||||
|     } | ||||
| 
 | ||||
|     size_t size() const noexcept { | ||||
|         return values_capacity - free_list.size(); | ||||
|     } | ||||
| 
 | ||||
| private: | ||||
|     struct NonTrivialDummy { | ||||
|         NonTrivialDummy() noexcept {} | ||||
|  | @ -93,7 +110,7 @@ private: | |||
|         return ((stored_bitset[index / 64] >> (index % 64)) & 1) != 0; | ||||
|     } | ||||
| 
 | ||||
|     void ValidateIndex(SlotId id) const noexcept { | ||||
|     void ValidateIndex([[maybe_unused]] SlotId id) const noexcept { | ||||
|         DEBUG_ASSERT(id); | ||||
|         DEBUG_ASSERT(id.index / 64 < stored_bitset.size()); | ||||
|         DEBUG_ASSERT(((stored_bitset[id.index / 64] >> (id.index % 64)) & 1) != 0); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue