mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	vulkan: limit supported modifiers with DMABUF_MAX_PLANES
This commit is contained in:
		
							parent
							
								
									58853eb2c7
								
							
						
					
					
						commit
						0bb662f2e7
					
				
					 2 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -6,6 +6,7 @@
 | 
			
		|||
#include <spa/node/node.h>
 | 
			
		||||
 | 
			
		||||
#define MAX_BUFFERS 16
 | 
			
		||||
#define DMABUF_MAX_PLANES 1
 | 
			
		||||
 | 
			
		||||
struct vulkan_modifier_info {
 | 
			
		||||
	VkDrmFormatModifierPropertiesEXT props;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -266,6 +266,9 @@ static int queryFormatInfo(struct vulkan_base *s, struct vulkan_base_info *info)
 | 
			
		|||
			if (!(props.drmFormatModifierTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT))
 | 
			
		||||
				continue;
 | 
			
		||||
 | 
			
		||||
			if (props.drmFormatModifierPlaneCount > DMABUF_MAX_PLANES)
 | 
			
		||||
				continue;
 | 
			
		||||
 | 
			
		||||
			VkPhysicalDeviceImageDrmFormatModifierInfoEXT modInfo = {
 | 
			
		||||
				.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT,
 | 
			
		||||
				.drmFormatModifier = props.drmFormatModifier,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue