Do not require libdrm

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
macos/master
Akihiko Odaki 4 years ago
parent 326953a662
commit 38963aeb0a
  1. 4
      meson.build
  2. 3
      src/meson.build
  3. 9
      src/vrend_winsys.c
  4. 6
      src/vrend_winsys_gbm.h

@ -74,7 +74,6 @@ endforeach
prog_python = import('python').find_installation('python3')
libdrm_dep = dependency('libdrm', version : '>=2.4.50')
thread_dep = dependency('threads')
epoxy_dep = dependency('epoxy', version: '>= 1.5.4')
m_dep = cc.find_library('m')
@ -210,8 +209,9 @@ endif
if with_egl
if cc.has_header('epoxy/egl.h', dependencies: epoxy_dep) and epoxy_dep.get_pkgconfig_variable('epoxy_has_egl') == '1'
libdrm_dep = dependency('libdrm', required: require_egl, version : '>=2.4.50')
gbm_dep = dependency('gbm', version: '>= ' + _gbm_ver, required: require_egl)
have_egl = gbm_dep.found()
have_egl = libdrm_dep.found() and gbm_dep.found()
if (have_egl)
conf_data.set('HAVE_EPOXY_EGL_H', 1)
else

@ -145,7 +145,6 @@ proxy_sources = [
virgl_depends = [
gallium_dep,
epoxy_dep,
libdrm_dep,
thread_dep,
m_dep,
]
@ -162,7 +161,7 @@ virgl_sources += vrend_sources
if have_egl
virgl_sources += vrend_winsys_egl_sources
virgl_depends += [gbm_dep]
virgl_depends += [libdrm_dep, gbm_dep]
endif
if have_glx

@ -22,6 +22,7 @@
*
**************************************************************************/
#include "vrend_debug.h"
#include "vrend_winsys.h"
#ifdef HAVE_EPOXY_GLX_H
@ -30,6 +31,8 @@
#include <stddef.h>
#include "util/macros.h"
enum {
CONTEXT_NONE,
CONTEXT_EGL,
@ -135,7 +138,7 @@ int vrend_winsys_init_external(void *egl_display)
return 0;
}
virgl_renderer_gl_context vrend_winsys_create_context(struct virgl_gl_ctx_param *param)
virgl_renderer_gl_context vrend_winsys_create_context(UNUSED struct virgl_gl_ctx_param *param)
{
#ifdef HAVE_EPOXY_EGL_H
if (use_context == CONTEXT_EGL)
@ -148,7 +151,7 @@ virgl_renderer_gl_context vrend_winsys_create_context(struct virgl_gl_ctx_param
return NULL;
}
void vrend_winsys_destroy_context(virgl_renderer_gl_context ctx)
void vrend_winsys_destroy_context(UNUSED virgl_renderer_gl_context ctx)
{
#ifdef HAVE_EPOXY_EGL_H
if (use_context == CONTEXT_EGL) {
@ -164,7 +167,7 @@ void vrend_winsys_destroy_context(virgl_renderer_gl_context ctx)
#endif
}
int vrend_winsys_make_context_current(virgl_renderer_gl_context ctx)
int vrend_winsys_make_context_current(UNUSED virgl_renderer_gl_context ctx)
{
#ifdef HAVE_EPOXY_EGL_H
if (use_context == CONTEXT_EGL)

@ -25,7 +25,9 @@
#ifndef VIRGL_GBM_H
#define VIRGL_GBM_H
#ifdef HAVE_EPOXY_EGL_H
#include <gbm.h>
#endif
#include "vrend_iov.h"
#include "virglrenderer.h"
@ -101,6 +103,8 @@ struct virgl_gbm {
struct gbm_device *device;
};
#ifdef HAVE_EPOXY_EGL_H
struct virgl_gbm *virgl_gbm_init(int fd);
void virgl_gbm_fini(struct virgl_gbm *gbm);
@ -124,3 +128,5 @@ bool virgl_gbm_external_allocation_preferred(uint32_t flags);
bool virgl_gbm_gpu_import_required(uint32_t flags);
#endif
#endif

Loading…
Cancel
Save