mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	render/vulkan: require format info for shm
We use the format info to check the stride and need it to perform the texture upload.
This commit is contained in:
		
							parent
							
								
									2a2f0772a9
								
							
						
					
					
						commit
						1b947c08c6
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -4,6 +4,7 @@
 | 
				
			||||||
#include <vulkan/vulkan.h>
 | 
					#include <vulkan/vulkan.h>
 | 
				
			||||||
#include <wlr/util/log.h>
 | 
					#include <wlr/util/log.h>
 | 
				
			||||||
#include <xf86drm.h>
 | 
					#include <xf86drm.h>
 | 
				
			||||||
 | 
					#include "render/pixel_format.h"
 | 
				
			||||||
#include "render/vulkan.h"
 | 
					#include "render/vulkan.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct wlr_vk_format formats[] = {
 | 
					static const struct wlr_vk_format formats[] = {
 | 
				
			||||||
| 
						 | 
					@ -433,10 +434,12 @@ void vulkan_format_props_query(struct wlr_vk_device *dev,
 | 
				
			||||||
	struct wlr_vk_format_props props = {0};
 | 
						struct wlr_vk_format_props props = {0};
 | 
				
			||||||
	props.format = *format;
 | 
						props.format = *format;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						const struct wlr_pixel_format_info *format_info = drm_get_pixel_format_info(format->drm);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// non-dmabuf texture properties
 | 
						// non-dmabuf texture properties
 | 
				
			||||||
	const char *shm_texture_status;
 | 
						const char *shm_texture_status;
 | 
				
			||||||
	if ((fmtp.formatProperties.optimalTilingFeatures & shm_tex_features) == shm_tex_features &&
 | 
						if ((fmtp.formatProperties.optimalTilingFeatures & shm_tex_features) == shm_tex_features &&
 | 
				
			||||||
			!format->is_ycbcr) {
 | 
								!format->is_ycbcr && format_info != NULL) {
 | 
				
			||||||
		VkPhysicalDeviceImageFormatInfo2 fmti = {
 | 
							VkPhysicalDeviceImageFormatInfo2 fmti = {
 | 
				
			||||||
			.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
 | 
								.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
 | 
				
			||||||
			.type = VK_IMAGE_TYPE_2D,
 | 
								.type = VK_IMAGE_TYPE_2D,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue