summaryrefslogtreecommitdiff
path: root/glx/glapi.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-21Introduce a consistent coding styleKeith Packard1-170/+162
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-12-19glx: use dispatch.h instead of glapioffsets.hIan Romanick1-2/+4
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-04-25glx: Silence warnings when building with clangJeremy Huddleston1-4/+2
This replaces AX_TLS (GPL3) with XORG_TLS (MIT) In file included from glapi.c:46: In file included from ./glapi.h:51: ./glthread.h:237:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] __attribute__((tls_model("initial-exec"))); ^ In file included from glapi.c:46: ./glapi.h:92:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] __attribute__((tls_model("initial-exec"))); ^ glapi.c:82:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] __attribute__((tls_model("initial-exec"))) = NULL; ^ glapi.c:85:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] __attribute__((tls_model("initial-exec"))); ^ 4 errors generated. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jamey Sharp <jamey@minilop.net> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-03-28glx: Fix _glapi_add_dispatchAdam Jackson1-200/+20
We never need to generate stubs, because those conditions can't happen in the server. Yank that code out, but keep the bookkeeping for which extension functions are registered so the DRI driver doesn't get confused. As a pleasant bonus, we're now friendlier for environments like selinux that make runtime code generation difficult, and we're portable to more arches since we don't have to port the assembly stubs. Fixes the following clutter conformance tests (indirect rendering, llvmpipe driver): test-cogl-backface-culling test-cogl-materials test-cogl-readpixels test-cogl-texture-mipmaps test-cogl-texture-get-set-data test-cogl-viewport test-cogl-offscreen Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-28glx: Flatten -DXFree86ServerAdam Jackson1-43/+0
Always defined by the makefile, so, just get rid of it. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-28glx: Update some glapi commentsAdam Jackson1-32/+6
Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-28glx: Lobotomize _glapi_get_proc_addressAdam Jackson1-34/+7
This isn't a meaningful thing in the indirect glx loader, so just warn if it ever happens and move on. But also, mark it PUBLIC, so if the driver does ever call it we merely warn instead of aborting because ld.so can't find the symbol. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-28glx: Remove noop dispatch tableAdam Jackson1-90/+2
We can never hit this, because the indirect GLX dispatch code always forces a current context and checks that it's non-NULL before calling into the dispatch table. If it's _not_ null, then _glapi_set_context will call into the driver, which is responsible for calling _glapi_set_dispatch to make sure the dispatch table is non-NULL. Also remove _glapi_set_warning_func and friends, since we can no longer call them even from dead code. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-23GLX: Support TLS with better portabilityJeremy Huddleston1-2/+2
AX_TLS detects when toolchains support __thread or __declspec(thread), but existing code assumed __thread. This also adds a check to configure.ac to error out if TLS is requested but unsupported. Found-by: Tinderbox http://tinderbox.x.org/builds/2011-03-22-0007 Regression-from: 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Tom Fogal <tfogal@alumni.unh.edu> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-03-08glx: Remove unused _glapi_get_proc_nameAdam Jackson1-49/+0
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-08glx: Simplify _glapi_check_multithreadAdam Jackson1-45/+4
We can guarantee that the X server does not call DRI driver services from multiple threads, so _glapi_check_multithread need never do anything special. As a result, ThreadSafe is always false, so remove it and simplify expressions where it appeared to match. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-08glx: Remove unused _glapi_get_proc_offset and friendsAdam Jackson1-107/+0
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-10-28Suppress certain GCC warnings in auto-generated code.Jamey Sharp1-1/+6
- Don't warn for references to deprecated functions in xorg_symbols. - Ignore functions generated by gl_apitemp.py that are never used. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2008-12-17Ensure symbols required by swrast_dri.so are visible.Paulo Cesar Pereira de Andrade1-1/+1
2008-12-02Fix GLX after 180bad84774493d48f2793a6281d825560944863.Eric Anholt1-1/+2
Sigh.
2008-06-05gl: include assert.h if we're compiling with DEBUG.Paulo Cesar Pereira de Andrade1-0/+3
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-21Move GL/glx on level up now that it's the only thing left under GL.Kristian Høgsberg1-0/+1064