mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 13:20:03 +00:00 
			
		
		
		
	bring back vulkan gpu logging
This commit is contained in:
		
							parent
							
								
									f29d12bfcc
								
							
						
					
					
						commit
						e48d8b502c
					
				
					 2 changed files with 36 additions and 1 deletions
				
			
		|  | @ -161,6 +161,7 @@ Instance::Instance(Frontend::EmuWindow& window, u32 physical_device_index) | ||||||
| 
 | 
 | ||||||
|     CreateDevice(); |     CreateDevice(); | ||||||
|     CreateFormatTable(); |     CreateFormatTable(); | ||||||
|  |     CollectToolingInfo(); | ||||||
|     CreateCustomFormatTable(); |     CreateCustomFormatTable(); | ||||||
|     CreateAttribTable(); |     CreateAttribTable(); | ||||||
| } | } | ||||||
|  | @ -641,4 +642,35 @@ void Instance::CreateAllocator() { | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void Instance::CollectToolingInfo() { | ||||||
|  |     if (!tooling_info) { | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  |     const vk::StructureChain property_chain = | ||||||
|  |         physical_device | ||||||
|  |             .getProperties2<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceDriverProperties>(); | ||||||
|  |     const vk::PhysicalDeviceDriverProperties driver = | ||||||
|  |         property_chain.get<vk::PhysicalDeviceDriverProperties>(); | ||||||
|  | 
 | ||||||
|  |     driver_id = driver.driverID; | ||||||
|  |     vendor_name = driver.driverName.data(); | ||||||
|  | 
 | ||||||
|  |     const std::string model_name{GetModelName()}; | ||||||
|  |     const std::string driver_version = GetDriverVersionName(); | ||||||
|  |     const std::string driver_name = fmt::format("{} {}", vendor_name, driver_version); | ||||||
|  |     const std::string api_version = GetReadableVersion(properties.apiVersion); | ||||||
|  |     const std::string extensions = fmt::format("{}", fmt::join(available_extensions, ", ")); | ||||||
|  | 
 | ||||||
|  |     LOG_INFO(Render_Vulkan, "VK_DRIVER: {}", driver_name); | ||||||
|  |     LOG_INFO(Render_Vulkan, "VK_DEVICE: {}", model_name); | ||||||
|  |     LOG_INFO(Render_Vulkan, "VK_VERSION: {}", api_version); | ||||||
|  |     const auto tools = physical_device.getToolPropertiesEXT(); | ||||||
|  |     for (const vk::PhysicalDeviceToolProperties& tool : tools) { | ||||||
|  |         const std::string_view name = tool.name; | ||||||
|  |         LOG_INFO(Render_Vulkan, "Attached debugging tool: {}", name); | ||||||
|  |         has_renderdoc = has_renderdoc || name == "RenderDoc"; | ||||||
|  |         has_nsight_graphics = has_nsight_graphics || name == "NVIDIA Nsight Graphics"; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| } // namespace Vulkan
 | } // namespace Vulkan
 | ||||||
|  |  | ||||||
|  | @ -285,6 +285,9 @@ private: | ||||||
|     /// Creates the VMA allocator handle
 |     /// Creates the VMA allocator handle
 | ||||||
|     void CreateAllocator(); |     void CreateAllocator(); | ||||||
| 	 | 	 | ||||||
|  | 	//Collects logging gpu info
 | ||||||
|  | 	void CollectToolingInfo(); | ||||||
|  | 
 | ||||||
| private: | private: | ||||||
|     std::shared_ptr<Common::DynamicLibrary> library; |     std::shared_ptr<Common::DynamicLibrary> library; | ||||||
|     vk::UniqueInstance instance; |     vk::UniqueInstance instance; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue