mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-18 10:32:38 +00:00
Move EGL definitions into renderer.h to try to fix build on Armbian
This commit is contained in:
parent
01936e000e
commit
ed57c54d06
@ -5,36 +5,6 @@
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
#include <SDL_egl.h>
|
||||
|
||||
#ifndef EGL_VERSION_1_5
|
||||
typedef intptr_t EGLAttrib;
|
||||
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image
|
||||
// EGL_KHR_image technically uses EGLImageKHR instead of EGLImage, but they're compatible
|
||||
// so we swap them here to avoid mixing them all over the place
|
||||
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImage image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_image_dma_buf_import
|
||||
#define EGL_LINUX_DMA_BUF_EXT 0x3270
|
||||
#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
|
||||
#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
|
||||
#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
|
||||
#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_image_dma_buf_import_modifiers
|
||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
|
||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class DrmRenderer : public IFFmpegRenderer {
|
||||
public:
|
||||
DrmRenderer();
|
||||
|
@ -10,10 +10,39 @@ extern "C" {
|
||||
}
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
// SDL_egl.h have too many conflicts, we will do without
|
||||
typedef void *EGLDisplay;
|
||||
#ifdef HAVE_EGL
|
||||
#define EGL_NO_X11
|
||||
#include <SDL_egl.h>
|
||||
|
||||
#ifndef EGL_VERSION_1_5
|
||||
typedef intptr_t EGLAttrib;
|
||||
typedef void *EGLImage;
|
||||
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image
|
||||
// EGL_KHR_image technically uses EGLImageKHR instead of EGLImage, but they're compatible
|
||||
// so we swap them here to avoid mixing them all over the place
|
||||
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImage image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_image_dma_buf_import
|
||||
#define EGL_LINUX_DMA_BUF_EXT 0x3270
|
||||
#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
|
||||
#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
|
||||
#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
|
||||
#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_image_dma_buf_import_modifiers
|
||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
|
||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
|
||||
#endif
|
||||
|
||||
#define EGL_MAX_PLANES 4
|
||||
#endif
|
||||
|
||||
class EGLExtensions {
|
||||
public:
|
||||
|
@ -31,36 +31,6 @@ extern "C" {
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
#include <SDL_egl.h>
|
||||
|
||||
#ifndef EGL_VERSION_1_5
|
||||
typedef intptr_t EGLAttrib;
|
||||
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image
|
||||
// EGL_KHR_image technically uses EGLImageKHR instead of EGLImage, but they're compatible
|
||||
// so we swap them here to avoid mixing them all over the place
|
||||
typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImage image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_image_dma_buf_import
|
||||
#define EGL_LINUX_DMA_BUF_EXT 0x3270
|
||||
#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
|
||||
#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
|
||||
#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
|
||||
#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_image_dma_buf_import_modifiers
|
||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
|
||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class VAAPIRenderer : public IFFmpegRenderer
|
||||
{
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user