mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Merge pull request #1510 from emersion/libdrm-version
Require libdrm >= 2.4.95
This commit is contained in:
		
						commit
						c6b4153748
					
				
					 6 changed files with 11 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -14,10 +14,6 @@
 | 
			
		|||
#include "backend/drm/drm.h"
 | 
			
		||||
#include "glapi.h"
 | 
			
		||||
 | 
			
		||||
#ifndef DRM_FORMAT_MOD_LINEAR
 | 
			
		||||
#define DRM_FORMAT_MOD_LINEAR 0
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
bool init_drm_renderer(struct wlr_drm_backend *drm,
 | 
			
		||||
		struct wlr_drm_renderer *renderer, wlr_renderer_create_func_t create_renderer_func) {
 | 
			
		||||
	renderer->gbm = gbm_create_device(drm->fd);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,15 +11,6 @@
 | 
			
		|||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
// So we don't have to pull in linux specific drm headers
 | 
			
		||||
#ifndef DRM_FORMAT_MOD_INVALID
 | 
			
		||||
#define DRM_FORMAT_MOD_INVALID ((1ULL<<56) - 1)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef DRM_FORMAT_MOD_LINEAR
 | 
			
		||||
#define DRM_FORMAT_MOD_LINEAR 0
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define WLR_DMABUF_MAX_PLANES 4
 | 
			
		||||
 | 
			
		||||
enum wlr_dmabuf_attributes_flags {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -56,7 +56,7 @@ wayland_egl    = dependency('wayland-egl')
 | 
			
		|||
wayland_protos = dependency('wayland-protocols', version: '>=1.16')
 | 
			
		||||
egl            = dependency('egl')
 | 
			
		||||
glesv2         = dependency('glesv2')
 | 
			
		||||
drm            = dependency('libdrm')
 | 
			
		||||
drm            = dependency('libdrm', version: '>=2.4.95')
 | 
			
		||||
gbm            = dependency('gbm', version: '>=17.1.0')
 | 
			
		||||
libinput       = dependency('libinput', version: '>=1.7.0')
 | 
			
		||||
xkbcommon      = dependency('xkbcommon')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,14 @@
 | 
			
		|||
#include <assert.h>
 | 
			
		||||
#include <drm_fourcc.h>
 | 
			
		||||
#include <GLES2/gl2.h>
 | 
			
		||||
#include <GLES2/gl2ext.h>
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <wayland-server-protocol.h>
 | 
			
		||||
#include <wayland-util.h>
 | 
			
		||||
#include <wlr/render/wlr_texture.h>
 | 
			
		||||
#include <wlr/render/egl.h>
 | 
			
		||||
#include <wlr/render/interface.h>
 | 
			
		||||
#include <wlr/render/wlr_texture.h>
 | 
			
		||||
#include <wlr/types/wlr_matrix.h>
 | 
			
		||||
#include <wlr/util/log.h>
 | 
			
		||||
#include "glapi.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -239,10 +240,6 @@ struct wlr_texture *wlr_gles2_texture_from_wl_drm(struct wlr_egl *egl,
 | 
			
		|||
	return &texture->wlr_texture;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifndef DRM_FORMAT_BIG_ENDIAN
 | 
			
		||||
#define DRM_FORMAT_BIG_ENDIAN 0x80000000
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
struct wlr_texture *wlr_gles2_texture_from_dmabuf(struct wlr_egl *egl,
 | 
			
		||||
		struct wlr_dmabuf_attributes *attribs) {
 | 
			
		||||
	if (!wlr_egl_is_current(egl)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -70,5 +70,11 @@ lib_wlr_types = static_library(
 | 
			
		|||
		'wlr_xdg_output_v1.c',
 | 
			
		||||
	),
 | 
			
		||||
	include_directories: wlr_inc,
 | 
			
		||||
	dependencies: [pixman, xkbcommon, wayland_server, wlr_protos, libinput],
 | 
			
		||||
	dependencies: [
 | 
			
		||||
		drm.partial_dependency(compile_args: true), # <drm_fourcc.h>
 | 
			
		||||
		pixman,
 | 
			
		||||
		wayland_server,
 | 
			
		||||
		wlr_protos,
 | 
			
		||||
		xkbcommon,
 | 
			
		||||
	],
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
#define _POSIX_C_SOURCE 200809L
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <drm_fourcc.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#include <wayland-server.h>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue