Skip to content
Snippets Groups Projects
Commit a2d69aa8 authored by Antonio Caggiano's avatar Antonio Caggiano Committed by Dmitry Osipenko
Browse files

virtio-gpu: Get EGL Display callback


Implement get_egl_display callback for virglrenderer.

Signed-off-by: default avatarAntonio Caggiano <antonio.caggiano@collabora.com>
parent ab64b4a5
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@
#include "hw/virtio/virtio-gpu.h"
#include "hw/virtio/virtio-gpu-bswap.h"
#include "hw/virtio/virtio-iommu.h"
#include <epoxy/egl.h>
#include <virglrenderer.h>
......@@ -735,12 +736,18 @@ static int virgl_make_context_current(void *opaque, int scanout_idx,
qctx);
}
static void *virgl_get_egl_display(void *opaque)
{
return eglGetCurrentDisplay();
}
static struct virgl_renderer_callbacks virtio_gpu_3d_cbs = {
.version = 1,
.version = 4,
.write_fence = virgl_write_fence,
.create_gl_context = virgl_create_context,
.destroy_gl_context = virgl_destroy_context,
.make_current = virgl_make_context_current,
.get_egl_display = virgl_get_egl_display,
};
static void virtio_gpu_print_stats(void *opaque)
......
......@@ -718,6 +718,9 @@ if not get_option('virglrenderer').auto() or have_system or have_vhost_user_gpu
method: 'pkg-config',
required: get_option('virglrenderer'),
kwargs: static_kwargs)
virgl = declare_dependency(compile_args: '-DVIRGL_RENDERER_UNSTABLE_APIS',
dependencies: virgl)
config_host_data.set('HAVE_VIRGL_CONTEXT_INIT',
cc.has_function('virgl_renderer_context_create_with_flags',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment