diff options
author | Rob Clark <robdclark@chromium.org> | 2020-09-02 09:16:25 -0700 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-09-02 09:50:08 -0700 |
commit | 26326be53e30da9c101075fda081d38ea9ec758d (patch) | |
tree | f6f41f70df5ea5ebadc18e4856a2960ae08b341b /common.h | |
parent | 31d162224b29d65715b70b307818c383be7b4f3c (diff) |
surfaceless support
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -96,21 +96,30 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, #define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A #endif +#define NUM_BUFFERS 2 + struct gbm { struct gbm_device *dev; struct gbm_surface *surface; + struct gbm_bo *bos[NUM_BUFFERS]; /* for the surfaceless case */ uint32_t format; int width, height; }; -const struct gbm * init_gbm(int drm_fd, int w, int h, uint32_t format, uint64_t modifier); +const struct gbm * init_gbm(int drm_fd, int w, int h, uint32_t format, uint64_t modifier, bool surfaceless); +struct framebuffer { + EGLImageKHR image; + GLuint tex; + GLuint fb; +}; struct egl { EGLDisplay display; EGLConfig config; EGLContext context; EGLSurface surface; + struct framebuffer fbs[NUM_BUFFERS]; /* for the surfaceless case */ PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT; PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; |