Commit Graph

11 Commits

Author SHA1 Message Date
Michel Dänzer
b0530fe422 glx: Remove unused bswap_CARD64
GCC warned about it:

../../../glx/indirect_dispatch_swap.c:85:1: warning: ‘bswap_CARD64’ defined but not used [-Wunused-function]
   85 | bswap_CARD64(const void *src)
      | ^~~~~~~~~~~~
2020-11-30 16:22:26 +00:00
Peter Hutterer
732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

happy reviewing...
git diff -w is an empty diff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Keith Packard
61a292adf4 glx: check return from __glXGetAnswerBuffer
This function can return NULL; make sure every caller tests for that.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-09 15:30:52 +02:00
Jon TURNEY
cb48877a3c glx: Consistently use ARB-suffixed names for ARB_multitexture functions
At the moment we have a mix of ARB and non-ARB suffixed forms for ARB_multitexture functions
e.g. glMultiTexCoord1fvARB and glMultiTexCoord1dv

Consistently use the ARB-suffixed form, assuming that is present in all libGL
which provide the OpenGL 1.2.1 ABI we expect to be able to directly link with.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-12-10 16:59:53 +00:00
Adam Jackson
c4567a3760 glx: Convert generated code function pointer thunking
We're meant not to call these by name due to ABI.  Rather than try to
generate a bunch of little stub functions that do the lookup, just
inline it all directly into the calling function.

This does not cache results.  That's fine, this is not a performance
path, and if we're atop WGL then we effectively have to do this every
time anyway because wglGetProcAddress results are context-dependent.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Jon TURNEY <jon.turney@dronecode.org.uk>
2013-12-10 08:01:37 -08:00
Adam Jackson
be6680967a glx: convert to direct GL dispatch (v2)
We now expect to be linked against something that provides the GL API,
instead of manually grubbing about in the DRI driver's dispatch table.
Since the GLX we expose calls GL functions that are meant to be looked
up dynamically, also add a way to thunk through to GetProcAddress.

This includes a refresh of the generated sources, which requires a
correspondingly new Mesa.

The GetProcAddress stubs are at the moment merely enough to make this
link against Mesa 9.2, but should really be provided for everything not
in the OpenGL 1.2 ABI.

v2: Explicitly hide the GetProcAddress stubs so we can't conflict with
libGL symbols; fix leading tab/space issues [anholt]

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29 12:29:16 -04:00
Keith Packard
9838b7032e Introduce a consistent coding style
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>
2012-03-21 13:54:42 -07:00
Ian Romanick
66e6037c33 glx: Regenerate GL API files from Mesa
Adam reviewed the underlying changes in the Mesa generated scripts.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-19 13:38:50 -08:00
Tomas Carnecky
dd3f4e8292 Fix "warning: cast to pointer from integer of different size"
Add parenthesis around the whole expression.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04 09:42:02 +10:00
Ian Romanick
f1c9b5ab23 GLX: Changes resulting from changes to Mesa generator scripts / data
Several recent Mesa commits (listed below) make modifications to the
protocol generator data and scripts.  This commit represents the
changes to the generated files resulting from the previous changes.

    - 0f73302d24f4201813da2939742c5bcb6964b3b1
      GLX: Fix protocol for glTexSubImage#D

    - 1709ab01ef24279c782e420568e9257b4b92b224
      Return 0 as the request size when the pixels parameter is NULL

    - 63cca2ba10ce7dcc8481cfa4be3872dfc269dded
      GLX: Include glapi.h before glapitable.h

This is the server-side part of the fix for bugzilla #11003.
2008-12-14 18:58:33 -08:00
Kristian Høgsberg
c3eb5b80d8 Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00