mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	render/vulkan: add missing entries in vulkan_strerror()
And update the sort order to follow Khronos' <vulkan/vulkan_core.h>.
This commit is contained in:
		
							parent
							
								
									b475190327
								
							
						
					
					
						commit
						9e5ad7a845
					
				
					 1 changed files with 10 additions and 6 deletions
				
			
		| 
						 | 
					@ -20,7 +20,7 @@ int vulkan_find_mem_type(struct wlr_vk_device *dev,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const char *vulkan_strerror(VkResult err) {
 | 
					const char *vulkan_strerror(VkResult err) {
 | 
				
			||||||
	#define ERR_STR(r) case VK_ ##r: return #r
 | 
					#define ERR_STR(r) case VK_ ##r: return #r
 | 
				
			||||||
	switch (err) {
 | 
						switch (err) {
 | 
				
			||||||
	ERR_STR(SUCCESS);
 | 
						ERR_STR(SUCCESS);
 | 
				
			||||||
	ERR_STR(NOT_READY);
 | 
						ERR_STR(NOT_READY);
 | 
				
			||||||
| 
						 | 
					@ -28,7 +28,6 @@ const char *vulkan_strerror(VkResult err) {
 | 
				
			||||||
	ERR_STR(EVENT_SET);
 | 
						ERR_STR(EVENT_SET);
 | 
				
			||||||
	ERR_STR(EVENT_RESET);
 | 
						ERR_STR(EVENT_RESET);
 | 
				
			||||||
	ERR_STR(INCOMPLETE);
 | 
						ERR_STR(INCOMPLETE);
 | 
				
			||||||
	ERR_STR(SUBOPTIMAL_KHR);
 | 
					 | 
				
			||||||
	ERR_STR(ERROR_OUT_OF_HOST_MEMORY);
 | 
						ERR_STR(ERROR_OUT_OF_HOST_MEMORY);
 | 
				
			||||||
	ERR_STR(ERROR_OUT_OF_DEVICE_MEMORY);
 | 
						ERR_STR(ERROR_OUT_OF_DEVICE_MEMORY);
 | 
				
			||||||
	ERR_STR(ERROR_INITIALIZATION_FAILED);
 | 
						ERR_STR(ERROR_INITIALIZATION_FAILED);
 | 
				
			||||||
| 
						 | 
					@ -40,19 +39,24 @@ const char *vulkan_strerror(VkResult err) {
 | 
				
			||||||
	ERR_STR(ERROR_INCOMPATIBLE_DRIVER);
 | 
						ERR_STR(ERROR_INCOMPATIBLE_DRIVER);
 | 
				
			||||||
	ERR_STR(ERROR_TOO_MANY_OBJECTS);
 | 
						ERR_STR(ERROR_TOO_MANY_OBJECTS);
 | 
				
			||||||
	ERR_STR(ERROR_FORMAT_NOT_SUPPORTED);
 | 
						ERR_STR(ERROR_FORMAT_NOT_SUPPORTED);
 | 
				
			||||||
 | 
						ERR_STR(ERROR_FRAGMENTED_POOL);
 | 
				
			||||||
 | 
						ERR_STR(ERROR_UNKNOWN);
 | 
				
			||||||
 | 
						ERR_STR(ERROR_OUT_OF_POOL_MEMORY);
 | 
				
			||||||
 | 
						ERR_STR(ERROR_INVALID_EXTERNAL_HANDLE);
 | 
				
			||||||
 | 
						ERR_STR(ERROR_FRAGMENTATION);
 | 
				
			||||||
 | 
						ERR_STR(ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS);
 | 
				
			||||||
 | 
						ERR_STR(PIPELINE_COMPILE_REQUIRED);
 | 
				
			||||||
	ERR_STR(ERROR_SURFACE_LOST_KHR);
 | 
						ERR_STR(ERROR_SURFACE_LOST_KHR);
 | 
				
			||||||
	ERR_STR(ERROR_NATIVE_WINDOW_IN_USE_KHR);
 | 
						ERR_STR(ERROR_NATIVE_WINDOW_IN_USE_KHR);
 | 
				
			||||||
 | 
						ERR_STR(SUBOPTIMAL_KHR);
 | 
				
			||||||
	ERR_STR(ERROR_OUT_OF_DATE_KHR);
 | 
						ERR_STR(ERROR_OUT_OF_DATE_KHR);
 | 
				
			||||||
	ERR_STR(ERROR_FRAGMENTED_POOL);
 | 
					 | 
				
			||||||
	ERR_STR(ERROR_INCOMPATIBLE_DISPLAY_KHR);
 | 
						ERR_STR(ERROR_INCOMPATIBLE_DISPLAY_KHR);
 | 
				
			||||||
	ERR_STR(ERROR_VALIDATION_FAILED_EXT);
 | 
						ERR_STR(ERROR_VALIDATION_FAILED_EXT);
 | 
				
			||||||
	ERR_STR(ERROR_INVALID_EXTERNAL_HANDLE);
 | 
					 | 
				
			||||||
	ERR_STR(ERROR_OUT_OF_POOL_MEMORY);
 | 
					 | 
				
			||||||
	ERR_STR(ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT);
 | 
						ERR_STR(ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT);
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
		return "<unknown>";
 | 
							return "<unknown>";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	#undef ERR_STR
 | 
					#undef ERR_STR
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vulkan_change_layout_queue(VkCommandBuffer cb, VkImage img,
 | 
					void vulkan_change_layout_queue(VkCommandBuffer cb, VkImage img,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue