mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Revert "Require INVALID for implicit format modifiers"
This reverts commit ea7357b703.
			
			
This commit is contained in:
		
							parent
							
								
									61b83441a1
								
							
						
					
					
						commit
						1d7e438d8a
					
				
					 6 changed files with 45 additions and 39 deletions
				
			
		| 
						 | 
				
			
			@ -118,14 +118,9 @@ static bool add_plane(struct wlr_drm_backend *drm,
 | 
			
		|||
	p->id = drm_plane->plane_id;
 | 
			
		||||
	p->props = *props;
 | 
			
		||||
 | 
			
		||||
	for (size_t i = 0; i < drm_plane->count_formats; ++i) {
 | 
			
		||||
		// Force a LINEAR layout for the cursor if the driver doesn't support
 | 
			
		||||
		// modifiers
 | 
			
		||||
		uint64_t mod = DRM_FORMAT_MOD_INVALID;
 | 
			
		||||
		if (type == DRM_PLANE_TYPE_CURSOR) {
 | 
			
		||||
			mod = DRM_FORMAT_MOD_LINEAR;
 | 
			
		||||
		}
 | 
			
		||||
		wlr_drm_format_set_add(&p->formats, drm_plane->formats[i], mod);
 | 
			
		||||
	for (size_t j = 0; j < drm_plane->count_formats; ++j) {
 | 
			
		||||
		wlr_drm_format_set_add(&p->formats, drm_plane->formats[j],
 | 
			
		||||
			DRM_FORMAT_MOD_INVALID);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (p->props.in_formats && drm->addfb2_modifiers) {
 | 
			
		||||
| 
						 | 
				
			
			@ -155,6 +150,13 @@ static bool add_plane(struct wlr_drm_backend *drm,
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		drmModeFreePropertyBlob(blob);
 | 
			
		||||
	} else if (type == DRM_PLANE_TYPE_CURSOR) {
 | 
			
		||||
		// Force a LINEAR layout for the cursor if the driver doesn't support
 | 
			
		||||
		// modifiers
 | 
			
		||||
		for (size_t i = 0; i < p->formats.len; ++i) {
 | 
			
		||||
			wlr_drm_format_set_add(&p->formats, p->formats.formats[i]->format,
 | 
			
		||||
				DRM_FORMAT_MOD_LINEAR);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	switch (type) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -354,7 +354,6 @@ static bool query_formats(struct wlr_x11_backend *x11) {
 | 
			
		|||
			}
 | 
			
		||||
 | 
			
		||||
			if (x11->have_dri3) {
 | 
			
		||||
				// X11 always supports implicit modifiers
 | 
			
		||||
				wlr_drm_format_set_add(&x11->dri3_formats, format->drm,
 | 
			
		||||
					DRM_FORMAT_MOD_INVALID);
 | 
			
		||||
				if (!query_dri3_modifiers(x11, format)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue