summaryrefslogtreecommitdiff
path: root/lib/mesa/src/egl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/egl')
-rw-r--r--lib/mesa/src/egl/Makefile.am118
-rw-r--r--lib/mesa/src/egl/Makefile.in368
-rw-r--r--lib/mesa/src/egl/drivers/dri2/egl_dri2.c100
-rw-r--r--lib/mesa/src/egl/drivers/dri2/egl_dri2.h97
-rw-r--r--lib/mesa/src/egl/drivers/dri2/egl_dri2_fallbacks.h3
-rw-r--r--lib/mesa/src/egl/drivers/dri2/platform_drm.c168
-rw-r--r--lib/mesa/src/egl/drivers/dri2/platform_surfaceless.c248
-rw-r--r--lib/mesa/src/egl/drivers/dri2/platform_wayland.c246
-rw-r--r--lib/mesa/src/egl/drivers/dri2/platform_x11.c203
-rw-r--r--lib/mesa/src/egl/drivers/dri2/platform_x11_dri3.c100
-rwxr-xr-xlib/mesa/src/egl/egl-entrypoint-check11
-rwxr-xr-xlib/mesa/src/egl/egl-symbols-check2
-rw-r--r--lib/mesa/src/egl/g_egldispatchstubs.c400
-rw-r--r--lib/mesa/src/egl/g_egldispatchstubs.h89
-rw-r--r--lib/mesa/src/egl/generate/egl.xml2412
-rw-r--r--lib/mesa/src/egl/generate/eglFunctionList.py199
-rw-r--r--lib/mesa/src/egl/generate/egl_other.xml47
-rw-r--r--lib/mesa/src/egl/generate/genCommon.py223
-rw-r--r--lib/mesa/src/egl/generate/gen_egl_dispatch.py250
-rw-r--r--lib/mesa/src/egl/main/50_mesa.json6
-rw-r--r--lib/mesa/src/egl/main/eglapi.c783
-rw-r--r--lib/mesa/src/egl/main/eglapi.h290
-rw-r--r--lib/mesa/src/egl/main/eglconfig.c20
-rw-r--r--lib/mesa/src/egl/main/eglcontext.c94
-rw-r--r--lib/mesa/src/egl/main/egldispatchstubs.c110
-rw-r--r--lib/mesa/src/egl/main/egldispatchstubs.h26
-rw-r--r--lib/mesa/src/egl/main/egldisplay.c72
-rw-r--r--lib/mesa/src/egl/main/egldisplay.h15
-rw-r--r--lib/mesa/src/egl/main/eglentrypoint.h77
-rw-r--r--lib/mesa/src/egl/main/eglfallbacks.c30
-rw-r--r--lib/mesa/src/egl/main/eglglobals.c17
-rw-r--r--lib/mesa/src/egl/main/eglglobals.h15
-rw-r--r--lib/mesa/src/egl/main/eglglvnd.c82
-rw-r--r--lib/mesa/src/egl/main/eglsurface.c33
-rw-r--r--lib/mesa/src/egl/main/eglsync.c65
-rw-r--r--lib/mesa/src/egl/main/eglsync.h2
-rw-r--r--lib/mesa/src/egl/wayland/wayland-drm/Makefile.in30
-rw-r--r--lib/mesa/src/egl/wayland/wayland-egl/Makefile.in30
-rw-r--r--lib/mesa/src/egl/wayland/wayland-egl/wayland-egl-priv.h9
39 files changed, 1988 insertions, 5102 deletions
diff --git a/lib/mesa/src/egl/Makefile.am b/lib/mesa/src/egl/Makefile.am
index c9688fcfb..0b3b5c139 100644
--- a/lib/mesa/src/egl/Makefile.am
+++ b/lib/mesa/src/egl/Makefile.am
@@ -32,23 +32,27 @@ AM_CFLAGS = \
$(EGL_CFLAGS) \
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM)
-# Depending on whether libglvnd is enabled, we'll build the EGL library as
-# either libEGL.so.1 or libEGL_mesa.so.0. Using an automake substitution
-# in the variable names breaks "make dist" target, so use a conenience library
-# instead.
-noinst_LTLIBRARIES = libEGL_common.la
-libEGL_common_la_SOURCES = \
+lib_LTLIBRARIES = libEGL.la
+
+libEGL_la_SOURCES = \
$(LIBEGL_C_FILES)
-libEGL_common_la_LIBADD = \
+libEGL_la_LIBADD = \
$(EGL_LIB_DEPS)
+libEGL_la_LDFLAGS = \
+ -no-undefined \
+ -version-number 1:0 \
+ $(BSYMBOLIC) \
+ $(GC_SECTIONS) \
+ $(LD_NO_UNDEFINED)
dri2_backend_FILES =
dri3_backend_FILES =
if HAVE_PLATFORM_X11
+AM_CFLAGS += -DHAVE_X11_PLATFORM
AM_CFLAGS += $(XCB_DRI2_CFLAGS)
-libEGL_common_la_LIBADD += $(XCB_DRI2_LIBS)
+libEGL_la_LIBADD += $(XCB_DRI2_LIBS)
dri2_backend_FILES += drivers/dri2/platform_x11.c
if HAVE_DRI3
@@ -56,33 +60,36 @@ dri3_backend_FILES += \
drivers/dri2/platform_x11_dri3.c \
drivers/dri2/platform_x11_dri3.h
-libEGL_common_la_LIBADD += $(top_builddir)/src/loader/libloader_dri3_helper.la
+libEGL_la_LIBADD += $(top_builddir)/src/loader/libloader_dri3_helper.la
endif
endif
if HAVE_PLATFORM_WAYLAND
+AM_CFLAGS += -DHAVE_WAYLAND_PLATFORM
AM_CFLAGS += $(WAYLAND_CFLAGS)
-libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
-libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
-libEGL_common_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
+libEGL_la_LIBADD += $(WAYLAND_LIBS)
+libEGL_la_LIBADD += $(LIBDRM_LIBS)
+libEGL_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
dri2_backend_FILES += drivers/dri2/platform_wayland.c
endif
-if HAVE_PLATFORM_DRM
-libEGL_common_la_LIBADD += $(top_builddir)/src/gbm/libgbm.la
+if HAVE_EGL_PLATFORM_DRM
+AM_CFLAGS += -DHAVE_DRM_PLATFORM
+libEGL_la_LIBADD += $(top_builddir)/src/gbm/libgbm.la
dri2_backend_FILES += drivers/dri2/platform_drm.c
endif
-if HAVE_PLATFORM_SURFACELESS
+if HAVE_EGL_PLATFORM_SURFACELESS
+AM_CFLAGS += -DHAVE_SURFACELESS_PLATFORM
dri2_backend_FILES += drivers/dri2/platform_surfaceless.c
endif
-if HAVE_PLATFORM_ANDROID
-AM_CFLAGS += $(ANDROID_CFLAGS)
-libEGL_common_la_LIBADD += $(ANDROID_LIBS)
+if HAVE_EGL_PLATFORM_ANDROID
+AM_CFLAGS += -DHAVE_ANDROID_PLATFORM
dri2_backend_FILES += drivers/dri2/platform_android.c
endif
+if HAVE_EGL_DRIVER_DRI2
AM_CFLAGS += \
-I$(top_srcdir)/src/loader \
-I$(top_srcdir)/src/egl/drivers/dri2 \
@@ -93,78 +100,24 @@ AM_CFLAGS += \
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
-D_EGL_BUILT_IN_DRIVER_DRI2
-libEGL_common_la_SOURCES += \
+libEGL_la_SOURCES += \
$(dri2_backend_core_FILES) \
$(dri2_backend_FILES) \
$(dri3_backend_FILES)
-libEGL_common_la_LIBADD += $(top_builddir)/src/loader/libloader.la
-libEGL_common_la_LIBADD += $(DLOPEN_LIBS) $(LIBDRM_LIBS) $(CLOCK_LIB)
-
-GLVND_GEN_DEPS = generate/gen_egl_dispatch.py \
- generate/egl.xml generate/eglFunctionList.py generate/genCommon.py \
- generate/egl_other.xml
-
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
-if REGEN_SOURCES
-g_egldispatchstubs.c: $(GLVND_GEN_DEPS)
- $(PYTHON_GEN) $(top_srcdir)/src/egl/generate/gen_egl_dispatch.py source \
- $(top_srcdir)/src/egl/generate/eglFunctionList.py \
- $(top_srcdir)/src/egl/generate/egl.xml \
- $(top_srcdir)/src/egl/generate/egl_other.xml > $@
-
-g_egldispatchstubs.h: $(GLVND_GEN_DEPS)
- $(PYTHON_GEN) $(top_srcdir)/src/egl/generate/gen_egl_dispatch.py header \
- $(top_srcdir)/src/egl/generate/eglFunctionList.py \
- $(top_srcdir)/src/egl/generate/egl.xml \
- $(top_srcdir)/src/egl/generate/egl_other.xml > $@
+libEGL_la_LIBADD += $(top_builddir)/src/loader/libloader.la
+libEGL_la_LIBADD += $(DLOPEN_LIBS) $(LIBDRM_LIBS) $(CLOCK_LIB)
endif
-BUILT_SOURCES = g_egldispatchstubs.c g_egldispatchstubs.h
-CLEANFILES = $(BUILT_SOURCES)
-
-if USE_LIBGLVND
-AM_CFLAGS += \
- $(GLVND_CFLAGS)
-
-vendorjsondir = @LIBGLVND_DATADIR@/glvnd/egl_vendor.d
-vendorjson_DATA = main/50_mesa.json
-
-lib_LTLIBRARIES = libEGL_mesa.la
-libEGL_mesa_la_SOURCES = \
- main/eglglvnd.c \
- main/egldispatchstubs.h \
- main/egldispatchstubs.c \
- g_egldispatchstubs.c \
- g_egldispatchstubs.h
-libEGL_mesa_la_LIBADD = libEGL_common.la
-libEGL_mesa_la_LDFLAGS = \
- -no-undefined \
- -version-number 0 \
- $(BSYMBOLIC) \
- $(GC_SECTIONS) \
- $(LD_NO_UNDEFINED)
-
-else # USE_LIBGLVND
-
-lib_LTLIBRARIES = libEGL.la
-libEGL_la_SOURCES =
-libEGL_la_LIBADD = libEGL_common.la
-libEGL_la_LDFLAGS = \
- -no-undefined \
- -version-number 1:0 \
- $(BSYMBOLIC) \
- $(GC_SECTIONS) \
- $(LD_NO_UNDEFINED)
-
-endif # USE_LIBGLVND
-
include $(top_srcdir)/install-lib-links.mk
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = main/egl.pc
+khrdir = $(includedir)/KHR
+khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
+
egldir = $(includedir)/EGL
egl_HEADERS = \
$(top_srcdir)/include/EGL/eglext.h \
@@ -173,14 +126,11 @@ egl_HEADERS = \
$(top_srcdir)/include/EGL/eglmesaext.h \
$(top_srcdir)/include/EGL/eglplatform.h
-TESTS = egl-symbols-check \
- egl-entrypoint-check
+TESTS = egl-symbols-check
EXTRA_DIST = \
- $(TESTS) \
+ egl-symbols-check \
SConscript \
drivers/haiku \
main/egl.def \
- main/README.txt \
- $(GLVND_GEN_DEPS) \
- main/50_mesa.json
+ main/README.txt
diff --git a/lib/mesa/src/egl/Makefile.in b/lib/mesa/src/egl/Makefile.in
index 0d0162bfc..cc2ead011 100644
--- a/lib/mesa/src/egl/Makefile.in
+++ b/lib/mesa/src/egl/Makefile.in
@@ -77,10 +77,11 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-DIST_COMMON = $(egl_HEADERS) $(srcdir)/Makefile.am \
+DIST_COMMON = $(egl_HEADERS) $(khr_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/Makefile.sources \
$(top_srcdir)/bin/depcomp $(top_srcdir)/install-lib-links.mk
-@HAVE_PLATFORM_X11_TRUE@am__append_1 = $(XCB_DRI2_CFLAGS)
+@HAVE_PLATFORM_X11_TRUE@am__append_1 = -DHAVE_X11_PLATFORM \
+@HAVE_PLATFORM_X11_TRUE@ $(XCB_DRI2_CFLAGS)
@HAVE_PLATFORM_X11_TRUE@am__append_2 = $(XCB_DRI2_LIBS)
@HAVE_PLATFORM_X11_TRUE@am__append_3 = drivers/dri2/platform_x11.c
@HAVE_DRI3_TRUE@@HAVE_PLATFORM_X11_TRUE@am__append_4 = \
@@ -88,20 +89,37 @@ DIST_COMMON = $(egl_HEADERS) $(srcdir)/Makefile.am \
@HAVE_DRI3_TRUE@@HAVE_PLATFORM_X11_TRUE@ drivers/dri2/platform_x11_dri3.h
@HAVE_DRI3_TRUE@@HAVE_PLATFORM_X11_TRUE@am__append_5 = $(top_builddir)/src/loader/libloader_dri3_helper.la
-@HAVE_PLATFORM_WAYLAND_TRUE@am__append_6 = $(WAYLAND_CFLAGS)
+@HAVE_PLATFORM_WAYLAND_TRUE@am__append_6 = -DHAVE_WAYLAND_PLATFORM \
+@HAVE_PLATFORM_WAYLAND_TRUE@ $(WAYLAND_CFLAGS)
@HAVE_PLATFORM_WAYLAND_TRUE@am__append_7 = $(WAYLAND_LIBS) \
@HAVE_PLATFORM_WAYLAND_TRUE@ $(LIBDRM_LIBS) \
@HAVE_PLATFORM_WAYLAND_TRUE@ $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
@HAVE_PLATFORM_WAYLAND_TRUE@am__append_8 = drivers/dri2/platform_wayland.c
-@HAVE_PLATFORM_DRM_TRUE@am__append_9 = $(top_builddir)/src/gbm/libgbm.la
-@HAVE_PLATFORM_DRM_TRUE@am__append_10 = drivers/dri2/platform_drm.c
-@HAVE_PLATFORM_SURFACELESS_TRUE@am__append_11 = drivers/dri2/platform_surfaceless.c
-@HAVE_PLATFORM_ANDROID_TRUE@am__append_12 = $(ANDROID_CFLAGS)
-@HAVE_PLATFORM_ANDROID_TRUE@am__append_13 = $(ANDROID_LIBS)
-@HAVE_PLATFORM_ANDROID_TRUE@am__append_14 = drivers/dri2/platform_android.c
-@USE_LIBGLVND_TRUE@am__append_15 = \
-@USE_LIBGLVND_TRUE@ $(GLVND_CFLAGS)
-
+@HAVE_EGL_PLATFORM_DRM_TRUE@am__append_9 = -DHAVE_DRM_PLATFORM
+@HAVE_EGL_PLATFORM_DRM_TRUE@am__append_10 = $(top_builddir)/src/gbm/libgbm.la
+@HAVE_EGL_PLATFORM_DRM_TRUE@am__append_11 = drivers/dri2/platform_drm.c
+@HAVE_EGL_PLATFORM_SURFACELESS_TRUE@am__append_12 = -DHAVE_SURFACELESS_PLATFORM
+@HAVE_EGL_PLATFORM_SURFACELESS_TRUE@am__append_13 = drivers/dri2/platform_surfaceless.c
+@HAVE_EGL_PLATFORM_ANDROID_TRUE@am__append_14 = -DHAVE_ANDROID_PLATFORM
+@HAVE_EGL_PLATFORM_ANDROID_TRUE@am__append_15 = drivers/dri2/platform_android.c
+@HAVE_EGL_DRIVER_DRI2_TRUE@am__append_16 = \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ -I$(top_srcdir)/src/loader \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ -I$(top_srcdir)/src/egl/drivers/dri2 \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ -I$(top_srcdir)/src/gbm/backends/dri \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ -I$(top_srcdir)/src/egl/wayland/wayland-egl \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ -I$(top_builddir)/src/egl/wayland/wayland-drm \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ -I$(top_srcdir)/src/egl/wayland/wayland-drm \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ -D_EGL_BUILT_IN_DRIVER_DRI2
+
+@HAVE_EGL_DRIVER_DRI2_TRUE@am__append_17 = \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(dri2_backend_core_FILES) \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(dri2_backend_FILES) \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(dri3_backend_FILES)
+
+@HAVE_EGL_DRIVER_DRI2_TRUE@am__append_18 = $(top_builddir)/src/loader/libloader.la \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(DLOPEN_LIBS) $(LIBDRM_LIBS) \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(CLOCK_LIB)
subdir = src/egl
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \
@@ -147,33 +165,22 @@ am__uninstall_files_from_dir = { \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
- "$(DESTDIR)$(vendorjsondir)" "$(DESTDIR)$(egldir)"
-LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
-@USE_LIBGLVND_FALSE@libEGL_la_DEPENDENCIES = libEGL_common.la
-am_libEGL_la_OBJECTS =
-libEGL_la_OBJECTS = $(am_libEGL_la_OBJECTS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 =
-libEGL_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(libEGL_la_LDFLAGS) $(LDFLAGS) -o $@
-@USE_LIBGLVND_FALSE@am_libEGL_la_rpath = -rpath $(libdir)
+ "$(DESTDIR)$(egldir)" "$(DESTDIR)$(khrdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
@HAVE_PLATFORM_X11_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
@HAVE_PLATFORM_WAYLAND_TRUE@am__DEPENDENCIES_3 = \
@HAVE_PLATFORM_WAYLAND_TRUE@ $(am__DEPENDENCIES_1) \
@HAVE_PLATFORM_WAYLAND_TRUE@ $(am__DEPENDENCIES_1) \
@HAVE_PLATFORM_WAYLAND_TRUE@ $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
-@HAVE_PLATFORM_ANDROID_TRUE@am__DEPENDENCIES_4 = \
-@HAVE_PLATFORM_ANDROID_TRUE@ $(am__DEPENDENCIES_1)
-libEGL_common_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_2) $(am__append_5) $(am__DEPENDENCIES_3) \
- $(am__append_9) $(am__DEPENDENCIES_4) \
- $(top_builddir)/src/loader/libloader.la $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am__libEGL_common_la_SOURCES_DIST = main/eglapi.c main/eglapi.h \
+@HAVE_EGL_DRIVER_DRI2_TRUE@am__DEPENDENCIES_4 = $(top_builddir)/src/loader/libloader.la \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(am__DEPENDENCIES_1) \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(am__DEPENDENCIES_1) \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(am__DEPENDENCIES_1)
+libEGL_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
+ $(am__append_5) $(am__DEPENDENCIES_3) $(am__append_10) \
+ $(am__DEPENDENCIES_4)
+am__libEGL_la_SOURCES_DIST = main/eglapi.c main/eglapi.h \
main/eglarray.c main/eglarray.h main/eglcompiler.h \
main/eglconfig.c main/eglconfig.h main/eglcontext.c \
main/eglcontext.h main/eglcurrent.c main/eglcurrent.h \
@@ -182,10 +189,10 @@ am__libEGL_common_la_SOURCES_DIST = main/eglapi.c main/eglapi.h \
main/eglglobals.c main/eglglobals.h main/eglimage.c \
main/eglimage.h main/egllog.c main/egllog.h main/eglsurface.c \
main/eglsurface.h main/eglsync.c main/eglsync.h \
- main/eglentrypoint.h main/egltypedefs.h \
- drivers/dri2/egl_dri2.c drivers/dri2/egl_dri2.h \
- drivers/dri2/egl_dri2_fallbacks.h drivers/dri2/platform_x11.c \
- drivers/dri2/platform_wayland.c drivers/dri2/platform_drm.c \
+ main/egltypedefs.h drivers/dri2/egl_dri2.c \
+ drivers/dri2/egl_dri2.h drivers/dri2/egl_dri2_fallbacks.h \
+ drivers/dri2/platform_x11.c drivers/dri2/platform_wayland.c \
+ drivers/dri2/platform_drm.c \
drivers/dri2/platform_surfaceless.c \
drivers/dri2/platform_android.c \
drivers/dri2/platform_x11_dri3.c \
@@ -200,30 +207,25 @@ am__objects_2 = drivers/dri2/egl_dri2.lo
@HAVE_PLATFORM_X11_TRUE@am__objects_3 = drivers/dri2/platform_x11.lo
@HAVE_PLATFORM_WAYLAND_TRUE@am__objects_4 = \
@HAVE_PLATFORM_WAYLAND_TRUE@ drivers/dri2/platform_wayland.lo
-@HAVE_PLATFORM_DRM_TRUE@am__objects_5 = drivers/dri2/platform_drm.lo
-@HAVE_PLATFORM_SURFACELESS_TRUE@am__objects_6 = drivers/dri2/platform_surfaceless.lo
-@HAVE_PLATFORM_ANDROID_TRUE@am__objects_7 = \
-@HAVE_PLATFORM_ANDROID_TRUE@ drivers/dri2/platform_android.lo
+@HAVE_EGL_PLATFORM_DRM_TRUE@am__objects_5 = \
+@HAVE_EGL_PLATFORM_DRM_TRUE@ drivers/dri2/platform_drm.lo
+@HAVE_EGL_PLATFORM_SURFACELESS_TRUE@am__objects_6 = drivers/dri2/platform_surfaceless.lo
+@HAVE_EGL_PLATFORM_ANDROID_TRUE@am__objects_7 = drivers/dri2/platform_android.lo
am__objects_8 = $(am__objects_3) $(am__objects_4) $(am__objects_5) \
$(am__objects_6) $(am__objects_7)
@HAVE_DRI3_TRUE@@HAVE_PLATFORM_X11_TRUE@am__objects_9 = drivers/dri2/platform_x11_dri3.lo
am__objects_10 = $(am__objects_9)
-am_libEGL_common_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
- $(am__objects_8) $(am__objects_10)
-libEGL_common_la_OBJECTS = $(am_libEGL_common_la_OBJECTS)
-@USE_LIBGLVND_TRUE@libEGL_mesa_la_DEPENDENCIES = libEGL_common.la
-am__libEGL_mesa_la_SOURCES_DIST = main/eglglvnd.c \
- main/egldispatchstubs.h main/egldispatchstubs.c \
- g_egldispatchstubs.c g_egldispatchstubs.h
-@USE_LIBGLVND_TRUE@am_libEGL_mesa_la_OBJECTS = main/eglglvnd.lo \
-@USE_LIBGLVND_TRUE@ main/egldispatchstubs.lo \
-@USE_LIBGLVND_TRUE@ g_egldispatchstubs.lo
-libEGL_mesa_la_OBJECTS = $(am_libEGL_mesa_la_OBJECTS)
-libEGL_mesa_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(libEGL_mesa_la_LDFLAGS) $(LDFLAGS) -o \
- $@
-@USE_LIBGLVND_TRUE@am_libEGL_mesa_la_rpath = -rpath $(libdir)
+@HAVE_EGL_DRIVER_DRI2_TRUE@am__objects_11 = $(am__objects_2) \
+@HAVE_EGL_DRIVER_DRI2_TRUE@ $(am__objects_8) $(am__objects_10)
+am_libEGL_la_OBJECTS = $(am__objects_1) $(am__objects_11)
+libEGL_la_OBJECTS = $(am_libEGL_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libEGL_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libEGL_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -258,18 +260,15 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(libEGL_la_SOURCES) $(libEGL_common_la_SOURCES) \
- $(libEGL_mesa_la_SOURCES)
-DIST_SOURCES = $(libEGL_la_SOURCES) \
- $(am__libEGL_common_la_SOURCES_DIST) \
- $(am__libEGL_mesa_la_SOURCES_DIST)
+SOURCES = $(libEGL_la_SOURCES)
+DIST_SOURCES = $(am__libEGL_la_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-DATA = $(pkgconfig_DATA) $(vendorjson_DATA)
-HEADERS = $(egl_HEADERS)
+DATA = $(pkgconfig_DATA)
+HEADERS = $(egl_HEADERS) $(khr_HEADERS)
ETAGS = etags
CTAGS = ctags
am__tty_colors_dummy = \
@@ -282,8 +281,6 @@ AMDGPU_CFLAGS = @AMDGPU_CFLAGS@
AMDGPU_LIBS = @AMDGPU_LIBS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-ANDROID_CFLAGS = @ANDROID_CFLAGS@
-ANDROID_LIBS = @ANDROID_LIBS@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -314,6 +311,8 @@ DLLTOOL = @DLLTOOL@
DLOPEN_LIBS = @DLOPEN_LIBS@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
+DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
+DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
DRIGL_CFLAGS = @DRIGL_CFLAGS@
DRIGL_LIBS = @DRIGL_LIBS@
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
@@ -326,11 +325,10 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGL_CFLAGS = @EGL_CFLAGS@
+EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
EGL_LIB_DEPS = @EGL_LIB_DEPS@
EGL_NATIVE_PLATFORM = @EGL_NATIVE_PLATFORM@
EGREP = @EGREP@
-ETNAVIV_CFLAGS = @ETNAVIV_CFLAGS@
-ETNAVIV_LIBS = @ETNAVIV_LIBS@
EXEEXT = @EXEEXT@
EXPAT_CFLAGS = @EXPAT_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@
@@ -378,27 +376,31 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
LIBDRM_LIBS = @LIBDRM_LIBS@
LIBELF_CFLAGS = @LIBELF_CFLAGS@
LIBELF_LIBS = @LIBELF_LIBS@
-LIBGLVND_DATADIR = @LIBGLVND_DATADIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
-LIBSENSORS_LIBS = @LIBSENSORS_LIBS@
+LIBSENSORS_LDFLAGS = @LIBSENSORS_LDFLAGS@
+LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
+LIBSHA1_LIBS = @LIBSHA1_LIBS@
LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
LIB_DIR = @LIB_DIR@
LIB_EXT = @LIB_EXT@
LIPO = @LIPO@
+LLVM_BINDIR = @LLVM_BINDIR@
LLVM_CFLAGS = @LLVM_CFLAGS@
LLVM_CONFIG = @LLVM_CONFIG@
+LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
LLVM_CXXFLAGS = @LLVM_CXXFLAGS@
LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@
LLVM_LDFLAGS = @LLVM_LDFLAGS@
+LLVM_LIBDIR = @LLVM_LIBDIR@
LLVM_LIBS = @LLVM_LIBS@
+LLVM_VERSION = @LLVM_VERSION@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MESA_LLVM = @MESA_LLVM@
MKDIR_P = @MKDIR_P@
MSVC2013_COMPAT_CFLAGS = @MSVC2013_COMPAT_CFLAGS@
MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@
@@ -419,6 +421,8 @@ OMX_LIBS = @OMX_LIBS@
OMX_LIB_INSTALL_DIR = @OMX_LIB_INSTALL_DIR@
OPENCL_LIBNAME = @OPENCL_LIBNAME@
OPENCL_VERSION = @OPENCL_VERSION@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
OSMESA_LIB = @OSMESA_LIB@
OSMESA_LIB_DEPS = @OSMESA_LIB_DEPS@
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
@@ -438,6 +442,8 @@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSIX_SHELL = @POSIX_SHELL@
+PRESENTPROTO_CFLAGS = @PRESENTPROTO_CFLAGS@
+PRESENTPROTO_LIBS = @PRESENTPROTO_LIBS@
PTHREADSTUBS_CFLAGS = @PTHREADSTUBS_CFLAGS@
PTHREADSTUBS_LIBS = @PTHREADSTUBS_LIBS@
PTHREAD_CC = @PTHREAD_CC@
@@ -453,6 +459,8 @@ SED = @SED@
SELINUX_CFLAGS = @SELINUX_CFLAGS@
SELINUX_LIBS = @SELINUX_LIBS@
SET_MAKE = @SET_MAKE@
+SHA1_CFLAGS = @SHA1_CFLAGS@
+SHA1_LIBS = @SHA1_LIBS@
SHELL = @SHELL@
SIMPENROSE_CFLAGS = @SIMPENROSE_CFLAGS@
SIMPENROSE_LIBS = @SIMPENROSE_LIBS@
@@ -461,6 +469,7 @@ STRIP = @STRIP@
SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@
SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@
SWR_CXX11_CXXFLAGS = @SWR_CXX11_CXXFLAGS@
+TIMESTAMP_CMD = @TIMESTAMP_CMD@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VA_CFLAGS = @VA_CFLAGS@
@@ -476,6 +485,7 @@ VDPAU_LIB_INSTALL_DIR = @VDPAU_LIB_INSTALL_DIR@
VDPAU_MAJOR = @VDPAU_MAJOR@
VDPAU_MINOR = @VDPAU_MINOR@
VERSION = @VERSION@
+VG_LIB_DEPS = @VG_LIB_DEPS@
VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@
VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@
VL_CFLAGS = @VL_CFLAGS@
@@ -504,10 +514,9 @@ XVMC_LIBS = @XVMC_LIBS@
XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@
XVMC_MAJOR = @XVMC_MAJOR@
XVMC_MINOR = @XVMC_MINOR@
+XXD = @XXD@
YACC = @YACC@
YFLAGS = @YFLAGS@
-ZLIB_CFLAGS = @ZLIB_CFLAGS@
-ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -596,7 +605,6 @@ LIBEGL_C_FILES := \
main/eglsurface.h \
main/eglsync.c \
main/eglsync.h \
- main/eglentrypoint.h \
main/egltypedefs.h
dri2_backend_core_FILES := \
@@ -608,67 +616,26 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src/egl/main \
-I$(top_srcdir)/src/gbm/main -I$(top_srcdir)/src $(DEFINES) \
$(VISIBILITY_CFLAGS) $(LIBDRM_CFLAGS) $(EGL_CFLAGS) \
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) $(am__append_1) \
- $(am__append_6) $(am__append_12) -I$(top_srcdir)/src/loader \
- -I$(top_srcdir)/src/egl/drivers/dri2 \
- -I$(top_srcdir)/src/gbm/backends/dri \
- -I$(top_srcdir)/src/egl/wayland/wayland-egl \
- -I$(top_builddir)/src/egl/wayland/wayland-drm \
- -I$(top_srcdir)/src/egl/wayland/wayland-drm \
- -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
- -D_EGL_BUILT_IN_DRIVER_DRI2 $(am__append_15)
-
-# Depending on whether libglvnd is enabled, we'll build the EGL library as
-# either libEGL.so.1 or libEGL_mesa.so.0. Using an automake substitution
-# in the variable names breaks "make dist" target, so use a conenience library
-# instead.
-noinst_LTLIBRARIES = libEGL_common.la
-libEGL_common_la_SOURCES = $(LIBEGL_C_FILES) \
- $(dri2_backend_core_FILES) $(dri2_backend_FILES) \
- $(dri3_backend_FILES)
-libEGL_common_la_LIBADD = $(EGL_LIB_DEPS) $(am__append_2) \
- $(am__append_5) $(am__append_7) $(am__append_9) \
- $(am__append_13) $(top_builddir)/src/loader/libloader.la \
- $(DLOPEN_LIBS) $(LIBDRM_LIBS) $(CLOCK_LIB)
-dri2_backend_FILES = $(am__append_3) $(am__append_8) $(am__append_10) \
- $(am__append_11) $(am__append_14)
+ $(am__append_6) $(am__append_9) $(am__append_12) \
+ $(am__append_14) $(am__append_16)
+lib_LTLIBRARIES = libEGL.la
+libEGL_la_SOURCES = $(LIBEGL_C_FILES) $(am__append_17)
+libEGL_la_LIBADD = $(EGL_LIB_DEPS) $(am__append_2) $(am__append_5) \
+ $(am__append_7) $(am__append_10) $(am__append_18)
+libEGL_la_LDFLAGS = \
+ -no-undefined \
+ -version-number 1:0 \
+ $(BSYMBOLIC) \
+ $(GC_SECTIONS) \
+ $(LD_NO_UNDEFINED)
+
+dri2_backend_FILES = $(am__append_3) $(am__append_8) $(am__append_11) \
+ $(am__append_13) $(am__append_15)
dri3_backend_FILES = $(am__append_4)
-GLVND_GEN_DEPS = generate/gen_egl_dispatch.py \
- generate/egl.xml generate/eglFunctionList.py generate/genCommon.py \
- generate/egl_other.xml
-
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
-BUILT_SOURCES = g_egldispatchstubs.c g_egldispatchstubs.h
-CLEANFILES = $(BUILT_SOURCES)
-@USE_LIBGLVND_TRUE@vendorjsondir = @LIBGLVND_DATADIR@/glvnd/egl_vendor.d
-@USE_LIBGLVND_TRUE@vendorjson_DATA = main/50_mesa.json
-@USE_LIBGLVND_FALSE@lib_LTLIBRARIES = libEGL.la
-@USE_LIBGLVND_TRUE@lib_LTLIBRARIES = libEGL_mesa.la
-@USE_LIBGLVND_TRUE@libEGL_mesa_la_SOURCES = \
-@USE_LIBGLVND_TRUE@ main/eglglvnd.c \
-@USE_LIBGLVND_TRUE@ main/egldispatchstubs.h \
-@USE_LIBGLVND_TRUE@ main/egldispatchstubs.c \
-@USE_LIBGLVND_TRUE@ g_egldispatchstubs.c \
-@USE_LIBGLVND_TRUE@ g_egldispatchstubs.h
-
-@USE_LIBGLVND_TRUE@libEGL_mesa_la_LIBADD = libEGL_common.la
-@USE_LIBGLVND_TRUE@libEGL_mesa_la_LDFLAGS = \
-@USE_LIBGLVND_TRUE@ -no-undefined \
-@USE_LIBGLVND_TRUE@ -version-number 0 \
-@USE_LIBGLVND_TRUE@ $(BSYMBOLIC) \
-@USE_LIBGLVND_TRUE@ $(GC_SECTIONS) \
-@USE_LIBGLVND_TRUE@ $(LD_NO_UNDEFINED)
-
-@USE_LIBGLVND_FALSE@libEGL_la_SOURCES =
-@USE_LIBGLVND_FALSE@libEGL_la_LIBADD = libEGL_common.la
-@USE_LIBGLVND_FALSE@libEGL_la_LDFLAGS = \
-@USE_LIBGLVND_FALSE@ -no-undefined \
-@USE_LIBGLVND_FALSE@ -version-number 1:0 \
-@USE_LIBGLVND_FALSE@ $(BSYMBOLIC) \
-@USE_LIBGLVND_FALSE@ $(GC_SECTIONS) \
-@USE_LIBGLVND_FALSE@ $(LD_NO_UNDEFINED)
-
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = main/egl.pc
+khrdir = $(includedir)/KHR
+khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
egldir = $(includedir)/EGL
egl_HEADERS = \
$(top_srcdir)/include/EGL/eglext.h \
@@ -677,20 +644,15 @@ egl_HEADERS = \
$(top_srcdir)/include/EGL/eglmesaext.h \
$(top_srcdir)/include/EGL/eglplatform.h
-TESTS = egl-symbols-check \
- egl-entrypoint-check
-
+TESTS = egl-symbols-check
EXTRA_DIST = \
- $(TESTS) \
+ egl-symbols-check \
SConscript \
drivers/haiku \
main/egl.def \
- main/README.txt \
- $(GLVND_GEN_DEPS) \
- main/50_mesa.json
+ main/README.txt
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
+all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
@@ -759,19 +721,6 @@ clean-libLTLIBRARIES:
echo rm -f $${locs}; \
rm -f $${locs}; \
}
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; \
- locs=`for p in $$list; do echo $$p; done | \
- sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
- sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
-libEGL.la: $(libEGL_la_OBJECTS) $(libEGL_la_DEPENDENCIES) $(EXTRA_libEGL_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libEGL_la_LINK) $(am_libEGL_la_rpath) $(libEGL_la_OBJECTS) $(libEGL_la_LIBADD) $(LIBS)
main/$(am__dirstamp):
@$(MKDIR_P) main
@: > main/$(am__dirstamp)
@@ -817,13 +766,8 @@ drivers/dri2/platform_android.lo: drivers/dri2/$(am__dirstamp) \
drivers/dri2/$(DEPDIR)/$(am__dirstamp)
drivers/dri2/platform_x11_dri3.lo: drivers/dri2/$(am__dirstamp) \
drivers/dri2/$(DEPDIR)/$(am__dirstamp)
-libEGL_common.la: $(libEGL_common_la_OBJECTS) $(libEGL_common_la_DEPENDENCIES) $(EXTRA_libEGL_common_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libEGL_common_la_OBJECTS) $(libEGL_common_la_LIBADD) $(LIBS)
-main/eglglvnd.lo: main/$(am__dirstamp) main/$(DEPDIR)/$(am__dirstamp)
-main/egldispatchstubs.lo: main/$(am__dirstamp) \
- main/$(DEPDIR)/$(am__dirstamp)
-libEGL_mesa.la: $(libEGL_mesa_la_OBJECTS) $(libEGL_mesa_la_DEPENDENCIES) $(EXTRA_libEGL_mesa_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libEGL_mesa_la_LINK) $(am_libEGL_mesa_la_rpath) $(libEGL_mesa_la_OBJECTS) $(libEGL_mesa_la_LIBADD) $(LIBS)
+libEGL.la: $(libEGL_la_OBJECTS) $(libEGL_la_DEPENDENCIES) $(EXTRA_libEGL_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libEGL_la_LINK) -rpath $(libdir) $(libEGL_la_OBJECTS) $(libEGL_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -835,7 +779,6 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g_egldispatchstubs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@drivers/dri2/$(DEPDIR)/egl_dri2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@drivers/dri2/$(DEPDIR)/platform_android.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@drivers/dri2/$(DEPDIR)/platform_drm.Plo@am__quote@
@@ -848,12 +791,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/eglconfig.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/eglcontext.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/eglcurrent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/egldispatchstubs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/egldisplay.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/egldriver.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/eglfallbacks.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/eglglobals.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/eglglvnd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/eglimage.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/egllog.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@main/$(DEPDIR)/eglsurface.Plo@am__quote@
@@ -911,48 +852,48 @@ uninstall-pkgconfigDATA:
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
-install-vendorjsonDATA: $(vendorjson_DATA)
+install-eglHEADERS: $(egl_HEADERS)
@$(NORMAL_INSTALL)
- @list='$(vendorjson_DATA)'; test -n "$(vendorjsondir)" || list=; \
+ @list='$(egl_HEADERS)'; test -n "$(egldir)" || list=; \
if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(vendorjsondir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(vendorjsondir)" || exit 1; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(egldir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(egldir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vendorjsondir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(vendorjsondir)" || exit $$?; \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(egldir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(egldir)" || exit $$?; \
done
-uninstall-vendorjsonDATA:
+uninstall-eglHEADERS:
@$(NORMAL_UNINSTALL)
- @list='$(vendorjson_DATA)'; test -n "$(vendorjsondir)" || list=; \
+ @list='$(egl_HEADERS)'; test -n "$(egldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(vendorjsondir)'; $(am__uninstall_files_from_dir)
-install-eglHEADERS: $(egl_HEADERS)
+ dir='$(DESTDIR)$(egldir)'; $(am__uninstall_files_from_dir)
+install-khrHEADERS: $(khr_HEADERS)
@$(NORMAL_INSTALL)
- @list='$(egl_HEADERS)'; test -n "$(egldir)" || list=; \
+ @list='$(khr_HEADERS)'; test -n "$(khrdir)" || list=; \
if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(egldir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(egldir)" || exit 1; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(khrdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(khrdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
- echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(egldir)'"; \
- $(INSTALL_HEADER) $$files "$(DESTDIR)$(egldir)" || exit $$?; \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(khrdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(khrdir)" || exit $$?; \
done
-uninstall-eglHEADERS:
+uninstall-khrHEADERS:
@$(NORMAL_UNINSTALL)
- @list='$(egl_HEADERS)'; test -n "$(egldir)" || list=; \
+ @list='$(khr_HEADERS)'; test -n "$(khrdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(egldir)'; $(am__uninstall_files_from_dir)
+ dir='$(DESTDIR)$(khrdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -1145,17 +1086,15 @@ distdir: $(DISTFILES)
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
+check: check-am
@BUILD_SHARED_FALSE@all-local:
@HAVE_COMPAT_SYMLINKS_FALSE@all-local:
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) all-local
installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(vendorjsondir)" "$(DESTDIR)$(egldir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(egldir)" "$(DESTDIR)$(khrdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
+install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -1177,7 +1116,6 @@ install-strip:
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -1190,16 +1128,15 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
@BUILD_SHARED_FALSE@clean-local:
@HAVE_COMPAT_SYMLINKS_FALSE@clean-local:
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
- clean-noinstLTLIBRARIES mostlyclean-am
+ mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR) drivers/dri2/$(DEPDIR) main/$(DEPDIR)
+ -rm -rf drivers/dri2/$(DEPDIR) main/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1216,8 +1153,8 @@ info: info-am
info-am:
-install-data-am: install-eglHEADERS install-pkgconfigDATA \
- install-vendorjsonDATA
+install-data-am: install-eglHEADERS install-khrHEADERS \
+ install-pkgconfigDATA
install-dvi: install-dvi-am
@@ -1246,7 +1183,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR) drivers/dri2/$(DEPDIR) main/$(DEPDIR)
+ -rm -rf drivers/dri2/$(DEPDIR) main/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1263,39 +1200,28 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-eglHEADERS uninstall-libLTLIBRARIES \
- uninstall-pkgconfigDATA uninstall-vendorjsonDATA
+uninstall-am: uninstall-eglHEADERS uninstall-khrHEADERS \
+ uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
-.MAKE: all check check-am install install-am install-strip
+.MAKE: check-am install-am install-strip
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
clean clean-generic clean-libLTLIBRARIES clean-libtool \
- clean-local clean-noinstLTLIBRARIES cscopelist ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-eglHEADERS install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-libLTLIBRARIES install-man install-pdf install-pdf-am \
- install-pkgconfigDATA install-ps install-ps-am install-strip \
- install-vendorjsonDATA installcheck installcheck-am \
+ clean-local cscopelist ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-eglHEADERS install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-khrHEADERS install-libLTLIBRARIES install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-eglHEADERS uninstall-libLTLIBRARIES \
- uninstall-pkgconfigDATA uninstall-vendorjsonDATA
-
-@REGEN_SOURCES_TRUE@g_egldispatchstubs.c: $(GLVND_GEN_DEPS)
-@REGEN_SOURCES_TRUE@ $(PYTHON_GEN) $(top_srcdir)/src/egl/generate/gen_egl_dispatch.py source \
-@REGEN_SOURCES_TRUE@ $(top_srcdir)/src/egl/generate/eglFunctionList.py \
-@REGEN_SOURCES_TRUE@ $(top_srcdir)/src/egl/generate/egl.xml \
-@REGEN_SOURCES_TRUE@ $(top_srcdir)/src/egl/generate/egl_other.xml > $@
-
-@REGEN_SOURCES_TRUE@g_egldispatchstubs.h: $(GLVND_GEN_DEPS)
-@REGEN_SOURCES_TRUE@ $(PYTHON_GEN) $(top_srcdir)/src/egl/generate/gen_egl_dispatch.py header \
-@REGEN_SOURCES_TRUE@ $(top_srcdir)/src/egl/generate/eglFunctionList.py \
-@REGEN_SOURCES_TRUE@ $(top_srcdir)/src/egl/generate/egl.xml \
-@REGEN_SOURCES_TRUE@ $(top_srcdir)/src/egl/generate/egl_other.xml > $@
+ uninstall-am uninstall-eglHEADERS uninstall-khrHEADERS \
+ uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
+
@BUILD_SHARED_TRUE@@HAVE_COMPAT_SYMLINKS_TRUE@all-local : .install-mesa-links
diff --git a/lib/mesa/src/egl/drivers/dri2/egl_dri2.c b/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
index e3acbe040..196d3c776 100644
--- a/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
+++ b/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
@@ -56,7 +56,6 @@
#endif
#include "egl_dri2.h"
-#include "loader/loader.h"
#include "util/u_atomic.h"
/* The kernel header drm_fourcc.h defines the DRM formats below. We duplicate
@@ -75,29 +74,6 @@
#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */
#endif
-#ifndef DRM_FORMAT_R16
-#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') /* [15:0] R 16 little endian */
-#endif
-
-#ifndef DRM_FORMAT_GR1616
-#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2') /* [31:0] R:G 16:16 little endian */
-#endif
-
-static void
-dri_set_background_context(void *loaderPrivate)
-{
- _EGLContext *ctx = _eglGetCurrentContext();
- _EGLThreadInfo *t = _eglGetCurrentThread();
-
- _eglBindContextToThread(ctx, t);
-}
-
-const __DRIbackgroundCallableExtension background_callable_extension = {
- .base = { __DRI_BACKGROUND_CALLABLE, 1 },
-
- .setBackgroundContext = dri_set_background_context,
-};
-
const __DRIuseInvalidateExtension use_invalidate = {
.base = { __DRI_USE_INVALIDATE, 1 }
};
@@ -538,8 +514,8 @@ dri2_open_driver(_EGLDisplay *disp)
_eglLog(_EGL_DEBUG, "DRI2: dlopen(%s)", path);
- get_extensions_name = loader_get_extensions_name(dri2_dpy->driver_name);
- if (get_extensions_name) {
+ if (asprintf(&get_extensions_name, "%s_%s",
+ __DRI_DRIVER_GET_EXTENSIONS, dri2_dpy->driver_name) != -1) {
get_extensions = dlsym(dri2_dpy->driver, get_extensions_name);
if (get_extensions) {
extensions = get_extensions();
@@ -681,12 +657,6 @@ dri2_setup_screen(_EGLDisplay *disp)
disp->Extensions.KHR_wait_sync = EGL_TRUE;
if (dri2_dpy->fence->get_fence_from_cl_event)
disp->Extensions.KHR_cl_event2 = EGL_TRUE;
- if (dri2_dpy->fence->base.version >= 2) {
- unsigned capabilities =
- dri2_dpy->fence->get_capabilities(dri2_dpy->dri_screen);
- disp->Extensions.ANDROID_native_fence_sync =
- (capabilities & __DRI_FENCE_CAP_NATIVE_FD) != 0;
- }
}
disp->Extensions.KHR_reusable_sync = EGL_TRUE;
@@ -937,7 +907,6 @@ dri2_display_release(_EGLDisplay *disp)
wl_shm_destroy(dri2_dpy->wl_shm);
wl_registry_destroy(dri2_dpy->wl_registry);
wl_event_queue_destroy(dri2_dpy->wl_queue);
- wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
if (dri2_dpy->own_device) {
wl_display_disconnect(dri2_dpy->wl_dpy);
}
@@ -1586,9 +1555,9 @@ dri2_bind_tex_image(_EGLDriver *drv,
assert(!"Unexpected texture target in dri2_bind_tex_image()");
}
- dri2_dpy->tex_buffer->setTexBuffer2(dri2_ctx->dri_context,
- target, format,
- dri_drawable);
+ (*dri2_dpy->tex_buffer->setTexBuffer2)(dri2_ctx->dri_context,
+ target, format,
+ dri_drawable);
return EGL_TRUE;
}
@@ -1619,8 +1588,9 @@ dri2_release_tex_image(_EGLDriver *drv,
if (dri2_dpy->tex_buffer->base.version >= 3 &&
dri2_dpy->tex_buffer->releaseTexBuffer != NULL) {
- dri2_dpy->tex_buffer->releaseTexBuffer(dri2_ctx->dri_context,
- target, dri_drawable);
+ (*dri2_dpy->tex_buffer->releaseTexBuffer)(dri2_ctx->dri_context,
+ target,
+ dri_drawable);
}
return EGL_TRUE;
@@ -1994,8 +1964,6 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs)
case DRM_FORMAT_R8:
case DRM_FORMAT_RG88:
case DRM_FORMAT_GR88:
- case DRM_FORMAT_R16:
- case DRM_FORMAT_GR1616:
case DRM_FORMAT_RGB332:
case DRM_FORMAT_BGR233:
case DRM_FORMAT_XRGB4444:
@@ -2556,17 +2524,8 @@ dri2_egl_unref_sync(struct dri2_egl_display *dri2_dpy,
struct dri2_egl_sync *dri2_sync)
{
if (p_atomic_dec_zero(&dri2_sync->refcount)) {
- switch (dri2_sync->base.Type) {
- case EGL_SYNC_REUSABLE_KHR:
+ if (dri2_sync->base.Type == EGL_SYNC_REUSABLE_KHR)
cnd_destroy(&dri2_sync->cond);
- break;
- case EGL_SYNC_NATIVE_FENCE_ANDROID:
- if (dri2_sync->base.SyncFd != EGL_NO_NATIVE_FENCE_FD_ANDROID)
- close(dri2_sync->base.SyncFd);
- break;
- default:
- break;
- }
if (dri2_sync->fence)
dri2_dpy->fence->destroy_fence(dri2_dpy->dri_screen, dri2_sync->fence);
@@ -2657,19 +2616,6 @@ dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy,
/* initial status of reusable sync must be "unsignaled" */
dri2_sync->base.SyncStatus = EGL_UNSIGNALED_KHR;
break;
-
- case EGL_SYNC_NATIVE_FENCE_ANDROID:
- if (dri2_dpy->fence->create_fence_fd) {
- dri2_sync->fence = dri2_dpy->fence->create_fence_fd(
- dri2_ctx->dri_context,
- dri2_sync->base.SyncFd);
- }
- if (!dri2_sync->fence) {
- _eglError(EGL_BAD_ATTRIBUTE, "eglCreateSyncKHR");
- free(dri2_sync);
- return NULL;
- }
- break;
}
p_atomic_set(&dri2_sync->refcount, 1);
@@ -2699,38 +2645,12 @@ dri2_destroy_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
ret = EGL_FALSE;
}
}
-
dri2_egl_unref_sync(dri2_dpy, dri2_sync);
return ret;
}
static EGLint
-dri2_dup_native_fence_fd(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
-{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
-
- assert(sync->Type == EGL_SYNC_NATIVE_FENCE_ANDROID);
-
- if (sync->SyncFd == EGL_NO_NATIVE_FENCE_FD_ANDROID) {
- /* try to retrieve the actual native fence fd.. if rendering is
- * not flushed this will just return -1, aka NO_NATIVE_FENCE_FD:
- */
- sync->SyncFd = dri2_dpy->fence->get_fence_fd(dri2_dpy->dri_screen,
- dri2_sync->fence);
- }
-
- if (sync->SyncFd == EGL_NO_NATIVE_FENCE_FD_ANDROID) {
- /* if native fence fd still not created, return an error: */
- _eglError(EGL_BAD_PARAMETER, "eglDupNativeFenceFDANDROID");
- return EGL_NO_NATIVE_FENCE_FD_ANDROID;
- }
-
- return dup(sync->SyncFd);
-}
-
-static EGLint
dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
EGLint flags, EGLTime timeout)
{
@@ -2760,7 +2680,6 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
switch (sync->Type) {
case EGL_SYNC_FENCE_KHR:
- case EGL_SYNC_NATIVE_FENCE_ANDROID:
case EGL_SYNC_CL_EVENT_KHR:
if (dri2_dpy->fence->client_wait_sync(dri2_ctx ? dri2_ctx->dri_context : NULL,
dri2_sync->fence, wait_flags,
@@ -3016,7 +2935,6 @@ _eglBuiltInDriverDRI2(const char *args)
dri2_drv->base.API.DestroySyncKHR = dri2_destroy_sync;
dri2_drv->base.API.GLInteropQueryDeviceInfo = dri2_interop_query_device_info;
dri2_drv->base.API.GLInteropExportObject = dri2_interop_export_object;
- dri2_drv->base.API.DupNativeFenceFDANDROID = dri2_dup_native_fence_fd;
dri2_drv->base.Name = "DRI2";
dri2_drv->base.Unload = dri2_unload;
diff --git a/lib/mesa/src/egl/drivers/dri2/egl_dri2.h b/lib/mesa/src/egl/drivers/dri2/egl_dri2.h
index 9aa2a8c10..0020a5b98 100644
--- a/lib/mesa/src/egl/drivers/dri2/egl_dri2.h
+++ b/lib/mesa/src/egl/drivers/dri2/egl_dri2.h
@@ -35,6 +35,10 @@
#include <xcb/dri2.h>
#include <xcb/xfixes.h>
#include <X11/Xlib-xcb.h>
+
+#ifdef HAVE_DRI3
+#include "loader_dri3_helper.h"
+#endif
#endif
#ifdef HAVE_WAYLAND_PLATFORM
@@ -76,8 +80,6 @@
#include "eglimage.h"
#include "eglsync.h"
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
struct wl_buffer;
struct dri2_egl_driver
@@ -139,12 +141,18 @@ struct dri2_egl_display_vtbl {
EGLint (*query_buffer_age)(_EGLDriver *drv, _EGLDisplay *dpy,
_EGLSurface *surf);
+ EGLBoolean (*query_surface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surf, EGLint attribute,
+ EGLint *value);
+
struct wl_buffer* (*create_wayland_buffer_from_image)(
_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *img);
EGLBoolean (*get_sync_values)(_EGLDisplay *display, _EGLSurface *surface,
EGLuint64KHR *ust, EGLuint64KHR *msc,
EGLuint64KHR *sbc);
+
+ __DRIdrawable *(*get_dri_drawable)(_EGLSurface *surf);
};
struct dri2_egl_display
@@ -158,6 +166,7 @@ struct dri2_egl_display
const __DRIconfig **driver_configs;
void *driver;
const __DRIcoreExtension *core;
+ const __DRIimageDriverExtension *image_driver;
const __DRIdri2Extension *dri2;
const __DRIswrastExtension *swrast;
const __DRI2flushExtension *flush;
@@ -167,10 +176,14 @@ struct dri2_egl_display
const __DRI2configQueryExtension *config;
const __DRI2fenceExtension *fence;
const __DRI2rendererQueryExtension *rendererQuery;
+ const __DRI2interopExtension *interop;
int fd;
+ /* dri2_initialize/dri2_terminate increment/decrement this count, so does
+ * dri2_make_current (tracks if there are active contexts/surfaces). */
+ int ref_count;
+
int own_device;
- int swap_available;
int invalidate_available;
int min_swap_interval;
int max_swap_interval;
@@ -179,17 +192,18 @@ struct dri2_egl_display
struct gbm_dri_device *gbm_dri;
#endif
- char *device_name;
char *driver_name;
- __DRIdri2LoaderExtension dri2_loader_extension;
- __DRIswrastLoaderExtension swrast_loader_extension;
- const __DRIextension *extensions[5];
+ const __DRIextension **loader_extensions;
const __DRIextension **driver_extensions;
#ifdef HAVE_X11_PLATFORM
xcb_connection_t *conn;
int screen;
+ int swap_available;
+#ifdef HAVE_DRI3
+ struct loader_dri3_extensions loader_dri3_ext;
+#endif
#endif
#ifdef HAVE_WAYLAND_PLATFORM
@@ -199,12 +213,14 @@ struct dri2_egl_display
struct wl_drm *wl_drm;
struct wl_shm *wl_shm;
struct wl_event_queue *wl_queue;
- int authenticated;
- int formats;
+ int authenticated;
+ int formats;
uint32_t capabilities;
- int is_render_node;
- int is_different_gpu;
+ char *device_name;
#endif
+
+ int is_render_node;
+ int is_different_gpu;
};
struct dri2_egl_context
@@ -244,7 +260,7 @@ struct dri2_egl_surface
int dx;
int dy;
struct wl_callback *throttle_callback;
- int format;
+ int format;
#endif
#ifdef HAVE_DRM_PLATFORM
@@ -274,20 +290,23 @@ struct dri2_egl_surface
#ifdef HAVE_ANDROID_PLATFORM
struct ANativeWindow *window;
struct ANativeWindowBuffer *buffer;
+ __DRIimage *dri_image;
/* EGL-owned buffers */
__DRIbuffer *local_buffers[__DRI_BUFFER_COUNT];
#endif
-};
+#if defined(HAVE_SURFACELESS_PLATFORM)
+ __DRIimage *front;
+ unsigned int visual;
+#endif
+};
struct dri2_egl_config
{
_EGLConfig base;
- const __DRIconfig *dri_single_config;
- const __DRIconfig *dri_double_config;
- const __DRIconfig *dri_srgb_single_config;
- const __DRIconfig *dri_srgb_double_config;
+ const __DRIconfig *dri_single_config[2];
+ const __DRIconfig *dri_double_config[2];
};
struct dri2_egl_image
@@ -298,6 +317,8 @@ struct dri2_egl_image
struct dri2_egl_sync {
_EGLSync base;
+ mtx_t mutex;
+ cnd_t cond;
int refcount;
void *fence;
};
@@ -327,20 +348,30 @@ EGLBoolean
dri2_load_driver_swrast(_EGLDisplay *disp);
EGLBoolean
+dri2_load_driver_dri3(_EGLDisplay *disp);
+
+EGLBoolean
dri2_create_screen(_EGLDisplay *disp);
+__DRIdrawable *
+dri2_surface_get_dri_drawable(_EGLSurface *surf);
+
__DRIimage *
dri2_lookup_egl_image(__DRIscreen *screen, void *image, void *data);
struct dri2_egl_config *
dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
- EGLint surface_type, const EGLint *attr_list,
- const unsigned int *rgba_masks);
+ EGLint surface_type, const EGLint *attr_list,
+ const unsigned int *rgba_masks);
_EGLImage *
dri2_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLContext *ctx, EGLenum target,
- EGLClientBuffer buffer, const EGLint *attr_list);
+ _EGLContext *ctx, EGLenum target,
+ EGLClientBuffer buffer, const EGLint *attr_list);
+
+_EGLImage *
+dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
+ EGLClientBuffer buffer, const EGLint *attr_list);
EGLBoolean
dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp);
@@ -364,4 +395,28 @@ const __DRIconfig *
dri2_get_dri_config(struct dri2_egl_config *conf, EGLint surface_type,
EGLenum colorspace);
+static inline void
+dri2_set_WL_bind_wayland_display(_EGLDriver *drv, _EGLDisplay *disp)
+{
+#ifdef HAVE_WAYLAND_PLATFORM
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+
+ (void) drv;
+
+ if (dri2_dpy->device_name && dri2_dpy->image) {
+ if (dri2_dpy->image->base.version >= 10 &&
+ dri2_dpy->image->getCapabilities != NULL) {
+ int capabilities;
+
+ capabilities =
+ dri2_dpy->image->getCapabilities(dri2_dpy->dri_screen);
+ disp->Extensions.WL_bind_wayland_display =
+ (capabilities & __DRI_IMAGE_CAP_GLOBAL_NAMES) != 0;
+ } else {
+ disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
+ }
+ }
+#endif
+}
+
#endif /* EGL_DRI2_INCLUDED */
diff --git a/lib/mesa/src/egl/drivers/dri2/egl_dri2_fallbacks.h b/lib/mesa/src/egl/drivers/dri2/egl_dri2_fallbacks.h
index e769af36e..8dad27116 100644
--- a/lib/mesa/src/egl/drivers/dri2/egl_dri2_fallbacks.h
+++ b/lib/mesa/src/egl/drivers/dri2/egl_dri2_fallbacks.h
@@ -66,7 +66,8 @@ dri2_fallback_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *dpy,
_EGLSurface *surf,
const EGLint *rects, EGLint n_rects)
{
- return EGL_FALSE;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ return dri2_dpy->vtbl->swap_buffers(drv, dpy, surf);
}
static inline EGLBoolean
diff --git a/lib/mesa/src/egl/drivers/dri2/platform_drm.c b/lib/mesa/src/egl/drivers/dri2/platform_drm.c
index eda50875e..ea1a7f126 100644
--- a/lib/mesa/src/egl/drivers/dri2/platform_drm.c
+++ b/lib/mesa/src/egl/drivers/dri2/platform_drm.c
@@ -101,6 +101,7 @@ dri2_drm_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
struct dri2_egl_surface *dri2_surf;
struct gbm_surface *window = native_window;
struct gbm_dri_surface *surf;
+ const __DRIconfig *config;
(void) drv;
@@ -130,21 +131,20 @@ dri2_drm_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
goto cleanup_surf;
}
- if (dri2_dpy->dri2) {
- const __DRIconfig *config =
- dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
- dri2_surf->base.GLColorspace);
+ config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
+ dri2_surf->base.GLColorspace);
+ if (dri2_dpy->dri2) {
dri2_surf->dri_drawable =
(*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
dri2_surf->gbm_surf);
} else {
assert(dri2_dpy->swrast != NULL);
+
dri2_surf->dri_drawable =
- (*dri2_dpy->swrast->createNewDrawable) (dri2_dpy->dri_screen,
- dri2_conf->dri_double_config,
- dri2_surf->gbm_surf);
+ (*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen, config,
+ dri2_surf->gbm_surf);
}
if (dri2_surf->dri_drawable == NULL) {
@@ -191,9 +191,6 @@ dri2_drm_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
unsigned i;
- if (!_eglPutSurface(surf))
- return EGL_TRUE;
-
(*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
@@ -534,7 +531,7 @@ swrast_put_image2(__DRIdrawable *driDrawable,
return;
bo = gbm_dri_bo(dri2_surf->current->bo);
- if (gbm_dri_bo_map(bo) == NULL)
+ if (gbm_dri_bo_map_dumb(bo) == NULL)
return;
internal_stride = bo->base.base.stride;
@@ -544,7 +541,7 @@ swrast_put_image2(__DRIdrawable *driDrawable,
data + i * stride, stride);
}
- gbm_dri_bo_unmap(bo);
+ gbm_dri_bo_unmap_dumb(bo);
}
static void
@@ -564,7 +561,7 @@ swrast_get_image(__DRIdrawable *driDrawable,
return;
bo = gbm_dri_bo(dri2_surf->current->bo);
- if (gbm_dri_bo_map(bo) == NULL)
+ if (gbm_dri_bo_map_dumb(bo) == NULL)
return;
internal_stride = bo->base.base.stride;
@@ -575,7 +572,65 @@ swrast_get_image(__DRIdrawable *driDrawable,
bo->map + (x + i) * internal_stride + y, stride);
}
- gbm_dri_bo_unmap(bo);
+ gbm_dri_bo_unmap_dumb(bo);
+}
+
+static EGLBoolean
+drm_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ static const struct {
+ int format;
+ unsigned int red_mask;
+ unsigned int alpha_mask;
+ } visuals[] = {
+ { GBM_FORMAT_XRGB2101010, 0x3ff00000, 0x00000000 },
+ { GBM_FORMAT_ARGB2101010, 0x3ff00000, 0xc0000000 },
+ { GBM_FORMAT_XRGB8888, 0x00ff0000, 0x00000000 },
+ { GBM_FORMAT_ARGB8888, 0x00ff0000, 0xff000000 },
+ { GBM_FORMAT_RGB565, 0x0000f800, 0x00000000 },
+ };
+ EGLint attr_list[] = {
+ EGL_NATIVE_VISUAL_ID, 0,
+ EGL_NONE,
+ };
+ unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };
+ unsigned int count, i, j;
+
+ count = 0;
+ for (i = 0; dri2_dpy->driver_configs[i]; i++) {
+ unsigned int red, alpha;
+
+ dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
+ __DRI_ATTRIB_RED_MASK, &red);
+ dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
+ __DRI_ATTRIB_ALPHA_MASK, &alpha);
+
+ for (j = 0; j < ARRAY_SIZE(visuals); j++) {
+ struct dri2_egl_config *dri2_conf;
+
+ if (visuals[j].red_mask != red || visuals[j].alpha_mask != alpha)
+ continue;
+
+ attr_list[1] = visuals[j].format;
+
+ dri2_conf = dri2_add_config(disp, dri2_dpy->driver_configs[i],
+ count + 1, EGL_WINDOW_BIT, attr_list, NULL);
+ if (dri2_conf) {
+ count++;
+ format_count[j]++;
+ }
+ }
+ }
+
+ for (i = 0; i < ARRAY_SIZE(format_count); i++) {
+ if (!format_count[i]) {
+ _eglLog(_EGL_DEBUG, "No DRI config supports native format 0x%x",
+ visuals[i].format);
+ }
+ }
+
+ return (count != 0);
}
static struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
@@ -594,6 +649,7 @@ static struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
.query_buffer_age = dri2_drm_query_buffer_age,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
+ .get_dri_drawable = dri2_surface_get_dri_drawable,
};
EGLBoolean
@@ -601,8 +657,8 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy;
struct gbm_device *gbm;
+ const char *err;
int fd = -1;
- int i;
loader_set_logger(_eglLog);
@@ -622,36 +678,36 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
fd = loader_open_device("/dev/dri/card0");
dri2_dpy->own_device = 1;
gbm = gbm_create_device(fd);
- if (gbm == NULL)
- return EGL_FALSE;
+ if (gbm == NULL) {
+ err = "DRI2: failed to create gbm device";
+ goto cleanup;
+ }
+ } else {
+ fd = fcntl(gbm_device_get_fd(gbm), F_DUPFD_CLOEXEC, 3);
+ if (fd < 0) {
+ err = "DRI2: failed to fcntl() existing gbm device";
+ goto cleanup;
+ }
}
if (strcmp(gbm_device_get_backend_name(gbm), "drm") != 0) {
- free(dri2_dpy);
- return EGL_FALSE;
+ err = "DRI2: gbm device using incorrect/incompatible backend";
+ goto cleanup;
}
dri2_dpy->gbm_dri = gbm_dri_device(gbm);
if (dri2_dpy->gbm_dri->base.type != GBM_DRM_DRIVER_TYPE_DRI) {
- free(dri2_dpy);
- return EGL_FALSE;
- }
-
- if (fd < 0) {
- fd = fcntl(gbm_device_get_fd(gbm), F_DUPFD_CLOEXEC, 3);
- if (fd < 0) {
- free(dri2_dpy);
- return EGL_FALSE;
- }
+ err = "DRI2: gbm device using incorrect/incompatible type";
+ goto cleanup;
}
dri2_dpy->fd = fd;
- dri2_dpy->device_name = loader_get_device_name_for_fd(dri2_dpy->fd);
dri2_dpy->driver_name = strdup(dri2_dpy->gbm_dri->base.driver_name);
dri2_dpy->dri_screen = dri2_dpy->gbm_dri->screen;
dri2_dpy->core = dri2_dpy->gbm_dri->core;
dri2_dpy->dri2 = dri2_dpy->gbm_dri->dri2;
+ dri2_dpy->fence = dri2_dpy->gbm_dri->fence;
dri2_dpy->image = dri2_dpy->gbm_dri->image;
dri2_dpy->flush = dri2_dpy->gbm_dri->flush;
dri2_dpy->swrast = dri2_dpy->gbm_dri->swrast;
@@ -673,33 +729,9 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
dri2_setup_screen(disp);
- for (i = 0; dri2_dpy->driver_configs[i]; i++) {
- EGLint format, attr_list[3];
- unsigned int red, alpha;
-
- dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
- __DRI_ATTRIB_RED_MASK, &red);
- dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
- __DRI_ATTRIB_ALPHA_MASK, &alpha);
- if (red == 0x3ff00000 && alpha == 0x00000000)
- format = GBM_FORMAT_XRGB2101010;
- else if (red == 0x3ff00000 && alpha == 0xc0000000)
- format = GBM_FORMAT_ARGB2101010;
- else if (red == 0x00ff0000 && alpha == 0x00000000)
- format = GBM_FORMAT_XRGB8888;
- else if (red == 0x00ff0000 && alpha == 0xff000000)
- format = GBM_FORMAT_ARGB8888;
- else if (red == 0xf800)
- format = GBM_FORMAT_RGB565;
- else
- continue;
-
- attr_list[0] = EGL_NATIVE_VISUAL_ID;
- attr_list[1] = format;
- attr_list[2] = EGL_NONE;
-
- dri2_add_config(disp, dri2_dpy->driver_configs[i],
- i + 1, EGL_WINDOW_BIT, attr_list, NULL);
+ if (!drm_add_configs_for_visuals(drv, disp)) {
+ err = "DRI2: failed to add configs";
+ goto cleanup;
}
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
@@ -707,19 +739,9 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
disp->Extensions.EXT_buffer_age = EGL_TRUE;
#ifdef HAVE_WAYLAND_PLATFORM
- if (dri2_dpy->image) {
- if (dri2_dpy->image->base.version >= 10 &&
- dri2_dpy->image->getCapabilities != NULL) {
- int capabilities;
-
- capabilities =
- dri2_dpy->image->getCapabilities(dri2_dpy->dri_screen);
- disp->Extensions.WL_bind_wayland_display =
- (capabilities & __DRI_IMAGE_CAP_GLOBAL_NAMES) != 0;
- } else
- disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
- }
+ dri2_dpy->device_name = loader_get_device_name_for_fd(dri2_dpy->fd);
#endif
+ dri2_set_WL_bind_wayland_display(drv, disp);
/* Fill vtbl last to prevent accidentally calling virtual function during
* initialization.
@@ -727,4 +749,12 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
dri2_dpy->vtbl = &dri2_drm_display_vtbl;
return EGL_TRUE;
+
+cleanup:
+ if (fd >= 0)
+ close(fd);
+
+ free(dri2_dpy);
+ disp->DriverData = NULL;
+ return _eglError(EGL_NOT_INITIALIZED, err);
}
diff --git a/lib/mesa/src/egl/drivers/dri2/platform_surfaceless.c b/lib/mesa/src/egl/drivers/dri2/platform_surfaceless.c
index 48f15df75..025aaa255 100644
--- a/lib/mesa/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/lib/mesa/src/egl/drivers/dri2/platform_surfaceless.c
@@ -37,10 +37,204 @@
#include "egl_dri2_fallbacks.h"
#include "loader.h"
+static __DRIimage*
+surfaceless_alloc_image(struct dri2_egl_display *dri2_dpy,
+ struct dri2_egl_surface *dri2_surf)
+{
+ return dri2_dpy->image->createImage(
+ dri2_dpy->dri_screen,
+ dri2_surf->base.Width,
+ dri2_surf->base.Height,
+ dri2_surf->visual,
+ 0,
+ NULL);
+}
+
+static void
+surfaceless_free_images(struct dri2_egl_surface *dri2_surf)
+{
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ if (dri2_surf->front) {
+ dri2_dpy->image->destroyImage(dri2_surf->front);
+ dri2_surf->front = NULL;
+ }
+}
+
+static int
+surfaceless_image_get_buffers(__DRIdrawable *driDrawable,
+ unsigned int format,
+ uint32_t *stamp,
+ void *loaderPrivate,
+ uint32_t buffer_mask,
+ struct __DRIimageList *buffers)
+{
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ struct dri2_egl_display *dri2_dpy =
+ dri2_egl_display(dri2_surf->base.Resource.Display);
+
+ buffers->image_mask = 0;
+ buffers->front = NULL;
+ buffers->back = NULL;
+
+ /* The EGL 1.5 spec states that pbuffers are single-buffered. Specifically,
+ * the spec states that they have a back buffer but no front buffer, in
+ * contrast to pixmaps, which have a front buffer but no back buffer.
+ *
+ * Single-buffered surfaces with no front buffer confuse Mesa; so we deviate
+ * from the spec, following the precedent of Mesa's EGL X11 platform. The
+ * X11 platform correctly assigns pbuffers to single-buffered configs, but
+ * assigns the pbuffer a front buffer instead of a back buffer.
+ *
+ * Pbuffers in the X11 platform mostly work today, so let's just copy its
+ * behavior instead of trying to fix (and hence potentially breaking) the
+ * world.
+ */
+
+ if (buffer_mask & __DRI_IMAGE_BUFFER_FRONT) {
+
+ if (!dri2_surf->front)
+ dri2_surf->front =
+ surfaceless_alloc_image(dri2_dpy, dri2_surf);
+
+ buffers->image_mask |= __DRI_IMAGE_BUFFER_FRONT;
+ buffers->front = dri2_surf->front;
+ }
+
+ return 1;
+}
+
+static _EGLSurface *
+dri2_surfaceless_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
+ _EGLConfig *conf, const EGLint *attrib_list)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
+ struct dri2_egl_surface *dri2_surf;
+ const __DRIconfig *config;
+
+ /* Make sure to calloc so all pointers
+ * are originally NULL.
+ */
+ dri2_surf = calloc(1, sizeof *dri2_surf);
+
+ if (!dri2_surf) {
+ _eglError(EGL_BAD_ALLOC, "eglCreatePbufferSurface");
+ return NULL;
+ }
+
+ if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
+ goto cleanup_surface;
+
+ config = dri2_get_dri_config(dri2_conf, type,
+ dri2_surf->base.GLColorspace);
+
+ if (!config)
+ goto cleanup_surface;
+
+ dri2_surf->dri_drawable =
+ (*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
+ dri2_surf);
+ if (dri2_surf->dri_drawable == NULL) {
+ _eglError(EGL_BAD_ALLOC, "dri2->createNewDrawable");
+ goto cleanup_surface;
+ }
+
+ if (conf->RedSize == 5)
+ dri2_surf->visual = __DRI_IMAGE_FORMAT_RGB565;
+ else if (conf->AlphaSize == 0)
+ dri2_surf->visual = __DRI_IMAGE_FORMAT_XRGB8888;
+ else
+ dri2_surf->visual = __DRI_IMAGE_FORMAT_ARGB8888;
+
+ return &dri2_surf->base;
+
+ cleanup_surface:
+ free(dri2_surf);
+ return NULL;
+}
+
+static EGLBoolean
+surfaceless_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
+
+ surfaceless_free_images(dri2_surf);
+
+ (*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
+
+ free(dri2_surf);
+ return EGL_TRUE;
+}
+
+static _EGLSurface *
+dri2_surfaceless_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *conf, const EGLint *attrib_list)
+{
+ return dri2_surfaceless_create_surface(drv, disp, EGL_PBUFFER_BIT, conf,
+ attrib_list);
+}
+
+static EGLBoolean
+surfaceless_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
+{
+ assert(!surf || surf->Type == EGL_PBUFFER_BIT);
+
+ /* From the EGL 1.5 spec:
+ * If surface is a [...] pbuffer surface, eglSwapBuffers has no effect.
+ */
+ return EGL_TRUE;
+}
+
+static EGLBoolean
+surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ static const struct {
+ const char *format_name;
+ unsigned int rgba_masks[4];
+ } visuals[] = {
+ { "ARGB8888", { 0xff0000, 0xff00, 0xff, 0xff000000 } },
+ { "RGB888", { 0xff0000, 0xff00, 0xff, 0x0 } },
+ { "RGB565", { 0x00f800, 0x07e0, 0x1f, 0x0 } },
+ };
+ unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };
+ unsigned int count, i, j;
+
+ count = 0;
+ for (i = 0; dri2_dpy->driver_configs[i] != NULL; i++) {
+ for (j = 0; j < ARRAY_SIZE(visuals); j++) {
+ struct dri2_egl_config *dri2_conf;
+
+ dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[i],
+ count + 1, EGL_PBUFFER_BIT, NULL, visuals[j].rgba_masks);
+
+ if (dri2_conf) {
+ count++;
+ format_count[j]++;
+ }
+ }
+ }
+
+ for (i = 0; i < ARRAY_SIZE(format_count); i++) {
+ if (!format_count[i]) {
+ _eglLog(_EGL_DEBUG, "No DRI config supports native format %s",
+ visuals[i].format_name);
+ }
+ }
+
+ return (count != 0);
+}
+
static struct dri2_egl_display_vtbl dri2_surfaceless_display_vtbl = {
.create_pixmap_surface = dri2_fallback_create_pixmap_surface,
+ .create_pbuffer_surface = dri2_surfaceless_create_pbuffer_surface,
+ .destroy_surface = surfaceless_destroy_surface,
.create_image = dri2_create_image_khr,
.swap_interval = dri2_fallback_swap_interval,
+ .swap_buffers = surfaceless_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
.swap_buffers_region = dri2_fallback_swap_buffers_region,
.post_sub_buffer = dri2_fallback_post_sub_buffer,
@@ -48,6 +242,7 @@ static struct dri2_egl_display_vtbl dri2_surfaceless_display_vtbl = {
.query_buffer_age = dri2_fallback_query_buffer_age,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
+ .get_dri_drawable = dri2_surface_get_dri_drawable,
};
static void
@@ -55,25 +250,21 @@ surfaceless_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate)
{
}
-static __DRIbuffer *
-surfaceless_get_buffers_with_format(__DRIdrawable * driDrawable,
- int *width, int *height,
- unsigned int *attachments, int count,
- int *out_count, void *loaderPrivate)
-{
- struct dri2_egl_surface *dri2_surf = loaderPrivate;
-
- dri2_surf->buffer_count = 1;
- if (width)
- *width = dri2_surf->base.Width;
- if (height)
- *height = dri2_surf->base.Height;
- *out_count = dri2_surf->buffer_count;;
- return dri2_surf->buffers;
-}
+static const __DRIimageLoaderExtension image_loader_extension = {
+ .base = { __DRI_IMAGE_LOADER, 1 },
+ .getBuffers = surfaceless_image_get_buffers,
+ .flushFrontBuffer = surfaceless_flush_front_buffer,
+};
#define DRM_RENDER_DEV_NAME "%s/renderD%d"
+static const __DRIextension *image_loader_extensions[] = {
+ &image_loader_extension.base,
+ &image_lookup_extension.base,
+ &use_invalidate.base,
+ NULL,
+};
+
EGLBoolean
dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
{
@@ -103,7 +294,7 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
if (dri2_dpy->fd < 0)
continue;
- dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0);
+ dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd);
if (dri2_dpy->driver_name) {
if (dri2_load_driver(disp)) {
driver_loaded = 1;
@@ -119,27 +310,16 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
goto cleanup_display;
}
- dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;
- dri2_dpy->dri2_loader_extension.base.version = 3;
- dri2_dpy->dri2_loader_extension.getBuffers = NULL;
- dri2_dpy->dri2_loader_extension.flushFrontBuffer =
- surfaceless_flush_front_buffer;
- dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
- surfaceless_get_buffers_with_format;
-
- dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
- dri2_dpy->extensions[1] = &image_lookup_extension.base;
- dri2_dpy->extensions[2] = &use_invalidate.base;
- dri2_dpy->extensions[3] = NULL;
+ dri2_dpy->loader_extensions = image_loader_extensions;
if (!dri2_create_screen(disp)) {
err = "DRI2: failed to create screen";
goto cleanup_driver;
}
- for (i = 0; dri2_dpy->driver_configs[i]; i++) {
- dri2_add_config(disp, dri2_dpy->driver_configs[i],
- i + 1, EGL_WINDOW_BIT, NULL, NULL);
+ if (!surfaceless_add_configs_for_visuals(drv, disp)) {
+ err = "DRI2: failed to add configs";
+ goto cleanup_screen;
}
disp->Extensions.KHR_image_base = EGL_TRUE;
@@ -151,12 +331,16 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
return EGL_TRUE;
+cleanup_screen:
+ dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
+
cleanup_driver:
dlclose(dri2_dpy->driver);
free(dri2_dpy->driver_name);
close(dri2_dpy->fd);
cleanup_display:
free(dri2_dpy);
+ disp->DriverData = NULL;
return _eglError(EGL_NOT_INITIALIZED, err);
}
diff --git a/lib/mesa/src/egl/drivers/dri2/platform_wayland.c b/lib/mesa/src/egl/drivers/dri2/platform_wayland.c
index dbc64ba2d..27baec348 100644
--- a/lib/mesa/src/egl/drivers/dri2/platform_wayland.c
+++ b/lib/mesa/src/egl/drivers/dri2/platform_wayland.c
@@ -118,6 +118,13 @@ resize_callback(struct wl_egl_window *wl_win, void *data)
(*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
}
+static void
+destroy_window_callback(void *data)
+{
+ struct dri2_egl_surface *dri2_surf = data;
+ dri2_surf->wl_win = NULL;
+}
+
/**
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
*/
@@ -159,6 +166,7 @@ dri2_wl_create_surface(_EGLDriver *drv, _EGLDisplay *disp,
dri2_surf->wl_win->private = dri2_surf;
dri2_surf->wl_win->resize_callback = resize_callback;
+ dri2_surf->wl_win->destroy_window_callback = destroy_window_callback;
dri2_surf->base.Width = -1;
dri2_surf->base.Height = -1;
@@ -229,9 +237,6 @@ dri2_wl_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
(void) drv;
- if (!_eglPutSurface(surf))
- return EGL_TRUE;
-
(*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
for (i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
@@ -257,8 +262,11 @@ dri2_wl_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
if (dri2_surf->throttle_callback)
wl_callback_destroy(dri2_surf->throttle_callback);
- dri2_surf->wl_win->private = NULL;
- dri2_surf->wl_win->resize_callback = NULL;
+ if (dri2_surf->wl_win) {
+ dri2_surf->wl_win->private = NULL;
+ dri2_surf->wl_win->resize_callback = NULL;
+ dri2_surf->wl_win->destroy_window_callback = NULL;
+ }
free(surf);
@@ -305,7 +313,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
{
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
- int i;
+ int i, use_flags;
unsigned int dri_image_format;
/* currently supports three WL DRM formats,
@@ -352,6 +360,8 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
if (dri2_surf->back == NULL)
return -1;
+ use_flags = __DRI_IMAGE_USE_SHARE | __DRI_IMAGE_USE_BACKBUFFER;
+
if (dri2_dpy->is_different_gpu &&
dri2_surf->back->linear_copy == NULL) {
dri2_surf->back->linear_copy =
@@ -359,7 +369,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
dri2_surf->base.Width,
dri2_surf->base.Height,
dri_image_format,
- __DRI_IMAGE_USE_SHARE |
+ use_flags |
__DRI_IMAGE_USE_LINEAR,
NULL);
if (dri2_surf->back->linear_copy == NULL)
@@ -373,7 +383,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
dri2_surf->base.Height,
dri_image_format,
dri2_dpy->is_different_gpu ?
- 0 : __DRI_IMAGE_USE_SHARE,
+ 0 : use_flags,
NULL);
dri2_surf->back->age = 0;
}
@@ -582,6 +592,14 @@ dri2_wl_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
(void) loaderPrivate;
}
+static const __DRIdri2LoaderExtension dri2_loader_extension = {
+ .base = { __DRI_DRI2_LOADER, 3 },
+
+ .getBuffers = dri2_wl_get_buffers,
+ .flushFrontBuffer = dri2_wl_flush_front_buffer,
+ .getBuffersWithFormat = dri2_wl_get_buffers_with_format,
+};
+
static const __DRIimageLoaderExtension image_loader_extension = {
.base = { __DRI_IMAGE_LOADER, 1 },
@@ -653,6 +671,37 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf)
&wl_buffer_listener, dri2_surf);
}
+static EGLBoolean
+try_damage_buffer(struct dri2_egl_surface *dri2_surf,
+ const EGLint *rects,
+ EGLint n_rects)
+{
+/* The WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION macro and
+ * wl_proxy_get_version() were both introduced in wayland 1.10.
+ * Instead of bumping our wayland dependency we just make this
+ * function conditional on the required 1.10 features, falling
+ * back to old (correct but suboptimal) behaviour for older
+ * wayland.
+ */
+#ifdef WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION
+ int i;
+
+ if (wl_proxy_get_version((struct wl_proxy *) dri2_surf->wl_win->surface)
+ < WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION)
+ return EGL_FALSE;
+
+ for (i = 0; i < n_rects; i++) {
+ const int *rect = &rects[i * 4];
+
+ wl_surface_damage_buffer(dri2_surf->wl_win->surface,
+ rect[0],
+ dri2_surf->base.Height - rect[1] - rect[3],
+ rect[2], rect[3]);
+ }
+ return EGL_TRUE;
+#endif
+ return EGL_FALSE;
+}
/**
* Called via eglSwapBuffers(), drv->API.SwapBuffers().
*/
@@ -703,18 +752,12 @@ dri2_wl_swap_buffers_with_damage(_EGLDriver *drv,
dri2_surf->dx = 0;
dri2_surf->dy = 0;
- if (n_rects == 0) {
+ /* If the compositor doesn't support damage_buffer, we deliberately
+ * ignore the damage region and post maximum damage, due to
+ * https://bugs.freedesktop.org/78190 */
+ if (!n_rects || !try_damage_buffer(dri2_surf, rects, n_rects))
wl_surface_damage(dri2_surf->wl_win->surface,
0, 0, INT32_MAX, INT32_MAX);
- } else {
- for (i = 0; i < n_rects; i++) {
- const int *rect = &rects[i * 4];
- wl_surface_damage(dri2_surf->wl_win->surface,
- rect[0],
- dri2_surf->base.Height - rect[1] - rect[3],
- rect[2], rect[3]);
- }
- }
if (dri2_dpy->is_different_gpu) {
_EGLContext *ctx = _eglGetCurrentContext();
@@ -1033,19 +1076,71 @@ static struct dri2_egl_display_vtbl dri2_wl_display_vtbl = {
.query_buffer_age = dri2_wl_query_buffer_age,
.create_wayland_buffer_from_image = dri2_wl_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
+ .get_dri_drawable = dri2_surface_get_dri_drawable,
+};
+
+static const __DRIextension *dri2_loader_extensions[] = {
+ &dri2_loader_extension.base,
+ &image_loader_extension.base,
+ &image_lookup_extension.base,
+ &use_invalidate.base,
+ NULL,
+};
+
+static const __DRIextension *image_loader_extensions[] = {
+ &image_loader_extension.base,
+ &image_lookup_extension.base,
+ &use_invalidate.base,
+ NULL,
};
static EGLBoolean
+dri2_wl_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ static const struct {
+ const char *format_name;
+ int has_format;
+ unsigned int rgba_masks[4];
+ } visuals[] = {
+ { "XRGB8888", HAS_XRGB8888, { 0xff0000, 0xff00, 0x00ff, 0xff000000 } },
+ { "ARGB8888", HAS_ARGB8888, { 0xff0000, 0xff00, 0x00ff, 0 } },
+ { "RGB565", HAS_RGB565, { 0x00f800, 0x07e0, 0x001f, 0 } },
+ };
+ unsigned int format_count[ARRAY_SIZE(visuals)] = { 0 };
+ unsigned int count, i, j;
+
+ count = 0;
+ for (i = 0; dri2_dpy->driver_configs[i]; i++) {
+ for (j = 0; j < ARRAY_SIZE(visuals); j++) {
+ struct dri2_egl_config *dri2_conf;
+
+ if (!(dri2_dpy->formats & visuals[j].has_format))
+ continue;
+
+ dri2_conf = dri2_add_config(disp, dri2_dpy->driver_configs[i],
+ count + 1, EGL_WINDOW_BIT, NULL, visuals[j].rgba_masks);
+ if (dri2_conf) {
+ count++;
+ format_count[j]++;
+ }
+ }
+ }
+
+ for (i = 0; i < ARRAY_SIZE(format_count); i++) {
+ if (!format_count[i]) {
+ _eglLog(_EGL_DEBUG, "No DRI config supports native format %s",
+ visuals[i].format_name);
+ }
+ }
+
+ return (count != 0);
+}
+
+static EGLBoolean
dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy;
- const __DRIconfig *config;
- uint32_t types;
- int i;
- static const unsigned int argb_masks[4] =
- { 0xff0000, 0xff00, 0xff, 0xff000000 };
- static const unsigned int rgb_masks[4] = { 0xff0000, 0xff00, 0xff, 0 };
- static const unsigned int rgb565_masks[4] = { 0xf800, 0x07e0, 0x001f, 0 };
loader_set_logger(_eglLog);
@@ -1100,7 +1195,7 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
* the server by requesting its pci-id */
dri2_dpy->is_render_node = drmGetNodeTypeFromFd(dri2_dpy->fd) == DRM_NODE_RENDER;
- dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0);
+ dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd);
if (dri2_dpy->driver_name == NULL) {
_eglError(EGL_BAD_ALLOC, "DRI2: failed to get driver name");
goto cleanup_fd;
@@ -1109,25 +1204,12 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
if (!dri2_load_driver(disp))
goto cleanup_driver_name;
- dri2_dpy->extensions[0] = &image_loader_extension.base;
- dri2_dpy->extensions[1] = &image_lookup_extension.base;
- dri2_dpy->extensions[2] = &use_invalidate.base;
-
/* render nodes cannot use Gem names, and thus do not support
* the __DRI_DRI2_LOADER extension */
- if (!dri2_dpy->is_render_node) {
- dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;
- dri2_dpy->dri2_loader_extension.base.version = 3;
- dri2_dpy->dri2_loader_extension.getBuffers = dri2_wl_get_buffers;
- dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_wl_flush_front_buffer;
- dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
- dri2_wl_get_buffers_with_format;
- dri2_dpy->extensions[3] = &dri2_dpy->dri2_loader_extension.base;
- dri2_dpy->extensions[4] = NULL;
- } else
- dri2_dpy->extensions[3] = NULL;
-
- dri2_dpy->swap_available = EGL_TRUE;
+ if (!dri2_dpy->is_render_node)
+ dri2_dpy->loader_extensions = dri2_loader_extensions;
+ else
+ dri2_dpy->loader_extensions = image_loader_extensions;
if (!dri2_create_screen(disp))
goto cleanup_driver;
@@ -1161,18 +1243,12 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
goto cleanup_screen;
}
- types = EGL_WINDOW_BIT;
- for (i = 0; dri2_dpy->driver_configs[i]; i++) {
- config = dri2_dpy->driver_configs[i];
- if (dri2_dpy->formats & HAS_XRGB8888)
- dri2_add_config(disp, config, i + 1, types, NULL, rgb_masks);
- if (dri2_dpy->formats & HAS_ARGB8888)
- dri2_add_config(disp, config, i + 1, types, NULL, argb_masks);
- if (dri2_dpy->formats & HAS_RGB565)
- dri2_add_config(disp, config, i + 1, types, NULL, rgb565_masks);
+ if (!dri2_wl_add_configs_for_visuals(drv, disp)) {
+ _eglError(EGL_NOT_INITIALIZED, "DRI2: failed to add configs");
+ goto cleanup_screen;
}
- disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
+ dri2_set_WL_bind_wayland_display(drv, disp);
/* When cannot convert EGLImage to wl_buffer when on a different gpu,
* because the buffer of the EGLImage has likely a tiling mode the server
* gpu won't support. These is no way to check for now. Thus do not support the
@@ -1208,8 +1284,11 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
cleanup_registry:
wl_registry_destroy(dri2_dpy->wl_registry);
wl_event_queue_destroy(dri2_dpy->wl_queue);
+ if (disp->PlatformDisplay == NULL)
+ wl_display_disconnect(dri2_dpy->wl_dpy);
cleanup_dpy:
free(dri2_dpy);
+ disp->DriverData = NULL;
return EGL_FALSE;
}
@@ -1645,6 +1724,7 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
struct wl_egl_window *window = native_window;
struct dri2_egl_surface *dri2_surf;
+ const __DRIconfig *config;
(void) drv;
@@ -1665,14 +1745,18 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
dri2_surf->format = WL_SHM_FORMAT_ARGB8888;
dri2_surf->wl_win = window;
+ dri2_surf->wl_win->private = dri2_surf;
+ dri2_surf->wl_win->destroy_window_callback = destroy_window_callback;
dri2_surf->base.Width = -1;
dri2_surf->base.Height = -1;
+ config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
+ dri2_surf->base.GLColorspace);
+
dri2_surf->dri_drawable =
- (*dri2_dpy->swrast->createNewDrawable) (dri2_dpy->dri_screen,
- dri2_conf->dri_double_config,
- dri2_surf);
+ (*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen,
+ config, dri2_surf);
if (dri2_surf->dri_drawable == NULL) {
_eglError(EGL_BAD_ALLOC, "swrast->createNewDrawable");
goto cleanup_dri_drawable;
@@ -1757,19 +1841,27 @@ static struct dri2_egl_display_vtbl dri2_wl_swrast_display_vtbl = {
.query_buffer_age = dri2_fallback_query_buffer_age,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
+ .get_dri_drawable = dri2_surface_get_dri_drawable,
+};
+
+static const __DRIswrastLoaderExtension swrast_loader_extension = {
+ .base = { __DRI_SWRAST_LOADER, 2 },
+
+ .getDrawableInfo = dri2_wl_swrast_get_drawable_info,
+ .putImage = dri2_wl_swrast_put_image,
+ .getImage = dri2_wl_swrast_get_image,
+ .putImage2 = dri2_wl_swrast_put_image2,
+};
+
+static const __DRIextension *swrast_loader_extensions[] = {
+ &swrast_loader_extension.base,
+ NULL,
};
static EGLBoolean
dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy;
- const __DRIconfig *config;
- uint32_t types;
- int i;
- static const unsigned int argb_masks[4] =
- { 0xff0000, 0xff00, 0xff, 0xff000000 };
- static const unsigned int rgb_masks[4] = { 0xff0000, 0xff00, 0xff, 0 };
- static const unsigned int rgb565_masks[4] = { 0xf800, 0x07e0, 0x001f, 0 };
loader_set_logger(_eglLog);
@@ -1804,34 +1896,21 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
if (roundtrip(dri2_dpy) < 0 || dri2_dpy->formats == 0)
goto cleanup_shm;
+ dri2_dpy->fd = -1;
dri2_dpy->driver_name = strdup("swrast");
if (!dri2_load_driver_swrast(disp))
goto cleanup_shm;
- dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;
- dri2_dpy->swrast_loader_extension.base.version = 2;
- dri2_dpy->swrast_loader_extension.getDrawableInfo = dri2_wl_swrast_get_drawable_info;
- dri2_dpy->swrast_loader_extension.putImage = dri2_wl_swrast_put_image;
- dri2_dpy->swrast_loader_extension.getImage = dri2_wl_swrast_get_image;
- dri2_dpy->swrast_loader_extension.putImage2 = dri2_wl_swrast_put_image2;
-
- dri2_dpy->extensions[0] = &dri2_dpy->swrast_loader_extension.base;
- dri2_dpy->extensions[1] = NULL;
+ dri2_dpy->loader_extensions = swrast_loader_extensions;
if (!dri2_create_screen(disp))
goto cleanup_driver;
dri2_wl_setup_swap_interval(dri2_dpy);
- types = EGL_WINDOW_BIT;
- for (i = 0; dri2_dpy->driver_configs[i]; i++) {
- config = dri2_dpy->driver_configs[i];
- if (dri2_dpy->formats & HAS_XRGB8888)
- dri2_add_config(disp, config, i + 1, types, NULL, rgb_masks);
- if (dri2_dpy->formats & HAS_ARGB8888)
- dri2_add_config(disp, config, i + 1, types, NULL, argb_masks);
- if (dri2_dpy->formats & HAS_RGB565)
- dri2_add_config(disp, config, i + 1, types, NULL, rgb565_masks);
+ if (!dri2_wl_add_configs_for_visuals(drv, disp)) {
+ _eglError(EGL_NOT_INITIALIZED, "DRI2: failed to add configs");
+ goto cleanup_screen;
}
/* Fill vtbl last to prevent accidentally calling virtual function during
@@ -1841,6 +1920,8 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
return EGL_TRUE;
+ cleanup_screen:
+ dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen);
cleanup_driver:
dlclose(dri2_dpy->driver);
cleanup_shm:
@@ -1848,8 +1929,11 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
cleanup_registry:
wl_registry_destroy(dri2_dpy->wl_registry);
wl_event_queue_destroy(dri2_dpy->wl_queue);
+ if (disp->PlatformDisplay == NULL)
+ wl_display_disconnect(dri2_dpy->wl_dpy);
cleanup_dpy:
free(dri2_dpy);
+ disp->DriverData = NULL;
return EGL_FALSE;
}
diff --git a/lib/mesa/src/egl/drivers/dri2/platform_x11.c b/lib/mesa/src/egl/drivers/dri2/platform_x11.c
index ea21355a1..cf2ce3f89 100644
--- a/lib/mesa/src/egl/drivers/dri2/platform_x11.c
+++ b/lib/mesa/src/egl/drivers/dri2/platform_x11.c
@@ -110,7 +110,7 @@ swrastGetDrawableInfo(__DRIdrawable * draw,
xcb_get_geometry_reply_t *reply;
xcb_generic_error_t *error;
- *x = *y = *w = *h = 0;
+ *w = *h = 0;
cookie = xcb_get_geometry (dri2_dpy->conn, dri2_surf->drawable);
reply = xcb_get_geometry_reply (dri2_dpy->conn, cookie, &error);
if (reply == NULL)
@@ -120,8 +120,6 @@ swrastGetDrawableInfo(__DRIdrawable * draw,
_eglLog(_EGL_WARNING, "error in xcb_get_geometry");
free(error);
} else {
- *x = reply->x;
- *y = reply->y;
*w = reply->width;
*h = reply->height;
}
@@ -208,8 +206,10 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
struct dri2_egl_surface *dri2_surf;
xcb_get_geometry_cookie_t cookie;
xcb_get_geometry_reply_t *reply;
+ xcb_screen_iterator_t s;
xcb_generic_error_t *error;
xcb_drawable_t drawable;
+ xcb_screen_t *screen;
const __DRIconfig *config;
STATIC_ASSERT(sizeof(uintptr_t) == sizeof(native_surface));
@@ -228,9 +228,16 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
dri2_surf->region = XCB_NONE;
if (type == EGL_PBUFFER_BIT) {
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ screen = get_xcb_screen(s, dri2_dpy->screen);
+ if (!screen) {
+ _eglError(EGL_BAD_ALLOC, "failed to get xcb screen");
+ goto cleanup_surf;
+ }
+
dri2_surf->drawable = xcb_generate_id(dri2_dpy->conn);
xcb_create_pixmap(dri2_dpy->conn, conf->BufferSize,
- dri2_surf->drawable, dri2_dpy->screen->root,
+ dri2_surf->drawable, screen->root,
dri2_surf->base.Width, dri2_surf->base.Height);
} else {
if (!drawable) {
@@ -248,13 +255,13 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
if (dri2_dpy->dri2) {
dri2_surf->dri_drawable =
- dri2_dpy->dri2->createNewDrawable(dri2_dpy->dri_screen, config,
- dri2_surf);
+ (*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
+ dri2_surf);
} else {
assert(dri2_dpy->swrast);
dri2_surf->dri_drawable =
- dri2_dpy->swrast->createNewDrawable(dri2_dpy->dri_screen, config,
- dri2_surf);
+ (*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen, config,
+ dri2_surf);
}
if (dri2_surf->dri_drawable == NULL) {
@@ -379,7 +386,7 @@ dri2_x11_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
(void) drv;
- dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable);
+ (*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
if (dri2_dpy->dri2) {
xcb_dri2_destroy_drawable (dri2_dpy->conn, dri2_surf->drawable);
@@ -397,40 +404,6 @@ dri2_x11_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
}
/**
- * Function utilizes swrastGetDrawableInfo to get surface
- * geometry from x server and calls default query surface
- * implementation that returns the updated values.
- *
- * In case of errors we still return values that we currently
- * have.
- */
-static EGLBoolean
-dri2_query_surface(_EGLDriver *drv, _EGLDisplay *dpy,
- _EGLSurface *surf, EGLint attribute,
- EGLint *value)
-{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
- int x, y, w = -1, h = -1;
-
- __DRIdrawable *drawable = dri2_dpy->vtbl->get_dri_drawable(surf);
-
- switch (attribute) {
- case EGL_WIDTH:
- case EGL_HEIGHT:
- swrastGetDrawableInfo(drawable, &x, &y, &w, &h, dri2_surf);
- if (w != -1 && h != -1) {
- surf->Width = w;
- surf->Height = h;
- }
- break;
- default:
- break;
- }
- return _eglQuerySurface(drv, dpy, surf, attribute, value);
-}
-
-/**
* Process list of buffer received from the server
*
* Processes the list of buffers received in a reply from the server to either
@@ -571,10 +544,20 @@ dri2_x11_do_authenticate(struct dri2_egl_display *dri2_dpy, uint32_t id)
{
xcb_dri2_authenticate_reply_t *authenticate;
xcb_dri2_authenticate_cookie_t authenticate_cookie;
+ xcb_screen_iterator_t s;
+ xcb_screen_t *screen;
int ret = 0;
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+
+ screen = get_xcb_screen(s, dri2_dpy->screen);
+ if (!screen) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to get xcb screen");
+ return -1;
+ }
+
authenticate_cookie =
- xcb_dri2_authenticate_unchecked(dri2_dpy->conn, dri2_dpy->screen->root, id);
+ xcb_dri2_authenticate_unchecked(dri2_dpy->conn, screen->root, id);
authenticate =
xcb_dri2_authenticate_reply(dri2_dpy->conn, authenticate_cookie, NULL);
@@ -615,6 +598,8 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
xcb_dri2_connect_reply_t *connect;
xcb_dri2_connect_cookie_t connect_cookie;
xcb_generic_error_t *error;
+ xcb_screen_iterator_t s;
+ xcb_screen_t *screen;
char *driver_name, *loader_driver_name, *device_name;
const xcb_query_extension_reply_t *extension;
@@ -637,7 +622,13 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
XCB_DRI2_MAJOR_VERSION,
XCB_DRI2_MINOR_VERSION);
- connect_cookie = xcb_dri2_connect_unchecked(dri2_dpy->conn, dri2_dpy->screen->root,
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ screen = get_xcb_screen(s, dri2_dpy->screen);
+ if (!screen) {
+ _eglLog(_EGL_WARNING, "DRI2: failed to get xcb screen");
+ return EGL_FALSE;
+ }
+ connect_cookie = xcb_dri2_connect_unchecked(dri2_dpy->conn, screen->root,
XCB_DRI2_DRIVER_TYPE_DRI);
xfixes_query =
@@ -729,6 +720,7 @@ static EGLBoolean
dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
_EGLDisplay *disp, bool supports_preserved)
{
+ xcb_screen_iterator_t s;
xcb_depth_iterator_t d;
xcb_visualtype_t *visuals;
int i, j, count;
@@ -740,7 +732,8 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
EGL_NONE
};
- d = xcb_screen_allowed_depths_iterator(dri2_dpy->screen);
+ s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
+ d = xcb_screen_allowed_depths_iterator(get_xcb_screen(s, dri2_dpy->screen));
count = 0;
surface_type =
@@ -774,8 +767,7 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
dri2_conf = dri2_add_config(disp, config, count + 1, surface_type,
config_attrs, rgba_masks);
if (dri2_conf)
- if (dri2_conf->base.ConfigID == count + 1)
- count++;
+ count++;
/* Allow a 24-bit RGB visual to match a 32-bit RGBA EGLConfig.
* Otherwise it will only match a 32-bit RGBA visual. On a
@@ -790,8 +782,7 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
dri2_conf = dri2_add_config(disp, config, count + 1, surface_type,
config_attrs, rgba_masks);
if (dri2_conf)
- if (dri2_conf->base.ConfigID == count + 1)
- count++;
+ count++;
}
}
}
@@ -821,7 +812,7 @@ dri2_copy_region(_EGLDriver *drv, _EGLDisplay *disp,
return EGL_TRUE;
if (dri2_dpy->flush)
- dri2_dpy->flush->flush(dri2_surf->dri_drawable);
+ (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
if (dri2_surf->have_fake_front)
render_attachment = XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT;
@@ -885,7 +876,7 @@ dri2_x11_swap_buffers_msc(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw,
*/
if (dri2_dpy->flush &&
dri2_dpy->flush->base.version >= 3 && dri2_dpy->flush->invalidate)
- dri2_dpy->flush->invalidate(dri2_surf->dri_drawable);
+ (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
return swap_count;
}
@@ -901,7 +892,7 @@ dri2_x11_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
return EGL_TRUE;
}
/* Swap failed with a window drawable. */
- _eglError(EGL_BAD_NATIVE_WINDOW, __func__);
+ _eglError(EGL_BAD_NATIVE_WINDOW, __FUNCTION__);
return EGL_FALSE;
} else {
assert(dri2_dpy->swrast);
@@ -987,7 +978,7 @@ dri2_x11_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
(void) drv;
- dri2_dpy->flush->flush(dri2_surf->dri_drawable);
+ (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
gc = xcb_generate_id(dri2_dpy->conn);
xcb_create_gc(dri2_dpy->conn, gc, target, 0, NULL);
@@ -1151,7 +1142,6 @@ static struct dri2_egl_display_vtbl dri2_x11_swrast_display_vtbl = {
.post_sub_buffer = dri2_fallback_post_sub_buffer,
.copy_buffers = dri2_x11_copy_buffers,
.query_buffer_age = dri2_fallback_query_buffer_age,
- .query_surface = dri2_query_surface,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
@@ -1171,7 +1161,6 @@ static struct dri2_egl_display_vtbl dri2_x11_display_vtbl = {
.post_sub_buffer = dri2_x11_post_sub_buffer,
.copy_buffers = dri2_x11_copy_buffers,
.query_buffer_age = dri2_fallback_query_buffer_age,
- .query_surface = dri2_query_surface,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_x11_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
@@ -1191,55 +1180,29 @@ static const __DRIextension *swrast_loader_extensions[] = {
};
static EGLBoolean
-dri2_get_xcb_connection(_EGLDriver *drv, _EGLDisplay *disp,
- struct dri2_egl_display *dri2_dpy)
+dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
{
- xcb_screen_iterator_t s;
- int screen = 0;
- const char *msg;
+ struct dri2_egl_display *dri2_dpy;
+
+ dri2_dpy = calloc(1, sizeof *dri2_dpy);
+ if (!dri2_dpy)
+ return _eglError(EGL_BAD_ALLOC, "eglInitialize");
disp->DriverData = (void *) dri2_dpy;
if (disp->PlatformDisplay == NULL) {
- dri2_dpy->conn = xcb_connect(NULL, &screen);
+ dri2_dpy->conn = xcb_connect(0, &dri2_dpy->screen);
dri2_dpy->own_device = true;
} else {
Display *dpy = disp->PlatformDisplay;
dri2_dpy->conn = XGetXCBConnection(dpy);
- screen = DefaultScreen(dpy);
+ dri2_dpy->screen = DefaultScreen(dpy);
}
if (!dri2_dpy->conn || xcb_connection_has_error(dri2_dpy->conn)) {
- msg = "xcb_connect failed";
- goto disconnect;
- }
-
- s = xcb_setup_roots_iterator(xcb_get_setup(dri2_dpy->conn));
- dri2_dpy->screen = get_xcb_screen(s, screen);
- if (!dri2_dpy->screen) {
- msg = "failed to get xcb screen";
- goto disconnect;
- }
-
- return EGL_TRUE;
-disconnect:
- if (disp->PlatformDisplay == NULL)
- xcb_disconnect(dri2_dpy->conn);
-
- return _eglError(EGL_BAD_ALLOC, msg);
-}
-
-static EGLBoolean
-dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
-{
- struct dri2_egl_display *dri2_dpy;
-
- dri2_dpy = calloc(1, sizeof *dri2_dpy);
- if (!dri2_dpy)
- return _eglError(EGL_BAD_ALLOC, "eglInitialize");
-
- if (!dri2_get_xcb_connection(drv, disp, dri2_dpy))
+ _eglLog(_EGL_WARNING, "DRI2: xcb_connect failed");
goto cleanup_dpy;
+ }
/*
* Every hardware driver_name is set using strdup. Doing the same in
@@ -1345,8 +1308,21 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay *disp)
if (!dri2_dpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
- if (!dri2_get_xcb_connection(drv, disp, dri2_dpy))
+ disp->DriverData = (void *) dri2_dpy;
+ if (disp->PlatformDisplay == NULL) {
+ dri2_dpy->conn = xcb_connect(0, &dri2_dpy->screen);
+ dri2_dpy->own_device = true;
+ } else {
+ Display *dpy = disp->PlatformDisplay;
+
+ dri2_dpy->conn = XGetXCBConnection(dpy);
+ dri2_dpy->screen = DefaultScreen(dpy);
+ }
+
+ if (!dri2_dpy->conn || xcb_connection_has_error(dri2_dpy->conn)) {
+ _eglLog(_EGL_WARNING, "DRI3: xcb_connect failed");
goto cleanup_dpy;
+ }
if (!dri3_x11_connect(dri2_dpy))
goto cleanup_conn;
@@ -1427,14 +1403,12 @@ static const __DRIdri2LoaderExtension dri2_loader_extension = {
static const __DRIextension *dri2_loader_extensions_old[] = {
&dri2_loader_extension_old.base,
&image_lookup_extension.base,
- &background_callable_extension.base,
NULL,
};
static const __DRIextension *dri2_loader_extensions[] = {
&dri2_loader_extension.base,
&image_lookup_extension.base,
- &background_callable_extension.base,
NULL,
};
@@ -1447,8 +1421,21 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
if (!dri2_dpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
- if (!dri2_get_xcb_connection(drv, disp, dri2_dpy))
+ disp->DriverData = (void *) dri2_dpy;
+ if (disp->PlatformDisplay == NULL) {
+ dri2_dpy->conn = xcb_connect(0, &dri2_dpy->screen);
+ dri2_dpy->own_device = true;
+ } else {
+ Display *dpy = disp->PlatformDisplay;
+
+ dri2_dpy->conn = XGetXCBConnection(dpy);
+ dri2_dpy->screen = DefaultScreen(dpy);
+ }
+
+ if (!dri2_dpy->conn || xcb_connection_has_error(dri2_dpy->conn)) {
+ _eglLog(_EGL_WARNING, "DRI2: xcb_connect failed");
goto cleanup_dpy;
+ }
if (!dri2_x11_connect(dri2_dpy))
goto cleanup_conn;
@@ -1509,20 +1496,24 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
EGLBoolean
dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
{
- EGLBoolean initialized = EGL_FALSE;
+ EGLBoolean initialized = EGL_TRUE;
+
+ int x11_dri2_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL);
- if (!getenv("LIBGL_ALWAYS_SOFTWARE")) {
+ if (x11_dri2_accel) {
#ifdef HAVE_DRI3
- if (!getenv("LIBGL_DRI3_DISABLE"))
- initialized = dri2_initialize_x11_dri3(drv, disp);
+ if (getenv("LIBGL_DRI3_DISABLE") != NULL ||
+ !dri2_initialize_x11_dri3(drv, disp)) {
#endif
-
- if (!initialized)
- initialized = dri2_initialize_x11_dri2(drv, disp);
- }
-
- if (!initialized)
+ if (!dri2_initialize_x11_dri2(drv, disp)) {
+ initialized = dri2_initialize_x11_swrast(drv, disp);
+ }
+#ifdef HAVE_DRI3
+ }
+#endif
+ } else {
initialized = dri2_initialize_x11_swrast(drv, disp);
+ }
return initialized;
}
diff --git a/lib/mesa/src/egl/drivers/dri2/platform_x11_dri3.c b/lib/mesa/src/egl/drivers/dri2/platform_x11_dri3.c
index 8e4a131b1..1648ef08d 100644
--- a/lib/mesa/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/lib/mesa/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -96,11 +96,24 @@ static __DRIcontext *
egl_dri3_get_dri_context(struct loader_dri3_drawable *draw)
{
_EGLContext *ctx = _eglGetCurrentContext();
- struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
-
+ struct dri2_egl_context *dri2_ctx;
+ if (!ctx)
+ return NULL;
+ dri2_ctx = dri2_egl_context(ctx);
return dri2_ctx->dri_context;
}
+static __DRIscreen *
+egl_dri3_get_dri_screen(struct loader_dri3_drawable *draw)
+{
+ _EGLContext *ctx = _eglGetCurrentContext();
+ struct dri2_egl_context *dri2_ctx;
+ if (!ctx)
+ return NULL;
+ dri2_ctx = dri2_egl_context(ctx);
+ return dri2_egl_display(dri2_ctx->base.Resource.Display)->dri_screen;
+}
+
static void
egl_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags)
{
@@ -110,13 +123,14 @@ egl_dri3_flush_drawable(struct loader_dri3_drawable *draw, unsigned flags)
dri2_flush_drawable_for_swapbuffers(disp, &dri3_surf->base);
}
-static struct loader_dri3_vtable egl_dri3_vtable = {
+static const struct loader_dri3_vtable egl_dri3_vtable = {
.get_swap_interval = egl_dri3_get_swap_interval,
.clamp_swap_interval = egl_dri3_clamp_swap_interval,
.set_swap_interval = egl_dri3_set_swap_interval,
.set_drawable_size = egl_dri3_set_drawable_size,
.in_current_context = egl_dri3_in_current_context,
.get_dri_context = egl_dri3_get_dri_context,
+ .get_dri_screen = egl_dri3_get_dri_screen,
.flush_drawable = egl_dri3_flush_drawable,
.show_fps = NULL,
};
@@ -128,9 +142,6 @@ dri3_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
(void) drv;
- if (!_eglPutSurface(surf))
- return EGL_TRUE;
-
loader_dri3_drawable_fini(&dri3_surf->loader_drawable);
free(surf);
@@ -224,6 +235,25 @@ dri3_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
return NULL;
}
+static int
+dri3_authenticate(_EGLDisplay *disp, uint32_t id)
+{
+#ifdef HAVE_WAYLAND_PLATFORM
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+
+ if (dri2_dpy->device_name) {
+ _eglLog(_EGL_WARNING,
+ "Wayland client render node authentication is unnecessary");
+ return 0;
+ }
+
+ _eglLog(_EGL_WARNING,
+ "Wayland client primary node authentication isn't supported");
+#endif
+
+ return -1;
+}
+
/**
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
*/
@@ -408,6 +438,25 @@ dri3_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
return loader_dri3_query_buffer_age(&dri3_surf->loader_drawable);
}
+static EGLBoolean
+dri3_query_surface(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surf, EGLint attribute,
+ EGLint *value)
+{
+ struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
+
+ switch (attribute) {
+ case EGL_WIDTH:
+ case EGL_HEIGHT:
+ loader_dri3_update_drawable_geometry(&dri3_surf->loader_drawable);
+ break;
+ default:
+ break;
+ }
+
+ return _eglQuerySurface(drv, dpy, surf, attribute, value);
+}
+
static __DRIdrawable *
dri3_get_dri_drawable(_EGLSurface *surf)
{
@@ -417,7 +466,7 @@ dri3_get_dri_drawable(_EGLSurface *surf)
}
struct dri2_egl_display_vtbl dri3_x11_display_vtbl = {
- .authenticate = NULL,
+ .authenticate = dri3_authenticate,
.create_window_surface = dri3_create_window_surface,
.create_pixmap_surface = dri3_create_pixmap_surface,
.create_pbuffer_surface = dri3_create_pbuffer_surface,
@@ -430,34 +479,12 @@ struct dri2_egl_display_vtbl dri3_x11_display_vtbl = {
.post_sub_buffer = dri2_fallback_post_sub_buffer,
.copy_buffers = dri3_copy_buffers,
.query_buffer_age = dri3_query_buffer_age,
+ .query_surface = dri3_query_surface,
.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri3_get_sync_values,
.get_dri_drawable = dri3_get_dri_drawable,
};
-static char *
-dri3_get_device_name(int fd)
-{
- char *ret = NULL;
-
- ret = drmGetRenderDeviceNameFromFd(fd);
- if (ret)
- return ret;
-
- /* For dri3, render node support is required for WL_bind_wayland_display.
- * In order not to regress on older systems without kernel or libdrm
- * support, fall back to dri2. User can override it with environment
- * variable if they don't need to use that extension.
- */
- if (getenv("EGL_FORCE_DRI3") == NULL) {
- _eglLog(_EGL_WARNING, "Render node support not available, falling back to dri2");
- _eglLog(_EGL_WARNING, "If you want to force dri3, set EGL_FORCE_DRI3 environment variable");
- } else
- ret = loader_get_device_name_for_fd(fd);
-
- return ret;
-}
-
EGLBoolean
dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
{
@@ -530,18 +557,19 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
dri2_dpy->fd = loader_get_user_preferred_fd(dri2_dpy->fd, &dri2_dpy->is_different_gpu);
- dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd, 0);
+ dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd);
if (!dri2_dpy->driver_name) {
_eglLog(_EGL_WARNING, "DRI3: No driver found");
close(dri2_dpy->fd);
return EGL_FALSE;
}
- dri2_dpy->device_name = dri3_get_device_name(dri2_dpy->fd);
- if (!dri2_dpy->device_name) {
- close(dri2_dpy->fd);
- return EGL_FALSE;
- }
+#ifdef HAVE_WAYLAND_PLATFORM
+ /* Only try to get a render device name since dri3 doesn't provide a
+ * mechanism for authenticating client opened device node fds. If this
+ * fails then don't advertise the extension. */
+ dri2_dpy->device_name = drmGetRenderDeviceNameFromFd(dri2_dpy->fd);
+#endif
return EGL_TRUE;
}
diff --git a/lib/mesa/src/egl/egl-entrypoint-check b/lib/mesa/src/egl/egl-entrypoint-check
deleted file mode 100755
index 36ee5c615..000000000
--- a/lib/mesa/src/egl/egl-entrypoint-check
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-if [ -z "$srcdir" ]
-then
- srcdir=$(dirname "$0")
-fi
-
-entrypoints=$(grep EGL_ENTRYPOINT "$srcdir"/main/eglentrypoint.h)
-sorted=$(sort <<< "$entrypoints")
-test "$entrypoints" = "$sorted"
diff --git a/lib/mesa/src/egl/egl-symbols-check b/lib/mesa/src/egl/egl-symbols-check
index 5d46fed57..409867fab 100755
--- a/lib/mesa/src/egl/egl-symbols-check
+++ b/lib/mesa/src/egl/egl-symbols-check
@@ -46,6 +46,8 @@ eglWaitClient
eglWaitGL
eglWaitNative
eglWaitSync
+MesaGLInteropEGLQueryDeviceInfo
+MesaGLInteropEGLExportObject
_fini
_init
EOF
diff --git a/lib/mesa/src/egl/g_egldispatchstubs.c b/lib/mesa/src/egl/g_egldispatchstubs.c
deleted file mode 100644
index 9f108d98b..000000000
--- a/lib/mesa/src/egl/g_egldispatchstubs.c
+++ /dev/null
@@ -1,400 +0,0 @@
-#include "egldispatchstubs.h"
-#include "g_egldispatchstubs.h"
-
-static EGLBoolean EGLAPIENTRY dispatch_eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglBindWaylandDisplayWL)(EGLDisplay dpy, struct wl_display *display);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglBindWaylandDisplayWL _ptr_eglBindWaylandDisplayWL = (_pfn_eglBindWaylandDisplayWL) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglBindWaylandDisplayWL);
- if(_ptr_eglBindWaylandDisplayWL != NULL) {
- _ret = _ptr_eglBindWaylandDisplayWL(dpy, display);
- }
- return _ret;
-}
-static EGLint EGLAPIENTRY dispatch_eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
-{
- typedef EGLint EGLAPIENTRY (* _pfn_eglClientWaitSyncKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
- EGLint _ret = 0;
- _pfn_eglClientWaitSyncKHR _ptr_eglClientWaitSyncKHR = (_pfn_eglClientWaitSyncKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglClientWaitSyncKHR);
- if(_ptr_eglClientWaitSyncKHR != NULL) {
- _ret = _ptr_eglClientWaitSyncKHR(dpy, sync, flags, timeout);
- }
- return _ret;
-}
-static EGLImageKHR EGLAPIENTRY dispatch_eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attrib_list)
-{
- typedef EGLImageKHR EGLAPIENTRY (* _pfn_eglCreateDRMImageMESA)(EGLDisplay dpy, const EGLint *attrib_list);
- EGLImageKHR _ret = 0;
- _pfn_eglCreateDRMImageMESA _ptr_eglCreateDRMImageMESA = (_pfn_eglCreateDRMImageMESA) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglCreateDRMImageMESA);
- if(_ptr_eglCreateDRMImageMESA != NULL) {
- _ret = _ptr_eglCreateDRMImageMESA(dpy, attrib_list);
- }
- return _ret;
-}
-static EGLImageKHR EGLAPIENTRY dispatch_eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
-{
- typedef EGLImageKHR EGLAPIENTRY (* _pfn_eglCreateImageKHR)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
- EGLImageKHR _ret = 0;
- _pfn_eglCreateImageKHR _ptr_eglCreateImageKHR = (_pfn_eglCreateImageKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglCreateImageKHR);
- if(_ptr_eglCreateImageKHR != NULL) {
- _ret = _ptr_eglCreateImageKHR(dpy, ctx, target, buffer, attrib_list);
- }
- return _ret;
-}
-static EGLSurface EGLAPIENTRY dispatch_eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list)
-{
- typedef EGLSurface EGLAPIENTRY (* _pfn_eglCreatePlatformPixmapSurfaceEXT)(EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
- EGLSurface _ret = EGL_NO_SURFACE;
- _pfn_eglCreatePlatformPixmapSurfaceEXT _ptr_eglCreatePlatformPixmapSurfaceEXT = (_pfn_eglCreatePlatformPixmapSurfaceEXT) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglCreatePlatformPixmapSurfaceEXT);
- if(_ptr_eglCreatePlatformPixmapSurfaceEXT != NULL) {
- _ret = _ptr_eglCreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list);
- }
- return _ret;
-}
-static EGLSurface EGLAPIENTRY dispatch_eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list)
-{
- typedef EGLSurface EGLAPIENTRY (* _pfn_eglCreatePlatformWindowSurfaceEXT)(EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
- EGLSurface _ret = EGL_NO_SURFACE;
- _pfn_eglCreatePlatformWindowSurfaceEXT _ptr_eglCreatePlatformWindowSurfaceEXT = (_pfn_eglCreatePlatformWindowSurfaceEXT) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglCreatePlatformWindowSurfaceEXT);
- if(_ptr_eglCreatePlatformWindowSurfaceEXT != NULL) {
- _ret = _ptr_eglCreatePlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list);
- }
- return _ret;
-}
-static EGLSyncKHR EGLAPIENTRY dispatch_eglCreateSync64KHR(EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list)
-{
- typedef EGLSyncKHR EGLAPIENTRY (* _pfn_eglCreateSync64KHR)(EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
- EGLSyncKHR _ret = 0;
- _pfn_eglCreateSync64KHR _ptr_eglCreateSync64KHR = (_pfn_eglCreateSync64KHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglCreateSync64KHR);
- if(_ptr_eglCreateSync64KHR != NULL) {
- _ret = _ptr_eglCreateSync64KHR(dpy, type, attrib_list);
- }
- return _ret;
-}
-static EGLSyncKHR EGLAPIENTRY dispatch_eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
-{
- typedef EGLSyncKHR EGLAPIENTRY (* _pfn_eglCreateSyncKHR)(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
- EGLSyncKHR _ret = 0;
- _pfn_eglCreateSyncKHR _ptr_eglCreateSyncKHR = (_pfn_eglCreateSyncKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglCreateSyncKHR);
- if(_ptr_eglCreateSyncKHR != NULL) {
- _ret = _ptr_eglCreateSyncKHR(dpy, type, attrib_list);
- }
- return _ret;
-}
-static struct wl_buffer * EGLAPIENTRY dispatch_eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImage image)
-{
- typedef struct wl_buffer * EGLAPIENTRY (* _pfn_eglCreateWaylandBufferFromImageWL)(EGLDisplay dpy, EGLImage image);
- struct wl_buffer * _ret = NULL;
- _pfn_eglCreateWaylandBufferFromImageWL _ptr_eglCreateWaylandBufferFromImageWL = (_pfn_eglCreateWaylandBufferFromImageWL) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglCreateWaylandBufferFromImageWL);
- if(_ptr_eglCreateWaylandBufferFromImageWL != NULL) {
- _ret = _ptr_eglCreateWaylandBufferFromImageWL(dpy, image);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglDestroyImageKHR)(EGLDisplay dpy, EGLImageKHR image);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglDestroyImageKHR _ptr_eglDestroyImageKHR = (_pfn_eglDestroyImageKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglDestroyImageKHR);
- if(_ptr_eglDestroyImageKHR != NULL) {
- _ret = _ptr_eglDestroyImageKHR(dpy, image);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglDestroySyncKHR)(EGLDisplay dpy, EGLSyncKHR sync);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglDestroySyncKHR _ptr_eglDestroySyncKHR = (_pfn_eglDestroySyncKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglDestroySyncKHR);
- if(_ptr_eglDestroySyncKHR != NULL) {
- _ret = _ptr_eglDestroySyncKHR(dpy, sync);
- }
- return _ret;
-}
-static EGLint EGLAPIENTRY dispatch_eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync)
-{
- typedef EGLint EGLAPIENTRY (* _pfn_eglDupNativeFenceFDANDROID)(EGLDisplay dpy, EGLSyncKHR sync);
- EGLint _ret = 0;
- _pfn_eglDupNativeFenceFDANDROID _ptr_eglDupNativeFenceFDANDROID = (_pfn_eglDupNativeFenceFDANDROID) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglDupNativeFenceFDANDROID);
- if(_ptr_eglDupNativeFenceFDANDROID != NULL) {
- _ret = _ptr_eglDupNativeFenceFDANDROID(dpy, sync);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglExportDMABUFImageMESA(EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglExportDMABUFImageMESA)(EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglExportDMABUFImageMESA _ptr_eglExportDMABUFImageMESA = (_pfn_eglExportDMABUFImageMESA) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglExportDMABUFImageMESA);
- if(_ptr_eglExportDMABUFImageMESA != NULL) {
- _ret = _ptr_eglExportDMABUFImageMESA(dpy, image, fds, strides, offsets);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglExportDMABUFImageQueryMESA)(EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglExportDMABUFImageQueryMESA _ptr_eglExportDMABUFImageQueryMESA = (_pfn_eglExportDMABUFImageQueryMESA) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglExportDMABUFImageQueryMESA);
- if(_ptr_eglExportDMABUFImageQueryMESA != NULL) {
- _ret = _ptr_eglExportDMABUFImageQueryMESA(dpy, image, fourcc, num_planes, modifiers);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglExportDRMImageMESA)(EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglExportDRMImageMESA _ptr_eglExportDRMImageMESA = (_pfn_eglExportDRMImageMESA) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglExportDRMImageMESA);
- if(_ptr_eglExportDRMImageMESA != NULL) {
- _ret = _ptr_eglExportDRMImageMESA(dpy, image, name, handle, stride);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglGetSyncAttribKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglGetSyncAttribKHR _ptr_eglGetSyncAttribKHR = (_pfn_eglGetSyncAttribKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglGetSyncAttribKHR);
- if(_ptr_eglGetSyncAttribKHR != NULL) {
- _ret = _ptr_eglGetSyncAttribKHR(dpy, sync, attribute, value);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglGetSyncValuesCHROMIUM(EGLDisplay display, EGLSurface surface, EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglGetSyncValuesCHROMIUM)(EGLDisplay display, EGLSurface surface, EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglGetSyncValuesCHROMIUM _ptr_eglGetSyncValuesCHROMIUM = (_pfn_eglGetSyncValuesCHROMIUM) __eglDispatchFetchByDisplay(display, __EGL_DISPATCH_eglGetSyncValuesCHROMIUM);
- if(_ptr_eglGetSyncValuesCHROMIUM != NULL) {
- _ret = _ptr_eglGetSyncValuesCHROMIUM(display, surface, ust, msc, sbc);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglPostSubBufferNV)(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglPostSubBufferNV _ptr_eglPostSubBufferNV = (_pfn_eglPostSubBufferNV) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglPostSubBufferNV);
- if(_ptr_eglPostSubBufferNV != NULL) {
- _ret = _ptr_eglPostSubBufferNV(dpy, surface, x, y, width, height);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglQueryWaylandBufferWL)(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglQueryWaylandBufferWL _ptr_eglQueryWaylandBufferWL = (_pfn_eglQueryWaylandBufferWL) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglQueryWaylandBufferWL);
- if(_ptr_eglQueryWaylandBufferWL != NULL) {
- _ret = _ptr_eglQueryWaylandBufferWL(dpy, buffer, attribute, value);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglSignalSyncKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglSignalSyncKHR _ptr_eglSignalSyncKHR = (_pfn_eglSignalSyncKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglSignalSyncKHR);
- if(_ptr_eglSignalSyncKHR != NULL) {
- _ret = _ptr_eglSignalSyncKHR(dpy, sync, mode);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglSwapBuffersRegionNOK)(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglSwapBuffersRegionNOK _ptr_eglSwapBuffersRegionNOK = (_pfn_eglSwapBuffersRegionNOK) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglSwapBuffersRegionNOK);
- if(_ptr_eglSwapBuffersRegionNOK != NULL) {
- _ret = _ptr_eglSwapBuffersRegionNOK(dpy, surface, numRects, rects);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglSwapBuffersWithDamageEXT)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglSwapBuffersWithDamageEXT _ptr_eglSwapBuffersWithDamageEXT = (_pfn_eglSwapBuffersWithDamageEXT) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglSwapBuffersWithDamageEXT);
- if(_ptr_eglSwapBuffersWithDamageEXT != NULL) {
- _ret = _ptr_eglSwapBuffersWithDamageEXT(dpy, surface, rects, n_rects);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglSwapBuffersWithDamageKHR(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglSwapBuffersWithDamageKHR)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglSwapBuffersWithDamageKHR _ptr_eglSwapBuffersWithDamageKHR = (_pfn_eglSwapBuffersWithDamageKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglSwapBuffersWithDamageKHR);
- if(_ptr_eglSwapBuffersWithDamageKHR != NULL) {
- _ret = _ptr_eglSwapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
- }
- return _ret;
-}
-static EGLBoolean EGLAPIENTRY dispatch_eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
-{
- typedef EGLBoolean EGLAPIENTRY (* _pfn_eglUnbindWaylandDisplayWL)(EGLDisplay dpy, struct wl_display *display);
- EGLBoolean _ret = EGL_FALSE;
- _pfn_eglUnbindWaylandDisplayWL _ptr_eglUnbindWaylandDisplayWL = (_pfn_eglUnbindWaylandDisplayWL) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglUnbindWaylandDisplayWL);
- if(_ptr_eglUnbindWaylandDisplayWL != NULL) {
- _ret = _ptr_eglUnbindWaylandDisplayWL(dpy, display);
- }
- return _ret;
-}
-static EGLint EGLAPIENTRY dispatch_eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
-{
- typedef EGLint EGLAPIENTRY (* _pfn_eglWaitSyncKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
- EGLint _ret = 0;
- _pfn_eglWaitSyncKHR _ptr_eglWaitSyncKHR = (_pfn_eglWaitSyncKHR) __eglDispatchFetchByDisplay(dpy, __EGL_DISPATCH_eglWaitSyncKHR);
- if(_ptr_eglWaitSyncKHR != NULL) {
- _ret = _ptr_eglWaitSyncKHR(dpy, sync, flags);
- }
- return _ret;
-}
-
-const char * const __EGL_DISPATCH_FUNC_NAMES[__EGL_DISPATCH_COUNT + 1] = {
- "eglBindAPI",
- "eglBindTexImage",
- "eglBindWaylandDisplayWL",
- "eglChooseConfig",
- "eglClientWaitSync",
- "eglClientWaitSyncKHR",
- "eglCopyBuffers",
- "eglCreateContext",
- "eglCreateDRMImageMESA",
- "eglCreateImage",
- "eglCreateImageKHR",
- "eglCreatePbufferFromClientBuffer",
- "eglCreatePbufferSurface",
- "eglCreatePixmapSurface",
- "eglCreatePlatformPixmapSurface",
- "eglCreatePlatformPixmapSurfaceEXT",
- "eglCreatePlatformWindowSurface",
- "eglCreatePlatformWindowSurfaceEXT",
- "eglCreateSync",
- "eglCreateSync64KHR",
- "eglCreateSyncKHR",
- "eglCreateWaylandBufferFromImageWL",
- "eglCreateWindowSurface",
- "eglDestroyContext",
- "eglDestroyImage",
- "eglDestroyImageKHR",
- "eglDestroySurface",
- "eglDestroySync",
- "eglDestroySyncKHR",
- "eglDupNativeFenceFDANDROID",
- "eglExportDMABUFImageMESA",
- "eglExportDMABUFImageQueryMESA",
- "eglExportDRMImageMESA",
- "eglGetConfigAttrib",
- "eglGetConfigs",
- "eglGetCurrentContext",
- "eglGetCurrentDisplay",
- "eglGetCurrentSurface",
- "eglGetDisplay",
- "eglGetError",
- "eglGetPlatformDisplay",
- "eglGetPlatformDisplayEXT",
- "eglGetProcAddress",
- "eglGetSyncAttrib",
- "eglGetSyncAttribKHR",
- "eglGetSyncValuesCHROMIUM",
- "eglInitialize",
- "eglMakeCurrent",
- "eglPostSubBufferNV",
- "eglQueryAPI",
- "eglQueryContext",
- "eglQueryString",
- "eglQuerySurface",
- "eglQueryWaylandBufferWL",
- "eglReleaseTexImage",
- "eglReleaseThread",
- "eglSignalSyncKHR",
- "eglSurfaceAttrib",
- "eglSwapBuffers",
- "eglSwapBuffersRegionNOK",
- "eglSwapBuffersWithDamageEXT",
- "eglSwapBuffersWithDamageKHR",
- "eglSwapInterval",
- "eglTerminate",
- "eglUnbindWaylandDisplayWL",
- "eglWaitClient",
- "eglWaitGL",
- "eglWaitNative",
- "eglWaitSync",
- "eglWaitSyncKHR",
- NULL
-};
-const __eglMustCastToProperFunctionPointerType __EGL_DISPATCH_FUNCS[__EGL_DISPATCH_COUNT + 1] = {
- NULL, // eglBindAPI
- NULL, // eglBindTexImage
- (__eglMustCastToProperFunctionPointerType) dispatch_eglBindWaylandDisplayWL,
- NULL, // eglChooseConfig
- NULL, // eglClientWaitSync
- (__eglMustCastToProperFunctionPointerType) dispatch_eglClientWaitSyncKHR,
- NULL, // eglCopyBuffers
- NULL, // eglCreateContext
- (__eglMustCastToProperFunctionPointerType) dispatch_eglCreateDRMImageMESA,
- NULL, // eglCreateImage
- (__eglMustCastToProperFunctionPointerType) dispatch_eglCreateImageKHR,
- NULL, // eglCreatePbufferFromClientBuffer
- NULL, // eglCreatePbufferSurface
- NULL, // eglCreatePixmapSurface
- NULL, // eglCreatePlatformPixmapSurface
- (__eglMustCastToProperFunctionPointerType) dispatch_eglCreatePlatformPixmapSurfaceEXT,
- NULL, // eglCreatePlatformWindowSurface
- (__eglMustCastToProperFunctionPointerType) dispatch_eglCreatePlatformWindowSurfaceEXT,
- NULL, // eglCreateSync
- (__eglMustCastToProperFunctionPointerType) dispatch_eglCreateSync64KHR,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglCreateSyncKHR,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglCreateWaylandBufferFromImageWL,
- NULL, // eglCreateWindowSurface
- NULL, // eglDestroyContext
- NULL, // eglDestroyImage
- (__eglMustCastToProperFunctionPointerType) dispatch_eglDestroyImageKHR,
- NULL, // eglDestroySurface
- NULL, // eglDestroySync
- (__eglMustCastToProperFunctionPointerType) dispatch_eglDestroySyncKHR,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglDupNativeFenceFDANDROID,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglExportDMABUFImageMESA,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglExportDMABUFImageQueryMESA,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglExportDRMImageMESA,
- NULL, // eglGetConfigAttrib
- NULL, // eglGetConfigs
- NULL, // eglGetCurrentContext
- NULL, // eglGetCurrentDisplay
- NULL, // eglGetCurrentSurface
- NULL, // eglGetDisplay
- NULL, // eglGetError
- NULL, // eglGetPlatformDisplay
- NULL, // eglGetPlatformDisplayEXT
- NULL, // eglGetProcAddress
- NULL, // eglGetSyncAttrib
- (__eglMustCastToProperFunctionPointerType) dispatch_eglGetSyncAttribKHR,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglGetSyncValuesCHROMIUM,
- NULL, // eglInitialize
- NULL, // eglMakeCurrent
- (__eglMustCastToProperFunctionPointerType) dispatch_eglPostSubBufferNV,
- NULL, // eglQueryAPI
- NULL, // eglQueryContext
- NULL, // eglQueryString
- NULL, // eglQuerySurface
- (__eglMustCastToProperFunctionPointerType) dispatch_eglQueryWaylandBufferWL,
- NULL, // eglReleaseTexImage
- NULL, // eglReleaseThread
- (__eglMustCastToProperFunctionPointerType) dispatch_eglSignalSyncKHR,
- NULL, // eglSurfaceAttrib
- NULL, // eglSwapBuffers
- (__eglMustCastToProperFunctionPointerType) dispatch_eglSwapBuffersRegionNOK,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglSwapBuffersWithDamageEXT,
- (__eglMustCastToProperFunctionPointerType) dispatch_eglSwapBuffersWithDamageKHR,
- NULL, // eglSwapInterval
- NULL, // eglTerminate
- (__eglMustCastToProperFunctionPointerType) dispatch_eglUnbindWaylandDisplayWL,
- NULL, // eglWaitClient
- NULL, // eglWaitGL
- NULL, // eglWaitNative
- NULL, // eglWaitSync
- (__eglMustCastToProperFunctionPointerType) dispatch_eglWaitSyncKHR,
- NULL
-};
diff --git a/lib/mesa/src/egl/g_egldispatchstubs.h b/lib/mesa/src/egl/g_egldispatchstubs.h
deleted file mode 100644
index fa76cfdc8..000000000
--- a/lib/mesa/src/egl/g_egldispatchstubs.h
+++ /dev/null
@@ -1,89 +0,0 @@
-#ifndef G_EGLDISPATCH_STUBS_H
-#define G_EGLDISPATCH_STUBS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include "glvnd/libeglabi.h"
-
-enum {
- __EGL_DISPATCH_eglBindAPI,
- __EGL_DISPATCH_eglBindTexImage,
- __EGL_DISPATCH_eglBindWaylandDisplayWL,
- __EGL_DISPATCH_eglChooseConfig,
- __EGL_DISPATCH_eglClientWaitSync,
- __EGL_DISPATCH_eglClientWaitSyncKHR,
- __EGL_DISPATCH_eglCopyBuffers,
- __EGL_DISPATCH_eglCreateContext,
- __EGL_DISPATCH_eglCreateDRMImageMESA,
- __EGL_DISPATCH_eglCreateImage,
- __EGL_DISPATCH_eglCreateImageKHR,
- __EGL_DISPATCH_eglCreatePbufferFromClientBuffer,
- __EGL_DISPATCH_eglCreatePbufferSurface,
- __EGL_DISPATCH_eglCreatePixmapSurface,
- __EGL_DISPATCH_eglCreatePlatformPixmapSurface,
- __EGL_DISPATCH_eglCreatePlatformPixmapSurfaceEXT,
- __EGL_DISPATCH_eglCreatePlatformWindowSurface,
- __EGL_DISPATCH_eglCreatePlatformWindowSurfaceEXT,
- __EGL_DISPATCH_eglCreateSync,
- __EGL_DISPATCH_eglCreateSync64KHR,
- __EGL_DISPATCH_eglCreateSyncKHR,
- __EGL_DISPATCH_eglCreateWaylandBufferFromImageWL,
- __EGL_DISPATCH_eglCreateWindowSurface,
- __EGL_DISPATCH_eglDestroyContext,
- __EGL_DISPATCH_eglDestroyImage,
- __EGL_DISPATCH_eglDestroyImageKHR,
- __EGL_DISPATCH_eglDestroySurface,
- __EGL_DISPATCH_eglDestroySync,
- __EGL_DISPATCH_eglDestroySyncKHR,
- __EGL_DISPATCH_eglDupNativeFenceFDANDROID,
- __EGL_DISPATCH_eglExportDMABUFImageMESA,
- __EGL_DISPATCH_eglExportDMABUFImageQueryMESA,
- __EGL_DISPATCH_eglExportDRMImageMESA,
- __EGL_DISPATCH_eglGetConfigAttrib,
- __EGL_DISPATCH_eglGetConfigs,
- __EGL_DISPATCH_eglGetCurrentContext,
- __EGL_DISPATCH_eglGetCurrentDisplay,
- __EGL_DISPATCH_eglGetCurrentSurface,
- __EGL_DISPATCH_eglGetDisplay,
- __EGL_DISPATCH_eglGetError,
- __EGL_DISPATCH_eglGetPlatformDisplay,
- __EGL_DISPATCH_eglGetPlatformDisplayEXT,
- __EGL_DISPATCH_eglGetProcAddress,
- __EGL_DISPATCH_eglGetSyncAttrib,
- __EGL_DISPATCH_eglGetSyncAttribKHR,
- __EGL_DISPATCH_eglGetSyncValuesCHROMIUM,
- __EGL_DISPATCH_eglInitialize,
- __EGL_DISPATCH_eglMakeCurrent,
- __EGL_DISPATCH_eglPostSubBufferNV,
- __EGL_DISPATCH_eglQueryAPI,
- __EGL_DISPATCH_eglQueryContext,
- __EGL_DISPATCH_eglQueryString,
- __EGL_DISPATCH_eglQuerySurface,
- __EGL_DISPATCH_eglQueryWaylandBufferWL,
- __EGL_DISPATCH_eglReleaseTexImage,
- __EGL_DISPATCH_eglReleaseThread,
- __EGL_DISPATCH_eglSignalSyncKHR,
- __EGL_DISPATCH_eglSurfaceAttrib,
- __EGL_DISPATCH_eglSwapBuffers,
- __EGL_DISPATCH_eglSwapBuffersRegionNOK,
- __EGL_DISPATCH_eglSwapBuffersWithDamageEXT,
- __EGL_DISPATCH_eglSwapBuffersWithDamageKHR,
- __EGL_DISPATCH_eglSwapInterval,
- __EGL_DISPATCH_eglTerminate,
- __EGL_DISPATCH_eglUnbindWaylandDisplayWL,
- __EGL_DISPATCH_eglWaitClient,
- __EGL_DISPATCH_eglWaitGL,
- __EGL_DISPATCH_eglWaitNative,
- __EGL_DISPATCH_eglWaitSync,
- __EGL_DISPATCH_eglWaitSyncKHR,
- __EGL_DISPATCH_COUNT
-};
-
-#ifdef __cplusplus
-}
-#endif
-#endif // G_EGLDISPATCH_STUBS_H
diff --git a/lib/mesa/src/egl/generate/egl.xml b/lib/mesa/src/egl/generate/egl.xml
deleted file mode 100644
index f6dbbc0f2..000000000
--- a/lib/mesa/src/egl/generate/egl.xml
+++ /dev/null
@@ -1,2412 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<registry>
- <!--
- Copyright (c) 2013-2014 The Khronos Group Inc.
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and/or associated documentation files (the
- "Materials"), to deal in the Materials without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Materials, and to
- permit persons to whom the Materials are furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Materials.
-
- THE MATERIALS ARE 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
- MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- -->
- <!--
- This file, egl.xml, is the EGL API Registry. The older ".spec" file
- format has been retired and will no longer be updated with new
- extensions and API versions. The canonical version of the registry,
- together with documentation, schema, and Python generator scripts used
- to generate C header files for EGL, can be found in the Khronos Registry
- at
- http://www.opengl.org/registry/
- -->
-
- <!-- SECTION: EGL type definitions. Does not include GL types. -->
- <types>
- <!-- These are dependencies EGL types require to be declared legally -->
- <type name="khrplatform">#include &lt;KHR/khrplatform.h&gt;</type>
- <type name="eglplatform" requires="khrplatform">#include &lt;EGL/eglplatform.h&gt;</type>
- <type name="khronos_utime_nanoseconds_t" requires="khrplatform"/>
- <type name="khronos_uint64_t" requires="khrplatform"/>
- <type name="khronos_ssize_t" requires="khrplatform"/>
- <type name="EGLNativeDisplayType" requires="eglplatform"/>
- <type name="EGLNativePixmapType" requires="eglplatform"/>
- <type name="EGLNativeWindowType" requires="eglplatform"/>
- <type name="EGLint" requires="eglplatform"/>
- <type name="NativeDisplayType" requires="eglplatform"/>
- <type name="NativePixmapType" requires="eglplatform"/>
- <type name="NativeWindowType" requires="eglplatform"/>
- <!-- Dummy placeholders for non-EGL types -->
- <type name="Bool"/>
- <!-- These are actual EGL types. -->
- <type>typedef unsigned int <name>EGLBoolean</name>;</type>
- <type>typedef unsigned int <name>EGLenum</name>;</type>
- <type requires="khrplatform">typedef intptr_t <name>EGLAttribKHR</name>;</type>
- <type requires="khrplatform">typedef intptr_t <name>EGLAttrib</name>;</type>
- <type>typedef void *<name>EGLClientBuffer</name>;</type>
- <type>typedef void *<name>EGLConfig</name>;</type>
- <type>typedef void *<name>EGLContext</name>;</type>
- <type>typedef void *<name>EGLDeviceEXT</name>;</type>
- <type>typedef void *<name>EGLDisplay</name>;</type>
- <type>typedef void *<name>EGLImage</name>;</type>
- <type>typedef void *<name>EGLImageKHR</name>;</type>
- <type>typedef void *<name>EGLLabelKHR</name>;</type>
- <type>typedef void *<name>EGLObjectKHR</name>;</type>
- <type>typedef void *<name>EGLOutputLayerEXT</name>;</type>
- <type>typedef void *<name>EGLOutputPortEXT</name>;</type>
- <type>typedef void *<name>EGLStreamKHR</name>;</type>
- <type>typedef void *<name>EGLSurface</name>;</type>
- <type>typedef void *<name>EGLSync</name>;</type>
- <type>typedef void *<name>EGLSyncKHR</name>;</type>
- <type>typedef void *<name>EGLSyncNV</name>;</type>
- <type>typedef void (*<name>__eglMustCastToProperFunctionPointerType</name>)(void);</type>
- <type requires="khrplatform">typedef khronos_utime_nanoseconds_t <name>EGLTimeKHR</name>;</type>
- <type requires="khrplatform">typedef khronos_utime_nanoseconds_t <name>EGLTime</name>;</type>
- <type requires="khrplatform">typedef khronos_utime_nanoseconds_t <name>EGLTimeNV</name>;</type>
- <type requires="khrplatform">typedef khronos_utime_nanoseconds_t <name>EGLuint64NV</name>;</type>
- <type requires="khrplatform">typedef khronos_uint64_t <name>EGLuint64KHR</name>;</type>
- <type>typedef int <name>EGLNativeFileDescriptorKHR</name>;</type>
- <type requires="khrplatform">typedef khronos_ssize_t <name>EGLsizeiANDROID</name>;</type>
- <type requires="EGLsizeiANDROID">typedef void (*<name>EGLSetBlobFuncANDROID</name>) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);</type>
- <type requires="EGLsizeiANDROID">typedef EGLsizeiANDROID (*<name>EGLGetBlobFuncANDROID</name>) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);</type>
- <type>struct <name>EGLClientPixmapHI</name> {
- void *pData;
- EGLint iWidth;
- EGLint iHeight;
- EGLint iStride;
-};</type>
- <type>typedef void (<apientry/> *<name>EGLDEBUGPROCKHR</name>)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message);</type>
- </types>
-
- <!-- SECTION: EGL enumerant (token) definitions. -->
-
- <!-- Bitmasks each have their own namespace, as do a few other
- categories of enumeration -->
-
- <enums namespace="EGLSurfaceTypeMask" type="bitmask" comment="EGL_SURFACE_TYPE bits">
- <enum value="0x0001" name="EGL_PBUFFER_BIT"/>
- <enum value="0x0002" name="EGL_PIXMAP_BIT"/>
- <enum value="0x0004" name="EGL_WINDOW_BIT"/>
- <enum value="0x0008" name="EGL_PBUFFER_IMAGE_BIT_TAO" comment="Unreleased TAO extension"/>
- <enum value="0x0010" name="EGL_PBUFFER_PALETTE_IMAGE_BIT_TAO" comment="Unreleased TAO extension"/>
- <enum value="0x0020" name="EGL_VG_COLORSPACE_LINEAR_BIT"/>
- <enum value="0x0020" name="EGL_VG_COLORSPACE_LINEAR_BIT_KHR"/>
- <enum value="0x0040" name="EGL_VG_ALPHA_FORMAT_PRE_BIT"/>
- <enum value="0x0040" name="EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR"/>
- <enum value="0x0080" name="EGL_LOCK_SURFACE_BIT_KHR"/>
- <enum value="0x0100" name="EGL_OPTIMAL_FORMAT_BIT_KHR"/>
- <enum value="0x0200" name="EGL_MULTISAMPLE_RESOLVE_BOX_BIT"/>
- <enum value="0x0400" name="EGL_SWAP_BEHAVIOR_PRESERVED_BIT"/>
- <enum value="0x0800" name="EGL_STREAM_BIT_KHR"/>
- <!--
- <enum value="0x0800" name="EGL_STREAM_BIT_NV" comment="Draft EGL_NV_stream_producer_eglsurface extension (bug 8064)"/>
- -->
- </enums>
-
- <enums namespace="EGLRenderableTypeMask" type="bitmask" comment="EGL_RENDERABLE_TYPE bits">
- <enum value="0x0001" name="EGL_OPENGL_ES_BIT"/>
- <enum value="0x0002" name="EGL_OPENVG_BIT"/>
- <enum value="0x0004" name="EGL_OPENGL_ES2_BIT"/>
- <enum value="0x0008" name="EGL_OPENGL_BIT"/>
- <enum value="0x0010" name="EGL_INTEROP_BIT_KHR" comment="EGL_KHR_interop"/>
- <enum value="0x0020" name="EGL_OPENMAX_IL_BIT_KHR" comment="EGL_KHR_interop"/>
- <enum value="0x00000040" name="EGL_OPENGL_ES3_BIT"/>
- <enum value="0x00000040" name="EGL_OPENGL_ES3_BIT_KHR" alias="EGL_OPENGL_ES3_BIT"/>
- </enums>
-
- <enums namespace="EGLLockUsageHintKHRMask" type="bitmask" comment="EGL_LOCK_USAGE_HINT_KHR bits">
- <enum value="0x0001" name="EGL_READ_SURFACE_BIT_KHR"/>
- <enum value="0x0002" name="EGL_WRITE_SURFACE_BIT_KHR"/>
- </enums>
-
- <enums namespace="EGLSyncFlagsKHR" type="bitmask" comment="Fence/reusable sync wait bits">
- <enum value="0x0001" name="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
- <enum value="0x0001" name="EGL_SYNC_FLUSH_COMMANDS_BIT_KHR" alias="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
- <enum value="0x0001" name="EGL_SYNC_FLUSH_COMMANDS_BIT_NV" alias="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
- </enums>
-
- <enums namespace="EGLDRMBufferUseMESAMask" type="bitmask" comment="EGL_DRM_BUFFER_USE_MESA bits">
- <enum value="0x00000001" name="EGL_DRM_BUFFER_USE_SCANOUT_MESA"/>
- <enum value="0x00000002" name="EGL_DRM_BUFFER_USE_SHARE_MESA"/>
- </enums>
-
- <!-- Should be shared with GL, but aren't aren't since the
- FORWARD_COMPATIBLE and DEBUG_BIT values are swapped in the
- corresponding GL enums. Oops :-( -->
- <enums namespace="EGLContextFlagMask" type="bitmask" comment="EGL_CONTEXT_FLAGS_KHR bits">
- <enum value="0x00000001" name="EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR"/>
- <enum value="0x00000002" name="EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR"/>
- <enum value="0x00000004" name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR"/>
- </enums>
-
- <enums namespace="EGLContextProfileMask" type="bitmask" comment="Shared with GL">
- <enum value="0x00000001" name="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT"/>
- <enum value="0x00000001" name="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR" alias="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT"/>
- <enum value="0x00000002" name="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT"/>
- <enum value="0x00000002" name="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR" alias="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT"/>
- </enums>
-
- <!-- The default ("API") enum namespace starts here. While some
- assigned values may overlap, and different parts of the
- namespace are reserved for different purposes, it is a single
- namespace. The "class" attribute indicates some of the reserved
- purposes but is by no means complete (and cannot be, since many
- tokens are reused for different purposes in different
- extensions and API versions). -->
-
- <enums namespace="EGL" start="0x0000" end="0x2FFF" vendor="ARB"/>
-
- <enums namespace="EGL" group="Boolean" vendor="ARB">
- <enum value="0" name="EGL_FALSE"/>
- <enum value="1" name="EGL_TRUE"/>
- </enums>
-
- <enums namespace="EGL" group="SpecialNumbers" vendor="ARB" comment="Tokens whose numeric value is intrinsically meaningful">
- <enum value="((EGLint)-1)" name="EGL_DONT_CARE"/>
- <enum value="((EGLint)-1)" name="EGL_UNKNOWN"/>
- <enum value="-1" name="EGL_NO_NATIVE_FENCE_FD_ANDROID"/>
- <enum value="0" name="EGL_DEPTH_ENCODING_NONE_NV"/>
- <enum value="((EGLContext)0)" name="EGL_NO_CONTEXT"/>
- <enum value="((EGLDeviceEXT)(0))" name="EGL_NO_DEVICE_EXT"/>
- <enum value="((EGLDisplay)0)" name="EGL_NO_DISPLAY"/>
- <enum value="((EGLImage)0)" name="EGL_NO_IMAGE"/>
- <enum value="((EGLImageKHR)0)" name="EGL_NO_IMAGE_KHR"/>
- <enum value="((EGLNativeDisplayType)0)" name="EGL_DEFAULT_DISPLAY"/>
- <enum value="((EGLNativeFileDescriptorKHR)(-1))" name="EGL_NO_FILE_DESCRIPTOR_KHR"/>
- <enum value="((EGLOutputLayerEXT)0)" name="EGL_NO_OUTPUT_LAYER_EXT"/>
- <enum value="((EGLOutputPortEXT)0)" name="EGL_NO_OUTPUT_PORT_EXT"/>
- <enum value="((EGLStreamKHR)0)" name="EGL_NO_STREAM_KHR"/>
- <enum value="((EGLSurface)0)" name="EGL_NO_SURFACE"/>
- <enum value="((EGLSync)0)" name="EGL_NO_SYNC"/>
- <enum value="((EGLSyncKHR)0)" name="EGL_NO_SYNC_KHR" alias="EGL_NO_SYNC"/>
- <enum value="((EGLSyncNV)0)" name="EGL_NO_SYNC_NV" alias="EGL_NO_SYNC"/>
- <enum value="10000" name="EGL_DISPLAY_SCALING"/>
- <enum value="0xFFFFFFFFFFFFFFFF" name="EGL_FOREVER" type="ull"/>
- <enum value="0xFFFFFFFFFFFFFFFF" name="EGL_FOREVER_KHR" type="ull" alias="EGL_FOREVER"/>
- <enum value="0xFFFFFFFFFFFFFFFF" name="EGL_FOREVER_NV" type="ull" alias="EGL_FOREVER"/>
- </enums>
-
- <enums namespace="EGL" start="0x3000" end="0x305F" vendor="KHR">
- <enum value="0x3000" name="EGL_SUCCESS"/>
- <enum value="0x3001" name="EGL_NOT_INITIALIZED"/>
- <enum value="0x3002" name="EGL_BAD_ACCESS"/>
- <enum value="0x3003" name="EGL_BAD_ALLOC"/>
- <enum value="0x3004" name="EGL_BAD_ATTRIBUTE"/>
- <enum value="0x3005" name="EGL_BAD_CONFIG"/>
- <enum value="0x3006" name="EGL_BAD_CONTEXT"/>
- <enum value="0x3007" name="EGL_BAD_CURRENT_SURFACE"/>
- <enum value="0x3008" name="EGL_BAD_DISPLAY"/>
- <enum value="0x3009" name="EGL_BAD_MATCH"/>
- <enum value="0x300A" name="EGL_BAD_NATIVE_PIXMAP"/>
- <enum value="0x300B" name="EGL_BAD_NATIVE_WINDOW"/>
- <enum value="0x300C" name="EGL_BAD_PARAMETER"/>
- <enum value="0x300D" name="EGL_BAD_SURFACE"/>
- <enum value="0x300E" name="EGL_CONTEXT_LOST"/>
- <unused start="0x300F" end="0x301F" comment="for additional errors"/>
- <enum value="0x3020" name="EGL_BUFFER_SIZE"/>
- <enum value="0x3021" name="EGL_ALPHA_SIZE"/>
- <enum value="0x3022" name="EGL_BLUE_SIZE"/>
- <enum value="0x3023" name="EGL_GREEN_SIZE"/>
- <enum value="0x3024" name="EGL_RED_SIZE"/>
- <enum value="0x3025" name="EGL_DEPTH_SIZE"/>
- <enum value="0x3026" name="EGL_STENCIL_SIZE"/>
- <enum value="0x3027" name="EGL_CONFIG_CAVEAT"/>
- <enum value="0x3028" name="EGL_CONFIG_ID"/>
- <enum value="0x3029" name="EGL_LEVEL"/>
- <enum value="0x302A" name="EGL_MAX_PBUFFER_HEIGHT"/>
- <enum value="0x302B" name="EGL_MAX_PBUFFER_PIXELS"/>
- <enum value="0x302C" name="EGL_MAX_PBUFFER_WIDTH"/>
- <enum value="0x302D" name="EGL_NATIVE_RENDERABLE"/>
- <enum value="0x302E" name="EGL_NATIVE_VISUAL_ID"/>
- <enum value="0x302F" name="EGL_NATIVE_VISUAL_TYPE"/>
- <enum value="0x3031" name="EGL_SAMPLES"/>
- <enum value="0x3032" name="EGL_SAMPLE_BUFFERS"/>
- <enum value="0x3033" name="EGL_SURFACE_TYPE"/>
- <enum value="0x3034" name="EGL_TRANSPARENT_TYPE"/>
- <enum value="0x3035" name="EGL_TRANSPARENT_BLUE_VALUE"/>
- <enum value="0x3036" name="EGL_TRANSPARENT_GREEN_VALUE"/>
- <enum value="0x3037" name="EGL_TRANSPARENT_RED_VALUE"/>
- <enum value="0x3038" name="EGL_NONE" comment="Attribute list terminator"/>
- <enum value="0x3039" name="EGL_BIND_TO_TEXTURE_RGB"/>
- <enum value="0x303A" name="EGL_BIND_TO_TEXTURE_RGBA"/>
- <enum value="0x303B" name="EGL_MIN_SWAP_INTERVAL"/>
- <enum value="0x303C" name="EGL_MAX_SWAP_INTERVAL"/>
- <enum value="0x303D" name="EGL_LUMINANCE_SIZE"/>
- <enum value="0x303E" name="EGL_ALPHA_MASK_SIZE"/>
- <enum value="0x303F" name="EGL_COLOR_BUFFER_TYPE"/>
- <enum value="0x3040" name="EGL_RENDERABLE_TYPE"/>
- <enum value="0x3041" name="EGL_MATCH_NATIVE_PIXMAP"/>
- <enum value="0x3042" name="EGL_CONFORMANT"/>
- <enum value="0x3042" name="EGL_CONFORMANT_KHR"/>
- <enum value="0x3043" name="EGL_MATCH_FORMAT_KHR"/>
- <unused start="0x3044" end="0x304F" comment="for additional config attributes"/>
- <enum value="0x3050" name="EGL_SLOW_CONFIG"/>
- <enum value="0x3051" name="EGL_NON_CONFORMANT_CONFIG"/>
- <enum value="0x3052" name="EGL_TRANSPARENT_RGB"/>
- <enum value="0x3053" name="EGL_VENDOR"/>
- <enum value="0x3054" name="EGL_VERSION"/>
- <enum value="0x3055" name="EGL_EXTENSIONS"/>
- <enum value="0x3056" name="EGL_HEIGHT"/>
- <enum value="0x3057" name="EGL_WIDTH"/>
- <enum value="0x3058" name="EGL_LARGEST_PBUFFER"/>
- <enum value="0x3059" name="EGL_DRAW"/>
- <enum value="0x305A" name="EGL_READ"/>
- <enum value="0x305B" name="EGL_CORE_NATIVE_ENGINE"/>
- <enum value="0x305C" name="EGL_NO_TEXTURE"/>
- <enum value="0x305D" name="EGL_TEXTURE_RGB"/>
- <enum value="0x305E" name="EGL_TEXTURE_RGBA"/>
- <enum value="0x305F" name="EGL_TEXTURE_2D"/>
- </enums>
-
- <enums namespace="EGL" start="0x3060-0x306F" vendor="TAO" comment="Reserved for Phil Huxley">
- <unused start="0x3060" end="0x306F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3070-0x307F" vendor="NOK" comment="Reserved for Jani Vaarala">
- <unused start="0x3070" end="0x307E"/>
- <enum value="0x307F" name="EGL_Y_INVERTED_NOK"/>
- </enums>
-
- <enums namespace="EGL" start="0x3080-0x30AF" vendor="KHR">
- <enum value="0x3080" name="EGL_TEXTURE_FORMAT"/>
- <enum value="0x3081" name="EGL_TEXTURE_TARGET"/>
- <enum value="0x3082" name="EGL_MIPMAP_TEXTURE"/>
- <enum value="0x3083" name="EGL_MIPMAP_LEVEL"/>
- <enum value="0x3084" name="EGL_BACK_BUFFER"/>
- <enum value="0x3085" name="EGL_SINGLE_BUFFER"/>
- <enum value="0x3086" name="EGL_RENDER_BUFFER"/>
- <enum value="0x3087" name="EGL_COLORSPACE" alias="EGL_VG_COLORSPACE"/>
- <enum value="0x3087" name="EGL_VG_COLORSPACE"/>
- <enum value="0x3088" name="EGL_ALPHA_FORMAT" alias="EGL_VG_ALPHA_FORMAT"/>
- <enum value="0x3088" name="EGL_VG_ALPHA_FORMAT"/>
- <enum value="0x3089" name="EGL_COLORSPACE_sRGB"/>
- <enum value="0x3089" name="EGL_GL_COLORSPACE_SRGB" alias="EGL_COLORSPACE_sRGB"/>
- <enum value="0x3089" name="EGL_GL_COLORSPACE_SRGB_KHR" alias="EGL_COLORSPACE_sRGB"/>
- <enum value="0x3089" name="EGL_VG_COLORSPACE_sRGB" alias="EGL_COLORSPACE_sRGB"/>
- <enum value="0x308A" name="EGL_COLORSPACE_LINEAR"/>
- <enum value="0x308A" name="EGL_GL_COLORSPACE_LINEAR" alias="EGL_COLORSPACE_LINEAR"/>
- <enum value="0x308A" name="EGL_GL_COLORSPACE_LINEAR_KHR" alias="EGL_COLORSPACE_LINEAR"/>
- <enum value="0x308A" name="EGL_VG_COLORSPACE_LINEAR" alias="EGL_COLORSPACE_LINEAR"/>
- <enum value="0x308B" name="EGL_ALPHA_FORMAT_NONPRE" alias="EGL_VG_ALPHA_FORMAT_NONPRE"/>
- <enum value="0x308B" name="EGL_VG_ALPHA_FORMAT_NONPRE"/>
- <enum value="0x308C" name="EGL_ALPHA_FORMAT_PRE" alias="EGL_VG_ALPHA_FORMAT_PRE"/>
- <enum value="0x308C" name="EGL_VG_ALPHA_FORMAT_PRE"/>
- <enum value="0x308D" name="EGL_CLIENT_APIS"/>
- <enum value="0x308E" name="EGL_RGB_BUFFER"/>
- <enum value="0x308F" name="EGL_LUMINANCE_BUFFER"/>
- <enum value="0x3090" name="EGL_HORIZONTAL_RESOLUTION"/>
- <enum value="0x3091" name="EGL_VERTICAL_RESOLUTION"/>
- <enum value="0x3092" name="EGL_PIXEL_ASPECT_RATIO"/>
- <enum value="0x3093" name="EGL_SWAP_BEHAVIOR"/>
- <enum value="0x3094" name="EGL_BUFFER_PRESERVED"/>
- <enum value="0x3095" name="EGL_BUFFER_DESTROYED"/>
- <enum value="0x3096" name="EGL_OPENVG_IMAGE"/>
- <enum value="0x3097" name="EGL_CONTEXT_CLIENT_TYPE"/>
- <enum value="0x3098" name="EGL_CONTEXT_CLIENT_VERSION"/>
- <enum value="0x3098" name="EGL_CONTEXT_MAJOR_VERSION" alias="EGL_CONTEXT_CLIENT_VERSION"/>
- <enum value="0x3098" name="EGL_CONTEXT_MAJOR_VERSION_KHR" alias="EGL_CONTEXT_CLIENT_VERSION"/>
- <enum value="0x3099" name="EGL_MULTISAMPLE_RESOLVE"/>
- <enum value="0x309A" name="EGL_MULTISAMPLE_RESOLVE_DEFAULT"/>
- <enum value="0x309B" name="EGL_MULTISAMPLE_RESOLVE_BOX"/>
- <enum value="0x309C" name="EGL_CL_EVENT_HANDLE"/>
- <enum value="0x309C" name="EGL_CL_EVENT_HANDLE_KHR" alias="EGL_CL_EVENT_HANDLE"/>
- <enum value="0x309D" name="EGL_GL_COLORSPACE"/>
- <enum value="0x309D" name="EGL_GL_COLORSPACE_KHR" alias="EGL_GL_COLORSPACE"/>
- <unused start="0x309E" end="0x309F"/>
- <enum value="0x30A0" name="EGL_OPENGL_ES_API"/>
- <enum value="0x30A1" name="EGL_OPENVG_API"/>
- <enum value="0x30A2" name="EGL_OPENGL_API"/>
- <unused start="0x30A3" end="0x30AF" comment="for additional client API names"/>
- </enums>
-
- <enums namespace="EGL" start="0x30B0-0x30BF" vendor="NV" comment="Reserved for Ignacio Llamas">
- <enum value="0x30B0" name="EGL_NATIVE_PIXMAP_KHR"/>
- <enum value="0x30B1" name="EGL_GL_TEXTURE_2D"/>
- <enum value="0x30B1" name="EGL_GL_TEXTURE_2D_KHR" alias="EGL_GL_TEXTURE_2D"/>
- <enum value="0x30B2" name="EGL_GL_TEXTURE_3D"/>
- <enum value="0x30B2" name="EGL_GL_TEXTURE_3D_KHR" alias="EGL_GL_TEXTURE_3D"/>
- <enum value="0x30B3" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
- <enum value="0x30B3" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
- <enum value="0x30B4" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
- <enum value="0x30B4" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
- <enum value="0x30B5" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
- <enum value="0x30B5" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
- <enum value="0x30B6" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
- <enum value="0x30B6" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
- <enum value="0x30B7" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
- <enum value="0x30B7" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
- <enum value="0x30B8" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
- <enum value="0x30B8" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
- <enum value="0x30B9" name="EGL_GL_RENDERBUFFER"/>
- <enum value="0x30B9" name="EGL_GL_RENDERBUFFER_KHR" alias="EGL_GL_RENDERBUFFER"/>
- <enum value="0x30BA" name="EGL_VG_PARENT_IMAGE_KHR"/>
- <enum value="0x30BC" name="EGL_GL_TEXTURE_LEVEL"/>
- <enum value="0x30BC" name="EGL_GL_TEXTURE_LEVEL_KHR" alias="EGL_GL_TEXTURE_LEVEL"/>
- <enum value="0x30BD" name="EGL_GL_TEXTURE_ZOFFSET"/>
- <enum value="0x30BD" name="EGL_GL_TEXTURE_ZOFFSET_KHR" alias="EGL_GL_TEXTURE_ZOFFSET"/>
- <enum value="0x30BE" name="EGL_POST_SUB_BUFFER_SUPPORTED_NV"/>
- <enum value="0x30BF" name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT" alias="EGL_CONTEXT_OPENGL_ROBUST_ACCESS"/>
- </enums>
-
- <enums namespace="EGL" start="0x30C0-0x30CF" vendor="KHR">
- <enum value="0x30C0" name="EGL_FORMAT_RGB_565_EXACT_KHR"/>
- <enum value="0x30C1" name="EGL_FORMAT_RGB_565_KHR"/>
- <enum value="0x30C2" name="EGL_FORMAT_RGBA_8888_EXACT_KHR"/>
- <enum value="0x30C3" name="EGL_FORMAT_RGBA_8888_KHR"/>
- <enum value="0x30C4" name="EGL_MAP_PRESERVE_PIXELS_KHR"/>
- <enum value="0x30C5" name="EGL_LOCK_USAGE_HINT_KHR"/>
- <enum value="0x30C6" name="EGL_BITMAP_POINTER_KHR"/>
- <enum value="0x30C7" name="EGL_BITMAP_PITCH_KHR"/>
- <enum value="0x30C8" name="EGL_BITMAP_ORIGIN_KHR"/>
- <enum value="0x30C9" name="EGL_BITMAP_PIXEL_RED_OFFSET_KHR"/>
- <enum value="0x30CA" name="EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR"/>
- <enum value="0x30CB" name="EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR"/>
- <enum value="0x30CC" name="EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR"/>
- <enum value="0x30CD" name="EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR"/>
- <enum value="0x30CE" name="EGL_LOWER_LEFT_KHR"/>
- <enum value="0x30CF" name="EGL_UPPER_LEFT_KHR"/>
- </enums>
-
- <enums namespace="EGL" start="0x30D0" end="0x30DF" vendor="Symbian" comment="Reserved for Robert Palmer (bug #2545)">
- <unused start="0x30D0" end="0x30D1"/>
- <enum value="0x30D2" name="EGL_IMAGE_PRESERVED"/>
- <enum value="0x30D2" name="EGL_IMAGE_PRESERVED_KHR"/>
- <unused start="0x30D3" end="0x30D9"/>
- <enum value="0x30DA" name="EGL_SHARED_IMAGE_NOK" comment="Unreleased extension"/>
- <unused start="0x30DB" end="0x30DF"/>
- </enums>
-
- <enums namespace="EGL" start="0x30E0" end="0x30EF" vendor="NV" comment="Reserved for Russell Pflughaupt (bug #3314)">
- <enum value="0x30E0" name="EGL_COVERAGE_BUFFERS_NV"/>
- <enum value="0x30E1" name="EGL_COVERAGE_SAMPLES_NV"/>
- <enum value="0x30E2" name="EGL_DEPTH_ENCODING_NV"/>
- <enum value="0x30E3" name="EGL_DEPTH_ENCODING_NONLINEAR_NV"/>
- <unused start="0x30E4" end="0x30E5"/>
- <enum value="0x30E6" name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV"/>
- <enum value="0x30E7" name="EGL_SYNC_STATUS_NV"/>
- <enum value="0x30E8" name="EGL_SIGNALED_NV"/>
- <enum value="0x30E9" name="EGL_UNSIGNALED_NV"/>
- <enum value="0x30EA" name="EGL_ALREADY_SIGNALED_NV"/>
- <enum value="0x30EB" name="EGL_TIMEOUT_EXPIRED_NV"/>
- <enum value="0x30EC" name="EGL_CONDITION_SATISFIED_NV"/>
- <enum value="0x30ED" name="EGL_SYNC_TYPE_NV"/>
- <enum value="0x30EE" name="EGL_SYNC_CONDITION_NV"/>
- <enum value="0x30EF" name="EGL_SYNC_FENCE_NV"/>
- </enums>
-
- <enums namespace="EGL" start="0x30F0" end="0x30FF" vendor="KHR">
- <enum value="0x30F0" name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE"/>
- <enum value="0x30F0" name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR" alias="EGL_SYNC_PRIOR_COMMANDS_COMPLETE"/>
- <enum value="0x30F1" name="EGL_SYNC_STATUS"/>
- <enum value="0x30F1" name="EGL_SYNC_STATUS_KHR" alias="EGL_SYNC_STATUS"/>
- <enum value="0x30F2" name="EGL_SIGNALED"/>
- <enum value="0x30F2" name="EGL_SIGNALED_KHR" alias="EGL_SIGNALED"/>
- <enum value="0x30F3" name="EGL_UNSIGNALED"/>
- <enum value="0x30F3" name="EGL_UNSIGNALED_KHR" alias="EGL_UNSIGNALED"/>
- <enum value="0x30F5" name="EGL_TIMEOUT_EXPIRED"/>
- <enum value="0x30F5" name="EGL_TIMEOUT_EXPIRED_KHR" alias="EGL_TIMEOUT_EXPIRED"/>
- <enum value="0x30F6" name="EGL_CONDITION_SATISFIED"/>
- <enum value="0x30F6" name="EGL_CONDITION_SATISFIED_KHR" alias="EGL_CONDITION_SATISFIED"/>
- <enum value="0x30F7" name="EGL_SYNC_TYPE"/>
- <enum value="0x30F7" name="EGL_SYNC_TYPE_KHR" alias="EGL_SYNC_TYPE"/>
- <enum value="0x30F8" name="EGL_SYNC_CONDITION"/>
- <enum value="0x30F8" name="EGL_SYNC_CONDITION_KHR" alias="EGL_SYNC_CONDITION"/>
- <enum value="0x30F9" name="EGL_SYNC_FENCE"/>
- <enum value="0x30F9" name="EGL_SYNC_FENCE_KHR" alias="EGL_SYNC_FENCE"/>
- <enum value="0x30FA" name="EGL_SYNC_REUSABLE_KHR"/>
- <enum value="0x30FB" name="EGL_CONTEXT_MINOR_VERSION"/>
- <enum value="0x30FB" name="EGL_CONTEXT_MINOR_VERSION_KHR" alias="EGL_CONTEXT_MINOR_VERSION"/>
- <enum value="0x30FC" name="EGL_CONTEXT_FLAGS_KHR"/>
- <enum value="0x30FD" name="EGL_CONTEXT_OPENGL_PROFILE_MASK"/>
- <enum value="0x30FD" name="EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR" alias="EGL_CONTEXT_OPENGL_PROFILE_MASK"/>
- <enum value="0x30FE" name="EGL_SYNC_CL_EVENT"/>
- <enum value="0x30FE" name="EGL_SYNC_CL_EVENT_KHR" alias="EGL_SYNC_CL_EVENT"/>
- <enum value="0x30FF" name="EGL_SYNC_CL_EVENT_COMPLETE"/>
- <enum value="0x30FF" name="EGL_SYNC_CL_EVENT_COMPLETE_KHR" alias="EGL_SYNC_CL_EVENT_COMPLETE"/>
- </enums>
-
- <enums namespace="EGL" start="0x3100" end="0x310F" vendor="IMG" comment="Reserved for Ben Bowman (Khronos bug 4748)">
- <enum value="0x3100" name="EGL_CONTEXT_PRIORITY_LEVEL_IMG"/>
- <enum value="0x3101" name="EGL_CONTEXT_PRIORITY_HIGH_IMG"/>
- <enum value="0x3102" name="EGL_CONTEXT_PRIORITY_MEDIUM_IMG"/>
- <enum value="0x3103" name="EGL_CONTEXT_PRIORITY_LOW_IMG"/>
- <unused start="0x3104" end="0x310F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3110" end="0x311F" vendor="ATX" comment="Reserved for Tim Renouf, Antix (Khronos bug 4949)">
- <enum value="0x3110" name="EGL_BITMAP_PIXEL_SIZE_KHR"/>
- <unused start="0x3111" end="0x311F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3120" end="0x312F" vendor="AMD" comment="Reserved for David Garcia (Khronos bug 5149)">
- <unused start="0x3120" end="0x312F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3130" end="0x313F" vendor="NV" comment="Reserved for Greg Prisament (Khronos bug 5166)">
- <unused start="0x3130"/>
- <enum value="0x3131" name="EGL_COVERAGE_SAMPLE_RESOLVE_NV"/>
- <enum value="0x3132" name="EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV"/>
- <enum value="0x3133" name="EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV"/>
- <enum value="0x3134" name="EGL_MULTIVIEW_VIEW_COUNT_EXT"/>
- <unused start="0x3135"/>
- <enum value="0x3136" name="EGL_AUTO_STEREO_NV"/>
- <unused start="0x3137"/>
- <enum value="0x3138" name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT"/>
- <unused start="0x3139" end="0x313C"/>
- <enum value="0x313D" name="EGL_BUFFER_AGE_KHR"/>
- <enum value="0x313D" name="EGL_BUFFER_AGE_EXT" alias="EGL_BUFFER_AGE_KHR"/>
- <unused start="0x313E" end="0x313F"/>
- <enum value="0x313F" name="EGL_PLATFORM_DEVICE_EXT"/>
- </enums>
-
- <enums namespace="EGL" start="0x3140" end="0x314F" vendor="Google" comment="Reserved for Mathias Agopian (Khronos bug 5199)">
- <enum value="0x3140" name="EGL_NATIVE_BUFFER_ANDROID"/>
- <enum value="0x3141" name="EGL_PLATFORM_ANDROID_KHR"/>
- <enum value="0x3142" name="EGL_RECORDABLE_ANDROID"/>
- <unused start="0x3143"/>
- <enum value="0x3144" name="EGL_SYNC_NATIVE_FENCE_ANDROID"/>
- <enum value="0x3145" name="EGL_SYNC_NATIVE_FENCE_FD_ANDROID"/>
- <enum value="0x3146" name="EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID"/>
- <enum value="0x3147" name="EGL_FRAMEBUFFER_TARGET_ANDROID"/>
- <unused start="0x3148" end="0x314F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3150" end="0x315F" vendor="NOK" comment="Reserved for Robert Palmer (Khronos bug 5368)">
- <unused start="0x3150" end="0x315F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3160" end="0x316F" vendor="Seaweed" comment="Reserved for Sree Sridharan (Khronos public bug 198)">
- <unused start="0x3160" end="0x316F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3170" end="0x318F" vendor="QNX" comment="Reserved for Joel Pilon (Khronos bug 5834)">
- <unused start="0x3170" end="0x318F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3190" end="0x31AF" vendor="FSL" comment="Reserved for Brian Murray, Freescale (Khronos bug 5939)">
- <unused start="0x3190" end="0x31AF"/>
- </enums>
-
- <enums namespace="EGL" start="0x31B0" end="0x31BF" vendor="KHR" comment="Reserved for Marcus Lorentzon (Khronos bug 6437)">
- <enum value="0x31B0" name="EGL_CONTEXT_OPENGL_DEBUG"/>
- <enum value="0x31B1" name="EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE"/>
- <enum value="0x31B2" name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS"/>
- <enum value="0x31B3" name="EGL_CONTEXT_OPENGL_NO_ERROR_KHR"/>
- <unused start="0x31B4" end="0x31BC" comment="0x31B3-0x31BC formerly reserved for EGL_image_stream"/>
- <enum value="0x31BD" name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR" alias="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY"/>
- <enum value="0x31BD" name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY"/>
- <enum value="0x31BE" name="EGL_NO_RESET_NOTIFICATION"/>
- <enum value="0x31BE" name="EGL_NO_RESET_NOTIFICATION_KHR" alias="EGL_NO_RESET_NOTIFICATION"/>
- <enum value="0x31BE" name="EGL_NO_RESET_NOTIFICATION_EXT" alias="EGL_NO_RESET_NOTIFICATION"/>
- <enum value="0x31BF" name="EGL_LOSE_CONTEXT_ON_RESET"/>
- <enum value="0x31BF" name="EGL_LOSE_CONTEXT_ON_RESET_KHR" alias="EGL_LOSE_CONTEXT_ON_RESET"/>
- <enum value="0x31BF" name="EGL_LOSE_CONTEXT_ON_RESET_EXT" alias="EGL_LOSE_CONTEXT_ON_RESET"/>
- </enums>
-
- <enums namespace="EGL" start="0x31C0" end="0x31CF" vendor="QCOM" comment="Reserved for Maurice Ribble (Khronos bug 6644) - EGL_QCOM_create_image spec TBD">
- <unused start="0x31C0" end="0x31CF"/>
- </enums>
-
- <enums namespace="EGL" start="0x31D0" end="0x31DF" vendor="MESA" comment="Reserved for Kristian H&#248;gsberg (Khronos bug 6757)">
- <enum value="0x31D0" name="EGL_DRM_BUFFER_FORMAT_MESA"/>
- <enum value="0x31D1" name="EGL_DRM_BUFFER_USE_MESA"/>
- <enum value="0x31D2" name="EGL_DRM_BUFFER_FORMAT_ARGB32_MESA"/>
- <enum value="0x31D3" name="EGL_DRM_BUFFER_MESA"/>
- <enum value="0x31D4" name="EGL_DRM_BUFFER_STRIDE_MESA"/>
- <enum value="0x31D5" name="EGL_PLATFORM_X11_KHR"/>
- <enum value="0x31D5" name="EGL_PLATFORM_X11_EXT" alias="EGL_PLATFORM_X11_KHR"/>
- <enum value="0x31D6" name="EGL_PLATFORM_X11_SCREEN_KHR"/>
- <enum value="0x31D6" name="EGL_PLATFORM_X11_SCREEN_EXT" alias="EGL_PLATFORM_X11_SCREEN_KHR"/>
- <enum value="0x31D7" name="EGL_PLATFORM_GBM_KHR"/>
- <enum value="0x31D7" name="EGL_PLATFORM_GBM_MESA" alias="EGL_PLATFORM_GBM_KHR"/>
- <enum value="0x31D8" name="EGL_PLATFORM_WAYLAND_KHR"/>
- <enum value="0x31D8" name="EGL_PLATFORM_WAYLAND_EXT" alias="EGL_PLATFORM_WAYLAND_KHR"/>
- <unused start="0x31D9" end="0x31DF"/>
- </enums>
-
- <enums namespace="EGL" start="0x31E0" end="0x31EF" vendor="HI" comment="Reserved for Mark Callow (Khronos bug 6799)">
- <unused start="0x31E0" end="0x31EF"/>
- </enums>
-
- <enums namespace="EGL" start="0x31F0" end="0x31FF" vendor="KHR">
- <unused start="0x31F0" end="0x31FB" comment="Placeholders for draft extensions follow"/>
- <!--
- <enum value="0x31F0" name="EGL_IMAGE_USE_AS_OPENGL_ES1_RENDERBUFFER_KHR" comment="Draft KHR_image_use_gl1_renderbuffer"/>
- <enum value="0x31F1" name="EGL_IMAGE_USE_AS_OPENGL_ES1_TEXTURE_2D_KHR" comment="Draft KHR_image_use_gl1_texture_2d"/>
- <enum value="0x31F2" name="EGL_IMAGE_USE_AS_OPENGL_ES1_TEXTURE_EXTERNAL_KHR" comment="Draft KHR_image_use_gl1_texture_external"/>
- <enum value="0x31F3" name="EGL_IMAGE_USE_AS_OPENGL_ES2_RENDERBUFFER_KHR" comment="Draft KHR_image_use_gl2_renderbuffer"/>
- <enum value="0x31F4" name="EGL_IMAGE_USE_AS_OPENGL_ES2_TEXTURE_2D_KHR" comment="Draft KHR_image_use_gl2_texture_2d"/>
- <enum value="0x31F5" name="EGL_IMAGE_USE_AS_OPENGL_ES2_TEXTURE_EXTERNAL_KHR" comment="Draft KHR_image_use_gl2_texture_external"/>
- <enum value="0x31F6" name="EGL_IMAGE_USE_AS_OPENVG_IMAGE_KHR" comment="Draft KHR_image_use_vg_vgimage"/>
- <enum value="0x31F7" name="EGL_STREAM_CONSUMER_ATTACHMENT_MESA" comment="Draft EGL_MESA_image_stream_internal"/>
- <enum value="0x31F8" name="EGL_NO_FORMAT_MESA" comment="Draft EGL_MESA_image_stream_internal"/>
- <enum value="0x31F9" name="EGL_FORMAT_RGBA8888_MESA" comment="Draft EGL_MESA_image_stream_internal"/>
- <enum value="0x31FA" name="EGL_FORMAT_RGB888_MESA" comment="Draft EGL_MESA_image_stream_internal"/>
- <enum value="0x31FB" name="EGL_FORMAT_RGB565_MESA" comment="Draft EGL_MESA_image_stream_internal"/>
- -->
- <enum value="0x31FC" name="EGL_STREAM_FIFO_LENGTH_KHR"/>
- <enum value="0x31FD" name="EGL_STREAM_TIME_NOW_KHR"/>
- <enum value="0x31FE" name="EGL_STREAM_TIME_CONSUMER_KHR"/>
- <enum value="0x31FF" name="EGL_STREAM_TIME_PRODUCER_KHR"/>
- </enums>
-
- <enums namespace="EGL" start="0x3200" end="0x320F" vendor="ANGLE" comment="Reserved for Daniel Koch, ANGLE Project (Khronos bug 7139)">
- <enum value="0x3200" name="EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE"/>
- <enum value="0x3201" name="EGL_FIXED_SIZE_ANGLE"/>
- <unused start="0x3202" end="0x320F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3210" end="0x321F" vendor="KHR">
- <enum value="0x3210" name="EGL_CONSUMER_LATENCY_USEC_KHR"/>
- <unused start="0x3211"/>
- <enum value="0x3212" name="EGL_PRODUCER_FRAME_KHR"/>
- <enum value="0x3213" name="EGL_CONSUMER_FRAME_KHR"/>
- <enum value="0x3214" name="EGL_STREAM_STATE_KHR"/>
- <enum value="0x3215" name="EGL_STREAM_STATE_CREATED_KHR"/>
- <enum value="0x3216" name="EGL_STREAM_STATE_CONNECTING_KHR"/>
- <enum value="0x3217" name="EGL_STREAM_STATE_EMPTY_KHR"/>
- <enum value="0x3218" name="EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR"/>
- <enum value="0x3219" name="EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR"/>
- <enum value="0x321A" name="EGL_STREAM_STATE_DISCONNECTED_KHR"/>
- <enum value="0x321B" name="EGL_BAD_STREAM_KHR"/>
- <enum value="0x321C" name="EGL_BAD_STATE_KHR"/>
- <enum value="0x321D" name="EGL_BUFFER_COUNT_NV" comment="From EGL_NV_stream_producer_eglsurface, which has no known specification and was replaced by a KHR extension"/>
- <enum value="0x321E" name="EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR"/>
- <enum value="0x321F" name="EGL_SYNC_NEW_FRAME_NV"/>
- </enums>
-
- <enums namespace="EGL" start="0x3220" end="0x325F" vendor="NV" comment="Reserved for Greg Roth (Bug 8220)">
- <unused start="0x3220" end="0x322A"/>
- <enum value="0x322B" name="EGL_BAD_DEVICE_EXT"/>
- <enum value="0x322C" name="EGL_DEVICE_EXT"/>
- <enum value="0x322D" name="EGL_BAD_OUTPUT_LAYER_EXT"/>
- <enum value="0x322E" name="EGL_BAD_OUTPUT_PORT_EXT"/>
- <enum value="0x322F" name="EGL_SWAP_INTERVAL_EXT"/>
- <unused start="0x3230" end="0x3232"/>
- <enum value="0x3233" name="EGL_DRM_DEVICE_FILE_EXT"/>
- <enum value="0x3234" name="EGL_DRM_CRTC_EXT"/>
- <enum value="0x3235" name="EGL_DRM_PLANE_EXT"/>
- <enum value="0x3236" name="EGL_DRM_CONNECTOR_EXT"/>
- <enum value="0x3237" name="EGL_OPENWF_DEVICE_ID_EXT"/>
- <enum value="0x3238" name="EGL_OPENWF_PIPELINE_ID_EXT"/>
- <enum value="0x3239" name="EGL_OPENWF_PORT_ID_EXT"/>
- <enum value="0x323A" name="EGL_CUDA_DEVICE_NV"/>
- <enum value="0x323B" name="EGL_CUDA_EVENT_HANDLE_NV"/>
- <enum value="0x323C" name="EGL_SYNC_CUDA_EVENT_NV"/>
- <enum value="0x323D" name="EGL_SYNC_CUDA_EVENT_COMPLETE_NV"/>
- <unused start="0x323E" end="0x325F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3260" end="0x326F" vendor="BCOM" comment="Reserved for Gary Sweet, Broadcom (Public bug 620)">
- <unused start="0x3260" end="0x326F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3270" end="0x328F" vendor="ARM" comment="Reserved for Tom Cooksey (Bug 9963)">
- <enum value="0x3270" name="EGL_LINUX_DMA_BUF_EXT"/>
- <enum value="0x3271" name="EGL_LINUX_DRM_FOURCC_EXT"/>
- <enum value="0x3272" name="EGL_DMA_BUF_PLANE0_FD_EXT"/>
- <enum value="0x3273" name="EGL_DMA_BUF_PLANE0_OFFSET_EXT"/>
- <enum value="0x3274" name="EGL_DMA_BUF_PLANE0_PITCH_EXT"/>
- <enum value="0x3275" name="EGL_DMA_BUF_PLANE1_FD_EXT"/>
- <enum value="0x3276" name="EGL_DMA_BUF_PLANE1_OFFSET_EXT"/>
- <enum value="0x3277" name="EGL_DMA_BUF_PLANE1_PITCH_EXT"/>
- <enum value="0x3278" name="EGL_DMA_BUF_PLANE2_FD_EXT"/>
- <enum value="0x3279" name="EGL_DMA_BUF_PLANE2_OFFSET_EXT"/>
- <enum value="0x327A" name="EGL_DMA_BUF_PLANE2_PITCH_EXT"/>
- <enum value="0x327B" name="EGL_YUV_COLOR_SPACE_HINT_EXT"/>
- <enum value="0x327C" name="EGL_SAMPLE_RANGE_HINT_EXT"/>
- <enum value="0x327D" name="EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT"/>
- <enum value="0x327E" name="EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT"/>
- <enum value="0x327F" name="EGL_ITU_REC601_EXT"/>
- <enum value="0x3280" name="EGL_ITU_REC709_EXT"/>
- <enum value="0x3281" name="EGL_ITU_REC2020_EXT"/>
- <enum value="0x3282" name="EGL_YUV_FULL_RANGE_EXT"/>
- <enum value="0x3283" name="EGL_YUV_NARROW_RANGE_EXT"/>
- <enum value="0x3284" name="EGL_YUV_CHROMA_SITING_0_EXT"/>
- <enum value="0x3285" name="EGL_YUV_CHROMA_SITING_0_5_EXT"/>
- <enum value="0x3286" name="EGL_DISCARD_SAMPLES_ARM"/>
- <unused start="0x3287" end="0x328F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3290" end="0x329F" vendor="MESA" comment="Reserved for John K&#229;re Alsaker (Public bug 757)">
- <unused start="0x3290" end="0x329F"/>
- </enums>
-
- <enums namespace="EGL" start="0x32A0" end="0x32AF" vendor="Samsung" comment="Reserved for Dongyeon Kim (Public bug 880)">
- <enum value="0x32A0" name="EGL_NATIVE_BUFFER_TIZEN"/>
- <enum value="0x32A1" name="EGL_NATIVE_SURFACE_TIZEN"/>
- <unused start="0x32A2" end="0x32AF"/>
- </enums>
-
- <enums namespace="EGL" start="0x32B0" end="0x32BF" vendor="QCOM" comment="Reserved for Jeff Vigil (Bug 10663) - EGL_QCOM_lock_image spec TBD">
- <unused start="0x32B0" end="0x32BF"/>
- </enums>
-
- <enums namespace="EGL" start="0x32C0" end="0x32CF" vendor="Vivante" comment="Reserved for Yanjun Zhang (Bug 11498)">
- <enum value="0x32C0" name="EGL_PROTECTED_CONTENT_EXT"/>
- <unused start="0x32C1" end="0x32CF"/>
- </enums>
-
- <enums namespace="EGL" start="0x32D0" end="0x32EF" vendor="QCOM" comment="Reserved for Jeff Vigil (Bug 11735) - EGL_QCOM_gpu_perf spec TBD + Bug 12286 - EGL_QCOM_content_protection spec TBD">
- <unused start="0x32D0" end="0x32EF"/>
- </enums>
-
- <enums namespace="EGL" start="0x32F0" end="0x32FF" vendor="BCOM" comment="Reserved for Gary Sweet, Broadcom (Bug 12870)">
- <unused start="0x32F0" end="0x32FF"/>
- </enums>
-
- <enums namespace="EGL" start="0x3300" end="0x331F" vendor="QCOM" comment="Reserved for Jeff Vigil (Bugs 12973,12849) - EGL_EXT_yuv_surface spec TBD">
- <enum value="0x3300" name="EGL_YUV_BUFFER_EXT"/>
- <enum value="0x3301" name="EGL_YUV_ORDER_EXT"/>
- <enum value="0x3302" name="EGL_YUV_ORDER_YUV_EXT"/>
- <enum value="0x3303" name="EGL_YUV_ORDER_YVU_EXT"/>
- <enum value="0x3304" name="EGL_YUV_ORDER_YUYV_EXT"/>
- <enum value="0x3305" name="EGL_YUV_ORDER_UYVY_EXT"/>
- <enum value="0x3306" name="EGL_YUV_ORDER_YVYU_EXT"/>
- <enum value="0x3307" name="EGL_YUV_ORDER_VYUY_EXT"/>
- <enum value="0x3308" name="EGL_YUV_ORDER_AYUV_EXT"/>
- <unused start="0x3309"/>
- <enum value="0x330A" name="EGL_YUV_CSC_STANDARD_EXT"/>
- <enum value="0x330B" name="EGL_YUV_CSC_STANDARD_601_EXT"/>
- <enum value="0x330C" name="EGL_YUV_CSC_STANDARD_709_EXT"/>
- <enum value="0x330D" name="EGL_YUV_CSC_STANDARD_2020_EXT"/>
- <unused start="0x330E" end="0x3310"/>
- <enum value="0x3311" name="EGL_YUV_NUMBER_OF_PLANES_EXT"/>
- <enum value="0x3312" name="EGL_YUV_SUBSAMPLE_EXT"/>
- <enum value="0x3313" name="EGL_YUV_SUBSAMPLE_4_2_0_EXT"/>
- <enum value="0x3314" name="EGL_YUV_SUBSAMPLE_4_2_2_EXT"/>
- <enum value="0x3315" name="EGL_YUV_SUBSAMPLE_4_4_4_EXT"/>
- <unused start="0x3316"/>
- <enum value="0x3317" name="EGL_YUV_DEPTH_RANGE_EXT"/>
- <enum value="0x3318" name="EGL_YUV_DEPTH_RANGE_LIMITED_EXT"/>
- <enum value="0x3319" name="EGL_YUV_DEPTH_RANGE_FULL_EXT"/>
- <enum value="0x331A" name="EGL_YUV_PLANE_BPP_EXT"/>
- <enum value="0x331B" name="EGL_YUV_PLANE_BPP_0_EXT"/>
- <enum value="0x331C" name="EGL_YUV_PLANE_BPP_8_EXT"/>
- <enum value="0x331D" name="EGL_YUV_PLANE_BPP_10_EXT"/>
- <unused start="0x331E" end="0x331F"/>
- </enums>
-
- <enums namespace="EGL" start="0x3320" end="0x339F" vendor="NV" comment="Reserved for James Jones (Bug 13209)">
- <unused start="0x3320" end="0x339F"/>
- </enums>
-
- <enums namespace="EGL" start="0x33A0" end="0x33AF" vendor="ANGLE" comment="Reserved for Shannon Woods (Bug 13175)">
- <enum value="0x33A0" name="EGL_D3D9_DEVICE_ANGLE"/>
- <enum value="0x33A1" name="EGL_D3D11_DEVICE_ANGLE"/>
- <unused start="0x33A2" end="0x33AF"/>
- </enums>
-
- <enums namespace="EGL" start="0x33B0" end="0x33BF" vendor="KHR" comment="Reserved for EGL_KHR_debug / Jeff Vigil (Bug 13357)">
- <enum value="0x33B0" name="EGL_OBJECT_THREAD_KHR"/>
- <enum value="0x33B1" name="EGL_OBJECT_DISPLAY_KHR"/>
- <enum value="0x33B2" name="EGL_OBJECT_CONTEXT_KHR"/>
- <enum value="0x33B3" name="EGL_OBJECT_SURFACE_KHR"/>
- <enum value="0x33B4" name="EGL_OBJECT_IMAGE_KHR"/>
- <enum value="0x33B5" name="EGL_OBJECT_SYNC_KHR"/>
- <enum value="0x33B6" name="EGL_OBJECT_STREAM_KHR"/>
- <unused start="0x33B7"/>
- <enum value="0x33B8" name="EGL_DEBUG_CALLBACK_KHR"/>
- <enum value="0x33B9" name="EGL_DEBUG_MSG_CRITICAL_KHR"/>
- <enum value="0x33BA" name="EGL_DEBUG_MSG_ERROR_KHR"/>
- <enum value="0x33BB" name="EGL_DEBUG_MSG_WARN_KHR"/>
- <enum value="0x33BC" name="EGL_DEBUG_MSG_INFO_KHR"/>
- <unused start="0x33BD" end="0x33BF"/>
- </enums>
-
- <enums namespace="EGL" start="0x33C0" end="0x33DF" vendor="BCOM" comment="Reserved for Gary Sweet (Bug 12203)">
- <unused start="0x33C0" end="0x33DF"/>
- </enums>
-
- <enums namespace="EGL" start="0x33E0" end="0x342F" vendor="QCOM" comment="Reserved for Jeff Vigil (Bugs 10663,13364)">
- <unused start="0x33E0" end="0x342F"/>
- </enums>
-
-<!-- Please remember that new enumerant allocations must be obtained by
- request to the Khronos API registrar (see comments at the top of this
- file) File requests in the Khronos Bugzilla, EGL project, Registry
- component. Also note that some EGL enum values are shared with other
- Khronos APIs, and new ranges should be allocated with such overlaps in
- mind. -->
-
-<!-- Reservable for future use. To generate a new range, allocate multiples
- of 16 starting at the lowest available point in this block. -->
- <enums namespace="EGL" start="0x3420" end="0x3FFF" vendor="KHR">
- <unused start="0x3420" end="0x3FFF" comment="Reserved for future use"/>
- </enums>
-
- <enums namespace="EGL" start="0x8F70" end="0x8F7F" vendor="HI" comment="For Mark Callow, Khronos bug 4055. Shared with GL.">
- <enum value="0x8F70" name="EGL_COLOR_FORMAT_HI"/>
- <enum value="0x8F71" name="EGL_COLOR_RGB_HI"/>
- <enum value="0x8F72" name="EGL_COLOR_RGBA_HI"/>
- <enum value="0x8F73" name="EGL_COLOR_ARGB_HI"/>
- <enum value="0x8F74" name="EGL_CLIENT_PIXMAP_POINTER_HI"/>
- </enums>
-
- <!-- SECTION: EGL command definitions. -->
- <commands namespace="EGL">
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglBindAPI</name></proto>
- <param><ptype>EGLenum</ptype> <name>api</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglBindTexImage</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>buffer</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglChooseConfig</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- <param><ptype>EGLConfig</ptype> *<name>configs</name></param>
- <param><ptype>EGLint</ptype> <name>config_size</name></param>
- <param><ptype>EGLint</ptype> *<name>num_config</name></param>
- </command>
- <command>
- <proto><ptype>EGLint</ptype> <name>eglClientWaitSync</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSync</ptype> <name>sync</name></param>
- <param><ptype>EGLint</ptype> <name>flags</name></param>
- <param><ptype>EGLTime</ptype> <name>timeout</name></param>
- </command>
- <command>
- <proto><ptype>EGLint</ptype> <name>eglClientWaitSyncKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
- <param><ptype>EGLint</ptype> <name>flags</name></param>
- <param><ptype>EGLTimeKHR</ptype> <name>timeout</name></param>
- <alias name="eglClientWaitSync"/>
- </command>
- <command>
- <proto><ptype>EGLint</ptype> <name>eglClientWaitSyncNV</name></proto>
- <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
- <param><ptype>EGLint</ptype> <name>flags</name></param>
- <param><ptype>EGLTimeNV</ptype> <name>timeout</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglCopyBuffers</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLNativePixmapType</ptype> <name>target</name></param>
- </command>
- <command>
- <proto><ptype>EGLContext</ptype> <name>eglCreateContext</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param><ptype>EGLContext</ptype> <name>share_context</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLImageKHR</ptype> <name>eglCreateDRMImageMESA</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSyncNV</ptype> <name>eglCreateFenceSyncNV</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLenum</ptype> <name>condition</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLImage</ptype> <name>eglCreateImage</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLContext</ptype> <name>ctx</name></param>
- <param><ptype>EGLenum</ptype> <name>target</name></param>
- <param><ptype>EGLClientBuffer</ptype> <name>buffer</name></param>
- <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLImageKHR</ptype> <name>eglCreateImageKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLContext</ptype> <name>ctx</name></param>
- <param><ptype>EGLenum</ptype> <name>target</name></param>
- <param><ptype>EGLClientBuffer</ptype> <name>buffer</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreatePbufferFromClientBuffer</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLenum</ptype> <name>buftype</name></param>
- <param><ptype>EGLClientBuffer</ptype> <name>buffer</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreatePbufferSurface</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreatePixmapSurface</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param><ptype>EGLNativePixmapType</ptype> <name>pixmap</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreatePixmapSurfaceHI</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param>struct <ptype>EGLClientPixmapHI</ptype> *<name>pixmap</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreatePlatformPixmapSurface</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param>void *<name>native_pixmap</name></param>
- <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreatePlatformPixmapSurfaceEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param>void *<name>native_pixmap</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreatePlatformWindowSurface</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param>void *<name>native_window</name></param>
- <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreatePlatformWindowSurfaceEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param>void *<name>native_window</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLStreamKHR</ptype> <name>eglCreateStreamFromFileDescriptorKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLNativeFileDescriptorKHR</ptype> <name>file_descriptor</name></param>
- </command>
- <command>
- <proto><ptype>EGLStreamKHR</ptype> <name>eglCreateStreamKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreateStreamProducerSurfaceKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSyncKHR</ptype> <name>eglCreateStreamSyncNV</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- <param><ptype>EGLenum</ptype> <name>type</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSync</ptype> <name>eglCreateSync</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLenum</ptype> <name>type</name></param>
- <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSyncKHR</ptype> <name>eglCreateSyncKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLenum</ptype> <name>type</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLSyncKHR</ptype> <name>eglCreateSync64KHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLenum</ptype> <name>type</name></param>
- <param>const <ptype>EGLAttribKHR</ptype> *<name>attrib_list</name></param>
- <alias name="eglCreateSync"/>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglCreateWindowSurface</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param><ptype>EGLNativeWindowType</ptype> <name>win</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLint</ptype> <name>eglDebugMessageControlKHR</name></proto>
- <param><ptype>EGLDEBUGPROCKHR</ptype> <name>callback</name></param>
- <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglDestroyContext</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLContext</ptype> <name>ctx</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglDestroyImage</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLImage</ptype> <name>image</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglDestroyImageKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLImageKHR</ptype> <name>image</name></param>
- <alias name="eglDestroyImage"/>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglDestroyStreamKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglDestroySurface</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglDestroySync</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSync</ptype> <name>sync</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglDestroySyncKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
- <alias name="eglDestroySync"/>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglDestroySyncNV</name></proto>
- <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
- </command>
- <command>
- <proto><ptype>EGLint</ptype> <name>eglDupNativeFenceFDANDROID</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglExportDMABUFImageMESA</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLImageKHR</ptype> <name>image</name></param>
- <param>int *<name>fds</name></param>
- <param><ptype>EGLint</ptype> *<name>strides</name></param>
- <param><ptype>EGLint</ptype> *<name>offsets</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglExportDMABUFImageQueryMESA</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLImageKHR</ptype> <name>image</name></param>
- <param>int *<name>fourcc</name></param>
- <param>int *<name>num_planes</name></param>
- <param><ptype>EGLuint64KHR</ptype> *<name>modifiers</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglExportDRMImageMESA</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLImageKHR</ptype> <name>image</name></param>
- <param><ptype>EGLint</ptype> *<name>name</name></param>
- <param><ptype>EGLint</ptype> *<name>handle</name></param>
- <param><ptype>EGLint</ptype> *<name>stride</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglFenceNV</name></proto>
- <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglGetConfigAttrib</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> <name>config</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLint</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglGetConfigs</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLConfig</ptype> *<name>configs</name></param>
- <param><ptype>EGLint</ptype> <name>config_size</name></param>
- <param><ptype>EGLint</ptype> *<name>num_config</name></param>
- </command>
- <command>
- <proto><ptype>EGLContext</ptype> <name>eglGetCurrentContext</name></proto>
- </command>
- <command>
- <proto><ptype>EGLDisplay</ptype> <name>eglGetCurrentDisplay</name></proto>
- </command>
- <command>
- <proto><ptype>EGLSurface</ptype> <name>eglGetCurrentSurface</name></proto>
- <param><ptype>EGLint</ptype> <name>readdraw</name></param>
- </command>
- <command>
- <proto><ptype>EGLDisplay</ptype> <name>eglGetDisplay</name></proto>
- <param><ptype>EGLNativeDisplayType</ptype> <name>display_id</name></param>
- </command>
- <command>
- <proto><ptype>EGLint</ptype> <name>eglGetError</name></proto>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglGetOutputLayersEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
- <param><ptype>EGLOutputLayerEXT</ptype> *<name>layers</name></param>
- <param><ptype>EGLint</ptype> <name>max_layers</name></param>
- <param><ptype>EGLint</ptype> *<name>num_layers</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglGetOutputPortsEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
- <param><ptype>EGLOutputPortEXT</ptype> *<name>ports</name></param>
- <param><ptype>EGLint</ptype> <name>max_ports</name></param>
- <param><ptype>EGLint</ptype> *<name>num_ports</name></param>
- </command>
- <command>
- <proto><ptype>EGLDisplay</ptype> <name>eglGetPlatformDisplay</name></proto>
- <param><ptype>EGLenum</ptype> <name>platform</name></param>
- <param>void *<name>native_display</name></param>
- <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLDisplay</ptype> <name>eglGetPlatformDisplayEXT</name></proto>
- <param><ptype>EGLenum</ptype> <name>platform</name></param>
- <param>void *<name>native_display</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>__eglMustCastToProperFunctionPointerType</ptype> <name>eglGetProcAddress</name></proto>
- <param>const char *<name>procname</name></param>
- </command>
- <command>
- <proto><ptype>EGLNativeFileDescriptorKHR</ptype> <name>eglGetStreamFileDescriptorKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglGetSyncAttrib</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSync</ptype> <name>sync</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttrib</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglGetSyncAttribKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLint</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglGetSyncAttribNV</name></proto>
- <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLint</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLuint64NV</ptype> <name>eglGetSystemTimeFrequencyNV</name></proto>
- </command>
- <command>
- <proto><ptype>EGLuint64NV</ptype> <name>eglGetSystemTimeNV</name></proto>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglInitialize</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLint</ptype> *<name>major</name></param>
- <param><ptype>EGLint</ptype> *<name>minor</name></param>
- </command>
- <command>
- <proto><ptype>EGLint</ptype> <name>eglLabelObjectKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>display</name></param>
- <param><ptype>EGLenum</ptype> <name>objectType</name></param>
- <param><ptype>EGLObjectKHR</ptype> <name>object</name></param>
- <param><ptype>EGLLabelKHR</ptype> <name>label</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglLockSurfaceKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglMakeCurrent</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>draw</name></param>
- <param><ptype>EGLSurface</ptype> <name>read</name></param>
- <param><ptype>EGLContext</ptype> <name>ctx</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglOutputLayerAttribEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLOutputLayerEXT</ptype> <name>layer</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttrib</ptype> <name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglOutputPortAttribEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLOutputPortEXT</ptype> <name>port</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttrib</ptype> <name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglPostSubBufferNV</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>x</name></param>
- <param><ptype>EGLint</ptype> <name>y</name></param>
- <param><ptype>EGLint</ptype> <name>width</name></param>
- <param><ptype>EGLint</ptype> <name>height</name></param>
- </command>
- <command>
- <proto><ptype>EGLenum</ptype> <name>eglQueryAPI</name></proto>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryContext</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLContext</ptype> <name>ctx</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLint</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryDebugKHR</name></proto>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttrib</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryDeviceAttribEXT</name></proto>
- <param><ptype>EGLDeviceEXT</ptype> <name>device</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttrib</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto>const char *<name>eglQueryDeviceStringEXT</name></proto>
- <param><ptype>EGLDeviceEXT</ptype> <name>device</name></param>
- <param><ptype>EGLint</ptype> <name>name</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryDevicesEXT</name></proto>
- <param><ptype>EGLint</ptype> <name>max_devices</name></param>
- <param><ptype>EGLDeviceEXT</ptype> *<name>devices</name></param>
- <param><ptype>EGLint</ptype> *<name>num_devices</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryDisplayAttribEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttrib</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryNativeDisplayNV</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLNativeDisplayType</ptype> *<name>display_id</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryNativePixmapNV</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surf</name></param>
- <param><ptype>EGLNativePixmapType</ptype> *<name>pixmap</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryNativeWindowNV</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surf</name></param>
- <param><ptype>EGLNativeWindowType</ptype> *<name>window</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryOutputLayerAttribEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLOutputLayerEXT</ptype> <name>layer</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttrib</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto>const char *<name>eglQueryOutputLayerStringEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLOutputLayerEXT</ptype> <name>layer</name></param>
- <param><ptype>EGLint</ptype> <name>name</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryOutputPortAttribEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLOutputPortEXT</ptype> <name>port</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttrib</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto>const char *<name>eglQueryOutputPortStringEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLOutputPortEXT</ptype> <name>port</name></param>
- <param><ptype>EGLint</ptype> <name>name</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryStreamKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- <param><ptype>EGLenum</ptype> <name>attribute</name></param>
- <param><ptype>EGLint</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryStreamTimeKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- <param><ptype>EGLenum</ptype> <name>attribute</name></param>
- <param><ptype>EGLTimeKHR</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQueryStreamu64KHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- <param><ptype>EGLenum</ptype> <name>attribute</name></param>
- <param><ptype>EGLuint64KHR</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto>const char *<name>eglQueryString</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLint</ptype> <name>name</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQuerySurface</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLint</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQuerySurface64KHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLAttribKHR</ptype> *<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglQuerySurfacePointerANGLE</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param>void **<name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglReleaseTexImage</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>buffer</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglReleaseThread</name></proto>
- </command>
- <command>
- <proto>void <name>eglSetBlobCacheFuncsANDROID</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSetBlobFuncANDROID</ptype> <name>set</name></param>
- <param><ptype>EGLGetBlobFuncANDROID</ptype> <name>get</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSetDamageRegionKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> *<name>rects</name></param>
- <param><ptype>EGLint</ptype> <name>n_rects</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSignalSyncKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
- <param><ptype>EGLenum</ptype> <name>mode</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSignalSyncNV</name></proto>
- <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
- <param><ptype>EGLenum</ptype> <name>mode</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglStreamAttribKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- <param><ptype>EGLenum</ptype> <name>attribute</name></param>
- <param><ptype>EGLint</ptype> <name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglStreamConsumerAcquireKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglStreamConsumerGLTextureExternalKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglStreamConsumerOutputEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- <param><ptype>EGLOutputLayerEXT</ptype> <name>layer</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglStreamConsumerReleaseKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSurfaceAttrib</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLint</ptype> <name>value</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffers</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersWithDamageEXT</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> *<name>rects</name></param>
- <param><ptype>EGLint</ptype> <name>n_rects</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersWithDamageKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> *<name>rects</name></param>
- <param><ptype>EGLint</ptype> <name>n_rects</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersRegionNOK</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>numRects</name></param>
- <param>const <ptype>EGLint</ptype> *<name>rects</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersRegion2NOK</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLint</ptype> <name>numRects</name></param>
- <param>const <ptype>EGLint</ptype> *<name>rects</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglSwapInterval</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLint</ptype> <name>interval</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglTerminate</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglUnlockSurfaceKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglWaitClient</name></proto>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglWaitGL</name></proto>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglWaitNative</name></proto>
- <param><ptype>EGLint</ptype> <name>engine</name></param>
- </command>
- <command>
- <proto><ptype>EGLBoolean</ptype> <name>eglWaitSync</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSync</ptype> <name>sync</name></param>
- <param><ptype>EGLint</ptype> <name>flags</name></param>
- </command>
- <command>
- <proto><ptype>EGLint</ptype> <name>eglWaitSyncKHR</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
- <param><ptype>EGLint</ptype> <name>flags</name></param>
- </command>
- </commands>
-
- <!-- SECTION: EGL API interface definitions. -->
- <feature api="egl" name="EGL_VERSION_1_0" number="1.0">
- <require>
- <enum name="EGL_ALPHA_SIZE"/>
- <enum name="EGL_BAD_ACCESS"/>
- <enum name="EGL_BAD_ALLOC"/>
- <enum name="EGL_BAD_ATTRIBUTE"/>
- <enum name="EGL_BAD_CONFIG"/>
- <enum name="EGL_BAD_CONTEXT"/>
- <enum name="EGL_BAD_CURRENT_SURFACE"/>
- <enum name="EGL_BAD_DISPLAY"/>
- <enum name="EGL_BAD_MATCH"/>
- <enum name="EGL_BAD_NATIVE_PIXMAP"/>
- <enum name="EGL_BAD_NATIVE_WINDOW"/>
- <enum name="EGL_BAD_PARAMETER"/>
- <enum name="EGL_BAD_SURFACE"/>
- <enum name="EGL_BLUE_SIZE"/>
- <enum name="EGL_BUFFER_SIZE"/>
- <enum name="EGL_CONFIG_CAVEAT"/>
- <enum name="EGL_CONFIG_ID"/>
- <enum name="EGL_CORE_NATIVE_ENGINE"/>
- <enum name="EGL_DEPTH_SIZE"/>
- <enum name="EGL_DONT_CARE"/>
- <enum name="EGL_DRAW"/>
- <enum name="EGL_EXTENSIONS"/>
- <enum name="EGL_FALSE"/>
- <enum name="EGL_GREEN_SIZE"/>
- <enum name="EGL_HEIGHT"/>
- <enum name="EGL_LARGEST_PBUFFER"/>
- <enum name="EGL_LEVEL"/>
- <enum name="EGL_MAX_PBUFFER_HEIGHT"/>
- <enum name="EGL_MAX_PBUFFER_PIXELS"/>
- <enum name="EGL_MAX_PBUFFER_WIDTH"/>
- <enum name="EGL_NATIVE_RENDERABLE"/>
- <enum name="EGL_NATIVE_VISUAL_ID"/>
- <enum name="EGL_NATIVE_VISUAL_TYPE"/>
- <enum name="EGL_NONE"/>
- <enum name="EGL_NON_CONFORMANT_CONFIG"/>
- <enum name="EGL_NOT_INITIALIZED"/>
- <enum name="EGL_NO_CONTEXT"/>
- <enum name="EGL_NO_DISPLAY"/>
- <enum name="EGL_NO_SURFACE"/>
- <enum name="EGL_PBUFFER_BIT"/>
- <enum name="EGL_PIXMAP_BIT"/>
- <enum name="EGL_READ"/>
- <enum name="EGL_RED_SIZE"/>
- <enum name="EGL_SAMPLES"/>
- <enum name="EGL_SAMPLE_BUFFERS"/>
- <enum name="EGL_SLOW_CONFIG"/>
- <enum name="EGL_STENCIL_SIZE"/>
- <enum name="EGL_SUCCESS"/>
- <enum name="EGL_SURFACE_TYPE"/>
- <enum name="EGL_TRANSPARENT_BLUE_VALUE"/>
- <enum name="EGL_TRANSPARENT_GREEN_VALUE"/>
- <enum name="EGL_TRANSPARENT_RED_VALUE"/>
- <enum name="EGL_TRANSPARENT_RGB"/>
- <enum name="EGL_TRANSPARENT_TYPE"/>
- <enum name="EGL_TRUE"/>
- <enum name="EGL_VENDOR"/>
- <enum name="EGL_VERSION"/>
- <enum name="EGL_WIDTH"/>
- <enum name="EGL_WINDOW_BIT"/>
- <command name="eglChooseConfig"/>
- <command name="eglCopyBuffers"/>
- <command name="eglCreateContext"/>
- <command name="eglCreatePbufferSurface"/>
- <command name="eglCreatePixmapSurface"/>
- <command name="eglCreateWindowSurface"/>
- <command name="eglDestroyContext"/>
- <command name="eglDestroySurface"/>
- <command name="eglGetConfigAttrib"/>
- <command name="eglGetConfigs"/>
- <command name="eglGetCurrentDisplay"/>
- <command name="eglGetCurrentSurface"/>
- <command name="eglGetDisplay"/>
- <command name="eglGetError"/>
- <command name="eglGetProcAddress"/>
- <command name="eglInitialize"/>
- <command name="eglMakeCurrent"/>
- <command name="eglQueryContext"/>
- <command name="eglQueryString"/>
- <command name="eglQuerySurface"/>
- <command name="eglSwapBuffers"/>
- <command name="eglTerminate"/>
- <command name="eglWaitGL"/>
- <command name="eglWaitNative"/>
- </require>
- </feature>
- <feature api="egl" name="EGL_VERSION_1_1" number="1.1">
- <require>
- <enum name="EGL_BACK_BUFFER"/>
- <enum name="EGL_BIND_TO_TEXTURE_RGB"/>
- <enum name="EGL_BIND_TO_TEXTURE_RGBA"/>
- <enum name="EGL_CONTEXT_LOST"/>
- <enum name="EGL_MIN_SWAP_INTERVAL"/>
- <enum name="EGL_MAX_SWAP_INTERVAL"/>
- <enum name="EGL_MIPMAP_TEXTURE"/>
- <enum name="EGL_MIPMAP_LEVEL"/>
- <enum name="EGL_NO_TEXTURE"/>
- <enum name="EGL_TEXTURE_2D"/>
- <enum name="EGL_TEXTURE_FORMAT"/>
- <enum name="EGL_TEXTURE_RGB"/>
- <enum name="EGL_TEXTURE_RGBA"/>
- <enum name="EGL_TEXTURE_TARGET"/>
- <command name="eglBindTexImage"/>
- <command name="eglReleaseTexImage"/>
- <command name="eglSurfaceAttrib"/>
- <command name="eglSwapInterval"/>
- </require>
- </feature>
- <feature api="egl" name="EGL_VERSION_1_2" number="1.2">
- <require>
- <enum name="EGL_ALPHA_FORMAT"/>
- <enum name="EGL_ALPHA_FORMAT_NONPRE"/>
- <enum name="EGL_ALPHA_FORMAT_PRE"/>
- <enum name="EGL_ALPHA_MASK_SIZE"/>
- <enum name="EGL_BUFFER_PRESERVED"/>
- <enum name="EGL_BUFFER_DESTROYED"/>
- <enum name="EGL_CLIENT_APIS"/>
- <enum name="EGL_COLORSPACE"/>
- <enum name="EGL_COLORSPACE_sRGB"/>
- <enum name="EGL_COLORSPACE_LINEAR"/>
- <enum name="EGL_COLOR_BUFFER_TYPE"/>
- <enum name="EGL_CONTEXT_CLIENT_TYPE"/>
- <enum name="EGL_DISPLAY_SCALING"/>
- <enum name="EGL_HORIZONTAL_RESOLUTION"/>
- <enum name="EGL_LUMINANCE_BUFFER"/>
- <enum name="EGL_LUMINANCE_SIZE"/>
- <enum name="EGL_OPENGL_ES_BIT"/>
- <enum name="EGL_OPENVG_BIT"/>
- <enum name="EGL_OPENGL_ES_API"/>
- <enum name="EGL_OPENVG_API"/>
- <enum name="EGL_OPENVG_IMAGE"/>
- <enum name="EGL_PIXEL_ASPECT_RATIO"/>
- <enum name="EGL_RENDERABLE_TYPE"/>
- <enum name="EGL_RENDER_BUFFER"/>
- <enum name="EGL_RGB_BUFFER"/>
- <enum name="EGL_SINGLE_BUFFER"/>
- <enum name="EGL_SWAP_BEHAVIOR"/>
- <enum name="EGL_UNKNOWN"/>
- <enum name="EGL_VERTICAL_RESOLUTION"/>
- <command name="eglBindAPI"/>
- <command name="eglQueryAPI"/>
- <command name="eglCreatePbufferFromClientBuffer"/>
- <command name="eglReleaseThread"/>
- <command name="eglWaitClient"/>
- </require>
- </feature>
- <feature api="egl" name="EGL_VERSION_1_3" number="1.3">
- <require>
- <enum name="EGL_CONFORMANT"/>
- <enum name="EGL_CONTEXT_CLIENT_VERSION"/>
- <enum name="EGL_MATCH_NATIVE_PIXMAP"/>
- <enum name="EGL_OPENGL_ES2_BIT"/>
- <enum name="EGL_VG_ALPHA_FORMAT"/>
- <enum name="EGL_VG_ALPHA_FORMAT_NONPRE"/>
- <enum name="EGL_VG_ALPHA_FORMAT_PRE"/>
- <enum name="EGL_VG_ALPHA_FORMAT_PRE_BIT"/>
- <enum name="EGL_VG_COLORSPACE"/>
- <enum name="EGL_VG_COLORSPACE_sRGB"/>
- <enum name="EGL_VG_COLORSPACE_LINEAR"/>
- <enum name="EGL_VG_COLORSPACE_LINEAR_BIT"/>
- </require>
- </feature>
- <feature api="egl" name="EGL_VERSION_1_4" number="1.4">
- <require>
- <enum name="EGL_DEFAULT_DISPLAY"/>
- <enum name="EGL_MULTISAMPLE_RESOLVE_BOX_BIT"/>
- <enum name="EGL_MULTISAMPLE_RESOLVE"/>
- <enum name="EGL_MULTISAMPLE_RESOLVE_DEFAULT"/>
- <enum name="EGL_MULTISAMPLE_RESOLVE_BOX"/>
- <enum name="EGL_OPENGL_API"/>
- <enum name="EGL_OPENGL_BIT"/>
- <enum name="EGL_SWAP_BEHAVIOR_PRESERVED_BIT"/>
- <command name="eglGetCurrentContext"/>
- </require>
- </feature>
- <feature api="egl" name="EGL_VERSION_1_5" number="1.5">
- <require comment="EGL_KHR_create_context features">
- <enum name="EGL_CONTEXT_MAJOR_VERSION"/>
- <enum name="EGL_CONTEXT_MINOR_VERSION"/>
- <enum name="EGL_CONTEXT_OPENGL_PROFILE_MASK"/>
- <enum name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY"/>
- <enum name="EGL_NO_RESET_NOTIFICATION"/>
- <enum name="EGL_LOSE_CONTEXT_ON_RESET"/>
- <enum name="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT"/>
- <enum name="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT"/>
- <enum name="EGL_CONTEXT_OPENGL_DEBUG"/>
- <enum name="EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE"/>
- <enum name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS"/>
- <enum name="EGL_OPENGL_ES3_BIT"/>
- </require>
- <require comment="EGL_EXT_create_context_robustness">
- <enum name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS"/>
- <enum name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY"/>
- </require>
- <require comment="EGL_EXT_client_extensions"/>
- <require comment="EGL_KHR_cl_event2">
- <enum name="EGL_CL_EVENT_HANDLE"/>
- <enum name="EGL_SYNC_CL_EVENT"/>
- <enum name="EGL_SYNC_CL_EVENT_COMPLETE"/>
- </require>
- <require comment="EGL_KHR_fence_sync">
- <enum name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE"/>
- <enum name="EGL_SYNC_TYPE"/>
- <enum name="EGL_SYNC_STATUS"/>
- <enum name="EGL_SYNC_CONDITION"/>
- <enum name="EGL_SIGNALED"/>
- <enum name="EGL_UNSIGNALED"/>
- <enum name="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
- <enum name="EGL_FOREVER"/>
- <enum name="EGL_TIMEOUT_EXPIRED"/>
- <enum name="EGL_CONDITION_SATISFIED"/>
- <enum name="EGL_NO_SYNC"/>
- <enum name="EGL_SYNC_FENCE"/>
- <command name="eglCreateSync"/>
- <command name="eglDestroySync"/>
- <command name="eglClientWaitSync"/>
- <command name="eglGetSyncAttrib"/>
- </require>
- <require comment="EGL_KHR_get_all_proc_addresses"/>
- <require comment="EGL_KHR_client_get_all_proc_addresses"/>
- <require comment="EGL_KHR_gl_colorspace">
- <enum name="EGL_GL_COLORSPACE"/>
- <enum name="EGL_GL_COLORSPACE_SRGB"/>
- <enum name="EGL_GL_COLORSPACE_LINEAR"/>
- </require>
- <require comment="EGL_KHR_gl_renderbuffer_image">
- <enum name="EGL_GL_RENDERBUFFER"/>
- </require>
- <require comment="EGL_KHR_gl_texture_2D_image">
- <enum name="EGL_GL_TEXTURE_2D"/>
- <enum name="EGL_GL_TEXTURE_LEVEL"/>
- </require>
- <require comment="EGL_KHR_gl_texture_3D_image">
- <enum name="EGL_GL_TEXTURE_3D"/>
- <enum name="EGL_GL_TEXTURE_ZOFFSET"/>
- </require>
- <require comment="EGL_KHR_gl_texture_cubemap_image">
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
- </require>
- <require comment="EGL_KHR_image_base">
- <enum name="EGL_IMAGE_PRESERVED"/>
- <enum name="EGL_NO_IMAGE"/>
- <command name="eglCreateImage"/>
- <command name="eglDestroyImage"/>
- </require>
- <require comment="EGL_EXT_platform_base">
- <command name="eglGetPlatformDisplay"/>
- <command name="eglCreatePlatformWindowSurface"/>
- <command name="eglCreatePlatformPixmapSurface"/>
- </require>
- <require comment="EGL_KHR_surfaceless_context - just relaxes an error condition"/>
- <require comment="EGL_KHR_wait_sync">
- <command name="eglWaitSync"/>
- </require>
- </feature>
-
- <!-- SECTION: EGL extension interface definitions -->
- <extensions>
- <extension name="EGL_ANDROID_blob_cache" supported="egl">
- <require>
- <command name="eglSetBlobCacheFuncsANDROID"/>
- </require>
- </extension>
- <extension name="EGL_ANDROID_framebuffer_target" supported="egl">
- <require>
- <enum name="EGL_FRAMEBUFFER_TARGET_ANDROID"/>
- </require>
- </extension>
- <extension name="EGL_ANDROID_image_native_buffer" supported="egl">
- <require>
- <enum name="EGL_NATIVE_BUFFER_ANDROID"/>
- </require>
- </extension>
- <extension name="EGL_ANDROID_native_fence_sync" supported="egl">
- <require>
- <enum name="EGL_SYNC_NATIVE_FENCE_ANDROID"/>
- <enum name="EGL_SYNC_NATIVE_FENCE_FD_ANDROID"/>
- <enum name="EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID"/>
- <enum name="EGL_NO_NATIVE_FENCE_FD_ANDROID"/>
- <command name="eglDupNativeFenceFDANDROID"/>
- </require>
- </extension>
- <extension name="EGL_ANDROID_recordable" supported="egl">
- <require>
- <enum name="EGL_RECORDABLE_ANDROID"/>
- </require>
- </extension>
- <extension name="EGL_ANGLE_d3d_share_handle_client_buffer" supported="egl">
- <require>
- <enum name="EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE"/>
- </require>
- </extension>
- <extension name="EGL_ANGLE_device_d3d" supported="egl">
- <require>
- <enum name="EGL_D3D9_DEVICE_ANGLE"/>
- <enum name="EGL_D3D11_DEVICE_ANGLE"/>
- </require>
- </extension>
- <extension name="EGL_ANGLE_query_surface_pointer" supported="egl">
- <require>
- <command name="eglQuerySurfacePointerANGLE"/>
- </require>
- </extension>
- <extension name="EGL_ANGLE_surface_d3d_texture_2d_share_handle" supported="egl">
- <require>
- <enum name="EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE"/>
- </require>
- </extension>
- <extension name="EGL_ANGLE_window_fixed_size" supported="egl">
- <require>
- <enum name="EGL_FIXED_SIZE_ANGLE"/>
- </require>
- </extension>
- <extension name="EGL_ARM_pixmap_multisample_discard" supported="egl">
- <require>
- <enum name="EGL_DISCARD_SAMPLES_ARM"/>
- </require>
- </extension>
- <extension name="EGL_EXT_buffer_age" supported="egl">
- <require>
- <enum name="EGL_BUFFER_AGE_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_client_extensions" supported="egl"/>
- <extension name="EGL_EXT_create_context_robustness" supported="egl">
- <require>
- <enum name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT"/>
- <enum name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT"/>
- <enum name="EGL_NO_RESET_NOTIFICATION_EXT"/>
- <enum name="EGL_LOSE_CONTEXT_ON_RESET_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_device_base" supported="egl">
- <require>
- <enum name="EGL_NO_DEVICE_EXT"/>
- <enum name="EGL_BAD_DEVICE_EXT"/>
- <enum name="EGL_DEVICE_EXT"/>
- <command name="eglQueryDeviceAttribEXT"/>
- <command name="eglQueryDeviceStringEXT"/>
- <command name="eglQueryDevicesEXT"/>
- <command name="eglQueryDisplayAttribEXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_device_drm" supported="egl">
- <require>
- <enum name="EGL_DRM_DEVICE_FILE_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_device_enumeration" supported="egl">
- <require>
- <command name="eglQueryDevicesEXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_device_openwf" supported="egl">
- <require>
- <enum name="EGL_OPENWF_DEVICE_ID_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_device_query" supported="egl">
- <require>
- <enum name="EGL_NO_DEVICE_EXT"/>
- <enum name="EGL_BAD_DEVICE_EXT"/>
- <enum name="EGL_DEVICE_EXT"/>
- <command name="eglQueryDeviceAttribEXT"/>
- <command name="eglQueryDeviceStringEXT"/>
- <command name="eglQueryDisplayAttribEXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_image_dma_buf_import" supported="egl">
- <require>
- <enum name="EGL_LINUX_DMA_BUF_EXT"/>
- <enum name="EGL_LINUX_DRM_FOURCC_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE0_FD_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE0_OFFSET_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE0_PITCH_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE1_FD_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE1_OFFSET_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE1_PITCH_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE2_FD_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE2_OFFSET_EXT"/>
- <enum name="EGL_DMA_BUF_PLANE2_PITCH_EXT"/>
- <enum name="EGL_YUV_COLOR_SPACE_HINT_EXT"/>
- <enum name="EGL_SAMPLE_RANGE_HINT_EXT"/>
- <enum name="EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT"/>
- <enum name="EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT"/>
- <enum name="EGL_ITU_REC601_EXT"/>
- <enum name="EGL_ITU_REC709_EXT"/>
- <enum name="EGL_ITU_REC2020_EXT"/>
- <enum name="EGL_YUV_FULL_RANGE_EXT"/>
- <enum name="EGL_YUV_NARROW_RANGE_EXT"/>
- <enum name="EGL_YUV_CHROMA_SITING_0_EXT"/>
- <enum name="EGL_YUV_CHROMA_SITING_0_5_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_multiview_window" supported="egl">
- <require>
- <enum name="EGL_MULTIVIEW_VIEW_COUNT_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_output_base" supported="egl">
- <require>
- <type name="EGLOutputLayerEXT"/>
- <type name="EGLOutputPortEXT"/>
- <enum name="EGL_NO_OUTPUT_LAYER_EXT"/>
- <enum name="EGL_NO_OUTPUT_PORT_EXT"/>
- <enum name="EGL_BAD_OUTPUT_LAYER_EXT"/>
- <enum name="EGL_BAD_OUTPUT_PORT_EXT"/>
- <enum name="EGL_SWAP_INTERVAL_EXT"/>
- <command name="eglGetOutputLayersEXT"/>
- <command name="eglGetOutputPortsEXT"/>
- <command name="eglOutputLayerAttribEXT"/>
- <command name="eglQueryOutputLayerAttribEXT"/>
- <command name="eglQueryOutputLayerStringEXT"/>
- <command name="eglOutputPortAttribEXT"/>
- <command name="eglQueryOutputPortAttribEXT"/>
- <command name="eglQueryOutputPortStringEXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_output_drm" supported="egl">
- <require>
- <enum name="EGL_DRM_CRTC_EXT"/>
- <enum name="EGL_DRM_PLANE_EXT"/>
- <enum name="EGL_DRM_CONNECTOR_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_output_openwf" supported="egl">
- <require>
- <enum name="EGL_OPENWF_PIPELINE_ID_EXT"/>
- <enum name="EGL_OPENWF_PORT_ID_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_platform_base" supported="egl">
- <require>
- <command name="eglGetPlatformDisplayEXT"/>
- <command name="eglCreatePlatformWindowSurfaceEXT"/>
- <command name="eglCreatePlatformPixmapSurfaceEXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_platform_device" supported="egl">
- <require>
- <enum name="EGL_PLATFORM_DEVICE_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_platform_wayland" supported="egl">
- <require>
- <enum name="EGL_PLATFORM_WAYLAND_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_platform_x11" supported="egl">
- <require>
- <enum name="EGL_PLATFORM_X11_EXT"/>
- <enum name="EGL_PLATFORM_X11_SCREEN_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_protected_surface" supported="egl">
- <require>
- <enum name="EGL_PROTECTED_CONTENT_EXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_stream_consumer_egloutput" supported="egl">
- <require>
- <command name="eglStreamConsumerOutputEXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_swap_buffers_with_damage" supported="egl">
- <require>
- <command name="eglSwapBuffersWithDamageEXT"/>
- </require>
- </extension>
- <extension name="EGL_EXT_yuv_surface" supported="egl">
- <require>
- <enum name="EGL_YUV_ORDER_EXT"/>
- <enum name="EGL_YUV_NUMBER_OF_PLANES_EXT"/>
- <enum name="EGL_YUV_SUBSAMPLE_EXT"/>
- <enum name="EGL_YUV_DEPTH_RANGE_EXT"/>
- <enum name="EGL_YUV_CSC_STANDARD_EXT"/>
- <enum name="EGL_YUV_PLANE_BPP_EXT"/>
- <enum name="EGL_YUV_BUFFER_EXT"/>
- <enum name="EGL_YUV_ORDER_YUV_EXT"/>
- <enum name="EGL_YUV_ORDER_YVU_EXT"/>
- <enum name="EGL_YUV_ORDER_YUYV_EXT"/>
- <enum name="EGL_YUV_ORDER_UYVY_EXT"/>
- <enum name="EGL_YUV_ORDER_YVYU_EXT"/>
- <enum name="EGL_YUV_ORDER_VYUY_EXT"/>
- <enum name="EGL_YUV_ORDER_AYUV_EXT"/>
- <enum name="EGL_YUV_SUBSAMPLE_4_2_0_EXT"/>
- <enum name="EGL_YUV_SUBSAMPLE_4_2_2_EXT"/>
- <enum name="EGL_YUV_SUBSAMPLE_4_4_4_EXT"/>
- <enum name="EGL_YUV_DEPTH_RANGE_LIMITED_EXT"/>
- <enum name="EGL_YUV_DEPTH_RANGE_FULL_EXT"/>
- <enum name="EGL_YUV_CSC_STANDARD_601_EXT"/>
- <enum name="EGL_YUV_CSC_STANDARD_709_EXT"/>
- <enum name="EGL_YUV_CSC_STANDARD_2020_EXT"/>
- <enum name="EGL_YUV_PLANE_BPP_0_EXT"/>
- <enum name="EGL_YUV_PLANE_BPP_8_EXT"/>
- <enum name="EGL_YUV_PLANE_BPP_10_EXT"/>
- </require>
- </extension>
- <extension name="EGL_HI_clientpixmap" supported="egl">
- <require>
- <enum name="EGL_CLIENT_PIXMAP_POINTER_HI"/>
- <command name="eglCreatePixmapSurfaceHI"/>
- </require>
- </extension>
- <extension name="EGL_HI_colorformats" supported="egl">
- <require>
- <enum name="EGL_COLOR_FORMAT_HI"/>
- <enum name="EGL_COLOR_RGB_HI"/>
- <enum name="EGL_COLOR_RGBA_HI"/>
- <enum name="EGL_COLOR_ARGB_HI"/>
- </require>
- </extension>
- <extension name="EGL_IMG_context_priority" supported="egl">
- <require>
- <enum name="EGL_CONTEXT_PRIORITY_LEVEL_IMG"/>
- <enum name="EGL_CONTEXT_PRIORITY_HIGH_IMG"/>
- <enum name="EGL_CONTEXT_PRIORITY_MEDIUM_IMG"/>
- <enum name="EGL_CONTEXT_PRIORITY_LOW_IMG"/>
- </require>
- </extension>
- <extension name="EGL_KHR_cl_event" supported="egl">
- <require>
- <enum name="EGL_CL_EVENT_HANDLE_KHR"/>
- <enum name="EGL_SYNC_CL_EVENT_KHR"/>
- <enum name="EGL_SYNC_CL_EVENT_COMPLETE_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_cl_event2" supported="egl">
- <require>
- <enum name="EGL_CL_EVENT_HANDLE_KHR"/>
- <enum name="EGL_SYNC_CL_EVENT_KHR"/>
- <enum name="EGL_SYNC_CL_EVENT_COMPLETE_KHR"/>
- <command name="eglCreateSync64KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_config_attribs" supported="egl">
- <require>
- <enum name="EGL_CONFORMANT_KHR"/>
- <enum name="EGL_VG_COLORSPACE_LINEAR_BIT_KHR"/>
- <enum name="EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_client_get_all_proc_addresses" supported="egl" comment="Alias of EGL_KHR_get_all_proc_addresses"/>
- <extension name="EGL_KHR_create_context" supported="egl">
- <require>
- <enum name="EGL_CONTEXT_MAJOR_VERSION_KHR"/>
- <enum name="EGL_CONTEXT_MINOR_VERSION_KHR"/>
- <enum name="EGL_CONTEXT_FLAGS_KHR"/>
- <enum name="EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR"/>
- <enum name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR"/>
- <enum name="EGL_NO_RESET_NOTIFICATION_KHR"/>
- <enum name="EGL_LOSE_CONTEXT_ON_RESET_KHR"/>
- <enum name="EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR"/>
- <enum name="EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR"/>
- <enum name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR"/>
- <enum name="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR"/>
- <enum name="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR"/>
- <enum name="EGL_OPENGL_ES3_BIT"/>
- <enum name="EGL_OPENGL_ES3_BIT_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_create_context_no_error" supported="egl">
- <require>
- <enum name="EGL_CONTEXT_OPENGL_NO_ERROR_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_debug" supported="egl">
- <require>
- <!-- Explicit dependencies require to get EGLDEBUGPROCKHR dependencies correct -->
- <type name="EGLLabelKHR"/>
- <type name="EGLObjectKHR"/>
- <enum name="EGL_OBJECT_THREAD_KHR"/>
- <enum name="EGL_OBJECT_DISPLAY_KHR"/>
- <enum name="EGL_OBJECT_CONTEXT_KHR"/>
- <enum name="EGL_OBJECT_SURFACE_KHR"/>
- <enum name="EGL_OBJECT_IMAGE_KHR"/>
- <enum name="EGL_OBJECT_SYNC_KHR"/>
- <enum name="EGL_OBJECT_STREAM_KHR"/>
- <enum name="EGL_DEBUG_MSG_CRITICAL_KHR"/>
- <enum name="EGL_DEBUG_MSG_ERROR_KHR"/>
- <enum name="EGL_DEBUG_MSG_WARN_KHR"/>
- <enum name="EGL_DEBUG_MSG_INFO_KHR"/>
- <enum name="EGL_DEBUG_CALLBACK_KHR"/>
- <command name="eglDebugMessageControlKHR"/>
- <command name="eglQueryDebugKHR"/>
- <command name="eglLabelObjectKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_fence_sync" protect="KHRONOS_SUPPORT_INT64" supported="egl">
- <require>
- <!-- Most interfaces also defined by EGL_KHR_reusable sync -->
- <enum name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR"/>
- <enum name="EGL_SYNC_CONDITION_KHR"/>
- <enum name="EGL_SYNC_FENCE_KHR"/>
- <command name="eglCreateSyncKHR"/>
- <command name="eglDestroySyncKHR"/>
- <command name="eglClientWaitSyncKHR"/>
- <command name="eglGetSyncAttribKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_get_all_proc_addresses" supported="egl"/>
- <extension name="EGL_KHR_gl_colorspace" supported="egl">
- <require>
- <enum name="EGL_GL_COLORSPACE_KHR"/>
- <enum name="EGL_GL_COLORSPACE_SRGB_KHR"/>
- <enum name="EGL_GL_COLORSPACE_LINEAR_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_gl_renderbuffer_image" supported="egl">
- <require>
- <enum name="EGL_GL_RENDERBUFFER_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_gl_texture_2D_image" supported="egl">
- <require>
- <enum name="EGL_GL_TEXTURE_2D_KHR"/>
- <enum name="EGL_GL_TEXTURE_LEVEL_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_gl_texture_3D_image" supported="egl">
- <require>
- <enum name="EGL_GL_TEXTURE_3D_KHR"/>
- <enum name="EGL_GL_TEXTURE_ZOFFSET_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_gl_texture_cubemap_image" supported="egl">
- <require>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR"/>
- <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_image" supported="egl">
- <require>
- <enum name="EGL_NATIVE_PIXMAP_KHR"/>
- <enum name="EGL_NO_IMAGE_KHR"/>
- <command name="eglCreateImageKHR"/>
- <command name="eglDestroyImageKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_image_base" supported="egl">
- <require>
- <enum name="EGL_IMAGE_PRESERVED_KHR"/>
- <enum name="EGL_NO_IMAGE_KHR"/>
- <command name="eglCreateImageKHR"/>
- <command name="eglDestroyImageKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_image_pixmap" supported="egl">
- <require>
- <enum name="EGL_NATIVE_PIXMAP_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_lock_surface" supported="egl">
- <require>
- <enum name="EGL_READ_SURFACE_BIT_KHR"/>
- <enum name="EGL_WRITE_SURFACE_BIT_KHR"/>
- <enum name="EGL_LOCK_SURFACE_BIT_KHR"/>
- <enum name="EGL_OPTIMAL_FORMAT_BIT_KHR"/>
- <enum name="EGL_MATCH_FORMAT_KHR"/>
- <enum name="EGL_FORMAT_RGB_565_EXACT_KHR"/>
- <enum name="EGL_FORMAT_RGB_565_KHR"/>
- <enum name="EGL_FORMAT_RGBA_8888_EXACT_KHR"/>
- <enum name="EGL_FORMAT_RGBA_8888_KHR"/>
- <enum name="EGL_MAP_PRESERVE_PIXELS_KHR"/>
- <enum name="EGL_LOCK_USAGE_HINT_KHR"/>
- <enum name="EGL_BITMAP_POINTER_KHR"/>
- <enum name="EGL_BITMAP_PITCH_KHR"/>
- <enum name="EGL_BITMAP_ORIGIN_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_RED_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR"/>
- <enum name="EGL_LOWER_LEFT_KHR"/>
- <enum name="EGL_UPPER_LEFT_KHR"/>
- <command name="eglLockSurfaceKHR"/>
- <command name="eglUnlockSurfaceKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_lock_surface2" supported="egl">
- <require>
- <enum name="EGL_BITMAP_PIXEL_SIZE_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_lock_surface3" supported="egl">
- <require>
- <enum name="EGL_READ_SURFACE_BIT_KHR"/>
- <enum name="EGL_WRITE_SURFACE_BIT_KHR"/>
- <enum name="EGL_LOCK_SURFACE_BIT_KHR"/>
- <enum name="EGL_OPTIMAL_FORMAT_BIT_KHR"/>
- <enum name="EGL_MATCH_FORMAT_KHR"/>
- <enum name="EGL_FORMAT_RGB_565_EXACT_KHR"/>
- <enum name="EGL_FORMAT_RGB_565_KHR"/>
- <enum name="EGL_FORMAT_RGBA_8888_EXACT_KHR"/>
- <enum name="EGL_FORMAT_RGBA_8888_KHR"/>
- <enum name="EGL_MAP_PRESERVE_PIXELS_KHR"/>
- <enum name="EGL_LOCK_USAGE_HINT_KHR"/>
- <enum name="EGL_BITMAP_PITCH_KHR"/>
- <enum name="EGL_BITMAP_ORIGIN_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_RED_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR"/>
- <enum name="EGL_BITMAP_PIXEL_SIZE_KHR"/>
- <enum name="EGL_BITMAP_POINTER_KHR"/>
- <enum name="EGL_LOWER_LEFT_KHR"/>
- <enum name="EGL_UPPER_LEFT_KHR"/>
- <command name="eglLockSurfaceKHR"/>
- <command name="eglUnlockSurfaceKHR"/>
- <command name="eglQuerySurface64KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_partial_update" supported="egl">
- <require>
- <enum name="EGL_BUFFER_AGE_KHR"/>
- <command name="eglSetDamageRegionKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_platform_android" supported="egl">
- <require>
- <enum name="EGL_PLATFORM_ANDROID_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_platform_gbm" supported="egl">
- <require>
- <enum name="EGL_PLATFORM_GBM_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_platform_wayland" supported="egl">
- <require>
- <enum name="EGL_PLATFORM_WAYLAND_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_platform_x11" supported="egl">
- <require>
- <enum name="EGL_PLATFORM_X11_KHR"/>
- <enum name="EGL_PLATFORM_X11_SCREEN_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_reusable_sync" protect="KHRONOS_SUPPORT_INT64" supported="egl">
- <require>
- <enum name="EGL_SYNC_STATUS_KHR"/>
- <enum name="EGL_SIGNALED_KHR"/>
- <enum name="EGL_UNSIGNALED_KHR"/>
- <enum name="EGL_TIMEOUT_EXPIRED_KHR"/>
- <enum name="EGL_CONDITION_SATISFIED_KHR"/>
- <enum name="EGL_SYNC_TYPE_KHR"/>
- <enum name="EGL_SYNC_REUSABLE_KHR"/>
- <enum name="EGL_SYNC_FLUSH_COMMANDS_BIT_KHR"/>
- <enum name="EGL_FOREVER_KHR"/>
- <enum name="EGL_NO_SYNC_KHR"/>
- <command name="eglCreateSyncKHR"/>
- <command name="eglDestroySyncKHR"/>
- <command name="eglClientWaitSyncKHR"/>
- <command name="eglSignalSyncKHR"/>
- <command name="eglGetSyncAttribKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_stream" protect="KHRONOS_SUPPORT_INT64" supported="egl">
- <require>
- <enum name="EGL_NO_STREAM_KHR"/>
- <enum name="EGL_CONSUMER_LATENCY_USEC_KHR"/>
- <enum name="EGL_PRODUCER_FRAME_KHR"/>
- <enum name="EGL_CONSUMER_FRAME_KHR"/>
- <enum name="EGL_STREAM_STATE_KHR"/>
- <enum name="EGL_STREAM_STATE_CREATED_KHR"/>
- <enum name="EGL_STREAM_STATE_CONNECTING_KHR"/>
- <enum name="EGL_STREAM_STATE_EMPTY_KHR"/>
- <enum name="EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR"/>
- <enum name="EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR"/>
- <enum name="EGL_STREAM_STATE_DISCONNECTED_KHR"/>
- <enum name="EGL_BAD_STREAM_KHR"/>
- <enum name="EGL_BAD_STATE_KHR"/>
- <command name="eglCreateStreamKHR"/>
- <command name="eglDestroyStreamKHR"/>
- <command name="eglStreamAttribKHR"/>
- <command name="eglQueryStreamKHR"/>
- <command name="eglQueryStreamu64KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_stream_consumer_gltexture" protect="EGL_KHR_stream" supported="egl">
- <require>
- <enum name="EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR"/>
- <command name="eglStreamConsumerGLTextureExternalKHR"/>
- <command name="eglStreamConsumerAcquireKHR"/>
- <command name="eglStreamConsumerReleaseKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_stream_cross_process_fd" protect="EGL_KHR_stream" supported="egl">
- <require>
- <enum name="EGL_NO_FILE_DESCRIPTOR_KHR"/>
- <command name="eglGetStreamFileDescriptorKHR"/>
- <command name="eglCreateStreamFromFileDescriptorKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_stream_fifo" protect="EGL_KHR_stream" supported="egl">
- <require>
- <enum name="EGL_STREAM_FIFO_LENGTH_KHR"/>
- <enum name="EGL_STREAM_TIME_NOW_KHR"/>
- <enum name="EGL_STREAM_TIME_CONSUMER_KHR"/>
- <enum name="EGL_STREAM_TIME_PRODUCER_KHR"/>
- <command name="eglQueryStreamTimeKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_stream_producer_aldatalocator" protect="EGL_KHR_stream" supported="egl"/>
- <extension name="EGL_KHR_stream_producer_eglsurface" protect="EGL_KHR_stream" supported="egl">
- <require>
- <enum name="EGL_STREAM_BIT_KHR"/>
- <command name="eglCreateStreamProducerSurfaceKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_surfaceless_context" supported="egl" comment="Just relaxes an error condition"/>
- <extension name="EGL_KHR_swap_buffers_with_damage" supported="egl">
- <require>
- <command name="eglSwapBuffersWithDamageKHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_vg_parent_image" supported="egl">
- <require>
- <enum name="EGL_VG_PARENT_IMAGE_KHR"/>
- </require>
- </extension>
- <extension name="EGL_KHR_wait_sync" supported="egl">
- <require>
- <command name="eglWaitSyncKHR"/>
- </require>
- </extension>
- <extension name="EGL_MESA_drm_image" supported="egl">
- <require>
- <enum name="EGL_DRM_BUFFER_FORMAT_MESA"/>
- <enum name="EGL_DRM_BUFFER_USE_MESA"/>
- <enum name="EGL_DRM_BUFFER_FORMAT_ARGB32_MESA"/>
- <enum name="EGL_DRM_BUFFER_MESA"/>
- <enum name="EGL_DRM_BUFFER_STRIDE_MESA"/>
- <enum name="EGL_DRM_BUFFER_USE_SCANOUT_MESA"/>
- <enum name="EGL_DRM_BUFFER_USE_SHARE_MESA"/>
- <command name="eglCreateDRMImageMESA"/>
- <command name="eglExportDRMImageMESA"/>
- </require>
- </extension>
- <extension name="EGL_MESA_image_dma_buf_export" supported="egl">
- <require>
- <type name="EGLuint64KHR"/>
- <command name="eglExportDMABUFImageQueryMESA"/>
- <command name="eglExportDMABUFImageMESA"/>
- </require>
- </extension>
- <extension name="EGL_MESA_platform_gbm" supported="egl">
- <require>
- <enum name="EGL_PLATFORM_GBM_MESA"/>
- </require>
- </extension>
- <extension name="EGL_NOK_swap_region" supported="egl">
- <require>
- <command name="eglSwapBuffersRegionNOK"/>
- </require>
- </extension>
- <extension name="EGL_NOK_swap_region2" supported="egl">
- <require>
- <command name="eglSwapBuffersRegion2NOK"/>
- </require>
- </extension>
- <extension name="EGL_NOK_texture_from_pixmap" supported="egl">
- <require>
- <enum name="EGL_Y_INVERTED_NOK"/>
- </require>
- </extension>
- <extension name="EGL_NV_3dvision_surface" supported="egl">
- <require>
- <enum name="EGL_AUTO_STEREO_NV"/>
- </require>
- </extension>
- <extension name="EGL_NV_coverage_sample" supported="egl">
- <require>
- <enum name="EGL_COVERAGE_BUFFERS_NV"/>
- <enum name="EGL_COVERAGE_SAMPLES_NV"/>
- </require>
- </extension>
- <extension name="EGL_NV_coverage_sample_resolve" supported="egl">
- <require>
- <enum name="EGL_COVERAGE_SAMPLE_RESOLVE_NV"/>
- <enum name="EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV"/>
- <enum name="EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV"/>
- </require>
- </extension>
- <extension name="EGL_NV_cuda_event" supported="egl">
- <require>
- <enum name="EGL_CUDA_EVENT_HANDLE_NV"/>
- <enum name="EGL_SYNC_CUDA_EVENT_NV"/>
- <enum name="EGL_SYNC_CUDA_EVENT_COMPLETE_NV"/>
- </require>
- </extension>
- <extension name="EGL_NV_depth_nonlinear" supported="egl">
- <require>
- <enum name="EGL_DEPTH_ENCODING_NV"/>
- <enum name="EGL_DEPTH_ENCODING_NONE_NV"/>
- <enum name="EGL_DEPTH_ENCODING_NONLINEAR_NV"/>
- </require>
- </extension>
- <extension name="EGL_NV_device_cuda" supported="egl">
- <require>
- <enum name="EGL_CUDA_DEVICE_NV"/>
- </require>
- </extension>
- <extension name="EGL_NV_native_query" supported="egl">
- <require>
- <command name="eglQueryNativeDisplayNV"/>
- <command name="eglQueryNativeWindowNV"/>
- <command name="eglQueryNativePixmapNV"/>
- </require>
- </extension>
- <extension name="EGL_NV_post_convert_rounding" supported="egl">
- <require>
- </require>
- </extension>
- <extension name="EGL_NV_post_sub_buffer" supported="egl">
- <require>
- <enum name="EGL_POST_SUB_BUFFER_SUPPORTED_NV"/>
- <command name="eglPostSubBufferNV"/>
- </require>
- </extension>
- <extension name="EGL_NV_stream_sync" supported="egl">
- <require>
- <enum name="EGL_SYNC_TYPE_KHR"/>
- <enum name="EGL_SYNC_NEW_FRAME_NV"/>
- <command name="eglCreateStreamSyncNV"/>
- </require>
- </extension>
- <extension name="EGL_NV_sync" protect="KHRONOS_SUPPORT_INT64" supported="egl">
- <require>
- <enum name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV"/>
- <enum name="EGL_SYNC_STATUS_NV"/>
- <enum name="EGL_SIGNALED_NV"/>
- <enum name="EGL_UNSIGNALED_NV"/>
- <enum name="EGL_SYNC_FLUSH_COMMANDS_BIT_NV"/>
- <enum name="EGL_FOREVER_NV"/>
- <enum name="EGL_ALREADY_SIGNALED_NV"/>
- <enum name="EGL_TIMEOUT_EXPIRED_NV"/>
- <enum name="EGL_CONDITION_SATISFIED_NV"/>
- <enum name="EGL_SYNC_TYPE_NV"/>
- <enum name="EGL_SYNC_CONDITION_NV"/>
- <enum name="EGL_SYNC_FENCE_NV"/>
- <enum name="EGL_NO_SYNC_NV"/>
- <command name="eglCreateFenceSyncNV"/>
- <command name="eglDestroySyncNV"/>
- <command name="eglFenceNV"/>
- <command name="eglClientWaitSyncNV"/>
- <command name="eglSignalSyncNV"/>
- <command name="eglGetSyncAttribNV"/>
- </require>
- </extension>
- <extension name="EGL_NV_system_time" protect="KHRONOS_SUPPORT_INT64" supported="egl">
- <require>
- <command name="eglGetSystemTimeFrequencyNV"/>
- <command name="eglGetSystemTimeNV"/>
- </require>
- </extension>
- <extension name="EGL_TIZEN_image_native_buffer" supported="egl">
- <require>
- <enum name="EGL_NATIVE_BUFFER_TIZEN"/>
- </require>
- </extension>
- <extension name="EGL_TIZEN_image_native_surface" supported="egl">
- <require>
- <enum name="EGL_NATIVE_SURFACE_TIZEN"/>
- </require>
- </extension>
- </extensions>
-</registry>
diff --git a/lib/mesa/src/egl/generate/eglFunctionList.py b/lib/mesa/src/egl/generate/eglFunctionList.py
deleted file mode 100644
index 80cb83437..000000000
--- a/lib/mesa/src/egl/generate/eglFunctionList.py
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Contains a list of EGL functions to generate dispatch functions for.
-
-This is used from gen_egl_dispatch.py.
-
-EGL_FUNCTIONS is a sequence of (name, eglData) pairs, where name is the name
-of the function, and eglData is a dictionary containing data about that
-function.
-
-The values in the eglData dictionary are:
-- method (string):
- How to select a vendor library. See "Method values" below.
-
-- prefix (string):
- This string is prepended to the name of the dispatch function. If
- unspecified, the default is "" (an empty string).
-
-- static (boolean)
- If True, this function should be declared static.
-
-- "public" (boolean)
- If True, the function should be exported from the library. Vendor libraries
- generally should not use this.
-
-- extension (string):
- If specified, this is the name of a macro to check for before defining a
- function. Used for checking for extension macros and such.
-
-- retval (string):
- If specified, this is a C expression with the default value to return if we
- can't find a function to call. By default, it will try to guess from the
- return type: EGL_NO_whatever for the various handle types, NULL for
- pointers, and zero for everything else.
-
-method values:
-- "custom"
- The dispatch stub will be hand-written instead of generated.
-
-- "none"
- No dispatch function exists at all, but the function should still have an
- entry in the index array. This is for other functions that a stub may need
- to call that are implemented in libEGL itself.
-
-- "display"
- Select a vendor from an EGLDisplay argument.
-
-- "device"
- Select a vendor from an EGLDeviceEXT argument.
-
-- "current"
- Select the vendor that owns the current context.
-"""
-
-def _eglFunc(name, method, static=None, public=False, inheader=None, prefix="dispatch_", extension=None, retval=None):
- """
- A convenience function to define an entry in the EGL function list.
- """
- if static is None:
- static = (not public and method != "custom")
- if inheader is None:
- inheader = (not static)
- values = {
- "method" : method,
- "prefix" : prefix,
- "extension" : extension,
- "retval" : retval,
- "static" : static,
- "public" : public,
- "inheader" : inheader,
- }
- return (name, values)
-
-EGL_FUNCTIONS = (
- # EGL_VERSION_1_0
- _eglFunc("eglChooseConfig", "none"),
- _eglFunc("eglCopyBuffers", "none"),
- _eglFunc("eglCreateContext", "none"),
- _eglFunc("eglCreatePbufferSurface", "none"),
- _eglFunc("eglCreatePixmapSurface", "none"),
- _eglFunc("eglCreateWindowSurface", "none"),
- _eglFunc("eglDestroyContext", "none"),
- _eglFunc("eglDestroySurface", "none"),
- _eglFunc("eglGetConfigAttrib", "none"),
- _eglFunc("eglGetConfigs", "none"),
- _eglFunc("eglQueryContext", "none"),
- _eglFunc("eglQuerySurface", "none"),
- _eglFunc("eglSwapBuffers", "none"),
- _eglFunc("eglWaitGL", "none"),
- _eglFunc("eglWaitNative", "none"),
- _eglFunc("eglTerminate", "none"),
- _eglFunc("eglInitialize", "none"),
-
- _eglFunc("eglGetCurrentDisplay", "none"),
- _eglFunc("eglGetCurrentSurface", "none"),
- _eglFunc("eglGetDisplay", "none"),
- _eglFunc("eglGetError", "none"),
- _eglFunc("eglGetProcAddress", "none"),
- _eglFunc("eglMakeCurrent", "none"),
- _eglFunc("eglQueryString", "none"),
-
- # EGL_VERSION_1_1
- _eglFunc("eglBindTexImage", "none"),
- _eglFunc("eglReleaseTexImage", "none"),
- _eglFunc("eglSurfaceAttrib", "none"),
- _eglFunc("eglSwapInterval", "none"),
-
- # EGL_VERSION_1_2
- _eglFunc("eglCreatePbufferFromClientBuffer", "none"),
- _eglFunc("eglWaitClient", "none"),
- _eglFunc("eglBindAPI", "none"),
- _eglFunc("eglQueryAPI", "none"),
- _eglFunc("eglReleaseThread", "none"),
-
- # EGL_VERSION_1_4
- _eglFunc("eglGetCurrentContext", "none"),
-
- # EGL_VERSION_1_5
- _eglFunc("eglCreateSync", "none"),
- _eglFunc("eglDestroySync", "none"),
- _eglFunc("eglClientWaitSync", "none"),
- _eglFunc("eglGetSyncAttrib", "none"),
- _eglFunc("eglCreateImage", "none"),
- _eglFunc("eglDestroyImage", "none"),
- _eglFunc("eglCreatePlatformWindowSurface", "none"),
- _eglFunc("eglCreatePlatformPixmapSurface", "none"),
- _eglFunc("eglWaitSync", "none"),
- _eglFunc("eglGetPlatformDisplay", "none"),
-
- # EGL_EXT_platform_base
- _eglFunc("eglCreatePlatformWindowSurfaceEXT", "display"),
- _eglFunc("eglCreatePlatformPixmapSurfaceEXT", "display"),
- _eglFunc("eglGetPlatformDisplayEXT", "none"),
-
- # TODO: Most of these extensions should be provided by the vendor
- # libraries, not by libEGL. They're here now to make testing everything
- # else easier.
-
- # EGL_EXT_swap_buffers_with_damage
- _eglFunc("eglSwapBuffersWithDamageEXT", "display"),
-
- # KHR_EXT_swap_buffers_with_damage
- _eglFunc("eglSwapBuffersWithDamageKHR", "display"),
-
- # EGL_KHR_cl_event2
- _eglFunc("eglCreateSync64KHR", "display"),
-
- # EGL_KHR_fence_sync
- _eglFunc("eglCreateSyncKHR", "display"),
- _eglFunc("eglDestroySyncKHR", "display"),
- _eglFunc("eglClientWaitSyncKHR", "display"),
- _eglFunc("eglGetSyncAttribKHR", "display"),
-
- # EGL_KHR_image
- _eglFunc("eglCreateImageKHR", "display"),
- _eglFunc("eglDestroyImageKHR", "display"),
-
- # EGL_KHR_image_base
- # eglCreateImageKHR already defined in EGL_KHR_image
- # eglDestroyImageKHR already defined in EGL_KHR_image
-
- # EGL_KHR_reusable_sync
- _eglFunc("eglSignalSyncKHR", "display"),
- # eglCreateSyncKHR already defined in EGL_KHR_fence_sync
- # eglDestroySyncKHR already defined in EGL_KHR_fence_sync
- # eglClientWaitSyncKHR already defined in EGL_KHR_fence_sync
- # eglGetSyncAttribKHR already defined in EGL_KHR_fence_sync
-
- # EGL_KHR_wait_sync
- _eglFunc("eglWaitSyncKHR", "display"),
-
- # EGL_MESA_drm_image
- _eglFunc("eglCreateDRMImageMESA", "display"),
- _eglFunc("eglExportDRMImageMESA", "display"),
-
- # EGL_MESA_image_dma_buf_export
- _eglFunc("eglExportDMABUFImageQueryMESA", "display"),
- _eglFunc("eglExportDMABUFImageMESA", "display"),
-
- # EGL_NOK_swap_region
- _eglFunc("eglSwapBuffersRegionNOK", "display"),
-
- # EGL_NV_post_sub_buffer
- _eglFunc("eglPostSubBufferNV", "display"),
-
- # EGL_WL_bind_wayland_display
- _eglFunc("eglCreateWaylandBufferFromImageWL", "display"),
- _eglFunc("eglUnbindWaylandDisplayWL", "display"),
- _eglFunc("eglQueryWaylandBufferWL", "display"),
- _eglFunc("eglBindWaylandDisplayWL", "display"),
-
- # EGL_CHROMIUM_get_sync_values
- _eglFunc("eglGetSyncValuesCHROMIUM", "display"),
-
- # EGL_ANDROID_native_fence_sync
- _eglFunc("eglDupNativeFenceFDANDROID", "display"),
-)
-
diff --git a/lib/mesa/src/egl/generate/egl_other.xml b/lib/mesa/src/egl/generate/egl_other.xml
deleted file mode 100644
index 7fe3a9e27..000000000
--- a/lib/mesa/src/egl/generate/egl_other.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<registry>
- <comment>
- This file contains any EGL extension functions that are missing from
- the normal egl.xml list.
- </comment>
- <commands namespace="EGL">
- <!-- EGL_WL_bind_wayland_display -->
- <command>
- <proto>struct wl_buffer * <name>eglCreateWaylandBufferFromImageWL</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>EGLImage</ptype> <name>image</name></param>
- </command>
-
- <command>
- <proto>EGLBoolean <name>eglUnbindWaylandDisplayWL</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>struct wl_display *</ptype> <name>display</name></param>
- </command>
-
- <command>
- <proto>EGLBoolean <name>eglQueryWaylandBufferWL</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>struct wl_resource *</ptype> <name>buffer</name></param>
- <param><ptype>EGLint</ptype> <name>attribute</name></param>
- <param><ptype>EGLint *</ptype> <name>value</name></param>
- </command>
-
- <command>
- <proto>EGLBoolean <name>eglBindWaylandDisplayWL</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
- <param><ptype>struct wl_display *</ptype> <name>display</name></param>
- </command>
-
- <!-- EGL_CHROMIUM_get_sync_values -->
- <command>
- <proto>EGLBoolean <name>eglGetSyncValuesCHROMIUM</name></proto>
- <param><ptype>EGLDisplay</ptype> <name>display</name></param>
- <param><ptype>EGLSurface</ptype> <name>surface</name></param>
- <param><ptype>EGLuint64KHR *</ptype> <name>ust</name></param>
- <param><ptype>EGLuint64KHR *</ptype> <name>msc</name></param>
- <param><ptype>EGLuint64KHR *</ptype> <name>sbc</name></param>
- </command>
- </commands>
-</registry>
-
-
diff --git a/lib/mesa/src/egl/generate/genCommon.py b/lib/mesa/src/egl/generate/genCommon.py
deleted file mode 100644
index d493d7bf2..000000000
--- a/lib/mesa/src/egl/generate/genCommon.py
+++ /dev/null
@@ -1,223 +0,0 @@
-#!/usr/bin/env python
-
-# (C) Copyright 2015, NVIDIA CORPORATION.
-# 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
-# on 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 NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM AND/OR ITS SUPPLIERS 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.
-#
-# Authors:
-# Kyle Brenneman <kbrenneman@nvidia.com>
-
-import collections
-import re
-import sys
-import xml.etree.cElementTree as etree
-
-MAPI_TABLE_NUM_DYNAMIC = 4096
-
-_LIBRARY_FEATURE_NAMES = {
- # libGL and libGLdiapatch both include every function.
- "gl" : None,
- "gldispatch" : None,
- "opengl" : frozenset(( "GL_VERSION_1_0", "GL_VERSION_1_1",
- "GL_VERSION_1_2", "GL_VERSION_1_3", "GL_VERSION_1_4", "GL_VERSION_1_5",
- "GL_VERSION_2_0", "GL_VERSION_2_1", "GL_VERSION_3_0", "GL_VERSION_3_1",
- "GL_VERSION_3_2", "GL_VERSION_3_3", "GL_VERSION_4_0", "GL_VERSION_4_1",
- "GL_VERSION_4_2", "GL_VERSION_4_3", "GL_VERSION_4_4", "GL_VERSION_4_5",
- )),
- "glesv1" : frozenset(("GL_VERSION_ES_CM_1_0", "GL_OES_point_size_array")),
- "glesv2" : frozenset(("GL_ES_VERSION_2_0", "GL_ES_VERSION_3_0",
- "GL_ES_VERSION_3_1" "GL_ES_VERSION_3_2",
- )),
-}
-
-def getFunctions(xmlFiles):
- """
- Reads an XML file and returns all of the functions defined in it.
-
- xmlFile should be the path to Khronos's gl.xml file. The return value is a
- sequence of FunctionDesc objects, ordered by slot number.
- """
- roots = [ etree.parse(xmlFile).getroot() for xmlFile in xmlFiles ]
- return getFunctionsFromRoots(roots)
-
-def getFunctionsFromRoots(roots):
- functions = {}
- for root in roots:
- for func in _getFunctionList(root):
- functions[func.name] = func
- functions = functions.values()
-
- # Sort the function list by name.
- functions = sorted(functions, key=lambda f: f.name)
-
- # Assign a slot number to each function. This isn't strictly necessary,
- # since you can just look at the index in the list, but it makes it easier
- # to include the slot when formatting output.
- for i in range(len(functions)):
- functions[i] = functions[i]._replace(slot=i)
-
- return functions
-
-def getExportNamesFromRoots(target, roots):
- """
- Goes through the <feature> tags from gl.xml and returns a set of OpenGL
- functions that a library should export.
-
- target should be one of "gl", "gldispatch", "opengl", "glesv1", or
- "glesv2".
- """
- featureNames = _LIBRARY_FEATURE_NAMES[target]
- if featureNames is None:
- return set(func.name for func in getFunctionsFromRoots(roots))
-
- names = set()
- for root in roots:
- features = []
- for featElem in root.findall("feature"):
- if featElem.get("name") in featureNames:
- features.append(featElem)
- for featElem in root.findall("extensions/extension"):
- if featElem.get("name") in featureNames:
- features.append(featElem)
- for featElem in features:
- for commandElem in featElem.findall("require/command"):
- names.add(commandElem.get("name"))
- return names
-
-class FunctionArg(collections.namedtuple("FunctionArg", "type name")):
- @property
- def dec(self):
- """
- Returns a "TYPE NAME" string, suitable for a function prototype.
- """
- rv = str(self.type)
- if not rv.endswith("*"):
- rv += " "
- rv += self.name
- return rv
-
-class FunctionDesc(collections.namedtuple("FunctionDesc", "name rt args slot")):
- def hasReturn(self):
- """
- Returns true if the function returns a value.
- """
- return (self.rt != "void")
-
- @property
- def decArgs(self):
- """
- Returns a string with the types and names of the arguments, as you
- would use in a function declaration.
- """
- if not self.args:
- return "void"
- else:
- return ", ".join(arg.dec for arg in self.args)
-
- @property
- def callArgs(self):
- """
- Returns a string with the names of the arguments, as you would use in a
- function call.
- """
- return ", ".join(arg.name for arg in self.args)
-
- @property
- def basename(self):
- assert self.name.startswith("gl")
- return self.name[2:]
-
-def _getFunctionList(root):
- for elem in root.findall("commands/command"):
- yield _parseCommandElem(elem)
-
-def _parseCommandElem(elem):
- protoElem = elem.find("proto")
- (rt, name) = _parseProtoElem(protoElem)
-
- args = []
- for ch in elem.findall("param"):
- # <param> tags have the same format as a <proto> tag.
- args.append(FunctionArg(*_parseProtoElem(ch)))
- func = FunctionDesc(name, rt, tuple(args), slot=None)
-
- return func
-
-def _parseProtoElem(elem):
- # If I just remove the tags and string the text together, I'll get valid C code.
- text = _flattenText(elem)
- text = text.strip()
- m = re.match(r"^(.+)\b(\w+)(?:\s*\[\s*(\d*)\s*\])?$", text, re.S)
- if m:
- typename = _fixupTypeName(m.group(1))
- name = m.group(2)
- if m.group(3):
- # HACK: glPathGlyphIndexRangeNV defines an argument like this:
- # GLuint baseAndCount[2]
- # Convert it to a pointer and hope for the best.
- typename += "*"
- return (typename, name)
- else:
- raise ValueError("Can't parse element %r -> %r" % (elem, text))
-
-def _flattenText(elem):
- """
- Returns the text in an element and all child elements, with the tags
- removed.
- """
- text = ""
- if elem.text is not None:
- text = elem.text
- for ch in elem:
- text += _flattenText(ch)
- if ch.tail is not None:
- text += ch.tail
- return text
-
-def _fixupTypeName(typeName):
- """
- Converts a typename into a more consistent format.
- """
-
- rv = typeName.strip()
-
- # Replace "GLvoid" with just plain "void".
- rv = re.sub(r"\bGLvoid\b", "void", rv)
-
- # Remove the vendor suffixes from types that have a suffix-less version.
- rv = re.sub(r"\b(GLhalf|GLintptr|GLsizeiptr|GLint64|GLuint64)(?:ARB|EXT|NV|ATI)\b", r"\1", rv)
-
- rv = re.sub(r"\bGLvoid\b", "void", rv)
-
- # Clear out any leading and trailing whitespace.
- rv = rv.strip()
-
- # Remove any whitespace before a '*'
- rv = re.sub(r"\s+\*", r"*", rv)
-
- # Change "foo*" to "foo *"
- rv = re.sub(r"([^\*])\*", r"\1 *", rv)
-
- # Condense all whitespace into a single space.
- rv = re.sub(r"\s+", " ", rv)
-
- return rv
-
diff --git a/lib/mesa/src/egl/generate/gen_egl_dispatch.py b/lib/mesa/src/egl/generate/gen_egl_dispatch.py
deleted file mode 100644
index eeb3f3f9a..000000000
--- a/lib/mesa/src/egl/generate/gen_egl_dispatch.py
+++ /dev/null
@@ -1,250 +0,0 @@
-#!/usr/bin/env python
-
-# (C) Copyright 2016, NVIDIA CORPORATION.
-# 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
-# on 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 NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM AND/OR ITS SUPPLIERS 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.
-#
-# Authors:
-# Kyle Brenneman <kbrenneman@nvidia.com>
-
-"""
-Generates dispatch functions for EGL.
-
-The list of functions and arguments is read from the Khronos's XML files, with
-additional information defined in the module eglFunctionList.
-"""
-
-import argparse
-import collections
-import imp
-import sys
-import textwrap
-
-import genCommon
-
-def main():
- parser = argparse.ArgumentParser()
- parser.add_argument("target", choices=("header", "source"),
- help="Whether to build the source or header file.")
- parser.add_argument("func_list_file", help="The function list .py file.")
- parser.add_argument("xml_files", nargs="+", help="The XML files with the EGL function lists.")
-
- args = parser.parse_args()
-
- # The function list is a Python module, but it's specified on the command
- # line.
- eglFunctionList = imp.load_source("eglFunctionList", args.func_list_file)
-
- xmlFunctions = genCommon.getFunctions(args.xml_files)
- xmlByName = dict((f.name, f) for f in xmlFunctions)
- functions = []
- for (name, eglFunc) in eglFunctionList.EGL_FUNCTIONS:
- func = xmlByName[name]
- eglFunc = fixupEglFunc(func, eglFunc)
- functions.append((func, eglFunc))
-
- # Sort the function list by name.
- functions = sorted(functions, key=lambda f: f[0].name)
-
- if args.target == "header":
- text = generateHeader(functions)
- elif args.target == "source":
- text = generateSource(functions)
- sys.stdout.write(text)
-
-def fixupEglFunc(func, eglFunc):
- result = dict(eglFunc)
- if result.get("prefix") is None:
- result["prefix"] = ""
-
- if result.get("extension") is not None:
- text = "defined(" + result["extension"] + ")"
- result["extension"] = text
-
- if result["method"] in ("none", "custom"):
- return result
-
- if result["method"] not in ("display", "device", "current"):
- raise ValueError("Invalid dispatch method %r for function %r" % (result["method"], func.name))
-
- if func.hasReturn():
- if result.get("retval") is None:
- result["retval"] = getDefaultReturnValue(func.rt)
-
- return result
-
-def generateHeader(functions):
- text = textwrap.dedent(r"""
- #ifndef G_EGLDISPATCH_STUBS_H
- #define G_EGLDISPATCH_STUBS_H
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #include <EGL/egl.h>
- #include <EGL/eglext.h>
- #include "glvnd/libeglabi.h"
-
- """.lstrip("\n"))
-
- text += "enum {\n"
- for (func, eglFunc) in functions:
- text += generateGuardBegin(func, eglFunc)
- text += " __EGL_DISPATCH_" + func.name + ",\n"
- text += generateGuardEnd(func, eglFunc)
- text += " __EGL_DISPATCH_COUNT\n"
- text += "};\n"
-
- for (func, eglFunc) in functions:
- if eglFunc["inheader"]:
- text += generateGuardBegin(func, eglFunc)
- text += "{f.rt} EGLAPIENTRY {ex[prefix]}{f.name}({f.decArgs});\n".format(f=func, ex=eglFunc)
- text += generateGuardEnd(func, eglFunc)
-
- text += textwrap.dedent(r"""
- #ifdef __cplusplus
- }
- #endif
- #endif // G_EGLDISPATCH_STUBS_H
- """)
- return text
-
-def generateSource(functions):
- # First, sort the function list by name.
- text = ""
- text += '#include "egldispatchstubs.h"\n'
- text += '#include "g_egldispatchstubs.h"\n'
- text += "\n"
-
- for (func, eglFunc) in functions:
- if eglFunc["method"] not in ("custom", "none"):
- text += generateGuardBegin(func, eglFunc)
- text += generateDispatchFunc(func, eglFunc)
- text += generateGuardEnd(func, eglFunc)
-
- text += "\n"
- text += "const char * const __EGL_DISPATCH_FUNC_NAMES[__EGL_DISPATCH_COUNT + 1] = {\n"
- for (func, eglFunc) in functions:
- text += generateGuardBegin(func, eglFunc)
- text += ' "' + func.name + '",\n'
- text += generateGuardEnd(func, eglFunc)
- text += " NULL\n"
- text += "};\n"
-
- text += "const __eglMustCastToProperFunctionPointerType __EGL_DISPATCH_FUNCS[__EGL_DISPATCH_COUNT + 1] = {\n"
- for (func, eglFunc) in functions:
- text += generateGuardBegin(func, eglFunc)
- if eglFunc["method"] != "none":
- text += " (__eglMustCastToProperFunctionPointerType) " + eglFunc.get("prefix", "") + func.name + ",\n"
- else:
- text += " NULL, // " + func.name + "\n"
- text += generateGuardEnd(func, eglFunc)
- text += " NULL\n"
- text += "};\n"
-
- return text
-
-def generateGuardBegin(func, eglFunc):
- ext = eglFunc.get("extension")
- if ext is not None:
- return "#if " + ext + "\n"
- else:
- return ""
-
-def generateGuardEnd(func, eglFunc):
- if eglFunc.get("extension") is not None:
- return "#endif\n"
- else:
- return ""
-
-def generateDispatchFunc(func, eglFunc):
- text = ""
-
- if eglFunc.get("static"):
- text += "static "
- elif eglFunc.get("public"):
- text += "PUBLIC "
- text += textwrap.dedent(
- r"""
- {f.rt} EGLAPIENTRY {ef[prefix]}{f.name}({f.decArgs})
- {{
- typedef {f.rt} EGLAPIENTRY (* _pfn_{f.name})({f.decArgs});
- """).lstrip("\n").format(f=func, ef=eglFunc)
-
- if func.hasReturn():
- text += " {f.rt} _ret = {ef[retval]};\n".format(f=func, ef=eglFunc)
-
- text += " _pfn_{f.name} _ptr_{f.name} = (_pfn_{f.name}) ".format(f=func)
- if eglFunc["method"] == "current":
- text += "__eglDispatchFetchByCurrent(__EGL_DISPATCH_{f.name});\n".format(f=func)
-
- elif eglFunc["method"] in ("display", "device"):
- if eglFunc["method"] == "display":
- lookupFunc = "__eglDispatchFetchByDisplay"
- lookupType = "EGLDisplay"
- else:
- assert eglFunc["method"] == "device"
- lookupFunc = "__eglDispatchFetchByDevice"
- lookupType = "EGLDeviceEXT"
-
- lookupArg = None
- for arg in func.args:
- if arg.type == lookupType:
- lookupArg = arg.name
- break
- if lookupArg is None:
- raise ValueError("Can't find %s argument for function %s" % (lookupType, func.name,))
-
- text += "{lookupFunc}({lookupArg}, __EGL_DISPATCH_{f.name});\n".format(
- f=func, lookupFunc=lookupFunc, lookupArg=lookupArg)
- else:
- raise ValueError("Unknown dispatch method: %r" % (eglFunc["method"],))
-
- text += " if(_ptr_{f.name} != NULL) {{\n".format(f=func)
- text += " "
- if func.hasReturn():
- text += "_ret = "
- text += "_ptr_{f.name}({f.callArgs});\n".format(f=func)
- text += " }\n"
-
- if func.hasReturn():
- text += " return _ret;\n"
- text += "}\n"
- return text
-
-def getDefaultReturnValue(typename):
- if typename.endswith("*"):
- return "NULL"
- elif typename == "EGLDisplay":
- return "EGL_NO_DISPLAY"
- elif typename == "EGLContext":
- return "EGL_NO_CONTEXT"
- elif typename == "EGLSurface":
- return "EGL_NO_SURFACE"
- elif typename == "EGLBoolean":
- return "EGL_FALSE";
-
- return "0"
-
-if __name__ == "__main__":
- main()
-
diff --git a/lib/mesa/src/egl/main/50_mesa.json b/lib/mesa/src/egl/main/50_mesa.json
deleted file mode 100644
index 8aaaa100f..000000000
--- a/lib/mesa/src/egl/main/50_mesa.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "file_format_version" : "1.0.0",
- "ICD" : {
- "library_path" : "libEGL_mesa.so.0"
- }
-}
diff --git a/lib/mesa/src/egl/main/eglapi.c b/lib/mesa/src/egl/main/eglapi.c
index 323634e45..d93f26cbc 100644
--- a/lib/mesa/src/egl/main/eglapi.c
+++ b/lib/mesa/src/egl/main/eglapi.c
@@ -88,6 +88,7 @@
#include <string.h>
#include "c99_compat.h"
#include "c11/threads.h"
+#include "GL/mesa_glinterop.h"
#include "eglcompiler.h"
#include "eglglobals.h"
@@ -249,6 +250,78 @@ _eglUnlockDisplay(_EGLDisplay *dpy)
mtx_unlock(&dpy->Mutex);
}
+static EGLBoolean
+_eglSetFuncName(const char *funcName, _EGLDisplay *disp, EGLenum objectType, _EGLResource *object)
+{
+ _EGLThreadInfo *thr = _eglGetCurrentThread();
+ if (!_eglIsCurrentThreadDummy()) {
+ thr->CurrentFuncName = funcName;
+ thr->CurrentObjectLabel = NULL;
+
+ if (objectType == EGL_OBJECT_THREAD_KHR)
+ thr->CurrentObjectLabel = thr->Label;
+ else if (objectType == EGL_OBJECT_DISPLAY_KHR && disp)
+ thr->CurrentObjectLabel = disp->Label;
+ else if (object)
+ thr->CurrentObjectLabel = object->Label;
+
+ return EGL_TRUE;
+ }
+
+ _eglDebugReportFull(EGL_BAD_ALLOC, funcName, funcName,
+ EGL_DEBUG_MSG_CRITICAL_KHR, NULL, NULL);
+ return EGL_FALSE;
+}
+
+#define _EGL_FUNC_START(disp, objectType, object, ret) \
+ do { \
+ if (!_eglSetFuncName(__func__, disp, objectType, (_EGLResource *) object)) { \
+ if (disp) \
+ _eglUnlockDisplay(disp); \
+ return ret; \
+ } \
+ } while(0)
+
+/**
+ * Convert an attribute list from EGLint[] to EGLAttrib[].
+ *
+ * Return an EGL error code. The output parameter out_attrib_list is modified
+ * only on success.
+ */
+EGLint
+_eglConvertIntsToAttribs(const EGLint *int_list, EGLAttrib **out_attrib_list)
+{
+ size_t len = 0;
+ EGLAttrib *attrib_list;
+
+ if (int_list) {
+ while (int_list[2*len] != EGL_NONE)
+ ++len;
+ }
+
+ if (len == 0) {
+ *out_attrib_list = NULL;
+ return EGL_SUCCESS;
+ }
+
+ if (2*len + 1 > SIZE_MAX / sizeof(EGLAttrib))
+ return EGL_BAD_ALLOC;
+
+ attrib_list = malloc((2*len + 1) * sizeof(EGLAttrib));
+ if (!attrib_list)
+ return EGL_BAD_ALLOC;
+
+ for (size_t i = 0; i < len; ++i) {
+ attrib_list[2*i + 0] = int_list[2*i + 0];
+ attrib_list[2*i + 1] = int_list[2*i + 1];
+ }
+
+ attrib_list[2*len] = EGL_NONE;
+
+ *out_attrib_list = attrib_list;
+ return EGL_SUCCESS;
+}
+
static EGLint *
_eglConvertAttribsToInt(const EGLAttrib *attr_list)
@@ -286,6 +359,8 @@ eglGetDisplay(EGLNativeDisplayType nativeDisplay)
_EGLDisplay *dpy;
void *native_display_ptr;
+ _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL, EGL_NO_DISPLAY);
+
STATIC_ASSERT(sizeof(void*) == sizeof(nativeDisplay));
native_display_ptr = (void*) nativeDisplay;
@@ -294,9 +369,9 @@ eglGetDisplay(EGLNativeDisplayType nativeDisplay)
return _eglGetDisplayHandle(dpy);
}
-static EGLDisplay EGLAPIENTRY
-eglGetPlatformDisplayEXT(EGLenum platform, void *native_display,
- const EGLint *attrib_list)
+static EGLDisplay
+_eglGetPlatformDisplayCommon(EGLenum platform, void *native_display,
+ const EGLint *attrib_list)
{
_EGLDisplay *dpy;
@@ -318,6 +393,11 @@ eglGetPlatformDisplayEXT(EGLenum platform, void *native_display,
attrib_list);
break;
#endif
+#ifdef HAVE_SURFACELESS_PLATFORM
+ case EGL_PLATFORM_SURFACELESS_MESA:
+ dpy = _eglGetSurfacelessDisplay(native_display, attrib_list);
+ break;
+#endif
default:
RETURN_EGL_ERROR(NULL, EGL_BAD_PARAMETER, NULL);
}
@@ -325,17 +405,28 @@ eglGetPlatformDisplayEXT(EGLenum platform, void *native_display,
return _eglGetDisplayHandle(dpy);
}
+static EGLDisplay EGLAPIENTRY
+eglGetPlatformDisplayEXT(EGLenum platform, void *native_display,
+ const EGLint *attrib_list)
+{
+ _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL, EGL_NO_DISPLAY);
+ return _eglGetPlatformDisplayCommon(platform, native_display, attrib_list);
+}
+
EGLDisplay EGLAPIENTRY
eglGetPlatformDisplay(EGLenum platform, void *native_display,
const EGLAttrib *attrib_list)
{
EGLDisplay display;
- EGLint *int_attribs = _eglConvertAttribsToInt(attrib_list);
+ EGLint *int_attribs;
+
+ _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL, EGL_NO_DISPLAY);
+ int_attribs = _eglConvertAttribsToInt(attrib_list);
if (attrib_list && !int_attribs)
RETURN_EGL_ERROR(NULL, EGL_BAD_ALLOC, NULL);
- display = eglGetPlatformDisplayEXT(platform, native_display, int_attribs);
+ display = _eglGetPlatformDisplayCommon(platform, native_display, int_attribs);
free(int_attribs);
return display;
}
@@ -381,7 +472,9 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
char *exts = dpy->ExtensionsString;
/* Please keep these sorted alphabetically. */
+ _EGL_CHECK_EXTENSION(ANDROID_framebuffer_target);
_EGL_CHECK_EXTENSION(ANDROID_image_native_buffer);
+ _EGL_CHECK_EXTENSION(ANDROID_recordable);
_EGL_CHECK_EXTENSION(CHROMIUM_sync_control);
@@ -403,13 +496,15 @@ _eglCreateExtensionsString(_EGLDisplay *dpy)
_eglAppendExtension(&exts, "EGL_KHR_image");
_EGL_CHECK_EXTENSION(KHR_image_base);
_EGL_CHECK_EXTENSION(KHR_image_pixmap);
+ _EGL_CHECK_EXTENSION(KHR_no_config_context);
_EGL_CHECK_EXTENSION(KHR_reusable_sync);
_EGL_CHECK_EXTENSION(KHR_surfaceless_context);
- _EGL_CHECK_EXTENSION(KHR_vg_parent_image);
+ if (dpy->Extensions.EXT_swap_buffers_with_damage)
+ _eglAppendExtension(&exts, "EGL_KHR_swap_buffers_with_damage");
_EGL_CHECK_EXTENSION(KHR_wait_sync);
- _EGL_CHECK_EXTENSION(MESA_configless_context);
- _EGL_CHECK_EXTENSION(MESA_drm_display);
+ if (dpy->Extensions.KHR_no_config_context)
+ _eglAppendExtension(&exts, "EGL_MESA_configless_context");
_EGL_CHECK_EXTENSION(MESA_drm_image);
_EGL_CHECK_EXTENSION(MESA_image_dma_buf_export);
@@ -430,14 +525,11 @@ _eglCreateAPIsString(_EGLDisplay *dpy)
if (dpy->ClientAPIs & EGL_OPENGL_BIT)
strcat(dpy->ClientAPIsString, "OpenGL ");
- if (dpy->ClientAPIs & EGL_OPENGL_ES_BIT)
+ if (dpy->ClientAPIs & EGL_OPENGL_ES_BIT ||
+ dpy->ClientAPIs & EGL_OPENGL_ES2_BIT ||
+ dpy->ClientAPIs & EGL_OPENGL_ES3_BIT_KHR) {
strcat(dpy->ClientAPIsString, "OpenGL_ES ");
-
- if (dpy->ClientAPIs & EGL_OPENGL_ES2_BIT)
- strcat(dpy->ClientAPIsString, "OpenGL_ES2 ");
-
- if (dpy->ClientAPIs & EGL_OPENGL_ES3_BIT_KHR)
- strcat(dpy->ClientAPIsString, "OpenGL_ES3 ");
+ }
if (dpy->ClientAPIs & EGL_OPENVG_BIT)
strcat(dpy->ClientAPIsString, "OpenVG ");
@@ -475,6 +567,8 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
if (!disp)
RETURN_EGL_ERROR(NULL, EGL_BAD_DISPLAY, EGL_FALSE);
@@ -525,6 +619,8 @@ eglTerminate(EGLDisplay dpy)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
if (!disp)
RETURN_EGL_ERROR(NULL, EGL_BAD_DISPLAY, EGL_FALSE);
@@ -552,6 +648,7 @@ eglQueryString(EGLDisplay dpy, EGLint name)
}
disp = _eglLockDisplay(dpy);
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, NULL);
_EGL_CHECK_DISPLAY(disp, NULL, drv);
switch (name) {
@@ -577,6 +674,8 @@ eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
ret = drv->API.GetConfigs(drv, disp, configs, config_size, num_config);
@@ -592,6 +691,8 @@ eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
ret = drv->API.ChooseConfig(drv, disp, attrib_list, configs,
config_size, num_config);
@@ -609,6 +710,8 @@ eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
_EGL_CHECK_CONFIG(disp, conf, EGL_FALSE, drv);
ret = drv->API.GetConfigAttrib(drv, disp, conf, attribute, value);
@@ -627,9 +730,13 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list,
_EGLContext *context;
EGLContext ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_CONTEXT);
+
_EGL_CHECK_DISPLAY(disp, EGL_NO_CONTEXT, drv);
- if (!config && !disp->Extensions.MESA_configless_context)
+ if (config != EGL_NO_CONFIG_KHR)
+ _EGL_CHECK_CONFIG(disp, conf, EGL_NO_CONTEXT, drv);
+ else if (!disp->Extensions.KHR_no_config_context)
RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT);
if (!share && share_list != EGL_NO_CONTEXT)
@@ -650,6 +757,8 @@ eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_CONTEXT_KHR, context, EGL_FALSE);
+
_EGL_CHECK_CONTEXT(disp, context, EGL_FALSE, drv);
_eglUnlinkContext(context);
ret = drv->API.DestroyContext(drv, disp, context);
@@ -669,6 +778,8 @@ eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_CONTEXT_KHR, context, EGL_FALSE);
+
if (!disp)
RETURN_EGL_ERROR(disp, EGL_BAD_DISPLAY, EGL_FALSE);
drv = disp->Driver;
@@ -715,6 +826,8 @@ eglQueryContext(EGLDisplay dpy, EGLContext ctx,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_CONTEXT_KHR, context, EGL_FALSE);
+
_EGL_CHECK_CONTEXT(disp, context, EGL_FALSE, drv);
ret = drv->API.QueryContext(drv, disp, context, attribute, value);
@@ -731,11 +844,33 @@ _eglCreateWindowSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
_EGLSurface *surf;
EGLSurface ret;
- _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
if (native_window == NULL)
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
+#ifdef HAVE_SURFACELESS_PLATFORM
+ if (disp && disp->Platform == _EGL_PLATFORM_SURFACELESS) {
+ /* From the EGL_MESA_platform_surfaceless spec (v1):
+ *
+ * eglCreatePlatformWindowSurface fails when called with a <display>
+ * that belongs to the surfaceless platform. It returns
+ * EGL_NO_SURFACE and generates EGL_BAD_NATIVE_WINDOW. The
+ * justification for this unconditional failure is that the
+ * surfaceless platform has no native windows, and therefore the
+ * <native_window> parameter is always invalid.
+ *
+ * This check must occur before checking the EGLConfig, which emits
+ * EGL_BAD_CONFIG.
+ */
+ RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
+ }
+#endif
+
+ _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
+
+ if ((conf->SurfaceType & EGL_WINDOW_BIT) == 0)
+ RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
+
surf = drv->API.CreateWindowSurface(drv, disp, conf, native_window,
attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
@@ -749,19 +884,16 @@ eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
EGLNativeWindowType window, const EGLint *attrib_list)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
+
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
STATIC_ASSERT(sizeof(void*) == sizeof(window));
return _eglCreateWindowSurfaceCommon(disp, config, (void*) window,
attrib_list);
}
-
-static EGLSurface EGLAPIENTRY
-eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy, EGLConfig config,
- void *native_window,
- const EGLint *attrib_list)
+static void *
+fixupNativeWindow(_EGLDisplay *disp, void *native_window)
{
- _EGLDisplay *disp = _eglLockDisplay(dpy);
-
#ifdef HAVE_X11_PLATFORM
if (disp->Platform == _EGL_PLATFORM_X11 && native_window != NULL) {
/* The `native_window` parameter for the X11 platform differs between
@@ -771,10 +903,22 @@ eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy, EGLConfig config,
* `Window*`. Convert `Window*` to `Window` because that's what
* dri2_x11_create_window_surface() expects.
*/
- native_window = (void*) (* (Window*) native_window);
+ return (void *)(* (Window*) native_window);
}
#endif
+ return native_window;
+}
+static EGLSurface EGLAPIENTRY
+eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy, EGLConfig config,
+ void *native_window,
+ const EGLint *attrib_list)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+
+ native_window = fixupNativeWindow(disp, native_window);
+
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
return _eglCreateWindowSurfaceCommon(disp, config, native_window,
attrib_list);
}
@@ -785,18 +929,39 @@ eglCreatePlatformWindowSurface(EGLDisplay dpy, EGLConfig config,
void *native_window,
const EGLAttrib *attrib_list)
{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
EGLSurface surface;
- EGLint *int_attribs = _eglConvertAttribsToInt(attrib_list);
+ EGLint *int_attribs;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
+
+ int_attribs = _eglConvertAttribsToInt(attrib_list);
if (attrib_list && !int_attribs)
- RETURN_EGL_ERROR(NULL, EGL_BAD_ALLOC, EGL_NO_SURFACE);
+ RETURN_EGL_ERROR(disp, EGL_BAD_ALLOC, EGL_NO_SURFACE);
- surface = eglCreatePlatformWindowSurfaceEXT(dpy, config, native_window,
- int_attribs);
+ native_window = fixupNativeWindow(disp, native_window);
+ surface = _eglCreateWindowSurfaceCommon(disp, config, native_window,
+ int_attribs);
free(int_attribs);
return surface;
}
+static void *
+fixupNativePixmap(_EGLDisplay *disp, void *native_pixmap)
+{
+#ifdef HAVE_X11_PLATFORM
+ /* The `native_pixmap` parameter for the X11 platform differs between
+ * eglCreatePixmapSurface() and eglCreatePlatformPixmapSurfaceEXT(). In
+ * eglCreatePixmapSurface(), the type of `native_pixmap` is an Xlib
+ * `Pixmap`. In eglCreatePlatformPixmapSurfaceEXT(), the type is
+ * `Pixmap*`. Convert `Pixmap*` to `Pixmap` because that's what
+ * dri2_x11_create_pixmap_surface() expects.
+ */
+ if (disp->Platform == _EGL_PLATFORM_X11 && native_pixmap != NULL)
+ return (void *)(* (Pixmap*) native_pixmap);
+#endif
+ return native_pixmap;
+}
static EGLSurface
_eglCreatePixmapSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
@@ -807,7 +972,27 @@ _eglCreatePixmapSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
_EGLSurface *surf;
EGLSurface ret;
+#if HAVE_SURFACELESS_PLATFORM
+ if (disp && disp->Platform == _EGL_PLATFORM_SURFACELESS) {
+ /* From the EGL_MESA_platform_surfaceless spec (v1):
+ *
+ * [Like eglCreatePlatformWindowSurface,] eglCreatePlatformPixmapSurface
+ * also fails when called with a <display> that belongs to the
+ * surfaceless platform. It returns EGL_NO_SURFACE and generates
+ * EGL_BAD_NATIVE_PIXMAP.
+ *
+ * This check must occur before checking the EGLConfig, which emits
+ * EGL_BAD_CONFIG.
+ */
+ RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_PIXMAP, EGL_NO_SURFACE);
+ }
+#endif
+
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
+
+ if ((conf->SurfaceType & EGL_PIXMAP_BIT) == 0)
+ RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
+
surf = drv->API.CreatePixmapSurface(drv, disp, conf, native_pixmap,
attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
@@ -821,6 +1006,8 @@ eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
EGLNativePixmapType pixmap, const EGLint *attrib_list)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
+
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
STATIC_ASSERT(sizeof(void*) == sizeof(pixmap));
return _eglCreatePixmapSurfaceCommon(disp, config, (void*) pixmap,
attrib_list);
@@ -833,19 +1020,8 @@ eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy, EGLConfig config,
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
-#ifdef HAVE_X11_PLATFORM
- /* The `native_pixmap` parameter for the X11 platform differs between
- * eglCreatePixmapSurface() and eglCreatePlatformPixmapSurfaceEXT(). In
- * eglCreatePixmapSurface(), the type of `native_pixmap` is an Xlib
- * `Pixmap`. In eglCreatePlatformPixmapSurfaceEXT(), the type is
- * `Pixmap*`. Convert `Pixmap*` to `Pixmap` because that's what
- * dri2_x11_create_pixmap_surface() expects.
- */
- if (disp->Platform == _EGL_PLATFORM_X11 && native_pixmap != NULL) {
- native_pixmap = (void*) (* (Pixmap*) native_pixmap);
- }
-#endif
-
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
+ native_pixmap = fixupNativePixmap(disp, native_pixmap);
return _eglCreatePixmapSurfaceCommon(disp, config, native_pixmap,
attrib_list);
}
@@ -856,14 +1032,19 @@ eglCreatePlatformPixmapSurface(EGLDisplay dpy, EGLConfig config,
void *native_pixmap,
const EGLAttrib *attrib_list)
{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
EGLSurface surface;
- EGLint *int_attribs = _eglConvertAttribsToInt(attrib_list);
+ EGLint *int_attribs;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
+
+ int_attribs = _eglConvertAttribsToInt(attrib_list);
if (attrib_list && !int_attribs)
- RETURN_EGL_ERROR(NULL, EGL_BAD_ALLOC, EGL_NO_SURFACE);
+ RETURN_EGL_ERROR(disp, EGL_BAD_ALLOC, EGL_NO_SURFACE);
- surface = eglCreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap,
- int_attribs);
+ native_pixmap = fixupNativePixmap(disp, native_pixmap);
+ surface = _eglCreatePixmapSurfaceCommon(disp, config, native_pixmap,
+ int_attribs);
free(int_attribs);
return surface;
}
@@ -879,8 +1060,12 @@ eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
_EGLSurface *surf;
EGLSurface ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
+ if ((conf->SurfaceType & EGL_PBUFFER_BIT) == 0)
+ RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
+
surf = drv->API.CreatePbufferSurface(drv, disp, conf, attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
@@ -896,6 +1081,7 @@ eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
_eglUnlinkSurface(surf);
ret = drv->API.DestroySurface(drv, disp, surf);
@@ -912,6 +1098,7 @@ eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
ret = drv->API.QuerySurface(drv, disp, surf, attribute, value);
@@ -927,6 +1114,7 @@ eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
ret = drv->API.SurfaceAttrib(drv, disp, surf, attribute, value);
@@ -942,6 +1130,7 @@ eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
ret = drv->API.BindTexImage(drv, disp, surf, buffer);
@@ -957,6 +1146,7 @@ eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
ret = drv->API.ReleaseTexImage(drv, disp, surf, buffer);
@@ -969,17 +1159,17 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLContext *ctx = _eglGetCurrentContext();
- _EGLSurface *surf;
+ _EGLSurface *surf = ctx ? ctx->DrawSurface : NULL;
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
if (_eglGetContextHandle(ctx) == EGL_NO_CONTEXT ||
ctx->Resource.Display != disp)
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
- surf = ctx->DrawSurface;
if (_eglGetSurfaceHandle(surf) == EGL_NO_SURFACE)
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
@@ -998,6 +1188,7 @@ eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
/* surface must be bound to current context in EGL 1.4 */
@@ -1013,13 +1204,11 @@ eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
}
-static EGLBoolean EGLAPIENTRY
-eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface,
- EGLint *rects, EGLint n_rects)
+static EGLBoolean
+eglSwapBuffersWithDamageCommon(_EGLDisplay *disp, _EGLSurface *surf,
+ EGLint *rects, EGLint n_rects)
{
_EGLContext *ctx = _eglGetCurrentContext();
- _EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLSurface *surf = _eglLookupSurface(surface, disp);
_EGLDriver *drv;
EGLBoolean ret;
@@ -1038,6 +1227,26 @@ eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface,
RETURN_EGL_EVAL(disp, ret);
}
+static EGLBoolean EGLAPIENTRY
+eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface,
+ EGLint *rects, EGLint n_rects)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLSurface *surf = _eglLookupSurface(surface, disp);
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
+ return eglSwapBuffersWithDamageCommon(disp, surf, rects, n_rects);
+}
+
+static EGLBoolean EGLAPIENTRY
+eglSwapBuffersWithDamageKHR(EGLDisplay dpy, EGLSurface surface,
+ EGLint *rects, EGLint n_rects)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLSurface *surf = _eglLookupSurface(surface, disp);
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
+ return eglSwapBuffersWithDamageCommon(disp, surf, rects, n_rects);
+}
+
EGLBoolean EGLAPIENTRY
eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
{
@@ -1047,6 +1256,7 @@ eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
EGLBoolean ret;
void *native_pixmap_ptr;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
STATIC_ASSERT(sizeof(void*) == sizeof(target));
native_pixmap_ptr = (void*) target;
@@ -1059,8 +1269,8 @@ eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
}
-EGLBoolean EGLAPIENTRY
-eglWaitClient(void)
+static EGLBoolean
+_eglWaitClientCommon(void)
{
_EGLContext *ctx = _eglGetCurrentContext();
_EGLDisplay *disp;
@@ -1086,22 +1296,19 @@ eglWaitClient(void)
RETURN_EGL_EVAL(disp, ret);
}
+EGLBoolean EGLAPIENTRY
+eglWaitClient(void)
+{
+ _EGL_FUNC_START(NULL, EGL_OBJECT_CONTEXT_KHR, _eglGetCurrentContext(), EGL_FALSE);
+ return _eglWaitClientCommon();
+}
EGLBoolean EGLAPIENTRY
eglWaitGL(void)
{
- _EGLThreadInfo *t = _eglGetCurrentThread();
- EGLint api_index = t->CurrentAPIIndex;
- EGLint es_index = _eglConvertApiToIndex(EGL_OPENGL_ES_API);
- EGLBoolean ret;
-
- if (api_index != es_index && _eglIsCurrentThreadDummy())
- RETURN_EGL_ERROR(NULL, EGL_BAD_ALLOC, EGL_FALSE);
-
- t->CurrentAPIIndex = es_index;
- ret = eglWaitClient();
- t->CurrentAPIIndex = api_index;
- return ret;
+ /* Since we only support OpenGL and GLES, eglWaitGL is equivalent to eglWaitClient. */
+ _EGL_FUNC_START(NULL, EGL_OBJECT_CONTEXT_KHR, _eglGetCurrentContext(), EGL_FALSE);
+ return _eglWaitClientCommon();
}
@@ -1116,6 +1323,8 @@ eglWaitNative(EGLint engine)
if (!ctx)
RETURN_EGL_SUCCESS(NULL, EGL_TRUE);
+ _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL, EGL_FALSE);
+
disp = ctx->Resource.Display;
mtx_lock(&disp->Mutex);
@@ -1165,6 +1374,8 @@ eglGetCurrentSurface(EGLint readdraw)
_EGLSurface *surf;
EGLSurface ret;
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_NO_SURFACE);
+
if (!ctx)
RETURN_EGL_SUCCESS(NULL, EGL_NO_SURFACE);
@@ -1198,13 +1409,6 @@ eglGetError(void)
}
-static EGLDisplay EGLAPIENTRY
-eglGetDRMDisplayMESA(int fd)
-{
- _EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) (intptr_t) fd);
- return _eglGetDisplayHandle(dpy);
-}
-
/**
** EGL 1.2
**/
@@ -1223,15 +1427,18 @@ eglGetDRMDisplayMESA(int fd)
EGLBoolean EGLAPIENTRY
eglBindAPI(EGLenum api)
{
- _EGLThreadInfo *t = _eglGetCurrentThread();
+ _EGLThreadInfo *t;
+ _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL, EGL_FALSE);
+
+ t = _eglGetCurrentThread();
if (_eglIsCurrentThreadDummy())
RETURN_EGL_ERROR(NULL, EGL_BAD_ALLOC, EGL_FALSE);
if (!_eglIsApiValid(api))
RETURN_EGL_ERROR(NULL, EGL_BAD_PARAMETER, EGL_FALSE);
- t->CurrentAPIIndex = _eglConvertApiToIndex(api);
+ t->CurrentAPI = api;
RETURN_EGL_SUCCESS(NULL, EGL_TRUE);
}
@@ -1247,7 +1454,7 @@ eglQueryAPI(void)
EGLenum ret;
/* returns one of EGL_OPENGL_API, EGL_OPENGL_ES_API or EGL_OPENVG_API */
- ret = _eglConvertApiFromIndex(t->CurrentAPIIndex);
+ ret = t->CurrentAPI;
RETURN_EGL_SUCCESS(NULL, ret);
}
@@ -1264,6 +1471,8 @@ eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype,
_EGLSurface *surf;
EGLSurface ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
+
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
surf = drv->API.CreatePbufferFromClientBuffer(drv, disp, buftype, buffer,
@@ -1280,25 +1489,19 @@ eglReleaseThread(void)
/* unbind current contexts */
if (!_eglIsCurrentThreadDummy()) {
_EGLThreadInfo *t = _eglGetCurrentThread();
- EGLint api_index = t->CurrentAPIIndex;
- EGLint i;
+ _EGLContext *ctx = t->CurrentContext;
- for (i = 0; i < _EGL_API_NUM_APIS; i++) {
- _EGLContext *ctx = t->CurrentContexts[i];
- if (ctx) {
- _EGLDisplay *disp = ctx->Resource.Display;
- _EGLDriver *drv;
+ _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL, EGL_FALSE);
- t->CurrentAPIIndex = i;
+ if (ctx) {
+ _EGLDisplay *disp = ctx->Resource.Display;
+ _EGLDriver *drv;
- mtx_lock(&disp->Mutex);
- drv = disp->Driver;
- (void) drv->API.MakeCurrent(drv, disp, NULL, NULL, NULL);
- mtx_unlock(&disp->Mutex);
- }
+ mtx_lock(&disp->Mutex);
+ drv = disp->Driver;
+ (void) drv->API.MakeCurrent(drv, disp, NULL, NULL, NULL);
+ mtx_unlock(&disp->Mutex);
}
-
- t->CurrentAPIIndex = api_index;
}
_eglDestroyCurrentThread();
@@ -1307,11 +1510,10 @@ eglReleaseThread(void)
}
-static EGLImage EGLAPIENTRY
-eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
+static EGLImage
+_eglCreateImageCommon(_EGLDisplay *disp, EGLContext ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
{
- _EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLContext *context = _eglLookupContext(ctx, disp);
_EGLDriver *drv;
_EGLImage *img;
@@ -1335,18 +1537,31 @@ eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
RETURN_EGL_EVAL(disp, ret);
}
+static EGLImage EGLAPIENTRY
+eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
+ EGLClientBuffer buffer, const EGLint *attr_list)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_IMAGE_KHR);
+ return _eglCreateImageCommon(disp, ctx, target, buffer, attr_list);
+}
+
EGLImage EGLAPIENTRY
eglCreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target,
EGLClientBuffer buffer, const EGLAttrib *attr_list)
{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
EGLImage image;
- EGLint *int_attribs = _eglConvertAttribsToInt(attr_list);
+ EGLint *int_attribs;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_IMAGE_KHR);
+
+ int_attribs = _eglConvertAttribsToInt(attr_list);
if (attr_list && !int_attribs)
- RETURN_EGL_ERROR(NULL, EGL_BAD_ALLOC, EGL_NO_IMAGE);
+ RETURN_EGL_ERROR(disp, EGL_BAD_ALLOC, EGL_NO_IMAGE);
- image = eglCreateImageKHR(dpy, ctx, target, buffer, int_attribs);
+ image = _eglCreateImageCommon(disp, ctx, target, buffer, int_attribs);
free(int_attribs);
return image;
}
@@ -1360,6 +1575,8 @@ eglDestroyImage(EGLDisplay dpy, EGLImage image)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
if (!disp->Extensions.KHR_image_base)
RETURN_EGL_EVAL(disp, EGL_FALSE);
@@ -1374,11 +1591,10 @@ eglDestroyImage(EGLDisplay dpy, EGLImage image)
static EGLSync
-_eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list,
- const EGLAttrib *attrib_list64, EGLBoolean is64,
+_eglCreateSync(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_list,
+ EGLBoolean orig_is_EGLAttrib,
EGLenum invalid_type_error)
{
- _EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLContext *ctx = _eglGetCurrentContext();
_EGLDriver *drv;
_EGLSync *sync;
@@ -1386,11 +1602,21 @@ _eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list,
_EGL_CHECK_DISPLAY(disp, EGL_NO_SYNC_KHR, drv);
- if (!disp->Extensions.KHR_cl_event2 && is64)
- RETURN_EGL_EVAL(disp, EGL_NO_SYNC_KHR);
+ if (!disp->Extensions.KHR_cl_event2 && orig_is_EGLAttrib) {
+ /* There exist two EGLAttrib variants of eglCreateSync*:
+ * eglCreateSync64KHR which requires EGL_KHR_cl_event2, and eglCreateSync
+ * which requires EGL 1.5. Here we use the presence of EGL_KHR_cl_event2
+ * support as a proxy for EGL 1.5 support, even though that's not
+ * entirely correct (though _eglComputeVersion does the same).
+ *
+ * The EGL spec provides no guidance on how to handle unsupported
+ * functions. EGL_BAD_MATCH seems reasonable.
+ */
+ RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SYNC_KHR);
+ }
/* return an error if the client API doesn't support GL_OES_EGL_sync */
- if (!ctx || ctx->Resource.Display != dpy ||
+ if (!ctx || ctx->Resource.Display != disp ||
ctx->ClientAPI != EGL_OPENGL_ES_API)
RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SYNC_KHR);
@@ -1411,7 +1637,7 @@ _eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list,
RETURN_EGL_ERROR(disp, invalid_type_error, EGL_NO_SYNC_KHR);
}
- sync = drv->API.CreateSyncKHR(drv, disp, type, attrib_list, attrib_list64);
+ sync = drv->API.CreateSyncKHR(drv, disp, type, attrib_list);
ret = (sync) ? _eglLinkSync(sync) : EGL_NO_SYNC_KHR;
RETURN_EGL_EVAL(disp, ret);
@@ -1419,17 +1645,40 @@ _eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list,
static EGLSync EGLAPIENTRY
-eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
+eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *int_list)
{
- return _eglCreateSync(dpy, type, attrib_list, NULL, EGL_FALSE,
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
+ EGLSync sync;
+ EGLAttrib *attrib_list;
+ EGLint err;
+
+ if (sizeof(int_list[0]) == sizeof(attrib_list[0])) {
+ attrib_list = (EGLAttrib *) int_list;
+ } else {
+ err = _eglConvertIntsToAttribs(int_list, &attrib_list);
+ if (err != EGL_SUCCESS)
+ RETURN_EGL_ERROR(disp, err, EGL_NO_SYNC);
+ }
+
+ sync = _eglCreateSync(disp, type, attrib_list, EGL_FALSE,
EGL_BAD_ATTRIBUTE);
+
+ if (sizeof(int_list[0]) != sizeof(attrib_list[0]))
+ free(attrib_list);
+
+ /* Don't double-unlock the display. _eglCreateSync already unlocked it. */
+ return sync;
}
static EGLSync EGLAPIENTRY
eglCreateSync64KHR(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)
{
- return _eglCreateSync(dpy, type, NULL, attrib_list, EGL_TRUE,
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+ return _eglCreateSync(disp, type, attrib_list, EGL_TRUE,
EGL_BAD_ATTRIBUTE);
}
@@ -1437,7 +1686,9 @@ eglCreateSync64KHR(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)
EGLSync EGLAPIENTRY
eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)
{
- return _eglCreateSync(dpy, type, NULL, attrib_list, EGL_TRUE,
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+ return _eglCreateSync(disp, type, attrib_list, EGL_TRUE,
EGL_BAD_PARAMETER);
}
@@ -1450,6 +1701,8 @@ eglDestroySync(EGLDisplay dpy, EGLSync sync)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
+
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
assert(disp->Extensions.KHR_reusable_sync ||
disp->Extensions.KHR_fence_sync);
@@ -1469,6 +1722,8 @@ eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
_EGLDriver *drv;
EGLint ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
+
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
assert(disp->Extensions.KHR_reusable_sync ||
disp->Extensions.KHR_fence_sync);
@@ -1476,17 +1731,30 @@ eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
if (s->SyncStatus == EGL_SIGNALED_KHR)
RETURN_EGL_EVAL(disp, EGL_CONDITION_SATISFIED_KHR);
+ /* if sync type is EGL_SYNC_REUSABLE_KHR, dpy should be
+ * unlocked here to allow other threads also to be able to
+ * go into waiting state.
+ */
+
+ if (s->Type == EGL_SYNC_REUSABLE_KHR)
+ _eglUnlockDisplay(dpy);
+
ret = drv->API.ClientWaitSyncKHR(drv, disp, s, flags, timeout);
- RETURN_EGL_EVAL(disp, ret);
+ /*
+ * 'disp' is already unlocked for reusable sync type,
+ * so passing 'NULL' to bypass unlocking display.
+ */
+ if (s->Type == EGL_SYNC_REUSABLE_KHR)
+ RETURN_EGL_EVAL(NULL, ret);
+ else
+ RETURN_EGL_EVAL(disp, ret);
}
-static EGLint EGLAPIENTRY
-eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags)
+static EGLint
+_eglWaitSyncCommon(_EGLDisplay *disp, _EGLSync *s, EGLint flags)
{
- _EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLSync *s = _eglLookupSync(sync, disp);
_EGLContext *ctx = _eglGetCurrentContext();
_EGLDriver *drv;
EGLint ret;
@@ -1507,6 +1775,15 @@ eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags)
RETURN_EGL_EVAL(disp, ret);
}
+static EGLint EGLAPIENTRY
+eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLSync *s = _eglLookupSync(sync, disp);
+ _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
+ return _eglWaitSyncCommon(disp, s, flags);
+}
+
EGLBoolean EGLAPIENTRY
eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags)
@@ -1515,7 +1792,10 @@ eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags)
* EGLBoolean. In both cases, the return values can only be EGL_FALSE and
* EGL_TRUE.
*/
- return eglWaitSyncKHR(dpy, sync, flags);
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLSync *s = _eglLookupSync(sync, disp);
+ _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
+ return _eglWaitSyncCommon(disp, s, flags);
}
@@ -1527,6 +1807,8 @@ eglSignalSyncKHR(EGLDisplay dpy, EGLSync sync, EGLenum mode)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
+
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
assert(disp->Extensions.KHR_reusable_sync);
ret = drv->API.SignalSyncKHR(drv, disp, s, mode);
@@ -1535,11 +1817,9 @@ eglSignalSyncKHR(EGLDisplay dpy, EGLSync sync, EGLenum mode)
}
-EGLBoolean EGLAPIENTRY
-eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value)
+static EGLBoolean
+_eglGetSyncAttribCommon(_EGLDisplay *disp, _EGLSync *s, EGLint attribute, EGLAttrib *value)
{
- _EGLDisplay *disp = _eglLockDisplay(dpy);
- _EGLSync *s = _eglLookupSync(sync, disp);
_EGLDriver *drv;
EGLBoolean ret;
@@ -1551,12 +1831,31 @@ eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *valu
RETURN_EGL_EVAL(disp, ret);
}
+EGLBoolean EGLAPIENTRY
+eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value)
+{
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLSync *s = _eglLookupSync(sync, disp);
+ _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
+ return _eglGetSyncAttribCommon(disp, s, attribute, value);
+}
+
static EGLBoolean EGLAPIENTRY
eglGetSyncAttribKHR(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value)
{
- EGLAttrib attrib = *value;
- EGLBoolean result = eglGetSyncAttrib(dpy, sync, attribute, &attrib);
+ _EGLDisplay *disp = _eglLockDisplay(dpy);
+ _EGLSync *s = _eglLookupSync(sync, disp);
+ EGLAttrib attrib;
+ EGLBoolean result;
+
+ _EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
+
+ if (!value)
+ RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
+
+ attrib = *value;
+ result = _eglGetSyncAttribCommon(disp, s, attribute, &attrib);
/* The EGL_KHR_fence_sync spec says this about eglGetSyncAttribKHR:
*
@@ -1580,6 +1879,8 @@ eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
+
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
if (!disp->Extensions.NOK_swap_region)
@@ -1604,6 +1905,8 @@ eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list)
_EGLImage *img;
EGLImage ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_NO_IMAGE_KHR, drv);
if (!disp->Extensions.MESA_drm_image)
RETURN_EGL_EVAL(disp, EGL_NO_IMAGE_KHR);
@@ -1623,6 +1926,8 @@ eglExportDRMImageMESA(EGLDisplay dpy, EGLImage image,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
assert(disp->Extensions.MESA_drm_image);
@@ -1644,6 +1949,8 @@ eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
assert(disp->Extensions.WL_bind_wayland_display);
@@ -1662,6 +1969,8 @@ eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
assert(disp->Extensions.WL_bind_wayland_display);
@@ -1681,6 +1990,8 @@ eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
assert(disp->Extensions.WL_bind_wayland_display);
@@ -1701,6 +2012,8 @@ eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImage image)
_EGLDriver *drv;
struct wl_buffer *ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, NULL, drv);
assert(disp->Extensions.WL_create_wayland_buffer_from_image);
@@ -1723,6 +2036,8 @@ eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
+
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
if (!disp->Extensions.NV_post_sub_buffer)
@@ -1743,6 +2058,8 @@ eglGetSyncValuesCHROMIUM(EGLDisplay display, EGLSurface surface,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
+
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
if (!disp->Extensions.CHROMIUM_sync_control)
RETURN_EGL_EVAL(disp, EGL_FALSE);
@@ -1765,6 +2082,8 @@ eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImage image,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
assert(disp->Extensions.MESA_image_dma_buf_export);
@@ -1786,6 +2105,8 @@ eglExportDMABUFImageMESA(EGLDisplay dpy, EGLImage image,
_EGLDriver *drv;
EGLBoolean ret;
+ _EGL_FUNC_START(disp, EGL_OBJECT_IMAGE_KHR, img, EGL_FALSE);
+
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
assert(disp->Extensions.MESA_image_dma_buf_export);
@@ -1797,6 +2118,148 @@ eglExportDMABUFImageMESA(EGLDisplay dpy, EGLImage image,
RETURN_EGL_EVAL(disp, ret);
}
+static EGLint EGLAPIENTRY
+eglLabelObjectKHR(EGLDisplay dpy, EGLenum objectType, EGLObjectKHR object,
+ EGLLabelKHR label)
+{
+ _EGLDisplay *disp = NULL;
+ _EGLResourceType type;
+
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_BAD_ALLOC);
+
+ if (objectType == EGL_OBJECT_THREAD_KHR) {
+ _EGLThreadInfo *t = _eglGetCurrentThread();
+
+ if (!_eglIsCurrentThreadDummy()) {
+ t->Label = label;
+ return EGL_SUCCESS;
+ }
+
+ RETURN_EGL_ERROR(NULL, EGL_BAD_ALLOC, EGL_BAD_ALLOC);
+ }
+
+ disp = _eglLockDisplay(dpy);
+ if (disp == NULL)
+ RETURN_EGL_ERROR(disp, EGL_BAD_DISPLAY, EGL_BAD_DISPLAY);
+
+ if (objectType == EGL_OBJECT_DISPLAY_KHR) {
+ if (dpy != (EGLDisplay) object)
+ RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_BAD_PARAMETER);
+
+ disp->Label = label;
+ RETURN_EGL_EVAL(disp, EGL_SUCCESS);
+ }
+
+ switch (objectType) {
+ case EGL_OBJECT_CONTEXT_KHR:
+ type = _EGL_RESOURCE_CONTEXT;
+ break;
+ case EGL_OBJECT_SURFACE_KHR:
+ type = _EGL_RESOURCE_SURFACE;
+ break;
+ case EGL_OBJECT_IMAGE_KHR:
+ type = _EGL_RESOURCE_IMAGE;
+ break;
+ case EGL_OBJECT_SYNC_KHR:
+ type = _EGL_RESOURCE_SYNC;
+ break;
+ case EGL_OBJECT_STREAM_KHR:
+ default:
+ RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_BAD_PARAMETER);
+ }
+
+ if (_eglCheckResource(object, type, disp)) {
+ _EGLResource *res = (_EGLResource *) object;
+
+ res->Label = label;
+ RETURN_EGL_EVAL(disp, EGL_SUCCESS);
+ }
+
+ RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_BAD_PARAMETER);
+}
+
+static EGLBoolean
+validDebugMessageLevel(EGLAttrib level)
+{
+ return (level >= EGL_DEBUG_MSG_CRITICAL_KHR &&
+ level <= EGL_DEBUG_MSG_INFO_KHR);
+}
+
+static EGLint EGLAPIENTRY
+eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback,
+ const EGLAttrib *attrib_list)
+{
+ unsigned int newEnabled;
+
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_BAD_ALLOC);
+
+ mtx_lock(_eglGlobal.Mutex);
+
+ newEnabled = _eglGlobal.debugTypesEnabled;
+ if (attrib_list != NULL) {
+ int i;
+
+ for (i = 0; attrib_list[i] != EGL_NONE; i += 2) {
+ if (validDebugMessageLevel(attrib_list[i])) {
+ if (attrib_list[i + 1])
+ newEnabled |= DebugBitFromType(attrib_list[i]);
+ else
+ newEnabled &= ~DebugBitFromType(attrib_list[i]);
+ continue;
+ }
+
+ // On error, set the last error code, call the current
+ // debug callback, and return the error code.
+ mtx_unlock(_eglGlobal.Mutex);
+ _eglReportError(EGL_BAD_ATTRIBUTE, NULL,
+ "Invalid attribute 0x%04lx", (unsigned long) attrib_list[i]);
+ return EGL_BAD_ATTRIBUTE;
+ }
+ }
+
+ if (callback != NULL) {
+ _eglGlobal.debugCallback = callback;
+ _eglGlobal.debugTypesEnabled = newEnabled;
+ } else {
+ _eglGlobal.debugCallback = NULL;
+ _eglGlobal.debugTypesEnabled = _EGL_DEBUG_BIT_CRITICAL | _EGL_DEBUG_BIT_ERROR;
+ }
+
+ mtx_unlock(_eglGlobal.Mutex);
+ return EGL_SUCCESS;
+}
+
+static EGLBoolean EGLAPIENTRY
+eglQueryDebugKHR(EGLint attribute, EGLAttrib *value)
+{
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, EGL_BAD_ALLOC);
+
+ mtx_lock(_eglGlobal.Mutex);
+
+ do {
+ if (validDebugMessageLevel(attribute)) {
+ if (_eglGlobal.debugTypesEnabled & DebugBitFromType(attribute))
+ *value = EGL_TRUE;
+ else
+ *value = EGL_FALSE;
+ break;
+ }
+
+ if (attribute == EGL_DEBUG_CALLBACK_KHR) {
+ *value = (EGLAttrib) _eglGlobal.debugCallback;
+ break;
+ }
+
+ mtx_unlock(_eglGlobal.Mutex);
+ _eglReportError(EGL_BAD_ATTRIBUTE, NULL,
+ "Invalid attribute 0x%04lx", (unsigned long) attribute);
+ return EGL_FALSE;
+ } while (0);
+
+ mtx_unlock(_eglGlobal.Mutex);
+ return EGL_TRUE;
+}
+
__eglMustCastToProperFunctionPointerType EGLAPIENTRY
eglGetProcAddress(const char *procname)
{
@@ -1852,7 +2315,6 @@ eglGetProcAddress(const char *procname)
{ "eglGetPlatformDisplay", (_EGLProc) eglGetPlatformDisplay },
{ "eglCreatePlatformWindowSurface", (_EGLProc) eglCreatePlatformWindowSurface },
{ "eglCreatePlatformPixmapSurface", (_EGLProc) eglCreatePlatformPixmapSurface },
- { "eglGetDRMDisplayMESA", (_EGLProc) eglGetDRMDisplayMESA },
{ "eglCreateImageKHR", (_EGLProc) eglCreateImageKHR },
{ "eglDestroyImageKHR", (_EGLProc) eglDestroyImage },
{ "eglCreateSyncKHR", (_EGLProc) eglCreateSyncKHR },
@@ -1871,12 +2333,16 @@ eglGetProcAddress(const char *procname)
{ "eglCreateWaylandBufferFromImageWL", (_EGLProc) eglCreateWaylandBufferFromImageWL },
{ "eglPostSubBufferNV", (_EGLProc) eglPostSubBufferNV },
{ "eglSwapBuffersWithDamageEXT", (_EGLProc) eglSwapBuffersWithDamageEXT },
+ { "eglSwapBuffersWithDamageKHR", (_EGLProc) eglSwapBuffersWithDamageKHR },
{ "eglGetPlatformDisplayEXT", (_EGLProc) eglGetPlatformDisplayEXT },
{ "eglCreatePlatformWindowSurfaceEXT", (_EGLProc) eglCreatePlatformWindowSurfaceEXT },
{ "eglCreatePlatformPixmapSurfaceEXT", (_EGLProc) eglCreatePlatformPixmapSurfaceEXT },
{ "eglGetSyncValuesCHROMIUM", (_EGLProc) eglGetSyncValuesCHROMIUM },
{ "eglExportDMABUFImageQueryMESA", (_EGLProc) eglExportDMABUFImageQueryMESA },
{ "eglExportDMABUFImageMESA", (_EGLProc) eglExportDMABUFImageMESA },
+ { "eglLabelObjectKHR", (_EGLProc) eglLabelObjectKHR },
+ { "eglDebugMessageControlKHR", (_EGLProc) eglDebugMessageControlKHR },
+ { "eglQueryDebugKHR", (_EGLProc) eglQueryDebugKHR },
{ NULL, NULL }
};
EGLint i;
@@ -1885,6 +2351,8 @@ eglGetProcAddress(const char *procname)
if (!procname)
RETURN_EGL_SUCCESS(NULL, NULL);
+ _EGL_FUNC_START(NULL, EGL_NONE, NULL, NULL);
+
ret = NULL;
if (strncmp(procname, "egl", 3) == 0) {
for (i = 0; egl_functions[i].name; i++) {
@@ -1899,3 +2367,74 @@ eglGetProcAddress(const char *procname)
RETURN_EGL_SUCCESS(NULL, ret);
}
+
+static int
+_eglLockDisplayInterop(EGLDisplay dpy, EGLContext context,
+ _EGLDisplay **disp, _EGLDriver **drv,
+ _EGLContext **ctx)
+{
+
+ *disp = _eglLockDisplay(dpy);
+ if (!*disp || !(*disp)->Initialized || !(*disp)->Driver) {
+ if (*disp)
+ _eglUnlockDisplay(*disp);
+ return MESA_GLINTEROP_INVALID_DISPLAY;
+ }
+
+ *drv = (*disp)->Driver;
+
+ *ctx = _eglLookupContext(context, *disp);
+ if (!*ctx ||
+ ((*ctx)->ClientAPI != EGL_OPENGL_API &&
+ (*ctx)->ClientAPI != EGL_OPENGL_ES_API)) {
+ _eglUnlockDisplay(*disp);
+ return MESA_GLINTEROP_INVALID_CONTEXT;
+ }
+
+ return MESA_GLINTEROP_SUCCESS;
+}
+
+PUBLIC int
+MesaGLInteropEGLQueryDeviceInfo(EGLDisplay dpy, EGLContext context,
+ struct mesa_glinterop_device_info *out)
+{
+ _EGLDisplay *disp;
+ _EGLDriver *drv;
+ _EGLContext *ctx;
+ int ret;
+
+ ret = _eglLockDisplayInterop(dpy, context, &disp, &drv, &ctx);
+ if (ret != MESA_GLINTEROP_SUCCESS)
+ return ret;
+
+ if (drv->API.GLInteropQueryDeviceInfo)
+ ret = drv->API.GLInteropQueryDeviceInfo(disp, ctx, out);
+ else
+ ret = MESA_GLINTEROP_UNSUPPORTED;
+
+ _eglUnlockDisplay(disp);
+ return ret;
+}
+
+PUBLIC int
+MesaGLInteropEGLExportObject(EGLDisplay dpy, EGLContext context,
+ struct mesa_glinterop_export_in *in,
+ struct mesa_glinterop_export_out *out)
+{
+ _EGLDisplay *disp;
+ _EGLDriver *drv;
+ _EGLContext *ctx;
+ int ret;
+
+ ret = _eglLockDisplayInterop(dpy, context, &disp, &drv, &ctx);
+ if (ret != MESA_GLINTEROP_SUCCESS)
+ return ret;
+
+ if (drv->API.GLInteropExportObject)
+ ret = drv->API.GLInteropExportObject(disp, ctx, in, out);
+ else
+ ret = MESA_GLINTEROP_UNSUPPORTED;
+
+ _eglUnlockDisplay(disp);
+ return ret;
+}
diff --git a/lib/mesa/src/egl/main/eglapi.h b/lib/mesa/src/egl/main/eglapi.h
index 6c54c7c41..b9bcc8ec8 100644
--- a/lib/mesa/src/egl/main/eglapi.h
+++ b/lib/mesa/src/egl/main/eglapi.h
@@ -41,155 +41,165 @@ extern "C" {
*/
typedef void (*_EGLProc)(void);
-
-/**
- * Typedefs for all EGL API entrypoint functions.
- */
-
-/* driver funcs */
-typedef EGLBoolean (*Initialize_t)(_EGLDriver *, _EGLDisplay *dpy);
-typedef EGLBoolean (*Terminate_t)(_EGLDriver *, _EGLDisplay *dpy);
-
-/* config funcs */
-typedef EGLBoolean (*GetConfigs_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-typedef EGLBoolean (*ChooseConfig_t)(_EGLDriver *drv, _EGLDisplay *dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
-typedef EGLBoolean (*GetConfigAttrib_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, EGLint attribute, EGLint *value);
-
-/* context funcs */
-typedef _EGLContext *(*CreateContext_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, _EGLContext *share_list, const EGLint *attrib_list);
-typedef EGLBoolean (*DestroyContext_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx);
-/* this is the only function (other than Initialize) that may be called with an uninitialized display */
-typedef EGLBoolean (*MakeCurrent_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx);
-typedef EGLBoolean (*QueryContext_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLint attribute, EGLint *value);
-
-/* surface funcs */
-typedef _EGLSurface *(*CreateWindowSurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, void *native_window, const EGLint *attrib_list);
-typedef _EGLSurface *(*CreatePixmapSurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, void *native_pixmap, const EGLint *attrib_list);
-typedef _EGLSurface *(*CreatePbufferSurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *config, const EGLint *attrib_list);
-typedef EGLBoolean (*DestroySurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface);
-typedef EGLBoolean (*QuerySurface_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint attribute, EGLint *value);
-typedef EGLBoolean (*SurfaceAttrib_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint attribute, EGLint value);
-typedef EGLBoolean (*BindTexImage_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint buffer);
-typedef EGLBoolean (*ReleaseTexImage_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint buffer);
-typedef EGLBoolean (*SwapInterval_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint interval);
-typedef EGLBoolean (*SwapBuffers_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw);
-typedef EGLBoolean (*CopyBuffers_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, void *native_pixmap_target);
-
-/* misc funcs */
-typedef EGLBoolean (*WaitClient_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx);
-typedef EGLBoolean (*WaitNative_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine);
-
-/* this function may be called from multiple threads at the same time */
-typedef _EGLProc (*GetProcAddress_t)(_EGLDriver *drv, const char *procname);
-
-
-
-typedef _EGLSurface *(*CreatePbufferFromClientBuffer_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum buftype, EGLClientBuffer buffer, _EGLConfig *config, const EGLint *attrib_list);
-
-
-typedef _EGLImage *(*CreateImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attr_list);
-typedef EGLBoolean (*DestroyImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image);
-
-
-typedef _EGLSync *(*CreateSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum type, const EGLint *attrib_list, const EGLAttrib *attrib_list64);
-typedef EGLBoolean (*DestroySyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync);
-typedef EGLint (*ClientWaitSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint flags, EGLTime timeout);
-typedef EGLint (*WaitSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync);
-typedef EGLBoolean (*SignalSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLenum mode);
-typedef EGLBoolean (*GetSyncAttrib_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint attribute, EGLAttrib *value);
-
-
-typedef EGLBoolean (*SwapBuffersRegionNOK_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf, EGLint numRects, const EGLint *rects);
-
-typedef _EGLImage *(*CreateDRMImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, const EGLint *attr_list);
-typedef EGLBoolean (*ExportDRMImageMESA_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img, EGLint *name, EGLint *handle, EGLint *stride);
-
struct wl_display;
-typedef EGLBoolean (*BindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *disp, struct wl_display *display);
-typedef EGLBoolean (*UnbindWaylandDisplayWL_t)(_EGLDriver *drv, _EGLDisplay *disp, struct wl_display *display);
-typedef EGLBoolean (*QueryWaylandBufferWL_t)(_EGLDriver *drv, _EGLDisplay *displ, struct wl_resource *buffer, EGLint attribute, EGLint *value);
-
-typedef struct wl_buffer * (*CreateWaylandBufferFromImageWL_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img);
-
-typedef EGLBoolean (*PostSubBufferNV_t)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface, EGLint x, EGLint y, EGLint width, EGLint height);
-
-typedef EGLint (*QueryBufferAge_t)(_EGLDriver *drv,
- _EGLDisplay *dpy, _EGLSurface *surface);
-
-typedef EGLBoolean (*SwapBuffersWithDamageEXT_t) (_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, const EGLint *rects, EGLint n_rects);
-
-typedef EGLBoolean (*GetSyncValuesCHROMIUM_t) (_EGLDisplay *dpy, _EGLSurface *surface, EGLuint64KHR *ust, EGLuint64KHR *msc, EGLuint64KHR *sbc);
-
-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);
+struct mesa_glinterop_device_info;
+struct mesa_glinterop_export_in;
+struct mesa_glinterop_export_out;
/**
* The API dispatcher jumps through these functions
*/
struct _egl_api
{
- Initialize_t Initialize;
- Terminate_t Terminate;
-
- GetConfigs_t GetConfigs;
- ChooseConfig_t ChooseConfig;
- GetConfigAttrib_t GetConfigAttrib;
-
- CreateContext_t CreateContext;
- DestroyContext_t DestroyContext;
- MakeCurrent_t MakeCurrent;
- QueryContext_t QueryContext;
-
- CreateWindowSurface_t CreateWindowSurface;
- CreatePixmapSurface_t CreatePixmapSurface;
- CreatePbufferSurface_t CreatePbufferSurface;
- DestroySurface_t DestroySurface;
- QuerySurface_t QuerySurface;
- SurfaceAttrib_t SurfaceAttrib;
- BindTexImage_t BindTexImage;
- ReleaseTexImage_t ReleaseTexImage;
- SwapInterval_t SwapInterval;
- SwapBuffers_t SwapBuffers;
- CopyBuffers_t CopyBuffers;
-
- WaitClient_t WaitClient;
- WaitNative_t WaitNative;
- GetProcAddress_t GetProcAddress;
-
- CreatePbufferFromClientBuffer_t CreatePbufferFromClientBuffer;
-
- CreateImageKHR_t CreateImageKHR;
- DestroyImageKHR_t DestroyImageKHR;
-
- CreateSyncKHR_t CreateSyncKHR;
- DestroySyncKHR_t DestroySyncKHR;
- ClientWaitSyncKHR_t ClientWaitSyncKHR;
- WaitSyncKHR_t WaitSyncKHR;
- SignalSyncKHR_t SignalSyncKHR;
- GetSyncAttrib_t GetSyncAttrib;
-
- SwapBuffersRegionNOK_t SwapBuffersRegionNOK;
-
- CreateDRMImageMESA_t CreateDRMImageMESA;
- ExportDRMImageMESA_t ExportDRMImageMESA;
-
- BindWaylandDisplayWL_t BindWaylandDisplayWL;
- UnbindWaylandDisplayWL_t UnbindWaylandDisplayWL;
- QueryWaylandBufferWL_t QueryWaylandBufferWL;
-
- CreateWaylandBufferFromImageWL_t CreateWaylandBufferFromImageWL;
-
- SwapBuffersWithDamageEXT_t SwapBuffersWithDamageEXT;
-
- PostSubBufferNV_t PostSubBufferNV;
-
- QueryBufferAge_t QueryBufferAge;
- GetSyncValuesCHROMIUM_t GetSyncValuesCHROMIUM;
-
- ExportDMABUFImageQueryMESA_t ExportDMABUFImageQueryMESA;
- ExportDMABUFImageMESA_t ExportDMABUFImageMESA;
+ /* driver funcs */
+ EGLBoolean (*Initialize)(_EGLDriver *, _EGLDisplay *dpy);
+ EGLBoolean (*Terminate)(_EGLDriver *, _EGLDisplay *dpy);
+
+ /* config funcs */
+ EGLBoolean (*GetConfigs)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLConfig *configs, EGLint config_size,
+ EGLint *num_config);
+ EGLBoolean (*ChooseConfig)(_EGLDriver *drv, _EGLDisplay *dpy,
+ const EGLint *attrib_list, EGLConfig *configs,
+ EGLint config_size, EGLint *num_config);
+ EGLBoolean (*GetConfigAttrib)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLConfig *config, EGLint attribute,
+ EGLint *value);
+
+ /* context funcs */
+ _EGLContext *(*CreateContext)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLConfig *config, _EGLContext *share_list,
+ const EGLint *attrib_list);
+ EGLBoolean (*DestroyContext)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLContext *ctx);
+ /* this is the only function (other than Initialize) that may be called
+ * with an uninitialized display
+ */
+ EGLBoolean (*MakeCurrent)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *draw, _EGLSurface *read,
+ _EGLContext *ctx);
+ EGLBoolean (*QueryContext)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLContext *ctx, EGLint attribute,
+ EGLint *value);
+
+ /* surface funcs */
+ _EGLSurface *(*CreateWindowSurface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLConfig *config, void *native_window,
+ const EGLint *attrib_list);
+ _EGLSurface *(*CreatePixmapSurface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLConfig *config, void *native_pixmap,
+ const EGLint *attrib_list);
+ _EGLSurface *(*CreatePbufferSurface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLConfig *config,
+ const EGLint *attrib_list);
+ EGLBoolean (*DestroySurface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surface);
+ EGLBoolean (*QuerySurface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surface, EGLint attribute,
+ EGLint *value);
+ EGLBoolean (*SurfaceAttrib)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surface, EGLint attribute,
+ EGLint value);
+ EGLBoolean (*BindTexImage)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surface, EGLint buffer);
+ EGLBoolean (*ReleaseTexImage)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surface, EGLint buffer);
+ EGLBoolean (*SwapInterval)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surf, EGLint interval);
+ EGLBoolean (*SwapBuffers)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *draw);
+ EGLBoolean (*CopyBuffers)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface *surface, void *native_pixmap_target);
+
+ /* misc functions */
+ EGLBoolean (*WaitClient)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLContext *ctx);
+ EGLBoolean (*WaitNative)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLint engine);
+
+ /* this function may be called from multiple threads at the same time */
+ _EGLProc (*GetProcAddress)(_EGLDriver *drv, const char *procname);
+
+ _EGLSurface *(*CreatePbufferFromClientBuffer)(_EGLDriver *drv,
+ _EGLDisplay *dpy,
+ EGLenum buftype,
+ EGLClientBuffer buffer,
+ _EGLConfig *config,
+ const EGLint *attrib_list);
+
+ _EGLImage *(*CreateImageKHR)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLContext *ctx, EGLenum target,
+ EGLClientBuffer buffer,
+ const EGLint *attr_list);
+ EGLBoolean (*DestroyImageKHR)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLImage *image);
+
+ _EGLSync *(*CreateSyncKHR)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum type,
+ const EGLAttrib *attrib_list);
+ EGLBoolean (*DestroySyncKHR)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSync *sync);
+ EGLint (*ClientWaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSync *sync, EGLint flags, EGLTime timeout);
+ EGLint (*WaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync);
+ EGLBoolean (*SignalSyncKHR)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSync *sync, EGLenum mode);
+ EGLBoolean (*GetSyncAttrib)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSync *sync, EGLint attribute,
+ EGLAttrib *value);
+
+ 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);
+
+ EGLBoolean (*SwapBuffersWithDamageEXT)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _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,
+ _EGLDisplay *dpy, _EGLSurface *surface);
+ EGLBoolean (*GetSyncValuesCHROMIUM)(_EGLDisplay *dpy, _EGLSurface *surface,
+ 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);
+
+ int (*GLInteropQueryDeviceInfo)(_EGLDisplay *dpy, _EGLContext *ctx,
+ struct mesa_glinterop_device_info *out);
+ int (*GLInteropExportObject)(_EGLDisplay *dpy, _EGLContext *ctx,
+ struct mesa_glinterop_export_in *in,
+ struct mesa_glinterop_export_out *out);
};
+EGLint _eglConvertIntsToAttribs(const EGLint *int_list,
+ EGLAttrib **out_attrib_list);
#ifdef __cplusplus
}
diff --git a/lib/mesa/src/egl/main/eglconfig.c b/lib/mesa/src/egl/main/eglconfig.c
index c445d9b0c..6161d26e4 100644
--- a/lib/mesa/src/egl/main/eglconfig.c
+++ b/lib/mesa/src/egl/main/eglconfig.c
@@ -38,13 +38,13 @@
#include <assert.h>
#include "c99_compat.h"
+#include "eglcompiler.h"
#include "eglconfig.h"
#include "egldisplay.h"
#include "eglcurrent.h"
#include "egllog.h"
-#define MIN2(A, B) (((A) < (B)) ? (A) : (B))
/**
@@ -246,7 +246,13 @@ static const struct {
/* extensions */
{ EGL_Y_INVERTED_NOK, ATTRIB_TYPE_BOOLEAN,
ATTRIB_CRITERION_EXACT,
- EGL_DONT_CARE }
+ EGL_DONT_CARE },
+ { EGL_FRAMEBUFFER_TARGET_ANDROID, ATTRIB_TYPE_BOOLEAN,
+ ATTRIB_CRITERION_EXACT,
+ EGL_DONT_CARE },
+ { EGL_RECORDABLE_ANDROID, ATTRIB_TYPE_BOOLEAN,
+ ATTRIB_CRITERION_EXACT,
+ EGL_DONT_CARE },
};
@@ -489,6 +495,10 @@ _eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
switch (attr) {
case EGL_Y_INVERTED_NOK:
return conf->Display->Extensions.NOK_texture_from_pixmap;
+ case EGL_FRAMEBUFFER_TARGET_ANDROID:
+ return conf->Display->Extensions.ANDROID_framebuffer_target;
+ case EGL_RECORDABLE_ANDROID:
+ return conf->Display->Extensions.ANDROID_recordable;
default:
break;
}
@@ -589,14 +599,14 @@ _eglCompareConfigs(const _EGLConfig *conf1, const _EGLConfig *conf2,
return 0;
/* the enum values have the desired ordering */
- assert(EGL_NONE < EGL_SLOW_CONFIG);
- assert(EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG);
+ STATIC_ASSERT(EGL_NONE < EGL_SLOW_CONFIG);
+ STATIC_ASSERT(EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG);
val1 = conf1->ConfigCaveat - conf2->ConfigCaveat;
if (val1)
return val1;
/* the enum values have the desired ordering */
- assert(EGL_RGB_BUFFER < EGL_LUMINANCE_BUFFER);
+ STATIC_ASSERT(EGL_RGB_BUFFER < EGL_LUMINANCE_BUFFER);
val1 = conf1->ColorBufferType - conf2->ColorBufferType;
if (val1)
return val1;
diff --git a/lib/mesa/src/egl/main/eglcontext.c b/lib/mesa/src/egl/main/eglcontext.c
index ae19862bc..5313e1dab 100644
--- a/lib/mesa/src/egl/main/eglcontext.c
+++ b/lib/mesa/src/egl/main/eglcontext.c
@@ -184,19 +184,33 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
break;
}
- /* The EGL_KHR_create_context_spec says:
- *
- * "If the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR bit is set in
- * EGL_CONTEXT_FLAGS_KHR, then a context supporting <robust buffer
- * access> will be created. Robust buffer access is defined in the
- * GL_ARB_robustness extension specification, and the resulting
- * context must also support either the GL_ARB_robustness
- * extension, or a version of OpenGL incorporating equivalent
- * functionality. This bit is supported for OpenGL contexts.
- */
if ((val & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) &&
- (api != EGL_OPENGL_API ||
- !dpy->Extensions.EXT_create_context_robustness)) {
+ api != EGL_OPENGL_API) {
+ /* The EGL_KHR_create_context spec says:
+ *
+ * 10) Which error should be generated if robust buffer access
+ * or reset notifications are requested under OpenGL ES?
+ *
+ * As per Issue 6, this extension does not support creating
+ * robust contexts for OpenGL ES. This is only supported via
+ * the EGL_EXT_create_context_robustness extension.
+ *
+ * Attempting to use this extension to create robust OpenGL
+ * ES context will generate an EGL_BAD_ATTRIBUTE error. This
+ * specific error is generated because this extension does
+ * not define the EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR
+ * and EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR
+ * bits for OpenGL ES contexts. Thus, use of these bits fall
+ * under condition described by: "If an attribute is
+ * specified that is not meaningful for the client API
+ * type.." in the above specification.
+ *
+ * The spec requires that we emit the error even if the display
+ * supports EGL_EXT_create_context_robustness. To create a robust
+ * GLES context, the *attribute*
+ * EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT must be used, not the
+ * *flag* EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR.
+ */
err = EGL_BAD_ATTRIBUTE;
break;
}
@@ -457,6 +471,16 @@ _eglParseContextAttribList(_EGLContext *ctx, _EGLDisplay *dpy,
/**
* Initialize the given _EGLContext object to defaults and/or the values
* in the attrib_list.
+ *
+ * According to EGL 1.5 Section 3.7:
+ *
+ * "EGL_OPENGL_API and EGL_OPENGL_ES_API are interchangeable for all
+ * purposes except eglCreateContext."
+ *
+ * And since we only support GL and GLES, this is the only place where the
+ * bound API matters at all. We look up the current API from the current
+ * thread, and stash that in the context we're initializing. Our caller is
+ * responsible for determining whether that's an API it supports.
*/
EGLBoolean
_eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
@@ -528,9 +552,14 @@ _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *c,
switch (attribute) {
case EGL_CONFIG_ID:
- if (!c->Config)
- return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext");
- *value = c->Config->ConfigID;
+ /*
+ * From EGL_KHR_no_config_context:
+ *
+ * "Querying EGL_CONFIG_ID returns the ID of the EGLConfig with
+ * respect to which the context was created, or zero if created
+ * without respect to an EGLConfig."
+ */
+ *value = c->Config ? c->Config->ConfigID : 0;
break;
case EGL_CONTEXT_CLIENT_VERSION:
*value = c->ClientMajorVersion;
@@ -557,20 +586,16 @@ _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *c,
static _EGLContext *
_eglBindContextToThread(_EGLContext *ctx, _EGLThreadInfo *t)
{
- EGLint apiIndex;
_EGLContext *oldCtx;
- apiIndex = (ctx) ?
- _eglConvertApiToIndex(ctx->ClientAPI) : t->CurrentAPIIndex;
-
- oldCtx = t->CurrentContexts[apiIndex];
+ oldCtx = t->CurrentContext;
if (ctx != oldCtx) {
if (oldCtx)
oldCtx->Binding = NULL;
if (ctx)
ctx->Binding = t;
- t->CurrentContexts[apiIndex] = ctx;
+ t->CurrentContext = ctx;
}
return oldCtx;
@@ -585,7 +610,6 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
{
_EGLThreadInfo *t = _eglGetCurrentThread();
_EGLDisplay *dpy;
- EGLint conflict_api;
if (_eglIsCurrentThreadDummy())
return _eglError(EGL_BAD_ALLOC, "eglMakeCurrent");
@@ -617,13 +641,11 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
if (ctx->Binding && ctx->Binding != t)
return _eglError(EGL_BAD_ACCESS, "eglMakeCurrent");
if (draw && draw->CurrentContext && draw->CurrentContext != ctx) {
- if (draw->CurrentContext->Binding != t ||
- draw->CurrentContext->ClientAPI != ctx->ClientAPI)
+ if (draw->CurrentContext->Binding != t)
return _eglError(EGL_BAD_ACCESS, "eglMakeCurrent");
}
if (read && read->CurrentContext && read->CurrentContext != ctx) {
- if (read->CurrentContext->Binding != t ||
- read->CurrentContext->ClientAPI != ctx->ClientAPI)
+ if (read->CurrentContext->Binding != t)
return _eglError(EGL_BAD_ACCESS, "eglMakeCurrent");
}
@@ -634,9 +656,9 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
(read && read->Config != ctx->Config))
return _eglError(EGL_BAD_MATCH, "eglMakeCurrent");
} else {
- /* Otherwise we must be using the EGL_MESA_configless_context
+ /* Otherwise we must be using the EGL_KHR_no_config_context
* extension */
- assert(dpy->Extensions.MESA_configless_context);
+ assert(dpy->Extensions.KHR_no_config_context);
/* The extension doesn't permit binding draw and read buffers with
* differing contexts */
@@ -644,22 +666,6 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
return _eglError(EGL_BAD_MATCH, "eglMakeCurrent");
}
- switch (ctx->ClientAPI) {
- /* OpenGL and OpenGL ES are conflicting */
- case EGL_OPENGL_ES_API:
- conflict_api = EGL_OPENGL_API;
- break;
- case EGL_OPENGL_API:
- conflict_api = EGL_OPENGL_ES_API;
- break;
- default:
- conflict_api = -1;
- break;
- }
-
- if (conflict_api >= 0 && _eglGetAPIContext(conflict_api))
- return _eglError(EGL_BAD_ACCESS, "eglMakeCurrent");
-
return EGL_TRUE;
}
diff --git a/lib/mesa/src/egl/main/egldispatchstubs.c b/lib/mesa/src/egl/main/egldispatchstubs.c
deleted file mode 100644
index e02abd7a9..000000000
--- a/lib/mesa/src/egl/main/egldispatchstubs.c
+++ /dev/null
@@ -1,110 +0,0 @@
-#include "egldispatchstubs.h"
-#include "g_egldispatchstubs.h"
-
-#include <string.h>
-
-#include "eglcurrent.h"
-
-static const __EGLapiExports *exports;
-
-const int __EGL_DISPATCH_FUNC_COUNT = __EGL_DISPATCH_COUNT;
-int __EGL_DISPATCH_FUNC_INDICES[__EGL_DISPATCH_COUNT + 1];
-
-static int FindProcIndex(const char *name)
-{
- unsigned first = 0;
- unsigned last = __EGL_DISPATCH_COUNT - 1;
-
- while (first <= last) {
- unsigned middle = (first + last) / 2;
- int comp = strcmp(name,
- __EGL_DISPATCH_FUNC_NAMES[middle]);
-
- if (comp > 0)
- first = middle + 1;
- else if (comp < 0)
- last = middle - 1;
- else
- return middle;
- }
-
- /* Just point to the dummy entry at the end of the respective table */
- return __EGL_DISPATCH_COUNT;
-}
-
-void __eglInitDispatchStubs(const __EGLapiExports *exportsTable)
-{
- int i;
- exports = exportsTable;
- for (i=0; i<__EGL_DISPATCH_FUNC_COUNT; i++) {
- __EGL_DISPATCH_FUNC_INDICES[i] = -1;
- }
-}
-
-void __eglSetDispatchIndex(const char *name, int dispatchIndex)
-{
- int index = FindProcIndex(name);
- __EGL_DISPATCH_FUNC_INDICES[index] = dispatchIndex;
-}
-
-void *__eglDispatchFindDispatchFunction(const char *name)
-{
- int index = FindProcIndex(name);
- return (void *) __EGL_DISPATCH_FUNCS[index];
-}
-
-static __eglMustCastToProperFunctionPointerType FetchVendorFunc(__EGLvendorInfo *vendor,
- int index, EGLint errorCode)
-{
- __eglMustCastToProperFunctionPointerType func = NULL;
-
- if (vendor != NULL) {
- func = exports->fetchDispatchEntry(vendor, __EGL_DISPATCH_FUNC_INDICES[index]);
- }
- if (func == NULL) {
- if (errorCode != EGL_SUCCESS) {
- _eglError(errorCode, __EGL_DISPATCH_FUNC_NAMES[index]);
- }
- return NULL;
- }
-
- if (!exports->setLastVendor(vendor)) {
- // Don't bother trying to set an error code in libglvnd. If
- // setLastVendor failed, then setEGLError would also fail.
- _eglError(errorCode, __EGL_DISPATCH_FUNC_NAMES[index]);
- return NULL;
- }
-
- return func;
-}
-
-__eglMustCastToProperFunctionPointerType __eglDispatchFetchByCurrent(int index)
-{
- __EGLvendorInfo *vendor;
-
- // Note: This is only used for the eglWait* functions. For those, if
- // there's no current context, then they're supposed to do nothing but
- // return success.
- exports->threadInit();
- vendor = exports->getCurrentVendor();
- return FetchVendorFunc(vendor, index, EGL_SUCCESS);
-}
-
-__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDisplay(EGLDisplay dpy, int index)
-{
- __EGLvendorInfo *vendor;
-
- exports->threadInit();
- vendor = exports->getVendorFromDisplay(dpy);
- return FetchVendorFunc(vendor, index, EGL_BAD_DISPLAY);
-}
-
-__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDevice(EGLDeviceEXT dev, int index)
-{
- __EGLvendorInfo *vendor;
-
- exports->threadInit();
- vendor = exports->getVendorFromDevice(dev);
- return FetchVendorFunc(vendor, index, EGL_BAD_DEVICE_EXT);
-}
-
diff --git a/lib/mesa/src/egl/main/egldispatchstubs.h b/lib/mesa/src/egl/main/egldispatchstubs.h
deleted file mode 100644
index 7861ea5e6..000000000
--- a/lib/mesa/src/egl/main/egldispatchstubs.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef EGLDISPATCHSTUBS_H
-#define EGLDISPATCHSTUBS_H
-
-#include "glvnd/libeglabi.h"
-
-// These variables are all generated along with the dispatch stubs.
-extern const int __EGL_DISPATCH_FUNC_COUNT;
-extern const char * const __EGL_DISPATCH_FUNC_NAMES[];
-extern int __EGL_DISPATCH_FUNC_INDICES[];
-extern const __eglMustCastToProperFunctionPointerType __EGL_DISPATCH_FUNCS[];
-
-void __eglInitDispatchStubs(const __EGLapiExports *exportsTable);
-void __eglSetDispatchIndex(const char *name, int index);
-
-/**
- * Returns the dispatch function for the given name, or \c NULL if the function
- * isn't supported.
- */
-void *__eglDispatchFindDispatchFunction(const char *name);
-
-// Helper functions used by the generated stubs.
-__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDisplay(EGLDisplay dpy, int index);
-__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDevice(EGLDeviceEXT dpy, int index);
-__eglMustCastToProperFunctionPointerType __eglDispatchFetchByCurrent(int index);
-
-#endif // EGLDISPATCHSTUBS_H
diff --git a/lib/mesa/src/egl/main/egldisplay.c b/lib/mesa/src/egl/main/egldisplay.c
index f6db03ab5..37711bd86 100644
--- a/lib/mesa/src/egl/main/egldisplay.c
+++ b/lib/mesa/src/egl/main/egldisplay.c
@@ -44,6 +44,8 @@
#include "egldriver.h"
#include "eglglobals.h"
#include "egllog.h"
+#include "eglimage.h"
+#include "eglsync.h"
/* Includes for _eglNativePlatformDetectNativeDisplay */
#ifdef HAVE_MINCORE
@@ -178,25 +180,24 @@ _eglNativePlatformDetectNativeDisplay(void *nativeDisplay)
_EGLPlatformType
_eglGetNativePlatform(void *nativeDisplay)
{
- static _EGLPlatformType native_platform = _EGL_INVALID_PLATFORM;
- char *detection_method = NULL;
+ static _EGLPlatformType native_platform;
+ char *detection_method;
+
+ native_platform = _eglGetNativePlatformFromEnv();
+ detection_method = "environment overwrite";
if (native_platform == _EGL_INVALID_PLATFORM) {
- native_platform = _eglGetNativePlatformFromEnv();
- detection_method = "environment overwrite";
- if (native_platform == _EGL_INVALID_PLATFORM) {
- native_platform = _eglNativePlatformDetectNativeDisplay(nativeDisplay);
- detection_method = "autodetected";
- if (native_platform == _EGL_INVALID_PLATFORM) {
- native_platform = _EGL_NATIVE_PLATFORM;
- detection_method = "build-time configuration";
- }
- }
+ native_platform = _eglNativePlatformDetectNativeDisplay(nativeDisplay);
+ detection_method = "autodetected";
}
- if (detection_method != NULL)
- _eglLog(_EGL_DEBUG, "Native platform type: %s (%s)",
- egl_platforms[native_platform].name, detection_method);
+ if (native_platform == _EGL_INVALID_PLATFORM) {
+ native_platform = _EGL_NATIVE_PLATFORM;
+ detection_method = "build-time configuration";
+ }
+
+ _eglLog(_EGL_DEBUG, "Native platform type: %s (%s)",
+ egl_platforms[native_platform].name, detection_method);
return native_platform;
}
@@ -301,6 +302,26 @@ _eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *display)
drv->API.DestroySurface(drv, display, surf);
}
assert(!display->ResourceLists[_EGL_RESOURCE_SURFACE]);
+
+ list = display->ResourceLists[_EGL_RESOURCE_IMAGE];
+ while (list) {
+ _EGLImage *image = (_EGLImage *) list;
+ list = list->Next;
+
+ _eglUnlinkImage(image);
+ drv->API.DestroyImageKHR(drv, display, image);
+ }
+ assert(!display->ResourceLists[_EGL_RESOURCE_IMAGE]);
+
+ list = display->ResourceLists[_EGL_RESOURCE_SYNC];
+ while (list) {
+ _EGLSync *sync = (_EGLSync *) list;
+ list = list->Next;
+
+ _eglUnlinkSync(sync);
+ drv->API.DestroySyncKHR(drv, display, sync);
+ }
+ assert(!display->ResourceLists[_EGL_RESOURCE_SYNC]);
}
@@ -519,3 +540,24 @@ _eglGetWaylandDisplay(struct wl_display *native_display,
return _eglFindDisplay(_EGL_PLATFORM_WAYLAND, native_display);
}
#endif /* HAVE_WAYLAND_PLATFORM */
+
+#ifdef HAVE_SURFACELESS_PLATFORM
+_EGLDisplay*
+_eglGetSurfacelessDisplay(void *native_display,
+ const EGLint *attrib_list)
+{
+ /* This platform has no native display. */
+ if (native_display != NULL) {
+ _eglError(EGL_BAD_PARAMETER, "eglGetPlatformDisplay");
+ return NULL;
+ }
+
+ /* This platform recognizes no display attributes. */
+ if (attrib_list != NULL && attrib_list[0] != EGL_NONE) {
+ _eglError(EGL_BAD_ATTRIBUTE, "eglGetPlatformDisplay");
+ return NULL;
+ }
+
+ return _eglFindDisplay(_EGL_PLATFORM_SURFACELESS, native_display);
+}
+#endif /* HAVE_SURFACELESS_PLATFORM */
diff --git a/lib/mesa/src/egl/main/egldisplay.h b/lib/mesa/src/egl/main/egldisplay.h
index 6c64980cf..62d9a112f 100644
--- a/lib/mesa/src/egl/main/egldisplay.h
+++ b/lib/mesa/src/egl/main/egldisplay.h
@@ -79,6 +79,8 @@ struct _egl_resource
EGLBoolean IsLinked;
EGLint RefCount;
+ EGLLabelKHR Label;
+
/* used to link resources of the same type */
_EGLResource *Next;
};
@@ -90,7 +92,9 @@ struct _egl_resource
struct _egl_extensions
{
/* Please keep these sorted alphabetically. */
+ EGLBoolean ANDROID_framebuffer_target;
EGLBoolean ANDROID_image_native_buffer;
+ EGLBoolean ANDROID_recordable;
EGLBoolean CHROMIUM_sync_control;
@@ -110,13 +114,11 @@ struct _egl_extensions
EGLBoolean KHR_gl_texture_cubemap_image;
EGLBoolean KHR_image_base;
EGLBoolean KHR_image_pixmap;
+ EGLBoolean KHR_no_config_context;
EGLBoolean KHR_reusable_sync;
EGLBoolean KHR_surfaceless_context;
- EGLBoolean KHR_vg_parent_image;
EGLBoolean KHR_wait_sync;
- EGLBoolean MESA_configless_context;
- EGLBoolean MESA_drm_display;
EGLBoolean MESA_drm_image;
EGLBoolean MESA_image_dma_buf_export;
@@ -165,6 +167,8 @@ struct _egl_display
/* lists of resources */
_EGLResource *ResourceLists[_EGL_NUM_RESOURCES];
+
+ EGLLabelKHR Label;
};
@@ -270,6 +274,11 @@ _eglGetWaylandDisplay(struct wl_display *native_display,
const EGLint *attrib_list);
#endif
+#ifdef HAVE_SURFACELESS_PLATFORM
+_EGLDisplay*
+_eglGetSurfacelessDisplay(void *native_display,
+ const EGLint *attrib_list);
+#endif
#ifdef __cplusplus
}
diff --git a/lib/mesa/src/egl/main/eglentrypoint.h b/lib/mesa/src/egl/main/eglentrypoint.h
deleted file mode 100644
index e6318b931..000000000
--- a/lib/mesa/src/egl/main/eglentrypoint.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* core functions queryable in the presence of
- * EGL_KHR_get_all_proc_addresses or EGL 1.5
- */
-/* alphabetical order */
-EGL_ENTRYPOINT(eglBindAPI)
-EGL_ENTRYPOINT(eglBindTexImage)
-EGL_ENTRYPOINT(eglBindWaylandDisplayWL)
-EGL_ENTRYPOINT(eglChooseConfig)
-EGL_ENTRYPOINT(eglClientWaitSync)
-EGL_ENTRYPOINT(eglClientWaitSyncKHR)
-EGL_ENTRYPOINT(eglCopyBuffers)
-EGL_ENTRYPOINT(eglCreateContext)
-EGL_ENTRYPOINT(eglCreateDRMImageMESA)
-EGL_ENTRYPOINT(eglCreateImage)
-EGL_ENTRYPOINT(eglCreateImageKHR)
-EGL_ENTRYPOINT(eglCreatePbufferFromClientBuffer)
-EGL_ENTRYPOINT(eglCreatePbufferSurface)
-EGL_ENTRYPOINT(eglCreatePixmapSurface)
-EGL_ENTRYPOINT(eglCreatePlatformPixmapSurface)
-EGL_ENTRYPOINT(eglCreatePlatformPixmapSurfaceEXT)
-EGL_ENTRYPOINT(eglCreatePlatformWindowSurface)
-EGL_ENTRYPOINT(eglCreatePlatformWindowSurfaceEXT)
-EGL_ENTRYPOINT(eglCreateSync)
-EGL_ENTRYPOINT(eglCreateSync64KHR)
-EGL_ENTRYPOINT(eglCreateSyncKHR)
-EGL_ENTRYPOINT(eglCreateWaylandBufferFromImageWL)
-EGL_ENTRYPOINT(eglCreateWindowSurface)
-EGL_ENTRYPOINT(eglDebugMessageControlKHR)
-EGL_ENTRYPOINT(eglDestroyContext)
-EGL_ENTRYPOINT(eglDestroyImage)
-EGL_ENTRYPOINT(eglDestroyImageKHR)
-EGL_ENTRYPOINT(eglDestroySurface)
-EGL_ENTRYPOINT(eglDestroySync)
-EGL_ENTRYPOINT(eglDestroySyncKHR)
-EGL_ENTRYPOINT(eglDupNativeFenceFDANDROID)
-EGL_ENTRYPOINT(eglExportDMABUFImageMESA)
-EGL_ENTRYPOINT(eglExportDMABUFImageQueryMESA)
-EGL_ENTRYPOINT(eglExportDRMImageMESA)
-EGL_ENTRYPOINT(eglGetConfigAttrib)
-EGL_ENTRYPOINT(eglGetConfigs)
-EGL_ENTRYPOINT(eglGetCurrentContext)
-EGL_ENTRYPOINT(eglGetCurrentDisplay)
-EGL_ENTRYPOINT(eglGetCurrentSurface)
-EGL_ENTRYPOINT(eglGetDisplay)
-EGL_ENTRYPOINT(eglGetError)
-EGL_ENTRYPOINT(eglGetPlatformDisplay)
-EGL_ENTRYPOINT(eglGetPlatformDisplayEXT)
-EGL_ENTRYPOINT(eglGetProcAddress)
-EGL_ENTRYPOINT(eglGetSyncAttrib)
-EGL_ENTRYPOINT(eglGetSyncAttribKHR)
-EGL_ENTRYPOINT(eglGetSyncValuesCHROMIUM)
-EGL_ENTRYPOINT(eglInitialize)
-EGL_ENTRYPOINT(eglLabelObjectKHR)
-EGL_ENTRYPOINT(eglMakeCurrent)
-EGL_ENTRYPOINT(eglPostSubBufferNV)
-EGL_ENTRYPOINT(eglQueryAPI)
-EGL_ENTRYPOINT(eglQueryContext)
-EGL_ENTRYPOINT(eglQueryDebugKHR)
-EGL_ENTRYPOINT(eglQueryString)
-EGL_ENTRYPOINT(eglQuerySurface)
-EGL_ENTRYPOINT(eglQueryWaylandBufferWL)
-EGL_ENTRYPOINT(eglReleaseTexImage)
-EGL_ENTRYPOINT(eglReleaseThread)
-EGL_ENTRYPOINT(eglSignalSyncKHR)
-EGL_ENTRYPOINT(eglSurfaceAttrib)
-EGL_ENTRYPOINT(eglSwapBuffers)
-EGL_ENTRYPOINT(eglSwapBuffersRegionNOK)
-EGL_ENTRYPOINT(eglSwapBuffersWithDamageEXT)
-EGL_ENTRYPOINT(eglSwapBuffersWithDamageKHR)
-EGL_ENTRYPOINT(eglSwapInterval)
-EGL_ENTRYPOINT(eglTerminate)
-EGL_ENTRYPOINT(eglUnbindWaylandDisplayWL)
-EGL_ENTRYPOINT(eglWaitClient)
-EGL_ENTRYPOINT(eglWaitGL)
-EGL_ENTRYPOINT(eglWaitNative)
-EGL_ENTRYPOINT(eglWaitSync)
-EGL_ENTRYPOINT(eglWaitSyncKHR)
diff --git a/lib/mesa/src/egl/main/eglfallbacks.c b/lib/mesa/src/egl/main/eglfallbacks.c
index 65daf8fd0..d0fce8c20 100644
--- a/lib/mesa/src/egl/main/eglfallbacks.c
+++ b/lib/mesa/src/egl/main/eglfallbacks.c
@@ -59,29 +59,29 @@ _eglInitDriverFallbacks(_EGLDriver *drv)
drv->API.ChooseConfig = _eglChooseConfig;
drv->API.GetConfigAttrib = _eglGetConfigAttrib;
- drv->API.CreateContext = (CreateContext_t) _eglReturnFalse;
- drv->API.DestroyContext = (DestroyContext_t) _eglReturnFalse;
- drv->API.MakeCurrent = (MakeCurrent_t) _eglReturnFalse;
+ drv->API.CreateContext = (void*) _eglReturnFalse;
+ drv->API.DestroyContext = (void*) _eglReturnFalse;
+ drv->API.MakeCurrent = (void*) _eglReturnFalse;
drv->API.QueryContext = _eglQueryContext;
- drv->API.CreateWindowSurface = (CreateWindowSurface_t) _eglReturnFalse;
- drv->API.CreatePixmapSurface = (CreatePixmapSurface_t) _eglReturnFalse;
- drv->API.CreatePbufferSurface = (CreatePbufferSurface_t) _eglReturnFalse;
+ drv->API.CreateWindowSurface = (void*) _eglReturnFalse;
+ drv->API.CreatePixmapSurface = (void*) _eglReturnFalse;
+ drv->API.CreatePbufferSurface = (void*) _eglReturnFalse;
drv->API.CreatePbufferFromClientBuffer =
- (CreatePbufferFromClientBuffer_t) _eglReturnFalse;
- drv->API.DestroySurface = (DestroySurface_t) _eglReturnFalse;
+ (void*) _eglReturnFalse;
+ drv->API.DestroySurface = (void*) _eglReturnFalse;
drv->API.QuerySurface = _eglQuerySurface;
drv->API.SurfaceAttrib = _eglSurfaceAttrib;
- drv->API.BindTexImage = (BindTexImage_t) _eglReturnFalse;
- drv->API.ReleaseTexImage = (ReleaseTexImage_t) _eglReturnFalse;
- drv->API.CopyBuffers = (CopyBuffers_t) _eglReturnFalse;
- drv->API.SwapBuffers = (SwapBuffers_t) _eglReturnFalse;
+ drv->API.BindTexImage = (void*) _eglReturnFalse;
+ drv->API.ReleaseTexImage = (void*) _eglReturnFalse;
+ drv->API.CopyBuffers = (void*) _eglReturnFalse;
+ drv->API.SwapBuffers = (void*) _eglReturnFalse;
drv->API.SwapInterval = _eglSwapInterval;
- drv->API.WaitClient = (WaitClient_t) _eglReturnFalse;
- drv->API.WaitNative = (WaitNative_t) _eglReturnFalse;
- drv->API.GetProcAddress = (GetProcAddress_t) _eglReturnFalse;
+ drv->API.WaitClient = (void*) _eglReturnFalse;
+ drv->API.WaitNative = (void*) _eglReturnFalse;
+ drv->API.GetProcAddress = (void*) _eglReturnFalse;
drv->API.CreateImageKHR = NULL;
drv->API.DestroyImageKHR = NULL;
diff --git a/lib/mesa/src/egl/main/eglglobals.c b/lib/mesa/src/egl/main/eglglobals.c
index 938d95378..cb41063e3 100644
--- a/lib/mesa/src/egl/main/eglglobals.c
+++ b/lib/mesa/src/egl/main/eglglobals.c
@@ -50,13 +50,26 @@ struct _egl_global _eglGlobal =
_eglFiniDisplay
},
- /* ClientExtensionsString */
+ /* ClientExtensionString */
"EGL_EXT_client_extensions"
" EGL_EXT_platform_base"
+#ifdef HAVE_WAYLAND_PLATFORM
" EGL_EXT_platform_wayland"
+#endif
+#ifdef HAVE_X11_PLATFORM
" EGL_EXT_platform_x11"
- " EGL_KHR_client_get_all_proc_addresses"
+#endif
+#ifdef HAVE_DRM_PLATFORM
" EGL_MESA_platform_gbm"
+#endif
+#ifdef HAVE_SURFACELESS_PLATFORM
+ " EGL_MESA_platform_surfaceless"
+#endif
+ " EGL_KHR_client_get_all_proc_addresses"
+ " EGL_KHR_debug",
+
+ NULL, /* debugCallback */
+ _EGL_DEBUG_BIT_CRITICAL | _EGL_DEBUG_BIT_ERROR, /* debugTypesEnabled */
};
diff --git a/lib/mesa/src/egl/main/eglglobals.h b/lib/mesa/src/egl/main/eglglobals.h
index ae1b75b45..ec4f3d04a 100644
--- a/lib/mesa/src/egl/main/eglglobals.h
+++ b/lib/mesa/src/egl/main/eglglobals.h
@@ -36,6 +36,13 @@
#include "egltypedefs.h"
+enum
+{
+ _EGL_DEBUG_BIT_CRITICAL = 0x1,
+ _EGL_DEBUG_BIT_ERROR = 0x2,
+ _EGL_DEBUG_BIT_WARN = 0x4,
+ _EGL_DEBUG_BIT_INFO = 0x8,
+};
/**
* Global library data
@@ -51,6 +58,9 @@ struct _egl_global
void (*AtExitCalls[10])(void);
const char *ClientExtensionString;
+
+ EGLDEBUGPROCKHR debugCallback;
+ unsigned int debugTypesEnabled;
};
@@ -60,5 +70,10 @@ extern struct _egl_global _eglGlobal;
extern void
_eglAddAtExitCall(void (*func)(void));
+static inline unsigned int DebugBitFromType(EGLenum type)
+{
+ assert(type >= EGL_DEBUG_MSG_CRITICAL_KHR && type <= EGL_DEBUG_MSG_INFO_KHR);
+ return (1 << (type - EGL_DEBUG_MSG_CRITICAL_KHR));
+}
#endif /* EGLGLOBALS_INCLUDED */
diff --git a/lib/mesa/src/egl/main/eglglvnd.c b/lib/mesa/src/egl/main/eglglvnd.c
deleted file mode 100644
index 6b984ed6c..000000000
--- a/lib/mesa/src/egl/main/eglglvnd.c
+++ /dev/null
@@ -1,82 +0,0 @@
-#include <string.h>
-#include <assert.h>
-
-#include <glvnd/libeglabi.h>
-
-#include "eglcurrent.h"
-#include "egldispatchstubs.h"
-#include "eglglobals.h"
-
-static const __EGLapiExports *__eglGLVNDApiExports = NULL;
-
-static const char * EGLAPIENTRY
-__eglGLVNDQueryString(EGLDisplay dpy, EGLenum name)
-{
- // For client extensions, return the list of non-platform extensions. The
- // platform extensions are returned by __eglGLVNDGetVendorString.
- if (dpy == EGL_NO_DISPLAY && name == EGL_EXTENSIONS)
- return _eglGlobal.ClientOnlyExtensionString;
-
- // For everything else, forward to the normal eglQueryString function.
- return eglQueryString(dpy, name);
-}
-
-static const char *
-__eglGLVNDGetVendorString(int name)
-{
- if (name == __EGL_VENDOR_STRING_PLATFORM_EXTENSIONS) {
- const char *str = _eglGlobal.PlatformExtensionString;
- // The platform extension string may have a leading space. If it does,
- // then skip over it.
- while (*str == ' ') {
- str++;
- }
- return str;
- }
-
- return NULL;
-}
-
-static EGLDisplay
-__eglGLVNDGetPlatformDisplay(EGLenum platform, void *native_display,
- const EGLAttrib *attrib_list)
-{
- if (platform == EGL_NONE) {
- assert(native_display == (void *) EGL_DEFAULT_DISPLAY);
- assert(attrib_list == NULL);
- return eglGetDisplay((EGLNativeDisplayType) native_display);
- } else {
- return eglGetPlatformDisplay(platform, native_display, attrib_list);
- }
-}
-
-static void *
-__eglGLVNDGetProcAddress(const char *procName)
-{
- if (strcmp(procName, "eglQueryString") == 0)
- return (void *) __eglGLVNDQueryString;
-
- return (void *) eglGetProcAddress(procName);
-}
-
-EGLAPI EGLBoolean
-__egl_Main(uint32_t version, const __EGLapiExports *exports,
- __EGLvendorInfo *vendor, __EGLapiImports *imports)
-{
- if (EGL_VENDOR_ABI_GET_MAJOR_VERSION(version) !=
- EGL_VENDOR_ABI_MAJOR_VERSION)
- return EGL_FALSE;
-
- __eglGLVNDApiExports = exports;
- __eglInitDispatchStubs(exports);
-
- imports->getPlatformDisplay = __eglGLVNDGetPlatformDisplay;
- imports->getSupportsAPI = _eglIsApiValid;
- imports->getVendorString = __eglGLVNDGetVendorString;
- imports->getProcAddress = __eglGLVNDGetProcAddress;
- imports->getDispatchAddress = __eglDispatchFindDispatchFunction;
- imports->setDispatchIndex = __eglSetDispatchIndex;
-
- return EGL_TRUE;
-}
-
diff --git a/lib/mesa/src/egl/main/eglsurface.c b/lib/mesa/src/egl/main/eglsurface.c
index 4fa43f3e2..3af337fef 100644
--- a/lib/mesa/src/egl/main/eglsurface.c
+++ b/lib/mesa/src/egl/main/eglsurface.c
@@ -71,6 +71,8 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
EGLint type = surf->Type;
EGLint texture_type = EGL_PBUFFER_BIT;
EGLint i, err = EGL_SUCCESS;
+ EGLint attr = EGL_NONE;
+ EGLint val = EGL_NONE;
if (!attrib_list)
return EGL_SUCCESS;
@@ -79,8 +81,8 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
texture_type |= EGL_PIXMAP_BIT;
for (i = 0; attrib_list[i] != EGL_NONE; i++) {
- EGLint attr = attrib_list[i++];
- EGLint val = attrib_list[i];
+ attr = attrib_list[i++];
+ val = attrib_list[i];
switch (attr) {
/* common attributes */
@@ -186,6 +188,7 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
err = EGL_BAD_ATTRIBUTE;
break;
}
+
switch (val) {
case EGL_TEXTURE_RGB:
case EGL_TEXTURE_RGBA:
@@ -204,6 +207,7 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
err = EGL_BAD_ATTRIBUTE;
break;
}
+
switch (val) {
case EGL_TEXTURE_2D:
case EGL_NO_TEXTURE:
@@ -229,12 +233,21 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
break;
}
- if (err != EGL_SUCCESS) {
- _eglLog(_EGL_WARNING, "bad surface attribute 0x%04x", attr);
+ if (err != EGL_SUCCESS)
break;
+ }
+
+ if (err == EGL_SUCCESS && type == EGL_PBUFFER_BIT) {
+ if ((surf->TextureTarget == EGL_NO_TEXTURE && surf->TextureFormat != EGL_NO_TEXTURE) ||
+ (surf->TextureFormat == EGL_NO_TEXTURE && surf->TextureTarget != EGL_NO_TEXTURE)) {
+ attr = surf->TextureTarget == EGL_NO_TEXTURE ? EGL_TEXTURE_TARGET : EGL_TEXTURE_FORMAT;
+ err = EGL_BAD_MATCH;
}
}
+ if (err != EGL_SUCCESS)
+ _eglLog(_EGL_WARNING, "bad surface attribute 0x%04x", attr);
+
return err;
}
@@ -249,9 +262,13 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
{
const char *func;
EGLint renderBuffer = EGL_BACK_BUFFER;
- EGLint swapBehavior = EGL_BUFFER_PRESERVED;
+ EGLint swapBehavior = EGL_BUFFER_DESTROYED;
EGLint err;
+ /* Swap behavior can be preserved only if config supports this. */
+ if (conf->SurfaceType & EGL_SWAP_BEHAVIOR_PRESERVED_BIT)
+ swapBehavior = EGL_BUFFER_PRESERVED;
+
switch (type) {
case EGL_WINDOW_BIT:
func = "eglCreateWindowSurface";
@@ -307,6 +324,12 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
if (err != EGL_SUCCESS)
return _eglError(err, func);
+ /* if EGL_LARGEST_PBUFFER in use, clamp width and height */
+ if (surf->LargestPbuffer) {
+ surf->Width = MIN2(surf->Width, _EGL_MAX_PBUFFER_WIDTH);
+ surf->Height = MIN2(surf->Height, _EGL_MAX_PBUFFER_HEIGHT);
+ }
+
return EGL_TRUE;
}
diff --git a/lib/mesa/src/egl/main/eglsync.c b/lib/mesa/src/egl/main/eglsync.c
index 3019e6e93..dea324b11 100644
--- a/lib/mesa/src/egl/main/eglsync.c
+++ b/lib/mesa/src/egl/main/eglsync.c
@@ -26,6 +26,7 @@
**************************************************************************/
+#include <inttypes.h>
#include <string.h>
#include "eglsync.h"
@@ -38,45 +39,17 @@
* Parse the list of sync attributes and return the proper error code.
*/
static EGLint
-_eglParseSyncAttribList(_EGLSync *sync, const EGLint *attrib_list)
+_eglParseSyncAttribList(_EGLSync *sync, const EGLAttrib *attrib_list)
{
- EGLint i, err = EGL_SUCCESS;
+ EGLint i;
if (!attrib_list)
return EGL_SUCCESS;
for (i = 0; attrib_list[i] != EGL_NONE; i++) {
- EGLint attr = attrib_list[i++];
- EGLint val = attrib_list[i];
-
- switch (attr) {
- default:
- (void) val;
- err = EGL_BAD_ATTRIBUTE;
- break;
- }
-
- if (err != EGL_SUCCESS) {
- _eglLog(_EGL_DEBUG, "bad sync attribute 0x%04x", attr);
- break;
- }
- }
-
- return err;
-}
-
-
-static EGLint
-_eglParseSyncAttribList64(_EGLSync *sync, const EGLAttrib *attrib_list)
-{
- EGLint i, err = EGL_SUCCESS;
-
- if (!attrib_list)
- return EGL_SUCCESS;
-
- for (i = 0; attrib_list[i] != EGL_NONE; i++) {
- EGLint attr = attrib_list[i++];
- EGLint val = attrib_list[i];
+ EGLAttrib attr = attrib_list[i++];
+ EGLAttrib val = attrib_list[i];
+ EGLint err = EGL_SUCCESS;
switch (attr) {
case EGL_CL_EVENT_HANDLE_KHR:
@@ -92,27 +65,21 @@ _eglParseSyncAttribList64(_EGLSync *sync, const EGLAttrib *attrib_list)
}
if (err != EGL_SUCCESS) {
- _eglLog(_EGL_DEBUG, "bad sync attribute 0x%04x", attr);
- break;
+ _eglLog(_EGL_DEBUG, "bad sync attribute 0x%" PRIxPTR, attr);
+ return err;
}
}
- return err;
+ return EGL_SUCCESS;
}
EGLBoolean
_eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
- const EGLint *attrib_list, const EGLAttrib *attrib_list64)
+ const EGLAttrib *attrib_list)
{
EGLint err;
- if (!(type == EGL_SYNC_REUSABLE_KHR && dpy->Extensions.KHR_reusable_sync) &&
- !(type == EGL_SYNC_FENCE_KHR && dpy->Extensions.KHR_fence_sync) &&
- !(type == EGL_SYNC_CL_EVENT_KHR && dpy->Extensions.KHR_cl_event2 &&
- attrib_list64))
- return _eglError(EGL_BAD_ATTRIBUTE, "eglCreateSyncKHR");
-
_eglInitResource(&sync->Resource, sizeof(*sync), dpy);
sync->Type = type;
sync->SyncStatus = EGL_UNSIGNALED_KHR;
@@ -125,11 +92,7 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
sync->SyncCondition = EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR;
}
- if (attrib_list64)
- err = _eglParseSyncAttribList64(sync, attrib_list64);
- else
- err = _eglParseSyncAttribList(sync, attrib_list);
-
+ err = _eglParseSyncAttribList(sync, attrib_list);
if (err != EGL_SUCCESS)
return _eglError(err, "eglCreateSyncKHR");
@@ -144,9 +107,6 @@ EGLBoolean
_eglGetSyncAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
EGLint attribute, EGLAttrib *value)
{
- if (!value)
- return _eglError(EGL_BAD_PARAMETER, "eglGetSyncAttribKHR");
-
switch (attribute) {
case EGL_SYNC_TYPE_KHR:
*value = sync->Type;
@@ -155,7 +115,8 @@ _eglGetSyncAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
/* update the sync status */
if (sync->SyncStatus != EGL_SIGNALED_KHR &&
(sync->Type == EGL_SYNC_FENCE_KHR ||
- sync->Type == EGL_SYNC_CL_EVENT_KHR))
+ sync->Type == EGL_SYNC_CL_EVENT_KHR ||
+ sync->Type == EGL_SYNC_REUSABLE_KHR))
drv->API.ClientWaitSyncKHR(drv, dpy, sync, 0, 0);
*value = sync->SyncStatus;
diff --git a/lib/mesa/src/egl/main/eglsync.h b/lib/mesa/src/egl/main/eglsync.h
index 9b2aac882..83b6f72fc 100644
--- a/lib/mesa/src/egl/main/eglsync.h
+++ b/lib/mesa/src/egl/main/eglsync.h
@@ -53,7 +53,7 @@ struct _egl_sync
extern EGLBoolean
_eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
- const EGLint *attrib_list, const EGLAttrib *attrib_list64);
+ const EGLAttrib *attrib_list);
extern EGLBoolean
diff --git a/lib/mesa/src/egl/wayland/wayland-drm/Makefile.in b/lib/mesa/src/egl/wayland/wayland-drm/Makefile.in
index b365a1471..8a28a8d77 100644
--- a/lib/mesa/src/egl/wayland/wayland-drm/Makefile.in
+++ b/lib/mesa/src/egl/wayland/wayland-drm/Makefile.in
@@ -129,8 +129,6 @@ AMDGPU_CFLAGS = @AMDGPU_CFLAGS@
AMDGPU_LIBS = @AMDGPU_LIBS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-ANDROID_CFLAGS = @ANDROID_CFLAGS@
-ANDROID_LIBS = @ANDROID_LIBS@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -161,6 +159,8 @@ DLLTOOL = @DLLTOOL@
DLOPEN_LIBS = @DLOPEN_LIBS@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
+DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
+DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
DRIGL_CFLAGS = @DRIGL_CFLAGS@
DRIGL_LIBS = @DRIGL_LIBS@
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
@@ -173,11 +173,10 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGL_CFLAGS = @EGL_CFLAGS@
+EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
EGL_LIB_DEPS = @EGL_LIB_DEPS@
EGL_NATIVE_PLATFORM = @EGL_NATIVE_PLATFORM@
EGREP = @EGREP@
-ETNAVIV_CFLAGS = @ETNAVIV_CFLAGS@
-ETNAVIV_LIBS = @ETNAVIV_LIBS@
EXEEXT = @EXEEXT@
EXPAT_CFLAGS = @EXPAT_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@
@@ -225,27 +224,31 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
LIBDRM_LIBS = @LIBDRM_LIBS@
LIBELF_CFLAGS = @LIBELF_CFLAGS@
LIBELF_LIBS = @LIBELF_LIBS@
-LIBGLVND_DATADIR = @LIBGLVND_DATADIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
-LIBSENSORS_LIBS = @LIBSENSORS_LIBS@
+LIBSENSORS_LDFLAGS = @LIBSENSORS_LDFLAGS@
+LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
+LIBSHA1_LIBS = @LIBSHA1_LIBS@
LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
LIB_DIR = @LIB_DIR@
LIB_EXT = @LIB_EXT@
LIPO = @LIPO@
+LLVM_BINDIR = @LLVM_BINDIR@
LLVM_CFLAGS = @LLVM_CFLAGS@
LLVM_CONFIG = @LLVM_CONFIG@
+LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
LLVM_CXXFLAGS = @LLVM_CXXFLAGS@
LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@
LLVM_LDFLAGS = @LLVM_LDFLAGS@
+LLVM_LIBDIR = @LLVM_LIBDIR@
LLVM_LIBS = @LLVM_LIBS@
+LLVM_VERSION = @LLVM_VERSION@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MESA_LLVM = @MESA_LLVM@
MKDIR_P = @MKDIR_P@
MSVC2013_COMPAT_CFLAGS = @MSVC2013_COMPAT_CFLAGS@
MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@
@@ -266,6 +269,8 @@ OMX_LIBS = @OMX_LIBS@
OMX_LIB_INSTALL_DIR = @OMX_LIB_INSTALL_DIR@
OPENCL_LIBNAME = @OPENCL_LIBNAME@
OPENCL_VERSION = @OPENCL_VERSION@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
OSMESA_LIB = @OSMESA_LIB@
OSMESA_LIB_DEPS = @OSMESA_LIB_DEPS@
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
@@ -285,6 +290,8 @@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSIX_SHELL = @POSIX_SHELL@
+PRESENTPROTO_CFLAGS = @PRESENTPROTO_CFLAGS@
+PRESENTPROTO_LIBS = @PRESENTPROTO_LIBS@
PTHREADSTUBS_CFLAGS = @PTHREADSTUBS_CFLAGS@
PTHREADSTUBS_LIBS = @PTHREADSTUBS_LIBS@
PTHREAD_CC = @PTHREAD_CC@
@@ -300,6 +307,8 @@ SED = @SED@
SELINUX_CFLAGS = @SELINUX_CFLAGS@
SELINUX_LIBS = @SELINUX_LIBS@
SET_MAKE = @SET_MAKE@
+SHA1_CFLAGS = @SHA1_CFLAGS@
+SHA1_LIBS = @SHA1_LIBS@
SHELL = @SHELL@
SIMPENROSE_CFLAGS = @SIMPENROSE_CFLAGS@
SIMPENROSE_LIBS = @SIMPENROSE_LIBS@
@@ -308,6 +317,7 @@ STRIP = @STRIP@
SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@
SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@
SWR_CXX11_CXXFLAGS = @SWR_CXX11_CXXFLAGS@
+TIMESTAMP_CMD = @TIMESTAMP_CMD@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VA_CFLAGS = @VA_CFLAGS@
@@ -323,6 +333,7 @@ VDPAU_LIB_INSTALL_DIR = @VDPAU_LIB_INSTALL_DIR@
VDPAU_MAJOR = @VDPAU_MAJOR@
VDPAU_MINOR = @VDPAU_MINOR@
VERSION = @VERSION@
+VG_LIB_DEPS = @VG_LIB_DEPS@
VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@
VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@
VL_CFLAGS = @VL_CFLAGS@
@@ -351,10 +362,9 @@ XVMC_LIBS = @XVMC_LIBS@
XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@
XVMC_MAJOR = @XVMC_MAJOR@
XVMC_MINOR = @XVMC_MINOR@
+XXD = @XXD@
YACC = @YACC@
YFLAGS = @YFLAGS@
-ZLIB_CFLAGS = @ZLIB_CFLAGS@
-ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
diff --git a/lib/mesa/src/egl/wayland/wayland-egl/Makefile.in b/lib/mesa/src/egl/wayland/wayland-egl/Makefile.in
index 82994039e..1ba116e35 100644
--- a/lib/mesa/src/egl/wayland/wayland-egl/Makefile.in
+++ b/lib/mesa/src/egl/wayland/wayland-egl/Makefile.in
@@ -171,8 +171,6 @@ AMDGPU_CFLAGS = @AMDGPU_CFLAGS@
AMDGPU_LIBS = @AMDGPU_LIBS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-ANDROID_CFLAGS = @ANDROID_CFLAGS@
-ANDROID_LIBS = @ANDROID_LIBS@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -203,6 +201,8 @@ DLLTOOL = @DLLTOOL@
DLOPEN_LIBS = @DLOPEN_LIBS@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
+DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@
+DRI3PROTO_LIBS = @DRI3PROTO_LIBS@
DRIGL_CFLAGS = @DRIGL_CFLAGS@
DRIGL_LIBS = @DRIGL_LIBS@
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
@@ -215,11 +215,10 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGL_CFLAGS = @EGL_CFLAGS@
+EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
EGL_LIB_DEPS = @EGL_LIB_DEPS@
EGL_NATIVE_PLATFORM = @EGL_NATIVE_PLATFORM@
EGREP = @EGREP@
-ETNAVIV_CFLAGS = @ETNAVIV_CFLAGS@
-ETNAVIV_LIBS = @ETNAVIV_LIBS@
EXEEXT = @EXEEXT@
EXPAT_CFLAGS = @EXPAT_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@
@@ -267,27 +266,31 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
LIBDRM_LIBS = @LIBDRM_LIBS@
LIBELF_CFLAGS = @LIBELF_CFLAGS@
LIBELF_LIBS = @LIBELF_LIBS@
-LIBGLVND_DATADIR = @LIBGLVND_DATADIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
-LIBSENSORS_LIBS = @LIBSENSORS_LIBS@
+LIBSENSORS_LDFLAGS = @LIBSENSORS_LDFLAGS@
+LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
+LIBSHA1_LIBS = @LIBSHA1_LIBS@
LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
LIB_DIR = @LIB_DIR@
LIB_EXT = @LIB_EXT@
LIPO = @LIPO@
+LLVM_BINDIR = @LLVM_BINDIR@
LLVM_CFLAGS = @LLVM_CFLAGS@
LLVM_CONFIG = @LLVM_CONFIG@
+LLVM_CPPFLAGS = @LLVM_CPPFLAGS@
LLVM_CXXFLAGS = @LLVM_CXXFLAGS@
LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@
LLVM_LDFLAGS = @LLVM_LDFLAGS@
+LLVM_LIBDIR = @LLVM_LIBDIR@
LLVM_LIBS = @LLVM_LIBS@
+LLVM_VERSION = @LLVM_VERSION@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
+MESA_LLVM = @MESA_LLVM@
MKDIR_P = @MKDIR_P@
MSVC2013_COMPAT_CFLAGS = @MSVC2013_COMPAT_CFLAGS@
MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@
@@ -308,6 +311,8 @@ OMX_LIBS = @OMX_LIBS@
OMX_LIB_INSTALL_DIR = @OMX_LIB_INSTALL_DIR@
OPENCL_LIBNAME = @OPENCL_LIBNAME@
OPENCL_VERSION = @OPENCL_VERSION@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
OSMESA_LIB = @OSMESA_LIB@
OSMESA_LIB_DEPS = @OSMESA_LIB_DEPS@
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
@@ -327,6 +332,8 @@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POSIX_SHELL = @POSIX_SHELL@
+PRESENTPROTO_CFLAGS = @PRESENTPROTO_CFLAGS@
+PRESENTPROTO_LIBS = @PRESENTPROTO_LIBS@
PTHREADSTUBS_CFLAGS = @PTHREADSTUBS_CFLAGS@
PTHREADSTUBS_LIBS = @PTHREADSTUBS_LIBS@
PTHREAD_CC = @PTHREAD_CC@
@@ -342,6 +349,8 @@ SED = @SED@
SELINUX_CFLAGS = @SELINUX_CFLAGS@
SELINUX_LIBS = @SELINUX_LIBS@
SET_MAKE = @SET_MAKE@
+SHA1_CFLAGS = @SHA1_CFLAGS@
+SHA1_LIBS = @SHA1_LIBS@
SHELL = @SHELL@
SIMPENROSE_CFLAGS = @SIMPENROSE_CFLAGS@
SIMPENROSE_LIBS = @SIMPENROSE_LIBS@
@@ -350,6 +359,7 @@ STRIP = @STRIP@
SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@
SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@
SWR_CXX11_CXXFLAGS = @SWR_CXX11_CXXFLAGS@
+TIMESTAMP_CMD = @TIMESTAMP_CMD@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VA_CFLAGS = @VA_CFLAGS@
@@ -365,6 +375,7 @@ VDPAU_LIB_INSTALL_DIR = @VDPAU_LIB_INSTALL_DIR@
VDPAU_MAJOR = @VDPAU_MAJOR@
VDPAU_MINOR = @VDPAU_MINOR@
VERSION = @VERSION@
+VG_LIB_DEPS = @VG_LIB_DEPS@
VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@
VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@
VL_CFLAGS = @VL_CFLAGS@
@@ -393,10 +404,9 @@ XVMC_LIBS = @XVMC_LIBS@
XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@
XVMC_MAJOR = @XVMC_MAJOR@
XVMC_MINOR = @XVMC_MINOR@
+XXD = @XXD@
YACC = @YACC@
YFLAGS = @YFLAGS@
-ZLIB_CFLAGS = @ZLIB_CFLAGS@
-ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
diff --git a/lib/mesa/src/egl/wayland/wayland-egl/wayland-egl-priv.h b/lib/mesa/src/egl/wayland/wayland-egl/wayland-egl-priv.h
index 74a155202..c91f9cdf0 100644
--- a/lib/mesa/src/egl/wayland/wayland-egl/wayland-egl-priv.h
+++ b/lib/mesa/src/egl/wayland/wayland-egl/wayland-egl-priv.h
@@ -1,10 +1,6 @@
#ifndef _WAYLAND_EGL_PRIV_H
#define _WAYLAND_EGL_PRIV_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* GCC visibility */
#if defined(__GNUC__)
#define WL_EGL_EXPORT __attribute__ ((visibility("default")))
@@ -14,6 +10,10 @@ extern "C" {
#include <wayland-client.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct wl_egl_window {
struct wl_surface *surface;
@@ -27,6 +27,7 @@ struct wl_egl_window {
void *private;
void (*resize_callback)(struct wl_egl_window *, void *);
+ void (*destroy_window_callback)(void *);
};
#ifdef __cplusplus