Compare commits
172 Commits
mesa_20050
...
mesa_6_3_1
Author | SHA1 | Date | |
---|---|---|---|
|
14fa5f6a60 | ||
|
1585c234e0 | ||
|
9f23a3a1bf | ||
|
3e36986e5a | ||
|
67d94e5a86 | ||
|
a7df74ea02 | ||
|
36d6e9df16 | ||
|
ab7c6ffadc | ||
|
1361398600 | ||
|
5c6fd3dd4c | ||
|
a08d8a095c | ||
|
5f1ba3e21b | ||
|
1201348a33 | ||
|
800c72ae61 | ||
|
7c1ab40898 | ||
|
8dcc6736ab | ||
|
e9dbe58b8b | ||
|
c39bf5e273 | ||
|
7d40d230fa | ||
|
3e2419a7cc | ||
|
70cf1f0cf8 | ||
|
60a6a0eb51 | ||
|
fea5a428e9 | ||
|
61e694f270 | ||
|
db251d72c8 | ||
|
7a37189adc | ||
|
f87bb14b0b | ||
|
dff11bb9a8 | ||
|
98b06bcbeb | ||
|
7b5c506c0e | ||
|
7cf480e6fe | ||
|
951dbf08e7 | ||
|
49e74989c3 | ||
|
3e8efc3753 | ||
|
aeb0ee771b | ||
|
6ae76788a7 | ||
|
e98494d0a4 | ||
|
18014525a1 | ||
|
2276679c53 | ||
|
d4596584f6 | ||
|
6bb49eacfd | ||
|
bfb5ea307e | ||
|
364ae78e69 | ||
|
8d7d9c22f6 | ||
|
2d47c07398 | ||
|
7e152b83cb | ||
|
ed886336e1 | ||
|
5343ae8304 | ||
|
df88dfe1df | ||
|
c235a96a71 | ||
|
aa8ff1e75d | ||
|
9bdfee3a47 | ||
|
e0e993c5ff | ||
|
c529f6bf70 | ||
|
8d3aca655e | ||
|
1f88391747 | ||
|
d39760d718 | ||
|
df0350b7ec | ||
|
b0489d4f82 | ||
|
8ec981c469 | ||
|
4eb3a0f076 | ||
|
4c72778251 | ||
|
badad72383 | ||
|
c62c24c72f | ||
|
b127cfeb7a | ||
|
3f7cb794ea | ||
|
c472dcdac0 | ||
|
ce721143b4 | ||
|
9311bc253e | ||
|
0cfbd849ec | ||
|
6d5d1f8a41 | ||
|
38e2fa385d | ||
|
2550844c6e | ||
|
259f096ed8 | ||
|
f3186e5789 | ||
|
4cf6718725 | ||
|
78be0b5dad | ||
|
f0ff50d4ed | ||
|
1a9cac10b8 | ||
|
9204e87b2e | ||
|
4f178c6e3a | ||
|
ef2ce9d003 | ||
|
c1c684b0f3 | ||
|
666dcaaf05 | ||
|
7b12220256 | ||
|
5f79d27b82 | ||
|
c136b41b09 | ||
|
ee850657e6 | ||
|
0cf67634bb | ||
|
101d05ad94 | ||
|
c5b6580c6f | ||
|
35a11c14ee | ||
|
ec171b7d02 | ||
|
2de5f6e252 | ||
|
b64d60a2a6 | ||
|
eac7688231 | ||
|
219f3c4489 | ||
|
06abb854f0 | ||
|
7fe8696d01 | ||
|
9b56781986 | ||
|
758f334717 | ||
|
8e8fa63cb4 | ||
|
559c494fc8 | ||
|
03f52fea63 | ||
|
6d3284efd4 | ||
|
58a9573b08 | ||
|
0d34c0158d | ||
|
f4f1c29597 | ||
|
bb5c84fcbc | ||
|
446e258940 | ||
|
54fb9226e4 | ||
|
30aea49cf6 | ||
|
cf5b2f7419 | ||
|
c212abf99a | ||
|
1ac8ae446a | ||
|
aa70253cbb | ||
|
049e320f46 | ||
|
f138b977d0 | ||
|
4d652b7855 | ||
|
b0d62880e8 | ||
|
0e55891674 | ||
|
ccda2162f6 | ||
|
b6c0d753fa | ||
|
ec17e7941a | ||
|
b6c5116171 | ||
|
84f8d7aafb | ||
|
39a488ed63 | ||
|
2dbffb30f0 | ||
|
397088ff5e | ||
|
c43f03e38d | ||
|
3f9839a52b | ||
|
a4eb693b5f | ||
|
32b898126e | ||
|
3b817fde88 | ||
|
845f2a7350 | ||
|
f8582b6c1f | ||
|
394fd40a53 | ||
|
4e1aae6e0e | ||
|
5aafea03af | ||
|
3fb86eefe8 | ||
|
1c5caba184 | ||
|
2636e853f6 | ||
|
814e5360b0 | ||
|
66a5548fbb | ||
|
f292e13a20 | ||
|
1e4744d2b9 | ||
|
ebd99043ed | ||
|
a5fb15cb87 | ||
|
04f863e856 | ||
|
23606a5704 | ||
|
90b40c33e7 | ||
|
dc137ddb3f | ||
|
a6a3e01b09 | ||
|
4378dee78c | ||
|
38332a6d94 | ||
|
4e7df27466 | ||
|
3c6f17be32 | ||
|
af02907b4c | ||
|
463c1d6c57 | ||
|
0e288e58ef | ||
|
3176f8e2e1 | ||
|
6c2098ffd4 | ||
|
f445aaa67a | ||
|
aa26915472 | ||
|
fb818a0b11 | ||
|
6b9d9c5039 | ||
|
2d218885ec | ||
|
902e70875d | ||
|
b675c48027 | ||
|
4476978856 | ||
|
252d8e78cc | ||
|
5d6ecf25f8 |
183
Makefile
183
Makefile
@@ -133,11 +133,11 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
DIRECTORY = Mesa-6.3
|
||||
LIB_NAME = MesaLib-6.3
|
||||
DEMO_NAME = MesaDemos-6.3
|
||||
DIRECTORY = Mesa-6.3.1
|
||||
LIB_NAME = MesaLib-6.3.1
|
||||
DEMO_NAME = MesaDemos-6.3.1
|
||||
|
||||
LIB_FILES = \
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
$(DIRECTORY)/descrip.mms \
|
||||
$(DIRECTORY)/mms-config. \
|
||||
@@ -173,6 +173,7 @@ LIB_FILES = \
|
||||
$(DIRECTORY)/include/GL/xmesa.h \
|
||||
$(DIRECTORY)/include/GL/xmesa_x.h \
|
||||
$(DIRECTORY)/include/GL/xmesa_xf86.h \
|
||||
$(DIRECTORY)/include/GLView.h \
|
||||
$(DIRECTORY)/src/Makefile \
|
||||
$(DIRECTORY)/src/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/Makefile* \
|
||||
@@ -213,7 +214,6 @@ LIB_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
|
||||
$(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/glide/*.def \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
|
||||
@@ -230,10 +230,50 @@ LIB_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/x86/Makefile \
|
||||
$(DIRECTORY)/src/mesa/x86/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/x86/*.S \
|
||||
$(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/x86-64/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/x86-64/Makefile \
|
||||
$(DIRECTORY)/progs/Makefile \
|
||||
$(DIRECTORY)/progs/util/README \
|
||||
$(DIRECTORY)/progs/util/*.[ch] \
|
||||
$(DIRECTORY)/progs/util/sampleMakefile \
|
||||
$(DIRECTORY)/vms/analyze_map.com \
|
||||
$(DIRECTORY)/vms/xlib.opt \
|
||||
$(DIRECTORY)/vms/xlib_share.opt \
|
||||
$(DIRECTORY)/windows/VC6/mesa/gdi/gdi.dsp \
|
||||
$(DIRECTORY)/windows/VC6/mesa/glu/*.txt \
|
||||
$(DIRECTORY)/windows/VC6/mesa/glu/glu.dsp \
|
||||
$(DIRECTORY)/windows/VC6/mesa/mesa.dsw \
|
||||
$(DIRECTORY)/windows/VC6/mesa/mesa/mesa.dsp \
|
||||
$(DIRECTORY)/windows/VC6/mesa/osmesa/osmesa.dsp \
|
||||
$(DIRECTORY)/windows/VC7/mesa/gdi/gdi.vcproj \
|
||||
$(DIRECTORY)/windows/VC7/mesa/glu/glu.vcproj \
|
||||
$(DIRECTORY)/windows/VC7/mesa/mesa.sln \
|
||||
$(DIRECTORY)/windows/VC7/mesa/mesa/mesa.vcproj \
|
||||
$(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj
|
||||
|
||||
DRI_FILES = \
|
||||
$(DIRECTORY)/include/GL/internal/*.h \
|
||||
$(DIRECTORY)/src/glx/Makefile \
|
||||
$(DIRECTORY)/src/glx/x11/Makefile \
|
||||
$(DIRECTORY)/src/glx/x11/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
|
||||
|
||||
SGI_GLU_FILES = \
|
||||
$(DIRECTORY)/src/glu/Makefile \
|
||||
$(DIRECTORY)/src/glu/descrip.mms \
|
||||
$(DIRECTORY)/src/glu/sgi/Makefile \
|
||||
@@ -253,53 +293,24 @@ LIB_FILES = \
|
||||
$(DIRECTORY)/src/glu/sgi/libtess/README \
|
||||
$(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
|
||||
$(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
|
||||
$(DIRECTORY)/src/glu/sgi/libutil/*.[ch] \
|
||||
$(DIRECTORY)/src/glu/mesa/README[12] \
|
||||
$(DIRECTORY)/src/glu/mesa/Makefile* \
|
||||
$(DIRECTORY)/src/glu/mesa/descrip.mms \
|
||||
$(DIRECTORY)/src/glu/mesa/mms_depend \
|
||||
$(DIRECTORY)/src/glu/mesa/*.def \
|
||||
$(DIRECTORY)/src/glu/mesa/depend \
|
||||
$(DIRECTORY)/src/glu/mesa/*.[ch] \
|
||||
$(DIRECTORY)/src/glw/*.[ch] \
|
||||
$(DIRECTORY)/src/glw/Makefile* \
|
||||
$(DIRECTORY)/src/glw/README \
|
||||
$(DIRECTORY)/src/glw/depend \
|
||||
$(DIRECTORY)/progs/Makefile \
|
||||
$(DIRECTORY)/progs/util/README \
|
||||
$(DIRECTORY)/progs/util/*.[ch] \
|
||||
$(DIRECTORY)/progs/util/sampleMakefile \
|
||||
$(DIRECTORY)/vms/analyze_map.com \
|
||||
$(DIRECTORY)/vms/xlib.opt \
|
||||
$(DIRECTORY)/vms/xlib_share.opt \
|
||||
$(DIRECTORY)/windows/VC?/mesa/gdi/gdi.dsp \
|
||||
$(DIRECTORY)/windows/VC?/mesa/glu/*.txt \
|
||||
$(DIRECTORY)/windows/VC?/mesa/glu/glu.dsp \
|
||||
$(DIRECTORY)/windows/VC?/mesa/mesa.dsw \
|
||||
$(DIRECTORY)/windows/VC?/mesa/mesa/mesa.dsp \
|
||||
$(DIRECTORY)/windows/VC?/mesa/osmesa/osmesa.dsp
|
||||
$(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
|
||||
|
||||
MESA_GLU_FILES = \
|
||||
$(DIRECTORY)/src/glu/mesa/README[12] \
|
||||
$(DIRECTORY)/src/glu/mesa/Makefile* \
|
||||
$(DIRECTORY)/src/glu/mesa/descrip.mms \
|
||||
$(DIRECTORY)/src/glu/mesa/mms_depend \
|
||||
$(DIRECTORY)/src/glu/mesa/*.def \
|
||||
$(DIRECTORY)/src/glu/mesa/depend \
|
||||
$(DIRECTORY)/src/glu/mesa/*.[ch]
|
||||
|
||||
GLUT_FILES = \
|
||||
$(DIRECTORY)/include/GL/glut.h \
|
||||
$(DIRECTORY)/include/GL/glutf90.h \
|
||||
$(DIRECTORY)/src/glut/glx/Makefile* \
|
||||
$(DIRECTORY)/src/glut/glx/depend \
|
||||
$(DIRECTORY)/src/glut/glx/*def \
|
||||
$(DIRECTORY)/src/glut/glx/descrip.mms \
|
||||
$(DIRECTORY)/src/glut/glx/mms_depend \
|
||||
$(DIRECTORY)/src/glut/glx/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/beos/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/beos/*.cpp \
|
||||
$(DIRECTORY)/src/glut/beos/Makefile \
|
||||
$(DIRECTORY)/src/glut/dos/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/dos/Makefile.DJ \
|
||||
$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
|
||||
$(DIRECTORY)/src/glut/ggi/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/ggi/Makefile
|
||||
GLW_FILES = \
|
||||
$(DIRECTORY)/src/glw/*.[ch] \
|
||||
$(DIRECTORY)/src/glw/Makefile* \
|
||||
$(DIRECTORY)/src/glw/README \
|
||||
$(DIRECTORY)/src/glw/depend
|
||||
|
||||
|
||||
DEMO_FILES = \
|
||||
PROG_FILES = \
|
||||
$(DIRECTORY)/progs/beos/*.cpp \
|
||||
$(DIRECTORY)/progs/beos/Makefile \
|
||||
$(DIRECTORY)/progs/images/*.rgb \
|
||||
@@ -323,68 +334,90 @@ DEMO_FILES = \
|
||||
$(DIRECTORY)/progs/windml/*.c \
|
||||
$(DIRECTORY)/progs/windml/*.bmp \
|
||||
$(DIRECTORY)/progs/ggi/*.c \
|
||||
$(DIRECTORY)/windows/VC?/progs/demos/*.dsp \
|
||||
$(DIRECTORY)/windows/VC?/progs/glut/glut.dsp \
|
||||
$(DIRECTORY)/windows/VC?/progs/progs.dsw
|
||||
$(DIRECTORY)/windows/VC6/progs/demos/*.dsp \
|
||||
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
|
||||
$(DIRECTORY)/windows/VC6/progs/progs.dsw \
|
||||
$(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \
|
||||
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj \
|
||||
$(DIRECTORY)/windows/VC7/progs/progs.sln
|
||||
|
||||
GLUT_FILES = \
|
||||
$(DIRECTORY)/include/GL/glut.h \
|
||||
$(DIRECTORY)/include/GL/glutf90.h \
|
||||
$(DIRECTORY)/src/glut/glx/Makefile* \
|
||||
$(DIRECTORY)/src/glut/glx/depend \
|
||||
$(DIRECTORY)/src/glut/glx/*def \
|
||||
$(DIRECTORY)/src/glut/glx/descrip.mms \
|
||||
$(DIRECTORY)/src/glut/glx/mms_depend \
|
||||
$(DIRECTORY)/src/glut/glx/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/beos/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/beos/*.cpp \
|
||||
$(DIRECTORY)/src/glut/beos/Makefile \
|
||||
$(DIRECTORY)/src/glut/dos/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/dos/Makefile.DJ \
|
||||
$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
|
||||
$(DIRECTORY)/src/glut/ggi/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/ggi/Makefile
|
||||
|
||||
DEPEND_FILES = \
|
||||
$(TOP)/src/mesa/depend \
|
||||
$(TOP)/src/glw/depend \
|
||||
$(TOP)/src/glut/glx/depend \
|
||||
$(TOP)/src/glu/sgi/depend
|
||||
|
||||
|
||||
DRI_FILES = \
|
||||
$(DIRECTORY)/src/glx/Makefile \
|
||||
$(DIRECTORY)/src/glx/mini/*.[ch] \
|
||||
$(DIRECTORY)/src/glx/mini/example.miniglx.conf \
|
||||
$(DIRECTORY)/src/glx/mini/NOTES \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/depend \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
|
||||
LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES)
|
||||
|
||||
DEMO_FILES = $(PROG_FILES) $(GLUT_FILES)
|
||||
|
||||
|
||||
# Everything for new a Mesa release:
|
||||
tarballs: lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
|
||||
tarballs: rm_depend lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
|
||||
|
||||
|
||||
rm_depend:
|
||||
@for dep in $(DEPEND_FILES) ; do \
|
||||
rm -f $$dep ; \
|
||||
touch $$dep ; \
|
||||
done
|
||||
|
||||
lib_gz:
|
||||
rm -f configs/current ; \
|
||||
cd .. ; \
|
||||
tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
gzip $(LIB_NAME).tar ; \
|
||||
mv $(LIB_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
demo_gz:
|
||||
cd .. ; \
|
||||
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) $(GLUT_FILES) ; \
|
||||
tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
|
||||
gzip $(DEMO_NAME).tar ; \
|
||||
mv $(DEMO_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
lib_bz2:
|
||||
rm -f configs/current ; \
|
||||
cd .. ; \
|
||||
tar -cvf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
bzip2 $(LIB_NAME).tar ; \
|
||||
mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
demo_bz2:
|
||||
cd .. ; \
|
||||
tar -cvf $(DEMO_NAME).tar $(DEMO_FILES) $(GLUT_FILES) ; \
|
||||
tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
|
||||
bzip2 $(DEMO_NAME).tar ; \
|
||||
mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
lib_zip:
|
||||
rm -f configs/current ; \
|
||||
-rm $(LIB_NAME).zip ; \
|
||||
rm -f $(LIB_NAME).zip ; \
|
||||
cd .. ; \
|
||||
zip -r $(LIB_NAME).zip $(LIB_FILES) ; \
|
||||
zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
|
||||
mv $(LIB_NAME).zip $(DIRECTORY)
|
||||
|
||||
demo_zip:
|
||||
-rm $(DEMO_NAME).zip ; \
|
||||
rm -f $(DEMO_NAME).zip ; \
|
||||
cd .. ; \
|
||||
zip -r $(DEMO_NAME).zip $(DEMO_FILES) $(GLUT_FILES) ; \
|
||||
zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
|
||||
mv $(DEMO_NAME).zip $(DIRECTORY)
|
||||
|
||||
md5:
|
||||
|
242
bin/mklib
242
bin/mklib
@@ -1,38 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Make a shared library.
|
||||
# Basically do a switch/case depending on the OS and make a shared (or static)
|
||||
# library conforming to that OS.
|
||||
# This script should be useful for projects other than Mesa.
|
||||
# Improvements/fixes are welcome.
|
||||
|
||||
|
||||
# Usage:
|
||||
# mklib [options] objects ...
|
||||
# Options:
|
||||
# -o LIBRARY specifies the name of resulting library
|
||||
# ("-o GL" for example, might result in "libGL.so" being made)
|
||||
# -major N specifies major version number (default is 1)
|
||||
# -minor N specifies minor version number (default is 0)
|
||||
# -patch N specifies patch version number (default is 0)
|
||||
# -lLIBRARY specifies a dependency on LIBRARY
|
||||
# -LDIR search in DIR for library dependencies
|
||||
# -cplusplus link with C++ runtime
|
||||
# -static make a static library (default is dynamic/shared)
|
||||
# -install DIR move resulting library file(s) to DIR
|
||||
# -arch ARCH override using `uname` to determine architecture
|
||||
# -archopt OPT specify an extra achitecture-specific option OPT
|
||||
# -noprefix don't prefix library name with "lib" or any suffix
|
||||
# -exports FILE only export the symbols listed in FILE
|
||||
# Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
#
|
||||
# The library name should just be "GL" or "GLU", etc. The 'lib' prefix
|
||||
# will be added here if needed, as well as the ".so" or ".a" suffix,
|
||||
# etc (unless the -noprefix option is used).
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# 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:
|
||||
#
|
||||
# objects should be: foo.o bar.o etc.o
|
||||
#
|
||||
# Environment variables recognized:
|
||||
# CC C compiler command
|
||||
# CXX C++ compiler command
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# BRIAN PAUL 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.
|
||||
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo 'Usage: mklib [options] objects'
|
||||
echo 'Create a shared library from object files.'
|
||||
echo ' -o LIBRARY specifies the name of the resulting library, without'
|
||||
echo ' the leading "lib" or any suffix.'
|
||||
echo ' (eg: "-o GL" might result in "libGL.so" being made)'
|
||||
echo ' -major N specifies major version number (default is 1)'
|
||||
echo ' -minor N specifies minor version number (default is 0)'
|
||||
echo ' -patch N specifies patch version number (default is 0)'
|
||||
echo ' -lLIBRARY specifies a dependency on LIBRARY'
|
||||
echo ' -LDIR search in DIR for library dependencies'
|
||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||
echo ' Not observed on all systems at this time.'
|
||||
echo ' -cplusplus link with C++ runtime'
|
||||
echo ' -static make a static library (default is dynamic/shared)'
|
||||
echo ' -install DIR put resulting library file(s) in DIR'
|
||||
echo ' -arch ARCH override using `uname` to determine host system'
|
||||
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -h, --help display this information and exit'
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
@@ -43,6 +58,7 @@ MAJOR=1
|
||||
MINOR=0
|
||||
PATCH=""
|
||||
DEPS=""
|
||||
LINK=""
|
||||
CPLUSPLUS=0
|
||||
STATIC=0
|
||||
INSTALLDIR="."
|
||||
@@ -58,26 +74,74 @@ EXPORTS=""
|
||||
while true
|
||||
do
|
||||
case $1 in
|
||||
'-o') shift 1; LIBNAME=$1;;
|
||||
'-major') shift 1; MAJOR=$1;;
|
||||
'-minor') shift 1; MINOR=$1;;
|
||||
'-patch') shift 1; PATCH=$1;;
|
||||
-l*) DEPS="$DEPS $1";;
|
||||
-L*) DEPS="$DEPS $1";;
|
||||
'-cplusplus') CPLUSPLUS=1;;
|
||||
'-static') STATIC=1;;
|
||||
'-install') shift 1; INSTALLDIR=$1;;
|
||||
'-arch') shift 1; ARCH=$1;;
|
||||
'-archopt') shift 1; ARCHOPT=$1;;
|
||||
'-noprefix') NOPREFIX=1;;
|
||||
'-exports') shift 1; EXPORTS=$1;;
|
||||
-*) echo "mklib: Unknown option: " $1 ; exit 1;;
|
||||
*) break
|
||||
'-h' | '--help')
|
||||
usage;
|
||||
exit 1
|
||||
;;
|
||||
'-o')
|
||||
shift 1;
|
||||
LIBNAME=$1
|
||||
;;
|
||||
'-major')
|
||||
shift 1;
|
||||
MAJOR=$1
|
||||
;;
|
||||
'-minor')
|
||||
shift 1;
|
||||
MINOR=$1
|
||||
;;
|
||||
'-patch')
|
||||
shift 1;
|
||||
PATCH=$1
|
||||
;;
|
||||
'-linker')
|
||||
shift 1;
|
||||
LINK=$1
|
||||
;;
|
||||
-l*)
|
||||
DEPS="$DEPS $1"
|
||||
;;
|
||||
-L*)
|
||||
DEPS="$DEPS $1"
|
||||
;;
|
||||
'-cplusplus')
|
||||
CPLUSPLUS=1
|
||||
;;
|
||||
'-static')
|
||||
STATIC=1
|
||||
;;
|
||||
'-install')
|
||||
shift 1;
|
||||
INSTALLDIR=$1
|
||||
;;
|
||||
'-arch')
|
||||
shift 1;
|
||||
ARCH=$1
|
||||
;;
|
||||
'-archopt')
|
||||
shift 1;
|
||||
ARCHOPT=$1
|
||||
;;
|
||||
'-noprefix')
|
||||
NOPREFIX=1
|
||||
;;
|
||||
'-exports')
|
||||
shift 1;
|
||||
EXPORTS=$1
|
||||
;;
|
||||
-*)
|
||||
echo "mklib: Unknown option: " $1 ;
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
# This should be the first object file, stop parsing
|
||||
break
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
OBJECTS=$@
|
||||
|
||||
|
||||
if [ ${ARCH} = "auto" ] ; then
|
||||
ARCH=`uname`
|
||||
fi
|
||||
@@ -120,12 +184,13 @@ case $ARCH in
|
||||
'Linux' | 'OpenBSD')
|
||||
# we assume gcc
|
||||
|
||||
# Set default compilers if env vars not set
|
||||
if [ "x$CXX" = "x" ] ; then
|
||||
CXX=g++
|
||||
fi
|
||||
if [ "x$CC" = "x" ] ; then
|
||||
CC=gcc
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
# -linker was not specified so set default link command now
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK=g++
|
||||
else
|
||||
LINK=gcc
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $NOPREFIX = 1 ] ; then
|
||||
@@ -133,13 +198,7 @@ case $ARCH in
|
||||
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}
|
||||
#OPTS="-shared -Wl,-soname,${LIBNAME}" # soname???
|
||||
OPTS="-shared"
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK=$CXX
|
||||
else
|
||||
LINK=$CC
|
||||
fi
|
||||
rm -f ${LIBNAME}
|
||||
|
||||
# make lib
|
||||
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
# finish up
|
||||
@@ -190,12 +249,6 @@ case $ARCH in
|
||||
|
||||
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.${VERSION}
|
||||
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK=$CXX
|
||||
else
|
||||
LINK=$CC
|
||||
fi
|
||||
|
||||
# rm any old libs
|
||||
rm -f ${LIBNAME}.so.${VERSION}
|
||||
rm -f ${LIBNAME}.so.${MAJOR}
|
||||
@@ -224,41 +277,25 @@ case $ARCH in
|
||||
echo "mklib: Making SunOS shared library: " ${LIBNAME}
|
||||
# XXX OPTS for gcc should be -shared, but that doesn't work.
|
||||
# Using -G does work though.
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
# determine linker and options for C++ code
|
||||
if [ "x${CXX}" = "xg++" ] ; then
|
||||
# use g++
|
||||
LINK="g++"
|
||||
OPTS="-G"
|
||||
elif [ "x${CXX}" = "xCC" ] ; then
|
||||
# use Sun CC
|
||||
LINK="CC"
|
||||
OPTS="-G"
|
||||
elif [ "x${CXX}" = "xc++" ] ; then
|
||||
# use Sun c++
|
||||
LINK="c++"
|
||||
OPTS="-G"
|
||||
elif [ `which c++` ] ; then
|
||||
# use Sun c++
|
||||
LINK="c++"
|
||||
OPTS="-G"
|
||||
elif [ `type g++` ] ; then
|
||||
# use g++
|
||||
LINK="g++"
|
||||
OPTS="-G"
|
||||
OPTS="-G"
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
# -linker was not specified, choose default linker now
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
# determine linker and options for C++ code
|
||||
if [ `which c++` ] ; then
|
||||
# use Sun c++
|
||||
LINK="c++"
|
||||
elif [ `type g++` ] ; then
|
||||
# use g++
|
||||
LINK="g++"
|
||||
else
|
||||
echo "mklib: warning: can't find C++ comiler, trying CC."
|
||||
LINK="CC"
|
||||
fi
|
||||
else
|
||||
echo "mklib: warning: can't find C++ comiler, trying CC."
|
||||
LINK="CC"
|
||||
OPTS="-G"
|
||||
# use native Sun linker for C code
|
||||
LINK="ld"
|
||||
fi
|
||||
elif [ "x${CC}" = "xgcc" ] ; then
|
||||
# use gcc for linking
|
||||
LINK="gcc"
|
||||
OPTS="-G"
|
||||
else
|
||||
# use native Sun linker
|
||||
LINK="ld"
|
||||
OPTS="-G"
|
||||
fi
|
||||
echo "mklib: linker is" ${LINK} ${OPTS}
|
||||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
@@ -317,6 +354,8 @@ case $ARCH in
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||
# XXX we should run 'file' on the first object file to determine
|
||||
# if it's o32, n32 or 64 format, as we do for Linux above.
|
||||
if [ $ARCHOPT = "64" ] ; then
|
||||
# 64-bit ABI
|
||||
OPTS="-64 -shared -all"
|
||||
@@ -425,10 +464,12 @@ case $ARCH in
|
||||
VERSION="${MAJOR}.${MINOR}"
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
echo "mklib: Making OSF/1 shared library: " ${LIBNAME}
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK=$CXX
|
||||
else
|
||||
LINK=$CC
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK=cxx
|
||||
else
|
||||
LINK=cc
|
||||
fi
|
||||
fi
|
||||
rm -f ${LIBNAME}.${VERSION}
|
||||
${LINK} -o ${LIBNAME}.${VERSION} -shared -set_version ${VERSION} -soname ${LIBNAME}.${VERSION} -expect_unresolved \* -all ${OBJECTS} ${DEPS}
|
||||
@@ -446,7 +487,7 @@ case $ARCH in
|
||||
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
LIBNAME="${LIBNAME}.dylib"
|
||||
LIBNAME="lib${LIBNAME}.dylib"
|
||||
echo "mklib: Making Darwin shared library: " ${LIBNAME}
|
||||
FLAGS="-dynamiclib -multiply_defined suppress"
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
@@ -477,6 +518,7 @@ case $ARCH in
|
||||
echo "mklib: Making BeOS shared library: " ${LIBNAME}
|
||||
gcc -nostart -Xlinker "-soname=${LIBNAME}" -L/Be/develop/lib/x86 -lbe ${DEPS} ${OBJECTS} -o "${LIBNAME}"
|
||||
mimeset -f "${LIBNAME}"
|
||||
# XXX remove the Mesa3D stuff here since mklib isn't mesa-specific.
|
||||
setversion "${LIBNAME}" -app ${MAJOR} ${MINOR} ${PATCH} -short "Powered by Mesa3D!" -long "Powered by Mesa3D!"
|
||||
fi
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
@@ -498,6 +540,8 @@ case $ARCH in
|
||||
|
||||
'icc')
|
||||
# Intel C compiler
|
||||
# This should get merged into the Linux code, above, since this isn't
|
||||
# really a different architecture.
|
||||
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
||||
|
||||
if [ $STATIC = 1 ] ; then
|
||||
@@ -615,7 +659,7 @@ case $ARCH in
|
||||
ar rv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib"
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||
echo "mklib: Making shared library for example arch: " ${LIBNAME}
|
||||
ld -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
|
@@ -18,8 +18,12 @@ GLW_LIB_NAME = libGLw.dylib
|
||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = $(TOP)/lib/GL.dylib
|
||||
GLU_LIB_DEPS = $(TOP)/lib/GL.dylib
|
||||
GLUT_LIB_DEPS =
|
||||
OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
|
||||
GLU_LIB_DEPS = -L$(LIB_DIR) -lGL
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
|
||||
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
|
||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = mesa glu glut/glx
|
||||
|
||||
|
@@ -8,7 +8,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=6
|
||||
MESA_MINOR=3
|
||||
MESA_TINY=0
|
||||
MESA_TINY=1
|
||||
|
||||
# external projects
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
@@ -26,6 +26,10 @@ MKDEP = makedepend
|
||||
MKDEP_OPTIONS = -fdepend
|
||||
MAKE = make
|
||||
|
||||
# Python and flags (generally only needed by the developers)
|
||||
PYTHON2 = python
|
||||
PYTHON_FLAGS = -t -O -O
|
||||
|
||||
# Library names (base name)
|
||||
GL_LIB = GL
|
||||
GLU_LIB = GLU
|
||||
@@ -61,9 +65,10 @@ PROGRAM_DIRS = demos redbook samples xdemos
|
||||
|
||||
|
||||
# Library/program dependencies
|
||||
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
|
||||
EXTRA_LIB_PATH ?=
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
|
||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
|
@@ -13,7 +13,7 @@ OPT_FLAGS = -O
|
||||
|
||||
EXPAT_INCLUDES = -I/usr/local/include
|
||||
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
|
||||
DEFINES = -DDRI_NEW_INTERFACE_ONLY
|
||||
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER
|
||||
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC \
|
||||
-ffast-math $(X11_INCLUDES)
|
||||
CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
|
||||
@@ -38,6 +38,6 @@ DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
|
||||
# ffb and gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon tdfx \
|
||||
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \
|
||||
unichrome savage sis
|
||||
|
||||
|
@@ -6,3 +6,4 @@ include $(TOP)/configs/freebsd-dri
|
||||
CONFIG_NAME = freebsd-dri-x86-64
|
||||
|
||||
ASM_FLAGS = -DUSE_X86_64_ASM
|
||||
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)
|
||||
|
@@ -8,13 +8,26 @@ CONFIG_NAME = linux
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -O3 -g
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. Add -m32
|
||||
# to build properly on 64-bit platforms.
|
||||
|
||||
ARCH_FLAGS ?=
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -DPTHREADS -DUSE_XSHM
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(X11_INCLUDES)
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
|
||||
# Library/program dependencies
|
||||
# Need to have -L/usr/X11R6/lib in these:
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
EXTRA_LIB_PATH = -L/usr/X11R6/lib
|
||||
|
@@ -1,20 +1,8 @@
|
||||
# Configuration for debugging on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-debug
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG
|
||||
|
||||
CXXFLAGS = -g -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
# Need to have -L/usr/X11R6/lib in these:
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
|
||||
OPT_FLAGS = -g
|
||||
DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK
|
||||
|
@@ -22,7 +22,7 @@ ARCH_FLAGS ?=
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DDRI_NEW_INTERFACE_ONLY -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
|
||||
|
||||
@@ -39,8 +39,6 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
|
||||
GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
|
||||
|
||||
|
||||
# Directories
|
||||
@@ -49,7 +47,7 @@ DRIVER_DIRS = dri
|
||||
PROGRAM_DIRS =
|
||||
WINDOW_SYSTEM=dri
|
||||
|
||||
# ffb and gamma are missing because they have not been converted to use the new
|
||||
# gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon s3v \
|
||||
savage sis tdfx trident unichrome
|
||||
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 r300 radeon s3v \
|
||||
savage sis tdfx trident unichrome ffb
|
||||
|
@@ -8,5 +8,9 @@ CONFIG_NAME = linux-dri-x86
|
||||
# Unnecessary on x86, generally.
|
||||
PIC_FLAGS =
|
||||
|
||||
# Add -m32 to CFLAGS:
|
||||
ARCH_FLAGS = -m32
|
||||
|
||||
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
|
||||
ASM_SOURCES = $(X86_SOURCES)
|
||||
|
||||
|
@@ -7,6 +7,9 @@ CONFIG_NAME = linux-dri-x86-64
|
||||
|
||||
ARCH_FLAGS = -m64
|
||||
|
||||
ASM_FLAGS = -DUSE_X86_64_ASM
|
||||
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)
|
||||
|
||||
LIB_DIR = $(TOP)/lib64
|
||||
|
||||
# Library/program dependencies
|
||||
|
@@ -1,18 +1,9 @@
|
||||
# Configuration for Linux on PPC
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-ppc
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
OPT_FLAGS = -O3 -mcpu=603 -fsigned-char -funroll-loops
|
||||
|
||||
# FIXME: Use of PowerPC assembly should be enabled here.
|
@@ -1,15 +1,9 @@
|
||||
# Configuration for Linux on PPC, static libs
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-ppc
|
||||
|
||||
CONFIG_NAME = linux-ppc-static
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
# Library names (actual file names)
|
||||
@@ -18,9 +12,3 @@ GLU_LIB_NAME = libGLU.a
|
||||
GLUT_LIB_NAME = libglut.a
|
||||
GLW_LIB_NAME = libGLw.a
|
||||
OSMESA_LIB_NAME = libOSMesa.a
|
||||
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm
|
||||
|
@@ -11,20 +11,21 @@ CXX = g++
|
||||
WARN_FLAGS = -Wall -Wundef
|
||||
OPT_FLAGS = -O3 -g
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
|
||||
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
|
||||
ARCH_FLAGS ?=
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DDRI_NEW_INTERFACE_ONLY -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(LIB_DIR) -lEGL -l$(GL_LIB)
|
||||
|
@@ -1,29 +1,7 @@
|
||||
# Configuration for linux-solo-ia64: Linux DRI hardware drivers for fbdev
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-solo
|
||||
|
||||
CONFIG_NAME = linux-solo-ia64
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
DEFINES = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE -DDRM_USE_MALLOC
|
||||
|
||||
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math
|
||||
|
||||
CXXFLAGS = $(DEFINES) -Wall -O3 -ansi -pedantic -fPIC
|
||||
|
||||
|
||||
# Library/program dependencies
|
||||
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl
|
||||
GL_LIB_DEPS = -lm -lpthread -ldl
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glx/mini glu glut/mini
|
||||
DRIVER_DIRS = dri
|
||||
PROGRAM_DIRS = miniglx
|
||||
|
||||
DRI_DIRS = fb mach64 mga r128 r200 radeon sis tdfx unichrome
|
||||
|
@@ -7,10 +7,24 @@ CONFIG_NAME = linux-sparc
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -O2
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
DEFINES = -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
|
||||
|
@@ -1,17 +1,9 @@
|
||||
# Configuration for generic Linux, making static libs
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-static
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
|
||||
CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
# Library names (actual file names)
|
||||
@@ -27,4 +19,3 @@ OSMESA_LIB_DEPS =
|
||||
GLU_LIB_DEPS =
|
||||
GLUT_LIB_DEPS =
|
||||
GLW_LIB_DEPS =
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
|
||||
|
@@ -1,24 +1,8 @@
|
||||
# Configuration for Linux with x86 optimizations
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-x86
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
|
||||
|
||||
CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
|
||||
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
|
||||
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
|
||||
|
||||
# Library/program dependencies
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
|
@@ -4,10 +4,4 @@ include $(TOP)/configs/linux-x86
|
||||
|
||||
CONFIG_NAME = linux-x86-32
|
||||
|
||||
|
||||
# Other than -m32, these are the same as in linux-x86, which we included above.
|
||||
|
||||
CFLAGS = -m32 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
|
||||
|
||||
CXXFLAGS = -m32 -Wall -O3 fPIC -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
ARCH_FLAGS += -m32
|
||||
|
@@ -1,28 +1,13 @@
|
||||
# Configuration for Linux for 64-bit X86 (Opteron)
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-x86-64
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -m64 -Wall -O3 -std=c99 -pedantic -fPIC -D_REENTRANT -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DUSE_X86_64_ASM
|
||||
|
||||
CXXFLAGS = -m64 -Wall -O3 -fPIC -D_REENTRANT -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
|
||||
ASM_SOURCES = $(X86-64_SOURCES)
|
||||
ARCH_FLAGS = -m64
|
||||
|
||||
ASM_SOURCES = $(X86-64_SOURCES) $(X86-64_API)
|
||||
ASM_FLAGS = -DUSE_X86_64_ASM
|
||||
|
||||
LIB_DIR = $(TOP)/lib64
|
||||
|
||||
|
||||
# Library/program dependencies
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
EXTRA_LIB_PATH = -L/usr/X11R6/lib64
|
||||
|
@@ -1,28 +1,7 @@
|
||||
# Configuration for Linux for 64-bit X86 (Opteron)
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-x86-64
|
||||
|
||||
CONFIG_NAME = linux-x86-64-debug
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -g -m64 -Wall -O3 -std=c99 -pedantic -fPIC -D_REENTRANT -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DUSE_X86_64_ASM -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK
|
||||
|
||||
CXXFLAGS = -g -m64 -Wall -O3 -ansi -pedantic -fPIC -D_REENTRANT -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
|
||||
ASM_SOURCES = $(X86-64_SOURCES)
|
||||
|
||||
|
||||
LIB_DIR = $(TOP)/lib64
|
||||
|
||||
|
||||
# Library/program dependencies
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib64 -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib64 -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK
|
||||
|
@@ -1,22 +1,11 @@
|
||||
# Configuration for Linux for 64-bit X86 (Opteron), static libs
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-x86-64
|
||||
|
||||
CONFIG_NAME = linux-x86-64-static
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -m64 -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
|
||||
|
||||
CXXFLAGS = -m64 -Wall -O3 -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.a
|
||||
GLU_LIB_NAME = libGLU.a
|
||||
@@ -24,17 +13,9 @@ GLUT_LIB_NAME = libglut.a
|
||||
GLW_LIB_NAME = libGLw.a
|
||||
OSMESA_LIB_NAME = libOSMesa.a
|
||||
|
||||
|
||||
#ASM_SOURCES = $(X86_SOURCES)
|
||||
|
||||
|
||||
LIB_DIR = $(TOP)/lib64
|
||||
|
||||
|
||||
# Library/program dependencies (static libs don't have dependencies)
|
||||
GL_LIB_DEPS =
|
||||
OSMESA_LIB_DEPS =
|
||||
GLU_LIB_DEPS =
|
||||
GLUT_LIB_DEPS =
|
||||
GLW_LIB_DEPS =
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib64 -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
|
||||
|
@@ -5,6 +5,5 @@ include $(TOP)/configs/linux-x86
|
||||
|
||||
CONFIG_NAME = linux-x86-debug
|
||||
|
||||
CFLAGS = -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
|
||||
|
||||
CXXFLAGS = -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
OPT_FLAGS = -g
|
||||
DEFINES += -DDEBUG -DMESA_DEBUG -DRUN_DEBUG_BENCHMARK
|
||||
|
@@ -1,22 +1,11 @@
|
||||
# Configuration for Linux with x86 optimizations, static libs
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-x86
|
||||
|
||||
CONFIG_NAME = linux-x86-static
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
|
||||
|
||||
CXXFLAGS = -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.a
|
||||
GLU_LIB_NAME = libGLU.a
|
||||
@@ -24,14 +13,9 @@ GLUT_LIB_NAME = libglut.a
|
||||
GLW_LIB_NAME = libGLw.a
|
||||
OSMESA_LIB_NAME = libOSMesa.a
|
||||
|
||||
|
||||
ASM_SOURCES = $(X86_SOURCES) $(X86_API)
|
||||
|
||||
|
||||
# Library/program dependencies (static libs don't have dependencies)
|
||||
GL_LIB_DEPS =
|
||||
OSMESA_LIB_DEPS =
|
||||
GLU_LIB_DEPS =
|
||||
GLUT_LIB_DEPS =
|
||||
GLW_LIB_DEPS =
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
|
||||
|
@@ -4,18 +4,32 @@ include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = sunos5-gcc
|
||||
|
||||
ASM_SOURCES = $(SPARC_SOURCES) $(SPARC_API)
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -I/usr/openwin/include -fPIC -fomit-frame-pointer -D_REENTRANT -DUSE_XSHM -DUSE_SPARC_ASM
|
||||
CXXFLAGS = -O3 -I/usr/openwin/include -fPIC -fomit-frame-pointer -D_REENTRANT -DUSE_SPARC_ASM
|
||||
|
||||
WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -O3 -g -fomit-frame-pointer -pipe
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
ARCH_FLAGS ?=
|
||||
|
||||
DEFINES = -D_REENTRANT -DUSE_XSHM
|
||||
|
||||
ASM_SOURCES = $(SPARC_SOURCES) $(SPARC_API)
|
||||
ASM_FLAGS = -DUSE_SPARC_ASM
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math -I/usr/openwin/include
|
||||
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
-I/usr/openwin/include
|
||||
|
||||
GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
|
||||
|
||||
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
|
||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/openwin/lib
|
||||
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXi -lm
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
|
@@ -1,6 +1,6 @@
|
||||
File: docs/README.WIN32
|
||||
|
||||
Last updated: Jun 02, 2005 - Karl Schultz - kschultz@users.sourceforge.net
|
||||
Last updated: Jul 01, 2005 - Karl Schultz - kschultz@users.sourceforge.net
|
||||
|
||||
Quick Start
|
||||
----- -----
|
||||
@@ -17,7 +17,10 @@ the top-level "windows" directory. For example, Visual Studio 6 files
|
||||
are in windows/VC6. If a directory does not exist for your version of
|
||||
Visual Studio, you can try importing the project files from an earlier
|
||||
version of Visual Studio. At this time, project files exist for
|
||||
Version 6.
|
||||
Version 6 and Version 7. The code has been built with a beta version
|
||||
of Version 8 and it runs on 64-bit Windows. If you want to try this,
|
||||
start by importing the VC7 files and create the 64-bit targets in the
|
||||
configuration manager.
|
||||
|
||||
The project files to build the core Mesa library, Windows Mesa
|
||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||
@@ -43,8 +46,12 @@ be useful in figuring out any problems, or report them to me.
|
||||
|
||||
To build Mesa with the GDI driver, build the mesa, gdi, and glu
|
||||
projects in the Visual Studio workspace found at
|
||||
windows/VC?/mesa/mesa.dsw. The osmesa DLL can also be built with the
|
||||
osmesa project.
|
||||
|
||||
windows/VC6/mesa/mesa.dsw
|
||||
or
|
||||
windows/VC7/mesa/mesa.sln
|
||||
|
||||
The osmesa DLL can also be built with the osmesa project.
|
||||
|
||||
The build system creates a lib top-level directory and copies
|
||||
resulting LIB and DLL files to this lib directory. The files are:
|
||||
@@ -53,13 +60,19 @@ resulting LIB and DLL files to this lib directory. The files are:
|
||||
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
|
||||
|
||||
If the MesaDemos ZIP file was extracted, the DLL files are also copied
|
||||
to the demos directory.
|
||||
to the demos directory. This facilitates running the demos as described
|
||||
below.
|
||||
|
||||
|
||||
GLUT and Demos
|
||||
---- --- -----
|
||||
|
||||
A Visual Studio workspace can be found at windows/VC?/progs/progs.dsw.
|
||||
A Visual Studio workspace can be found at
|
||||
|
||||
windows/VC6/progs/progs.dsw
|
||||
or
|
||||
windows/VC7/progs/progs.sln
|
||||
|
||||
It can be used to build GLUT and a few demos. The GLUT lib and DLL
|
||||
are copied to the top-level lib directory, along with the Mesa libs.
|
||||
|
||||
@@ -70,6 +83,8 @@ rely on data files found there. Also, the Mesa lib DLL's were copied
|
||||
there by the Mesa lib build process. Therefore, you should be able to
|
||||
simply run the demo executables from the demo directory.
|
||||
|
||||
If you want to run the demos from the Visual Studio, you may have to
|
||||
change the startup directory and explicitly state where the executables are.
|
||||
|
||||
|
||||
Build System Notes
|
||||
@@ -87,19 +102,7 @@ GLU library.
|
||||
VC7
|
||||
---
|
||||
|
||||
Some users have reported problems building glu with VC7 after
|
||||
importing and converting the VC6 project files. The problem is caused
|
||||
by a custom build step that was put in place to work around a problem
|
||||
with VC6 not recognizing .cc files as C++ source files. It appears
|
||||
that VC7 can be configured to recognize .cc files as C++ files and so
|
||||
it compiles these glu files with the default settings, and does not
|
||||
use settings that are required to compile the files correctly. The
|
||||
easiest way to solve the problem is to remove the .cc files from the
|
||||
glu project. This does not delete the files, but removes them from
|
||||
the project so that VS does not try to compile them at all. This
|
||||
allows the custom build step to compile the files with the proper
|
||||
settings. Another approach is to remove the custom build step and fix
|
||||
the project up to compile the files normally.
|
||||
The above-mentioned .cc problem does not exist in this version.
|
||||
|
||||
|
||||
General
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
Mesa 6.3 release notes
|
||||
|
||||
month day, 2004
|
||||
July 20, 2005
|
||||
|
||||
PLEASE READ!!!!
|
||||
|
||||
@@ -28,7 +28,8 @@ GL_OES_read_format - allows one to query the fastest glReadPixels format
|
||||
GL_ARB_pixel_buffer_object - buffer objects for pixel read/write functions.
|
||||
|
||||
GL_EXT_framebuffer_object - allows render-to-texture and provides a
|
||||
window-system indepedent Pbuffer facility
|
||||
window-system indepedent Pbuffer facility.
|
||||
The Mesa CVS tree contains a couple tests of this extension.
|
||||
|
||||
DirectFB driver, contributed by Claudio Ciccani. See docs/README.directfb
|
||||
for details.
|
||||
@@ -63,11 +64,25 @@ contexts so they can't be deleted until they're unbound in _all_ contexts.
|
||||
|
||||
|
||||
|
||||
GL_EXT_framebuffer_object changes
|
||||
---------------------------------
|
||||
|
||||
Implementing this extension involved changing a lot of code (for the better).
|
||||
|
||||
The gl_framebuffer object now a collection of gl_renderbuffer objects.
|
||||
Renderbuffers may store colors, stencil indices, or depth values. The
|
||||
gl_framebuffer and gl_renderbuffer types are object-oriented in design.
|
||||
|
||||
All the old RGB, color index, stencil and depth-related span functions for
|
||||
reading/writing pixels from/to buffers has changed. Now, all pixels are
|
||||
read/written through a set of common renderbuffer functions (methods).
|
||||
|
||||
Most device drivers have been updated for these changes, but some haven't.
|
||||
|
||||
|
||||
To Do before release
|
||||
--------------------
|
||||
Fix dinoshade bug
|
||||
|
||||
To Do (someday) items
|
||||
---------------------
|
||||
Switch to freeglut
|
||||
Increase MAX_DRAWBUFFERS
|
||||
driver hooks for BeginQuery/EndQuery
|
||||
@@ -77,7 +92,7 @@ To Do before release
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
The main/get.c file is now generated with a Python script.
|
||||
The main/get.c file is now generated with a Python script (get_gen.py).
|
||||
|
||||
|
||||
|
||||
@@ -97,4 +112,4 @@ D3D needs updating
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
$Id: RELNOTES-6.3,v 3.9 2005/05/04 20:11:35 brianp Exp $
|
||||
$Id: RELNOTES-6.3,v 3.13 2005/07/21 15:57:29 brianp Exp $
|
||||
|
49
docs/RELNOTES-6.3.1
Normal file
49
docs/RELNOTES-6.3.1
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
Mesa 6.3.1 release notes
|
||||
|
||||
July XX, 2005
|
||||
|
||||
PLEASE READ!!!!
|
||||
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Mesa uses an even/odd version number scheme like the Linux kernel.
|
||||
Odd numbered versions (such as 6.3) designate new developmental releases.
|
||||
Even numbered versions (such as 6.2) designate stable releases.
|
||||
|
||||
|
||||
|
||||
DRI drivers
|
||||
-----------
|
||||
|
||||
This release includes the DRI drivers and GLX code for hardware rendering.
|
||||
|
||||
|
||||
|
||||
Bug fixes
|
||||
---------
|
||||
|
||||
Bugs fixed in 6.3.1 are listed in the VERSIONS file.
|
||||
|
||||
|
||||
|
||||
Driver Status
|
||||
---------------------- ---------------------
|
||||
XMesa (Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA implements OpenGL 1.3
|
||||
Wind River UGL implements OpenGL 1.3
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
DJGPP implements OpenGL 1.5
|
||||
GGI implements OpenGL 1.3
|
||||
BeOS implements OpenGL 1.5
|
||||
Allegro needs updating
|
||||
D3D needs updating
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
$Id: RELNOTES-6.3.1,v 3.1 2005/07/21 18:45:54 brianp Exp $
|
@@ -1314,20 +1314,48 @@ Mesa Version History
|
||||
- bug reports should to go bugzilla.freedesktop.org
|
||||
|
||||
|
||||
6.3 Month day, 2004
|
||||
6.3 July 20, 2005
|
||||
New:
|
||||
- GL_EXT_framebuffer_object extension
|
||||
- GL_ARB_draw_buffers extension
|
||||
- GL_ARB_pixel_buffer_object extension
|
||||
- GL_OES_read_format extension (Ian Romanick)
|
||||
- DirectFB driver (Claudio Ciccani)
|
||||
- x86_64 vertex transformation code (Mikko T.)
|
||||
- Updated GL/glext.h to version 29
|
||||
Changes:
|
||||
- added -stereo option for glxgears demo (Jacek Rosik)
|
||||
- updated the PBuffer demo code in xdemos/ directory
|
||||
- glDeleteTextures/Programs/Buffers() now makes the object ID
|
||||
available for immediate re-use
|
||||
- assorted 64-bit clean-ups fixes (x86_64 and Win64)
|
||||
- lots of internal changes for GL_EXT_framebuffer_object
|
||||
Bug fixes:
|
||||
- some functions didn't support PBO functionality
|
||||
- glGetTexImage didn't convert color index images to RGBA as required
|
||||
- fragment program texcoords were sometimes wrong for points and lines
|
||||
- fixed problem with negative dot product in arbfplight, fplight demos
|
||||
- fixed bug in perspective correction of antialiased, textured lines
|
||||
- querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value
|
||||
- fixed a couple per-pixel fog bugs (Soju Matsumoto)
|
||||
- glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken
|
||||
- fixed float parsing bug in ARB frag/vert programs (bug 2520)
|
||||
- XMesaGetDepthBuffer() returned incorrect value for bytesPerValue
|
||||
- GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha
|
||||
- glXChooseFBConfig() crashed if attribList pointer was NULL
|
||||
- program state.light[n].spot.direction.w was wrong value (bug 3083)
|
||||
- fragment program fog option required glEnable(GL_FOG) - wrong.
|
||||
- glColorTable() could produce a Mesa implementation error (bug 3135)
|
||||
- RasterPos could get corrupted by color index rendering path
|
||||
- Removed bad XTranslateCoordinates call when rendering to Pixmaps
|
||||
- glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state
|
||||
- fixed a few Darwin compilation problems
|
||||
|
||||
|
||||
6.3.1 July XX, 2005
|
||||
New:
|
||||
- The distribution now includes the DRI drivers and GLX code
|
||||
Bug fixes:
|
||||
- GL_ARB_vertex/fragment_shader were mistakenly listed in the
|
||||
extensions string
|
||||
- negative relative addressing in vertex programs was broken
|
||||
|
@@ -4,8 +4,6 @@
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<!--Override a few values from the style sheet: -->
|
||||
<style>
|
||||
<!--
|
||||
@@ -40,6 +38,7 @@ a:visited {
|
||||
<b>Download / Install</b>
|
||||
<ul>
|
||||
<li><a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">Stable Release (6.2.1)</a>
|
||||
<li><a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">Devel Release (6.3)</a>
|
||||
<li><a href="download.html" target="MainFrame">Downloading/Unpacking</a>
|
||||
<li><a href="install.html" target="MainFrame">Compilation/Installation</a>
|
||||
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
|
||||
|
@@ -21,53 +21,77 @@
|
||||
<a name="unix-x11">
|
||||
<H2>1. Unix/X11 Compilation and Installation</H1>
|
||||
|
||||
<p>
|
||||
Mesa uses a rather conventional Makefile system.
|
||||
A GNU autoconf/automake system used to be included, but was discarded
|
||||
in Mesa 5.1 because:
|
||||
</p>
|
||||
<ul>
|
||||
<li>It seldom worked on IRIX, Solaris, AIX, etc.
|
||||
<li>It was very compilicated
|
||||
<li>Nobody maintained it
|
||||
<li>libtool was just too weird
|
||||
</ul>
|
||||
<p>
|
||||
If someone strongly feels that Mesa should have a autoconf/automake
|
||||
system and wants to contribute one and maintain it, we'll consider
|
||||
adding it again.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In Mesa 6.1 we modified the conventional Makefile system.
|
||||
Instead of specifying all the various system configurations in the
|
||||
Make-config file, there's a directory named <code>configs/</code> which
|
||||
has an individual file for each configuration.
|
||||
One of the configs gets copied to <code>configs/current</code>, which
|
||||
is then included by all Makefiles.
|
||||
</p>
|
||||
|
||||
|
||||
<h3>1.1 Compilation</h3>
|
||||
|
||||
<p>
|
||||
Note: if you've obtained Mesa through CVS, do this first:
|
||||
Mesa may be compiled in several different ways:
|
||||
</p>
|
||||
<pre>
|
||||
cd Mesa
|
||||
chmod a+x bin/mklib
|
||||
</pre>
|
||||
|
||||
<ul>
|
||||
<li><b><em>Stand-alone/Xlib mode</em></b> - Mesa is compiled as
|
||||
a software renderer using Xlib to do all rendering.
|
||||
libGL.so is a self-contained rendering library.
|
||||
<p>
|
||||
Just type <b>make</b> in the top-level directory.
|
||||
To compile stand-alone Mesa type <b>make</b> in the top-level directory.
|
||||
You'll see a list of supported system configurations.
|
||||
Choose one from the list (such as linux-x86), and type:
|
||||
</p>
|
||||
<pre>
|
||||
make linux-x86
|
||||
</pre>
|
||||
<p>This will produce libGL.so and several other libraries</p>
|
||||
</li>
|
||||
|
||||
<li><b><em>DRI/accelerated</em></b> - The DRI hardware drivers (for ATI,
|
||||
Intel, Matrox, etc) are built.
|
||||
libGL.so implements the GLX extension and dynamically loads the DRI drivers.
|
||||
<p>
|
||||
If you want to rebuild for a different configuration run
|
||||
To build the DRI drivers you'll first need to have the DRM (Direct
|
||||
Rendering Manager) kernel drivers and header files.
|
||||
They're available from the <a href="http://dri.sf.net/" target="_parent">DRI</a> project.
|
||||
</p>
|
||||
<p>
|
||||
You can get them from CVS by doing:
|
||||
<pre>
|
||||
cvs -d:pserver:anonymous@pds.freedesktop.org:/cvs/dri login
|
||||
(hit enter when prompted for a password)
|
||||
cvs -z3 -d:pserver:anonymous@pdx.freedesktop.org:/cvs/dri co drm
|
||||
</pre>
|
||||
<p>
|
||||
Make note of the directory in which the drm files are placed.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="http://dri.freedesktop.org/wiki/Building" target="_parent">
|
||||
DRI Building Instructions</a> for the steps to build the DRM modules.
|
||||
</p>
|
||||
<p>
|
||||
Next, in the <code>Mesa-x.y.z/configs/default</code> file, set the
|
||||
<code>DRM_SOURCE_PATH</code> variable to indicate where the DRM files
|
||||
are located.
|
||||
</p>
|
||||
<p>
|
||||
Now build Mesa and the DRI drivers by running
|
||||
</p>
|
||||
<pre>
|
||||
make linux-dri
|
||||
</pre>
|
||||
<p>
|
||||
There are also <code>linux-dri-x86</code>, <code>linux-dri-x86-64</code>,
|
||||
and <code>linux-ppc</code> configurations, optimized for those architectures.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Finally, you'll need a DRI-enabled X server from
|
||||
<a href="http://freedesktop.org/wiki/Software_2fXserver" target="_parent">
|
||||
X.org</a> or <a href="http://www.xfree86.org" target="_parent">XFree86</a>.
|
||||
Visit those projects' home pages for more information.
|
||||
</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>
|
||||
Later, if you want to rebuild for a different configuration run
|
||||
<code>make realclean</code> before rebuilding.
|
||||
</p>
|
||||
|
||||
@@ -75,7 +99,8 @@ If you want to rebuild for a different configuration run
|
||||
<h3>1.2 The libraries</h3>
|
||||
|
||||
<p>
|
||||
When compilation has finished, look in the top-level <b>lib/</b> directory.
|
||||
When compilation has finished, look in the top-level <code>lib/</code>
|
||||
directory.
|
||||
You'll see a set of library files similar to this:
|
||||
</p>
|
||||
<pre>
|
||||
@@ -108,6 +133,23 @@ lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSM
|
||||
<b>libOSMesa</b> is the OSMesa (Off-Screen) interface library.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you built the DRI hardware drivers, you'll also see the DRI drivers:
|
||||
</p>
|
||||
<pre>
|
||||
-rwxr-xr-x 1 brian users 11320803 Jul 21 12:11 mach64_dri.so
|
||||
-rwxr-xr-x 1 brian users 11418014 Jul 21 12:12 mga_dri.so
|
||||
-rwxr-xr-x 1 brian users 11064426 Jul 21 12:12 r128_dri.so
|
||||
-rwxr-xr-x 1 brian users 11849858 Jul 21 12:12 r200_dri.so
|
||||
-rwxr-xr-x 1 brian users 11757388 Jul 21 12:12 radeon_dri.so
|
||||
-rwxr-xr-x 1 brian users 11232304 Jul 21 12:13 s3v_dri.so
|
||||
-rwxr-xr-x 1 brian users 11062970 Jul 21 12:13 savage_dri.so
|
||||
-rwxr-xr-x 1 brian users 11214212 Jul 21 12:13 sis_dri.so
|
||||
-rwxr-xr-x 1 brian users 11368736 Jul 21 12:13 tdfx_dri.so
|
||||
-rwxr-xr-x 1 brian users 10598868 Jul 21 12:13 trident_dri.so
|
||||
-rwxr-xr-x 1 brian users 10997120 Jul 21 12:13 unichrome_dri.so
|
||||
</pre>
|
||||
|
||||
|
||||
<h3>1.3 Running the demos</h3>
|
||||
|
||||
|
@@ -82,7 +82,7 @@ my work hours at the Space Science and Engineering Center at the University
|
||||
of Wisconsin in Madison. My supervisor, Bill Hibbard, lets me do this because
|
||||
Mesa is now being using for the <a href="http://www.ssec.wisc.edu/%7Ebillh/vis.html" target="_parent">Vis5D</a> project.
|
||||
</p><p>
|
||||
October 1996: Mesa 2.0 is released. It implementes the OpenGL 1.1 specification.
|
||||
October 1996: Mesa 2.0 is released. It implements the OpenGL 1.1 specification.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -134,8 +134,8 @@ GL_ARB_fragment_program extensions.
|
||||
|
||||
|
||||
<p>
|
||||
Ongoing: Mesa is used as the core of many hardware OpenGL drivers for XFree86
|
||||
within the
|
||||
Ongoing: Mesa is used as the core of many hardware OpenGL drivers for
|
||||
the XFree86 X.org X servers within the
|
||||
<A href="http://dri.sourceforge.net/" target="_parent">DRI project</A>.
|
||||
I continue to enhance Mesa with new extensions and features.
|
||||
</p>
|
||||
|
@@ -30,7 +30,8 @@ SourceForge lists page.</a>
|
||||
with the mailing lists please contact the SourceForge administrators for help.</p>
|
||||
|
||||
<p>Archives of the old Mesa mailing list which was hosted by unicamp.br
|
||||
are available <a href="http://groups.yahoo.com/group/mesa/messages/">here</a>.</p>
|
||||
are available <a href="http://groups.yahoo.com/group/mesa/messages/"
|
||||
target="_parent">here</a>.</p>
|
||||
|
||||
<p>
|
||||
Here are some other OpenGL-related forums you might find useful:
|
||||
@@ -46,7 +47,8 @@ Usenet newsgroups:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="http://www.opengl.org/">OpenGL discussion forums</A> at www.opengl.org
|
||||
<a href="http://www.opengl.org/" target="_parent">OpenGL discussion forums</A>
|
||||
at www.opengl.org
|
||||
</p>
|
||||
|
||||
</HTML>
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/* Mesa CSS */
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
/*background-color: #55bbff;*/
|
||||
font: 14px 'Lucida Grande', Geneva, Arial, Verdana, sans-serif;
|
||||
color: black;
|
||||
link: #111188;
|
||||
|
@@ -6,9 +6,65 @@
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>July 20, 2005</h2>
|
||||
<p>
|
||||
Mesa 6.3 has been released.
|
||||
This is a development release with new features, changes and bug fixes.
|
||||
</p>
|
||||
<pre>
|
||||
New:
|
||||
- GL_EXT_framebuffer_object extension
|
||||
- GL_ARB_draw_buffers extension
|
||||
- GL_ARB_pixel_buffer_object extension
|
||||
- GL_OES_read_format extension (Ian Romanick)
|
||||
- DirectFB driver (Claudio Ciccani)
|
||||
- x86_64 vertex transformation code (Mikko T.)
|
||||
Changes:
|
||||
- added -stereo option for glxgears demo (Jacek Rosik)
|
||||
- updated the PBuffer demo code in xdemos/ directory
|
||||
- glDeleteTextures/Programs/Buffers() now makes the object ID
|
||||
available for immediate re-use
|
||||
- assorted 64-bit clean-ups fixes (x86_64 and Win64)
|
||||
- lots of internal changes for GL_EXT_framebuffer_object
|
||||
Bug fixes:
|
||||
- some functions didn't support PBO functionality
|
||||
- glGetTexImage didn't convert color index images to RGBA as required
|
||||
- fragment program texcoords were sometimes wrong for points and lines
|
||||
- fixed problem with negative dot product in arbfplight, fplight demos
|
||||
- fixed bug in perspective correction of antialiased, textured lines
|
||||
- querying GL_POST_CONVOLUTION_ALPHA_BIAS_EXT returned wrong value
|
||||
- fixed a couple per-pixel fog bugs (Soju Matsumoto)
|
||||
- glGetBooleanv(GL_FRAGMENT_PROGRAM_BINDING_NV) was broken
|
||||
- fixed float parsing bug in ARB frag/vert programs (bug 2520)
|
||||
- XMesaGetDepthBuffer() returned incorrect value for bytesPerValue
|
||||
- GL_COLOR_MATERIAL with glColor3 didn't properly set diffuse alpha
|
||||
- glXChooseFBConfig() crashed if attribList pointer was NULL
|
||||
- program state.light[n].spot.direction.w was wrong value (bug 3083)
|
||||
- fragment program fog option required glEnable(GL_FOG) - wrong.
|
||||
- glColorTable() could produce a Mesa implementation error (bug 3135)
|
||||
- RasterPos could get corrupted by color index rendering path
|
||||
- Removed bad XTranslateCoordinates call when rendering to Pixmaps
|
||||
- glPopAttrib() didn't properly restore GL_TEXTURE_GEN enable state
|
||||
- fixed a few Darwin compilation problems
|
||||
</pre>
|
||||
<p>
|
||||
The MD5 checksums are:
|
||||
</p>
|
||||
<pre>
|
||||
0236f552d37514776945d5a013e5bb7b MesaLib-6.3.tar.gz
|
||||
60e1a8f78c4a8c7750a1e95753190986 MesaLib-6.3.tar.bz2
|
||||
ca7c950fbace68c70caa822322db7223 MesaLib-6.3.zip
|
||||
25ea801645b376c014051804fe4974b2 MesaDemos-6.3.tar.gz
|
||||
9248e74872ea88c57ec25c900c295057 MesaDemos-6.3.tar.bz2
|
||||
8537dfa734ef258dcc7272097558d434 MesaDemos-6.3.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>December 9, 2004</h2>
|
||||
<p>
|
||||
Mesa 6.2.1 has been released.
|
||||
@@ -960,6 +1016,6 @@ source code</a>.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
$Id: news.html,v 3.19 2005/05/05 14:18:31 brianp Exp $
|
||||
$Id: news.html,v 3.22 2005/07/20 18:20:45 brianp Exp $
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="RELNOTES-6.3.1">RELNOTES-6.3.1</A>
|
||||
<LI><A HREF="RELNOTES-6.3">RELNOTES-6.3</A>
|
||||
<LI><A HREF="RELNOTES-6.2.1">RELNOTES-6.2.1</A>
|
||||
<LI><A HREF="RELNOTES-6.2">RELNOTES-6.2</A>
|
||||
|
@@ -52,9 +52,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2005/05/31 */
|
||||
/* glext.h last updated 2005/06/20 */
|
||||
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
|
||||
#define GL_GLEXT_VERSION 28
|
||||
#define GL_GLEXT_VERSION 29
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
@@ -3023,7 +3023,6 @@ extern "C" {
|
||||
#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
|
||||
#define GL_STENCIL_INDEX_EXT 0x8D45
|
||||
#define GL_STENCIL_INDEX1_EXT 0x8D46
|
||||
#define GL_STENCIL_INDEX4_EXT 0x8D47
|
||||
#define GL_STENCIL_INDEX8_EXT 0x8D48
|
||||
|
@@ -331,7 +331,16 @@ typedef struct {
|
||||
} GLXBufferClobberEventSGIX;
|
||||
#endif
|
||||
|
||||
#if defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
#if defined(__sun__)
|
||||
#include <inttypes.h>
|
||||
#if defined(__STDC__)
|
||||
#if defined(__arch64__)
|
||||
typedef long int int64_t;
|
||||
#else
|
||||
typedef long long int int64_t;
|
||||
#endif /* __arch64__ */
|
||||
#endif /* __STDC__ */
|
||||
#elif defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
#elif defined( __VMS )
|
||||
|
@@ -38,7 +38,7 @@
|
||||
#ifndef DRI_INTERFACE_H
|
||||
#define DRI_INTERFACE_H
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
#if 0 /*ndef DRI_NEW_INTERFACE_ONLY*/
|
||||
# include <X11/X.h>
|
||||
# include <GL/glx.h>
|
||||
# include "GL/glxint.h"
|
||||
@@ -62,6 +62,7 @@ typedef struct __DRIdrawableRec __DRIdrawable;
|
||||
typedef struct __DRIdriverRec __DRIdriver;
|
||||
typedef struct __DRIframebufferRec __DRIframebuffer;
|
||||
typedef struct __DRIversionRec __DRIversion;
|
||||
typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods;
|
||||
typedef unsigned long __DRIid;
|
||||
typedef void __DRInativeDisplay;
|
||||
/*@}*/
|
||||
@@ -71,42 +72,6 @@ typedef void __DRInativeDisplay;
|
||||
* \name Functions provided by the driver loader.
|
||||
*/
|
||||
/*@{*/
|
||||
extern __DRIscreen *__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn);
|
||||
|
||||
|
||||
/**
|
||||
* Type of a pointer to \c __glXGetInternalVersion, as returned by
|
||||
* \c glXGetProcAddress.
|
||||
*
|
||||
* \sa __glXGetInternalVersion, glXGetProcAddress
|
||||
*/
|
||||
typedef int (* PFNGLXGETINTERNALVERSIONPROC) ( void );
|
||||
|
||||
/**
|
||||
* Type of a pointer to \c __glXWindowExists, as returned by
|
||||
* \c glXGetProcAddress.
|
||||
*
|
||||
* \sa __glXWindowExists, glXGetProcAddress
|
||||
*/
|
||||
typedef GLboolean (* PFNGLXWINDOWEXISTSPROC) (__DRInativeDisplay *dpy, __DRIid draw);
|
||||
|
||||
/**
|
||||
* Type of a pointer to \c __glXGetUST, as returned by \c glXGetProcAddress.
|
||||
*
|
||||
* \sa __glXGetUST, glXGetProcAddress
|
||||
*/
|
||||
typedef int (* PFNGLXGETUSTPROC) ( int64_t * ust );
|
||||
|
||||
/**
|
||||
* Type of pointer to \c __glXCreateContextModes, as returned by
|
||||
* \c glXGetProcAddress.
|
||||
*
|
||||
* \sa _gl_context_modes_create, glXGetProcAddress
|
||||
*/
|
||||
|
||||
typedef __GLcontextModes * (* PFNGLXCREATECONTEXTMODES) ( unsigned count,
|
||||
size_t minimum_bytes_per_struct );
|
||||
|
||||
/**
|
||||
* Type of a pointer to \c glXGetScreenDriver, as returned by
|
||||
* \c glXGetProcAddress. This function is used to get the name of the DRI
|
||||
@@ -127,39 +92,11 @@ typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int
|
||||
typedef const char * (* PFNGLXGETDRIVERCONFIGPROC) (const char *driverName);
|
||||
|
||||
/**
|
||||
* Type of a pointer to \c __glXScrEnableExtension, as returned by
|
||||
* \c glXGetProcAddress. This function is used to enable a GLX extension
|
||||
* on the specified screen.
|
||||
*
|
||||
* \sa __glXScrEnableExtension, glXGetProcAddress
|
||||
* Type of a pointer to \c glxEnableExtension, as returned by
|
||||
* \c __DRIinterfaceMethods::getProcAddress. This function is used to enable
|
||||
* a GLX extension on the specified screen.
|
||||
*/
|
||||
typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name );
|
||||
|
||||
/**
|
||||
* Type of a pointer to \c __glXGetDrawableInfo, as returned by
|
||||
* \c glXGetProcAddress. This function is used to get information about the
|
||||
* position, size, and clip rects of a drawable.
|
||||
*
|
||||
* \sa __glXGetDrawableInfo, glXGetProcAddress
|
||||
*/
|
||||
typedef GLboolean (* PFNGLXGETDRAWABLEINFOPROC) ( __DRInativeDisplay *dpy, int scrn,
|
||||
__DRIid draw, unsigned int * index, unsigned int * stamp,
|
||||
int * x, int * y, int * width, int * height,
|
||||
int * numClipRects, drm_clip_rect_t ** pClipRects,
|
||||
int * backX, int * backY,
|
||||
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
|
||||
|
||||
/* Test for the xf86dri.h header file */
|
||||
#ifndef _XF86DRI_H_
|
||||
extern GLboolean XF86DRIDestroyContext( __DRInativeDisplay *dpy, int screen,
|
||||
__DRIid context_id );
|
||||
|
||||
extern GLboolean XF86DRICreateDrawable( __DRInativeDisplay *dpy, int screen,
|
||||
__DRIid drawable, drm_drawable_t *hHWDrawable );
|
||||
|
||||
extern GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen,
|
||||
__DRIid drawable);
|
||||
#endif
|
||||
/*@}*/
|
||||
|
||||
|
||||
@@ -173,16 +110,10 @@ typedef void *(CREATENEWSCREENFUNC)(__DRInativeDisplay *dpy, int scrn,
|
||||
const __DRIversion * ddx_version, const __DRIversion * dri_version,
|
||||
const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer,
|
||||
void * pSAREA, int fd, int internal_api_version,
|
||||
const __DRIinterfaceMethods * interface,
|
||||
__GLcontextModes ** driver_modes);
|
||||
typedef CREATENEWSCREENFUNC* PFNCREATENEWSCREENFUNC;
|
||||
extern CREATENEWSCREENFUNC __driCreateNewScreen;
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
|
||||
extern void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
int numConfigs, __GLXvisualConfig *config);
|
||||
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
extern CREATENEWSCREENFUNC __driCreateNewScreen_20050727;
|
||||
|
||||
|
||||
/**
|
||||
@@ -209,6 +140,113 @@ struct __DRIversionRec {
|
||||
int patch; /**< Patch-level. */
|
||||
};
|
||||
|
||||
|
||||
typedef void (*__DRIfuncPtr)(void);
|
||||
|
||||
struct __DRIinterfaceMethodsRec {
|
||||
/**
|
||||
* Get pointer to named function.
|
||||
*/
|
||||
__DRIfuncPtr (*getProcAddress)( const char * proc_name );
|
||||
|
||||
/**
|
||||
* Create a list of \c __GLcontextModes structures.
|
||||
*/
|
||||
__GLcontextModes * (*createContextModes)(unsigned count,
|
||||
size_t minimum_bytes_per_struct);
|
||||
|
||||
/**
|
||||
* Destroy a list of \c __GLcontextModes structures.
|
||||
*
|
||||
* \todo
|
||||
* Determine if the drivers actually need to call this.
|
||||
*/
|
||||
void (*destroyContextModes)( __GLcontextModes * modes );
|
||||
|
||||
/**
|
||||
* Get the \c __DRIscreen for a given display and screen number.
|
||||
*/
|
||||
__DRIscreen *(*getScreen)(__DRInativeDisplay *dpy, int screenNum);
|
||||
|
||||
|
||||
/**
|
||||
* \name Client/server protocol functions.
|
||||
*
|
||||
* These functions implement the DRI client/server protocol for
|
||||
* context and drawable operations. Platforms that do not implement
|
||||
* the wire protocol (e.g., EGL) will implement glorified no-op functions.
|
||||
*/
|
||||
/*@{*/
|
||||
/**
|
||||
* Determine if the specified window ID still exists.
|
||||
*
|
||||
* \note
|
||||
* Implementations may assume that the driver will only pass an ID into
|
||||
* this function that actually corresponds to a window. On
|
||||
* implementations where windows can only be destroyed by the DRI driver
|
||||
* (e.g., EGL), this function is allowed to always return \c GL_TRUE.
|
||||
*/
|
||||
GLboolean (*windowExists)(__DRInativeDisplay *dpy, __DRIid draw);
|
||||
|
||||
/**
|
||||
* Create the server-side portion of the GL context.
|
||||
*/
|
||||
GLboolean (* createContext)( __DRInativeDisplay *dpy, int screenNum,
|
||||
int configID, void * contextID, drm_context_t * hw_context );
|
||||
|
||||
/**
|
||||
* Destroy the server-side portion of the GL context.
|
||||
*/
|
||||
GLboolean (* destroyContext)( __DRInativeDisplay *dpy, int screenNum,
|
||||
__DRIid context );
|
||||
|
||||
/**
|
||||
* Create the server-side portion of the drawable.
|
||||
*/
|
||||
GLboolean (*createDrawable)( __DRInativeDisplay * ndpy, int screen,
|
||||
__DRIid drawable, drm_drawable_t * hHWDrawable );
|
||||
|
||||
/**
|
||||
* Destroy the server-side portion of the drawable.
|
||||
*/
|
||||
GLboolean (*destroyDrawable)( __DRInativeDisplay * ndpy, int screen,
|
||||
__DRIid drawable );
|
||||
|
||||
/**
|
||||
* This function is used to get information about the position, size, and
|
||||
* clip rects of a drawable.
|
||||
*/
|
||||
GLboolean (* getDrawableInfo) ( __DRInativeDisplay *dpy, int scrn,
|
||||
__DRIid draw, unsigned int * index, unsigned int * stamp,
|
||||
int * x, int * y, int * width, int * height,
|
||||
int * numClipRects, drm_clip_rect_t ** pClipRects,
|
||||
int * backX, int * backY,
|
||||
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
|
||||
/*@}*/
|
||||
|
||||
|
||||
/**
|
||||
* \name Timing related functions.
|
||||
*/
|
||||
/*@{*/
|
||||
/**
|
||||
* Get the 64-bit unadjusted system time (UST).
|
||||
*/
|
||||
int (*getUST)(int64_t * ust);
|
||||
|
||||
/**
|
||||
* Get the media stream counter (MSC) rate.
|
||||
*
|
||||
* Matching the definition in GLX_OML_sync_control, this function returns
|
||||
* the rate of the "media stream counter". In practical terms, this is
|
||||
* the frame refresh rate of the display.
|
||||
*/
|
||||
GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable,
|
||||
int32_t * numerator, int32_t * denominator);
|
||||
/*@}*/
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Framebuffer information record. Used by libGL to communicate information
|
||||
* about the framebuffer to the driver's \c __driCreateNewScreen function.
|
||||
@@ -247,25 +285,6 @@ struct __DRIscreenRec {
|
||||
*/
|
||||
void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate);
|
||||
|
||||
/**
|
||||
* Method to create the private DRI context data and initialize the
|
||||
* context dependent methods.
|
||||
*
|
||||
* \sa __DRIscreenRec::createNewContext driCreateContext
|
||||
* driCreateNewContext
|
||||
*
|
||||
* \deprecated
|
||||
* This function has been replaced by \c __DRIscreenRec::createNewContext.
|
||||
* New drivers will continue to export this method, but it will eventually
|
||||
* (in the next XFree86 major relearse) go away.
|
||||
*/
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
void *(*createContext)(Display *dpy, XVisualInfo *vis, void *sharedPrivate,
|
||||
__DRIcontext *pctx);
|
||||
#else
|
||||
void * createContext;
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/**
|
||||
* Method to create the private DRI drawable data and initialize the
|
||||
* drawable dependent methods.
|
||||
@@ -341,30 +360,6 @@ struct __DRIcontextRec {
|
||||
*/
|
||||
void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate);
|
||||
|
||||
/**
|
||||
* Method to bind a DRI drawable to a DRI graphics context.
|
||||
*
|
||||
* \deprecated Replaced by bindContext3.
|
||||
*/
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
Bool (*bindContext)(Display *dpy, int scrn, GLXDrawable draw,
|
||||
GLXContext gc);
|
||||
#else
|
||||
void *bindContext;
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/**
|
||||
* Method to unbind a DRI drawable to a DRI graphics context.
|
||||
*
|
||||
* \deprecated Replaced by unbindContext3.
|
||||
*/
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
Bool (*unbindContext)(Display *dpy, int scrn, GLXDrawable draw,
|
||||
GLXContext gc, int will_rebind);
|
||||
#else
|
||||
void *unbindContext;
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/**
|
||||
* Opaque pointer to private per context direct rendering data.
|
||||
* \c NULL if direct rendering is not supported on the display or
|
||||
@@ -372,32 +367,6 @@ struct __DRIcontextRec {
|
||||
*/
|
||||
void *private;
|
||||
|
||||
/**
|
||||
* Method to bind a DRI drawable to a DRI graphics context.
|
||||
*
|
||||
* \since Internal API version 20030606.
|
||||
* \deprecated Replaced by bindContext3.
|
||||
*/
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
Bool (*bindContext2)(Display *dpy, int scrn, GLXDrawable draw,
|
||||
GLXDrawable read, GLXContext gc);
|
||||
#else
|
||||
void *bindContext2;
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/**
|
||||
* Method to unbind a DRI drawable from a DRI graphics context.
|
||||
*
|
||||
* \since Internal API version 20030606.
|
||||
* \deprecated Replaced by unbindContext3.
|
||||
*/
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
Bool (*unbindContext2)(Display *dpy, int scrn, GLXDrawable draw,
|
||||
GLXDrawable read, GLXContext gc);
|
||||
#else
|
||||
void *unbindContext2;
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/**
|
||||
* Pointer to the mode used to create this context.
|
||||
*
|
||||
@@ -408,17 +377,17 @@ struct __DRIcontextRec {
|
||||
/**
|
||||
* Method to bind a DRI drawable to a DRI graphics context.
|
||||
*
|
||||
* \since Internal API version 20040415.
|
||||
* \since Internal API version 20050727.
|
||||
*/
|
||||
GLboolean (*bindContext3)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
|
||||
GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
|
||||
__DRIid read, __DRIcontext *ctx);
|
||||
|
||||
/**
|
||||
* Method to unbind a DRI drawable from a DRI graphics context.
|
||||
*
|
||||
* \since Internal API version 20040415.
|
||||
* \since Internal API version 20050727.
|
||||
*/
|
||||
GLboolean (*unbindContext3)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
|
||||
GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
|
||||
__DRIid read, __DRIcontext *ctx);
|
||||
};
|
||||
|
||||
|
@@ -12,7 +12,8 @@ PROGRAMS = \
|
||||
demo1 \
|
||||
demo2 \
|
||||
demo3 \
|
||||
eglinfo
|
||||
eglinfo \
|
||||
eglgears
|
||||
|
||||
|
||||
.c.o:
|
||||
@@ -51,6 +52,12 @@ eglinfo.o: eglinfo.c $(HEADERS)
|
||||
$(CC) -c $(CFLAGS) -I$(TOP)/include eglinfo.c
|
||||
|
||||
|
||||
eglgears: eglgears.o $(LIB_DIR)/libEGL.so
|
||||
$(CC) eglgears.o -L$(LIB_DIR) -lEGL $(APP_LIB_DEPS) -o $@
|
||||
|
||||
eglgears.o: eglgears.c $(HEADERS)
|
||||
$(CC) -c $(CFLAGS) -I$(TOP)/include eglgears.c
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.o *~
|
||||
|
@@ -92,7 +92,6 @@ main(int argc, char *argv[])
|
||||
EGLContext ctx;
|
||||
EGLSurface pbuffer;
|
||||
EGLConfig configs[10];
|
||||
EGLint numConfigs, i;
|
||||
EGLBoolean b;
|
||||
const EGLint pbufAttribs[] = {
|
||||
EGL_WIDTH, 500,
|
||||
|
@@ -56,6 +56,7 @@ static void Reshape(int width, int height)
|
||||
windH = (GLint)height;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void RotateColorMask(void)
|
||||
{
|
||||
static GLint rotation = 0;
|
||||
@@ -80,6 +81,7 @@ static void RotateColorMask(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void Viewport(GLint row, GLint column)
|
||||
{
|
||||
|
446
progs/egl/eglgears.c
Normal file
446
progs/egl/eglgears.c
Normal file
@@ -0,0 +1,446 @@
|
||||
/*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* 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 shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is a port of the infamous "glxgears" demo to straight EGL
|
||||
* Port by Dane Rushton 10 July 2005
|
||||
*
|
||||
* No command line options.
|
||||
* Program runs for 5 seconds then exits, outputing framerate to console
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GLES/egl.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
#define BENCHMARK
|
||||
|
||||
#ifdef BENCHMARK
|
||||
|
||||
/* XXX this probably isn't very portable */
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* return current time (in seconds) */
|
||||
static double
|
||||
current_time(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
#ifdef __VMS
|
||||
(void) gettimeofday(&tv, NULL );
|
||||
#else
|
||||
struct timezone tz;
|
||||
(void) gettimeofday(&tv, &tz);
|
||||
#endif
|
||||
return (double) tv.tv_sec + tv.tv_usec / 1000000.0;
|
||||
}
|
||||
|
||||
#else /*BENCHMARK*/
|
||||
|
||||
/* dummy */
|
||||
static double
|
||||
current_time(void)
|
||||
{
|
||||
/* update this function for other platforms! */
|
||||
static double t = 0.0;
|
||||
static int warn = 1;
|
||||
if (warn) {
|
||||
fprintf(stderr, "Warning: current_time() not implemented!!\n");
|
||||
warn = 0;
|
||||
}
|
||||
return t += 1.0;
|
||||
}
|
||||
|
||||
#endif /*BENCHMARK*/
|
||||
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265
|
||||
#endif
|
||||
|
||||
|
||||
static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
|
||||
static GLint gear1, gear2, gear3;
|
||||
static GLfloat angle = 0.0;
|
||||
|
||||
static GLfloat eyesep = 5.0; /* Eye separation. */
|
||||
static GLfloat fix_point = 40.0; /* Fixation point distance. */
|
||||
static GLfloat left, right, asp; /* Stereo frustum params. */
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Draw a gear wheel. You'll probably want to call this function when
|
||||
* building a display list since we do a lot of trig here.
|
||||
*
|
||||
* Input: inner_radius - radius of hole at center
|
||||
* outer_radius - radius at center of teeth
|
||||
* width - width of gear
|
||||
* teeth - number of teeth
|
||||
* tooth_depth - depth of tooth
|
||||
*/
|
||||
static void
|
||||
gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
|
||||
GLint teeth, GLfloat tooth_depth)
|
||||
{
|
||||
GLint i;
|
||||
GLfloat r0, r1, r2;
|
||||
GLfloat angle, da;
|
||||
GLfloat u, v, len;
|
||||
|
||||
r0 = inner_radius;
|
||||
r1 = outer_radius - tooth_depth / 2.0;
|
||||
r2 = outer_radius + tooth_depth / 2.0;
|
||||
|
||||
da = 2.0 * M_PI / teeth / 4.0;
|
||||
|
||||
glShadeModel(GL_FLAT);
|
||||
|
||||
glNormal3f(0.0, 0.0, 1.0);
|
||||
|
||||
/* draw front face */
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
for (i = 0; i <= teeth; i++) {
|
||||
angle = i * 2.0 * M_PI / teeth;
|
||||
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
|
||||
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
|
||||
if (i < teeth) {
|
||||
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
|
||||
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
|
||||
width * 0.5);
|
||||
}
|
||||
}
|
||||
glEnd();
|
||||
|
||||
/* draw front sides of teeth */
|
||||
glBegin(GL_QUADS);
|
||||
da = 2.0 * M_PI / teeth / 4.0;
|
||||
for (i = 0; i < teeth; i++) {
|
||||
angle = i * 2.0 * M_PI / teeth;
|
||||
|
||||
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
|
||||
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
|
||||
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da),
|
||||
width * 0.5);
|
||||
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
|
||||
width * 0.5);
|
||||
}
|
||||
glEnd();
|
||||
|
||||
glNormal3f(0.0, 0.0, -1.0);
|
||||
|
||||
/* draw back face */
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
for (i = 0; i <= teeth; i++) {
|
||||
angle = i * 2.0 * M_PI / teeth;
|
||||
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
|
||||
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
|
||||
if (i < teeth) {
|
||||
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
|
||||
-width * 0.5);
|
||||
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
|
||||
}
|
||||
}
|
||||
glEnd();
|
||||
|
||||
/* draw back sides of teeth */
|
||||
glBegin(GL_QUADS);
|
||||
da = 2.0 * M_PI / teeth / 4.0;
|
||||
for (i = 0; i < teeth; i++) {
|
||||
angle = i * 2.0 * M_PI / teeth;
|
||||
|
||||
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
|
||||
-width * 0.5);
|
||||
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da),
|
||||
-width * 0.5);
|
||||
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
|
||||
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
|
||||
}
|
||||
glEnd();
|
||||
|
||||
/* draw outward faces of teeth */
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
for (i = 0; i < teeth; i++) {
|
||||
angle = i * 2.0 * M_PI / teeth;
|
||||
|
||||
glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5);
|
||||
glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5);
|
||||
u = r2 * cos(angle + da) - r1 * cos(angle);
|
||||
v = r2 * sin(angle + da) - r1 * sin(angle);
|
||||
len = sqrt(u * u + v * v);
|
||||
u /= len;
|
||||
v /= len;
|
||||
glNormal3f(v, -u, 0.0);
|
||||
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
|
||||
glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
|
||||
glNormal3f(cos(angle), sin(angle), 0.0);
|
||||
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da),
|
||||
width * 0.5);
|
||||
glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da),
|
||||
-width * 0.5);
|
||||
u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
|
||||
v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);
|
||||
glNormal3f(v, -u, 0.0);
|
||||
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
|
||||
width * 0.5);
|
||||
glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da),
|
||||
-width * 0.5);
|
||||
glNormal3f(cos(angle), sin(angle), 0.0);
|
||||
}
|
||||
|
||||
glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5);
|
||||
glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5);
|
||||
|
||||
glEnd();
|
||||
|
||||
glShadeModel(GL_SMOOTH);
|
||||
|
||||
/* draw inside radius cylinder */
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
for (i = 0; i <= teeth; i++) {
|
||||
angle = i * 2.0 * M_PI / teeth;
|
||||
glNormal3f(-cos(angle), -sin(angle), 0.0);
|
||||
glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
|
||||
glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
|
||||
}
|
||||
glEnd();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
draw(void)
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glPushMatrix();
|
||||
glRotatef(view_rotx, 1.0, 0.0, 0.0);
|
||||
glRotatef(view_roty, 0.0, 1.0, 0.0);
|
||||
glRotatef(view_rotz, 0.0, 0.0, 1.0);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(-3.0, -2.0, 0.0);
|
||||
glRotatef(angle, 0.0, 0.0, 1.0);
|
||||
glCallList(gear1);
|
||||
glPopMatrix();
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(3.1, -2.0, 0.0);
|
||||
glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0);
|
||||
glCallList(gear2);
|
||||
glPopMatrix();
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(-3.1, 4.2, 0.0);
|
||||
glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0);
|
||||
glCallList(gear3);
|
||||
glPopMatrix();
|
||||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
/* new window size or exposure */
|
||||
static void
|
||||
reshape(int width, int height)
|
||||
{
|
||||
glViewport(0, 0, (GLint) width, (GLint) height);
|
||||
|
||||
GLfloat h = (GLfloat) height / (GLfloat) width;
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0);
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0, 0.0, -40.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
init(void)
|
||||
{
|
||||
static GLfloat pos[4] = { 5.0, 5.0, 10.0, 0.0 };
|
||||
static GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 };
|
||||
static GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 };
|
||||
static GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 };
|
||||
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, pos);
|
||||
glEnable(GL_CULL_FACE);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_LIGHT0);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
/* make the gears */
|
||||
gear1 = glGenLists(1);
|
||||
glNewList(gear1, GL_COMPILE);
|
||||
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
|
||||
gear(1.0, 4.0, 1.0, 20, 0.7);
|
||||
glEndList();
|
||||
|
||||
gear2 = glGenLists(1);
|
||||
glNewList(gear2, GL_COMPILE);
|
||||
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
|
||||
gear(0.5, 2.0, 2.0, 10, 0.7);
|
||||
glEndList();
|
||||
|
||||
gear3 = glGenLists(1);
|
||||
glNewList(gear3, GL_COMPILE);
|
||||
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
|
||||
gear(1.3, 2.0, 0.5, 10, 0.7);
|
||||
glEndList();
|
||||
|
||||
glEnable(GL_NORMALIZE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void run_gears(EGLDisplay dpy, EGLSurface surf, int ttr)
|
||||
{
|
||||
double st = current_time();
|
||||
double ct = st;
|
||||
int frames = 0;
|
||||
while (ct - st < ttr)
|
||||
{
|
||||
double tt = current_time();
|
||||
double dt = tt - ct;
|
||||
ct = tt;
|
||||
|
||||
/* advance rotation for next frame */
|
||||
angle += 70.0 * dt; /* 70 degrees per second */
|
||||
if (angle > 3600.0)
|
||||
angle -= 3600.0;
|
||||
|
||||
draw();
|
||||
|
||||
// DBR : Swap the Buffers
|
||||
eglSwapBuffers(dpy, surf);
|
||||
|
||||
|
||||
frames++;
|
||||
}
|
||||
|
||||
GLfloat seconds = ct - st;
|
||||
GLfloat fps = frames / seconds;
|
||||
printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds, fps);
|
||||
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int maj, min;
|
||||
EGLContext ctx;
|
||||
EGLSurface screen_surf;
|
||||
EGLConfig configs[10];
|
||||
EGLint numConfigs, i;
|
||||
EGLBoolean b;
|
||||
|
||||
const EGLint screenAttribs[] = {
|
||||
EGL_WIDTH, 1024,
|
||||
EGL_HEIGHT, 768,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
EGLModeMESA mode;
|
||||
EGLScreenMESA screen;
|
||||
EGLint count;
|
||||
GLboolean printInfo = GL_FALSE;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (strcmp(argv[i], "-info") == 0)
|
||||
{
|
||||
printInfo = GL_TRUE;
|
||||
}
|
||||
else
|
||||
printf("Warning: unknown parameter: %s\n", argv[i]);
|
||||
}
|
||||
|
||||
// DBR : Create EGL context/surface etc
|
||||
EGLDisplay d = eglGetDisplay("!fb_dri");
|
||||
assert(d);
|
||||
|
||||
if (!eglInitialize(d, &maj, &min)) {
|
||||
printf("demo: eglInitialize failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("EGL version = %d.%d\n", maj, min);
|
||||
printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
|
||||
|
||||
eglGetConfigs(d, configs, 10, &numConfigs);
|
||||
eglGetScreensMESA(d, &screen, 1, &count);
|
||||
eglGetModesMESA(d, screen, &mode, 1, &count);
|
||||
|
||||
ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
printf("failed to create context\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);
|
||||
if (screen_surf == EGL_NO_SURFACE) {
|
||||
printf("failed to create screen surface\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
eglShowSurfaceMESA(d, screen, screen_surf, mode);
|
||||
|
||||
b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
|
||||
if (!b) {
|
||||
printf("make current failed\n");
|
||||
return 0;
|
||||
}
|
||||
// DBR
|
||||
|
||||
if (printInfo)
|
||||
{
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
|
||||
}
|
||||
|
||||
init(); // Initialise the GL visual
|
||||
reshape(1024,768);
|
||||
|
||||
// DBR : Run the simulation
|
||||
run_gears(d, screen_surf, 5.0);
|
||||
|
||||
|
||||
// DBR : Destroy EGL context/surface etc
|
||||
eglDestroySurface(d, screen_surf);
|
||||
eglDestroyContext(d, ctx);
|
||||
eglTerminate(d);
|
||||
// DBR
|
||||
|
||||
return 0;
|
||||
}
|
2
progs/tests/.cvsignore
Normal file
2
progs/tests/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
.cvsignore
|
||||
getproclist.h
|
@@ -22,6 +22,7 @@ SOURCES = antialias.c \
|
||||
blendminmax.c \
|
||||
blendsquare.c \
|
||||
bufferobj.c \
|
||||
bug_3101.c \
|
||||
crossbar.c \
|
||||
cva.c \
|
||||
dinoshade.c \
|
||||
|
128
progs/tests/bug_3101.c
Normal file
128
progs/tests/bug_3101.c
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* (C) Copyright IBM Corporation 2005
|
||||
* 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
|
||||
* VA LINUX SYSTEM, IBM AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file bug_3101.c
|
||||
*
|
||||
* Simple regression test for bug #3101. Attempt to draw a single square.
|
||||
* After emiting the first vertex, call \c glEdgeFlag to change the vertex
|
||||
* format. If the bug still exists, this will cause a segfault.
|
||||
*
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 400;
|
||||
static int Height = 200;
|
||||
static const GLfloat Near = 5.0, Far = 25.0;
|
||||
|
||||
|
||||
static void Display( void )
|
||||
{
|
||||
glClearColor(0.2, 0.2, 0.8, 0);
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
/* This is the "reference" square.
|
||||
*/
|
||||
|
||||
glTranslatef(-4.5, 0, 0);
|
||||
glBlendEquation( GL_FUNC_ADD );
|
||||
glBlendFunc( GL_ONE, GL_ZERO );
|
||||
glBegin(GL_QUADS);
|
||||
glColor3f( 0.5, 0.5, 0.5 );
|
||||
glVertex2f(-1, -1);
|
||||
glVertex2f( 1, -1);
|
||||
glEdgeFlag(GL_TRUE);
|
||||
glVertex2f( 1, 1);
|
||||
glVertex2f(-1, 1);
|
||||
glEnd();
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
static void Reshape( int width, int height )
|
||||
{
|
||||
GLfloat ar = (float) width / (float) height;
|
||||
Width = width;
|
||||
Height = height;
|
||||
glViewport( 0, 0, width, height );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
glTranslatef( 0.0, 0.0, -15.0 );
|
||||
}
|
||||
|
||||
|
||||
static void Key( unsigned char key, int x, int y )
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
switch (key) {
|
||||
case 27:
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void Init( void )
|
||||
{
|
||||
const char * const ver_string = (const char * const)
|
||||
glGetString( GL_VERSION );
|
||||
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
printf("GL_VERSION = %s\n", ver_string);
|
||||
|
||||
printf("\nThis program should draw a single square, but not crash.\n");
|
||||
printf("This is a regression test for bug #3101.\n");
|
||||
printf("https://bugs.freedesktop.org/show_bug.cgi?id=3101\n");
|
||||
glEnable( GL_BLEND );
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "Bug #3101 Test" );
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
Init();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
@@ -145,6 +145,19 @@ Init( void )
|
||||
|
||||
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
|
||||
|
||||
{
|
||||
GLint r, g, b, a;
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
GL_RENDERBUFFER_RED_SIZE_EXT, &r);
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
GL_RENDERBUFFER_GREEN_SIZE_EXT, &g);
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
GL_RENDERBUFFER_BLUE_SIZE_EXT, &b);
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
GL_RENDERBUFFER_ALPHA_SIZE_EXT, &a);
|
||||
printf("renderbuffer RGBA sizes = %d %d %d %d\n", r, g, b, a);
|
||||
}
|
||||
|
||||
CheckError(__LINE__);
|
||||
|
||||
/* restore to default */
|
||||
|
@@ -223,6 +223,10 @@ Init(void)
|
||||
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRB);
|
||||
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
|
||||
TexWidth, TexHeight);
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
GL_RENDERBUFFER_DEPTH_SIZE_EXT, &i);
|
||||
printf("Depth renderbuffer size = %d bits\n", i);
|
||||
assert(i > 0);
|
||||
|
||||
/* make stencil renderbuffer */
|
||||
glGenRenderbuffersEXT(1, &StencilRB);
|
||||
@@ -231,6 +235,10 @@ Init(void)
|
||||
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, StencilRB);
|
||||
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX,
|
||||
TexWidth, TexHeight);
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
GL_RENDERBUFFER_STENCIL_SIZE_EXT, &i);
|
||||
printf("Stencil renderbuffer size = %d bits\n", i);
|
||||
assert(i > 0);
|
||||
|
||||
/* attach DepthRB to MyFB */
|
||||
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
|
||||
|
@@ -1,13 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# $Id: getprocaddress.py,v 1.6 2004/11/27 19:57:46 brianp Exp $
|
||||
# $Id: getprocaddress.py,v 1.7 2005/06/21 23:42:43 idr Exp $
|
||||
|
||||
# Helper for the getprocaddress.c test.
|
||||
|
||||
from xml.sax import saxutils
|
||||
from xml.sax import make_parser
|
||||
from xml.sax.handler import feature_namespaces
|
||||
|
||||
import sys, getopt, re
|
||||
sys.path.append("../../src/mesa/glapi/" )
|
||||
import gl_XML
|
||||
@@ -30,16 +26,19 @@ def FindTestFunctions():
|
||||
return functions
|
||||
|
||||
|
||||
class PrintExports(gl_XML.FilterGLAPISpecBase):
|
||||
name = "gl_exports.py (from Mesa)"
|
||||
|
||||
class PrintExports(gl_XML.gl_print_base):
|
||||
def __init__(self):
|
||||
gl_XML.FilterGLAPISpecBase.__init__(self)
|
||||
gl_XML.gl_print_base.__init__(self)
|
||||
|
||||
self.name = "getprocaddress.py (from Mesa)"
|
||||
self.license = license.bsd_license_template % ( \
|
||||
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
|
||||
|
||||
self.tests = FindTestFunctions()
|
||||
self.prevCategory = ""
|
||||
return
|
||||
|
||||
|
||||
def printRealHeader(self):
|
||||
print """
|
||||
@@ -50,22 +49,28 @@ struct name_test_pair {
|
||||
|
||||
static struct name_test_pair functions[] = {"""
|
||||
|
||||
def printRealFooter(self):
|
||||
print"""
|
||||
{ NULL, NULL }
|
||||
};
|
||||
"""
|
||||
def printBody(self, api):
|
||||
prev_category = None
|
||||
|
||||
|
||||
def printFunction(self, f):
|
||||
if f.category != self.prevCategory:
|
||||
print ' { "-%s", NULL},' % f.category
|
||||
self.prevCategory = f.category
|
||||
for f in api.functionIterateByOffset():
|
||||
[category, num] = api.get_category_for_name( f.name )
|
||||
if category != prev_category:
|
||||
print ' { "-%s", NULL},' % category
|
||||
prev_category = category
|
||||
|
||||
if f.name in self.tests:
|
||||
test = "test_%s" % f.name
|
||||
else:
|
||||
test = "NULL"
|
||||
print ' { "gl%s", %s },' % (f.name, test)
|
||||
for name in f.entry_points:
|
||||
if name in self.tests:
|
||||
test = "test_%s" % name
|
||||
break
|
||||
|
||||
print ' { "gl%s", %s },' % (f.name, test)
|
||||
|
||||
print ''
|
||||
print ' { NULL, NULL }'
|
||||
print '};'
|
||||
print ''
|
||||
return
|
||||
|
||||
|
||||
@@ -81,15 +86,8 @@ if __name__ == '__main__':
|
||||
if arg == "-f":
|
||||
file_name = val
|
||||
|
||||
dh = PrintExports()
|
||||
printer = PrintExports()
|
||||
|
||||
parser = make_parser()
|
||||
parser.setFeature(feature_namespaces, 0)
|
||||
parser.setContentHandler(dh)
|
||||
api = gl_XML.parse_GL_API( file_name, gl_XML.gl_item_factory() )
|
||||
|
||||
f = open(file_name)
|
||||
|
||||
parser.parse(f)
|
||||
dh.printHeader()
|
||||
dh.printFunctions()
|
||||
dh.printFooter()
|
||||
printer.Print( api )
|
||||
|
@@ -20,6 +20,7 @@ PROGS = glthreads \
|
||||
glxswapcontrol \
|
||||
manywin \
|
||||
offset \
|
||||
overlay \
|
||||
pbinfo \
|
||||
pbdemo \
|
||||
wincopy \
|
||||
@@ -51,10 +52,10 @@ clean:
|
||||
|
||||
# special cases
|
||||
pbinfo: pbinfo.o pbutil.o
|
||||
$(CC) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@
|
||||
$(CC) $(CFLAGS) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@
|
||||
|
||||
pbdemo: pbdemo.o pbutil.o
|
||||
$(CC) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
|
||||
$(CC) $(CFLAGS) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
|
||||
|
||||
pbinfo.o: pbinfo.c pbutil.h
|
||||
$(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbinfo.c
|
||||
@@ -66,13 +67,13 @@ pbutil.o: pbutil.c pbutil.h
|
||||
$(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbutil.c
|
||||
|
||||
glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
|
||||
$(CC) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@
|
||||
$(CC) $(CFLAGS) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@
|
||||
|
||||
glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
|
||||
$(CC) -c -I. -I$(INCDIR) $(CFLAGS) glxgears_fbconfig.c
|
||||
$(CC) $(CFLAGS) -c -I. -I$(INCDIR) $(CFLAGS) glxgears_fbconfig.c
|
||||
|
||||
xrotfontdemo: xrotfontdemo.o xuserotfont.o
|
||||
$(CC) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
|
||||
$(CC) $(CFLAGS) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
|
||||
|
||||
xuserotfont.o: xuserotfont.c xuserotfont.h
|
||||
$(CC) -c -I. -I$(INCDIR) $(CFLAGS) xuserotfont.c
|
||||
|
245
progs/xdemos/overlay.c
Normal file
245
progs/xdemos/overlay.c
Normal file
@@ -0,0 +1,245 @@
|
||||
/*
|
||||
* GLX overlay test/demo.
|
||||
*
|
||||
* Brian Paul
|
||||
* 18 July 2005
|
||||
*/
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static int WinWidth = 300, WinHeight = 300;
|
||||
static Window NormalWindow = 0;
|
||||
static Window OverlayWindow = 0;
|
||||
static GLXContext NormalContext = 0;
|
||||
static GLXContext OverlayContext = 0;
|
||||
static GLboolean RGBOverlay = GL_FALSE;
|
||||
static GLfloat Angle = 0.0;
|
||||
|
||||
|
||||
static void
|
||||
RedrawNormal(Display *dpy)
|
||||
{
|
||||
glXMakeCurrent(dpy, NormalWindow, NormalContext);
|
||||
glViewport(0, 0, WinWidth, WinHeight);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glClearColor(0.5, 0.5, 0.5, 1.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glColor3f(1.0, 1.0, 0.0);
|
||||
glPushMatrix();
|
||||
glRotatef(Angle, 0, 0, 1);
|
||||
glRectf(-0.8, -0.8, 0.8, 0.8);
|
||||
glPopMatrix();
|
||||
glXSwapBuffers(dpy, NormalWindow);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
RedrawOverlay(Display *dpy)
|
||||
{
|
||||
glXMakeCurrent(dpy, OverlayWindow, OverlayContext);
|
||||
glViewport(0, 0, WinWidth, WinHeight);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
if (RGBOverlay) {
|
||||
glColor3f(0.0, 1.0, 1.0);
|
||||
}
|
||||
else {
|
||||
glIndexi(2);
|
||||
}
|
||||
glBegin(GL_LINES);
|
||||
glVertex2f(-1, -1);
|
||||
glVertex2f(1, 1);
|
||||
glVertex2f(1, -1);
|
||||
glVertex2f(-1, 1);
|
||||
glEnd();
|
||||
glXSwapBuffers(dpy, OverlayWindow);
|
||||
}
|
||||
|
||||
|
||||
static Window
|
||||
MakeWindow(Display *dpy, XVisualInfo *visinfo, Window parent,
|
||||
unsigned int width, unsigned int height)
|
||||
{
|
||||
int scrnum;
|
||||
XSetWindowAttributes attr;
|
||||
unsigned long mask;
|
||||
Window root;
|
||||
Window win;
|
||||
|
||||
scrnum = DefaultScreen(dpy);
|
||||
root = RootWindow(dpy, scrnum);
|
||||
|
||||
/* window attributes */
|
||||
attr.background_pixel = 0;
|
||||
attr.border_pixel = 0;
|
||||
attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
|
||||
attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;
|
||||
mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
|
||||
|
||||
win = XCreateWindow(dpy, parent, 0, 0, width, height,
|
||||
0, visinfo->depth, InputOutput,
|
||||
visinfo->visual, mask, &attr);
|
||||
return win;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
MakeNormalWindow(Display *dpy)
|
||||
{
|
||||
int attrib[] = { GLX_RGBA,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_DOUBLEBUFFER,
|
||||
None };
|
||||
int scrnum;
|
||||
Window root;
|
||||
XVisualInfo *visinfo;
|
||||
|
||||
scrnum = DefaultScreen(dpy);
|
||||
root = RootWindow(dpy, scrnum);
|
||||
|
||||
visinfo = glXChooseVisual(dpy, scrnum, attrib);
|
||||
if (!visinfo) {
|
||||
printf("Error: couldn't get an RGB, Double-buffered visual\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
NormalWindow = MakeWindow(dpy, visinfo, root, WinWidth, WinHeight);
|
||||
assert(NormalWindow);
|
||||
|
||||
NormalContext = glXCreateContext(dpy, visinfo, NULL, True);
|
||||
assert(NormalContext);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
MakeOverlayWindow(Display *dpy)
|
||||
{
|
||||
int rgbAttribs[] = {
|
||||
GLX_RGBA,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_DOUBLEBUFFER,
|
||||
GLX_LEVEL, 1,
|
||||
None
|
||||
};
|
||||
int indexAttribs[] = {
|
||||
/*GLX_RGBA, leave this out */
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_DOUBLEBUFFER,
|
||||
GLX_LEVEL, 1,
|
||||
None
|
||||
};
|
||||
int scrnum;
|
||||
Window root;
|
||||
XVisualInfo *visinfo;
|
||||
|
||||
scrnum = DefaultScreen(dpy);
|
||||
root = RootWindow(dpy, scrnum);
|
||||
|
||||
visinfo = glXChooseVisual(dpy, scrnum, rgbAttribs);
|
||||
if (visinfo) {
|
||||
printf("Found RGB overlay visual 0x%x\n", (int) visinfo->visualid);
|
||||
RGBOverlay = GL_TRUE;
|
||||
}
|
||||
else {
|
||||
visinfo = glXChooseVisual(dpy, scrnum, indexAttribs);
|
||||
if (visinfo) {
|
||||
printf("Found Color Index overlay visual 0x%x\n",
|
||||
(int) visinfo->visualid);
|
||||
/* XXX setup the colormap entries! */
|
||||
}
|
||||
else {
|
||||
printf("Error: couldn't get an overlay visual!\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
OverlayWindow = MakeWindow(dpy, visinfo, NormalWindow, WinWidth, WinHeight);
|
||||
assert(OverlayWindow);
|
||||
|
||||
OverlayContext = glXCreateContext(dpy, visinfo, NULL, True);
|
||||
assert(OverlayContext);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
EventLoop(Display *dpy)
|
||||
{
|
||||
XEvent event;
|
||||
|
||||
while (1) {
|
||||
XNextEvent(dpy, &event);
|
||||
|
||||
switch (event.type) {
|
||||
case Expose:
|
||||
RedrawNormal(dpy);
|
||||
RedrawOverlay(dpy);
|
||||
break;
|
||||
case ConfigureNotify:
|
||||
WinWidth = event.xconfigure.width;
|
||||
WinHeight = event.xconfigure.height;
|
||||
if (event.xconfigure.window == NormalWindow)
|
||||
XResizeWindow(dpy, OverlayWindow, WinWidth, WinHeight);
|
||||
break;
|
||||
case KeyPress:
|
||||
{
|
||||
char buffer[10];
|
||||
int r, code;
|
||||
code = XLookupKeysym(&event.xkey, 0);
|
||||
r = XLookupString(&event.xkey, buffer, sizeof(buffer),
|
||||
NULL, NULL);
|
||||
if (buffer[0] == 27) {
|
||||
/* escape */
|
||||
return;
|
||||
}
|
||||
else if (buffer[0] == ' ') {
|
||||
Angle += 5.0;
|
||||
RedrawNormal(dpy);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
; /* nothing */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
Display *dpy = XOpenDisplay(NULL);
|
||||
|
||||
assert(dpy);
|
||||
|
||||
MakeNormalWindow(dpy);
|
||||
MakeOverlayWindow(dpy);
|
||||
|
||||
XMapWindow(dpy, NormalWindow);
|
||||
XMapWindow(dpy, OverlayWindow);
|
||||
|
||||
EventLoop(dpy);
|
||||
|
||||
glXDestroyContext(dpy, OverlayContext);
|
||||
glXDestroyContext(dpy, NormalContext);
|
||||
XDestroyWindow(dpy, OverlayWindow);
|
||||
XDestroyWindow(dpy, NormalWindow);
|
||||
|
||||
return 0;
|
||||
}
|
@@ -45,8 +45,8 @@ $(LIB_DIR):
|
||||
|
||||
# Make the library:
|
||||
$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
|
||||
@CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLU_LIB) -major $(GLU_MAJOR) \
|
||||
-minor $(GLU_MINOR) -patch $(GLU_TINY) \
|
||||
@ $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CC)' \
|
||||
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
|
||||
$(MKLIB_OPTIONS) -install $(LIB_DIR) \
|
||||
$(GLU_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
|
@@ -136,8 +136,8 @@ $(LIB_DIR):
|
||||
|
||||
# Make the library:
|
||||
$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLU_LIB) -major $(GLU_MAJOR) \
|
||||
-minor $(GLU_MINOR) -patch $(GLU_TINY) \
|
||||
$(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' \
|
||||
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
|
||||
-cplusplus $(MKLIB_OPTIONS) -install $(LIB_DIR) \
|
||||
$(GLU_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
|
@@ -53,145 +53,145 @@ glutExtensionSupported(const char *extension)
|
||||
|
||||
struct name_address_pair {
|
||||
const char *name;
|
||||
const void *address;
|
||||
const GLUTproc address;
|
||||
};
|
||||
|
||||
static struct name_address_pair glut_functions[] = {
|
||||
{ "glutInit", (const void *) glutInit },
|
||||
{ "glutInitDisplayMode", (const void *) glutInitDisplayMode },
|
||||
{ "glutInitDisplayString", (const void *) glutInitDisplayString },
|
||||
{ "glutInitWindowPosition", (const void *) glutInitWindowPosition },
|
||||
{ "glutInitWindowSize", (const void *) glutInitWindowSize },
|
||||
{ "glutMainLoop", (const void *) glutMainLoop },
|
||||
{ "glutCreateWindow", (const void *) glutCreateWindow },
|
||||
{ "glutCreateSubWindow", (const void *) glutCreateSubWindow },
|
||||
{ "glutDestroyWindow", (const void *) glutDestroyWindow },
|
||||
{ "glutPostRedisplay", (const void *) glutPostRedisplay },
|
||||
{ "glutPostWindowRedisplay", (const void *) glutPostWindowRedisplay },
|
||||
{ "glutSwapBuffers", (const void *) glutSwapBuffers },
|
||||
{ "glutGetWindow", (const void *) glutGetWindow },
|
||||
{ "glutSetWindow", (const void *) glutSetWindow },
|
||||
{ "glutSetWindowTitle", (const void *) glutSetWindowTitle },
|
||||
{ "glutSetIconTitle", (const void *) glutSetIconTitle },
|
||||
{ "glutPositionWindow", (const void *) glutPositionWindow },
|
||||
{ "glutReshapeWindow", (const void *) glutReshapeWindow },
|
||||
{ "glutPopWindow", (const void *) glutPopWindow },
|
||||
{ "glutPushWindow", (const void *) glutPushWindow },
|
||||
{ "glutIconifyWindow", (const void *) glutIconifyWindow },
|
||||
{ "glutShowWindow", (const void *) glutShowWindow },
|
||||
{ "glutHideWindow", (const void *) glutHideWindow },
|
||||
{ "glutFullScreen", (const void *) glutFullScreen },
|
||||
{ "glutSetCursor", (const void *) glutSetCursor },
|
||||
{ "glutWarpPointer", (const void *) glutWarpPointer },
|
||||
{ "glutEstablishOverlay", (const void *) glutEstablishOverlay },
|
||||
{ "glutRemoveOverlay", (const void *) glutRemoveOverlay },
|
||||
{ "glutUseLayer", (const void *) glutUseLayer },
|
||||
{ "glutPostOverlayRedisplay", (const void *) glutPostOverlayRedisplay },
|
||||
{ "glutPostWindowOverlayRedisplay", (const void *) glutPostWindowOverlayRedisplay },
|
||||
{ "glutShowOverlay", (const void *) glutShowOverlay },
|
||||
{ "glutHideOverlay", (const void *) glutHideOverlay },
|
||||
{ "glutCreateMenu", (const void *) glutCreateMenu },
|
||||
{ "glutDestroyMenu", (const void *) glutDestroyMenu },
|
||||
{ "glutGetMenu", (const void *) glutGetMenu },
|
||||
{ "glutSetMenu", (const void *) glutSetMenu },
|
||||
{ "glutAddMenuEntry", (const void *) glutAddMenuEntry },
|
||||
{ "glutAddSubMenu", (const void *) glutAddSubMenu },
|
||||
{ "glutChangeToMenuEntry", (const void *) glutChangeToMenuEntry },
|
||||
{ "glutChangeToSubMenu", (const void *) glutChangeToSubMenu },
|
||||
{ "glutRemoveMenuItem", (const void *) glutRemoveMenuItem },
|
||||
{ "glutAttachMenu", (const void *) glutAttachMenu },
|
||||
{ "glutDetachMenu", (const void *) glutDetachMenu },
|
||||
{ "glutDisplayFunc", (const void *) glutDisplayFunc },
|
||||
{ "glutReshapeFunc", (const void *) glutReshapeFunc },
|
||||
{ "glutKeyboardFunc", (const void *) glutKeyboardFunc },
|
||||
{ "glutMouseFunc", (const void *) glutMouseFunc },
|
||||
{ "glutMotionFunc", (const void *) glutMotionFunc },
|
||||
{ "glutPassiveMotionFunc", (const void *) glutPassiveMotionFunc },
|
||||
{ "glutEntryFunc", (const void *) glutEntryFunc },
|
||||
{ "glutVisibilityFunc", (const void *) glutVisibilityFunc },
|
||||
{ "glutIdleFunc", (const void *) glutIdleFunc },
|
||||
{ "glutTimerFunc", (const void *) glutTimerFunc },
|
||||
{ "glutMenuStateFunc", (const void *) glutMenuStateFunc },
|
||||
{ "glutSpecialFunc", (const void *) glutSpecialFunc },
|
||||
{ "glutSpaceballMotionFunc", (const void *) glutSpaceballMotionFunc },
|
||||
{ "glutSpaceballRotateFunc", (const void *) glutSpaceballRotateFunc },
|
||||
{ "glutSpaceballButtonFunc", (const void *) glutSpaceballButtonFunc },
|
||||
{ "glutButtonBoxFunc", (const void *) glutButtonBoxFunc },
|
||||
{ "glutDialsFunc", (const void *) glutDialsFunc },
|
||||
{ "glutTabletMotionFunc", (const void *) glutTabletMotionFunc },
|
||||
{ "glutTabletButtonFunc", (const void *) glutTabletButtonFunc },
|
||||
{ "glutMenuStatusFunc", (const void *) glutMenuStatusFunc },
|
||||
{ "glutOverlayDisplayFunc", (const void *) glutOverlayDisplayFunc },
|
||||
{ "glutWindowStatusFunc", (const void *) glutWindowStatusFunc },
|
||||
// { "glutKeyboardUpFunc", (const void *) glutKeyboardUpFunc },
|
||||
// { "glutSpecialUpFunc", (const void *) glutSpecialUpFunc },
|
||||
// { "glutJoystickFunc", (const void *) glutJoystickFunc },
|
||||
{ "glutSetColor", (const void *) glutSetColor },
|
||||
{ "glutGetColor", (const void *) glutGetColor },
|
||||
{ "glutCopyColormap", (const void *) glutCopyColormap },
|
||||
{ "glutGet", (const void *) glutGet },
|
||||
{ "glutDeviceGet", (const void *) glutDeviceGet },
|
||||
{ "glutExtensionSupported", (const void *) glutExtensionSupported },
|
||||
{ "glutGetModifiers", (const void *) glutGetModifiers },
|
||||
{ "glutLayerGet", (const void *) glutLayerGet },
|
||||
{ "glutGetProcAddress", (const void *) glutGetProcAddress },
|
||||
{ "glutBitmapCharacter", (const void *) glutBitmapCharacter },
|
||||
{ "glutBitmapWidth", (const void *) glutBitmapWidth },
|
||||
{ "glutStrokeCharacter", (const void *) glutStrokeCharacter },
|
||||
{ "glutStrokeWidth", (const void *) glutStrokeWidth },
|
||||
{ "glutBitmapLength", (const void *) glutBitmapLength },
|
||||
{ "glutStrokeLength", (const void *) glutStrokeLength },
|
||||
{ "glutWireSphere", (const void *) glutWireSphere },
|
||||
{ "glutSolidSphere", (const void *) glutSolidSphere },
|
||||
{ "glutWireCone", (const void *) glutWireCone },
|
||||
{ "glutSolidCone", (const void *) glutSolidCone },
|
||||
{ "glutWireCube", (const void *) glutWireCube },
|
||||
{ "glutSolidCube", (const void *) glutSolidCube },
|
||||
{ "glutWireTorus", (const void *) glutWireTorus },
|
||||
{ "glutSolidTorus", (const void *) glutSolidTorus },
|
||||
{ "glutWireDodecahedron", (const void *) glutWireDodecahedron },
|
||||
{ "glutSolidDodecahedron", (const void *) glutSolidDodecahedron },
|
||||
{ "glutWireTeapot", (const void *) glutWireTeapot },
|
||||
{ "glutSolidTeapot", (const void *) glutSolidTeapot },
|
||||
{ "glutWireOctahedron", (const void *) glutWireOctahedron },
|
||||
{ "glutSolidOctahedron", (const void *) glutSolidOctahedron },
|
||||
{ "glutWireTetrahedron", (const void *) glutWireTetrahedron },
|
||||
{ "glutSolidTetrahedron", (const void *) glutSolidTetrahedron },
|
||||
{ "glutWireIcosahedron", (const void *) glutWireIcosahedron },
|
||||
{ "glutSolidIcosahedron", (const void *) glutSolidIcosahedron },
|
||||
{ "glutVideoResizeGet", (const void *) glutVideoResizeGet },
|
||||
{ "glutSetupVideoResizing", (const void *) glutSetupVideoResizing },
|
||||
{ "glutStopVideoResizing", (const void *) glutStopVideoResizing },
|
||||
{ "glutVideoResize", (const void *) glutVideoResize },
|
||||
{ "glutVideoPan", (const void *) glutVideoPan },
|
||||
{ "glutReportErrors", (const void *) glutReportErrors },
|
||||
// { "glutIgnoreKeyRepeat", (const void *) glutIgnoreKeyRepeat },
|
||||
// { "glutSetKeyRepeat", (const void *) glutSetKeyRepeat },
|
||||
// { "glutForceJoystickFunc", (const void *) glutForceJoystickFunc },
|
||||
// { "glutGameModeString", (const void *) glutGameModeString },
|
||||
// { "glutEnterGameMode", (const void *) glutEnterGameMode },
|
||||
// { "glutLeaveGameMode", (const void *) glutLeaveGameMode },
|
||||
// { "glutGameModeGet", (const void *) glutGameModeGet },
|
||||
{ "glutInit", (const GLUTproc) glutInit },
|
||||
{ "glutInitDisplayMode", (const GLUTproc) glutInitDisplayMode },
|
||||
{ "glutInitDisplayString", (const GLUTproc) glutInitDisplayString },
|
||||
{ "glutInitWindowPosition", (const GLUTproc) glutInitWindowPosition },
|
||||
{ "glutInitWindowSize", (const GLUTproc) glutInitWindowSize },
|
||||
{ "glutMainLoop", (const GLUTproc) glutMainLoop },
|
||||
{ "glutCreateWindow", (const GLUTproc) glutCreateWindow },
|
||||
{ "glutCreateSubWindow", (const GLUTproc) glutCreateSubWindow },
|
||||
{ "glutDestroyWindow", (const GLUTproc) glutDestroyWindow },
|
||||
{ "glutPostRedisplay", (const GLUTproc) glutPostRedisplay },
|
||||
{ "glutPostWindowRedisplay", (const GLUTproc) glutPostWindowRedisplay },
|
||||
{ "glutSwapBuffers", (const GLUTproc) glutSwapBuffers },
|
||||
{ "glutGetWindow", (const GLUTproc) glutGetWindow },
|
||||
{ "glutSetWindow", (const GLUTproc) glutSetWindow },
|
||||
{ "glutSetWindowTitle", (const GLUTproc) glutSetWindowTitle },
|
||||
{ "glutSetIconTitle", (const GLUTproc) glutSetIconTitle },
|
||||
{ "glutPositionWindow", (const GLUTproc) glutPositionWindow },
|
||||
{ "glutReshapeWindow", (const GLUTproc) glutReshapeWindow },
|
||||
{ "glutPopWindow", (const GLUTproc) glutPopWindow },
|
||||
{ "glutPushWindow", (const GLUTproc) glutPushWindow },
|
||||
{ "glutIconifyWindow", (const GLUTproc) glutIconifyWindow },
|
||||
{ "glutShowWindow", (const GLUTproc) glutShowWindow },
|
||||
{ "glutHideWindow", (const GLUTproc) glutHideWindow },
|
||||
{ "glutFullScreen", (const GLUTproc) glutFullScreen },
|
||||
{ "glutSetCursor", (const GLUTproc) glutSetCursor },
|
||||
{ "glutWarpPointer", (const GLUTproc) glutWarpPointer },
|
||||
{ "glutEstablishOverlay", (const GLUTproc) glutEstablishOverlay },
|
||||
{ "glutRemoveOverlay", (const GLUTproc) glutRemoveOverlay },
|
||||
{ "glutUseLayer", (const GLUTproc) glutUseLayer },
|
||||
{ "glutPostOverlayRedisplay", (const GLUTproc) glutPostOverlayRedisplay },
|
||||
{ "glutPostWindowOverlayRedisplay", (const GLUTproc) glutPostWindowOverlayRedisplay },
|
||||
{ "glutShowOverlay", (const GLUTproc) glutShowOverlay },
|
||||
{ "glutHideOverlay", (const GLUTproc) glutHideOverlay },
|
||||
{ "glutCreateMenu", (const GLUTproc) glutCreateMenu },
|
||||
{ "glutDestroyMenu", (const GLUTproc) glutDestroyMenu },
|
||||
{ "glutGetMenu", (const GLUTproc) glutGetMenu },
|
||||
{ "glutSetMenu", (const GLUTproc) glutSetMenu },
|
||||
{ "glutAddMenuEntry", (const GLUTproc) glutAddMenuEntry },
|
||||
{ "glutAddSubMenu", (const GLUTproc) glutAddSubMenu },
|
||||
{ "glutChangeToMenuEntry", (const GLUTproc) glutChangeToMenuEntry },
|
||||
{ "glutChangeToSubMenu", (const GLUTproc) glutChangeToSubMenu },
|
||||
{ "glutRemoveMenuItem", (const GLUTproc) glutRemoveMenuItem },
|
||||
{ "glutAttachMenu", (const GLUTproc) glutAttachMenu },
|
||||
{ "glutDetachMenu", (const GLUTproc) glutDetachMenu },
|
||||
{ "glutDisplayFunc", (const GLUTproc) glutDisplayFunc },
|
||||
{ "glutReshapeFunc", (const GLUTproc) glutReshapeFunc },
|
||||
{ "glutKeyboardFunc", (const GLUTproc) glutKeyboardFunc },
|
||||
{ "glutMouseFunc", (const GLUTproc) glutMouseFunc },
|
||||
{ "glutMotionFunc", (const GLUTproc) glutMotionFunc },
|
||||
{ "glutPassiveMotionFunc", (const GLUTproc) glutPassiveMotionFunc },
|
||||
{ "glutEntryFunc", (const GLUTproc) glutEntryFunc },
|
||||
{ "glutVisibilityFunc", (const GLUTproc) glutVisibilityFunc },
|
||||
{ "glutIdleFunc", (const GLUTproc) glutIdleFunc },
|
||||
{ "glutTimerFunc", (const GLUTproc) glutTimerFunc },
|
||||
{ "glutMenuStateFunc", (const GLUTproc) glutMenuStateFunc },
|
||||
{ "glutSpecialFunc", (const GLUTproc) glutSpecialFunc },
|
||||
{ "glutSpaceballMotionFunc", (const GLUTproc) glutSpaceballMotionFunc },
|
||||
{ "glutSpaceballRotateFunc", (const GLUTproc) glutSpaceballRotateFunc },
|
||||
{ "glutSpaceballButtonFunc", (const GLUTproc) glutSpaceballButtonFunc },
|
||||
{ "glutButtonBoxFunc", (const GLUTproc) glutButtonBoxFunc },
|
||||
{ "glutDialsFunc", (const GLUTproc) glutDialsFunc },
|
||||
{ "glutTabletMotionFunc", (const GLUTproc) glutTabletMotionFunc },
|
||||
{ "glutTabletButtonFunc", (const GLUTproc) glutTabletButtonFunc },
|
||||
{ "glutMenuStatusFunc", (const GLUTproc) glutMenuStatusFunc },
|
||||
{ "glutOverlayDisplayFunc", (const GLUTproc) glutOverlayDisplayFunc },
|
||||
{ "glutWindowStatusFunc", (const GLUTproc) glutWindowStatusFunc },
|
||||
// { "glutKeyboardUpFunc", (const GLUTproc) glutKeyboardUpFunc },
|
||||
// { "glutSpecialUpFunc", (const GLUTproc) glutSpecialUpFunc },
|
||||
// { "glutJoystickFunc", (const GLUTproc) glutJoystickFunc },
|
||||
{ "glutSetColor", (const GLUTproc) glutSetColor },
|
||||
{ "glutGetColor", (const GLUTproc) glutGetColor },
|
||||
{ "glutCopyColormap", (const GLUTproc) glutCopyColormap },
|
||||
{ "glutGet", (const GLUTproc) glutGet },
|
||||
{ "glutDeviceGet", (const GLUTproc) glutDeviceGet },
|
||||
{ "glutExtensionSupported", (const GLUTproc) glutExtensionSupported },
|
||||
{ "glutGetModifiers", (const GLUTproc) glutGetModifiers },
|
||||
{ "glutLayerGet", (const GLUTproc) glutLayerGet },
|
||||
{ "glutGetProcAddress", (const GLUTproc) glutGetProcAddress },
|
||||
{ "glutBitmapCharacter", (const GLUTproc) glutBitmapCharacter },
|
||||
{ "glutBitmapWidth", (const GLUTproc) glutBitmapWidth },
|
||||
{ "glutStrokeCharacter", (const GLUTproc) glutStrokeCharacter },
|
||||
{ "glutStrokeWidth", (const GLUTproc) glutStrokeWidth },
|
||||
{ "glutBitmapLength", (const GLUTproc) glutBitmapLength },
|
||||
{ "glutStrokeLength", (const GLUTproc) glutStrokeLength },
|
||||
{ "glutWireSphere", (const GLUTproc) glutWireSphere },
|
||||
{ "glutSolidSphere", (const GLUTproc) glutSolidSphere },
|
||||
{ "glutWireCone", (const GLUTproc) glutWireCone },
|
||||
{ "glutSolidCone", (const GLUTproc) glutSolidCone },
|
||||
{ "glutWireCube", (const GLUTproc) glutWireCube },
|
||||
{ "glutSolidCube", (const GLUTproc) glutSolidCube },
|
||||
{ "glutWireTorus", (const GLUTproc) glutWireTorus },
|
||||
{ "glutSolidTorus", (const GLUTproc) glutSolidTorus },
|
||||
{ "glutWireDodecahedron", (const GLUTproc) glutWireDodecahedron },
|
||||
{ "glutSolidDodecahedron", (const GLUTproc) glutSolidDodecahedron },
|
||||
{ "glutWireTeapot", (const GLUTproc) glutWireTeapot },
|
||||
{ "glutSolidTeapot", (const GLUTproc) glutSolidTeapot },
|
||||
{ "glutWireOctahedron", (const GLUTproc) glutWireOctahedron },
|
||||
{ "glutSolidOctahedron", (const GLUTproc) glutSolidOctahedron },
|
||||
{ "glutWireTetrahedron", (const GLUTproc) glutWireTetrahedron },
|
||||
{ "glutSolidTetrahedron", (const GLUTproc) glutSolidTetrahedron },
|
||||
{ "glutWireIcosahedron", (const GLUTproc) glutWireIcosahedron },
|
||||
{ "glutSolidIcosahedron", (const GLUTproc) glutSolidIcosahedron },
|
||||
{ "glutVideoResizeGet", (const GLUTproc) glutVideoResizeGet },
|
||||
{ "glutSetupVideoResizing", (const GLUTproc) glutSetupVideoResizing },
|
||||
{ "glutStopVideoResizing", (const GLUTproc) glutStopVideoResizing },
|
||||
{ "glutVideoResize", (const GLUTproc) glutVideoResize },
|
||||
{ "glutVideoPan", (const GLUTproc) glutVideoPan },
|
||||
{ "glutReportErrors", (const GLUTproc) glutReportErrors },
|
||||
// { "glutIgnoreKeyRepeat", (const GLUTproc) glutIgnoreKeyRepeat },
|
||||
// { "glutSetKeyRepeat", (const GLUTproc) glutSetKeyRepeat },
|
||||
// { "glutForceJoystickFunc", (const GLUTproc) glutForceJoystickFunc },
|
||||
// { "glutGameModeString", (const GLUTproc) glutGameModeString },
|
||||
// { "glutEnterGameMode", (const GLUTproc) glutEnterGameMode },
|
||||
// { "glutLeaveGameMode", (const GLUTproc) glutLeaveGameMode },
|
||||
// { "glutGameModeGet", (const GLUTproc) glutGameModeGet },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
/* XXX This isn't an official GLUT function, yet */
|
||||
void * GLUTAPIENTRY
|
||||
GLUTproc GLUTAPIENTRY
|
||||
glutGetProcAddress(const char *procName)
|
||||
{
|
||||
/* Try GLUT functions first */
|
||||
int i;
|
||||
for (i = 0; glut_functions[i].name; i++) {
|
||||
if (strcmp(glut_functions[i].name, procName) == 0)
|
||||
return (void *) glut_functions[i].address;
|
||||
return glut_functions[i].address;
|
||||
}
|
||||
|
||||
/* Try core GL functions */
|
||||
#if defined(_WIN32)
|
||||
return (void *) wglGetProcAddress((LPCSTR) procName);
|
||||
return (GLUTProc) wglGetProcAddress((LPCSTR) procName);
|
||||
#elif defined(GLX_ARB_get_proc_address)
|
||||
return (void *) glXGetProcAddressARB((const GLubyte *) procName);
|
||||
return (GLUTProc) glXGetProcAddressARB((const GLubyte *) procName);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
@@ -32,7 +32,7 @@ default: $(LIB_DIR)/$(GLUT_LIB_NAME)
|
||||
|
||||
# Make the library
|
||||
$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLUT_LIB) \
|
||||
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
|
||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
|
||||
-patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
|
||||
$(GLUT_LIB_DEPS) $(OBJECTS)
|
||||
|
@@ -90,9 +90,9 @@ default: $(LIB_DIR)/$(GLUT_LIB_NAME)
|
||||
|
||||
# Make the library
|
||||
$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLUT_LIB) \
|
||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
|
||||
-patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
|
||||
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
|
||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
||||
$(MKLIB_OPTIONS) -install $(LIB_DIR) \
|
||||
$(GLUT_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
|
||||
|
@@ -55,9 +55,9 @@ default: depend $(LIB_DIR)/$(GLUT_LIB_NAME)
|
||||
|
||||
# Make the library
|
||||
$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLUT_LIB) \
|
||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
|
||||
-patch $(GLUT_TINY) $(GLUT_LIB_DEPS) -install $(LIB_DIR) \
|
||||
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
|
||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
||||
$(GLUT_LIB_DEPS) -install $(LIB_DIR) \
|
||||
$(MKLIB_OPTIONS) $(OBJECTS)
|
||||
|
||||
|
||||
|
@@ -33,8 +33,9 @@ clean:
|
||||
|
||||
# Make the library
|
||||
$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GLW_LIB) -major $(MAJOR) -minor $(MINOR) \
|
||||
-patch $(TINY) $(MKLIB_OPTIONS) -install $(LIB_DIR) \
|
||||
$(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' \
|
||||
-major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
|
||||
$(MKLIB_OPTIONS) -install $(LIB_DIR) \
|
||||
$(GLW_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
|
||||
|
@@ -55,7 +55,8 @@ default: depend $(LIB_DIR)/$(GL_LIB_NAME)
|
||||
|
||||
# Make libGL
|
||||
$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GL_LIB) -major 1 -minor 2 $(MKLIB_OPTIONS) \
|
||||
$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
|
||||
-major 1 -minor 2 $(MKLIB_OPTIONS) \
|
||||
-install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
|
||||
rm -f $(LIB_DIR)/miniglx.conf
|
||||
install example.miniglx.conf $(LIB_DIR)/miniglx.conf
|
||||
|
@@ -1,16 +1,12 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
# This is a bit messy. We want this libGL to be capable of loading old
|
||||
# interface drivers, so we have to turn off DRI_NEW_INTERFACE_ONLY. However,
|
||||
# glcontextmodes.c is built elsewhere with DNIO on, so we symlink it across.
|
||||
#
|
||||
# Furthermore, context creation has evolved over the years, such that this
|
||||
# Context creation has evolved over the years, such that this
|
||||
# code will not build with DNIO defined. When we finally drop old interface
|
||||
# support in libGL, we need to clean up both glxcmds.c and dri_interface.h.
|
||||
|
||||
DEFINES += -DGLX_DIRECT_RENDERING -DGLXEXT -DXF86DRI -DGLX_USE_DLOPEN \
|
||||
-DGLX_USE_MESA -DXF86VIDMODE -D_REENTRANT -UDRI_NEW_INTERFACE_ONLY
|
||||
-DGLX_USE_MESA -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
|
||||
|
||||
C_SOURCES = \
|
||||
$(TOP)/src/mesa/glapi/glapi.c \
|
||||
@@ -49,6 +45,7 @@ C_SOURCES = \
|
||||
XF86dri.c \
|
||||
|
||||
X86_SOURCES = $(TOP)/src/mesa/x86/glapi_x86.S
|
||||
X86-64_SOURCES = $(TOP)/src/mesa/x86-64/glapi_x86-64.S
|
||||
|
||||
# ASM_SOURCES = $(X86_SOURCES)
|
||||
|
||||
@@ -91,7 +88,8 @@ dispatch.c:
|
||||
|
||||
# Make libGL
|
||||
$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GL_LIB) -major 1 -minor 2 $(MKLIB_OPTIONS) \
|
||||
$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
|
||||
-major 1 -minor 2 $(MKLIB_OPTIONS) \
|
||||
-install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
|
||||
|
@@ -55,14 +55,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#define RTLD_GLOBAL 0
|
||||
#endif
|
||||
|
||||
#ifdef BUILT_IN_DRI_DRIVER
|
||||
|
||||
extern void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
int numConfigs, __GLXvisualConfig *config);
|
||||
|
||||
|
||||
#else /* BUILT_IN_DRI_DRIVER */
|
||||
|
||||
|
||||
#ifndef DEFAULT_DRIVER_DIR
|
||||
/* this is normally defined in the Imakefile */
|
||||
@@ -102,23 +94,6 @@ static void ErrorMessageF(const char *f, ...)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* We'll save a pointer to this function when we couldn't find a
|
||||
* direct rendering driver for a given screen.
|
||||
*/
|
||||
static void *DummyCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
int numConfigs, __GLXvisualConfig *config)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) scrn;
|
||||
(void) psc;
|
||||
(void) numConfigs;
|
||||
(void) config;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Extract the ith directory path out of a colon-separated list of paths. No
|
||||
* more than \c dirLen characters, including the terminating \c NUL, will be
|
||||
@@ -181,6 +156,19 @@ ExtractDir(int index, const char *paths, int dirLen, char *dir)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Versioned name of the expected \c __driCreateNewScreen function.
|
||||
*
|
||||
* The version of the last incompatible loader/driver inteface change is
|
||||
* appended to the name of the \c __driCreateNewScreen function. This
|
||||
* prevents loaders from trying to load drivers that are too old.
|
||||
*
|
||||
* \todo
|
||||
* Create a macro or something so that this is automatically updated.
|
||||
*/
|
||||
static const char createNewScreenName[] = "__driCreateNewScreen_20050727";
|
||||
|
||||
|
||||
/**
|
||||
* Try to \c dlopen the named driver.
|
||||
*
|
||||
@@ -249,18 +237,16 @@ static __DRIdriver *OpenDriver(const char *driverName)
|
||||
return NULL; /* out of memory! */
|
||||
}
|
||||
|
||||
driver->createScreenFunc = (CreateScreenFunc)
|
||||
dlsym(handle, "__driCreateScreen");
|
||||
driver->createNewScreenFunc = (CreateNewScreenFunc)
|
||||
dlsym(handle, "__driCreateNewScreen");
|
||||
driver->createNewScreenFunc = (PFNCREATENEWSCREENFUNC)
|
||||
dlsym(handle, createNewScreenName);
|
||||
|
||||
if ( (driver->createScreenFunc == NULL)
|
||||
&& (driver->createNewScreenFunc == NULL) ) {
|
||||
if ( driver->createNewScreenFunc == NULL ) {
|
||||
/* If the driver doesn't have this symbol then something's
|
||||
* really, really wrong.
|
||||
*/
|
||||
ErrorMessageF("Neither __driCreateScreen or __driCreateNewScreen "
|
||||
"are defined in %s_dri.so!\n", driverName);
|
||||
ErrorMessageF("%s not defined in %s_dri.so!\n"
|
||||
"Your driver may be too old for this libGL.\n",
|
||||
createNewScreenName, driverName);
|
||||
Xfree(driver);
|
||||
dlclose(handle);
|
||||
continue;
|
||||
@@ -379,9 +365,6 @@ const char *glXGetDriverConfig (const char *driverName) {
|
||||
}
|
||||
|
||||
|
||||
#endif /* BUILT_IN_DRI_DRIVER */
|
||||
|
||||
|
||||
/* This function isn't currently used.
|
||||
*/
|
||||
static void driDestroyDisplay(Display *dpy, void *private)
|
||||
@@ -420,7 +403,6 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp)
|
||||
*/
|
||||
pdisp->private = NULL;
|
||||
pdisp->destroyDisplay = NULL;
|
||||
pdisp->createScreen = NULL;
|
||||
|
||||
if (!XF86DRIQueryExtension(dpy, &eventBase, &errorBase)) {
|
||||
return NULL;
|
||||
@@ -441,17 +423,10 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp)
|
||||
|
||||
pdisp->destroyDisplay = driDestroyDisplay;
|
||||
|
||||
/* allocate array of pointers to createScreen funcs */
|
||||
pdisp->createScreen = (CreateScreenFunc *) Xmalloc(numScreens * sizeof(void *));
|
||||
if (!pdisp->createScreen) {
|
||||
Xfree(pdpyp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* allocate array of pointers to createScreen funcs */
|
||||
pdisp->createNewScreen = (CreateNewScreenFunc *) Xmalloc(numScreens * sizeof(void *));
|
||||
/* allocate array of pointers to createNewScreen funcs */
|
||||
pdisp->createNewScreen = (PFNCREATENEWSCREENFUNC *)
|
||||
Xmalloc(numScreens * sizeof(void *));
|
||||
if (!pdisp->createNewScreen) {
|
||||
Xfree(pdisp->createScreen);
|
||||
Xfree(pdpyp);
|
||||
return NULL;
|
||||
}
|
||||
@@ -460,20 +435,10 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp)
|
||||
pdpyp->libraryHandles = (void **) Xmalloc(numScreens * sizeof(void*));
|
||||
if (!pdpyp->libraryHandles) {
|
||||
Xfree(pdisp->createNewScreen);
|
||||
Xfree(pdisp->createScreen);
|
||||
Xfree(pdpyp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef BUILT_IN_DRI_DRIVER
|
||||
/* we'll statically bind to the built-in __driCreateScreen function */
|
||||
for (scrn = 0; scrn < numScreens; scrn++) {
|
||||
pdisp->createScreen[scrn] = __driCreateScreen;
|
||||
pdisp->createNewScreen[scrn] = NULL;
|
||||
pdpyp->libraryHandles[scrn] = NULL;
|
||||
}
|
||||
|
||||
#else
|
||||
/* dynamically discover DRI drivers for all screens, saving each
|
||||
* driver's "__driCreateScreen" function pointer. That's the bootstrap
|
||||
* entrypoint for all DRI drivers.
|
||||
@@ -481,17 +446,14 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp)
|
||||
for (scrn = 0; scrn < numScreens; scrn++) {
|
||||
__DRIdriver *driver = driGetDriver(dpy, scrn);
|
||||
if (driver) {
|
||||
pdisp->createScreen[scrn] = driver->createScreenFunc;
|
||||
pdisp->createNewScreen[scrn] = driver->createNewScreenFunc;
|
||||
pdpyp->libraryHandles[scrn] = driver->handle;
|
||||
}
|
||||
else {
|
||||
pdisp->createScreen[scrn] = DummyCreateScreen;
|
||||
pdisp->createNewScreen[scrn] = NULL;
|
||||
pdpyp->libraryHandles[scrn] = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return (void *)pdpyp;
|
||||
}
|
||||
|
@@ -40,10 +40,6 @@
|
||||
#include "glcontextmodes.h"
|
||||
#include "glheader.h"
|
||||
|
||||
#ifdef IN_DOXYGEN
|
||||
#define GLX_PREFIX(x) x
|
||||
#endif /* IN_DOXYGEN */
|
||||
|
||||
static void ChangeDrawableAttribute( Display * dpy, GLXDrawable drawable,
|
||||
const CARD32 * attribs, size_t num_attribs );
|
||||
|
||||
@@ -422,9 +418,9 @@ CreatePbuffer( Display *dpy, const __GLcontextModes * fbconfig,
|
||||
* Create a new pbuffer.
|
||||
*/
|
||||
PUBLIC GLXPbufferSGIX
|
||||
GLX_PREFIX(glXCreateGLXPbufferSGIX)(Display *dpy, GLXFBConfigSGIX config,
|
||||
unsigned int width, unsigned int height,
|
||||
int *attrib_list)
|
||||
glXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config,
|
||||
unsigned int width, unsigned int height,
|
||||
int *attrib_list)
|
||||
{
|
||||
return (GLXPbufferSGIX) CreatePbuffer( dpy, (__GLcontextModes *) config,
|
||||
width, height,
|
||||
@@ -436,8 +432,7 @@ GLX_PREFIX(glXCreateGLXPbufferSGIX)(Display *dpy, GLXFBConfigSGIX config,
|
||||
* Create a new pbuffer.
|
||||
*/
|
||||
PUBLIC GLXPbuffer
|
||||
GLX_PREFIX(glXCreatePbuffer)(Display *dpy, GLXFBConfig config,
|
||||
const int *attrib_list)
|
||||
glXCreatePbuffer(Display *dpy, GLXFBConfig config, const int *attrib_list)
|
||||
{
|
||||
return (GLXPbuffer) CreatePbuffer( dpy, (__GLcontextModes *) config,
|
||||
0, 0,
|
||||
@@ -449,7 +444,7 @@ GLX_PREFIX(glXCreatePbuffer)(Display *dpy, GLXFBConfig config,
|
||||
* Destroy an existing pbuffer.
|
||||
*/
|
||||
PUBLIC void
|
||||
GLX_PREFIX(glXDestroyPbuffer)(Display *dpy, GLXPbuffer pbuf)
|
||||
glXDestroyPbuffer(Display *dpy, GLXPbuffer pbuf)
|
||||
{
|
||||
DestroyPbuffer( dpy, pbuf );
|
||||
}
|
||||
@@ -459,8 +454,8 @@ GLX_PREFIX(glXDestroyPbuffer)(Display *dpy, GLXPbuffer pbuf)
|
||||
* Query an attribute of a drawable.
|
||||
*/
|
||||
PUBLIC void
|
||||
GLX_PREFIX(glXQueryDrawable)(Display *dpy, GLXDrawable drawable,
|
||||
int attribute, unsigned int *value)
|
||||
glXQueryDrawable(Display *dpy, GLXDrawable drawable,
|
||||
int attribute, unsigned int *value)
|
||||
{
|
||||
GetDrawableAttribute( dpy, drawable, attribute, value );
|
||||
}
|
||||
@@ -470,8 +465,8 @@ GLX_PREFIX(glXQueryDrawable)(Display *dpy, GLXDrawable drawable,
|
||||
* Query an attribute of a pbuffer.
|
||||
*/
|
||||
PUBLIC int
|
||||
GLX_PREFIX(glXQueryGLXPbufferSGIX)(Display *dpy, GLXPbufferSGIX drawable,
|
||||
int attribute, unsigned int *value)
|
||||
glXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX drawable,
|
||||
int attribute, unsigned int *value)
|
||||
{
|
||||
return GetDrawableAttribute( dpy, drawable, attribute, value );
|
||||
}
|
||||
@@ -481,8 +476,7 @@ GLX_PREFIX(glXQueryGLXPbufferSGIX)(Display *dpy, GLXPbufferSGIX drawable,
|
||||
* Select the event mask for a drawable.
|
||||
*/
|
||||
PUBLIC void
|
||||
GLX_PREFIX(glXSelectEvent)(Display *dpy, GLXDrawable drawable,
|
||||
unsigned long mask)
|
||||
glXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask)
|
||||
{
|
||||
CARD32 attribs[2];
|
||||
|
||||
@@ -497,8 +491,7 @@ GLX_PREFIX(glXSelectEvent)(Display *dpy, GLXDrawable drawable,
|
||||
* Get the selected event mask for a drawable.
|
||||
*/
|
||||
PUBLIC void
|
||||
GLX_PREFIX(glXGetSelectedEvent)(Display *dpy, GLXDrawable drawable,
|
||||
unsigned long *mask)
|
||||
glXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask)
|
||||
{
|
||||
unsigned int value;
|
||||
|
||||
@@ -514,8 +507,8 @@ GLX_PREFIX(glXGetSelectedEvent)(Display *dpy, GLXDrawable drawable,
|
||||
|
||||
|
||||
PUBLIC GLXPixmap
|
||||
GLX_PREFIX(glXCreatePixmap)( Display *dpy, GLXFBConfig config, Pixmap pixmap,
|
||||
const int *attrib_list )
|
||||
glXCreatePixmap( Display *dpy, GLXFBConfig config, Pixmap pixmap,
|
||||
const int *attrib_list )
|
||||
{
|
||||
return CreateDrawable( dpy, (__GLcontextModes *) config,
|
||||
(Drawable) pixmap, attrib_list,
|
||||
@@ -524,8 +517,8 @@ GLX_PREFIX(glXCreatePixmap)( Display *dpy, GLXFBConfig config, Pixmap pixmap,
|
||||
|
||||
|
||||
PUBLIC GLXWindow
|
||||
GLX_PREFIX(glXCreateWindow)( Display *dpy, GLXFBConfig config, Window win,
|
||||
const int *attrib_list )
|
||||
glXCreateWindow( Display *dpy, GLXFBConfig config, Window win,
|
||||
const int *attrib_list )
|
||||
{
|
||||
return CreateDrawable( dpy, (__GLcontextModes *) config,
|
||||
(Drawable) win, attrib_list,
|
||||
@@ -534,14 +527,14 @@ GLX_PREFIX(glXCreateWindow)( Display *dpy, GLXFBConfig config, Window win,
|
||||
|
||||
|
||||
PUBLIC void
|
||||
GLX_PREFIX(glXDestroyPixmap)(Display *dpy, GLXPixmap pixmap)
|
||||
glXDestroyPixmap(Display *dpy, GLXPixmap pixmap)
|
||||
{
|
||||
DestroyDrawable( dpy, (GLXDrawable) pixmap, X_GLXDestroyPixmap );
|
||||
}
|
||||
|
||||
|
||||
PUBLIC void
|
||||
GLX_PREFIX(glXDestroyWindow)(Display *dpy, GLXWindow win)
|
||||
glXDestroyWindow(Display *dpy, GLXWindow win)
|
||||
{
|
||||
DestroyDrawable( dpy, (GLXDrawable) win, X_GLXDestroyWindow );
|
||||
}
|
||||
|
@@ -65,9 +65,6 @@
|
||||
#elif defined( PTHREADS )
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
#ifdef GLX_BUILT_IN_XMESA
|
||||
#include "realglx.h" /* just silences prototype warnings */
|
||||
#endif
|
||||
|
||||
#define GLX_MAJOR_VERSION 1 /* current version numbers */
|
||||
#define GLX_MINOR_VERSION 4
|
||||
@@ -84,15 +81,6 @@ typedef struct _glapi_table __GLapi;
|
||||
|
||||
#include <GL/internal/dri_interface.h>
|
||||
|
||||
typedef void *(*CreateScreenFunc)(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
int numConfigs, __GLXvisualConfig *config);
|
||||
|
||||
typedef void *(*CreateNewScreenFunc)(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
const __GLcontextModes * modes, const __DRIversion * ddx_version,
|
||||
const __DRIversion * dri_version, const __DRIversion * drm_version,
|
||||
const __DRIframebuffer * frame_buffer, void * pSAREA,
|
||||
int fd, int internal_api_version, __GLcontextModes ** driver_modes);
|
||||
|
||||
|
||||
/**
|
||||
* Display dependent methods. This structure is initialized during the
|
||||
@@ -104,17 +92,6 @@ struct __DRIdisplayRec {
|
||||
*/
|
||||
void (*destroyDisplay)(Display *dpy, void *displayPrivate);
|
||||
|
||||
/**
|
||||
* Methods to create the private DRI screen data and initialize the
|
||||
* screen dependent methods.
|
||||
* This is an array [indexed by screen number] of function pointers.
|
||||
*
|
||||
* \deprecated This array of function pointers has been replaced by
|
||||
* \c __DRIdisplayRec::createNewScreen.
|
||||
* \sa __DRIdisplayRec::createNewScreen
|
||||
*/
|
||||
CreateScreenFunc * createScreen;
|
||||
|
||||
/**
|
||||
* Opaque pointer to private per display direct rendering data.
|
||||
* \c NULL if direct rendering is not supported on this display.
|
||||
@@ -124,10 +101,8 @@ struct __DRIdisplayRec {
|
||||
/**
|
||||
* Array of pointers to methods to create and initialize the private DRI
|
||||
* screen data.
|
||||
*
|
||||
* \sa __DRIdisplayRec::createScreen
|
||||
*/
|
||||
CreateNewScreenFunc * createNewScreen;
|
||||
PFNCREATENEWSCREENFUNC * createNewScreen;
|
||||
};
|
||||
|
||||
|
||||
@@ -137,8 +112,7 @@ struct __DRIdisplayRec {
|
||||
struct __DRIdriverRec {
|
||||
const char *name;
|
||||
void *handle;
|
||||
CreateScreenFunc createScreenFunc;
|
||||
CreateNewScreenFunc createNewScreenFunc;
|
||||
PFNCREATENEWSCREENFUNC createNewScreenFunc;
|
||||
struct __DRIdriverRec *next;
|
||||
};
|
||||
|
||||
@@ -160,6 +134,8 @@ extern const char *glXGetScreenDriver (Display *dpy, int scrNum);
|
||||
|
||||
extern const char *glXGetDriverConfig (const char *driverName);
|
||||
|
||||
extern Bool __glXWindowExists(Display *dpy, GLXDrawable draw);
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
@@ -512,14 +488,6 @@ extern void __glFreeAttributeState(__GLXcontext *);
|
||||
* a pointer to the config data for that screen (if the screen supports GL).
|
||||
*/
|
||||
typedef struct __GLXscreenConfigsRec {
|
||||
/**
|
||||
* GLX visuals formated as \c __GLXvisualConfig structures.
|
||||
*/
|
||||
/*@{*/
|
||||
__GLXvisualConfig * old_configs;
|
||||
int numOldConfigs;
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* GLX extension string reported by the X-server.
|
||||
*/
|
||||
@@ -539,10 +507,10 @@ typedef struct __GLXscreenConfigsRec {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Linked list of configurations for this screen. This is intended to
|
||||
* be a superset of \c old_configs.
|
||||
* Linked list of configurations for this screen.
|
||||
*/
|
||||
__GLcontextModes *configs;
|
||||
|
||||
/**
|
||||
* Per-screen dynamic GLX extension tracking. The \c direct_support
|
||||
* field only contains enough bits for 64 extensions. Should libGL
|
||||
@@ -749,17 +717,6 @@ extern void _XSend(Display*, const void*, long);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
** GLX_BUILT_IN_XMESA controls whether libGL has a built-in verions of
|
||||
** Mesa that can render to non-GLX displays.
|
||||
*/
|
||||
#ifdef GLX_BUILT_IN_XMESA
|
||||
#define GLX_PREFIX(function) _real_##function
|
||||
#else
|
||||
#define GLX_PREFIX(function) function
|
||||
#endif
|
||||
|
||||
|
||||
extern void __glXInitializeVisualConfigFromTags( __GLcontextModes *config,
|
||||
int count, const INT32 *bp, Bool tagged_only, Bool fbconfig_style_tags );
|
||||
|
||||
|
@@ -49,136 +49,17 @@
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
#include "indirect_init.h"
|
||||
#include "xf86vmode.h"
|
||||
#include "xf86dri.h"
|
||||
#endif
|
||||
#include "glxextensions.h"
|
||||
#include "glcontextmodes.h"
|
||||
#include "glheader.h"
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef IN_DOXYGEN
|
||||
#define GLX_PREFIX(x) x
|
||||
#endif /* IN_DOXYGEN */
|
||||
|
||||
static const char __glXGLXClientVendorName[] = "SGI";
|
||||
static const char __glXGLXClientVersion[] = "1.4";
|
||||
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING)
|
||||
#include "xf86dri.h"
|
||||
|
||||
static Bool __glXWindowExists(Display *dpy, GLXDrawable draw);
|
||||
|
||||
static void * DriverCreateContextWrapper( const __GLXscreenConfigs *psc,
|
||||
Display *dpy, XVisualInfo *vis, void *shared, __DRIcontext *ctx,
|
||||
const __GLcontextModes *fbconfig, int render_type );
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
static Bool dummyBindContext2( Display *dpy, int scrn,
|
||||
GLXDrawable draw, GLXDrawable read, GLXContext gc );
|
||||
|
||||
static Bool dummyUnbindContext2( Display *dpy, int scrn,
|
||||
GLXDrawable draw, GLXDrawable read, GLXContext gc );
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/**
|
||||
* Used as glue when a driver does not support
|
||||
* \c __DRIcontextRec::bindContext2.
|
||||
*
|
||||
* XXX .bindContext is only defined as a function pointer if
|
||||
* !DRI_NEW_INTERFACE_ONLY.
|
||||
*
|
||||
* \sa DriverCreateContextWrapper, __DRIcontextRec::bindContext2
|
||||
*/
|
||||
static Bool dummyBindContext2( Display *dpy, int scrn,
|
||||
GLXDrawable draw, GLXDrawable read,
|
||||
GLXContext gc )
|
||||
{
|
||||
assert( draw == read );
|
||||
return (*gc->driContext.bindContext)( dpy, scrn, draw, gc );
|
||||
}
|
||||
|
||||
/**
|
||||
* Used as glue when a driver does not support
|
||||
* \c __DRIcontextRec::unbindContext2.
|
||||
*
|
||||
* XXX .unbindContext is only defined as a function pointer if
|
||||
* !DRI_NEW_INTERFACE_ONLY.
|
||||
*
|
||||
* \sa DriverCreateContextWrapper, __DRIcontextRec::unbindContext2
|
||||
*/
|
||||
static Bool dummyUnbindContext2( Display *dpy, int scrn,
|
||||
GLXDrawable draw, GLXDrawable read,
|
||||
GLXContext gc )
|
||||
{
|
||||
assert( draw == read );
|
||||
return (*gc->driContext.unbindContext)( dpy, scrn, draw, gc, GL_FALSE );
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/**
|
||||
* Wrap the call to the driver's \c createContext function.
|
||||
*
|
||||
* The \c createContext function is wrapped because not all drivers support
|
||||
* the "new" \c unbindContext2 and \c bindContext2 interfaces. libGL should
|
||||
* not have to check to see which functions the driver supports. Instead,
|
||||
* if either function is not supported it is wrapped. The wrappers test to
|
||||
* make sure that both drawables are the same and pass control to the old
|
||||
* interface.
|
||||
*
|
||||
* \sa dummyBindContext2, dummyUnbindContext2,
|
||||
* __DRIcontextRec::bindContext2, __DRIcontextRec::unbindContext2
|
||||
*/
|
||||
|
||||
static void * DriverCreateContextWrapper( const __GLXscreenConfigs *psc,
|
||||
Display *dpy, XVisualInfo *vis,
|
||||
void *shared,
|
||||
__DRIcontext *ctx,
|
||||
const __GLcontextModes *modes,
|
||||
int render_type )
|
||||
{
|
||||
void * ctx_priv = NULL;
|
||||
|
||||
if ( psc->driScreen.createNewContext != NULL ) {
|
||||
assert( modes != NULL );
|
||||
ctx_priv = (*psc->driScreen.createNewContext)(dpy, modes, render_type,
|
||||
shared, ctx);
|
||||
|
||||
/* If the driver supports the createNewContext interface, then
|
||||
* it MUST also support either the bindContext2 / unbindContext2
|
||||
* interface or the bindContext3 / unbindContext3 interface.
|
||||
*/
|
||||
|
||||
assert( (ctx_priv == NULL) || (ctx->unbindContext2 != NULL)
|
||||
|| (ctx->unbindContext3 != NULL) );
|
||||
assert( (ctx_priv == NULL) || (ctx->bindContext2 != NULL)
|
||||
|| (ctx->bindContext3 != NULL) );
|
||||
}
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
else {
|
||||
if ( vis != NULL ) {
|
||||
ctx_priv = (*psc->driScreen.createContext)(dpy, vis, shared, ctx);
|
||||
|
||||
if ( ctx_priv != NULL ) {
|
||||
if ( ctx->unbindContext2 == NULL ) {
|
||||
ctx->unbindContext2 = dummyUnbindContext2;
|
||||
}
|
||||
|
||||
if ( ctx->bindContext2 == NULL ) {
|
||||
ctx->bindContext2 = dummyBindContext2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return ctx_priv;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/**
|
||||
* Get the __DRIdrawable for the drawable associated with a GLXContext
|
||||
@@ -469,10 +350,10 @@ CreateContext(Display *dpy, XVisualInfo *vis,
|
||||
if (psc && psc->driScreen.private) {
|
||||
void * const shared = (shareList != NULL)
|
||||
? shareList->driContext.private : NULL;
|
||||
gc->driContext.private =
|
||||
DriverCreateContextWrapper( psc, dpy, vis, shared,
|
||||
&gc->driContext, mode,
|
||||
renderType );
|
||||
gc->driContext.private =
|
||||
(*psc->driScreen.createNewContext)( dpy, mode, renderType,
|
||||
shared,
|
||||
&gc->driContext );
|
||||
if (gc->driContext.private) {
|
||||
gc->isDirect = GL_TRUE;
|
||||
gc->screen = mode->screen;
|
||||
@@ -543,9 +424,8 @@ CreateContext(Display *dpy, XVisualInfo *vis,
|
||||
return gc;
|
||||
}
|
||||
|
||||
PUBLIC GLXContext GLX_PREFIX(glXCreateContext)(Display *dpy, XVisualInfo *vis,
|
||||
GLXContext shareList,
|
||||
Bool allowDirect)
|
||||
PUBLIC GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis,
|
||||
GLXContext shareList, Bool allowDirect)
|
||||
{
|
||||
return CreateContext(dpy, vis, NULL, shareList, allowDirect, None,
|
||||
False, 0);
|
||||
@@ -620,7 +500,7 @@ DestroyContext(Display *dpy, GLXContext gc)
|
||||
}
|
||||
}
|
||||
|
||||
PUBLIC void GLX_PREFIX(glXDestroyContext)(Display *dpy, GLXContext gc)
|
||||
PUBLIC void glXDestroyContext(Display *dpy, GLXContext gc)
|
||||
{
|
||||
DestroyContext(dpy, gc);
|
||||
}
|
||||
@@ -628,7 +508,7 @@ PUBLIC void GLX_PREFIX(glXDestroyContext)(Display *dpy, GLXContext gc)
|
||||
/*
|
||||
** Return the major and minor version #s for the GLX extension
|
||||
*/
|
||||
PUBLIC Bool GLX_PREFIX(glXQueryVersion)(Display *dpy, int *major, int *minor)
|
||||
PUBLIC Bool glXQueryVersion(Display *dpy, int *major, int *minor)
|
||||
{
|
||||
__GLXdisplayPrivate *priv;
|
||||
|
||||
@@ -644,8 +524,7 @@ PUBLIC Bool GLX_PREFIX(glXQueryVersion)(Display *dpy, int *major, int *minor)
|
||||
/*
|
||||
** Query the existance of the GLX extension
|
||||
*/
|
||||
PUBLIC Bool GLX_PREFIX(glXQueryExtension)(Display *dpy, int *errorBase,
|
||||
int *eventBase)
|
||||
PUBLIC Bool glXQueryExtension(Display *dpy, int *errorBase, int *eventBase)
|
||||
{
|
||||
int major_op, erb, evb;
|
||||
Bool rv;
|
||||
@@ -662,7 +541,7 @@ PUBLIC Bool GLX_PREFIX(glXQueryExtension)(Display *dpy, int *errorBase,
|
||||
** Put a barrier in the token stream that forces the GL to finish its
|
||||
** work before X can proceed.
|
||||
*/
|
||||
PUBLIC void GLX_PREFIX(glXWaitGL)(void)
|
||||
PUBLIC void glXWaitGL(void)
|
||||
{
|
||||
xGLXWaitGLReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
@@ -698,7 +577,7 @@ PUBLIC void GLX_PREFIX(glXWaitGL)(void)
|
||||
** Put a barrier in the token stream that forces X to finish its
|
||||
** work before GL can proceed.
|
||||
*/
|
||||
PUBLIC void GLX_PREFIX(glXWaitX)(void)
|
||||
PUBLIC void glXWaitX(void)
|
||||
{
|
||||
xGLXWaitXReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
@@ -728,8 +607,7 @@ PUBLIC void GLX_PREFIX(glXWaitX)(void)
|
||||
SyncHandle();
|
||||
}
|
||||
|
||||
PUBLIC void GLX_PREFIX(glXUseXFont)(Font font, int first, int count,
|
||||
int listBase)
|
||||
PUBLIC void glXUseXFont(Font font, int first, int count, int listBase)
|
||||
{
|
||||
xGLXUseXFontReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
@@ -767,8 +645,8 @@ PUBLIC void GLX_PREFIX(glXUseXFont)(Font font, int first, int count,
|
||||
** Copy the source context to the destination context using the
|
||||
** attribute "mask".
|
||||
*/
|
||||
PUBLIC void GLX_PREFIX(glXCopyContext)(Display *dpy, GLXContext source,
|
||||
GLXContext dest, unsigned long mask)
|
||||
PUBLIC void glXCopyContext(Display *dpy, GLXContext source,
|
||||
GLXContext dest, unsigned long mask)
|
||||
{
|
||||
xGLXCopyContextReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
@@ -842,7 +720,13 @@ static Bool __glXIsDirect(Display *dpy, GLXContextID contextID)
|
||||
return reply.isDirect;
|
||||
}
|
||||
|
||||
PUBLIC Bool GLX_PREFIX(glXIsDirect)(Display *dpy, GLXContext gc)
|
||||
/**
|
||||
* \todo
|
||||
* Shouldn't this function \b always return \c GL_FALSE when
|
||||
* \c GLX_DIRECT_RENDERING is not defined? Do we really need to bother with
|
||||
* the GLX protocol here at all?
|
||||
*/
|
||||
PUBLIC Bool glXIsDirect(Display *dpy, GLXContext gc)
|
||||
{
|
||||
if (!gc) {
|
||||
return GL_FALSE;
|
||||
@@ -854,8 +738,8 @@ PUBLIC Bool GLX_PREFIX(glXIsDirect)(Display *dpy, GLXContext gc)
|
||||
return __glXIsDirect(dpy, gc->xid);
|
||||
}
|
||||
|
||||
PUBLIC GLXPixmap GLX_PREFIX(glXCreateGLXPixmap)(Display *dpy, XVisualInfo *vis,
|
||||
Pixmap pixmap)
|
||||
PUBLIC GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis,
|
||||
Pixmap pixmap)
|
||||
{
|
||||
xGLXCreateGLXPixmapReq *req;
|
||||
GLXPixmap xid;
|
||||
@@ -883,7 +767,7 @@ PUBLIC GLXPixmap GLX_PREFIX(glXCreateGLXPixmap)(Display *dpy, XVisualInfo *vis,
|
||||
/*
|
||||
** Destroy the named pixmap
|
||||
*/
|
||||
PUBLIC void GLX_PREFIX(glXDestroyGLXPixmap)(Display *dpy, GLXPixmap glxpixmap)
|
||||
PUBLIC void glXDestroyGLXPixmap(Display *dpy, GLXPixmap glxpixmap)
|
||||
{
|
||||
xGLXDestroyGLXPixmapReq *req;
|
||||
CARD8 opcode;
|
||||
@@ -903,7 +787,7 @@ PUBLIC void GLX_PREFIX(glXDestroyGLXPixmap)(Display *dpy, GLXPixmap glxpixmap)
|
||||
SyncHandle();
|
||||
}
|
||||
|
||||
PUBLIC void GLX_PREFIX(glXSwapBuffers)(Display *dpy, GLXDrawable drawable)
|
||||
PUBLIC void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
|
||||
{
|
||||
xGLXSwapBuffersReq *req;
|
||||
GLXContext gc;
|
||||
@@ -952,8 +836,8 @@ PUBLIC void GLX_PREFIX(glXSwapBuffers)(Display *dpy, GLXDrawable drawable)
|
||||
** Return configuration information for the given display, screen and
|
||||
** visual combination.
|
||||
*/
|
||||
PUBLIC int GLX_PREFIX(glXGetConfig)(Display *dpy, XVisualInfo *vis,
|
||||
int attribute, int *value_return)
|
||||
PUBLIC int glXGetConfig(Display *dpy, XVisualInfo *vis, int attribute,
|
||||
int *value_return)
|
||||
{
|
||||
__GLXdisplayPrivate *priv;
|
||||
__GLXscreenConfigs *psc;
|
||||
@@ -1309,8 +1193,7 @@ choose_visual( __GLcontextModes ** configs, int num_configs,
|
||||
** Return the visual that best matches the template. Return None if no
|
||||
** visual matches the template.
|
||||
*/
|
||||
PUBLIC XVisualInfo *GLX_PREFIX(glXChooseVisual)(Display *dpy, int screen,
|
||||
int *attribList)
|
||||
PUBLIC XVisualInfo *glXChooseVisual(Display *dpy, int screen, int *attribList)
|
||||
{
|
||||
XVisualInfo *visualList = NULL;
|
||||
__GLXdisplayPrivate *priv;
|
||||
@@ -1368,8 +1251,7 @@ PUBLIC XVisualInfo *GLX_PREFIX(glXChooseVisual)(Display *dpy, int screen,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC const char *GLX_PREFIX(glXQueryExtensionsString)( Display *dpy,
|
||||
int screen )
|
||||
PUBLIC const char *glXQueryExtensionsString( Display *dpy, int screen )
|
||||
{
|
||||
__GLXscreenConfigs *psc;
|
||||
__GLXdisplayPrivate *priv;
|
||||
@@ -1397,7 +1279,7 @@ PUBLIC const char *GLX_PREFIX(glXQueryExtensionsString)( Display *dpy,
|
||||
return psc->effectiveGLXexts;
|
||||
}
|
||||
|
||||
PUBLIC const char *GLX_PREFIX(glXGetClientString)( Display *dpy, int name )
|
||||
PUBLIC const char *glXGetClientString( Display *dpy, int name )
|
||||
{
|
||||
switch(name) {
|
||||
case GLX_VENDOR:
|
||||
@@ -1411,8 +1293,7 @@ PUBLIC const char *GLX_PREFIX(glXGetClientString)( Display *dpy, int name )
|
||||
}
|
||||
}
|
||||
|
||||
PUBLIC const char *GLX_PREFIX(glXQueryServerString)( Display *dpy, int screen,
|
||||
int name )
|
||||
PUBLIC const char *glXQueryServerString( Display *dpy, int screen, int name )
|
||||
{
|
||||
__GLXscreenConfigs *psc;
|
||||
__GLXdisplayPrivate *priv;
|
||||
@@ -1593,8 +1474,7 @@ static int __glXQueryContextInfo(Display *dpy, GLXContext ctx)
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
GLX_PREFIX(glXQueryContext)(Display *dpy, GLXContext ctx,
|
||||
int attribute, int *value)
|
||||
glXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value)
|
||||
{
|
||||
int retVal;
|
||||
|
||||
@@ -1635,8 +1515,7 @@ PUBLIC GLXContextID glXGetContextIDEXT(const GLXContext ctx)
|
||||
return ctx->xid;
|
||||
}
|
||||
|
||||
PUBLIC GLXContext GLX_PREFIX(glXImportContextEXT)(Display *dpy,
|
||||
GLXContextID contextID)
|
||||
PUBLIC GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID)
|
||||
{
|
||||
GLXContext ctx;
|
||||
|
||||
@@ -1656,7 +1535,7 @@ PUBLIC GLXContext GLX_PREFIX(glXImportContextEXT)(Display *dpy,
|
||||
return ctx;
|
||||
}
|
||||
|
||||
PUBLIC void GLX_PREFIX(glXFreeContextEXT)(Display *dpy, GLXContext ctx)
|
||||
PUBLIC void glXFreeContextEXT(Display *dpy, GLXContext ctx)
|
||||
{
|
||||
DestroyContext(dpy, ctx);
|
||||
}
|
||||
@@ -1667,16 +1546,15 @@ PUBLIC void GLX_PREFIX(glXFreeContextEXT)(Display *dpy, GLXContext ctx)
|
||||
* GLX 1.3 functions - these are just stubs for now!
|
||||
*/
|
||||
|
||||
PUBLIC GLXFBConfig *GLX_PREFIX(glXChooseFBConfig)(Display *dpy, int screen,
|
||||
const int *attribList,
|
||||
int *nitems)
|
||||
PUBLIC GLXFBConfig *glXChooseFBConfig(Display *dpy, int screen,
|
||||
const int *attribList, int *nitems)
|
||||
{
|
||||
__GLcontextModes ** config_list;
|
||||
int list_size;
|
||||
|
||||
|
||||
config_list = (__GLcontextModes **)
|
||||
GLX_PREFIX(glXGetFBConfigs)( dpy, screen, & list_size );
|
||||
glXGetFBConfigs( dpy, screen, & list_size );
|
||||
|
||||
if ( (config_list != NULL) && (list_size > 0) && (attribList != NULL) ) {
|
||||
list_size = choose_visual( config_list, list_size, attribList,
|
||||
@@ -1692,26 +1570,23 @@ PUBLIC GLXFBConfig *GLX_PREFIX(glXChooseFBConfig)(Display *dpy, int screen,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLXContext GLX_PREFIX(glXCreateNewContext)(Display *dpy,
|
||||
GLXFBConfig config,
|
||||
int renderType,
|
||||
GLXContext shareList,
|
||||
Bool allowDirect)
|
||||
PUBLIC GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config,
|
||||
int renderType, GLXContext shareList,
|
||||
Bool allowDirect)
|
||||
{
|
||||
return CreateContext( dpy, NULL, (__GLcontextModes *) config, shareList,
|
||||
allowDirect, None, True, renderType );
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLXDrawable GLX_PREFIX(glXGetCurrentReadDrawable)(void)
|
||||
PUBLIC GLXDrawable glXGetCurrentReadDrawable(void)
|
||||
{
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
return gc->currentReadable;
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLXFBConfig *GLX_PREFIX(glXGetFBConfigs)(Display *dpy, int screen,
|
||||
int *nelements)
|
||||
PUBLIC GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements)
|
||||
{
|
||||
__GLXdisplayPrivate *priv = __glXInitialize(dpy);
|
||||
__GLcontextModes ** config = NULL;
|
||||
@@ -1750,8 +1625,8 @@ PUBLIC GLXFBConfig *GLX_PREFIX(glXGetFBConfigs)(Display *dpy, int screen,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC int GLX_PREFIX(glXGetFBConfigAttrib)(Display *dpy, GLXFBConfig config,
|
||||
int attribute, int *value)
|
||||
PUBLIC int glXGetFBConfigAttrib(Display *dpy, GLXFBConfig config,
|
||||
int attribute, int *value)
|
||||
{
|
||||
__GLcontextModes * const modes = ValidateGLXFBConfig( dpy, config );
|
||||
|
||||
@@ -1761,8 +1636,7 @@ PUBLIC int GLX_PREFIX(glXGetFBConfigAttrib)(Display *dpy, GLXFBConfig config,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC XVisualInfo *GLX_PREFIX(glXGetVisualFromFBConfig)(Display *dpy,
|
||||
GLXFBConfig config)
|
||||
PUBLIC XVisualInfo *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config)
|
||||
{
|
||||
XVisualInfo visualTemplate;
|
||||
__GLcontextModes * fbconfig = (__GLcontextModes *) config;
|
||||
@@ -1787,7 +1661,7 @@ PUBLIC GLX_ALIAS(GLXDrawable, glXGetCurrentReadDrawableSGI, (void), (),
|
||||
/*
|
||||
** GLX_SGI_swap_control
|
||||
*/
|
||||
PUBLIC int GLX_PREFIX(glXSwapIntervalSGI)(int interval)
|
||||
PUBLIC int glXSwapIntervalSGI(int interval)
|
||||
{
|
||||
xGLXVendorPrivateReq *req;
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
@@ -1848,7 +1722,7 @@ PUBLIC int GLX_PREFIX(glXSwapIntervalSGI)(int interval)
|
||||
/*
|
||||
** GLX_MESA_swap_control
|
||||
*/
|
||||
PUBLIC GLint GLX_PREFIX(glXSwapIntervalMESA)(unsigned interval)
|
||||
PUBLIC GLint glXSwapIntervalMESA(unsigned interval)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
@@ -1880,7 +1754,7 @@ PUBLIC GLint GLX_PREFIX(glXSwapIntervalMESA)(unsigned interval)
|
||||
return GLX_BAD_CONTEXT;
|
||||
}
|
||||
|
||||
PUBLIC GLint GLX_PREFIX(glXGetSwapIntervalMESA)( void )
|
||||
PUBLIC GLint glXGetSwapIntervalMESA( void )
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
@@ -1910,8 +1784,7 @@ PUBLIC GLint GLX_PREFIX(glXGetSwapIntervalMESA)( void )
|
||||
** GLX_MESA_swap_frame_usage
|
||||
*/
|
||||
|
||||
PUBLIC GLint GLX_PREFIX(glXBeginFrameTrackingMESA)(Display *dpy,
|
||||
GLXDrawable drawable)
|
||||
PUBLIC GLint glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
|
||||
{
|
||||
int status = GLX_BAD_CONTEXT;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
@@ -1931,8 +1804,7 @@ PUBLIC GLint GLX_PREFIX(glXBeginFrameTrackingMESA)(Display *dpy,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLint GLX_PREFIX(glXEndFrameTrackingMESA)(Display *dpy,
|
||||
GLXDrawable drawable)
|
||||
PUBLIC GLint glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable)
|
||||
{
|
||||
int status = GLX_BAD_CONTEXT;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
@@ -1952,9 +1824,8 @@ PUBLIC GLint GLX_PREFIX(glXEndFrameTrackingMESA)(Display *dpy,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLint GLX_PREFIX(glXGetFrameUsageMESA)(Display *dpy,
|
||||
GLXDrawable drawable,
|
||||
GLfloat *usage)
|
||||
PUBLIC GLint glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable,
|
||||
GLfloat *usage)
|
||||
{
|
||||
int status = GLX_BAD_CONTEXT;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
@@ -1980,11 +1851,9 @@ PUBLIC GLint GLX_PREFIX(glXGetFrameUsageMESA)(Display *dpy,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLint GLX_PREFIX(glXQueryFrameTrackingMESA)(Display *dpy,
|
||||
GLXDrawable drawable,
|
||||
int64_t *sbc,
|
||||
int64_t *missedFrames,
|
||||
GLfloat *lastMissedUsage)
|
||||
PUBLIC GLint glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable,
|
||||
int64_t *sbc, int64_t *missedFrames,
|
||||
GLfloat *lastMissedUsage)
|
||||
{
|
||||
int status = GLX_BAD_CONTEXT;
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
@@ -2014,7 +1883,7 @@ PUBLIC GLint GLX_PREFIX(glXQueryFrameTrackingMESA)(Display *dpy,
|
||||
/*
|
||||
** GLX_SGI_video_sync
|
||||
*/
|
||||
PUBLIC int GLX_PREFIX(glXGetVideoSyncSGI)(unsigned int *count)
|
||||
PUBLIC int glXGetVideoSyncSGI(unsigned int *count)
|
||||
{
|
||||
/* FIXME: Looking at the GLX_SGI_video_sync spec in the extension registry,
|
||||
* FIXME: there should be a GLX encoding for this call. I can find no
|
||||
@@ -2043,8 +1912,7 @@ PUBLIC int GLX_PREFIX(glXGetVideoSyncSGI)(unsigned int *count)
|
||||
return GLX_BAD_CONTEXT;
|
||||
}
|
||||
|
||||
PUBLIC int GLX_PREFIX(glXWaitVideoSyncSGI)(int divisor, int remainder,
|
||||
unsigned int *count)
|
||||
PUBLIC int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
GLXContext gc = __glXGetCurrentContext();
|
||||
@@ -2086,7 +1954,7 @@ PUBLIC int GLX_PREFIX(glXWaitVideoSyncSGI)(int divisor, int remainder,
|
||||
*/
|
||||
#if defined(_VL_H)
|
||||
|
||||
PUBLIC GLXVideoSourceSGIX GLX_PREFIX(glXCreateGLXVideoSourceSGIX)(Display *dpy,
|
||||
PUBLIC GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX(Display *dpy,
|
||||
int screen, VLServer server, VLPath path,
|
||||
int nodeClass, VLNode drainNode)
|
||||
{
|
||||
@@ -2099,8 +1967,7 @@ PUBLIC GLXVideoSourceSGIX GLX_PREFIX(glXCreateGLXVideoSourceSGIX)(Display *dpy,
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC void GLX_PREFIX(glXDestroyGLXVideoSourceSGIX)(Display *dpy,
|
||||
GLXVideoSourceSGIX src)
|
||||
PUBLIC void glXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) src;
|
||||
@@ -2130,7 +1997,7 @@ PUBLIC GLX_ALIAS(XVisualInfo *, glXGetVisualFromFBConfigSGIX,
|
||||
(dpy, config),
|
||||
glXGetVisualFromFBConfig)
|
||||
|
||||
PUBLIC GLXPixmap GLX_PREFIX(glXCreateGLXPixmapWithConfigSGIX)(Display *dpy,
|
||||
PUBLIC GLXPixmap glXCreateGLXPixmapWithConfigSGIX(Display *dpy,
|
||||
GLXFBConfigSGIX config, Pixmap pixmap)
|
||||
{
|
||||
xGLXVendorPrivateWithReplyReq *vpreq;
|
||||
@@ -2172,7 +2039,7 @@ PUBLIC GLXPixmap GLX_PREFIX(glXCreateGLXPixmapWithConfigSGIX)(Display *dpy,
|
||||
return xid;
|
||||
}
|
||||
|
||||
PUBLIC GLXContext GLX_PREFIX(glXCreateContextWithConfigSGIX)(Display *dpy,
|
||||
PUBLIC GLXContext glXCreateContextWithConfigSGIX(Display *dpy,
|
||||
GLXFBConfigSGIX config, int renderType,
|
||||
GLXContext shareList, Bool allowDirect)
|
||||
{
|
||||
@@ -2196,8 +2063,8 @@ PUBLIC GLXContext GLX_PREFIX(glXCreateContextWithConfigSGIX)(Display *dpy,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLXFBConfigSGIX GLX_PREFIX(glXGetFBConfigFromVisualSGIX)(Display *dpy,
|
||||
XVisualInfo *vis)
|
||||
PUBLIC GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX(Display *dpy,
|
||||
XVisualInfo *vis)
|
||||
{
|
||||
__GLXdisplayPrivate *priv;
|
||||
__GLXscreenConfigs *psc;
|
||||
@@ -2216,7 +2083,7 @@ PUBLIC GLXFBConfigSGIX GLX_PREFIX(glXGetFBConfigFromVisualSGIX)(Display *dpy,
|
||||
/*
|
||||
** GLX_SGI_cushion
|
||||
*/
|
||||
PUBLIC void GLX_PREFIX(glXCushionSGI)(Display *dpy, Window win, float cushion)
|
||||
PUBLIC void glXCushionSGI(Display *dpy, Window win, float cushion)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) win;
|
||||
@@ -2227,8 +2094,8 @@ PUBLIC void GLX_PREFIX(glXCushionSGI)(Display *dpy, Window win, float cushion)
|
||||
/*
|
||||
** GLX_SGIX_video_resize
|
||||
*/
|
||||
PUBLIC int GLX_PREFIX(glXBindChannelToWindowSGIX)(Display *dpy, int screen,
|
||||
int channel , Window window)
|
||||
PUBLIC int glXBindChannelToWindowSGIX(Display *dpy, int screen,
|
||||
int channel , Window window)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) screen;
|
||||
@@ -2237,8 +2104,8 @@ PUBLIC int GLX_PREFIX(glXBindChannelToWindowSGIX)(Display *dpy, int screen,
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int GLX_PREFIX(glXChannelRectSGIX)(Display *dpy, int screen, int channel,
|
||||
int x, int y, int w, int h)
|
||||
PUBLIC int glXChannelRectSGIX(Display *dpy, int screen, int channel,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) screen;
|
||||
@@ -2250,9 +2117,8 @@ PUBLIC int GLX_PREFIX(glXChannelRectSGIX)(Display *dpy, int screen, int channel,
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int GLX_PREFIX(glXQueryChannelRectSGIX)(Display *dpy, int screen,
|
||||
int channel, int *x, int *y,
|
||||
int *w, int *h)
|
||||
PUBLIC int glXQueryChannelRectSGIX(Display *dpy, int screen, int channel,
|
||||
int *x, int *y, int *w, int *h)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) screen;
|
||||
@@ -2264,8 +2130,8 @@ PUBLIC int GLX_PREFIX(glXQueryChannelRectSGIX)(Display *dpy, int screen,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GLX_PREFIX(glXQueryChannelDeltasSGIX)(Display *dpy, int screen, int channel,
|
||||
int *dx, int *dy, int *dw, int *dh)
|
||||
int glXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel,
|
||||
int *dx, int *dy, int *dw, int *dh)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) screen;
|
||||
@@ -2277,8 +2143,8 @@ int GLX_PREFIX(glXQueryChannelDeltasSGIX)(Display *dpy, int screen, int channel,
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int GLX_PREFIX(glXChannelRectSyncSGIX)(Display *dpy, int screen,
|
||||
int channel, GLenum synctype)
|
||||
PUBLIC int glXChannelRectSyncSGIX(Display *dpy, int screen,
|
||||
int channel, GLenum synctype)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) screen;
|
||||
@@ -2290,10 +2156,8 @@ PUBLIC int GLX_PREFIX(glXChannelRectSyncSGIX)(Display *dpy, int screen,
|
||||
|
||||
#if defined(_DM_BUFFER_H_)
|
||||
|
||||
PUBLIC Bool GLX_PREFIX(glXAssociateDMPbufferSGIX)(Display *dpy,
|
||||
GLXPbufferSGIX pbuffer,
|
||||
DMparams *params,
|
||||
DMbuffer dmbuffer)
|
||||
PUBLIC Bool glXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer,
|
||||
DMparams *params, DMbuffer dmbuffer)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) pbuffer;
|
||||
@@ -2308,8 +2172,8 @@ PUBLIC Bool GLX_PREFIX(glXAssociateDMPbufferSGIX)(Display *dpy,
|
||||
/*
|
||||
** GLX_SGIX_swap_group
|
||||
*/
|
||||
PUBLIC void GLX_PREFIX(glXJoinSwapGroupSGIX)(Display *dpy, GLXDrawable drawable,
|
||||
GLXDrawable member)
|
||||
PUBLIC void glXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable,
|
||||
GLXDrawable member)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) drawable;
|
||||
@@ -2320,17 +2184,15 @@ PUBLIC void GLX_PREFIX(glXJoinSwapGroupSGIX)(Display *dpy, GLXDrawable drawable,
|
||||
/*
|
||||
** GLX_SGIX_swap_barrier
|
||||
*/
|
||||
PUBLIC void GLX_PREFIX(glXBindSwapBarrierSGIX)(Display *dpy,
|
||||
GLXDrawable drawable,
|
||||
int barrier)
|
||||
PUBLIC void glXBindSwapBarrierSGIX(Display *dpy, GLXDrawable drawable,
|
||||
int barrier)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) drawable;
|
||||
(void) barrier;
|
||||
}
|
||||
|
||||
PUBLIC Bool GLX_PREFIX(glXQueryMaxSwapBarriersSGIX)(Display *dpy, int screen,
|
||||
int *max)
|
||||
PUBLIC Bool glXQueryMaxSwapBarriersSGIX(Display *dpy, int screen, int *max)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) screen;
|
||||
@@ -2342,10 +2204,8 @@ PUBLIC Bool GLX_PREFIX(glXQueryMaxSwapBarriersSGIX)(Display *dpy, int screen,
|
||||
/*
|
||||
** GLX_SUN_get_transparent_index
|
||||
*/
|
||||
PUBLIC Status GLX_PREFIX(glXGetTransparentIndexSUN)(Display *dpy,
|
||||
Window overlay,
|
||||
Window underlay,
|
||||
long *pTransparent)
|
||||
PUBLIC Status glXGetTransparentIndexSUN(Display *dpy, Window overlay,
|
||||
Window underlay, long *pTransparent)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) overlay;
|
||||
@@ -2358,8 +2218,8 @@ PUBLIC Status GLX_PREFIX(glXGetTransparentIndexSUN)(Display *dpy,
|
||||
/*
|
||||
** GLX_OML_sync_control
|
||||
*/
|
||||
PUBLIC Bool GLX_PREFIX(glXGetSyncValuesOML)(Display *dpy, GLXDrawable drawable,
|
||||
int64_t *ust, int64_t *msc, int64_t *sbc)
|
||||
PUBLIC Bool glXGetSyncValuesOML(Display *dpy, GLXDrawable drawable,
|
||||
int64_t *ust, int64_t *msc, int64_t *sbc)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
|
||||
@@ -2403,8 +2263,8 @@ PUBLIC Bool GLX_PREFIX(glXGetSyncValuesOML)(Display *dpy, GLXDrawable drawable,
|
||||
* when GLX_OML_sync_control appears in the client extension string.
|
||||
*/
|
||||
|
||||
PUBLIC Bool GLX_PREFIX(glXGetMscRateOML)(Display * dpy, GLXDrawable drawable,
|
||||
int32_t * numerator, int32_t * denominator)
|
||||
PUBLIC Bool glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
|
||||
int32_t * numerator, int32_t * denominator)
|
||||
{
|
||||
#if defined( GLX_DIRECT_RENDERING ) && defined( XF86VIDMODE )
|
||||
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
|
||||
@@ -2477,11 +2337,9 @@ PUBLIC Bool GLX_PREFIX(glXGetMscRateOML)(Display * dpy, GLXDrawable drawable,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC int64_t GLX_PREFIX(glXSwapBuffersMscOML)(Display *dpy,
|
||||
GLXDrawable drawable,
|
||||
int64_t target_msc,
|
||||
int64_t divisor,
|
||||
int64_t remainder)
|
||||
PUBLIC int64_t glXSwapBuffersMscOML(Display *dpy, GLXDrawable drawable,
|
||||
int64_t target_msc, int64_t divisor,
|
||||
int64_t remainder)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
int screen;
|
||||
@@ -2514,10 +2372,10 @@ PUBLIC int64_t GLX_PREFIX(glXSwapBuffersMscOML)(Display *dpy,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC Bool GLX_PREFIX(glXWaitForMscOML)(Display * dpy, GLXDrawable drawable,
|
||||
int64_t target_msc, int64_t divisor,
|
||||
int64_t remainder, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc)
|
||||
PUBLIC Bool glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
|
||||
int64_t target_msc, int64_t divisor,
|
||||
int64_t remainder, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
int screen;
|
||||
@@ -2557,9 +2415,9 @@ PUBLIC Bool GLX_PREFIX(glXWaitForMscOML)(Display * dpy, GLXDrawable drawable,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC Bool GLX_PREFIX(glXWaitForSbcOML)(Display * dpy, GLXDrawable drawable,
|
||||
int64_t target_sbc, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc )
|
||||
PUBLIC Bool glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
|
||||
int64_t target_sbc, int64_t *ust,
|
||||
int64_t *msc, int64_t *sbc )
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
int screen;
|
||||
@@ -2599,9 +2457,9 @@ PUBLIC Bool GLX_PREFIX(glXWaitForSbcOML)(Display * dpy, GLXDrawable drawable,
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
PUBLIC void *GLX_PREFIX(glXAllocateMemoryMESA)(Display *dpy, int scrn,
|
||||
size_t size, float readFreq,
|
||||
float writeFreq, float priority)
|
||||
PUBLIC void *glXAllocateMemoryMESA(Display *dpy, int scrn,
|
||||
size_t size, float readFreq,
|
||||
float writeFreq, float priority)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, scrn );
|
||||
@@ -2626,7 +2484,7 @@ PUBLIC void *GLX_PREFIX(glXAllocateMemoryMESA)(Display *dpy, int scrn,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC void GLX_PREFIX(glXFreeMemoryMESA)(Display *dpy, int scrn, void *pointer)
|
||||
PUBLIC void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer)
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, scrn );
|
||||
@@ -2644,8 +2502,8 @@ PUBLIC void GLX_PREFIX(glXFreeMemoryMESA)(Display *dpy, int scrn, void *pointer)
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLuint GLX_PREFIX(glXGetMemoryOffsetMESA)( Display *dpy, int scrn,
|
||||
const void *pointer )
|
||||
PUBLIC GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn,
|
||||
const void *pointer )
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, scrn );
|
||||
@@ -2693,7 +2551,7 @@ PUBLIC GLuint GLX_PREFIX(glXGetMemoryOffsetMESA)( Display *dpy, int scrn,
|
||||
* glXDestroyPbuffer glXDestroyPixmap glXDestroyWindow
|
||||
* glXDestroyGLXPbufferSGIX glXDestroyGLXVideoSourceSGIX
|
||||
*/
|
||||
PUBLIC Bool GLX_PREFIX(glXReleaseBuffersMESA)( Display *dpy, GLXDrawable d )
|
||||
PUBLIC Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d )
|
||||
{
|
||||
(void) dpy;
|
||||
(void) d;
|
||||
@@ -2701,10 +2559,8 @@ PUBLIC Bool GLX_PREFIX(glXReleaseBuffersMESA)( Display *dpy, GLXDrawable d )
|
||||
}
|
||||
|
||||
|
||||
PUBLIC GLXPixmap GLX_PREFIX(glXCreateGLXPixmapMESA)( Display *dpy,
|
||||
XVisualInfo *visual,
|
||||
Pixmap pixmap,
|
||||
Colormap cmap )
|
||||
PUBLIC GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
|
||||
Pixmap pixmap, Colormap cmap )
|
||||
{
|
||||
(void) dpy;
|
||||
(void) visual;
|
||||
@@ -2714,9 +2570,8 @@ PUBLIC GLXPixmap GLX_PREFIX(glXCreateGLXPixmapMESA)( Display *dpy,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC void GLX_PREFIX(glXCopySubBufferMESA)(Display *dpy, GLXDrawable drawable,
|
||||
int x, int y,
|
||||
int width, int height)
|
||||
PUBLIC void glXCopySubBufferMESA(Display *dpy, GLXDrawable drawable,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
(void) dpy;
|
||||
(void) drawable;
|
||||
@@ -2727,7 +2582,7 @@ PUBLIC void GLX_PREFIX(glXCopySubBufferMESA)(Display *dpy, GLXDrawable drawable,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC Bool GLX_PREFIX(glXSet3DfxModeMESA)( int mode )
|
||||
PUBLIC Bool glXSet3DfxModeMESA( int mode )
|
||||
{
|
||||
(void) mode;
|
||||
return GL_FALSE;
|
||||
@@ -2917,28 +2772,9 @@ static const struct name_address_pair GLX_functions[] = {
|
||||
GLX_FUNCTION( glXGetSyncValuesOML ),
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
/***
|
||||
*** Internal functions useful to DRI drivers
|
||||
*** With this, the DRI drivers shouldn't need dlopen()/dlsym() to
|
||||
*** access internal libGL functions which may or may not exist.
|
||||
***/
|
||||
GLX_FUNCTION( __glXInitialize ),
|
||||
GLX_FUNCTION( __glXFindDRIScreen ),
|
||||
GLX_FUNCTION( __glXGetInternalVersion ),
|
||||
GLX_FUNCTION( __glXWindowExists ),
|
||||
GLX_FUNCTION2( __glXCreateContextWithConfig, XF86DRICreateContextWithConfig ),
|
||||
GLX_FUNCTION2( __glXGetDrawableInfo, XF86DRIGetDrawableInfo ),
|
||||
|
||||
/*** DRI configuration ***/
|
||||
GLX_FUNCTION( glXGetScreenDriver ),
|
||||
GLX_FUNCTION( glXGetDriverConfig ),
|
||||
|
||||
GLX_FUNCTION( __glXScrEnableExtension ),
|
||||
|
||||
GLX_FUNCTION( __glXGetUST ),
|
||||
|
||||
GLX_FUNCTION2( __glXCreateContextModes, _gl_context_modes_create ),
|
||||
GLX_FUNCTION2( __glXDestroyContextModes, _gl_context_modes_destroy ),
|
||||
#endif
|
||||
|
||||
{ NULL, NULL } /* end of list */
|
||||
@@ -2960,7 +2796,6 @@ get_glx_proc_address(const char *funcName)
|
||||
}
|
||||
|
||||
|
||||
#ifndef GLX_BUILT_IN_XMESA
|
||||
/**
|
||||
* Get the address of a named GL function. This is the pre-GLX 1.4 name for
|
||||
* \c glXGetProcAddress.
|
||||
@@ -3009,7 +2844,6 @@ PUBLIC void (*glXGetProcAddress(const GLubyte *procName))( void )
|
||||
return glXGetProcAddressARB(procName);
|
||||
}
|
||||
#endif /* __GNUC__ */
|
||||
#endif /* GLX_BUILT_IN_XMESA */
|
||||
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
@@ -3052,8 +2886,10 @@ int __glXGetInternalVersion(void)
|
||||
* 20040415 - Added support for bindContext3 and unbindContext3.
|
||||
* 20040602 - Add __glXGetDrawableInfo. I though that was there
|
||||
* months ago. :(
|
||||
* 20050727 - Gut all the old interfaces. This breaks compatability with
|
||||
* any DRI driver built to any previous version.
|
||||
*/
|
||||
return 20040602;
|
||||
return 20050727;
|
||||
}
|
||||
|
||||
|
||||
@@ -3087,7 +2923,7 @@ static int windowExistsErrorHandler(Display *dpy, XErrorEvent *xerr)
|
||||
*
|
||||
* \since Internal API version 20021128.
|
||||
*/
|
||||
static Bool __glXWindowExists(Display *dpy, GLXDrawable draw)
|
||||
Bool __glXWindowExists(Display *dpy, GLXDrawable draw)
|
||||
{
|
||||
XWindowAttributes xwa;
|
||||
int (*oldXErrorHandler)(Display *, XErrorEvent *);
|
||||
|
@@ -111,6 +111,10 @@ static int _mesa_sparc_needs_init = 1;
|
||||
#define INIT_MESA_SPARC
|
||||
#endif
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
static __DRIscreen *__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn);
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
||||
static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
|
||||
GLXDrawable read, GLXContext gc);
|
||||
|
||||
@@ -272,7 +276,6 @@ int __glXDebug = 0;
|
||||
*/
|
||||
int __glXCloseDisplay(Display *dpy, XExtCodes *codes);
|
||||
|
||||
static GLboolean FillInVisuals( __GLXscreenConfigs * psc );
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
@@ -352,12 +355,6 @@ static void FreeScreenConfigs(__GLXdisplayPrivate *priv)
|
||||
if(psc->effectiveGLXexts)
|
||||
Xfree(psc->effectiveGLXexts);
|
||||
|
||||
if ( psc->old_configs != NULL ) {
|
||||
Xfree( psc->old_configs );
|
||||
psc->old_configs = NULL;
|
||||
psc->numOldConfigs = 0;
|
||||
}
|
||||
|
||||
psc->configs = NULL; /* NOTE: just for paranoia */
|
||||
}
|
||||
|
||||
@@ -399,10 +396,6 @@ static int __glXFreeDisplayPrivate(XExtData *extension)
|
||||
priv->driDisplay.private = NULL;
|
||||
#endif
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
XFree(priv->driDisplay.createScreen);
|
||||
#endif
|
||||
|
||||
Xfree((char*) priv);
|
||||
return 0;
|
||||
}
|
||||
@@ -442,112 +435,6 @@ static Bool QueryVersion(Display *dpy, int opcode, int *major, int *minor)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if a \c __GLcontextModes structure has the right mojo to be
|
||||
* converted to a \c __GLXvisualConfig to be sent to an "old" style DRI
|
||||
* driver.
|
||||
*/
|
||||
#define MODE_HAS_MOJO(m) \
|
||||
((m)->visualID != GLX_DONT_CARE) \
|
||||
&& ((m)->sampleBuffers == 0) \
|
||||
&& ((m)->samples == 0) \
|
||||
&& (((m)->drawableType & GLX_WINDOW_BIT) != 0) \
|
||||
&& (((m)->xRenderable == GL_TRUE) \
|
||||
|| ((m)->xRenderable == GLX_DONT_CARE))
|
||||
|
||||
|
||||
/**
|
||||
* Convert the FBConfigs associated with a screen into an array of
|
||||
* \c __GLXvisualConfig structures. These structures are passed into DRI
|
||||
* drivers that use the "old" interface. The old-style drivers had a fairly
|
||||
* strict set of visual types that could be supported. FBConfigs that
|
||||
* cannot be supported are not converted.
|
||||
*
|
||||
* \param psc Screen whose FBConfigs need to be swizzled.
|
||||
*
|
||||
* \returns
|
||||
* If memory could be allocated and at least one FBConfig could be converted
|
||||
* to a \c __GLXvisualConfig structure, \c GL_TRUE is returned. Otherwise,
|
||||
* \c GL_FALSE is returned.
|
||||
*
|
||||
* \todo
|
||||
* When the old DRI driver interface is no longer supported, this function
|
||||
* can be removed.
|
||||
*/
|
||||
static GLboolean
|
||||
FillInVisuals( __GLXscreenConfigs * psc )
|
||||
{
|
||||
__GLcontextModes *modes;
|
||||
int glx_visual_count;
|
||||
|
||||
|
||||
glx_visual_count = 0;
|
||||
for ( modes = psc->configs ; modes != NULL ; modes = modes->next ) {
|
||||
if ( MODE_HAS_MOJO( modes ) ) {
|
||||
glx_visual_count++;
|
||||
}
|
||||
}
|
||||
|
||||
psc->old_configs = (__GLXvisualConfig *)
|
||||
Xmalloc( sizeof( __GLXvisualConfig ) * glx_visual_count );
|
||||
if ( psc->old_configs == NULL ) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
glx_visual_count = 0;
|
||||
for ( modes = psc->configs ; modes != NULL ; modes = modes->next ) {
|
||||
if ( MODE_HAS_MOJO( modes ) ) {
|
||||
|
||||
#define COPY_VALUE(src_tag,dst_tag) \
|
||||
psc->old_configs[glx_visual_count]. dst_tag = modes-> src_tag
|
||||
|
||||
COPY_VALUE( visualID, vid );
|
||||
COPY_VALUE( rgbMode, rgba );
|
||||
COPY_VALUE( stereoMode, stereo );
|
||||
COPY_VALUE( doubleBufferMode, doubleBuffer );
|
||||
|
||||
psc->old_configs[glx_visual_count].class =
|
||||
_gl_convert_to_x_visual_type( modes->visualType );
|
||||
|
||||
COPY_VALUE( level, level );
|
||||
COPY_VALUE( numAuxBuffers, auxBuffers );
|
||||
|
||||
COPY_VALUE( redBits, redSize );
|
||||
COPY_VALUE( greenBits, greenSize );
|
||||
COPY_VALUE( blueBits, blueSize );
|
||||
COPY_VALUE( alphaBits, alphaSize );
|
||||
COPY_VALUE( rgbBits, bufferSize );
|
||||
COPY_VALUE( accumRedBits, accumRedSize );
|
||||
COPY_VALUE( accumGreenBits, accumGreenSize );
|
||||
COPY_VALUE( accumBlueBits, accumBlueSize );
|
||||
COPY_VALUE( accumAlphaBits, accumAlphaSize );
|
||||
COPY_VALUE( depthBits, depthSize );
|
||||
COPY_VALUE( stencilBits, stencilSize );
|
||||
|
||||
COPY_VALUE( visualRating, visualRating );
|
||||
COPY_VALUE( transparentPixel, transparentPixel );
|
||||
COPY_VALUE( transparentRed, transparentRed );
|
||||
COPY_VALUE( transparentGreen, transparentGreen );
|
||||
COPY_VALUE( transparentBlue, transparentBlue );
|
||||
COPY_VALUE( transparentAlpha, transparentAlpha );
|
||||
COPY_VALUE( transparentIndex, transparentIndex );
|
||||
|
||||
#undef COPY_VALUE
|
||||
|
||||
glx_visual_count++;
|
||||
}
|
||||
}
|
||||
|
||||
psc->numOldConfigs = glx_visual_count;
|
||||
if ( glx_visual_count == 0 ) {
|
||||
Xfree( psc->old_configs );
|
||||
psc->old_configs = NULL;
|
||||
}
|
||||
|
||||
return (glx_visual_count != 0);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
__glXInitializeVisualConfigFromTags( __GLcontextModes *config, int count,
|
||||
const INT32 *bp, Bool tagged_only,
|
||||
@@ -784,6 +671,42 @@ filter_modes( __GLcontextModes ** server_modes,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implement \c __DRIinterfaceMethods::getProcAddress.
|
||||
*/
|
||||
static __DRIfuncPtr get_proc_address( const char * proc_name )
|
||||
{
|
||||
if (strcmp( proc_name, "glxEnableExtension" ) == 0) {
|
||||
return (__DRIfuncPtr) __glXScrEnableExtension;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Table of functions exported by the loader to the driver.
|
||||
*/
|
||||
static const __DRIinterfaceMethods interface_methods = {
|
||||
get_proc_address,
|
||||
|
||||
_gl_context_modes_create,
|
||||
_gl_context_modes_destroy,
|
||||
|
||||
__glXFindDRIScreen,
|
||||
__glXWindowExists,
|
||||
|
||||
XF86DRICreateContextWithConfig,
|
||||
XF86DRIDestroyContext,
|
||||
|
||||
XF86DRICreateDrawable,
|
||||
XF86DRIDestroyDrawable,
|
||||
XF86DRIGetDrawableInfo,
|
||||
|
||||
__glXGetUST,
|
||||
glXGetMscRateOML,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Perform the required libGL-side initialization and call the client-side
|
||||
@@ -805,7 +728,7 @@ filter_modes( __GLcontextModes ** server_modes,
|
||||
static void *
|
||||
CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
__DRIdisplay * driDpy,
|
||||
CreateNewScreenFunc createNewScreen)
|
||||
PFNCREATENEWSCREENFUNC createNewScreen)
|
||||
{
|
||||
__DRIscreenPrivate *psp = NULL;
|
||||
#ifndef GLX_USE_APPLEGL
|
||||
@@ -865,9 +788,9 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
char *driverName;
|
||||
|
||||
/*
|
||||
* Get device name (like "tdfx") and the ddx version numbers.
|
||||
* We'll check the version in each DRI driver's "createScreen"
|
||||
* function.
|
||||
* Get device name (like "tdfx") and the ddx version
|
||||
* numbers. We'll check the version in each DRI driver's
|
||||
* "createNewScreen" function.
|
||||
*/
|
||||
err_msg = "XF86DRIGetClientDriverName";
|
||||
if (XF86DRIGetClientDriverName(dpy, scrn,
|
||||
@@ -910,8 +833,9 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
|
||||
if ( status == 0 ) {
|
||||
/*
|
||||
* Map the SAREA region. Further mmap regions may be setup in
|
||||
* each DRI driver's "createScreen" function.
|
||||
* Map the SAREA region. Further mmap regions
|
||||
* may be setup in each DRI driver's
|
||||
* "createNewScreen" function.
|
||||
*/
|
||||
status = drmMap(fd, hSAREA, SAREA_MAX,
|
||||
&pSAREA);
|
||||
@@ -935,6 +859,7 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
pSAREA,
|
||||
fd,
|
||||
api_ver,
|
||||
& interface_methods,
|
||||
& driver_modes );
|
||||
|
||||
filter_modes( & configs->configs,
|
||||
@@ -1156,6 +1081,9 @@ static Bool AllocAndFetchScreenConfigs(Display *dpy, __GLXdisplayPrivate *priv)
|
||||
psc->ext_list_first_time = GL_TRUE;
|
||||
/* Initialize the direct rendering per screen data and functions */
|
||||
if (priv->driDisplay.private != NULL) {
|
||||
/* FIXME: Should it be some sort of an error if createNewScreen[i]
|
||||
* FIXME: is NULL?
|
||||
*/
|
||||
if (priv->driDisplay.createNewScreen &&
|
||||
priv->driDisplay.createNewScreen[i]) {
|
||||
|
||||
@@ -1165,21 +1093,6 @@ static Bool AllocAndFetchScreenConfigs(Display *dpy, __GLXdisplayPrivate *priv)
|
||||
& priv->driDisplay,
|
||||
priv->driDisplay.createNewScreen[i] );
|
||||
}
|
||||
else if (priv->driDisplay.createScreen &&
|
||||
priv->driDisplay.createScreen[i]) {
|
||||
/* screen initialization (bootstrap the driver) */
|
||||
if ( (psc->old_configs == NULL)
|
||||
&& !FillInVisuals(psc) ) {
|
||||
FreeScreenConfigs(priv);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
psc->driScreen.screenConfigs = (void *)psc;
|
||||
psc->driScreen.private =
|
||||
(*(priv->driDisplay.createScreen[i]))(dpy, i, &psc->driScreen,
|
||||
psc->numOldConfigs,
|
||||
psc->old_configs);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1273,7 +1186,6 @@ __GLXdisplayPrivate *__glXInitialize(Display* dpy)
|
||||
/* Assinging zero here assures we'll never go direct */
|
||||
dpyPriv->driDisplay.private = 0;
|
||||
dpyPriv->driDisplay.destroyDisplay = 0;
|
||||
dpyPriv->driDisplay.createScreen = 0;
|
||||
}
|
||||
else {
|
||||
dpyPriv->driDisplay.private =
|
||||
@@ -1607,44 +1519,23 @@ static Bool SendMakeCurrentRequest( Display *dpy, CARD8 opcode,
|
||||
}
|
||||
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
static Bool BindContextWrapper( Display *dpy, GLXContext gc,
|
||||
GLXDrawable draw, GLXDrawable read )
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
if ( gc->driContext.bindContext3 != NULL ) {
|
||||
return (*gc->driContext.bindContext3)(dpy, gc->screen, draw, read,
|
||||
& gc->driContext);
|
||||
}
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
else {
|
||||
return (*gc->driContext.bindContext2)(dpy, gc->screen, draw, read,
|
||||
gc);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return GL_FALSE;
|
||||
return (*gc->driContext.bindContext)(dpy, gc->screen, draw, read,
|
||||
& gc->driContext);
|
||||
}
|
||||
|
||||
|
||||
static Bool UnbindContextWrapper( Display *dpy, GLXContext gc )
|
||||
static Bool UnbindContextWrapper( GLXContext gc )
|
||||
{
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
if ( gc->driContext.unbindContext3 != NULL ) {
|
||||
return (*gc->driContext.unbindContext3)(dpy, gc->screen,
|
||||
gc->currentDrawable,
|
||||
gc->currentReadable,
|
||||
& gc->driContext );
|
||||
}
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
else {
|
||||
return (*gc->driContext.unbindContext2)(dpy, gc->screen,
|
||||
gc->currentDrawable,
|
||||
gc->currentReadable, gc);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return GL_FALSE;
|
||||
return (*gc->driContext.unbindContext)(gc->currentDpy, gc->screen,
|
||||
gc->currentDrawable,
|
||||
gc->currentReadable,
|
||||
& gc->driContext );
|
||||
}
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
||||
|
||||
/*
|
||||
@@ -1707,7 +1598,7 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
|
||||
/* Unbind the old direct rendering context */
|
||||
if (oldGC->isDirect) {
|
||||
if (oldGC->driContext.private) {
|
||||
if (! UnbindContextWrapper( oldGC->currentDpy, oldGC )) {
|
||||
if (! UnbindContextWrapper( oldGC )) {
|
||||
/* The make current failed. Just return GL_FALSE. */
|
||||
return GL_FALSE;
|
||||
}
|
||||
@@ -1879,8 +1770,7 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
|
||||
}
|
||||
|
||||
|
||||
PUBLIC Bool GLX_PREFIX(glXMakeCurrent)(Display *dpy, GLXDrawable draw,
|
||||
GLXContext gc)
|
||||
PUBLIC Bool glXMakeCurrent(Display *dpy, GLXDrawable draw, GLXContext gc)
|
||||
{
|
||||
return MakeContextCurrent( dpy, draw, draw, gc );
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ static const struct extension_info known_glx_extensions[] = {
|
||||
{ GLX(NV_render_depth_texture), VER(0,0), N, N, N, N },
|
||||
{ GLX(NV_render_texture_rectangle), VER(0,0), N, N, N, N },
|
||||
{ GLX(NV_vertex_array_range), VER(0,0), N, N, N, Y }, /* Deprecated */
|
||||
{ GLX(OML_swap_method), VER(0,0), Y, N, N, N },
|
||||
{ GLX(OML_swap_method), VER(0,0), Y, Y, N, N },
|
||||
{ GLX(OML_sync_control), VER(0,0), Y, N, N, Y },
|
||||
{ GLX(SGI_cushion), VER(0,0), N, N, N, N },
|
||||
{ GLX(SGI_make_current_read), VER(1,3), Y, N, N, N },
|
||||
@@ -99,7 +99,7 @@ static const struct extension_info known_glx_extensions[] = {
|
||||
{ GLX(SGIS_color_range), VER(0,0), N, N, N, N },
|
||||
{ GLX(SGIS_multisample), VER(0,0), Y, Y, N, N },
|
||||
{ GLX(SGIX_dm_buffer), VER(0,0), N, N, N, N },
|
||||
{ GLX(SGIX_fbconfig), VER(1,3), Y, N, N, N },
|
||||
{ GLX(SGIX_fbconfig), VER(1,3), Y, Y, N, N },
|
||||
{ GLX(SGIX_pbuffer), VER(1,3), Y, N, N, N },
|
||||
{ GLX(SGIX_swap_barrier), VER(0,0), N, N, N, N },
|
||||
{ GLX(SGIX_swap_group), VER(0,0), N, N, N, N },
|
||||
|
@@ -262,16 +262,16 @@ typedef void (* PFNGLXDISABLEEXTENSIONPROC) ( const char * name );
|
||||
#else
|
||||
# if defined(__GNUC__) && !defined(GLX_ALIAS_UNSUPPORTED)
|
||||
# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \
|
||||
return_type GLX_PREFIX( real_func ) proto_args \
|
||||
return_type real_func proto_args \
|
||||
__attribute__ ((alias( # aliased_func ) ));
|
||||
# define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) \
|
||||
GLX_ALIAS(void, real_func, proto_args, args, aliased_func)
|
||||
# else
|
||||
# define GLX_ALIAS(return_type, real_func, proto_args, args, aliased_func) \
|
||||
return_type GLX_PREFIX( real_func ) proto_args \
|
||||
return_type real_func proto_args \
|
||||
{ return aliased_func args ; }
|
||||
# define GLX_ALIAS_VOID(real_func, proto_args, args, aliased_func) \
|
||||
void GLX_PREFIX( real_func ) proto_args \
|
||||
void real_func proto_args \
|
||||
{ aliased_func args ; }
|
||||
# endif /* __GNUC__ */
|
||||
#endif /* GLX_NO_STATIC_EXTENSION_FUNCTIONS */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -543,10 +543,10 @@ extern HIDDEN void __indirect_glSecondaryColor3usEXT(GLushort red, GLushort gree
|
||||
extern HIDDEN void __indirect_glSecondaryColor3usvEXT(const GLushort * v);
|
||||
extern HIDDEN void __indirect_glSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
|
||||
extern HIDDEN GLboolean __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences);
|
||||
extern HIDDEN void __indirect_glBindProgramNV(GLenum target, GLuint id);
|
||||
extern HIDDEN void __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * ids);
|
||||
extern HIDDEN void __indirect_glBindProgramNV(GLenum target, GLuint program);
|
||||
extern HIDDEN void __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs);
|
||||
extern HIDDEN void __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params);
|
||||
extern HIDDEN void __indirect_glGenProgramsNV(GLsizei n, GLuint * ids);
|
||||
extern HIDDEN void __indirect_glGenProgramsNV(GLsizei n, GLuint * programs);
|
||||
extern HIDDEN void __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params);
|
||||
extern HIDDEN void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params);
|
||||
extern HIDDEN void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params);
|
||||
@@ -555,8 +555,8 @@ extern HIDDEN void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address
|
||||
extern HIDDEN void __indirect_glGetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble * params);
|
||||
extern HIDDEN void __indirect_glGetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat * params);
|
||||
extern HIDDEN void __indirect_glGetVertexAttribivARB(GLuint index, GLenum pname, GLint * params);
|
||||
extern HIDDEN void __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid ** pointer);
|
||||
extern HIDDEN GLboolean __indirect_glIsProgramNV(GLuint id);
|
||||
extern HIDDEN void __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid ** params);
|
||||
extern HIDDEN GLboolean __indirect_glIsProgramNV(GLuint program);
|
||||
extern HIDDEN void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program);
|
||||
extern HIDDEN void __indirect_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
extern HIDDEN void __indirect_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * params);
|
||||
@@ -606,7 +606,7 @@ extern HIDDEN void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, cons
|
||||
extern HIDDEN void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v);
|
||||
extern HIDDEN void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v);
|
||||
extern HIDDEN void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v);
|
||||
extern HIDDEN void __indirect_glPointParameteriNV(GLenum pname, GLint params);
|
||||
extern HIDDEN void __indirect_glPointParameteriNV(GLenum pname, GLint param);
|
||||
extern HIDDEN void __indirect_glPointParameterivNV(GLenum pname, const GLint * params);
|
||||
extern HIDDEN void __indirect_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount);
|
||||
extern HIDDEN void __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount);
|
||||
@@ -682,6 +682,23 @@ extern HIDDEN void __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshor
|
||||
extern HIDDEN void __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v);
|
||||
extern HIDDEN void __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
|
||||
extern HIDDEN void __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v);
|
||||
extern HIDDEN GLboolean __indirect_glIsRenderbufferEXT(GLuint renderbuffer);
|
||||
extern HIDDEN void __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer);
|
||||
extern HIDDEN void __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers);
|
||||
extern HIDDEN void __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers);
|
||||
extern HIDDEN void __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
extern HIDDEN void __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params);
|
||||
extern HIDDEN GLboolean __indirect_glIsFramebufferEXT(GLuint framebuffer);
|
||||
extern HIDDEN void __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer);
|
||||
extern HIDDEN void __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers);
|
||||
extern HIDDEN void __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers);
|
||||
extern HIDDEN GLenum __indirect_glCheckFramebufferStatusEXT(GLenum target);
|
||||
extern HIDDEN void __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
extern HIDDEN void __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
extern HIDDEN void __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
|
||||
extern HIDDEN void __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
extern HIDDEN void __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params);
|
||||
extern HIDDEN void __indirect_glGenerateMipmapEXT(GLenum target);
|
||||
|
||||
# undef HIDDEN
|
||||
# undef FASTCALL
|
||||
|
@@ -72,7 +72,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
|
||||
/* now, initialize the entries we understand */
|
||||
|
||||
/* GL_VERSION_1_0 */
|
||||
/* 1.0 */
|
||||
|
||||
glAPI->NewList = __indirect_glNewList;
|
||||
glAPI->EndList = __indirect_glEndList;
|
||||
@@ -381,7 +381,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->Translatef = __indirect_glTranslatef;
|
||||
glAPI->Viewport = __indirect_glViewport;
|
||||
|
||||
/* GL_VERSION_1_1 */
|
||||
/* 1.1 */
|
||||
|
||||
glAPI->ArrayElement = __indirect_glArrayElement;
|
||||
glAPI->BindTexture = __indirect_glBindTexture;
|
||||
@@ -414,7 +414,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->PopClientAttrib = __indirect_glPopClientAttrib;
|
||||
glAPI->PushClientAttrib = __indirect_glPushClientAttrib;
|
||||
|
||||
/* GL_VERSION_1_2 */
|
||||
/* 1.2 */
|
||||
|
||||
glAPI->BlendColor = __indirect_glBlendColor;
|
||||
glAPI->BlendEquation = __indirect_glBlendEquation;
|
||||
@@ -455,18 +455,8 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->TexSubImage3D = __indirect_glTexSubImage3D;
|
||||
glAPI->CopyTexSubImage3D = __indirect_glCopyTexSubImage3D;
|
||||
|
||||
/* GL_ARB_multitexture */
|
||||
/* 1. GL_ARB_multitexture */
|
||||
|
||||
glAPI->ActiveTextureARB = __indirect_glActiveTextureARB;
|
||||
glAPI->ClientActiveTextureARB = __indirect_glClientActiveTextureARB;
|
||||
glAPI->MultiTexCoord1dARB = __indirect_glMultiTexCoord1dARB;
|
||||
glAPI->MultiTexCoord1dvARB = __indirect_glMultiTexCoord1dvARB;
|
||||
glAPI->MultiTexCoord1fARB = __indirect_glMultiTexCoord1fARB;
|
||||
glAPI->MultiTexCoord1fvARB = __indirect_glMultiTexCoord1fvARB;
|
||||
glAPI->MultiTexCoord1iARB = __indirect_glMultiTexCoord1iARB;
|
||||
glAPI->MultiTexCoord1ivARB = __indirect_glMultiTexCoord1ivARB;
|
||||
glAPI->MultiTexCoord1sARB = __indirect_glMultiTexCoord1sARB;
|
||||
glAPI->MultiTexCoord1svARB = __indirect_glMultiTexCoord1svARB;
|
||||
glAPI->MultiTexCoord2dARB = __indirect_glMultiTexCoord2dARB;
|
||||
glAPI->MultiTexCoord2dvARB = __indirect_glMultiTexCoord2dvARB;
|
||||
glAPI->MultiTexCoord2fARB = __indirect_glMultiTexCoord2fARB;
|
||||
@@ -491,79 +481,29 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->MultiTexCoord4ivARB = __indirect_glMultiTexCoord4ivARB;
|
||||
glAPI->MultiTexCoord4sARB = __indirect_glMultiTexCoord4sARB;
|
||||
glAPI->MultiTexCoord4svARB = __indirect_glMultiTexCoord4svARB;
|
||||
glAPI->ActiveTextureARB = __indirect_glActiveTextureARB;
|
||||
glAPI->ClientActiveTextureARB = __indirect_glClientActiveTextureARB;
|
||||
glAPI->MultiTexCoord1dARB = __indirect_glMultiTexCoord1dARB;
|
||||
glAPI->MultiTexCoord1dvARB = __indirect_glMultiTexCoord1dvARB;
|
||||
glAPI->MultiTexCoord1fARB = __indirect_glMultiTexCoord1fARB;
|
||||
glAPI->MultiTexCoord1fvARB = __indirect_glMultiTexCoord1fvARB;
|
||||
glAPI->MultiTexCoord1iARB = __indirect_glMultiTexCoord1iARB;
|
||||
glAPI->MultiTexCoord1ivARB = __indirect_glMultiTexCoord1ivARB;
|
||||
glAPI->MultiTexCoord1sARB = __indirect_glMultiTexCoord1sARB;
|
||||
glAPI->MultiTexCoord1svARB = __indirect_glMultiTexCoord1svARB;
|
||||
|
||||
/* GL_ARB_transpose_matrix */
|
||||
/* 3. GL_ARB_transpose_matrix */
|
||||
|
||||
glAPI->LoadTransposeMatrixfARB = __indirect_glLoadTransposeMatrixfARB;
|
||||
glAPI->LoadTransposeMatrixdARB = __indirect_glLoadTransposeMatrixdARB;
|
||||
glAPI->MultTransposeMatrixfARB = __indirect_glMultTransposeMatrixfARB;
|
||||
glAPI->MultTransposeMatrixdARB = __indirect_glMultTransposeMatrixdARB;
|
||||
|
||||
/* GL_ARB_multisample */
|
||||
/* 5. GL_ARB_multisample */
|
||||
|
||||
glAPI->SampleCoverageARB = __indirect_glSampleCoverageARB;
|
||||
|
||||
/* GL_ARB_draw_buffers */
|
||||
|
||||
glAPI->DrawBuffersARB = __indirect_glDrawBuffersARB;
|
||||
|
||||
/* GL_EXT_texture_object */
|
||||
|
||||
glAPI->AreTexturesResidentEXT = __indirect_glAreTexturesResidentEXT;
|
||||
glAPI->GenTexturesEXT = __indirect_glGenTexturesEXT;
|
||||
glAPI->IsTextureEXT = __indirect_glIsTextureEXT;
|
||||
|
||||
/* GL_SGIS_multisample */
|
||||
|
||||
glAPI->SampleMaskSGIS = __indirect_glSampleMaskSGIS;
|
||||
glAPI->SamplePatternSGIS = __indirect_glSamplePatternSGIS;
|
||||
|
||||
/* GL_EXT_vertex_array */
|
||||
|
||||
glAPI->ColorPointerEXT = __indirect_glColorPointerEXT;
|
||||
glAPI->EdgeFlagPointerEXT = __indirect_glEdgeFlagPointerEXT;
|
||||
glAPI->IndexPointerEXT = __indirect_glIndexPointerEXT;
|
||||
glAPI->NormalPointerEXT = __indirect_glNormalPointerEXT;
|
||||
glAPI->TexCoordPointerEXT = __indirect_glTexCoordPointerEXT;
|
||||
glAPI->VertexPointerEXT = __indirect_glVertexPointerEXT;
|
||||
|
||||
/* GL_EXT_point_parameters */
|
||||
|
||||
glAPI->PointParameterfEXT = __indirect_glPointParameterfEXT;
|
||||
glAPI->PointParameterfvEXT = __indirect_glPointParameterfvEXT;
|
||||
|
||||
/* GL_MESA_window_pos */
|
||||
|
||||
glAPI->WindowPos2dMESA = __indirect_glWindowPos2dMESA;
|
||||
glAPI->WindowPos2dvMESA = __indirect_glWindowPos2dvMESA;
|
||||
glAPI->WindowPos2fMESA = __indirect_glWindowPos2fMESA;
|
||||
glAPI->WindowPos2fvMESA = __indirect_glWindowPos2fvMESA;
|
||||
glAPI->WindowPos2iMESA = __indirect_glWindowPos2iMESA;
|
||||
glAPI->WindowPos2ivMESA = __indirect_glWindowPos2ivMESA;
|
||||
glAPI->WindowPos2sMESA = __indirect_glWindowPos2sMESA;
|
||||
glAPI->WindowPos2svMESA = __indirect_glWindowPos2svMESA;
|
||||
glAPI->WindowPos3dMESA = __indirect_glWindowPos3dMESA;
|
||||
glAPI->WindowPos3dvMESA = __indirect_glWindowPos3dvMESA;
|
||||
glAPI->WindowPos3fMESA = __indirect_glWindowPos3fMESA;
|
||||
glAPI->WindowPos3fvMESA = __indirect_glWindowPos3fvMESA;
|
||||
glAPI->WindowPos3iMESA = __indirect_glWindowPos3iMESA;
|
||||
glAPI->WindowPos3ivMESA = __indirect_glWindowPos3ivMESA;
|
||||
glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA;
|
||||
glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA;
|
||||
|
||||
/* GL_EXT_blend_func_separate */
|
||||
|
||||
glAPI->BlendFuncSeparateEXT = __indirect_glBlendFuncSeparateEXT;
|
||||
|
||||
/* GL_EXT_fog_coord */
|
||||
|
||||
glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT;
|
||||
glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT;
|
||||
glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT;
|
||||
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
|
||||
glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
|
||||
|
||||
/* GL_ARB_texture_compression */
|
||||
/* 12. GL_ARB_texture_compression */
|
||||
|
||||
glAPI->CompressedTexImage3DARB = __indirect_glCompressedTexImage3DARB;
|
||||
glAPI->CompressedTexImage2DARB = __indirect_glCompressedTexImage2DARB;
|
||||
@@ -573,120 +513,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->CompressedTexSubImage1DARB = __indirect_glCompressedTexSubImage1DARB;
|
||||
glAPI->GetCompressedTexImageARB = __indirect_glGetCompressedTexImageARB;
|
||||
|
||||
/* GL_EXT_secondary_color */
|
||||
|
||||
glAPI->SecondaryColor3bEXT = __indirect_glSecondaryColor3bEXT;
|
||||
glAPI->SecondaryColor3bvEXT = __indirect_glSecondaryColor3bvEXT;
|
||||
glAPI->SecondaryColor3dEXT = __indirect_glSecondaryColor3dEXT;
|
||||
glAPI->SecondaryColor3dvEXT = __indirect_glSecondaryColor3dvEXT;
|
||||
glAPI->SecondaryColor3fEXT = __indirect_glSecondaryColor3fEXT;
|
||||
glAPI->SecondaryColor3fvEXT = __indirect_glSecondaryColor3fvEXT;
|
||||
glAPI->SecondaryColor3iEXT = __indirect_glSecondaryColor3iEXT;
|
||||
glAPI->SecondaryColor3ivEXT = __indirect_glSecondaryColor3ivEXT;
|
||||
glAPI->SecondaryColor3sEXT = __indirect_glSecondaryColor3sEXT;
|
||||
glAPI->SecondaryColor3svEXT = __indirect_glSecondaryColor3svEXT;
|
||||
glAPI->SecondaryColor3ubEXT = __indirect_glSecondaryColor3ubEXT;
|
||||
glAPI->SecondaryColor3ubvEXT = __indirect_glSecondaryColor3ubvEXT;
|
||||
glAPI->SecondaryColor3uiEXT = __indirect_glSecondaryColor3uiEXT;
|
||||
glAPI->SecondaryColor3uivEXT = __indirect_glSecondaryColor3uivEXT;
|
||||
glAPI->SecondaryColor3usEXT = __indirect_glSecondaryColor3usEXT;
|
||||
glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT;
|
||||
glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT;
|
||||
|
||||
/* GL_NV_vertex_program */
|
||||
|
||||
glAPI->AreProgramsResidentNV = __indirect_glAreProgramsResidentNV;
|
||||
glAPI->BindProgramNV = __indirect_glBindProgramNV;
|
||||
glAPI->DeleteProgramsNV = __indirect_glDeleteProgramsNV;
|
||||
glAPI->ExecuteProgramNV = __indirect_glExecuteProgramNV;
|
||||
glAPI->GenProgramsNV = __indirect_glGenProgramsNV;
|
||||
glAPI->GetProgramParameterdvNV = __indirect_glGetProgramParameterdvNV;
|
||||
glAPI->GetProgramParameterfvNV = __indirect_glGetProgramParameterfvNV;
|
||||
glAPI->GetProgramivNV = __indirect_glGetProgramivNV;
|
||||
glAPI->GetProgramStringNV = __indirect_glGetProgramStringNV;
|
||||
glAPI->GetTrackMatrixivNV = __indirect_glGetTrackMatrixivNV;
|
||||
|
||||
/* GL_ARB_vertex_program */
|
||||
|
||||
glAPI->GetVertexAttribdvARB = __indirect_glGetVertexAttribdvARB;
|
||||
glAPI->GetVertexAttribfvARB = __indirect_glGetVertexAttribfvARB;
|
||||
glAPI->GetVertexAttribivARB = __indirect_glGetVertexAttribivARB;
|
||||
|
||||
/* GL_NV_vertex_program */
|
||||
|
||||
glAPI->GetVertexAttribPointervNV = __indirect_glGetVertexAttribPointervNV;
|
||||
glAPI->IsProgramNV = __indirect_glIsProgramNV;
|
||||
glAPI->LoadProgramNV = __indirect_glLoadProgramNV;
|
||||
glAPI->ProgramParameter4dNV = __indirect_glProgramParameter4dNV;
|
||||
glAPI->ProgramParameter4dvNV = __indirect_glProgramParameter4dvNV;
|
||||
glAPI->ProgramParameter4fNV = __indirect_glProgramParameter4fNV;
|
||||
glAPI->ProgramParameter4fvNV = __indirect_glProgramParameter4fvNV;
|
||||
glAPI->ProgramParameters4dvNV = __indirect_glProgramParameters4dvNV;
|
||||
glAPI->ProgramParameters4fvNV = __indirect_glProgramParameters4fvNV;
|
||||
glAPI->RequestResidentProgramsNV = __indirect_glRequestResidentProgramsNV;
|
||||
glAPI->TrackMatrixNV = __indirect_glTrackMatrixNV;
|
||||
glAPI->VertexAttribPointerNV = __indirect_glVertexAttribPointerNV;
|
||||
|
||||
/* GL_ARB_vertex_program */
|
||||
|
||||
glAPI->VertexAttrib1dARB = __indirect_glVertexAttrib1dARB;
|
||||
glAPI->VertexAttrib1dvARB = __indirect_glVertexAttrib1dvARB;
|
||||
glAPI->VertexAttrib1fARB = __indirect_glVertexAttrib1fARB;
|
||||
glAPI->VertexAttrib1fvARB = __indirect_glVertexAttrib1fvARB;
|
||||
glAPI->VertexAttrib1sARB = __indirect_glVertexAttrib1sARB;
|
||||
glAPI->VertexAttrib1svARB = __indirect_glVertexAttrib1svARB;
|
||||
glAPI->VertexAttrib2dARB = __indirect_glVertexAttrib2dARB;
|
||||
glAPI->VertexAttrib2dvARB = __indirect_glVertexAttrib2dvARB;
|
||||
glAPI->VertexAttrib2fARB = __indirect_glVertexAttrib2fARB;
|
||||
glAPI->VertexAttrib2fvARB = __indirect_glVertexAttrib2fvARB;
|
||||
glAPI->VertexAttrib2sARB = __indirect_glVertexAttrib2sARB;
|
||||
glAPI->VertexAttrib2svARB = __indirect_glVertexAttrib2svARB;
|
||||
glAPI->VertexAttrib3dARB = __indirect_glVertexAttrib3dARB;
|
||||
glAPI->VertexAttrib3dvARB = __indirect_glVertexAttrib3dvARB;
|
||||
glAPI->VertexAttrib3fARB = __indirect_glVertexAttrib3fARB;
|
||||
glAPI->VertexAttrib3fvARB = __indirect_glVertexAttrib3fvARB;
|
||||
glAPI->VertexAttrib3sARB = __indirect_glVertexAttrib3sARB;
|
||||
glAPI->VertexAttrib3svARB = __indirect_glVertexAttrib3svARB;
|
||||
glAPI->VertexAttrib4dARB = __indirect_glVertexAttrib4dARB;
|
||||
glAPI->VertexAttrib4dvARB = __indirect_glVertexAttrib4dvARB;
|
||||
glAPI->VertexAttrib4fARB = __indirect_glVertexAttrib4fARB;
|
||||
glAPI->VertexAttrib4fvARB = __indirect_glVertexAttrib4fvARB;
|
||||
glAPI->VertexAttrib4sARB = __indirect_glVertexAttrib4sARB;
|
||||
glAPI->VertexAttrib4svARB = __indirect_glVertexAttrib4svARB;
|
||||
glAPI->VertexAttrib4NubARB = __indirect_glVertexAttrib4NubARB;
|
||||
glAPI->VertexAttrib4NubvARB = __indirect_glVertexAttrib4NubvARB;
|
||||
|
||||
/* GL_NV_vertex_program */
|
||||
|
||||
glAPI->VertexAttribs1dvNV = __indirect_glVertexAttribs1dvNV;
|
||||
glAPI->VertexAttribs1fvNV = __indirect_glVertexAttribs1fvNV;
|
||||
glAPI->VertexAttribs1svNV = __indirect_glVertexAttribs1svNV;
|
||||
glAPI->VertexAttribs2dvNV = __indirect_glVertexAttribs2dvNV;
|
||||
glAPI->VertexAttribs2fvNV = __indirect_glVertexAttribs2fvNV;
|
||||
glAPI->VertexAttribs2svNV = __indirect_glVertexAttribs2svNV;
|
||||
glAPI->VertexAttribs3dvNV = __indirect_glVertexAttribs3dvNV;
|
||||
glAPI->VertexAttribs3fvNV = __indirect_glVertexAttribs3fvNV;
|
||||
glAPI->VertexAttribs3svNV = __indirect_glVertexAttribs3svNV;
|
||||
glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV;
|
||||
glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV;
|
||||
glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV;
|
||||
glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV;
|
||||
|
||||
/* GL_NV_point_sprite */
|
||||
|
||||
glAPI->PointParameteriNV = __indirect_glPointParameteriNV;
|
||||
glAPI->PointParameterivNV = __indirect_glPointParameterivNV;
|
||||
|
||||
/* GL_EXT_multi_draw_arrays */
|
||||
|
||||
glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT;
|
||||
glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
|
||||
|
||||
/* GL_EXT_stencil_two_side */
|
||||
|
||||
glAPI->ActiveStencilFaceEXT = __indirect_glActiveStencilFaceEXT;
|
||||
|
||||
/* GL_ARB_vertex_program */
|
||||
/* 26. GL_ARB_vertex_program */
|
||||
|
||||
glAPI->VertexAttrib4bvARB = __indirect_glVertexAttrib4bvARB;
|
||||
glAPI->VertexAttrib4ivARB = __indirect_glVertexAttrib4ivARB;
|
||||
@@ -716,8 +543,209 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->GetProgramLocalParameterfvARB = __indirect_glGetProgramLocalParameterfvARB;
|
||||
glAPI->GetProgramivARB = __indirect_glGetProgramivARB;
|
||||
glAPI->GetProgramStringARB = __indirect_glGetProgramStringARB;
|
||||
glAPI->GetVertexAttribdvARB = __indirect_glGetVertexAttribdvARB;
|
||||
glAPI->GetVertexAttribfvARB = __indirect_glGetVertexAttribfvARB;
|
||||
glAPI->GetVertexAttribivARB = __indirect_glGetVertexAttribivARB;
|
||||
glAPI->VertexAttrib1dARB = __indirect_glVertexAttrib1dARB;
|
||||
glAPI->VertexAttrib1dvARB = __indirect_glVertexAttrib1dvARB;
|
||||
glAPI->VertexAttrib1fARB = __indirect_glVertexAttrib1fARB;
|
||||
glAPI->VertexAttrib1fvARB = __indirect_glVertexAttrib1fvARB;
|
||||
glAPI->VertexAttrib1sARB = __indirect_glVertexAttrib1sARB;
|
||||
glAPI->VertexAttrib1svARB = __indirect_glVertexAttrib1svARB;
|
||||
glAPI->VertexAttrib2dARB = __indirect_glVertexAttrib2dARB;
|
||||
glAPI->VertexAttrib2dvARB = __indirect_glVertexAttrib2dvARB;
|
||||
glAPI->VertexAttrib2fARB = __indirect_glVertexAttrib2fARB;
|
||||
glAPI->VertexAttrib2fvARB = __indirect_glVertexAttrib2fvARB;
|
||||
glAPI->VertexAttrib2sARB = __indirect_glVertexAttrib2sARB;
|
||||
glAPI->VertexAttrib2svARB = __indirect_glVertexAttrib2svARB;
|
||||
glAPI->VertexAttrib3dARB = __indirect_glVertexAttrib3dARB;
|
||||
glAPI->VertexAttrib3dvARB = __indirect_glVertexAttrib3dvARB;
|
||||
glAPI->VertexAttrib3fARB = __indirect_glVertexAttrib3fARB;
|
||||
glAPI->VertexAttrib3fvARB = __indirect_glVertexAttrib3fvARB;
|
||||
glAPI->VertexAttrib3sARB = __indirect_glVertexAttrib3sARB;
|
||||
glAPI->VertexAttrib3svARB = __indirect_glVertexAttrib3svARB;
|
||||
glAPI->VertexAttrib4dARB = __indirect_glVertexAttrib4dARB;
|
||||
glAPI->VertexAttrib4dvARB = __indirect_glVertexAttrib4dvARB;
|
||||
glAPI->VertexAttrib4fARB = __indirect_glVertexAttrib4fARB;
|
||||
glAPI->VertexAttrib4fvARB = __indirect_glVertexAttrib4fvARB;
|
||||
glAPI->VertexAttrib4sARB = __indirect_glVertexAttrib4sARB;
|
||||
glAPI->VertexAttrib4svARB = __indirect_glVertexAttrib4svARB;
|
||||
glAPI->VertexAttrib4NubARB = __indirect_glVertexAttrib4NubARB;
|
||||
glAPI->VertexAttrib4NubvARB = __indirect_glVertexAttrib4NubvARB;
|
||||
|
||||
/* GL_NV_fragment_program */
|
||||
/* 29. GL_ARB_occlusion_query */
|
||||
|
||||
glAPI->EndQueryARB = __indirect_glEndQueryARB;
|
||||
glAPI->GetQueryivARB = __indirect_glGetQueryivARB;
|
||||
glAPI->GetQueryObjectivARB = __indirect_glGetQueryObjectivARB;
|
||||
glAPI->GetQueryObjectuivARB = __indirect_glGetQueryObjectuivARB;
|
||||
glAPI->GenQueriesARB = __indirect_glGenQueriesARB;
|
||||
glAPI->DeleteQueriesARB = __indirect_glDeleteQueriesARB;
|
||||
glAPI->IsQueryARB = __indirect_glIsQueryARB;
|
||||
glAPI->BeginQueryARB = __indirect_glBeginQueryARB;
|
||||
|
||||
/* 37. GL_ARB_draw_buffers */
|
||||
|
||||
glAPI->DrawBuffersARB = __indirect_glDrawBuffersARB;
|
||||
|
||||
/* 20. GL_EXT_texture_object */
|
||||
|
||||
glAPI->GenTexturesEXT = __indirect_glGenTexturesEXT;
|
||||
glAPI->IsTextureEXT = __indirect_glIsTextureEXT;
|
||||
glAPI->AreTexturesResidentEXT = __indirect_glAreTexturesResidentEXT;
|
||||
|
||||
/* 25. GL_SGIS_multisample */
|
||||
|
||||
glAPI->SampleMaskSGIS = __indirect_glSampleMaskSGIS;
|
||||
glAPI->SamplePatternSGIS = __indirect_glSamplePatternSGIS;
|
||||
|
||||
/* 30. GL_EXT_vertex_array */
|
||||
|
||||
glAPI->ColorPointerEXT = __indirect_glColorPointerEXT;
|
||||
glAPI->EdgeFlagPointerEXT = __indirect_glEdgeFlagPointerEXT;
|
||||
glAPI->IndexPointerEXT = __indirect_glIndexPointerEXT;
|
||||
glAPI->NormalPointerEXT = __indirect_glNormalPointerEXT;
|
||||
glAPI->TexCoordPointerEXT = __indirect_glTexCoordPointerEXT;
|
||||
glAPI->VertexPointerEXT = __indirect_glVertexPointerEXT;
|
||||
|
||||
/* 54. GL_EXT_point_parameters */
|
||||
|
||||
glAPI->PointParameterfEXT = __indirect_glPointParameterfEXT;
|
||||
glAPI->PointParameterfvEXT = __indirect_glPointParameterfvEXT;
|
||||
|
||||
/* 145. GL_EXT_secondary_color */
|
||||
|
||||
glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT;
|
||||
glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT;
|
||||
glAPI->SecondaryColor3bEXT = __indirect_glSecondaryColor3bEXT;
|
||||
glAPI->SecondaryColor3bvEXT = __indirect_glSecondaryColor3bvEXT;
|
||||
glAPI->SecondaryColor3dEXT = __indirect_glSecondaryColor3dEXT;
|
||||
glAPI->SecondaryColor3dvEXT = __indirect_glSecondaryColor3dvEXT;
|
||||
glAPI->SecondaryColor3fEXT = __indirect_glSecondaryColor3fEXT;
|
||||
glAPI->SecondaryColor3fvEXT = __indirect_glSecondaryColor3fvEXT;
|
||||
glAPI->SecondaryColor3iEXT = __indirect_glSecondaryColor3iEXT;
|
||||
glAPI->SecondaryColor3ivEXT = __indirect_glSecondaryColor3ivEXT;
|
||||
glAPI->SecondaryColor3sEXT = __indirect_glSecondaryColor3sEXT;
|
||||
glAPI->SecondaryColor3svEXT = __indirect_glSecondaryColor3svEXT;
|
||||
glAPI->SecondaryColor3ubEXT = __indirect_glSecondaryColor3ubEXT;
|
||||
glAPI->SecondaryColor3ubvEXT = __indirect_glSecondaryColor3ubvEXT;
|
||||
glAPI->SecondaryColor3uiEXT = __indirect_glSecondaryColor3uiEXT;
|
||||
glAPI->SecondaryColor3uivEXT = __indirect_glSecondaryColor3uivEXT;
|
||||
glAPI->SecondaryColor3usEXT = __indirect_glSecondaryColor3usEXT;
|
||||
|
||||
/* 148. GL_EXT_multi_draw_arrays */
|
||||
|
||||
glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT;
|
||||
glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
|
||||
|
||||
/* 149. GL_EXT_fog_coord */
|
||||
|
||||
glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT;
|
||||
glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT;
|
||||
glAPI->FogCoorddEXT = __indirect_glFogCoorddEXT;
|
||||
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
|
||||
glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
|
||||
|
||||
/* 173. GL_EXT_blend_func_separate */
|
||||
|
||||
glAPI->BlendFuncSeparateEXT = __indirect_glBlendFuncSeparateEXT;
|
||||
|
||||
/* 197. GL_MESA_window_pos */
|
||||
|
||||
glAPI->WindowPos2dMESA = __indirect_glWindowPos2dMESA;
|
||||
glAPI->WindowPos2dvMESA = __indirect_glWindowPos2dvMESA;
|
||||
glAPI->WindowPos2fMESA = __indirect_glWindowPos2fMESA;
|
||||
glAPI->WindowPos2fvMESA = __indirect_glWindowPos2fvMESA;
|
||||
glAPI->WindowPos2iMESA = __indirect_glWindowPos2iMESA;
|
||||
glAPI->WindowPos2ivMESA = __indirect_glWindowPos2ivMESA;
|
||||
glAPI->WindowPos2sMESA = __indirect_glWindowPos2sMESA;
|
||||
glAPI->WindowPos2svMESA = __indirect_glWindowPos2svMESA;
|
||||
glAPI->WindowPos3dMESA = __indirect_glWindowPos3dMESA;
|
||||
glAPI->WindowPos3dvMESA = __indirect_glWindowPos3dvMESA;
|
||||
glAPI->WindowPos3fMESA = __indirect_glWindowPos3fMESA;
|
||||
glAPI->WindowPos3fvMESA = __indirect_glWindowPos3fvMESA;
|
||||
glAPI->WindowPos3iMESA = __indirect_glWindowPos3iMESA;
|
||||
glAPI->WindowPos3ivMESA = __indirect_glWindowPos3ivMESA;
|
||||
glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA;
|
||||
glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA;
|
||||
|
||||
/* 233. GL_NV_vertex_program */
|
||||
|
||||
glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV;
|
||||
glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV;
|
||||
glAPI->VertexAttrib3fNV = __indirect_glVertexAttrib3fNV;
|
||||
glAPI->VertexAttrib3fvNV = __indirect_glVertexAttrib3fvNV;
|
||||
glAPI->VertexAttrib3sNV = __indirect_glVertexAttrib3sNV;
|
||||
glAPI->VertexAttrib3svNV = __indirect_glVertexAttrib3svNV;
|
||||
glAPI->VertexAttrib4dNV = __indirect_glVertexAttrib4dNV;
|
||||
glAPI->VertexAttrib3dvNV = __indirect_glVertexAttrib3dvNV;
|
||||
glAPI->VertexAttrib4fNV = __indirect_glVertexAttrib4fNV;
|
||||
glAPI->VertexAttrib4fvNV = __indirect_glVertexAttrib4fvNV;
|
||||
glAPI->VertexAttrib4sNV = __indirect_glVertexAttrib4sNV;
|
||||
glAPI->VertexAttrib4svNV = __indirect_glVertexAttrib4svNV;
|
||||
glAPI->VertexAttrib4ubNV = __indirect_glVertexAttrib4ubNV;
|
||||
glAPI->VertexAttrib4ubvNV = __indirect_glVertexAttrib4ubvNV;
|
||||
glAPI->VertexAttrib1fvNV = __indirect_glVertexAttrib1fvNV;
|
||||
glAPI->VertexAttrib3dNV = __indirect_glVertexAttrib3dNV;
|
||||
glAPI->VertexAttrib4dvNV = __indirect_glVertexAttrib4dvNV;
|
||||
glAPI->VertexAttrib1sNV = __indirect_glVertexAttrib1sNV;
|
||||
glAPI->VertexAttrib1fNV = __indirect_glVertexAttrib1fNV;
|
||||
glAPI->VertexAttrib1svNV = __indirect_glVertexAttrib1svNV;
|
||||
glAPI->VertexAttrib1dvNV = __indirect_glVertexAttrib1dvNV;
|
||||
glAPI->AreProgramsResidentNV = __indirect_glAreProgramsResidentNV;
|
||||
glAPI->BindProgramNV = __indirect_glBindProgramNV;
|
||||
glAPI->DeleteProgramsNV = __indirect_glDeleteProgramsNV;
|
||||
glAPI->ExecuteProgramNV = __indirect_glExecuteProgramNV;
|
||||
glAPI->GenProgramsNV = __indirect_glGenProgramsNV;
|
||||
glAPI->GetProgramParameterdvNV = __indirect_glGetProgramParameterdvNV;
|
||||
glAPI->GetProgramParameterfvNV = __indirect_glGetProgramParameterfvNV;
|
||||
glAPI->GetProgramivNV = __indirect_glGetProgramivNV;
|
||||
glAPI->GetProgramStringNV = __indirect_glGetProgramStringNV;
|
||||
glAPI->GetTrackMatrixivNV = __indirect_glGetTrackMatrixivNV;
|
||||
glAPI->GetVertexAttribPointervNV = __indirect_glGetVertexAttribPointervNV;
|
||||
glAPI->IsProgramNV = __indirect_glIsProgramNV;
|
||||
glAPI->LoadProgramNV = __indirect_glLoadProgramNV;
|
||||
glAPI->ProgramParameter4dNV = __indirect_glProgramParameter4dNV;
|
||||
glAPI->ProgramParameter4dvNV = __indirect_glProgramParameter4dvNV;
|
||||
glAPI->ProgramParameter4fNV = __indirect_glProgramParameter4fNV;
|
||||
glAPI->ProgramParameter4fvNV = __indirect_glProgramParameter4fvNV;
|
||||
glAPI->ProgramParameters4dvNV = __indirect_glProgramParameters4dvNV;
|
||||
glAPI->ProgramParameters4fvNV = __indirect_glProgramParameters4fvNV;
|
||||
glAPI->RequestResidentProgramsNV = __indirect_glRequestResidentProgramsNV;
|
||||
glAPI->TrackMatrixNV = __indirect_glTrackMatrixNV;
|
||||
glAPI->VertexAttribPointerNV = __indirect_glVertexAttribPointerNV;
|
||||
glAPI->VertexAttrib2dNV = __indirect_glVertexAttrib2dNV;
|
||||
glAPI->VertexAttrib2sNV = __indirect_glVertexAttrib2sNV;
|
||||
glAPI->VertexAttrib2dvNV = __indirect_glVertexAttrib2dvNV;
|
||||
glAPI->VertexAttrib2fNV = __indirect_glVertexAttrib2fNV;
|
||||
glAPI->VertexAttrib2svNV = __indirect_glVertexAttrib2svNV;
|
||||
glAPI->VertexAttrib2fvNV = __indirect_glVertexAttrib2fvNV;
|
||||
glAPI->GetVertexAttribdvNV = __indirect_glGetVertexAttribdvNV;
|
||||
glAPI->GetVertexAttribfvNV = __indirect_glGetVertexAttribfvNV;
|
||||
glAPI->GetVertexAttribivNV = __indirect_glGetVertexAttribivNV;
|
||||
glAPI->VertexAttrib1dNV = __indirect_glVertexAttrib1dNV;
|
||||
glAPI->VertexAttribs1dvNV = __indirect_glVertexAttribs1dvNV;
|
||||
glAPI->VertexAttribs1fvNV = __indirect_glVertexAttribs1fvNV;
|
||||
glAPI->VertexAttribs1svNV = __indirect_glVertexAttribs1svNV;
|
||||
glAPI->VertexAttribs2dvNV = __indirect_glVertexAttribs2dvNV;
|
||||
glAPI->VertexAttribs2fvNV = __indirect_glVertexAttribs2fvNV;
|
||||
glAPI->VertexAttribs2svNV = __indirect_glVertexAttribs2svNV;
|
||||
glAPI->VertexAttribs3dvNV = __indirect_glVertexAttribs3dvNV;
|
||||
glAPI->VertexAttribs3fvNV = __indirect_glVertexAttribs3fvNV;
|
||||
glAPI->VertexAttribs3svNV = __indirect_glVertexAttribs3svNV;
|
||||
glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV;
|
||||
glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV;
|
||||
|
||||
/* 262. GL_NV_point_sprite */
|
||||
|
||||
glAPI->PointParameteriNV = __indirect_glPointParameteriNV;
|
||||
glAPI->PointParameterivNV = __indirect_glPointParameterivNV;
|
||||
|
||||
/* 268. GL_EXT_stencil_two_side */
|
||||
|
||||
glAPI->ActiveStencilFaceEXT = __indirect_glActiveStencilFaceEXT;
|
||||
|
||||
/* 282. GL_NV_fragment_program */
|
||||
|
||||
glAPI->ProgramNamedParameter4fNV = __indirect_glProgramNamedParameter4fNV;
|
||||
glAPI->ProgramNamedParameter4dNV = __indirect_glProgramNamedParameter4dNV;
|
||||
@@ -726,48 +754,25 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->GetProgramNamedParameterfvNV = __indirect_glGetProgramNamedParameterfvNV;
|
||||
glAPI->GetProgramNamedParameterdvNV = __indirect_glGetProgramNamedParameterdvNV;
|
||||
|
||||
/* GL_ARB_occlusion_query */
|
||||
/* 310. GL_EXT_framebuffer_object */
|
||||
|
||||
glAPI->GenQueriesARB = __indirect_glGenQueriesARB;
|
||||
glAPI->DeleteQueriesARB = __indirect_glDeleteQueriesARB;
|
||||
glAPI->IsQueryARB = __indirect_glIsQueryARB;
|
||||
glAPI->BeginQueryARB = __indirect_glBeginQueryARB;
|
||||
glAPI->EndQueryARB = __indirect_glEndQueryARB;
|
||||
glAPI->GetQueryivARB = __indirect_glGetQueryivARB;
|
||||
glAPI->GetQueryObjectivARB = __indirect_glGetQueryObjectivARB;
|
||||
glAPI->GetQueryObjectuivARB = __indirect_glGetQueryObjectuivARB;
|
||||
|
||||
/* GL_NV_vertex_program */
|
||||
|
||||
glAPI->GetVertexAttribdvNV = __indirect_glGetVertexAttribdvNV;
|
||||
glAPI->GetVertexAttribfvNV = __indirect_glGetVertexAttribfvNV;
|
||||
glAPI->GetVertexAttribivNV = __indirect_glGetVertexAttribivNV;
|
||||
glAPI->VertexAttrib1dNV = __indirect_glVertexAttrib1dNV;
|
||||
glAPI->VertexAttrib1dvNV = __indirect_glVertexAttrib1dvNV;
|
||||
glAPI->VertexAttrib1fNV = __indirect_glVertexAttrib1fNV;
|
||||
glAPI->VertexAttrib1fvNV = __indirect_glVertexAttrib1fvNV;
|
||||
glAPI->VertexAttrib1sNV = __indirect_glVertexAttrib1sNV;
|
||||
glAPI->VertexAttrib1svNV = __indirect_glVertexAttrib1svNV;
|
||||
glAPI->VertexAttrib2dNV = __indirect_glVertexAttrib2dNV;
|
||||
glAPI->VertexAttrib2dvNV = __indirect_glVertexAttrib2dvNV;
|
||||
glAPI->VertexAttrib2fNV = __indirect_glVertexAttrib2fNV;
|
||||
glAPI->VertexAttrib2fvNV = __indirect_glVertexAttrib2fvNV;
|
||||
glAPI->VertexAttrib2sNV = __indirect_glVertexAttrib2sNV;
|
||||
glAPI->VertexAttrib2svNV = __indirect_glVertexAttrib2svNV;
|
||||
glAPI->VertexAttrib3dNV = __indirect_glVertexAttrib3dNV;
|
||||
glAPI->VertexAttrib3dvNV = __indirect_glVertexAttrib3dvNV;
|
||||
glAPI->VertexAttrib3fNV = __indirect_glVertexAttrib3fNV;
|
||||
glAPI->VertexAttrib3fvNV = __indirect_glVertexAttrib3fvNV;
|
||||
glAPI->VertexAttrib3sNV = __indirect_glVertexAttrib3sNV;
|
||||
glAPI->VertexAttrib3svNV = __indirect_glVertexAttrib3svNV;
|
||||
glAPI->VertexAttrib4dNV = __indirect_glVertexAttrib4dNV;
|
||||
glAPI->VertexAttrib4dvNV = __indirect_glVertexAttrib4dvNV;
|
||||
glAPI->VertexAttrib4fNV = __indirect_glVertexAttrib4fNV;
|
||||
glAPI->VertexAttrib4fvNV = __indirect_glVertexAttrib4fvNV;
|
||||
glAPI->VertexAttrib4sNV = __indirect_glVertexAttrib4sNV;
|
||||
glAPI->VertexAttrib4svNV = __indirect_glVertexAttrib4svNV;
|
||||
glAPI->VertexAttrib4ubNV = __indirect_glVertexAttrib4ubNV;
|
||||
glAPI->VertexAttrib4ubvNV = __indirect_glVertexAttrib4ubvNV;
|
||||
glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT;
|
||||
glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT;
|
||||
glAPI->IsFramebufferEXT = __indirect_glIsFramebufferEXT;
|
||||
glAPI->BindFramebufferEXT = __indirect_glBindFramebufferEXT;
|
||||
glAPI->DeleteFramebuffersEXT = __indirect_glDeleteFramebuffersEXT;
|
||||
glAPI->GenFramebuffersEXT = __indirect_glGenFramebuffersEXT;
|
||||
glAPI->CheckFramebufferStatusEXT = __indirect_glCheckFramebufferStatusEXT;
|
||||
glAPI->FramebufferTexture1DEXT = __indirect_glFramebufferTexture1DEXT;
|
||||
glAPI->FramebufferTexture2DEXT = __indirect_glFramebufferTexture2DEXT;
|
||||
glAPI->FramebufferTexture3DEXT = __indirect_glFramebufferTexture3DEXT;
|
||||
glAPI->FramebufferRenderbufferEXT = __indirect_glFramebufferRenderbufferEXT;
|
||||
glAPI->GetFramebufferAttachmentParameterivEXT = __indirect_glGetFramebufferAttachmentParameterivEXT;
|
||||
glAPI->GenerateMipmapEXT = __indirect_glGenerateMipmapEXT;
|
||||
glAPI->IsRenderbufferEXT = __indirect_glIsRenderbufferEXT;
|
||||
glAPI->BindRenderbufferEXT = __indirect_glBindRenderbufferEXT;
|
||||
glAPI->DeleteRenderbuffersEXT = __indirect_glDeleteRenderbuffersEXT;
|
||||
glAPI->GenRenderbuffersEXT = __indirect_glGenRenderbuffersEXT;
|
||||
|
||||
return glAPI;
|
||||
}
|
||||
|
@@ -334,22 +334,18 @@ __glPointParameterfvEXT_size( GLenum e )
|
||||
switch( e ) {
|
||||
case GL_POINT_SIZE_MIN:
|
||||
/* case GL_POINT_SIZE_MIN_ARB:*/
|
||||
/* case GL_POINT_SIZE_MIN_EXT:*/
|
||||
/* case GL_POINT_SIZE_MIN_SGIS:*/
|
||||
case GL_POINT_SIZE_MAX:
|
||||
/* case GL_POINT_SIZE_MAX_ARB:*/
|
||||
/* case GL_POINT_SIZE_MAX_EXT:*/
|
||||
/* case GL_POINT_SIZE_MAX_SGIS:*/
|
||||
case GL_POINT_FADE_THRESHOLD_SIZE:
|
||||
/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/
|
||||
/* case GL_POINT_FADE_THRESHOLD_SIZE_EXT:*/
|
||||
/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/
|
||||
case GL_POINT_SPRITE_R_MODE_NV:
|
||||
case GL_POINT_SPRITE_COORD_ORIGIN:
|
||||
return 1;
|
||||
case GL_POINT_DISTANCE_ATTENUATION:
|
||||
/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/
|
||||
/* case GL_POINT_DISTANCE_ATTENUATION_EXT:*/
|
||||
/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
|
||||
return 3;
|
||||
default: return 0;
|
||||
@@ -369,3 +365,10 @@ ALIAS( Map2f, Map2d )
|
||||
ALIAS( ColorTableParameteriv, ColorTableParameterfv )
|
||||
ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
|
||||
ALIAS( PointParameterivNV, PointParameterfvEXT )
|
||||
ALIAS( PointParameterfvARB, PointParameterfvEXT )
|
||||
ALIAS( PointParameteriv, PointParameterfvEXT )
|
||||
|
||||
# undef HAVE_ALIAS
|
||||
# undef PURE
|
||||
# undef FASTCALL
|
||||
# undef INTERNAL
|
||||
|
@@ -96,7 +96,7 @@ LIBGL_CORE_OBJECTS = \
|
||||
|
||||
# Make libGL from core object files
|
||||
libgl-core: $(LIBGL_CORE_OBJECTS)
|
||||
@ CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GL_LIB) \
|
||||
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
|
||||
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
|
||||
-install $(LIB_DIR) $(MKLIB_OPTIONS) $(LIBGL_CORE_OBJECTS) $(GL_LIB_DEPS)
|
||||
|
||||
@@ -150,7 +150,7 @@ subdirs:
|
||||
|
||||
# Make the GL library
|
||||
$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
|
||||
@ CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(GL_LIB) \
|
||||
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
|
||||
-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
|
||||
-install $(LIB_DIR) \
|
||||
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
|
||||
@@ -158,13 +158,13 @@ $(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
|
||||
# Make the OSMesa library
|
||||
$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
|
||||
@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(OSMESA_LIB) \
|
||||
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
|
||||
-major $(MESA_MAJOR) \
|
||||
-minor $(MESA_MINOR) -patch $(MESA_TINY) \
|
||||
-install $(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||
$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
|
||||
else \
|
||||
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(OSMESA_LIB) \
|
||||
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
|
||||
-major $(MESA_MAJOR) \
|
||||
-minor $(MESA_MINOR) -patch $(GL_TINY) \
|
||||
-install $(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||
|
@@ -45,7 +45,8 @@ install:
|
||||
echo "*** Installation aborted."; \
|
||||
exit 1; \
|
||||
fi;
|
||||
install -m 0755 $(DIRECTFBGL_MESA) $(DFB_MODULEDIR)/interfaces/IDirectFBGL/
|
||||
test -d $(DFB_MODULEDIR)/interfaces/IDirectFBGL/ || mkdir $(DFB_MODULEDIR)/interfaces/IDirectFBGL/
|
||||
install -m 755 $(DIRECTFBGL_MESA) $(DFB_MODULEDIR)/interfaces/IDirectFBGL/
|
||||
|
||||
|
||||
clean:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2004 Claudio Ciccani <klan@users.sf.net>
|
||||
* Copyright (C) 2004-2005 Claudio Ciccani <klan@users.sf.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "buffers.h"
|
||||
#include "context.h"
|
||||
#include "extensions.h"
|
||||
#include "framebuffer.h"
|
||||
#include "renderbuffer.h"
|
||||
#include "imports.h"
|
||||
#include "texformat.h"
|
||||
#include "teximage.h"
|
||||
@@ -84,6 +86,7 @@ typedef struct {
|
||||
GLvisual visual;
|
||||
GLframebuffer framebuffer;
|
||||
GLcontext context;
|
||||
struct gl_renderbuffer render;
|
||||
} IDirectFBGL_data;
|
||||
|
||||
|
||||
@@ -93,7 +96,7 @@ static bool dfb_mesa_create_context ( GLcontext *context,
|
||||
GLframebuffer *framebuffer,
|
||||
GLvisual *visual,
|
||||
DFBSurfacePixelFormat format,
|
||||
void *data );
|
||||
IDirectFBGL_data *data );
|
||||
static void dfb_mesa_destroy_context( GLcontext *context,
|
||||
GLframebuffer *framebuffer );
|
||||
|
||||
@@ -155,6 +158,8 @@ IDirectFBGL_Lock( IDirectFBGL *thiz )
|
||||
return err;
|
||||
}
|
||||
data->video.end = data->video.start + (height-1) * data->video.pitch;
|
||||
|
||||
data->render.Data = data->video.start;
|
||||
|
||||
if (data->width != width || data->height != height) {
|
||||
data->width = width;
|
||||
@@ -248,7 +253,7 @@ Construct( IDirectFBGL *thiz,
|
||||
|
||||
/* Create context. */
|
||||
if (!dfb_mesa_create_context( &data->context, &data->framebuffer,
|
||||
&data->visual, data->format, (void*) data )) {
|
||||
&data->visual, data->format, data )) {
|
||||
D_ERROR( "DirectFBGL/Mesa: failed to create context.\n" );
|
||||
surface->Release( surface );
|
||||
return DFB_UNSUPPORTED;
|
||||
@@ -312,134 +317,144 @@ set_buffer( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit )
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
delete_renderbuffer( struct gl_renderbuffer *render )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
renderbuffer_storage( GLcontext *ctx, struct gl_renderbuffer *render,
|
||||
GLenum internalFormat, GLuint width, GLuint height )
|
||||
{
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* RGB332 */
|
||||
#define NAME(PREFIX) PREFIX##_RGB332
|
||||
#define FORMAT GL_RGBA8
|
||||
#define SPAN_VARS \
|
||||
IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx;
|
||||
#define INIT_PIXEL_PTR(P, X, Y) \
|
||||
GLubyte *P = data->video.end - (Y) * data->video.pitch + (X)
|
||||
GLubyte *P = data->video.end - (Y) * data->video.pitch + (X);
|
||||
#define INC_PIXEL_PTR(P) P += 1
|
||||
#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
|
||||
*P = ( (((R) & 0xe0)) | (((G) & 0xe0) >> 3) | ((B) >> 6) )
|
||||
#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
|
||||
*P = ( (((R) & 0xe0)) | (((G) & 0xe0) >> 3) | ((B) >> 6) )
|
||||
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
|
||||
R = ((*P & 0xe0) ); \
|
||||
G = ((*P & 0x1c) << 3); \
|
||||
B = ((*P & 0x03) << 6); \
|
||||
A = CHAN_MAX
|
||||
#define STORE_PIXEL(P, X, Y, S) \
|
||||
*P = ( (((S[RCOMP]) & 0xe0)) | (((S[GCOMP]) & 0xe0) >> 3) | ((S[BCOMP]) >> 6) )
|
||||
#define FETCH_PIXEL(D, P) \
|
||||
D[RCOMP] = ((*P & 0xe0) ); \
|
||||
D[GCOMP] = ((*P & 0x1c) << 3); \
|
||||
D[BCOMP] = ((*P & 0x03) << 6); \
|
||||
D[ACOMP] = 0xff
|
||||
|
||||
#include "swrast/s_spantemp.h"
|
||||
|
||||
/* ARGB1555 */
|
||||
#define NAME(PREFIX) PREFIX##_ARGB1555
|
||||
#define FORMAT GL_RGBA8
|
||||
#define SPAN_VARS \
|
||||
IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx;
|
||||
#define INIT_PIXEL_PTR(P, X, Y) \
|
||||
GLushort *P = (GLushort *) (data->video.end - (Y) * data->video.pitch + (X) * 2)
|
||||
GLushort *P = (GLushort *) (data->video.end - (Y) * data->video.pitch + (X) * 2);
|
||||
#define INC_PIXEL_PTR(P) P += 1
|
||||
#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
|
||||
*P = ( (((R) & 0xf8) << 7) | (((G) & 0xf8) << 2) | ((B) >> 3) )
|
||||
#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
|
||||
*P = ( (((A) & 0x80) << 8) | (((R) & 0xf8) << 7) | (((G) & 0xf8) << 2) | ((B) >> 3) )
|
||||
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
|
||||
R = ((*P & 0x7c00) >> 7); \
|
||||
G = ((*P & 0x03e0) >> 2); \
|
||||
B = ((*P & 0x001f) << 3); \
|
||||
A = ((*P & 0x8000) ? 0xff : 0)
|
||||
#define STORE_PIXEL(P, X, Y, S) \
|
||||
*P = ( (((S[RCOMP]) & 0xf8) << 7) | (((S[GCOMP]) & 0xf8) << 2) | ((S[BCOMP]) >> 3) )
|
||||
#define FETCH_PIXEL(D, P) \
|
||||
D[RCOMP] = ((*P & 0x7c00) >> 7); \
|
||||
D[GCOMP] = ((*P & 0x03e0) >> 2); \
|
||||
D[BCOMP] = ((*P & 0x001f) << 3); \
|
||||
D[ACOMP] = ((*P & 0x8000) ? 0xff : 0)
|
||||
|
||||
#include "swrast/s_spantemp.h"
|
||||
|
||||
/* RGB16 */
|
||||
#define NAME(PREFIX) PREFIX##_RGB16
|
||||
#define FORMAT GL_RGBA8
|
||||
#define SPAN_VARS \
|
||||
IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx;
|
||||
#define INIT_PIXEL_PTR(P, X, Y) \
|
||||
GLushort *P = (GLushort *) (data->video.end - (Y) * data->video.pitch + (X) * 2)
|
||||
GLushort *P = (GLushort *) (data->video.end - (Y) * data->video.pitch + (X) * 2);
|
||||
#define INC_PIXEL_PTR(P) P += 1
|
||||
#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
|
||||
*P = ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) )
|
||||
#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
|
||||
*P = ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) )
|
||||
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
|
||||
R = ((*P & 0xf800) >> 8); \
|
||||
G = ((*P & 0x07e0) >> 3); \
|
||||
B = ((*P & 0x001f) << 3); \
|
||||
A = CHAN_MAX
|
||||
#define STORE_PIXEL(P, X, Y, S) \
|
||||
*P = ( (((S[RCOMP]) & 0xf8) << 8) | (((S[GCOMP]) & 0xfc) << 3) | ((S[BCOMP]) >> 3) )
|
||||
#define FETCH_PIXEL(D, P) \
|
||||
D[RCOMP] = ((*P & 0xf800) >> 8); \
|
||||
D[GCOMP] = ((*P & 0x07e0) >> 3); \
|
||||
D[BCOMP] = ((*P & 0x001f) << 3); \
|
||||
D[ACOMP] = 0xff
|
||||
|
||||
#include "swrast/s_spantemp.h"
|
||||
|
||||
/* RGB24 */
|
||||
#define NAME(PREFIX) PREFIX##_RGB24
|
||||
#define FORMAT GL_RGBA8
|
||||
#define SPAN_VARS \
|
||||
IDirectFBGL_data *data = ctx->DriverCtx;
|
||||
#define INIT_PIXEL_PTR(P, X, Y) \
|
||||
GLubyte *P = data->video.end - (Y) * data->video.pitch + (X) * 3
|
||||
GLubyte *P = data->video.end - (Y) * data->video.pitch + (X) * 3;
|
||||
#define INC_PIXEL_PTR(P) P += 3
|
||||
#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
|
||||
P[0] = B; P[1] = G; P[2] = R
|
||||
#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
|
||||
P[0] = B; P[1] = G; P[2] = R
|
||||
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
|
||||
R = P[2]; G = P[1]; B = P[0]; A = CHAN_MAX
|
||||
#define STORE_PIXEL(P, X, Y, S) \
|
||||
P[0] = S[BCOMP]; P[1] = S[GCOMP]; P[2] = S[BCOMP]
|
||||
#define FETCH_PIXEL(D, P) \
|
||||
D[RCOMP] = P[2]; D[GCOMP] = P[1]; D[BCOMP] = P[0]; D[ACOMP] = 0xff
|
||||
|
||||
#include "swrast/s_spantemp.h"
|
||||
|
||||
/* RGB32 */
|
||||
#define NAME(PREFIX) PREFIX##_RGB32
|
||||
#define FORMAT GL_RGBA8
|
||||
#define SPAN_VARS \
|
||||
IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx;
|
||||
#define INIT_PIXEL_PTR(P, X, Y) \
|
||||
GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4)
|
||||
GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4);
|
||||
#define INC_PIXEL_PTR(P) P += 1
|
||||
#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
|
||||
*P = ( ((R) << 16) | ((G) << 8) | (B) )
|
||||
#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
|
||||
*P = ( ((R) << 16) | ((G) << 8) | (B) )
|
||||
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
|
||||
R = ((*P & 0x00ff0000) >> 16); \
|
||||
G = ((*P & 0x0000ff00) >> 8); \
|
||||
B = ((*P & 0x000000ff) ); \
|
||||
A = CHAN_MAX
|
||||
#define STORE_PIXEL(P, X, Y, S) \
|
||||
*P = ( ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) )
|
||||
#define FETCH_PIXEL(D, P) \
|
||||
D[RCOMP] = ((*P & 0x00ff0000) >> 16); \
|
||||
D[GCOMP] = ((*P & 0x0000ff00) >> 8); \
|
||||
D[BCOMP] = ((*P & 0x000000ff) ); \
|
||||
D[ACOMP] = 0xff
|
||||
|
||||
#include "swrast/s_spantemp.h"
|
||||
|
||||
/* ARGB */
|
||||
#define NAME(PREFIX) PREFIX##_ARGB
|
||||
#define FORMAT GL_RGBA8
|
||||
#define SPAN_VARS \
|
||||
IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx;
|
||||
#define INIT_PIXEL_PTR(P, X, Y) \
|
||||
GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4)
|
||||
GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4);
|
||||
#define INC_PIXEL_PTR(P) P += 1
|
||||
#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
|
||||
*P = ( 0xff000000 | ((R) << 16) | ((G) << 8) | (B) )
|
||||
#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
|
||||
*P = ( ((A) << 24) | ((R) << 16) | ((G) << 8) | (B) )
|
||||
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
|
||||
R = ((*P & 0x00ff0000) >> 16); \
|
||||
G = ((*P & 0x0000ff00) >> 8); \
|
||||
B = ((*P & 0x000000ff) ); \
|
||||
A = ((*P & 0xff000000) >> 24)
|
||||
#define STORE_PIXEL_RGB(P, X, Y, S) \
|
||||
*P = ( 0xff000000 | ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) )
|
||||
#define STORE_PIXEL(P, X, Y, S) \
|
||||
*P = ( ((S[ACOMP]) << 24) | ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) )
|
||||
#define FETCH_PIXEL(D, P) \
|
||||
D[RCOMP] = ((*P & 0x00ff0000) >> 16); \
|
||||
D[GCOMP] = ((*P & 0x0000ff00) >> 8); \
|
||||
D[BCOMP] = ((*P & 0x000000ff) ); \
|
||||
D[ACOMP] = ((*P & 0xff000000) >> 24)
|
||||
|
||||
#include "swrast/s_spantemp.h"
|
||||
|
||||
/* AiRGB */
|
||||
#define NAME(PREFIX) PREFIX##_AiRGB
|
||||
#define FORMAT GL_RGBA8
|
||||
#define SPAN_VARS \
|
||||
IDirectFBGL_data *data = (IDirectFBGL_data*) ctx->DriverCtx;
|
||||
#define INIT_PIXEL_PTR(P, X, Y) \
|
||||
GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4)
|
||||
GLuint *P = (GLuint*) (data->video.end - (Y) * data->video.pitch + (X) * 4);
|
||||
#define INC_PIXEL_PTR(P) P += 1
|
||||
#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \
|
||||
*P = ( ((R) << 16) | ((G) << 8) | (B) )
|
||||
#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \
|
||||
*P = ( ((0xff - (A)) << 24) | ((R) << 16) | ((G) << 8) | (B) )
|
||||
#define FETCH_RGBA_PIXEL(R, G, B, A, P) \
|
||||
R = ((*P & 0x00ff0000) >> 16); \
|
||||
G = ((*P & 0x0000ff00) >> 8); \
|
||||
B = ((*P & 0x000000ff) ); \
|
||||
A = (0xff - ((*P & 0xff000000) >> 24))
|
||||
#define STORE_PIXEL_RGB(P, X, Y, S) \
|
||||
*P = ( ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) )
|
||||
#define STORE_PIXEL(P, X, Y, S) \
|
||||
*P = ( ((0xff - (S[ACOMP])) << 24) | ((S[RCOMP]) << 16) | ((S[GCOMP]) << 8) | (S[BCOMP]) )
|
||||
#define FETCH_PIXEL(D, P) \
|
||||
D[RCOMP] = ((*P & 0x00ff0000) >> 16); \
|
||||
D[GCOMP] = ((*P & 0x0000ff00) >> 8); \
|
||||
D[BCOMP] = ((*P & 0x000000ff) ); \
|
||||
D[ACOMP] = (0xff - ((*P & 0xff000000) >> 24))
|
||||
|
||||
#include "swrast/s_spantemp.h"
|
||||
|
||||
@@ -520,16 +535,12 @@ dfb_mesa_create_context( GLcontext *context,
|
||||
GLframebuffer *framebuffer,
|
||||
GLvisual *visual,
|
||||
DFBSurfacePixelFormat format,
|
||||
void *data )
|
||||
IDirectFBGL_data *data )
|
||||
{
|
||||
struct dd_function_table functions;
|
||||
struct swrast_device_driver *swdd;
|
||||
|
||||
_mesa_initialize_framebuffer( framebuffer, visual,
|
||||
visual->haveDepthBuffer,
|
||||
visual->haveStencilBuffer,
|
||||
visual->haveAccumBuffer,
|
||||
visual->accumAlphaBits > 0 );
|
||||
_mesa_initialize_framebuffer( framebuffer, visual );
|
||||
|
||||
_mesa_init_driver_functions( &functions );
|
||||
functions.GetString = get_string;
|
||||
@@ -538,7 +549,7 @@ dfb_mesa_create_context( GLcontext *context,
|
||||
functions.Viewport = set_viewport;
|
||||
|
||||
if (!_mesa_initialize_context( context, visual, NULL,
|
||||
&functions, data )) {
|
||||
&functions, (void*) data )) {
|
||||
D_DEBUG( "DirectFBGL/Mesa: _mesa_initialize_context() failed.\n" );
|
||||
_mesa_free_framebuffer_data( framebuffer );
|
||||
return false;
|
||||
@@ -552,80 +563,92 @@ dfb_mesa_create_context( GLcontext *context,
|
||||
|
||||
swdd = _swrast_GetDeviceDriverReference( context );
|
||||
swdd->SetBuffer = set_buffer;
|
||||
|
||||
_mesa_init_renderbuffer( &data->render, 0 );
|
||||
data->render.InternalFormat = GL_RGBA;
|
||||
data->render._BaseFormat = GL_RGBA;
|
||||
data->render.DataType = GL_UNSIGNED_BYTE;
|
||||
data->render.Data = data->video.start;
|
||||
data->render.Delete = delete_renderbuffer;
|
||||
data->render.AllocStorage = renderbuffer_storage;
|
||||
|
||||
switch (format) {
|
||||
case DSPF_RGB332:
|
||||
swdd->WriteRGBASpan = write_rgba_span_RGB332;
|
||||
swdd->WriteRGBSpan = write_rgb_span_RGB332;
|
||||
swdd->WriteMonoRGBASpan = write_monorgba_span_RGB332;
|
||||
swdd->WriteRGBAPixels = write_rgba_pixels_RGB332;
|
||||
swdd->WriteMonoRGBAPixels = write_monorgba_pixels_RGB332;
|
||||
swdd->ReadRGBASpan = read_rgba_span_RGB332;
|
||||
swdd->ReadRGBAPixels = read_rgba_pixels_RGB332;
|
||||
case DSPF_RGB332:
|
||||
data->render.GetRow = get_row_RGB332;
|
||||
data->render.GetValues = get_values_RGB332;
|
||||
data->render.PutRow = put_row_RGB332;
|
||||
data->render.PutMonoRow = put_mono_row_RGB332;
|
||||
data->render.PutValues = put_values_RGB332;
|
||||
data->render.PutMonoValues = put_mono_values_RGB332;
|
||||
break;
|
||||
case DSPF_ARGB1555:
|
||||
swdd->WriteRGBASpan = write_rgba_span_ARGB1555;
|
||||
swdd->WriteRGBSpan = write_rgb_span_ARGB1555;
|
||||
swdd->WriteMonoRGBASpan = write_monorgba_span_ARGB1555;
|
||||
swdd->WriteRGBAPixels = write_rgba_pixels_ARGB1555;
|
||||
swdd->WriteMonoRGBAPixels = write_monorgba_pixels_ARGB1555;
|
||||
swdd->ReadRGBASpan = read_rgba_span_ARGB1555;
|
||||
swdd->ReadRGBAPixels = read_rgba_pixels_ARGB1555;
|
||||
data->render.GetRow = get_row_ARGB1555;
|
||||
data->render.GetValues = get_values_ARGB1555;
|
||||
data->render.PutRow = put_row_ARGB1555;
|
||||
data->render.PutMonoRow = put_mono_row_ARGB1555;
|
||||
data->render.PutValues = put_values_ARGB1555;
|
||||
data->render.PutMonoValues = put_mono_values_ARGB1555;
|
||||
break;
|
||||
case DSPF_RGB16:
|
||||
swdd->WriteRGBASpan = write_rgba_span_RGB16;
|
||||
swdd->WriteRGBSpan = write_rgb_span_RGB16;
|
||||
swdd->WriteMonoRGBASpan = write_monorgba_span_RGB16;
|
||||
swdd->WriteRGBAPixels = write_rgba_pixels_RGB16;
|
||||
swdd->WriteMonoRGBAPixels = write_monorgba_pixels_RGB16;
|
||||
swdd->ReadRGBASpan = read_rgba_span_RGB16;
|
||||
swdd->ReadRGBAPixels = read_rgba_pixels_RGB16;
|
||||
data->render.GetRow = get_row_RGB16;
|
||||
data->render.GetValues = get_values_RGB16;
|
||||
data->render.PutRow = put_row_RGB16;
|
||||
data->render.PutMonoRow = put_mono_row_RGB16;
|
||||
data->render.PutValues = put_values_RGB16;
|
||||
data->render.PutMonoValues = put_mono_values_RGB16;
|
||||
break;
|
||||
case DSPF_RGB24:
|
||||
swdd->WriteRGBASpan = write_rgba_span_RGB24;
|
||||
swdd->WriteRGBSpan = write_rgb_span_RGB24;
|
||||
swdd->WriteMonoRGBASpan = write_monorgba_span_RGB24;
|
||||
swdd->WriteRGBAPixels = write_rgba_pixels_RGB24;
|
||||
swdd->WriteMonoRGBAPixels = write_monorgba_pixels_RGB24;
|
||||
swdd->ReadRGBASpan = read_rgba_span_RGB24;
|
||||
swdd->ReadRGBAPixels = read_rgba_pixels_RGB24;
|
||||
case DSPF_RGB24:
|
||||
data->render.GetRow = get_row_RGB24;
|
||||
data->render.GetValues = get_values_RGB24;
|
||||
data->render.PutRow = put_row_RGB24;
|
||||
data->render.PutMonoRow = put_mono_row_RGB24;
|
||||
data->render.PutValues = put_values_RGB24;
|
||||
data->render.PutMonoValues = put_mono_values_RGB24;
|
||||
break;
|
||||
case DSPF_RGB32:
|
||||
swdd->WriteRGBASpan = write_rgba_span_RGB32;
|
||||
swdd->WriteRGBSpan = write_rgb_span_RGB32;
|
||||
swdd->WriteMonoRGBASpan = write_monorgba_span_RGB32;
|
||||
swdd->WriteRGBAPixels = write_rgba_pixels_RGB32;
|
||||
swdd->WriteMonoRGBAPixels = write_monorgba_pixels_RGB32;
|
||||
swdd->ReadRGBASpan = read_rgba_span_RGB32;
|
||||
swdd->ReadRGBAPixels = read_rgba_pixels_RGB32;
|
||||
data->render.GetRow = get_row_RGB32;
|
||||
data->render.GetValues = get_values_RGB32;
|
||||
data->render.PutRow = put_row_RGB32;
|
||||
data->render.PutMonoRow = put_mono_row_RGB32;
|
||||
data->render.PutValues = put_values_RGB32;
|
||||
data->render.PutMonoValues = put_mono_values_RGB32;
|
||||
break;
|
||||
case DSPF_ARGB:
|
||||
swdd->WriteRGBASpan = write_rgba_span_ARGB;
|
||||
swdd->WriteRGBSpan = write_rgb_span_ARGB;
|
||||
swdd->WriteMonoRGBASpan = write_monorgba_span_ARGB;
|
||||
swdd->WriteRGBAPixels = write_rgba_pixels_ARGB;
|
||||
swdd->WriteMonoRGBAPixels = write_monorgba_pixels_ARGB;
|
||||
swdd->ReadRGBASpan = read_rgba_span_ARGB;
|
||||
swdd->ReadRGBAPixels = read_rgba_pixels_ARGB;
|
||||
data->render.GetRow = get_row_ARGB;
|
||||
data->render.GetValues = get_values_ARGB;
|
||||
data->render.PutRow = put_row_ARGB;
|
||||
data->render.PutMonoRow = put_mono_row_ARGB;
|
||||
data->render.PutValues = put_values_ARGB;
|
||||
data->render.PutMonoValues = put_mono_values_ARGB;
|
||||
break;
|
||||
case DSPF_AiRGB:
|
||||
swdd->WriteRGBASpan = write_rgba_span_AiRGB;
|
||||
swdd->WriteRGBSpan = write_rgb_span_AiRGB;
|
||||
swdd->WriteMonoRGBASpan = write_monorgba_span_AiRGB;
|
||||
swdd->WriteRGBAPixels = write_rgba_pixels_AiRGB;
|
||||
swdd->WriteMonoRGBAPixels = write_monorgba_pixels_AiRGB;
|
||||
swdd->ReadRGBASpan = read_rgba_span_AiRGB;
|
||||
swdd->ReadRGBAPixels = read_rgba_pixels_AiRGB;
|
||||
data->render.GetRow = get_row_AiRGB;
|
||||
data->render.GetValues = get_values_AiRGB;
|
||||
data->render.PutRow = put_row_AiRGB;
|
||||
data->render.PutMonoRow = put_mono_row_AiRGB;
|
||||
data->render.PutValues = put_values_AiRGB;
|
||||
data->render.PutMonoValues = put_mono_values_AiRGB;
|
||||
break;
|
||||
default:
|
||||
D_BUG( "unexpected pixelformat" );
|
||||
return false;
|
||||
}
|
||||
|
||||
_mesa_add_renderbuffer( framebuffer, BUFFER_FRONT_LEFT, &data->render );
|
||||
|
||||
_mesa_add_soft_renderbuffers( framebuffer,
|
||||
GL_FALSE,
|
||||
visual->haveDepthBuffer,
|
||||
visual->haveStencilBuffer,
|
||||
visual->haveAccumBuffer,
|
||||
GL_FALSE,
|
||||
GL_FALSE );
|
||||
|
||||
TNL_CONTEXT( context )->Driver.RunPipeline = _tnl_run_pipeline;
|
||||
|
||||
_mesa_enable_sw_extensions( context );
|
||||
|
||||
_mesa_make_current( context, framebuffer );
|
||||
_mesa_make_current( context, framebuffer, framebuffer );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -634,7 +657,7 @@ static void
|
||||
dfb_mesa_destroy_context( GLcontext *context,
|
||||
GLframebuffer *framebuffer )
|
||||
{
|
||||
_mesa_make_current( NULL, NULL );
|
||||
_mesa_make_current( NULL, NULL, NULL );
|
||||
_mesa_free_framebuffer_data( framebuffer );
|
||||
_mesa_notifyDestroy( context );
|
||||
_mesa_free_context_data( context );
|
||||
|
@@ -38,9 +38,6 @@ OBJECTS = $(C_SOURCES:.c=.o) \
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Include directories
|
||||
SHARED_INCLUDES = \
|
||||
-I. \
|
||||
@@ -78,9 +75,10 @@ default: depend symlinks $(LIBNAME) $(LIB_DIR)/$(LIBNAME)
|
||||
# $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(LIB_DIR) \
|
||||
# $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS)
|
||||
|
||||
# XXX we should use the mklib script here
|
||||
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
|
||||
rm -f $@
|
||||
gcc $(ARCH_FLAGS) -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
|
||||
$(CC) $(ARCH_FLAGS) -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
|
||||
|
||||
|
||||
$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
|
||||
|
@@ -7,25 +7,20 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "spantmp_common.h"
|
||||
|
||||
#ifndef DBG
|
||||
#define DBG 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_HW_DEPTH_SPANS
|
||||
#define HAVE_HW_DEPTH_SPANS 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_HW_DEPTH_PIXELS
|
||||
#define HAVE_HW_DEPTH_PIXELS 0
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_LOCK
|
||||
#define HW_READ_LOCK() HW_LOCK()
|
||||
#endif
|
||||
#ifndef HW_READ_UNLOCK
|
||||
#define HW_READ_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
static void TAG(WriteDepthSpan)( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n, GLint x, GLint y,
|
||||
|
@@ -13,15 +13,6 @@
|
||||
*
|
||||
* These functions are compiled into each DRI driver so libGL.so knows nothing
|
||||
* about them.
|
||||
*
|
||||
* \note
|
||||
* When \c DRI_NEW_INTERFACE_ONLY is defined, code is built / not built so
|
||||
* that only the "new" libGL-to-driver interfaces are supported. This breaks
|
||||
* backwards compatability. However, this may be necessary when DRI drivers
|
||||
* are built to be used in non-XFree86 environments.
|
||||
*
|
||||
* \todo There are still some places in the code that need to be wrapped with
|
||||
* \c DRI_NEW_INTERFACE_ONLY.
|
||||
*/
|
||||
|
||||
|
||||
@@ -35,17 +26,8 @@
|
||||
#define MAP_FAILED ((void *)-1)
|
||||
#endif
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
# include <X11/Xlibint.h>
|
||||
# include <Xext.h>
|
||||
# include <extutil.h>
|
||||
# include "xf86dri.h"
|
||||
# define _mesa_malloc(b) Xmalloc(b)
|
||||
# define _mesa_free(m) Xfree(m)
|
||||
#else
|
||||
# include "imports.h"
|
||||
# define None 0
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
#include "imports.h"
|
||||
#define None 0
|
||||
|
||||
#include "dri_util.h"
|
||||
#include "drm_sarea.h"
|
||||
@@ -55,6 +37,10 @@
|
||||
typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __DRIid drawable, int32_t *numerator, int32_t *denominator);
|
||||
#endif
|
||||
|
||||
/* This pointer *must* be set by the driver's __driCreateNewScreen funciton!
|
||||
*/
|
||||
const __DRIinterfaceMethods * dri_interface = NULL;
|
||||
|
||||
/**
|
||||
* Weak thread-safety dispatch pointer. Older versions of libGL will not have
|
||||
* this symbol, so a "weak" version is included here so that the driver will
|
||||
@@ -68,19 +54,6 @@ struct _glapi_table *_glapi_DispatchTSD __attribute__((weak)) = NULL;
|
||||
*/
|
||||
static const int empty_attribute_list[1] = { None };
|
||||
|
||||
/**
|
||||
* Function used to determine if a drawable (window) still exists. Ideally
|
||||
* this function comes from libGL. With older versions of libGL from XFree86
|
||||
* we can fall-back to an internal version.
|
||||
*
|
||||
* \sa __driWindowExists __glXWindowExists
|
||||
*/
|
||||
static PFNGLXWINDOWEXISTSPROC window_exists;
|
||||
|
||||
typedef GLboolean (*PFNGLXCREATECONTEXTWITHCONFIGPROC)( __DRInativeDisplay*, int, int, void *,
|
||||
drm_context_t * );
|
||||
|
||||
static PFNGLXCREATECONTEXTWITHCONFIGPROC create_context_with_config;
|
||||
|
||||
/**
|
||||
* Cached copy of the internal API version used by libGL and the client-side
|
||||
@@ -99,27 +72,6 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy, const __GLcontextMode
|
||||
static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate);
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef not_defined
|
||||
static GLboolean driFeatureOn(const char *name)
|
||||
{
|
||||
char *env = getenv(name);
|
||||
|
||||
if (!env) return GL_FALSE;
|
||||
if (!strcasecmp(env, "enable")) return GL_TRUE;
|
||||
if (!strcasecmp(env, "1")) return GL_TRUE;
|
||||
if (!strcasecmp(env, "on")) return GL_TRUE;
|
||||
if (!strcasecmp(env, "true")) return GL_TRUE;
|
||||
if (!strcasecmp(env, "t")) return GL_TRUE;
|
||||
if (!strcasecmp(env, "yes")) return GL_TRUE;
|
||||
if (!strcasecmp(env, "y")) return GL_TRUE;
|
||||
|
||||
return GL_FALSE;
|
||||
}
|
||||
#endif /* not_defined */
|
||||
|
||||
|
||||
/**
|
||||
* Print message to \c stderr if the \c LIBGL_DEBUG environment variable
|
||||
* is set.
|
||||
@@ -142,78 +94,6 @@ __driUtilMessage(const char *f, ...)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* fd.o bug #1713: Some rare libGL's have __glXFindDRIScreen defined but do not
|
||||
* export it via glXGetProcAddress. These are not supported anymore, so print
|
||||
* an error message to that effect. - ajax 2004-10-26
|
||||
*/
|
||||
typedef __DRIscreen *(*PFNGLXFINDDRISCREEN)(__DRInativeDisplay *, int);
|
||||
|
||||
static __DRIscreen *glx_find_dri_screen(__DRInativeDisplay *d, int i)
|
||||
{
|
||||
PFNGLXFINDDRISCREEN findscreen =
|
||||
(PFNGLXFINDDRISCREEN)glXGetProcAddress("__glXFindDRIScreen");
|
||||
|
||||
if (!findscreen)
|
||||
{
|
||||
__driUtilMessage("glXGetProcAddress(\"__glXFindDRIScreen\") failed!");
|
||||
__driUtilMessage("Your libGL is too old, please upgrade.");
|
||||
return NULL;
|
||||
}
|
||||
else return findscreen(d, i);
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/** \name Visual utility functions */
|
||||
/*****************************************************************/
|
||||
/*@{*/
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
/**
|
||||
* Find a \c __GLcontextModes structure matching the given visual ID.
|
||||
*
|
||||
* \param dpy Display to search for a matching configuration.
|
||||
* \param scrn Screen number on \c dpy to be searched.
|
||||
* \param vid Desired \c VisualID to find.
|
||||
*
|
||||
* \returns A pointer to a \c __GLcontextModes structure that matches \c vid,
|
||||
* if found, or \c NULL if no match is found.
|
||||
*/
|
||||
static const __GLcontextModes *
|
||||
findConfigMode(__DRInativeDisplay *dpy, int scrn, VisualID vid,
|
||||
const __DRIscreen * pDRIScreen)
|
||||
{
|
||||
if ( (pDRIScreen != NULL) && (pDRIScreen->private != NULL) ) {
|
||||
const __DRIscreenPrivate * const psp =
|
||||
(const __DRIscreenPrivate *) pDRIScreen->private;
|
||||
|
||||
return _gl_context_modes_find_visual( psp->modes, vid );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function is a hack to work-around old versions of libGL.so that
|
||||
* do not export \c XF86DRICreateContextWithConfig. I would modify the
|
||||
* code to just use this function, but the stand-alone driver (i.e., DRI
|
||||
* drivers that are built to work without XFree86) shouldn't have to know
|
||||
* about X structures like a \c Visual.
|
||||
*/
|
||||
static GLboolean
|
||||
fake_XF86DRICreateContextWithConfig( __DRInativeDisplay* dpy, int screen, int configID,
|
||||
XID* context, drm_context_t * hHWContext )
|
||||
{
|
||||
Visual vis;
|
||||
|
||||
vis.visualid = configID;
|
||||
return XF86DRICreateContext( dpy, screen, & vis, context, hHWContext );
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/** \name Drawable list management */
|
||||
@@ -242,50 +122,6 @@ static __DRIdrawable *__driFindDrawable(void *drawHash, __DRIid draw)
|
||||
return pdraw;
|
||||
}
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
static GLboolean __driWindowExistsFlag;
|
||||
|
||||
static int __driWindowExistsErrorHandler(Display *dpy, XErrorEvent *xerr)
|
||||
{
|
||||
if (xerr->error_code == BadWindow) {
|
||||
__driWindowExistsFlag = GL_FALSE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a window associated with a \c GLXDrawable exists on the
|
||||
* X-server.
|
||||
*
|
||||
* \param dpy Display associated with the drawable to be queried.
|
||||
* \param draw \c GLXDrawable to test.
|
||||
*
|
||||
* \returns \c GL_TRUE if a window exists that is associated with \c draw,
|
||||
* otherwise \c GL_FALSE is returned.
|
||||
*
|
||||
* \warning This function is not currently thread-safe.
|
||||
*
|
||||
* \deprecated
|
||||
* \c __glXWindowExists (from libGL) is prefered over this function. Starting
|
||||
* with the next major release of XFree86, this function will be removed.
|
||||
* Even now this function is no longer directly called. Instead it is called
|
||||
* via a function pointer if and only if \c __glXWindowExists does not exist.
|
||||
*
|
||||
* \sa __glXWindowExists glXGetProcAddress window_exists
|
||||
*/
|
||||
static GLboolean __driWindowExists(Display *dpy, GLXDrawable draw)
|
||||
{
|
||||
XWindowAttributes xwa;
|
||||
int (*oldXErrorHandler)(Display *, XErrorEvent *);
|
||||
|
||||
XSync(dpy, GL_FALSE);
|
||||
__driWindowExistsFlag = GL_TRUE;
|
||||
oldXErrorHandler = XSetErrorHandler(__driWindowExistsErrorHandler);
|
||||
XGetWindowAttributes(dpy, draw, &xwa); /* dummy request */
|
||||
XSetErrorHandler(oldXErrorHandler);
|
||||
return __driWindowExistsFlag;
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/**
|
||||
* Find drawables in the local hash that have been destroyed on the
|
||||
@@ -303,7 +139,7 @@ static void __driGarbageCollectDrawables(void *drawHash)
|
||||
do {
|
||||
__DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private;
|
||||
dpy = pdp->driScreenPriv->display;
|
||||
if (! (*window_exists)(dpy, draw)) {
|
||||
if (! (*dri_interface->windowExists)(dpy, draw)) {
|
||||
/* Destroy the local drawable data in the hash table, if the
|
||||
drawable no longer exists in the Xserver */
|
||||
drmHashDelete(drawHash, draw);
|
||||
@@ -341,7 +177,7 @@ static void __driGarbageCollectDrawables(void *drawHash)
|
||||
* While casting the opaque private pointers associated with the parameters
|
||||
* into their respective real types it also assures they are not \c NULL.
|
||||
*/
|
||||
static GLboolean driUnbindContext3(__DRInativeDisplay *dpy, int scrn,
|
||||
static GLboolean driUnbindContext(__DRInativeDisplay *dpy, int scrn,
|
||||
__DRIid draw, __DRIid read,
|
||||
__DRIcontext *ctx)
|
||||
{
|
||||
@@ -355,7 +191,7 @@ static GLboolean driUnbindContext3(__DRInativeDisplay *dpy, int scrn,
|
||||
|
||||
/*
|
||||
** Assume error checking is done properly in glXMakeCurrent before
|
||||
** calling driUnbindContext3.
|
||||
** calling driUnbindContext.
|
||||
*/
|
||||
|
||||
if (ctx == NULL || draw == None || read == None) {
|
||||
@@ -363,7 +199,7 @@ static GLboolean driUnbindContext3(__DRInativeDisplay *dpy, int scrn,
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
pDRIScreen = glx_find_dri_screen(dpy, scrn);
|
||||
pDRIScreen = (*dri_interface->getScreen)(dpy, scrn);
|
||||
if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
|
||||
/* ERROR!!! */
|
||||
return GL_FALSE;
|
||||
@@ -523,7 +359,7 @@ static GLboolean DoBindContext(__DRInativeDisplay *dpy,
|
||||
* for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent
|
||||
* function.
|
||||
*/
|
||||
static GLboolean driBindContext3(__DRInativeDisplay *dpy, int scrn,
|
||||
static GLboolean driBindContext(__DRInativeDisplay *dpy, int scrn,
|
||||
__DRIid draw, __DRIid read,
|
||||
__DRIcontext * ctx)
|
||||
{
|
||||
@@ -539,7 +375,7 @@ static GLboolean driBindContext3(__DRInativeDisplay *dpy, int scrn,
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
pDRIScreen = glx_find_dri_screen(dpy, scrn);
|
||||
pDRIScreen = (*dri_interface->getScreen)(dpy, scrn);
|
||||
if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
|
||||
/* ERROR!!! */
|
||||
return GL_FALSE;
|
||||
@@ -548,79 +384,6 @@ static GLboolean driBindContext3(__DRInativeDisplay *dpy, int scrn,
|
||||
return DoBindContext( dpy, draw, read, ctx, ctx->mode,
|
||||
(__DRIscreenPrivate *)pDRIScreen->private );
|
||||
}
|
||||
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
/**
|
||||
* This function takes both a read buffer and a draw buffer. This is needed
|
||||
* for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent
|
||||
* function.
|
||||
*/
|
||||
static GLboolean driBindContext2(Display *dpy, int scrn,
|
||||
GLXDrawable draw, GLXDrawable read,
|
||||
GLXContext gc)
|
||||
{
|
||||
__DRIscreen *pDRIScreen;
|
||||
const __GLcontextModes *modes;
|
||||
|
||||
/*
|
||||
** Assume error checking is done properly in glXMakeCurrent before
|
||||
** calling driBindContext.
|
||||
*/
|
||||
|
||||
if (gc == NULL || draw == None || read == None) {
|
||||
/* ERROR!!! */
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
pDRIScreen = glx_find_dri_screen(dpy, scrn);
|
||||
modes = (driCompareGLXAPIVersion( 20040317 ) >= 0)
|
||||
? gc->driContext.mode
|
||||
: findConfigMode( dpy, scrn, gc->vid, pDRIScreen );
|
||||
|
||||
if ( modes == NULL ) {
|
||||
/* ERROR!!! */
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
/* findConfigMode will return NULL if the DRI screen or screen private
|
||||
* are NULL.
|
||||
*/
|
||||
assert( (pDRIScreen != NULL) && (pDRIScreen->private != NULL) );
|
||||
|
||||
return DoBindContext( dpy, draw, read, & gc->driContext, modes,
|
||||
(__DRIscreenPrivate *)pDRIScreen->private );
|
||||
}
|
||||
|
||||
static GLboolean driUnbindContext2(Display *dpy, int scrn,
|
||||
GLXDrawable draw, GLXDrawable read,
|
||||
GLXContext gc)
|
||||
{
|
||||
return driUnbindContext3(dpy, scrn, draw, read, & gc->driContext);
|
||||
}
|
||||
|
||||
/*
|
||||
* Simply call bind with the same GLXDrawable for the read and draw buffers.
|
||||
*/
|
||||
static GLboolean driBindContext(Display *dpy, int scrn,
|
||||
GLXDrawable draw, GLXContext gc)
|
||||
{
|
||||
return driBindContext2(dpy, scrn, draw, draw, gc);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Simply call bind with the same GLXDrawable for the read and draw buffers.
|
||||
*/
|
||||
static GLboolean driUnbindContext(Display *dpy, int scrn,
|
||||
GLXDrawable draw, GLXContext gc,
|
||||
int will_rebind)
|
||||
{
|
||||
(void) will_rebind;
|
||||
return driUnbindContext2( dpy, scrn, draw, draw, gc );
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
||||
@@ -635,8 +398,8 @@ static GLboolean driUnbindContext(Display *dpy, int scrn,
|
||||
* \param pdp pointer to the private drawable information to update.
|
||||
*
|
||||
* This function basically updates the __DRIdrawablePrivate struct's
|
||||
* cliprect information by calling \c __DRIDrawablePrivate::getInfo. This is
|
||||
* usually called by the DRI_VALIDATE_DRAWABLE_INFO macro which
|
||||
* cliprect information by calling \c __DRIinterfaceMethods::getDrawableInfo.
|
||||
* This is usually called by the DRI_VALIDATE_DRAWABLE_INFO macro which
|
||||
* compares the __DRIdrwablePrivate pStamp and lastStamp values. If
|
||||
* the values are different that means we have to update the clipping
|
||||
* info.
|
||||
@@ -669,7 +432,7 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
|
||||
DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
|
||||
|
||||
if (!__driFindDrawable(psp->drawHash, pdp->draw) ||
|
||||
! (*pdp->getInfo)(pdp->display, pdp->screen, pdp->draw,
|
||||
! (*dri_interface->getDrawableInfo)(pdp->display, pdp->screen, pdp->draw,
|
||||
&pdp->index, &pdp->lastStamp,
|
||||
&pdp->x, &pdp->y, &pdp->w, &pdp->h,
|
||||
&pdp->numClipRects, &pdp->pClipRects,
|
||||
@@ -803,7 +566,7 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
|
||||
int renderType,
|
||||
const int *attrs)
|
||||
{
|
||||
__DRIscreen * const pDRIScreen = glx_find_dri_screen(dpy, modes->screen);
|
||||
__DRIscreen * const pDRIScreen = (*dri_interface->getScreen)(dpy, modes->screen);
|
||||
__DRIscreenPrivate *psp;
|
||||
__DRIdrawablePrivate *pdp;
|
||||
|
||||
@@ -824,7 +587,7 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!XF86DRICreateDrawable(dpy, modes->screen, draw, &pdp->hHWDrawable)) {
|
||||
if (!(*dri_interface->createDrawable)(dpy, modes->screen, draw, &pdp->hHWDrawable)) {
|
||||
_mesa_free(pdp);
|
||||
return NULL;
|
||||
}
|
||||
@@ -850,21 +613,9 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
|
||||
pdp->driScreenPriv = psp;
|
||||
pdp->driContextPriv = &psp->dummyContextPriv;
|
||||
|
||||
pdp->getInfo = (PFNGLXGETDRAWABLEINFOPROC)
|
||||
glXGetProcAddress( (const GLubyte *) "__glXGetDrawableInfo" );
|
||||
if ( pdp->getInfo == NULL ) {
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
(void)XF86DRIDestroyDrawable(dpy, modes->screen, pdp->draw);
|
||||
_mesa_free(pdp);
|
||||
return NULL;
|
||||
#else
|
||||
pdp->getInfo = (PFNGLXGETDRAWABLEINFOPROC) XF86DRIGetDrawableInfo;
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
}
|
||||
|
||||
if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, modes,
|
||||
renderType == GLX_PIXMAP_BIT)) {
|
||||
(void)XF86DRIDestroyDrawable(dpy, modes->screen, pdp->draw);
|
||||
(void)(*dri_interface->destroyDrawable)(dpy, modes->screen, pdp->draw);
|
||||
_mesa_free(pdp);
|
||||
return NULL;
|
||||
}
|
||||
@@ -873,19 +624,18 @@ static void *driCreateNewDrawable(__DRInativeDisplay *dpy,
|
||||
pdraw->destroyDrawable = driDestroyDrawable;
|
||||
pdraw->swapBuffers = driSwapBuffers; /* called by glXSwapBuffers() */
|
||||
|
||||
if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) {
|
||||
pdraw->getSBC = driGetSBC;
|
||||
pdraw->waitForSBC = driWaitForSBC;
|
||||
pdraw->waitForMSC = driWaitForMSC;
|
||||
pdraw->swapBuffersMSC = driSwapBuffersMSC;
|
||||
pdraw->frameTracking = NULL;
|
||||
pdraw->queryFrameTracking = driQueryFrameTracking;
|
||||
pdraw->getSBC = driGetSBC;
|
||||
pdraw->waitForSBC = driWaitForSBC;
|
||||
pdraw->waitForMSC = driWaitForMSC;
|
||||
pdraw->swapBuffersMSC = driSwapBuffersMSC;
|
||||
pdraw->frameTracking = NULL;
|
||||
pdraw->queryFrameTracking = driQueryFrameTracking;
|
||||
|
||||
/* This special default value is replaced with the configured
|
||||
* default value when the drawable is first bound to a direct
|
||||
* rendering context. */
|
||||
pdraw->swap_interval = (unsigned)-1;
|
||||
}
|
||||
/* This special default value is replaced with the configured
|
||||
* default value when the drawable is first bound to a direct
|
||||
* rendering context.
|
||||
*/
|
||||
pdraw->swap_interval = (unsigned)-1;
|
||||
|
||||
pdp->swapBuffers = psp->DriverAPI.SwapBuffers;
|
||||
|
||||
@@ -921,8 +671,8 @@ static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)
|
||||
|
||||
if (pdp) {
|
||||
(*psp->DriverAPI.DestroyBuffer)(pdp);
|
||||
if ((*window_exists)(dpy, pdp->draw))
|
||||
(void)XF86DRIDestroyDrawable(dpy, scrn, pdp->draw);
|
||||
if ((*dri_interface->windowExists)(dpy, pdp->draw))
|
||||
(void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw);
|
||||
if (pdp->pClipRects) {
|
||||
_mesa_free(pdp->pClipRects);
|
||||
pdp->pClipRects = NULL;
|
||||
@@ -961,7 +711,7 @@ static void driDestroyContext(__DRInativeDisplay *dpy, int scrn, void *contextPr
|
||||
if (pcp) {
|
||||
(*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp);
|
||||
__driGarbageCollectDrawables(pcp->driScreenPriv->drawHash);
|
||||
(void)XF86DRIDestroyContext(dpy, scrn, pcp->contextID);
|
||||
(void) (*dri_interface->destroyContext)(dpy, scrn, pcp->contextID);
|
||||
_mesa_free(pcp);
|
||||
}
|
||||
}
|
||||
@@ -998,7 +748,7 @@ driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
|
||||
__DRIscreenPrivate *psp;
|
||||
void * const shareCtx = (pshare != NULL) ? pshare->driverPrivate : NULL;
|
||||
|
||||
pDRIScreen = glx_find_dri_screen(dpy, modes->screen);
|
||||
pDRIScreen = (*dri_interface->getScreen)(dpy, modes->screen);
|
||||
if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
|
||||
/* ERROR!!! */
|
||||
return NULL;
|
||||
@@ -1011,7 +761,7 @@ driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (! (*create_context_with_config)(dpy, modes->screen, modes->fbconfigID,
|
||||
if (! (*dri_interface->createContext)(dpy, modes->screen, modes->fbconfigID,
|
||||
&pcp->contextID, &pcp->hHWContext)) {
|
||||
_mesa_free(pcp);
|
||||
return NULL;
|
||||
@@ -1035,29 +785,12 @@ driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
|
||||
}
|
||||
|
||||
pctx->destroyContext = driDestroyContext;
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
pctx->bindContext = NULL;
|
||||
pctx->unbindContext = NULL;
|
||||
pctx->bindContext2 = NULL;
|
||||
pctx->unbindContext2 = NULL;
|
||||
pctx->bindContext3 = driBindContext3;
|
||||
pctx->unbindContext3 = driUnbindContext3;
|
||||
#else
|
||||
pctx->bindContext = (void *)driBindContext;
|
||||
pctx->unbindContext = (void *)driUnbindContext;
|
||||
if ( driCompareGLXAPIVersion( 20030606 ) >= 0 ) {
|
||||
pctx->bindContext2 = (void *)driBindContext2;
|
||||
pctx->unbindContext2 = (void *)driUnbindContext2;
|
||||
}
|
||||
|
||||
if ( driCompareGLXAPIVersion( 20040415 ) >= 0 ) {
|
||||
pctx->bindContext3 = (void *)driBindContext3;
|
||||
pctx->unbindContext3 = (void *)driUnbindContext3;
|
||||
}
|
||||
#endif
|
||||
pctx->bindContext = driBindContext;
|
||||
pctx->unbindContext = driUnbindContext;
|
||||
|
||||
if ( !(*psp->DriverAPI.CreateContext)(modes, pcp, shareCtx) ) {
|
||||
(void)XF86DRIDestroyContext(dpy, modes->screen, pcp->contextID);
|
||||
(void) (*dri_interface->destroyContext)(dpy, modes->screen,
|
||||
pcp->contextID);
|
||||
_mesa_free(pcp);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1066,57 +799,6 @@ driCreateNewContext(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
|
||||
|
||||
return pcp;
|
||||
}
|
||||
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
/**
|
||||
* Create the per-drawable private driver information.
|
||||
*
|
||||
* \param dpy the display handle.
|
||||
* \param vis the visual information.
|
||||
* \param sharedPrivate the shared context dependent methods or \c NULL if
|
||||
* non-existent.
|
||||
* \param pctx will receive the context dependent methods.
|
||||
*
|
||||
* \returns a opaque pointer to the per-context private information on success, or \c NULL
|
||||
* on failure.
|
||||
*
|
||||
* \deprecated
|
||||
* This function has been replaced by \c driCreateNewContext. In drivers
|
||||
* built to work with XFree86, this function will continue to exist to support
|
||||
* older versions of libGL. Starting with the next major relelase of XFree86,
|
||||
* this function will be removed.
|
||||
*
|
||||
* \internal
|
||||
* This function allocates and fills a __DRIcontextPrivateRec structure. It
|
||||
* gets the visual, converts it into a __GLcontextModesRec and passes it
|
||||
* to __DriverAPIRec::CreateContext to create the context.
|
||||
*/
|
||||
static void *driCreateContext(Display *dpy, XVisualInfo *vis,
|
||||
void *sharedPrivate, __DRIcontext *pctx)
|
||||
{
|
||||
__DRIscreen *pDRIScreen;
|
||||
const __GLcontextModes *modes;
|
||||
|
||||
pDRIScreen = glx_find_dri_screen(dpy, vis->screen);
|
||||
if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
|
||||
/* ERROR!!! */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Setup a __GLcontextModes struct corresponding to vis->visualid
|
||||
* and create the rendering context.
|
||||
*/
|
||||
|
||||
modes = findConfigMode(dpy, vis->screen, vis->visualid, pDRIScreen);
|
||||
return (modes == NULL)
|
||||
? NULL
|
||||
: driCreateNewContext( dpy, modes, GLX_RGBA_TYPE,
|
||||
sharedPrivate, pctx );
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
||||
@@ -1184,6 +866,11 @@ static void driDestroyScreen(__DRInativeDisplay *dpy, int scrn, void *screenPriv
|
||||
* \param internal_api_version Version of the internal interface between the
|
||||
* driver and libGL.
|
||||
* \param driverAPI Driver API functions used by other routines in dri_util.c.
|
||||
*
|
||||
* \note
|
||||
* There is no need to check the minimum API version in this function. Since
|
||||
* the \c __driCreateNewScreen function is versioned, it is impossible for a
|
||||
* loader that is too old to even load this driver.
|
||||
*/
|
||||
__DRIscreenPrivate *
|
||||
__driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
|
||||
@@ -1200,48 +887,6 @@ __driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
|
||||
__DRIscreenPrivate *psp;
|
||||
|
||||
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
if ( internal_api_version < 20040602 ) {
|
||||
fprintf( stderr, "libGL error: libGL.so version (%08u) is too old. "
|
||||
"20040602 or later is required.\n", internal_api_version );
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
if ( internal_api_version == 20031201 ) {
|
||||
fprintf( stderr, "libGL error: libGL version 20031201 has critical "
|
||||
"binary compatilibity bugs.\nlibGL error: You must upgrade "
|
||||
"to use direct-rendering!\n" );
|
||||
return NULL;
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
|
||||
window_exists = (PFNGLXWINDOWEXISTSPROC)
|
||||
glXGetProcAddress( (const GLubyte *) "__glXWindowExists" );
|
||||
|
||||
if ( window_exists == NULL ) {
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
fprintf( stderr, "libGL error: libGL.so version (%08u) is too old. "
|
||||
"20021128 or later is required.\n", internal_api_version );
|
||||
return NULL;
|
||||
#else
|
||||
window_exists = (PFNGLXWINDOWEXISTSPROC) __driWindowExists;
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
}
|
||||
|
||||
create_context_with_config = (PFNGLXCREATECONTEXTWITHCONFIGPROC)
|
||||
glXGetProcAddress( (const GLubyte *) "__glXCreateContextWithConfig" );
|
||||
if ( create_context_with_config == NULL ) {
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
fprintf( stderr, "libGL error: libGL.so version (%08u) is too old. "
|
||||
"20031201 or later is required.\n", internal_api_version );
|
||||
return NULL;
|
||||
#else
|
||||
create_context_with_config = (PFNGLXCREATECONTEXTWITHCONFIGPROC)
|
||||
fake_XF86DRICreateContextWithConfig;
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
}
|
||||
|
||||
api_ver = internal_api_version;
|
||||
|
||||
psp = (__DRIscreenPrivate *)_mesa_malloc(sizeof(__DRIscreenPrivate));
|
||||
@@ -1302,25 +947,10 @@ __driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
|
||||
psp->dummyContextPriv.driScreenPriv = NULL;
|
||||
|
||||
psc->destroyScreen = driDestroyScreen;
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
psc->createContext = driCreateContext;
|
||||
#else
|
||||
psc->createContext = NULL;
|
||||
#endif
|
||||
psc->createNewDrawable = driCreateNewDrawable;
|
||||
psc->getDrawable = driGetDrawable;
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
psc->getMSC = driGetMSC;
|
||||
psc->createNewContext = driCreateNewContext;
|
||||
#else
|
||||
if ( driCompareGLXAPIVersion( 20030317 ) >= 0 ) {
|
||||
psc->getMSC = driGetMSC;
|
||||
|
||||
if ( driCompareGLXAPIVersion( 20030824 ) >= 0 ) {
|
||||
psc->createNewContext = driCreateNewContext;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( (psp->DriverAPI.InitDriver != NULL)
|
||||
&& !(*psp->DriverAPI.InitDriver)(psp) ) {
|
||||
@@ -1333,233 +963,6 @@ __driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
|
||||
}
|
||||
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
/**
|
||||
* Utility function used to create a new driver-private screen structure.
|
||||
*
|
||||
* \param dpy Display pointer.
|
||||
* \param scrn Index of the screen.
|
||||
* \param psc DRI screen data (not driver private)
|
||||
* \param numConfigs Number of visual configs pointed to by \c configs.
|
||||
* \param configs Array of GLXvisualConfigs exported by the 2D driver.
|
||||
* \param driverAPI Driver API functions used by other routines in dri_util.c.
|
||||
*
|
||||
* \deprecated
|
||||
* This function has been replaced by \c __driUtilCreateNewScreen. In drivers
|
||||
* built to work with XFree86, this function will continue to exist to support
|
||||
* older versions of libGL. Starting with the next major relelase of XFree86,
|
||||
* this function will be removed.
|
||||
*/
|
||||
__DRIscreenPrivate *
|
||||
__driUtilCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
int numConfigs, __GLXvisualConfig *configs,
|
||||
const struct __DriverAPIRec *driverAPI)
|
||||
{
|
||||
int directCapable;
|
||||
__DRIscreenPrivate *psp = NULL;
|
||||
drm_handle_t hSAREA;
|
||||
drmAddress pSAREA;
|
||||
char *BusID;
|
||||
__GLcontextModes *modes;
|
||||
__GLcontextModes *temp;
|
||||
int i;
|
||||
__DRIversion ddx_version;
|
||||
__DRIversion dri_version;
|
||||
__DRIversion drm_version;
|
||||
__DRIframebuffer framebuffer;
|
||||
int fd = -1;
|
||||
int status;
|
||||
const char * err_msg;
|
||||
const char * err_extra;
|
||||
|
||||
|
||||
if (!XF86DRIQueryDirectRenderingCapable(dpy, scrn, &directCapable)
|
||||
|| !directCapable) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Create the linked list of context modes, and populate it with the
|
||||
* GLX visual information passed in by libGL.
|
||||
*/
|
||||
|
||||
modes = _gl_context_modes_create( numConfigs, sizeof(__GLcontextModes) );
|
||||
if ( modes == NULL ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
temp = modes;
|
||||
for ( i = 0 ; i < numConfigs ; i++ ) {
|
||||
assert( temp != NULL );
|
||||
_gl_copy_visual_to_context_mode( temp, & configs[i] );
|
||||
temp->screen = scrn;
|
||||
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
err_msg = "XF86DRIOpenConnection";
|
||||
err_extra = NULL;
|
||||
|
||||
if (XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) {
|
||||
fd = drmOpen(NULL,BusID);
|
||||
_mesa_free(BusID); /* No longer needed */
|
||||
|
||||
err_msg = "open DRM";
|
||||
err_extra = strerror( -fd );
|
||||
|
||||
if (fd >= 0) {
|
||||
drm_magic_t magic;
|
||||
|
||||
err_msg = "drmGetMagic";
|
||||
err_extra = NULL;
|
||||
|
||||
if (!drmGetMagic(fd, &magic)) {
|
||||
drmVersionPtr version = drmGetVersion(fd);
|
||||
if (version) {
|
||||
drm_version.major = version->version_major;
|
||||
drm_version.minor = version->version_minor;
|
||||
drm_version.patch = version->version_patchlevel;
|
||||
drmFreeVersion(version);
|
||||
}
|
||||
else {
|
||||
drm_version.major = -1;
|
||||
drm_version.minor = -1;
|
||||
drm_version.patch = -1;
|
||||
}
|
||||
|
||||
err_msg = "XF86DRIAuthConnection";
|
||||
if (XF86DRIAuthConnection(dpy, scrn, magic)) {
|
||||
char *driverName;
|
||||
|
||||
/*
|
||||
* Get device name (like "tdfx") and the ddx version numbers.
|
||||
* We'll check the version in each DRI driver's "createScreen"
|
||||
* function.
|
||||
*/
|
||||
err_msg = "XF86DRIGetClientDriverName";
|
||||
if (XF86DRIGetClientDriverName(dpy, scrn,
|
||||
&ddx_version.major,
|
||||
&ddx_version.minor,
|
||||
&ddx_version.patch,
|
||||
&driverName)) {
|
||||
|
||||
/* No longer needed. */
|
||||
_mesa_free( driverName );
|
||||
|
||||
/*
|
||||
* Get the DRI X extension version.
|
||||
*/
|
||||
err_msg = "XF86DRIQueryVersion";
|
||||
if (XF86DRIQueryVersion(dpy,
|
||||
&dri_version.major,
|
||||
&dri_version.minor,
|
||||
&dri_version.patch)) {
|
||||
drm_handle_t hFB;
|
||||
int junk;
|
||||
|
||||
/*
|
||||
* Get device-specific info. pDevPriv will point to a struct
|
||||
* (such as DRIRADEONRec in xfree86/driver/ati/radeon_dri.h)
|
||||
* that has information about the screen size, depth, pitch,
|
||||
* ancilliary buffers, DRM mmap handles, etc.
|
||||
*/
|
||||
err_msg = "XF86DRIGetDeviceInfo";
|
||||
if (XF86DRIGetDeviceInfo(dpy, scrn,
|
||||
&hFB,
|
||||
&junk,
|
||||
&framebuffer.size,
|
||||
&framebuffer.stride,
|
||||
&framebuffer.dev_priv_size,
|
||||
&framebuffer.dev_priv)) {
|
||||
framebuffer.width = DisplayWidth(dpy, scrn);
|
||||
framebuffer.height = DisplayHeight(dpy, scrn);
|
||||
|
||||
/*
|
||||
* Map the framebuffer region.
|
||||
*/
|
||||
status = drmMap(fd, hFB, framebuffer.size,
|
||||
(drmAddressPtr)&framebuffer.base);
|
||||
|
||||
err_msg = "drmMap of framebuffer";
|
||||
err_extra = strerror( -status );
|
||||
|
||||
if ( status == 0 ) {
|
||||
/*
|
||||
* Map the SAREA region. Further mmap regions may be setup in
|
||||
* each DRI driver's "createScreen" function.
|
||||
*/
|
||||
status = drmMap(fd, hSAREA, SAREA_MAX,
|
||||
&pSAREA);
|
||||
|
||||
err_msg = "drmMap of sarea";
|
||||
err_extra = strerror( -status );
|
||||
|
||||
if ( status == 0 ) {
|
||||
PFNGLXGETINTERNALVERSIONPROC get_ver;
|
||||
|
||||
get_ver = (PFNGLXGETINTERNALVERSIONPROC)
|
||||
glXGetProcAddress( (const GLubyte *) "__glXGetInternalVersion" );
|
||||
|
||||
err_msg = "InitDriver";
|
||||
err_extra = NULL;
|
||||
psp = __driUtilCreateNewScreen( dpy, scrn, psc, modes,
|
||||
& ddx_version,
|
||||
& dri_version,
|
||||
& drm_version,
|
||||
& framebuffer,
|
||||
pSAREA,
|
||||
fd,
|
||||
(get_ver != NULL) ? (*get_ver)() : 1,
|
||||
driverAPI );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( psp == NULL ) {
|
||||
if ( pSAREA != MAP_FAILED ) {
|
||||
(void)drmUnmap(pSAREA, SAREA_MAX);
|
||||
}
|
||||
|
||||
if ( framebuffer.base != MAP_FAILED ) {
|
||||
(void)drmUnmap((drmAddress)framebuffer.base, framebuffer.size);
|
||||
}
|
||||
|
||||
if ( framebuffer.dev_priv != NULL ) {
|
||||
_mesa_free(framebuffer.dev_priv);
|
||||
}
|
||||
|
||||
if ( fd >= 0 ) {
|
||||
(void)drmClose(fd);
|
||||
}
|
||||
|
||||
if ( modes != NULL ) {
|
||||
_gl_context_modes_destroy( modes );
|
||||
}
|
||||
|
||||
(void)XF86DRICloseConnection(dpy, scrn);
|
||||
|
||||
if ( err_extra != NULL ) {
|
||||
fprintf(stderr, "libGL error: %s failed (%s)\n", err_msg,
|
||||
err_extra);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "libGL error: %s failed\n", err_msg );
|
||||
}
|
||||
|
||||
fprintf(stderr, "libGL error: reverting to (slow) indirect rendering\n");
|
||||
}
|
||||
|
||||
return psp;
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
|
||||
/**
|
||||
* Compare the current GLX API version with a driver supplied required version.
|
||||
*
|
||||
@@ -1592,15 +995,11 @@ driQueryFrameTracking( __DRInativeDisplay * dpy, void * priv,
|
||||
int64_t * sbc, int64_t * missedFrames,
|
||||
float * lastMissedUsage, float * usage )
|
||||
{
|
||||
static PFNGLXGETUSTPROC get_ust;
|
||||
__DRIswapInfo sInfo;
|
||||
int status;
|
||||
int64_t ust;
|
||||
__DRIdrawablePrivate * dpriv = (__DRIdrawablePrivate *) priv;
|
||||
|
||||
if ( get_ust == NULL ) {
|
||||
get_ust = (PFNGLXGETUSTPROC) glXGetProcAddress( (const GLubyte *) "__glXGetUST" );
|
||||
}
|
||||
|
||||
status = dpriv->driScreenPriv->DriverAPI.GetSwapInfo( dpriv, & sInfo );
|
||||
if ( status == 0 ) {
|
||||
@@ -1608,7 +1007,7 @@ driQueryFrameTracking( __DRInativeDisplay * dpy, void * priv,
|
||||
*missedFrames = sInfo.swap_missed_count;
|
||||
*lastMissedUsage = sInfo.swap_missed_usage;
|
||||
|
||||
(*get_ust)( & ust );
|
||||
(*dri_interface->getUST)( & ust );
|
||||
*usage = driCalculateSwapUsage( dpriv, sInfo.swap_ust, ust );
|
||||
}
|
||||
|
||||
@@ -1648,20 +1047,13 @@ float
|
||||
driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust,
|
||||
int64_t current_ust )
|
||||
{
|
||||
static PFNGLXGETMSCRATEOMLPROC get_msc_rate = NULL;
|
||||
int32_t n;
|
||||
int32_t d;
|
||||
int interval;
|
||||
float usage = 1.0;
|
||||
|
||||
|
||||
if ( get_msc_rate == NULL ) {
|
||||
get_msc_rate = (PFNGLXGETMSCRATEOMLPROC)
|
||||
glXGetProcAddress( (const GLubyte *) "glXGetMscRateOML" );
|
||||
}
|
||||
|
||||
if ( (get_msc_rate != NULL)
|
||||
&& get_msc_rate( dPriv->display, dPriv->draw, &n, &d ) ) {
|
||||
if ( (*dri_interface->getMSCRate)( dPriv->display, dPriv->draw, &n, &d ) ) {
|
||||
interval = (dPriv->pdraw->swap_interval != 0)
|
||||
? dPriv->pdraw->swap_interval : 1;
|
||||
|
||||
|
@@ -51,11 +51,7 @@
|
||||
|
||||
#define CAPI /* XXX this should be globally defined somewhere */
|
||||
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
# include <GL/gl.h>
|
||||
#else
|
||||
# include "glxclient.h"
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
#include <GL/gl.h>
|
||||
#include "drm.h"
|
||||
#include "drm_sarea.h"
|
||||
#include "GL/internal/glcore.h"
|
||||
@@ -63,13 +59,6 @@
|
||||
|
||||
#define GLX_BAD_CONTEXT 5
|
||||
|
||||
/* This is a temporary relic. Once all drivers are converted to support
|
||||
* the new interface, it can go away.
|
||||
*/
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
#define USE_NEW_INTERFACE
|
||||
#endif
|
||||
|
||||
typedef struct __DRIdisplayPrivateRec __DRIdisplayPrivate;
|
||||
typedef struct __DRIscreenPrivateRec __DRIscreenPrivate;
|
||||
typedef struct __DRIcontextPrivateRec __DRIcontextPrivate;
|
||||
@@ -325,7 +314,7 @@ struct __DRIdrawablePrivateRec {
|
||||
* \name Display and screen information.
|
||||
*
|
||||
* Basically just need these for when the locking code needs to call
|
||||
* __driUtilUpdateDrawableInfo() which calls XF86DRIGetDrawableInfo().
|
||||
* \c __driUtilUpdateDrawableInfo.
|
||||
*/
|
||||
/*@{*/
|
||||
__DRInativeDisplay *display;
|
||||
@@ -336,12 +325,6 @@ struct __DRIdrawablePrivateRec {
|
||||
* Called via glXSwapBuffers().
|
||||
*/
|
||||
void (*swapBuffers)( __DRIdrawablePrivate *dPriv );
|
||||
|
||||
/**
|
||||
* Get information about the location, size, and clip rects of the
|
||||
* drawable within the display.
|
||||
*/
|
||||
PFNGLXGETDRAWABLEINFOPROC getInfo;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -552,13 +535,6 @@ extern __DRIscreenPrivate * __driUtilCreateNewScreen( __DRInativeDisplay *dpy,
|
||||
drm_sarea_t *pSAREA, int fd, int internal_api_version,
|
||||
const struct __DriverAPIRec *driverAPI );
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
extern __DRIscreenPrivate *
|
||||
__driUtilCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
int numConfigs, __GLXvisualConfig *config,
|
||||
const struct __DriverAPIRec *driverAPI);
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
/* Test the version of the internal GLX API. Returns a value like strcmp. */
|
||||
extern int
|
||||
driCompareGLXAPIVersion( GLint required_version );
|
||||
@@ -567,10 +543,12 @@ extern float
|
||||
driCalculateSwapUsage( __DRIdrawablePrivate *dPriv,
|
||||
int64_t last_swap_ust, int64_t current_ust );
|
||||
|
||||
/* Test for the GLX header glx.h */
|
||||
#ifndef GLX
|
||||
extern void
|
||||
(*glXGetProcAddress(const GLubyte *procname))( void );
|
||||
#endif
|
||||
/**
|
||||
* Pointer to the \c __DRIinterfaceMethods passed to the driver by the loader.
|
||||
*
|
||||
* This pointer is set in the driver's \c __driCreateNewScreen function and
|
||||
* is defined in dri_util.c.
|
||||
*/
|
||||
extern const __DRIinterfaceMethods * dri_interface;
|
||||
|
||||
#endif /* _DRI_UTIL_H_ */
|
||||
|
5887
src/mesa/drivers/dri/common/extension_helper.h
Normal file
5887
src/mesa/drivers/dri/common/extension_helper.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
#ifdef DRI_NEW_INTERFACE_ONLY
|
||||
#ifdef IN_DRI_DRIVER
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <GL/gl.h>
|
||||
@@ -55,11 +55,11 @@ extern void __glXFree( void * ptr );
|
||||
# define _mesa_malloc(b) Xmalloc(b)
|
||||
# define _mesa_free(m) Xfree(m)
|
||||
# endif /* XFree86Server */
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
#endif /* !defined(IN_DRI_DRIVER) */
|
||||
|
||||
#include "glcontextmodes.h"
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
#if !defined(IN_DRI_DRIVER)
|
||||
#define NUM_VISUAL_TYPES 6
|
||||
|
||||
/**
|
||||
@@ -320,7 +320,7 @@ _gl_get_context_mode_data(const __GLcontextModes *mode, int attribute,
|
||||
return GLX_BAD_ATTRIBUTE;
|
||||
}
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
#endif /* !defined(IN_DRI_DRIVER) */
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -32,14 +32,14 @@
|
||||
|
||||
#include "GL/internal/glcore.h"
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
#if !defined(IN_DRI_DRIVER)
|
||||
extern GLint _gl_convert_from_x_visual_type( int visualType );
|
||||
extern GLint _gl_convert_to_x_visual_type( int visualType );
|
||||
extern void _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
|
||||
const __GLXvisualConfig * config );
|
||||
extern int _gl_get_context_mode_data( const __GLcontextModes *mode,
|
||||
int attribute, int *value_return );
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
#endif /* !defined(IN_DRI_DRIVER) */
|
||||
|
||||
extern __GLcontextModes * _gl_context_modes_create( unsigned count,
|
||||
size_t minimum_size );
|
||||
|
@@ -27,26 +27,12 @@
|
||||
* Gareth Hughes <gareth@nvidia.com>
|
||||
*/
|
||||
|
||||
#include "spantmp_common.h"
|
||||
|
||||
#ifndef DBG
|
||||
#define DBG 0
|
||||
#endif
|
||||
|
||||
#ifndef HW_WRITE_LOCK
|
||||
#define HW_WRITE_LOCK() HW_LOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_WRITE_UNLOCK
|
||||
#define HW_WRITE_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_LOCK
|
||||
#define HW_READ_LOCK() HW_LOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_UNLOCK
|
||||
#define HW_READ_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_CLIPLOOP
|
||||
#define HW_READ_CLIPLOOP() HW_CLIPLOOP()
|
||||
#endif
|
||||
|
@@ -34,27 +34,12 @@
|
||||
*/
|
||||
|
||||
#include "colormac.h"
|
||||
#include "spantmp_common.h"
|
||||
|
||||
#ifndef DBG
|
||||
#define DBG 0
|
||||
#endif
|
||||
|
||||
#ifndef HW_WRITE_LOCK
|
||||
#define HW_WRITE_LOCK() HW_LOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_WRITE_UNLOCK
|
||||
#define HW_WRITE_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_LOCK
|
||||
#define HW_READ_LOCK() HW_LOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_UNLOCK
|
||||
#define HW_READ_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_CLIPLOOP
|
||||
#define HW_READ_CLIPLOOP() HW_CLIPLOOP()
|
||||
#endif
|
||||
@@ -65,6 +50,14 @@
|
||||
|
||||
#if (SPANTMP_PIXEL_FMT == GL_RGB) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5)
|
||||
|
||||
#ifndef GET_SRC_PTR
|
||||
#define GET_SRC_PTR(_x, _y) (read_buf + (_x) * 2 + (_y) * pitch)
|
||||
#endif
|
||||
|
||||
#ifndef GET_DST_PTR
|
||||
#define GET_DST_PTR(_x, _y) ( buf + (_x) * 2 + (_y) * pitch)
|
||||
#endif
|
||||
|
||||
#define INIT_MONO_PIXEL(p, color) \
|
||||
p = PACK_COLOR_565( color[0], color[1], color[2] )
|
||||
|
||||
@@ -92,9 +85,17 @@
|
||||
|
||||
#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV)
|
||||
|
||||
#ifndef GET_SRC_PTR
|
||||
#define GET_SRC_PTR(_x, _y) (read_buf + (_x) * 4 + (_y) * pitch)
|
||||
#endif
|
||||
|
||||
#ifndef GET_DST_PTR
|
||||
#define GET_DST_PTR(_x, _y) ( buf + (_x) * 4 + (_y) * pitch)
|
||||
#endif
|
||||
|
||||
# define INIT_MONO_PIXEL(p, color) \
|
||||
p = PACK_COLOR_8888(color[3], color[0], color[1], color[2])
|
||||
|
||||
|
||||
# define WRITE_RGBA(_x, _y, r, g, b, a) \
|
||||
do { \
|
||||
GLuint * _p = (GLuint *) GET_DST_PTR(_x, _y); \
|
||||
|
81
src/mesa/drivers/dri/common/spantmp_common.h
Normal file
81
src/mesa/drivers/dri/common/spantmp_common.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2000-2001 VA Linux Systems, Inc.
|
||||
* (C) Copyright IBM Corporation 2004
|
||||
* 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
|
||||
* VA LINUX SYSTEM, IBM AND/OR THEIR 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file spantmp_common.h
|
||||
*
|
||||
* common macros for span read / write functions to be used in the depth,
|
||||
* stencil and pixel span templates.
|
||||
*/
|
||||
|
||||
#ifndef HW_WRITE_LOCK
|
||||
#define HW_WRITE_LOCK() HW_LOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_WRITE_UNLOCK
|
||||
#define HW_WRITE_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_LOCK
|
||||
#define HW_READ_LOCK() HW_LOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_UNLOCK
|
||||
#define HW_READ_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_CLIPLOOP
|
||||
#define HW_CLIPLOOP() \
|
||||
do { \
|
||||
int _nc = dPriv->numClipRects; \
|
||||
while ( _nc-- ) { \
|
||||
int minx = dPriv->pClipRects[_nc].x1 - dPriv->x; \
|
||||
int miny = dPriv->pClipRects[_nc].y1 - dPriv->y; \
|
||||
int maxx = dPriv->pClipRects[_nc].x2 - dPriv->x; \
|
||||
int maxy = dPriv->pClipRects[_nc].y2 - dPriv->y;
|
||||
#endif
|
||||
|
||||
#ifndef HW_ENDCLIPLOOP
|
||||
#define HW_ENDCLIPLOOP() \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifndef CLIPPIXEL
|
||||
#define CLIPPIXEL( _x, _y ) \
|
||||
((_x >= minx) && (_x < maxx) && (_y >= miny) && (_y < maxy))
|
||||
#endif
|
||||
|
||||
#ifndef CLIPSPAN
|
||||
#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \
|
||||
if ( _y < miny || _y >= maxy /*|| _x + n < minx || _x >=maxx*/ ) { \
|
||||
_n1 = 0, _x1 = x; \
|
||||
} else { \
|
||||
_n1 = _n; \
|
||||
_x1 = _x; \
|
||||
if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \
|
||||
if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \
|
||||
}
|
||||
#endif
|
@@ -1,23 +1,11 @@
|
||||
/* $XFree86: xc/lib/GL/mesa/src/drv/common/stenciltmp.h,v 1.3 2001/03/21 16:14:20 dawes Exp $ */
|
||||
|
||||
#include "spantmp_common.h"
|
||||
|
||||
#ifndef DBG
|
||||
#define DBG 0
|
||||
#endif
|
||||
|
||||
#ifndef HW_WRITE_LOCK
|
||||
#define HW_WRITE_LOCK() HW_LOCK()
|
||||
#endif
|
||||
#ifndef HW_WRITE_UNLOCK
|
||||
#define HW_WRITE_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
#ifndef HW_READ_LOCK
|
||||
#define HW_READ_LOCK() HW_LOCK()
|
||||
#endif
|
||||
#ifndef HW_READ_UNLOCK
|
||||
#define HW_READ_UNLOCK() HW_UNLOCK()
|
||||
#endif
|
||||
|
||||
static void TAG(WriteStencilSpan)( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n, GLint x, GLint y,
|
||||
|
@@ -34,10 +34,9 @@
|
||||
#include "mtypes.h"
|
||||
#include "extensions.h"
|
||||
#include "utils.h"
|
||||
#include "dispatch.h"
|
||||
|
||||
#if !defined( DRI_NEW_INTERFACE_ONLY )
|
||||
#include "xf86dri.h" /* For XF86DRIQueryVersion prototype. */
|
||||
#endif
|
||||
unsigned driDispatchRemapTable[ driDispatchRemapTable_size ];
|
||||
|
||||
#if defined(USE_X86_ASM)
|
||||
#include "x86/common_x86_asm.h"
|
||||
@@ -180,72 +179,141 @@ driGetRendererString( char * buffer, const char * hardware_name,
|
||||
|
||||
|
||||
|
||||
#define need_GL_ARB_multisample
|
||||
#define need_GL_ARB_transpose_matrix
|
||||
#define need_GL_ARB_window_pos
|
||||
#define need_GL_EXT_compiled_vertex_array
|
||||
#define need_GL_EXT_polygon_offset
|
||||
#define need_GL_EXT_texture_object
|
||||
#define need_GL_EXT_vertex_array
|
||||
#define need_GL_MESA_window_pos
|
||||
|
||||
#include "extension_helper.h"
|
||||
|
||||
static const struct dri_extension all_mesa_extensions[] = {
|
||||
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
|
||||
{ "GL_ARB_transpose_matrix", GL_ARB_transpose_matrix_functions },
|
||||
{ "GL_ARB_window_pos", GL_ARB_window_pos_functions },
|
||||
{ "GL_EXT_compiled_vertex_array", GL_EXT_compiled_vertex_array_functions },
|
||||
{ "GL_EXT_polygon_offset", GL_EXT_polygon_offset_functions },
|
||||
{ "GL_EXT_texture_object", GL_EXT_texture_object_functions },
|
||||
{ "GL_EXT_vertex_array", GL_EXT_vertex_array_functions },
|
||||
{ "GL_MESA_window_pos", GL_MESA_window_pos_functions },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Enable extensions supported by the driver.
|
||||
*
|
||||
* \bug
|
||||
* ARB_imaging isn't handled properly. In Mesa, enabling ARB_imaging also
|
||||
* enables all the sub-extensions that are folded into it. This means that
|
||||
* we need to add entry-points (via \c driInitSingleExtension) for those
|
||||
* new functions here.
|
||||
*/
|
||||
void driInitExtensions( GLcontext * ctx,
|
||||
const char * const extensions_to_enable[],
|
||||
GLboolean enable_imaging )
|
||||
const struct dri_extension * extensions_to_enable,
|
||||
GLboolean enable_imaging )
|
||||
{
|
||||
static int first_time = 1;
|
||||
unsigned i;
|
||||
|
||||
if ( enable_imaging ) {
|
||||
if ( first_time ) {
|
||||
first_time = 0;
|
||||
driInitExtensions( ctx, all_mesa_extensions, GL_FALSE );
|
||||
}
|
||||
|
||||
if ( (ctx != NULL) && enable_imaging ) {
|
||||
_mesa_enable_imaging_extensions( ctx );
|
||||
}
|
||||
|
||||
for ( i = 0 ; extensions_to_enable[i] != NULL ; i++ ) {
|
||||
_mesa_enable_extension( ctx, extensions_to_enable[i] );
|
||||
for ( i = 0 ; extensions_to_enable[i].name != NULL ; i++ ) {
|
||||
driInitSingleExtension( ctx, & extensions_to_enable[i] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
/**
|
||||
* Utility function used by drivers to test the verions of other components.
|
||||
* Enable and add dispatch functions for a single extension
|
||||
*
|
||||
* \deprecated
|
||||
* All drivers using the new interface should use \c driCheckDriDdxVersions2
|
||||
* instead. This function is implemented using a call that is not available
|
||||
* to drivers using the new interface. Furthermore, the information gained
|
||||
* by this call (the DRI and DDX version information) is already provided to
|
||||
* the driver via the new interface.
|
||||
* \param ctx Context where extension is to be enabled.
|
||||
* \param ext Extension that is to be enabled.
|
||||
*
|
||||
* \sa driInitExtensions, _mesa_enable_extension, _glapi_add_entrypoint
|
||||
*
|
||||
* \todo
|
||||
* Determine if it would be better to use \c strlen instead of the hardcoded
|
||||
* for-loops.
|
||||
*/
|
||||
GLboolean
|
||||
driCheckDriDdxDrmVersions(__DRIscreenPrivate *sPriv,
|
||||
const char * driver_name,
|
||||
int dri_major, int dri_minor,
|
||||
int ddx_major, int ddx_minor,
|
||||
int drm_major, int drm_minor)
|
||||
void driInitSingleExtension( GLcontext * ctx,
|
||||
const struct dri_extension * ext )
|
||||
{
|
||||
static const char format[] = "%s DRI driver expected %s version %d.%d.x "
|
||||
"but got version %d.%d.%d";
|
||||
int major, minor, patch;
|
||||
unsigned i;
|
||||
|
||||
/* Check the DRI version */
|
||||
if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) {
|
||||
if (major != dri_major || minor < dri_minor) {
|
||||
__driUtilMessage(format, driver_name, "DRI", dri_major, dri_minor,
|
||||
major, minor, patch);
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check that the DDX driver version is compatible */
|
||||
if (sPriv->ddxMajor != ddx_major || sPriv->ddxMinor < ddx_minor) {
|
||||
__driUtilMessage(format, driver_name, "DDX", ddx_major, ddx_minor,
|
||||
sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
/* Check that the DRM driver version is compatible */
|
||||
if (sPriv->drmMajor != drm_major || sPriv->drmMinor < drm_minor) {
|
||||
__driUtilMessage(format, driver_name, "DRM", drm_major, drm_minor,
|
||||
sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
|
||||
return GL_FALSE;
|
||||
}
|
||||
if ( ext->functions != NULL ) {
|
||||
for ( i = 0 ; ext->functions[i].strings != NULL ; i++ ) {
|
||||
const char * functions[16];
|
||||
const char * parameter_signature;
|
||||
const char * str = ext->functions[i].strings;
|
||||
unsigned j;
|
||||
unsigned offset;
|
||||
|
||||
return GL_TRUE;
|
||||
|
||||
/* Separate the parameter signature from the rest of the string.
|
||||
* If the parameter signature is empty (i.e., the string starts
|
||||
* with a NUL character), then the function has a void parameter
|
||||
* list.
|
||||
*/
|
||||
parameter_signature = str;
|
||||
while ( str[0] != '\0' ) {
|
||||
str++;
|
||||
}
|
||||
str++;
|
||||
|
||||
|
||||
/* Divide the string into the substrings that name each
|
||||
* entry-point for the function.
|
||||
*/
|
||||
for ( j = 0 ; j < 16 ; j++ ) {
|
||||
if ( str[0] == '\0' ) {
|
||||
functions[j] = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
functions[j] = str;
|
||||
|
||||
while ( str[0] != '\0' ) {
|
||||
str++;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
|
||||
|
||||
/* Add each entry-point to the dispatch table.
|
||||
*/
|
||||
offset = _glapi_add_dispatch( functions, parameter_signature );
|
||||
if ( ext->functions[i].remap_index != -1 ) {
|
||||
driDispatchRemapTable[ ext->functions[i].remap_index ] = offset;
|
||||
}
|
||||
|
||||
if ( (ext->functions[i].offset != -1)
|
||||
&& (ext->functions[i].offset != offset) ) {
|
||||
fprintf(stderr, "DISPATCH ERROR! %s -> %u != %u\n", functions[0],
|
||||
driDispatchRemapTable[ ext->functions[i].remap_index ],
|
||||
ext->functions[i].offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ctx != NULL ) {
|
||||
_mesa_enable_extension( ctx, ext->name );
|
||||
}
|
||||
}
|
||||
#endif /* DRI_NEW_INTERFACE_ONLY */
|
||||
|
||||
|
||||
/**
|
||||
* Utility function used by drivers to test the verions of other components.
|
||||
@@ -264,7 +332,11 @@ driCheckDriDdxDrmVersions(__DRIscreenPrivate *sPriv,
|
||||
* \returns \c GL_TRUE if all version requirements are met. Otherwise,
|
||||
* \c GL_FALSE is returned.
|
||||
*
|
||||
* \sa __driCreateNewScreen, driCheckDriDdxDrmVersions, __driUtilMessage
|
||||
* \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2, __driUtilMessage
|
||||
*
|
||||
* \todo
|
||||
* Now that the old \c driCheckDriDdxDrmVersions function is gone, this
|
||||
* function and \c driCheckDriDdxDrmVersions2 should be renamed.
|
||||
*/
|
||||
GLboolean
|
||||
driCheckDriDdxDrmVersions3(const char * driver_name,
|
||||
|
@@ -32,12 +32,58 @@
|
||||
#include "context.h"
|
||||
#include "dri_util.h"
|
||||
|
||||
struct dri_debug_control
|
||||
{
|
||||
struct dri_debug_control {
|
||||
const char * string;
|
||||
unsigned flag;
|
||||
};
|
||||
|
||||
/**
|
||||
* Description of the entry-points and parameters for an OpenGL function.
|
||||
*/
|
||||
struct dri_extension_function {
|
||||
/**
|
||||
* \brief
|
||||
* Packed string describing the parameter signature and the entry-point
|
||||
* names.
|
||||
*
|
||||
* The parameter signature and the names of the entry-points for this
|
||||
* function are packed into a single string. The substrings are
|
||||
* separated by NUL characters. The whole string is terminated by
|
||||
* two consecutive NUL characters.
|
||||
*/
|
||||
const char * strings;
|
||||
|
||||
|
||||
/**
|
||||
* Location in the remap table where the dispatch offset should be
|
||||
* stored.
|
||||
*/
|
||||
int remap_index;
|
||||
|
||||
/**
|
||||
* Offset of the function in the dispatch table.
|
||||
*/
|
||||
int offset;
|
||||
};
|
||||
|
||||
/**
|
||||
* Description of the API for an extension to OpenGL.
|
||||
*/
|
||||
struct dri_extension {
|
||||
/**
|
||||
* Name of the extension.
|
||||
*/
|
||||
const char * name;
|
||||
|
||||
|
||||
/**
|
||||
* Pointer to a list of \c dri_extension_function structures. The list
|
||||
* is terminated by a structure with a \c NULL
|
||||
* \c dri_extension_function::strings pointer.
|
||||
*/
|
||||
const struct dri_extension_function * functions;
|
||||
};
|
||||
|
||||
extern unsigned driParseDebugString( const char * debug,
|
||||
const struct dri_debug_control * control );
|
||||
|
||||
@@ -45,13 +91,10 @@ extern unsigned driGetRendererString( char * buffer,
|
||||
const char * hardware_name, const char * driver_date, GLuint agp_mode );
|
||||
|
||||
extern void driInitExtensions( GLcontext * ctx,
|
||||
const char * const card_extensions[], GLboolean enable_imaging );
|
||||
const struct dri_extension * card_extensions, GLboolean enable_imaging );
|
||||
|
||||
#ifndef DRI_NEW_INTERFACE_ONLY
|
||||
extern GLboolean driCheckDriDdxDrmVersions( __DRIscreenPrivate *sPriv,
|
||||
const char * driver_name, int dri_major, int dri_minor,
|
||||
int ddx_major, int ddx_minor, int drm_major, int drm_minor );
|
||||
#endif
|
||||
extern void driInitSingleExtension( GLcontext * ctx,
|
||||
const struct dri_extension * ext );
|
||||
|
||||
extern GLboolean driCheckDriDdxDrmVersions2(const char * driver_name,
|
||||
const __DRIversion * driActual, const __DRIversion * driExpected,
|
||||
|
@@ -181,11 +181,9 @@ int driWaitForMSC32( __DRIdrawablePrivate *priv,
|
||||
|
||||
GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache )
|
||||
{
|
||||
GLuint flags = 0;
|
||||
GLuint flags = VBLANK_FLAG_INTERVAL;
|
||||
int vblank_mode;
|
||||
|
||||
flags |= (driCompareGLXAPIVersion( 20030317 ) >= 0)
|
||||
? VBLANK_FLAG_INTERVAL : 0;
|
||||
|
||||
if ( driCheckOption( optionCache, "vblank_mode", DRI_ENUM ) )
|
||||
vblank_mode = driQueryOptioni( optionCache, "vblank_mode" );
|
||||
|
@@ -73,9 +73,6 @@ typedef struct {
|
||||
|
||||
#define FB_CONTEXT(ctx) ((fbContextPtr)(ctx->DriverCtx))
|
||||
|
||||
#ifdef USE_NEW_INTERFACE
|
||||
static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
|
||||
#endif /* USE_NEW_INTERFACE */
|
||||
|
||||
static const GLubyte *
|
||||
get_string(GLcontext *ctx, GLenum pname)
|
||||
@@ -659,7 +656,6 @@ struct DRIDriverRec __driDriver = {
|
||||
__driHaltFBDev
|
||||
};
|
||||
|
||||
#ifdef USE_NEW_INTERFACE
|
||||
static __GLcontextModes *
|
||||
fbFillInModes( unsigned pixel_bits, unsigned depth_bits,
|
||||
unsigned stencil_bits, GLboolean have_back_buffer )
|
||||
@@ -709,7 +705,7 @@ fbFillInModes( unsigned pixel_bits, unsigned depth_bits,
|
||||
fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||
}
|
||||
|
||||
modes = (*create_context_modes)( num_modes, sizeof( __GLcontextModes ) );
|
||||
modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) );
|
||||
m = modes;
|
||||
if ( ! driFillInModes( & m, fb_format, fb_type,
|
||||
depth_bits_array, stencil_bits_array, depth_buffer_factor,
|
||||
@@ -780,17 +776,11 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc
|
||||
frame_buffer, pSAREA, fd,
|
||||
internal_api_version, &fbAPI);
|
||||
if ( psp != NULL ) {
|
||||
create_context_modes = (PFNGLXCREATECONTEXTMODES)
|
||||
glXGetProcAddress( (const GLubyte *) "__glXCreateContextModes" );
|
||||
if ( create_context_modes != NULL ) {
|
||||
|
||||
*driver_modes = fbFillInModes( psp->fbBPP,
|
||||
(psp->fbBPP == 16) ? 16 : 24,
|
||||
(psp->fbBPP == 16) ? 0 : 8,
|
||||
1);
|
||||
}
|
||||
*driver_modes = fbFillInModes( psp->fbBPP,
|
||||
(psp->fbBPP == 16) ? 16 : 24,
|
||||
(psp->fbBPP == 16) ? 0 : 8,
|
||||
1);
|
||||
}
|
||||
|
||||
return (void *) psp;
|
||||
}
|
||||
#endif /* USE_NEW_INTERFACE */
|
||||
|
@@ -836,7 +836,9 @@ fbSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw)
|
||||
else {
|
||||
/* XXX this shouldn't be an error but we can't handle it for now */
|
||||
_mesa_problem(NULL, "fbSwapBuffers: drawable has no context!\n");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -37,10 +37,13 @@
|
||||
|
||||
#undef DEPTH_TRACE
|
||||
|
||||
static void
|
||||
FFBWriteDepthSpan(GLcontext *ctx, GLuint n, GLint x, GLint y,
|
||||
const GLdepth depth[], const GLubyte mask[])
|
||||
static void FFBWriteDepthSpan( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n, GLint x, GLint y,
|
||||
const void *values,
|
||||
const GLubyte mask[] )
|
||||
{
|
||||
const GLuint *depth = (const GLuint *) values;
|
||||
#ifdef DEPTH_TRACE
|
||||
fprintf(stderr, "FFBWriteDepthSpan: n(%d) x(%d) y(%d)\n",
|
||||
(int) n, x, y);
|
||||
@@ -81,10 +84,28 @@ FFBWriteDepthSpan(GLcontext *ctx, GLuint n, GLint x, GLint y,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
FFBWriteDepthPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[],
|
||||
const GLdepth depth[], const GLubyte mask[])
|
||||
static void FFBWriteMonoDepthSpan( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n, GLint x, GLint y,
|
||||
const void *value, const GLubyte mask[] )
|
||||
{
|
||||
const GLuint depthVal = *((GLuint *) value);
|
||||
GLuint depths[MAX_WIDTH];
|
||||
GLuint i;
|
||||
for (i = 0; i < n; i++)
|
||||
depths[i] = depthVal;
|
||||
FFBWriteDepthSpan(ctx, rb, n, x, y, depths, mask);
|
||||
}
|
||||
|
||||
static void FFBWriteDepthPixels( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n,
|
||||
const GLint x[],
|
||||
const GLint y[],
|
||||
const void *values,
|
||||
const GLubyte mask[] )
|
||||
{
|
||||
const GLuint *depth = (const GLuint *) values;
|
||||
#ifdef DEPTH_TRACE
|
||||
fprintf(stderr, "FFBWriteDepthPixels: n(%d)\n", (int) n);
|
||||
#endif
|
||||
@@ -126,9 +147,12 @@ FFBWriteDepthPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[],
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
FFBReadDepthSpan(GLcontext *ctx, GLuint n, GLint x, GLint y, GLdepth depth[])
|
||||
static void FFBReadDepthSpan( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n, GLint x, GLint y,
|
||||
void *values )
|
||||
{
|
||||
GLuint *depth = (GLuint *) values;
|
||||
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
|
||||
__DRIdrawablePrivate *dPriv = fmesa->driDrawable;
|
||||
GLuint *zptr;
|
||||
@@ -163,10 +187,13 @@ FFBReadDepthSpan(GLcontext *ctx, GLuint n, GLint x, GLint y, GLdepth depth[])
|
||||
UNLOCK_HARDWARE(fmesa);
|
||||
}
|
||||
|
||||
static void
|
||||
FFBReadDepthPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[],
|
||||
GLdepth depth[])
|
||||
static void FFBReadDepthPixels( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n,
|
||||
const GLint x[], const GLint y[],
|
||||
void *values )
|
||||
{
|
||||
GLuint *depth = (GLuint *) values;
|
||||
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
|
||||
__DRIdrawablePrivate *dPriv = fmesa->driDrawable;
|
||||
char *zbase;
|
||||
@@ -202,13 +229,17 @@ FFBReadDepthPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[],
|
||||
UNLOCK_HARDWARE(fmesa);
|
||||
}
|
||||
|
||||
void ffbDDInitDepthFuncs(GLcontext *ctx)
|
||||
/**
|
||||
* Plug in the Get/Put routines for the given driRenderbuffer.
|
||||
*/
|
||||
void
|
||||
ffbSetDepthFunctions(driRenderbuffer *drb, const GLvisual *vis)
|
||||
{
|
||||
struct swrast_device_driver *swdd =
|
||||
_swrast_GetDeviceDriverReference(ctx);
|
||||
|
||||
swdd->WriteDepthSpan = FFBWriteDepthSpan;
|
||||
swdd->ReadDepthSpan = FFBReadDepthSpan;
|
||||
swdd->WriteDepthPixels = FFBWriteDepthPixels;
|
||||
swdd->ReadDepthPixels = FFBReadDepthPixels;
|
||||
assert(drb->Base.InternalFormat == GL_DEPTH_COMPONENT16);
|
||||
drb->Base.GetRow = FFBReadDepthSpan;
|
||||
drb->Base.GetValues = FFBReadDepthPixels;
|
||||
drb->Base.PutRow = FFBWriteDepthSpan;
|
||||
drb->Base.PutMonoRow = FFBWriteMonoDepthSpan;
|
||||
drb->Base.PutValues = FFBWriteDepthPixels;
|
||||
drb->Base.PutMonoValues = NULL;
|
||||
}
|
||||
|
@@ -3,6 +3,6 @@
|
||||
#ifndef _FFB_DEPTH_H
|
||||
#define _FFB_DEPTH_H
|
||||
|
||||
extern void ffbDDInitDepthFuncs(GLcontext *ctx);
|
||||
void ffbSetDepthFunctions(driRenderbuffer *drb, const GLvisual *vis);
|
||||
|
||||
#endif /* !(_FFB_DEPTH_H) */
|
||||
|
@@ -116,27 +116,20 @@ do { GLuint p = *(GLuint *)(buf + ((__x)<<2) + ((__y)<<13)); \
|
||||
|
||||
#include <spantmp.h>
|
||||
|
||||
void ffbDDInitSpanFuncs(GLcontext *ctx)
|
||||
/**
|
||||
* Plug in the Get/Put routines for the given driRenderbuffer.
|
||||
*/
|
||||
void
|
||||
ffbSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
|
||||
{
|
||||
struct swrast_device_driver *swdd =
|
||||
_swrast_GetDeviceDriverReference(ctx);
|
||||
|
||||
swdd->WriteRGBASpan = ffbWriteRGBASpan_888;
|
||||
swdd->WriteRGBSpan = ffbWriteRGBSpan_888;
|
||||
swdd->WriteRGBAPixels = ffbWriteRGBAPixels_888;
|
||||
swdd->WriteMonoRGBASpan = ffbWriteMonoRGBASpan_888;
|
||||
swdd->WriteMonoRGBAPixels = ffbWriteMonoRGBAPixels_888;
|
||||
swdd->ReadRGBASpan = ffbReadRGBASpan_888;
|
||||
swdd->ReadRGBAPixels = ffbReadRGBAPixels_888;
|
||||
|
||||
/* We don't support color index mode yet, but it will be
|
||||
* very easy to do. -DaveM
|
||||
*/
|
||||
swdd->WriteCI8Span = NULL;
|
||||
swdd->WriteCI32Span = NULL;
|
||||
swdd->WriteMonoCISpan = NULL;
|
||||
swdd->WriteCI32Pixels = NULL;
|
||||
swdd->WriteMonoCIPixels = NULL;
|
||||
swdd->ReadCI32Span = NULL;
|
||||
swdd->ReadCI32Pixels = NULL;
|
||||
assert(vis->redBits == 8);
|
||||
assert(vis->greenBits == 8);
|
||||
assert(vis->blueBits == 8);
|
||||
drb->Base.GetRow = ffbReadRGBASpan_888;
|
||||
drb->Base.GetValues = ffbReadRGBAPixels_888;
|
||||
drb->Base.PutRow = ffbWriteRGBASpan_888;
|
||||
drb->Base.PutRowRGB = ffbWriteRGBSpan_888;
|
||||
drb->Base.PutMonoRow = ffbWriteMonoRGBASpan_888;
|
||||
drb->Base.PutValues = ffbWriteRGBAPixels_888;
|
||||
drb->Base.PutMonoValues = ffbWriteMonoRGBAPixels_888;
|
||||
}
|
||||
|
@@ -3,6 +3,8 @@
|
||||
#ifndef _FFB_SPAN_H
|
||||
#define _FFB_SPAN_H
|
||||
|
||||
extern void ffbDDInitSpanFuncs(GLcontext *ctx);
|
||||
#include "drirenderbuffer.h"
|
||||
|
||||
void ffbSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis);
|
||||
|
||||
#endif /* !(_FFB_SPAN_H) */
|
||||
|
@@ -592,6 +592,8 @@ static void ffbDDColorMask(GLcontext *ctx,
|
||||
new_pmask |= 0x0000ff00;
|
||||
if (b)
|
||||
new_pmask |= 0x00ff0000;
|
||||
if (a)
|
||||
new_pmask |= 0xff000000;
|
||||
|
||||
if (fmesa->pmask != new_pmask) {
|
||||
fmesa->pmask = new_pmask;
|
||||
|
@@ -36,10 +36,12 @@
|
||||
|
||||
#undef STENCIL_TRACE
|
||||
|
||||
static void
|
||||
FFBWriteStencilSpan(GLcontext *ctx, GLuint n, GLint x, GLint y,
|
||||
const GLstencil stencil[], const GLubyte mask[])
|
||||
static void FFBWriteStencilSpan( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n, GLint x, GLint y,
|
||||
const void *values, const GLubyte mask[] )
|
||||
{
|
||||
const GLubyte *stencil = (const GLubyte *) values;
|
||||
#ifdef STENCIL_TRACE
|
||||
fprintf(stderr, "FFBWriteStencilSpan: n(%d) x(%d) y(%d)\n",
|
||||
(int) n, x, y);
|
||||
@@ -79,10 +81,13 @@ FFBWriteStencilSpan(GLcontext *ctx, GLuint n, GLint x, GLint y,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
FFBWriteStencilPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[],
|
||||
const GLstencil stencil[], const GLubyte mask[])
|
||||
static void FFBWriteStencilPixels( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n,
|
||||
const GLint x[], const GLint y[],
|
||||
const void *values, const GLubyte mask[] )
|
||||
{
|
||||
const GLubyte *stencil = (const GLubyte *) values;
|
||||
#ifdef STENCIL_TRACE
|
||||
fprintf(stderr, "FFBWriteStencilPixels: n(%d)\n", (int) n);
|
||||
#endif
|
||||
@@ -124,9 +129,12 @@ FFBWriteStencilPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[]
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
FFBReadStencilSpan(GLcontext *ctx, GLuint n, GLint x, GLint y, GLstencil stencil[])
|
||||
static void FFBReadStencilSpan( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n, GLint x, GLint y,
|
||||
void *values)
|
||||
{
|
||||
GLubyte *stencil = (GLubyte *) values;
|
||||
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
|
||||
__DRIdrawablePrivate *dPriv = fmesa->driDrawable;
|
||||
GLuint *zptr;
|
||||
@@ -161,10 +169,12 @@ FFBReadStencilSpan(GLcontext *ctx, GLuint n, GLint x, GLint y, GLstencil stencil
|
||||
UNLOCK_HARDWARE(fmesa);
|
||||
}
|
||||
|
||||
static void
|
||||
FFBReadStencilPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[],
|
||||
GLstencil stencil[])
|
||||
static void FFBReadStencilPixels( GLcontext *ctx,
|
||||
struct gl_renderbuffer *rb,
|
||||
GLuint n, const GLint x[], const GLint y[],
|
||||
void *values )
|
||||
{
|
||||
GLubyte *stencil = (GLubyte *) values;
|
||||
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
|
||||
__DRIdrawablePrivate *dPriv = fmesa->driDrawable;
|
||||
char *zbase;
|
||||
@@ -200,22 +210,17 @@ FFBReadStencilPixels(GLcontext *ctx, GLuint n, const GLint x[], const GLint y[],
|
||||
UNLOCK_HARDWARE(fmesa);
|
||||
}
|
||||
|
||||
void ffbDDInitStencilFuncs(GLcontext *ctx)
|
||||
/**
|
||||
* Plug in the Get/Put routines for the given driRenderbuffer.
|
||||
*/
|
||||
void
|
||||
ffbSetStencilFunctions(driRenderbuffer *drb, const GLvisual *vis)
|
||||
{
|
||||
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
|
||||
|
||||
struct swrast_device_driver *swdd =
|
||||
_swrast_GetDeviceDriverReference(ctx);
|
||||
|
||||
if (fmesa->ffb_sarea->flags & FFB_DRI_FFB2PLUS) {
|
||||
swdd->WriteStencilSpan = FFBWriteStencilSpan;
|
||||
swdd->ReadStencilSpan = FFBReadStencilSpan;
|
||||
swdd->WriteStencilPixels = FFBWriteStencilPixels;
|
||||
swdd->ReadStencilPixels = FFBReadStencilPixels;
|
||||
} else {
|
||||
swdd->WriteStencilSpan = NULL;
|
||||
swdd->ReadStencilSpan = NULL;
|
||||
swdd->WriteStencilPixels = NULL;
|
||||
swdd->ReadStencilPixels = NULL;
|
||||
}
|
||||
assert(drb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT);
|
||||
drb->Base.GetRow = FFBReadStencilSpan;
|
||||
drb->Base.GetValues = FFBReadStencilPixels;
|
||||
drb->Base.PutRow = FFBWriteStencilSpan;
|
||||
/*drb->Base.PutMonoRow = FFBWriteMonoStencilSpan;*/
|
||||
drb->Base.PutValues = FFBWriteStencilPixels;
|
||||
drb->Base.PutMonoValues = NULL;
|
||||
}
|
||||
|
@@ -3,6 +3,6 @@
|
||||
#ifndef _FFB_STENCIL_H
|
||||
#define _FFB_STENCIL_H
|
||||
|
||||
extern void ffbDDInitStencilFuncs(GLcontext *ctx);
|
||||
void ffbSetStencilFunctions(driRenderbuffer *drb, const GLvisual *vis);
|
||||
|
||||
#endif /* !(_FFB_STENCIL_H) */
|
||||
|
@@ -146,28 +146,28 @@ static void choose_normals(void)
|
||||
}
|
||||
|
||||
if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev) {
|
||||
ctx->Exec->Normal3f = norm_tab[index].normal3f_single;
|
||||
ctx->Exec->Normal3fv = norm_tab[index].normal3fv_single;
|
||||
SET_Normal3f(ctx->Exec, norm_tab[index].normal3f_single);
|
||||
SET_Normal3fv(ctx->Exec, norm_tab[index].normal3fv_single);
|
||||
} else {
|
||||
ctx->Exec->Normal3f = norm_tab[index].normal3f_multi;
|
||||
ctx->Exec->Normal3fv = norm_tab[index].normal3fv_multi;
|
||||
SET_Normal3f(ctx->Exec, norm_tab[index].normal3f_multi);
|
||||
SET_Normal3fv(ctx->Exec, norm_tab[index].normal3fv_multi);
|
||||
}
|
||||
} else {
|
||||
ctx->Exec->Normal3f = _mesa_noop_Normal3f;
|
||||
ctx->Exec->Normal3fv = _mesa_noop_Normal3fv;
|
||||
SET_Normal3f(ctx->Exec, _mesa_noop_Normal3f);
|
||||
SET_Normal3fv(ctx->Exec, _mesa_noop_Normal3fv);
|
||||
}
|
||||
}
|
||||
|
||||
static void ffb_choose_Normal3f(GLfloat x, GLfloat y, GLfloat z)
|
||||
{
|
||||
choose_normals();
|
||||
GL_CALL(Normal3f)(x, y, z);
|
||||
CALL_Normal3f(GET_DISPATCH(), (x, y, z));
|
||||
}
|
||||
|
||||
static void ffb_choose_Normal3fv(const GLfloat *v)
|
||||
{
|
||||
choose_normals();
|
||||
GL_CALL(Normal3fv)(v);
|
||||
CALL_Normal3fv(GET_DISPATCH(), (v));
|
||||
}
|
||||
|
||||
/* Vertex functions: */
|
||||
@@ -267,13 +267,14 @@ static void ffb_do_fallback(GLcontext *ctx)
|
||||
* correctly:
|
||||
*/
|
||||
if (fmesa->imm.prim != PRIM_OUTSIDE_BEGIN_END )
|
||||
GL_CALL(Begin)(fmesa->imm.prim);
|
||||
CALL_Begin(GET_DISPATCH(), (fmesa->imm.prim));
|
||||
|
||||
if (ctx->Light.Enabled) {
|
||||
GL_CALL(Color4fv)(ctx->Current.Color); /* Catch ColorMaterial */
|
||||
GL_CALL(Normal3fv)(current->normal);
|
||||
/* Catch ColorMaterial */
|
||||
CALL_Color4fv(GET_DISPATCH(), (ctx->Current.Color));
|
||||
CALL_Normal3fv(GET_DISPATCH(), (current->normal));
|
||||
} else {
|
||||
GL_CALL(Color4fv)(current->color);
|
||||
CALL_Color4fv(GET_DISPATCH(), (current->color));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -27,9 +27,12 @@
|
||||
|
||||
#include "ffb_xmesa.h"
|
||||
#include "context.h"
|
||||
#include "framebuffer.h"
|
||||
#include "matrix.h"
|
||||
#include "renderbuffer.h"
|
||||
#include "simple_list.h"
|
||||
#include "imports.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast_setup/swrast_setup.h"
|
||||
@@ -276,9 +279,6 @@ ffbCreateContext(const __GLcontextModes *mesaVis,
|
||||
ffbDDExtensionsInit(ctx);
|
||||
ffbDDInitDriverFuncs(ctx);
|
||||
ffbDDInitStateFuncs(ctx);
|
||||
ffbDDInitSpanFuncs(ctx);
|
||||
ffbDDInitDepthFuncs(ctx);
|
||||
ffbDDInitStencilFuncs(ctx);
|
||||
ffbDDInitRenderFuncs(ctx);
|
||||
/*ffbDDInitTexFuncs(ctx); not needed */
|
||||
ffbDDInitBitmapFuncs(ctx);
|
||||
@@ -322,16 +322,63 @@ ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv,
|
||||
const __GLcontextModes *mesaVis,
|
||||
GLboolean isPixmap )
|
||||
{
|
||||
/* Mesa checks for pitch > 0, but ffb doesn't use pitches */
|
||||
int bogusPitch = 1;
|
||||
int bpp = 4; /* we've always got a 32bpp framebuffer */
|
||||
int offset = 0; /* always at 0 for offset */
|
||||
|
||||
if (isPixmap) {
|
||||
return GL_FALSE; /* not implemented */
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
GLboolean swStencil = (mesaVis->stencilBits > 0 &&
|
||||
mesaVis->depthBits != 24);
|
||||
#if 0
|
||||
driDrawPriv->driverPrivate = (void *)
|
||||
_mesa_create_framebuffer(mesaVis,
|
||||
GL_FALSE, /* software depth buffer? */
|
||||
_mesa_create_framebuffer(mesaVis,
|
||||
GL_FALSE, /* software depth buffer? */
|
||||
mesaVis->stencilBits > 0,
|
||||
mesaVis->accumRedBits > 0,
|
||||
mesaVis->alphaBits > 0);
|
||||
#else
|
||||
struct gl_framebuffer *fb = _mesa_create_framebuffer(mesaVis);
|
||||
|
||||
{
|
||||
driRenderbuffer *frontRb
|
||||
= driNewRenderbuffer(GL_RGBA, bpp, offset, bogusPitch);
|
||||
ffbSetSpanFunctions(frontRb, mesaVis);
|
||||
_mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &frontRb->Base);
|
||||
}
|
||||
|
||||
if (mesaVis->doubleBufferMode) {
|
||||
driRenderbuffer *backRb
|
||||
= driNewRenderbuffer(GL_RGBA, bpp, offset, bogusPitch);
|
||||
ffbSetSpanFunctions(backRb, mesaVis);
|
||||
_mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &backRb->Base);
|
||||
}
|
||||
|
||||
if (mesaVis->depthBits == 16) {
|
||||
driRenderbuffer *depthRb
|
||||
= driNewRenderbuffer(GL_DEPTH_COMPONENT16, bpp, offset, bogusPitch);
|
||||
ffbSetDepthFunctions(depthRb, mesaVis);
|
||||
_mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base);
|
||||
}
|
||||
|
||||
if (mesaVis->stencilBits > 0 && !swStencil) {
|
||||
driRenderbuffer *stencilRb
|
||||
= driNewRenderbuffer(GL_STENCIL_INDEX8_EXT, bpp, offset,bogusPitch);
|
||||
ffbSetStencilFunctions(stencilRb, mesaVis);
|
||||
_mesa_add_renderbuffer(fb, BUFFER_STENCIL, &stencilRb->Base);
|
||||
}
|
||||
|
||||
_mesa_add_soft_renderbuffers(fb,
|
||||
GL_FALSE, /* color */
|
||||
GL_FALSE, /* depth */
|
||||
swStencil,
|
||||
mesaVis->accumRedBits > 0,
|
||||
GL_FALSE, /* alpha */
|
||||
GL_FALSE /* aux */);
|
||||
driDrawPriv->driverPrivate = (void *) fb;
|
||||
#endif
|
||||
return (driDrawPriv->driverPrivate != NULL);
|
||||
}
|
||||
}
|
||||
@@ -488,7 +535,7 @@ ffbMakeCurrent(__DRIcontextPrivate *driContextPriv,
|
||||
|
||||
fmesa->driDrawable = driDrawPriv;
|
||||
|
||||
_mesa_make_current2(fmesa->glCtx,
|
||||
_mesa_make_current(fmesa->glCtx,
|
||||
(GLframebuffer *) driDrawPriv->driverPrivate,
|
||||
(GLframebuffer *) driReadPriv->driverPrivate);
|
||||
|
||||
@@ -520,7 +567,7 @@ ffbMakeCurrent(__DRIcontextPrivate *driContextPriv,
|
||||
1, 0, 0, 0, 0);
|
||||
}
|
||||
} else {
|
||||
_mesa_make_current(NULL, NULL);
|
||||
_mesa_make_current(NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
@@ -551,30 +598,149 @@ void ffbXMesaUpdateState(ffbContextPtr fmesa)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static struct __DriverAPIRec ffbAPI = {
|
||||
ffbInitDriver,
|
||||
ffbDestroyScreen,
|
||||
ffbCreateContext,
|
||||
ffbDestroyContext,
|
||||
ffbCreateBuffer,
|
||||
ffbDestroyBuffer,
|
||||
ffbSwapBuffers,
|
||||
ffbMakeCurrent,
|
||||
ffbUnbindContext
|
||||
static const struct __DriverAPIRec ffbAPI = {
|
||||
.InitDriver = ffbInitDriver,
|
||||
.DestroyScreen = ffbDestroyScreen,
|
||||
.CreateContext = ffbCreateContext,
|
||||
.DestroyContext = ffbDestroyContext,
|
||||
.CreateBuffer = ffbCreateBuffer,
|
||||
.DestroyBuffer = ffbDestroyBuffer,
|
||||
.SwapBuffers = ffbSwapBuffers,
|
||||
.MakeCurrent = ffbMakeCurrent,
|
||||
.UnbindContext = ffbUnbindContext,
|
||||
.GetSwapInfo = NULL,
|
||||
.GetMSC = NULL,
|
||||
.WaitForMSC = NULL,
|
||||
.WaitForSBC = NULL,
|
||||
.SwapBuffersMSC = NULL
|
||||
};
|
||||
|
||||
|
||||
static __GLcontextModes *
|
||||
ffbFillInModes( unsigned pixel_bits, unsigned depth_bits,
|
||||
unsigned stencil_bits, GLboolean have_back_buffer )
|
||||
{
|
||||
__GLcontextModes * modes;
|
||||
__GLcontextModes * m;
|
||||
unsigned num_modes;
|
||||
unsigned depth_buffer_factor;
|
||||
unsigned back_buffer_factor;
|
||||
GLenum fb_format;
|
||||
GLenum fb_type;
|
||||
|
||||
/*
|
||||
* This is the bootstrap function for the driver.
|
||||
* The __driCreateScreen name is the symbol that libGL.so fetches.
|
||||
* Return: pointer to a __DRIscreenPrivate.
|
||||
/* GLX_SWAP_COPY_OML is only supported because the FFB driver doesn't
|
||||
* support pageflipping at all.
|
||||
*/
|
||||
static const GLenum back_buffer_modes[] = {
|
||||
GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
|
||||
};
|
||||
|
||||
u_int8_t depth_bits_array[3];
|
||||
u_int8_t stencil_bits_array[3];
|
||||
|
||||
|
||||
depth_bits_array[0] = 0;
|
||||
depth_bits_array[1] = depth_bits;
|
||||
depth_bits_array[2] = depth_bits;
|
||||
|
||||
/* Just like with the accumulation buffer, always provide some modes
|
||||
* with a stencil buffer. It will be a sw fallback, but some apps won't
|
||||
* care about that.
|
||||
*/
|
||||
stencil_bits_array[0] = 0;
|
||||
stencil_bits_array[1] = 0;
|
||||
stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits;
|
||||
|
||||
depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1;
|
||||
back_buffer_factor = (have_back_buffer) ? 3 : 1;
|
||||
|
||||
num_modes = depth_buffer_factor * back_buffer_factor * 4;
|
||||
|
||||
if ( pixel_bits == 16 ) {
|
||||
fb_format = GL_RGB;
|
||||
fb_type = GL_UNSIGNED_SHORT_5_6_5;
|
||||
}
|
||||
else {
|
||||
fb_format = GL_BGRA;
|
||||
fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
||||
}
|
||||
|
||||
modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) );
|
||||
m = modes;
|
||||
if ( ! driFillInModes( & m, fb_format, fb_type,
|
||||
depth_bits_array, stencil_bits_array, depth_buffer_factor,
|
||||
back_buffer_modes, back_buffer_factor,
|
||||
GLX_TRUE_COLOR ) ) {
|
||||
fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
|
||||
__func__, __LINE__ );
|
||||
return NULL;
|
||||
}
|
||||
if ( ! driFillInModes( & m, fb_format, fb_type,
|
||||
depth_bits_array, stencil_bits_array, depth_buffer_factor,
|
||||
back_buffer_modes, back_buffer_factor,
|
||||
GLX_DIRECT_COLOR ) ) {
|
||||
fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
|
||||
__func__, __LINE__ );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Mark the visual as slow if there are "fake" stencil bits.
|
||||
*/
|
||||
for ( m = modes ; m != NULL ; m = m->next ) {
|
||||
if ( (m->stencilBits != 0) && (m->stencilBits != stencil_bits) ) {
|
||||
m->visualRating = GLX_SLOW_CONFIG;
|
||||
}
|
||||
}
|
||||
|
||||
return modes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is the bootstrap function for the driver. libGL supplies all of the
|
||||
* requisite information about the system, and the driver initializes itself.
|
||||
* This routine also fills in the linked list pointed to by \c driver_modes
|
||||
* with the \c __GLcontextModes that the driver can support for windows or
|
||||
* pbuffers.
|
||||
*
|
||||
* \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
|
||||
* failure.
|
||||
*/
|
||||
void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
int numConfigs, __GLXvisualConfig *config)
|
||||
PUBLIC
|
||||
void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
|
||||
const __GLcontextModes * modes,
|
||||
const __DRIversion * ddx_version,
|
||||
const __DRIversion * dri_version,
|
||||
const __DRIversion * drm_version,
|
||||
const __DRIframebuffer * frame_buffer,
|
||||
drmAddress pSAREA, int fd,
|
||||
int internal_api_version,
|
||||
const __DRIinterfaceMethods * interface,
|
||||
__GLcontextModes ** driver_modes )
|
||||
|
||||
{
|
||||
__DRIscreenPrivate *psp;
|
||||
psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &ffbAPI);
|
||||
static const __DRIversion ddx_expected = { 0, 0, 1 };
|
||||
static const __DRIversion dri_expected = { 4, 0, 0 };
|
||||
static const __DRIversion drm_expected = { 0, 0, 1 };
|
||||
|
||||
dri_interface = interface;
|
||||
|
||||
if ( ! driCheckDriDdxDrmVersions2( "ffb",
|
||||
dri_version, & dri_expected,
|
||||
ddx_version, & ddx_expected,
|
||||
drm_version, & drm_expected ) ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
|
||||
ddx_version, dri_version, drm_version,
|
||||
frame_buffer, pSAREA, fd,
|
||||
internal_api_version, &ffbAPI);
|
||||
if ( psp != NULL ) {
|
||||
*driver_modes = ffbFillInModes( 32, 16, 0, GL_TRUE );
|
||||
}
|
||||
|
||||
return (void *) psp;
|
||||
}
|
||||
|
@@ -26,9 +26,7 @@
|
||||
#ifndef _FFB_DAC_H
|
||||
#define _FFB_DAC_H
|
||||
|
||||
#if defined( DRI_NEW_INTERFACE_ONLY )
|
||||
#define Bool int
|
||||
#endif
|
||||
|
||||
/* FFB utilizes two different ramdac chips:
|
||||
*
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user