Skip to content
Commits on Source (17)
......@@ -2,7 +2,7 @@ dnl configure.ac
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT([libglvnd], [1.0.0], [kbrenneman@nvidia.com])
AC_INIT([libglvnd], [1.1.0], [kbrenneman@nvidia.com])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
......@@ -83,7 +83,7 @@ if test "x$enable_asm" = xyes; then
;;
esac
;;
x86_64)
x86_64 | amd64)
case "$host_os" in
linux* | *freebsd* | dragonfly* | *netbsd*)
asm_arch=x86_64
......@@ -271,6 +271,9 @@ AS_IF([test "x$HAVE_SYNC_INTRINSICS" = "xyes"],
AC_CHECK_FUNC(mincore, [AC_DEFINE([HAVE_MINCORE], [1],
[Define to 1 if mincore is available.])])
AC_CHECK_FUNC(dlopen, [],
[AC_SUBST([LIB_DL], [-ldl])])
AC_MSG_CHECKING([for RTLD_NOLOAD])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <dlfcn.h>
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
/*
** Copyright (c) 2008-2017 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
* Skeleton egl.h to provide compatibility for early GLES 1.0
* applications. Several early implementations included gl.h
* in egl.h leading applications to include only egl.h
*
* $Revision: 6252 $ on $Date:: 2008-08-06 16:35:08 -0700 #$
*/
#ifndef __legacy_egl_h_
......
This diff is collapsed.
This diff is collapsed.
#ifndef __glplatform_h_
#define __glplatform_h_
/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
/*
* This document is licensed under the SGI Free Software B License Version
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
** Copyright (c) 2017 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* You are encouraged to submit all modifications to the Khronos group so that
* they can be included in future versions of this file. Please submit changes
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
* by filing a bug against product "OpenGL-ES" component "Registry".
* Please contribute modifications back to Khronos as pull requests on the
* public github repository:
* https://github.com/KhronosGroup/OpenGL-Registry
*/
#include <KHR/khrplatform.h>
......
......@@ -4,5 +4,22 @@ nobase_include_HEADERS = \
glvnd/libglxabi.h \
glvnd/libeglabi.h
noinst_HEADERS = .
noinst_HEADERS = \
c99_compat.h \
compiler.h \
glheader.h \
glvnd_list.h \
lkdhash.h \
EGL/egl.h \
EGL/eglext.h \
EGL/eglplatform.h \
GL/gl.h \
GL/glext.h \
GL/glx.h \
GL/glxext.h \
GLES/egl.h \
GLES/gl.h \
GLES/glext.h \
GLES/glplatform.h \
KHR/khrplatform.h
......@@ -34,7 +34,8 @@ noinst_HEADERS = egldispatchstubs.h \
libeglcurrent.h \
libeglmapping.h \
libeglvendor.h \
libeglerror.h
libeglerror.h \
g_egldispatchstubs.h
lib_LTLIBRARIES = libEGL.la
......@@ -56,7 +57,7 @@ libEGL_la_CFLAGS += \
libEGL_la_CFLAGS += $(PTHREAD_CFLAGS)
# Required libraries
libEGL_la_LIBADD = -ldl
libEGL_la_LIBADD = @LIB_DL@
libEGL_la_LIBADD += -lm
libEGL_la_LIBADD += $(GL_DISPATCH_DIR)/libGLdispatch.la
libEGL_la_LIBADD += $(UTIL_DIR)/libtrace.la
......
......@@ -12,28 +12,6 @@ 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;
......@@ -43,18 +21,6 @@ void __eglInitDispatchStubs(const __EGLapiExports *exportsTable)
}
}
void __eglSetDispatchIndex(const char *name, int dispatchIndex)
{
int index = FindProcIndex(name);
__EGL_DISPATCH_FUNC_INDICES[index] = dispatchIndex;
}
__eglMustCastToProperFunctionPointerType __eglDispatchFindDispatchFunction(const char *name)
{
int index = FindProcIndex(name);
return __EGL_DISPATCH_FUNCS[index];
}
static __eglMustCastToProperFunctionPointerType FetchVendorFunc(__EGLvendorInfo *vendor,
int index, EGLint errorCode)
{
......
......@@ -11,13 +11,6 @@ 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.
*/
__eglMustCastToProperFunctionPointerType __eglDispatchFindDispatchFunction(const char *name);
// Helper functions used by the generated stubs.
__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDisplay(EGLDisplay dpy, int index);
......
......@@ -142,8 +142,12 @@ static EGLBoolean _eglPointerIsDereferencable(void *p)
* [addr, addr + length) is not mapped into the process, so all that needs
* to be checked there is whether the mincore call succeeds or not, as it
* can only succeed on dereferenceable memory ranges.
*
* Also note that the third parameter might be char or unsigned char
* depending on what system we're building on. Since we don't actually need
* that result, just cast it to a void* so that it works either way.
*/
return (mincore((void *) addr, page_size, &unused) >= 0);
return (mincore((void *) addr, page_size, (void *) &unused) >= 0);
#else
return EGL_FALSE;
#endif
......
......@@ -31,24 +31,27 @@ TOP = $(top_srcdir)
MAPI = $(top_srcdir)/$(MAPI_PREFIX)
GLAPI = $(MAPI)/glapi
noinst_HEADERS = \
g_glapi_mapi_gl_tmp.h
include $(top_srcdir)/src/GLdispatch/vnd-glapi/entry_files.mk
libGL_la_SOURCES = \
libgl.c \
g_libglglxwrapper.c
BUILT_SOURCES = g_glapi_mapi_gl_tmp.h g_libglglxwrapper.c
BUILT_SOURCES = g_libglglxwrapper.c
CLEANFILES = $(BUILT_SOURCES)
include $(top_srcdir)/src/generate/glvnd_gen.mk
g_glapi_mapi_gl_tmp.h : $(glapi_gen_mapi_deps)
$(call glapi_gen_mapi, gl)
glapi_gen_glx_xml := \
$(top_srcdir)/src/generate/xml/glx.xml \
$(top_srcdir)/src/generate/xml/glx_other.xml
glapi_gen_libglglxstubs_script = $(top_srcdir)/src/generate/gen_libgl_glxstubs.py
glapi_gen_libglglxstubs_deps = \
$(glapi_gen_libglglxstubs_script) \
$(top_srcdir)/src/generate/genCommon.py \
$(glapi_gen_glx_xml)
g_libglglxwrapper.c : $(glapi_gen_libglglxstubs_deps)
$(call glapi_gen_libglglxstubs)
$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) \
$(glapi_gen_libglglxstubs_script) $(glapi_gen_glx_xml) > $@
libGL_la_CFLAGS = \
-I$(top_srcdir)/include
......@@ -59,12 +62,10 @@ AM_CPPFLAGS = \
-I$(TOP)/src/GLdispatch/vnd-glapi \
-I$(TOP)/src/GLX \
-I$(TOP)/src/GLdispatch \
-I$(TOP)/src/util \
-DMAPI_ABI_HEADER=\"$(builddir)/g_glapi_mapi_gl_tmp.h\" \
-DSTATIC_DISPATCH_ONLY
-I$(TOP)/src/util
libGL_la_LIBADD = ../GLX/libGLX.la
libGL_la_LIBADD += ../GLdispatch/libGLdispatch.la
libGL_la_LIBADD += ../GLdispatch/vnd-glapi/libglapi_gl.la
libGL_la_LIBADD += ../util/libutils_misc.la
libGL_la_LIBADD += -ldl
libGL_la_LIBADD += @LIB_DL@
......@@ -27,12 +27,9 @@
lib_LTLIBRARIES = libGLESv1_CM.la
EXTRA_libGLESv1_CM_la_DEPENDENCIES = $(builddir)/g_glesv1_exports.sym
libGLESv1_CM_la_SOURCES =
libGLESv1_CM_la_LDFLAGS = -shared \
$(LINKER_FLAG_NO_UNDEFINED) \
-export-symbols $(builddir)/g_glesv1_exports.sym \
-version-info 3:0:2
libGLESv1_CM_la_LIBADD = \
......@@ -41,10 +38,3 @@ libGLESv1_CM_la_LIBADD = \
../GLdispatch/vnd-glapi/libglapi_glesv1.la \
../util/libutils_misc.la
include $(top_srcdir)/src/generate/glvnd_gen.mk
BUILT_SOURCES = $(builddir)/g_glesv1_exports.sym
CLEANFILES = $(BUILT_SOURCES)
g_glesv1_exports.sym : $(glapi_gen_libopengl_exports_deps)
$(call glapi_gen_libopengl_exports, glesv1)
......@@ -27,12 +27,9 @@
lib_LTLIBRARIES = libGLESv2.la
EXTRA_libGLESv2_la_DEPENDENCIES = $(builddir)/g_glesv2_exports.sym
libGLESv2_la_SOURCES =
libGLESv2_la_LDFLAGS = -shared \
$(LINKER_FLAG_NO_UNDEFINED) \
-export-symbols $(builddir)/g_glesv2_exports.sym \
-version-info 3:0:1
libGLESv2_la_LIBADD = \
......@@ -41,10 +38,3 @@ libGLESv2_la_LIBADD = \
../GLdispatch/vnd-glapi/libglapi_glesv2.la \
../util/libutils_misc.la
include $(top_srcdir)/src/generate/glvnd_gen.mk
BUILT_SOURCES = $(builddir)/g_glesv2_exports.sym
CLEANFILES = $(BUILT_SOURCES)
g_glesv2_exports.sym : $(glapi_gen_libopengl_exports_deps)
$(call glapi_gen_libopengl_exports, glesv2)
......@@ -51,7 +51,7 @@ libGLX_la_CFLAGS += $(GLPROTO_CFLAGS)
libGLX_la_CFLAGS += $(PTHREAD_CFLAGS)
# Required libraries
libGLX_la_LIBADD = -ldl
libGLX_la_LIBADD = @LIB_DL@
libGLX_la_LIBADD += $(X11_LIBS)
libGLX_la_LIBADD += $(XEXT_LIBS)
libGLX_la_LIBADD += $(GL_DISPATCH_DIR)/libGLdispatch.la
......
The GLX winsys library will be implemented here
......@@ -39,9 +39,13 @@ libGLdispatch_la_CFLAGS += -I$(top_srcdir)/include
libGLdispatch_la_LDFLAGS = -shared -version-info 0 $(LINKER_FLAG_NO_UNDEFINED)
EXTRA_libGLdispatch_la_DEPENDENCIES = $(top_srcdir)/src/GLdispatch/export_list.sym
libGLdispatch_la_LDFLAGS += \
-export-symbols $(top_srcdir)/src/GLdispatch/export_list.sym
if GLDISPATCH_USE_TLS
VERSION_SCRIPT=$(top_srcdir)/src/GLdispatch/export_list_tls.ver
else
VERSION_SCRIPT=$(top_srcdir)/src/GLdispatch/export_list_tsd.ver
endif
EXTRA_libGLdispatch_la_DEPENDENCIES = $(VERSION_SCRIPT)
libGLdispatch_la_LDFLAGS += -Xlinker --version-script=$(VERSION_SCRIPT)
libGLdispatch_la_SOURCES = \
GLdispatch.c
......@@ -50,6 +54,6 @@ libGLdispatch_la_LIBADD = vnd-glapi/libglapi.la
libGLdispatch_la_LIBADD += ../util/libtrace.la
libGLdispatch_la_LIBADD += ../util/libglvnd_pthread.la
libGLdispatch_la_LIBADD += ../util/libapp_error_check.la
libGLdispatch_la_LIBADD += -ldl
libGLdispatch_la_LIBADD += @LIB_DL@
EXTRA_DIST = export_list.sym
EXTRA_DIST = export_list_tls.ver export_list_tsd.ver
_glapi_get_current
_glapi_Current
_glapi_tls_Current
__glDispatchCheckMultithreaded
__glDispatchCreateTable
__glDispatchDestroyTable
__glDispatchFini
__glDispatchGetABIVersion
__glDispatchGetCurrentThreadState
__glDispatchGetProcAddress
__glDispatchInit
__glDispatchLoseCurrent
__glDispatchMakeCurrent
__glDispatchNewVendorID
__glDispatchRegisterStubCallbacks
__glDispatchReset
__glDispatchUnregisterStubCallbacks
__glDispatchForceUnpatch
{
global:
_glapi_get_current;
_glapi_Current;
_glapi_tls_Current;
__glDispatchCheckMultithreaded;
__glDispatchCreateTable;
__glDispatchDestroyTable;
__glDispatchFini;
__glDispatchGetABIVersion;
__glDispatchGetCurrentThreadState;
__glDispatchGetProcAddress;
__glDispatchInit;
__glDispatchLoseCurrent;
__glDispatchMakeCurrent;
__glDispatchNewVendorID;
__glDispatchRegisterStubCallbacks;
__glDispatchReset;
__glDispatchUnregisterStubCallbacks;
__glDispatchForceUnpatch;
local: *;
};
{
global:
_glapi_get_current;
_glapi_Current;
__glDispatchCheckMultithreaded;
__glDispatchCreateTable;
__glDispatchDestroyTable;
__glDispatchFini;
__glDispatchGetABIVersion;
__glDispatchGetCurrentThreadState;
__glDispatchGetProcAddress;
__glDispatchInit;
__glDispatchLoseCurrent;
__glDispatchMakeCurrent;
__glDispatchNewVendorID;
__glDispatchRegisterStubCallbacks;
__glDispatchReset;
__glDispatchUnregisterStubCallbacks;
__glDispatchForceUnpatch;
local: *;
};