summaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2020-09-02 09:16:25 -0700
committerRob Clark <robdclark@chromium.org>2020-09-02 09:50:08 -0700
commit26326be53e30da9c101075fda081d38ea9ec758d (patch)
treef6f41f70df5ea5ebadc18e4856a2960ae08b341b /common.h
parent31d162224b29d65715b70b307818c383be7b4f3c (diff)
surfaceless support
Diffstat (limited to 'common.h')
-rw-r--r--common.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/common.h b/common.h
index 149fae9..7c41fee 100644
--- a/common.h
+++ b/common.h
@@ -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;