2011-07-02 09:57:30 +01:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* Copyright 2008 VMware, Inc.
|
2011-07-02 09:57:30 +01:00
|
|
|
* Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
|
|
|
|
* Copyright 2010-2011 LunarG, Inc.
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sub license, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
* next paragraph) shall be included in all copies or substantial portions
|
|
|
|
* of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
* DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
2005-11-24 04:02:16 +00:00
|
|
|
#ifndef EGLAPI_INCLUDED
|
|
|
|
#define EGLAPI_INCLUDED
|
|
|
|
|
2018-05-16 14:17:30 +01:00
|
|
|
#include "egltypedefs.h"
|
2015-05-13 23:13:37 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-11-24 04:02:16 +00:00
|
|
|
/**
|
2008-05-30 21:50:33 +01:00
|
|
|
* A generic function ptr type
|
2005-11-24 04:02:16 +00:00
|
|
|
*/
|
2010-01-29 01:00:30 +00:00
|
|
|
typedef void (*_EGLProc)(void);
|
2005-11-24 04:02:16 +00:00
|
|
|
|
2011-02-21 15:22:34 +00:00
|
|
|
struct wl_display;
|
2016-05-30 10:56:33 +01:00
|
|
|
struct mesa_glinterop_device_info;
|
|
|
|
struct mesa_glinterop_export_in;
|
|
|
|
struct mesa_glinterop_export_out;
|
2014-03-03 03:57:16 +00:00
|
|
|
|
2005-11-24 04:02:16 +00:00
|
|
|
/**
|
|
|
|
* The API dispatcher jumps through these functions
|
|
|
|
*/
|
|
|
|
struct _egl_api
|
|
|
|
{
|
2016-03-03 13:21:49 +00:00
|
|
|
/* driver funcs */
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*Initialize)(_EGLDriver *, _EGLDisplay *disp);
|
|
|
|
EGLBoolean (*Terminate)(_EGLDriver *, _EGLDisplay *disp);
|
|
|
|
const char *(*QueryDriverName)(_EGLDisplay *disp);
|
|
|
|
char *(*QueryDriverConfig)(_EGLDisplay *disp);
|
2016-03-03 13:21:49 +00:00
|
|
|
|
|
|
|
/* context funcs */
|
2019-02-02 11:38:45 +00:00
|
|
|
_EGLContext *(*CreateContext)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLConfig *config, _EGLContext *share_list,
|
|
|
|
const EGLint *attrib_list);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*DestroyContext)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLContext *ctx);
|
|
|
|
/* this is the only function (other than Initialize) that may be called
|
|
|
|
* with an uninitialized display
|
|
|
|
*/
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*MakeCurrent)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *draw, _EGLSurface *read,
|
|
|
|
_EGLContext *ctx);
|
|
|
|
|
|
|
|
/* surface funcs */
|
2019-02-02 11:38:45 +00:00
|
|
|
_EGLSurface *(*CreateWindowSurface)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLConfig *config, void *native_window,
|
|
|
|
const EGLint *attrib_list);
|
2019-02-02 11:38:45 +00:00
|
|
|
_EGLSurface *(*CreatePixmapSurface)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLConfig *config, void *native_pixmap,
|
|
|
|
const EGLint *attrib_list);
|
2019-02-02 11:38:45 +00:00
|
|
|
_EGLSurface *(*CreatePbufferSurface)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLConfig *config,
|
|
|
|
const EGLint *attrib_list);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*DestroySurface)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *surface);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*QuerySurface)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *surface, EGLint attribute,
|
|
|
|
EGLint *value);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*BindTexImage)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *surface, EGLint buffer);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*ReleaseTexImage)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *surface, EGLint buffer);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*SwapInterval)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *surf, EGLint interval);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*SwapBuffers)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *draw);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*CopyBuffers)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *surface, void *native_pixmap_target);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*SetDamageRegion)(_EGLDriver *drv, _EGLDisplay *disp,
|
2017-06-09 15:43:34 +01:00
|
|
|
_EGLSurface *surface, EGLint *rects, EGLint n_rects);
|
2016-03-03 13:21:49 +00:00
|
|
|
|
|
|
|
/* misc functions */
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*WaitClient)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLContext *ctx);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*WaitNative)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
EGLint engine);
|
|
|
|
|
|
|
|
/* this function may be called from multiple threads at the same time */
|
|
|
|
_EGLProc (*GetProcAddress)(_EGLDriver *drv, const char *procname);
|
|
|
|
|
2019-02-02 11:38:45 +00:00
|
|
|
_EGLImage *(*CreateImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLContext *ctx, EGLenum target,
|
|
|
|
EGLClientBuffer buffer,
|
|
|
|
const EGLint *attr_list);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*DestroyImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLImage *image);
|
|
|
|
|
2019-02-02 11:38:45 +00:00
|
|
|
_EGLSync *(*CreateSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp, EGLenum type,
|
egl: Unify the EGLint/EGLAttrib paths in eglCreateSync* (v3)
Pre-patch, there were two code paths for parsing EGLSync attribute
lists: one path for old-style EGLint lists, used by eglCreateSyncKHR,
and another for new-style EGLAttrib lists, used by eglCreateSync (1.5)
and eglCreateSync64 (EGL_KHR_cl_event2).
There were two attrib_list parsing functions,
_eglParseSyncAttribList(_EGLSync *sync, const EGLint *attrib_list)
_eglParseSyncAttribList64(_EGLSync *sync, const EGLattrib *attrib_list)
This patch unifies the two attrib_list parsing functions into one,
_eglParseSyncAttribList(_EGLSync *sync, const EGLattrib *attrib_list)
Many internal EGLSync function signatures had *two* attrib_list
parameters to accomodate both code paths: one parameter was an EGLint
list and other an EGLAttrib list. At most one of the parameters was
allowed to be non-null. This patch removes the `EGLint *attrib_list`
parameter, leaving only the `EGLAttrib *attrib_list` parameter, for all
internal EGLSync functions.
v2:
- Consistently use condition (sizeof(int_list[0]) ==
sizeof(attrib_list[0])). [for emil]
v3:
- Don't double-unlock the display in eglCreateSyncKHR.
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (v2)
2016-09-27 21:27:21 +01:00
|
|
|
const EGLAttrib *attrib_list);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*DestroySyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSync *sync);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLint (*ClientWaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSync *sync, EGLint flags, EGLTime timeout);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLint (*WaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync);
|
|
|
|
EGLBoolean (*SignalSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSync *sync, EGLenum mode);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLint (*DupNativeFenceFDANDROID)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-11-18 13:39:33 +00:00
|
|
|
_EGLSync *sync);
|
2016-03-03 13:21:49 +00:00
|
|
|
|
|
|
|
EGLBoolean (*SwapBuffersRegionNOK)(_EGLDriver *drv, _EGLDisplay *disp,
|
|
|
|
_EGLSurface *surf, EGLint numRects,
|
|
|
|
const EGLint *rects);
|
|
|
|
|
|
|
|
_EGLImage *(*CreateDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
|
|
|
|
const EGLint *attr_list);
|
|
|
|
EGLBoolean (*ExportDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
|
|
|
|
_EGLImage *img, EGLint *name,
|
|
|
|
EGLint *handle, EGLint *stride);
|
|
|
|
|
|
|
|
EGLBoolean (*BindWaylandDisplayWL)(_EGLDriver *drv, _EGLDisplay *disp,
|
|
|
|
struct wl_display *display);
|
|
|
|
EGLBoolean (*UnbindWaylandDisplayWL)(_EGLDriver *drv, _EGLDisplay *disp,
|
|
|
|
struct wl_display *display);
|
|
|
|
EGLBoolean (*QueryWaylandBufferWL)(_EGLDriver *drv, _EGLDisplay *displ,
|
|
|
|
struct wl_resource *buffer,
|
|
|
|
EGLint attribute, EGLint *value);
|
|
|
|
|
|
|
|
struct wl_buffer *(*CreateWaylandBufferFromImageWL)(_EGLDriver *drv,
|
|
|
|
_EGLDisplay *disp,
|
|
|
|
_EGLImage *img);
|
|
|
|
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*SwapBuffersWithDamageEXT)(_EGLDriver *drv, _EGLDisplay *disp,
|
2016-03-03 13:21:49 +00:00
|
|
|
_EGLSurface *surface,
|
|
|
|
const EGLint *rects, EGLint n_rects);
|
|
|
|
|
|
|
|
EGLBoolean (*PostSubBufferNV)(_EGLDriver *drv, _EGLDisplay *disp,
|
|
|
|
_EGLSurface *surface, EGLint x, EGLint y,
|
|
|
|
EGLint width, EGLint height);
|
|
|
|
|
|
|
|
EGLint (*QueryBufferAge)(_EGLDriver *drv,
|
2019-02-02 11:38:45 +00:00
|
|
|
_EGLDisplay *disp, _EGLSurface *surface);
|
|
|
|
EGLBoolean (*GetSyncValuesCHROMIUM)(_EGLDisplay *disp, _EGLSurface *surface,
|
2016-03-03 13:21:49 +00:00
|
|
|
EGLuint64KHR *ust, EGLuint64KHR *msc,
|
|
|
|
EGLuint64KHR *sbc);
|
|
|
|
|
|
|
|
EGLBoolean (*ExportDMABUFImageQueryMESA)(_EGLDriver *drv, _EGLDisplay *disp,
|
|
|
|
_EGLImage *img, EGLint *fourcc,
|
|
|
|
EGLint *nplanes,
|
|
|
|
EGLuint64KHR *modifiers);
|
|
|
|
EGLBoolean (*ExportDMABUFImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
|
|
|
|
_EGLImage *img, EGLint *fds,
|
|
|
|
EGLint *strides, EGLint *offsets);
|
2016-03-03 14:59:48 +00:00
|
|
|
|
2019-02-02 11:38:45 +00:00
|
|
|
int (*GLInteropQueryDeviceInfo)(_EGLDisplay *disp, _EGLContext *ctx,
|
2016-05-30 10:56:33 +01:00
|
|
|
struct mesa_glinterop_device_info *out);
|
2019-02-02 11:38:45 +00:00
|
|
|
int (*GLInteropExportObject)(_EGLDisplay *disp, _EGLContext *ctx,
|
2016-05-30 10:56:33 +01:00
|
|
|
struct mesa_glinterop_export_in *in,
|
|
|
|
struct mesa_glinterop_export_out *out);
|
2017-05-30 12:53:38 +01:00
|
|
|
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*QueryDmaBufFormatsEXT)(_EGLDriver *drv, _EGLDisplay *disp,
|
2017-05-30 12:53:38 +01:00
|
|
|
EGLint max_formats, EGLint *formats,
|
|
|
|
EGLint *num_formats);
|
2019-02-02 11:38:45 +00:00
|
|
|
EGLBoolean (*QueryDmaBufModifiersEXT) (_EGLDriver *drv, _EGLDisplay *disp,
|
2017-05-30 12:53:39 +01:00
|
|
|
EGLint format, EGLint max_modifiers,
|
|
|
|
EGLuint64KHR *modifiers,
|
|
|
|
EGLBoolean *external_only,
|
|
|
|
EGLint *num_modifiers);
|
2017-12-28 08:51:11 +00:00
|
|
|
|
2019-02-02 11:38:45 +00:00
|
|
|
void (*SetBlobCacheFuncsANDROID) (_EGLDriver *drv, _EGLDisplay *disp,
|
2017-12-28 08:51:11 +00:00
|
|
|
EGLSetBlobFuncANDROID set,
|
|
|
|
EGLGetBlobFuncANDROID get);
|
2005-11-24 04:02:16 +00:00
|
|
|
};
|
|
|
|
|
2015-05-13 23:13:37 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-11-24 04:02:16 +00:00
|
|
|
#endif /* EGLAPI_INCLUDED */
|