mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	vulkan: Fix imported image layout
This commit is contained in:
		
							parent
							
								
									812951f5bc
								
							
						
					
					
						commit
						9988eb3378
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -598,7 +598,7 @@ static void vulkan_end(struct wlr_renderer *wlr_renderer) {
 | 
			
		|||
	wl_list_for_each_safe(texture, tmp_tex, &renderer->foreign_textures, foreign_link) {
 | 
			
		||||
		VkImageLayout src_layout = VK_IMAGE_LAYOUT_GENERAL;
 | 
			
		||||
		if (!texture->transitioned) {
 | 
			
		||||
			src_layout = VK_IMAGE_LAYOUT_PREINITIALIZED;
 | 
			
		||||
			src_layout = VK_IMAGE_LAYOUT_UNDEFINED;
 | 
			
		||||
			texture->transitioned = true;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -438,7 +438,7 @@ VkImage vulkan_import_dmabuf(struct wlr_vk_renderer *renderer,
 | 
			
		|||
	img_info.arrayLayers = 1;
 | 
			
		||||
	img_info.samples = VK_SAMPLE_COUNT_1_BIT;
 | 
			
		||||
	img_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
 | 
			
		||||
	img_info.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
 | 
			
		||||
	img_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
 | 
			
		||||
	img_info.extent = (VkExtent3D) { attribs->width, attribs->height, 1 };
 | 
			
		||||
	img_info.usage = for_render ?
 | 
			
		||||
		VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT :
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue