egl: image_dma_buf_export - use KHR 64-bit type

After talking to Jon Leech he suggested this should be fine.

update spec to the version in the registry.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2015-05-05 09:10:34 +10:00
parent 1c5a57aee1
commit b5045e2991
5 changed files with 19 additions and 15 deletions

View File

@@ -16,19 +16,19 @@ Contact
Status Status
Proposal Complete, shipping.
Version Version
Version 2, Mar 30, 2015 Version 3, May 5, 2015
Number Number
EGL Extension #not assigned EGL Extension #87
Dependencies Dependencies
Reguires EGL 1.4 or later. This extension is written against the Requires EGL 1.4 or later. This extension is written against the
wording of the EGL 1.4 specification. wording of the EGL 1.4 specification.
EGL_KHR_base_image is required. EGL_KHR_base_image is required.
@@ -43,7 +43,8 @@ Overview
file descriptor or multiple file descriptors, in the case of multi-plane file descriptor or multiple file descriptors, in the case of multi-plane
YUV image, from an EGLImage. YUV image, from an EGLImage.
It is designed to provide the complementary functionality to EGL_EXT_image_dma_buf_import. It is designed to provide the complementary functionality to
EGL_EXT_image_dma_buf_import.
IP Status IP Status
@@ -51,10 +52,12 @@ IP Status
New Types New Types
This is a 64 bit unsigned integer. This extension uses the 64-bit unsigned integer type EGLuint64KHR
first introduced by the EGL_KHR_stream extension, but does not
typedef khronos_uint64_t EGLuint64MESA; depend on that extension. The typedef may be reproduced separately
for this extension, if not already present in eglext.h.
typedef khronos_uint64_t EGLuint64KHR;
New Procedures and Functions New Procedures and Functions
@@ -62,7 +65,7 @@ New Procedures and Functions
EGLImageKHR image, EGLImageKHR image,
int *fourcc, int *fourcc,
int *num_planes, int *num_planes,
EGLuint64MESA *modifiers); EGLuint64KHR *modifiers);
EGLBoolean eglExportDMABUFImageMESA(EGLDisplay dpy, EGLBoolean eglExportDMABUFImageMESA(EGLDisplay dpy,
EGLImageKHR image, EGLImageKHR image,
@@ -89,7 +92,7 @@ Additions to the EGL 1.4 Specification:
EGLImageKHR image, EGLImageKHR image,
int *fourcc, int *fourcc,
int *num_planes, int *num_planes,
EGLuint64MESA *modifiers); EGLuint64KHR *modifiers);
is used to retrieve the pixel format of the buffer, as specified by is used to retrieve the pixel format of the buffer, as specified by
drm_fourcc.h, the number of planes in the image and the Linux drm_fourcc.h, the number of planes in the image and the Linux
@@ -135,6 +138,8 @@ to dup the fd extra times to make the interface sane.
Revision History Revision History
Version 3, May, 2015
Just use the KHR 64-bit type.
Version 2, March, 2015 Version 2, March, 2015
Add a query interface (Dave Airlie) Add a query interface (Dave Airlie)
Version 1, June 3, 2014 Version 1, June 3, 2014

View File

@@ -173,8 +173,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EG
#if KHRONOS_SUPPORT_INT64 #if KHRONOS_SUPPORT_INT64
#ifndef EGL_MESA_image_dma_buf_export #ifndef EGL_MESA_image_dma_buf_export
#define EGL_MESA_image_dma_buf_export 1 #define EGL_MESA_image_dma_buf_export 1
typedef khronos_uint64_t EGLuint64MESA; EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *fourcc, EGLint *nplanes, EGLuint64KHR *modifiers);
EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *fourcc, EGLint *nplanes, EGLuint64MESA *modifiers);
EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets); EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
#endif #endif
#endif #endif

View File

@@ -1996,7 +1996,7 @@ static EGLBoolean
dri2_export_dma_buf_image_query_mesa(_EGLDriver *drv, _EGLDisplay *disp, dri2_export_dma_buf_image_query_mesa(_EGLDriver *drv, _EGLDisplay *disp,
_EGLImage *img, _EGLImage *img,
EGLint *fourcc, EGLint *nplanes, EGLint *fourcc, EGLint *nplanes,
EGLuint64MESA *modifiers) EGLuint64KHR *modifiers)
{ {
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_image *dri2_img = dri2_egl_image(img); struct dri2_egl_image *dri2_img = dri2_egl_image(img);

View File

@@ -2013,7 +2013,7 @@ eglGetSyncValuesCHROMIUM(EGLDisplay display, EGLSurface surface,
EGLBoolean EGLAPIENTRY EGLBoolean EGLAPIENTRY
eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImageKHR image, eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImageKHR image,
EGLint *fourcc, EGLint *nplanes, EGLint *fourcc, EGLint *nplanes,
EGLuint64MESA *modifiers) EGLuint64KHR *modifiers)
{ {
_EGLDisplay *disp = _eglLockDisplay(dpy); _EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLImage *img = _eglLookupImage(image, disp); _EGLImage *img = _eglLookupImage(image, disp);

View File

@@ -142,7 +142,7 @@ typedef EGLBoolean (*SwapBuffersWithDamageEXT_t) (_EGLDriver *drv, _EGLDisplay *
typedef EGLBoolean (*GetSyncValuesCHROMIUM_t) (_EGLDisplay *dpy, _EGLSurface *surface, EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc); typedef EGLBoolean (*GetSyncValuesCHROMIUM_t) (_EGLDisplay *dpy, _EGLSurface *surface, EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc);
#ifdef EGL_MESA_image_dma_buf_export #ifdef EGL_MESA_image_dma_buf_export
typedef EGLBoolean (*ExportDMABUFImageQueryMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img, EGLint *fourcc, EGLint *nplanes, EGLuint64MESA *modifiers); typedef EGLBoolean (*ExportDMABUFImageQueryMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img, EGLint *fourcc, EGLint *nplanes, EGLuint64KHR *modifiers);
typedef EGLBoolean (*ExportDMABUFImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img, EGLint *fds, EGLint *strides, EGLint *offsets); typedef EGLBoolean (*ExportDMABUFImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img, EGLint *fds, EGLint *strides, EGLint *offsets);
#endif #endif