Compare commits
98 Commits
mesa-7.9-r
...
android-x8
Author | SHA1 | Date | |
---|---|---|---|
|
74237c1a10 | ||
|
ce5af556aa | ||
|
f457f7a31c | ||
|
11ff6a0e6f | ||
|
b4bf8be547 | ||
|
6ec4bba0ea | ||
|
893bc24da3 | ||
|
c83d23d30d | ||
|
e786472b8d | ||
|
27c1ec2334 | ||
|
607a4393e7 | ||
|
74174dd5d6 | ||
|
35f9a9c5c9 | ||
|
d5e732764b | ||
|
ef1a6243ef | ||
|
8911b7d7a1 | ||
|
1ba61c244f | ||
|
dce62509e5 | ||
|
25e6736400 | ||
|
6059e6a8f2 | ||
|
3c718c0e95 | ||
|
3806be3ddb | ||
|
94f9330609 | ||
|
08b9155eee | ||
|
87b5e03290 | ||
|
94fe206c56 | ||
|
62e7cd2aca | ||
|
16678f5dbf | ||
|
705fed33ea | ||
|
4e547d5155 | ||
|
d535d82b32 | ||
|
dea3bc04c1 | ||
|
a49adc545b | ||
|
b4d0fdf8d2 | ||
|
a5a8bdfd9b | ||
|
e2ba90a9cc | ||
|
b4b8800315 | ||
|
4e5934fed1 | ||
|
c4a8ce7ffd | ||
|
9199889374 | ||
|
80c0f18f2d | ||
|
4db23069f9 | ||
|
77e2b23ea6 | ||
|
5f32756254 | ||
|
9e9a4cf471 | ||
|
985cefb769 | ||
|
554361e2b2 | ||
|
a1842a4f11 | ||
|
73f3765270 | ||
|
33640499b9 | ||
|
0878cce17d | ||
|
cbd17236c8 | ||
|
8077986205 | ||
|
542c26fa4f | ||
|
a98c282c7d | ||
|
dc2ddb27d3 | ||
|
0fc1cd5e91 | ||
|
5f471a37aa | ||
|
9562ca3628 | ||
|
e6f4bc9d82 | ||
|
2ae5bf72c2 | ||
|
cc0d078977 | ||
|
4938cb77f8 | ||
|
a00d4ab589 | ||
|
b5abf7b08b | ||
|
70b6b622bf | ||
|
440882f547 | ||
|
e5501bd823 | ||
|
919fbc5524 | ||
|
55c73512c9 | ||
|
4cf0415cc0 | ||
|
3de1a6584f | ||
|
3c417b27a2 | ||
|
9ac1d3e36f | ||
|
610e200429 | ||
|
de8b4f3bbd | ||
|
4132e67e31 | ||
|
5c8873a311 | ||
|
b7c133b5c2 | ||
|
1c497bd4c6 | ||
|
17f2649e26 | ||
|
57ce3ab323 | ||
|
7f8045ab4e | ||
|
6fcf6a5a7f | ||
|
b04d58c0b1 | ||
|
8df670164f | ||
|
940b525a5a | ||
|
93c3911ca8 | ||
|
c9ae896376 | ||
|
bae850f9af | ||
|
ec86469c55 | ||
|
5bcfe4b5c8 | ||
|
57377d5d69 | ||
|
b565e7b88c | ||
|
c7ebd40185 | ||
|
11a4292d4e | ||
|
07cc2311a8 | ||
|
8567d003d5 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,7 +4,6 @@
|
||||
*.ilk
|
||||
*.o
|
||||
*.obj
|
||||
*.os
|
||||
*.pc
|
||||
*.pdb
|
||||
*.pyc
|
||||
@@ -25,4 +24,3 @@ cscope*
|
||||
.scon*
|
||||
config.py
|
||||
build
|
||||
.dir-locals.el
|
||||
|
1
Android.mk
Normal file
1
Android.mk
Normal file
@@ -0,0 +1 @@
|
||||
include $(call all-subdir-makefiles)
|
253
Makefile
253
Makefile
@@ -2,7 +2,7 @@
|
||||
|
||||
TOP = .
|
||||
|
||||
SUBDIRS = src
|
||||
SUBDIRS = src progs
|
||||
|
||||
|
||||
default: $(TOP)/configs/current
|
||||
@@ -48,7 +48,7 @@ install:
|
||||
done
|
||||
|
||||
|
||||
.PHONY: default doxygen clean realclean distclean install
|
||||
.PHONY: default doxygen clean realclean distclean install linux-directfb-install
|
||||
|
||||
# If there's no current configuration file
|
||||
$(TOP)/configs/current:
|
||||
@@ -80,6 +80,8 @@ catamount-osmesa-pgi \
|
||||
darwin \
|
||||
darwin-fat-32bit \
|
||||
darwin-fat-all \
|
||||
darwin-static \
|
||||
darwin-static-x86ppc \
|
||||
freebsd \
|
||||
freebsd-dri \
|
||||
freebsd-dri-amd64 \
|
||||
@@ -103,12 +105,14 @@ irix6-n32-static \
|
||||
irix6-o32 \
|
||||
irix6-o32-static \
|
||||
linux \
|
||||
linux-i965 \
|
||||
mine \
|
||||
mine-dri \
|
||||
linux-alpha \
|
||||
linux-alpha-static \
|
||||
linux-cell \
|
||||
linux-cell-debug \
|
||||
linux-debug \
|
||||
linux-directfb \
|
||||
linux-dri \
|
||||
linux-dri-debug \
|
||||
linux-dri-x86 \
|
||||
@@ -118,13 +122,12 @@ linux-dri-xcb \
|
||||
linux-egl \
|
||||
linux-indirect \
|
||||
linux-fbdev \
|
||||
linux-glide \
|
||||
linux-ia64-icc \
|
||||
linux-ia64-icc-static \
|
||||
linux-icc \
|
||||
linux-icc-static \
|
||||
linux-llvm \
|
||||
linux-llvm-debug \
|
||||
linux-opengl-es \
|
||||
linux-osmesa \
|
||||
linux-osmesa-static \
|
||||
linux-osmesa16 \
|
||||
@@ -133,6 +136,9 @@ linux-osmesa32 \
|
||||
linux-ppc \
|
||||
linux-ppc-static \
|
||||
linux-profile \
|
||||
linux-solo \
|
||||
linux-solo-x86 \
|
||||
linux-solo-ia64 \
|
||||
linux-sparc \
|
||||
linux-sparc5 \
|
||||
linux-static \
|
||||
@@ -145,6 +151,7 @@ linux-x86-64 \
|
||||
linux-x86-64-debug \
|
||||
linux-x86-64-profile \
|
||||
linux-x86-64-static \
|
||||
linux-x86-glide \
|
||||
linux-x86-profile \
|
||||
linux-x86-static \
|
||||
netbsd \
|
||||
@@ -167,30 +174,22 @@ sunos5-v9 \
|
||||
sunos5-v9-static \
|
||||
sunos5-v9-cc-g++ \
|
||||
ultrix-gcc:
|
||||
@ if test -f configs/current -o -L configs/current; then \
|
||||
if ! cmp configs/$@ configs/current > /dev/null; then \
|
||||
echo "Please run 'make realclean' before changing configs" ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
else \
|
||||
cd configs && rm -f current && ln -s $@ current ; \
|
||||
@ if test -f configs/current || test -L configs/current ; then \
|
||||
echo "Please run 'make realclean' before changing configs" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
(cd configs && rm -f current && ln -s $@ current)
|
||||
$(MAKE) default
|
||||
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
VERSION=7.9-rc2
|
||||
VERSION=7.7-devel
|
||||
DIRECTORY = Mesa-$(VERSION)
|
||||
LIB_NAME = MesaLib-$(VERSION)
|
||||
DEMO_NAME = MesaDemos-$(VERSION)
|
||||
GLUT_NAME = MesaGLUT-$(VERSION)
|
||||
|
||||
# This is part of MAIN_FILES
|
||||
MAIN_ES_FILES = \
|
||||
$(DIRECTORY)/src/mesa/main/*.xml \
|
||||
$(DIRECTORY)/src/mesa/main/*.py \
|
||||
$(DIRECTORY)/src/mesa/main/*.dtd
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
$(DIRECTORY)/configure \
|
||||
@@ -210,6 +209,8 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/docs/RELNOTES* \
|
||||
$(DIRECTORY)/docs/*.spec \
|
||||
$(DIRECTORY)/include/GL/internal/glcore.h \
|
||||
$(DIRECTORY)/include/GL/dmesa.h \
|
||||
$(DIRECTORY)/include/GL/ggimesa.h \
|
||||
$(DIRECTORY)/include/GL/gl.h \
|
||||
$(DIRECTORY)/include/GL/glext.h \
|
||||
$(DIRECTORY)/include/GL/gl_mangle.h \
|
||||
@@ -220,18 +221,12 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/include/GL/glx_mangle.h \
|
||||
$(DIRECTORY)/include/GL/glfbdev.h \
|
||||
$(DIRECTORY)/include/GL/mesa_wgl.h \
|
||||
$(DIRECTORY)/include/GL/mglmesa.h \
|
||||
$(DIRECTORY)/include/GL/osmesa.h \
|
||||
$(DIRECTORY)/include/GL/svgamesa.h \
|
||||
$(DIRECTORY)/include/GL/vms_x_fix.h \
|
||||
$(DIRECTORY)/include/GL/wglext.h \
|
||||
$(DIRECTORY)/include/GL/wmesa.h \
|
||||
$(DIRECTORY)/src/glsl/Makefile \
|
||||
$(DIRECTORY)/src/glsl/Makefile.template \
|
||||
$(DIRECTORY)/src/glsl/SConscript \
|
||||
$(DIRECTORY)/src/glsl/*.[ch] \
|
||||
$(DIRECTORY)/src/glsl/*.[cly]pp \
|
||||
$(DIRECTORY)/src/glsl/README \
|
||||
$(DIRECTORY)/src/glsl/glcpp/*.[chly] \
|
||||
$(DIRECTORY)/src/glsl/glcpp/README \
|
||||
$(DIRECTORY)/src/Makefile \
|
||||
$(DIRECTORY)/src/mesa/Makefile* \
|
||||
$(DIRECTORY)/src/mesa/sources.mak \
|
||||
@@ -239,15 +234,21 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/gl.pc.in \
|
||||
$(DIRECTORY)/src/mesa/osmesa.pc.in \
|
||||
$(DIRECTORY)/src/mesa/depend \
|
||||
$(MAIN_ES_FILES) \
|
||||
$(DIRECTORY)/src/mesa/main/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/main/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/glapi/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/math/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/math/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/program/*.[chly] \
|
||||
$(DIRECTORY)/src/mesa/program/*.cpp \
|
||||
$(DIRECTORY)/src/mesa/program/Makefile \
|
||||
$(DIRECTORY)/src/mesa/program/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/*.[chly] \
|
||||
$(DIRECTORY)/src/mesa/shader/Makefile \
|
||||
$(DIRECTORY)/src/mesa/shader/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.gc \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.syn \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/Makefile \
|
||||
$(DIRECTORY)/src/mesa/swrast/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/swrast/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
|
||||
@@ -264,18 +265,32 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
|
||||
$(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/glslcompiler/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/glslcompiler/glslcompiler.c \
|
||||
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/x86/Makefile \
|
||||
@@ -284,63 +299,56 @@ MAIN_FILES = \
|
||||
$(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)/windows/VC8/
|
||||
|
||||
MAPI_FILES = \
|
||||
ES_FILES = \
|
||||
$(DIRECTORY)/include/GLES/*.h \
|
||||
$(DIRECTORY)/include/GLES2/*.h \
|
||||
$(DIRECTORY)/include/VG/*.h \
|
||||
$(DIRECTORY)/src/mapi/es?api/Makefile \
|
||||
$(DIRECTORY)/src/mapi/es?api/*.pc.in \
|
||||
$(DIRECTORY)/src/mapi/glapi/gen/Makefile \
|
||||
$(DIRECTORY)/src/mapi/glapi/gen/*.xml \
|
||||
$(DIRECTORY)/src/mapi/glapi/gen/*.py \
|
||||
$(DIRECTORY)/src/mapi/glapi/gen/*.dtd \
|
||||
$(DIRECTORY)/src/mapi/glapi/gen-es/Makefile \
|
||||
$(DIRECTORY)/src/mapi/glapi/gen-es/*.xml \
|
||||
$(DIRECTORY)/src/mapi/glapi/gen-es/*.py \
|
||||
$(DIRECTORY)/src/mapi/glapi/Makefile \
|
||||
$(DIRECTORY)/src/mapi/glapi/SConscript \
|
||||
$(DIRECTORY)/src/mapi/glapi/sources.mak \
|
||||
$(DIRECTORY)/src/mapi/glapi/*.[chS] \
|
||||
$(DIRECTORY)/src/mapi/mapi/mapi_abi.py \
|
||||
$(DIRECTORY)/src/mapi/mapi/sources.mak \
|
||||
$(DIRECTORY)/src/mapi/mapi/*.[ch] \
|
||||
$(DIRECTORY)/src/mapi/vgapi/Makefile \
|
||||
$(DIRECTORY)/src/mapi/vgapi/vgapi.csv \
|
||||
$(DIRECTORY)/src/mapi/vgapi/vg.pc.in \
|
||||
$(DIRECTORY)/src/mapi/vgapi/*.h
|
||||
$(DIRECTORY)/src/mesa/glapi/*.xml \
|
||||
$(DIRECTORY)/src/mesa/glapi/*.py \
|
||||
$(DIRECTORY)/src/mesa/glapi/*.dtd \
|
||||
$(DIRECTORY)/src/mesa/es/glapi/Makefile \
|
||||
$(DIRECTORY)/src/mesa/es/glapi/*.xml \
|
||||
$(DIRECTORY)/src/mesa/es/glapi/*.py \
|
||||
$(DIRECTORY)/src/mesa/es/state_tracker/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/es/main/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/es/main/*.py \
|
||||
$(DIRECTORY)/src/mesa/es/main/*.txt \
|
||||
$(DIRECTORY)/src/mesa/es/main/es*_special \
|
||||
$(DIRECTORY)/src/mesa/es/Makefile \
|
||||
$(DIRECTORY)/src/mesa/es/sources.mak \
|
||||
|
||||
EGL_FILES = \
|
||||
$(DIRECTORY)/include/KHR/*.h \
|
||||
$(DIRECTORY)/include/EGL/*.h \
|
||||
$(DIRECTORY)/src/egl/Makefile \
|
||||
$(DIRECTORY)/src/egl/*/Makefile \
|
||||
$(DIRECTORY)/src/egl/*/Makefile.template \
|
||||
$(DIRECTORY)/src/egl/*/*.[ch] \
|
||||
$(DIRECTORY)/src/egl/*/*/Makefile \
|
||||
$(DIRECTORY)/src/egl/*/*/*.[ch] \
|
||||
$(DIRECTORY)/src/egl/main/*.pc.in \
|
||||
$(DIRECTORY)/src/egl/main/*.def
|
||||
|
||||
GALLIUM_FILES = \
|
||||
$(DIRECTORY)/src/mesa/state_tracker/*[ch] \
|
||||
$(DIRECTORY)/src/gallium/Makefile \
|
||||
$(DIRECTORY)/src/gallium/Makefile.template \
|
||||
$(DIRECTORY)/src/gallium/SConscript \
|
||||
$(DIRECTORY)/src/gallium/targets/Makefile.dri \
|
||||
$(DIRECTORY)/src/gallium/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/*/Makefile.template \
|
||||
$(DIRECTORY)/src/gallium/*/*/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/*/*.[ch] \
|
||||
$(DIRECTORY)/src/gallium/auxiliary/gallivm/*.cpp \
|
||||
$(DIRECTORY)/src/gallium/*/*/*.py \
|
||||
$(DIRECTORY)/src/gallium/*/*/*.csv \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*.py
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*.py \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*/*.[ch] \
|
||||
|
||||
|
||||
DRI_FILES = \
|
||||
@@ -348,15 +356,14 @@ DRI_FILES = \
|
||||
$(DIRECTORY)/include/GL/internal/glcore.h \
|
||||
$(DIRECTORY)/include/GL/internal/sarea.h \
|
||||
$(DIRECTORY)/src/glx/Makefile \
|
||||
$(DIRECTORY)/src/glx/Makefile \
|
||||
$(DIRECTORY)/src/glx/*.[ch] \
|
||||
$(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/dri.pc.in \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.cpp \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*/Makefile \
|
||||
@@ -386,6 +393,15 @@ SGI_GLU_FILES = \
|
||||
$(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
|
||||
$(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]
|
||||
|
||||
GLW_FILES = \
|
||||
$(DIRECTORY)/src/glw/*.[ch] \
|
||||
$(DIRECTORY)/src/glw/Makefile* \
|
||||
@@ -393,6 +409,50 @@ GLW_FILES = \
|
||||
$(DIRECTORY)/src/glw/glw.pc.in \
|
||||
$(DIRECTORY)/src/glw/depend
|
||||
|
||||
GLEW_FILES = \
|
||||
$(DIRECTORY)/include/GL/glew.h \
|
||||
$(DIRECTORY)/include/GL/glxew.h \
|
||||
$(DIRECTORY)/include/GL/wglew.h \
|
||||
$(DIRECTORY)/src/glew/*.c \
|
||||
$(DIRECTORY)/src/glew/Makefile \
|
||||
$(DIRECTORY)/src/glew/SConscript \
|
||||
$(DIRECTORY)/src/glew/LICENSE.txt
|
||||
|
||||
DEMO_FILES = \
|
||||
$(GLEW_FILES) \
|
||||
$(DIRECTORY)/progs/beos/*.cpp \
|
||||
$(DIRECTORY)/progs/beos/Makefile \
|
||||
$(DIRECTORY)/progs/images/*.rgb \
|
||||
$(DIRECTORY)/progs/images/*.rgba \
|
||||
$(DIRECTORY)/progs/demos/Makefile* \
|
||||
$(DIRECTORY)/progs/demos/descrip.mms \
|
||||
$(DIRECTORY)/progs/demos/*.[ch] \
|
||||
$(DIRECTORY)/progs/demos/*.cxx \
|
||||
$(DIRECTORY)/progs/demos/*.dat \
|
||||
$(DIRECTORY)/progs/demos/README \
|
||||
$(DIRECTORY)/progs/fbdev/Makefile \
|
||||
$(DIRECTORY)/progs/fbdev/glfbdevtest.c \
|
||||
$(DIRECTORY)/progs/osdemos/Makefile \
|
||||
$(DIRECTORY)/progs/osdemos/*.c \
|
||||
$(DIRECTORY)/progs/xdemos/Makefile* \
|
||||
$(DIRECTORY)/progs/xdemos/*.[chf] \
|
||||
$(DIRECTORY)/progs/redbook/Makefile* \
|
||||
$(DIRECTORY)/progs/redbook/README \
|
||||
$(DIRECTORY)/progs/redbook/*.[ch] \
|
||||
$(DIRECTORY)/progs/samples/Makefile* \
|
||||
$(DIRECTORY)/progs/samples/README \
|
||||
$(DIRECTORY)/progs/samples/*.c \
|
||||
$(DIRECTORY)/progs/glsl/Makefile* \
|
||||
$(DIRECTORY)/progs/glsl/*.c \
|
||||
$(DIRECTORY)/progs/glsl/*.frag \
|
||||
$(DIRECTORY)/progs/glsl/*.vert \
|
||||
$(DIRECTORY)/progs/glsl/*.shtest \
|
||||
$(DIRECTORY)/progs/windml/Makefile.ugl \
|
||||
$(DIRECTORY)/progs/windml/*.c \
|
||||
$(DIRECTORY)/progs/windml/*.bmp \
|
||||
$(DIRECTORY)/progs/ggi/*.c \
|
||||
$(DIRECTORY)/windows/VC7/progs/progs.sln
|
||||
|
||||
GLUT_FILES = \
|
||||
$(DIRECTORY)/include/GL/glut.h \
|
||||
$(DIRECTORY)/include/GL/glutf90.h \
|
||||
@@ -403,11 +463,24 @@ GLUT_FILES = \
|
||||
$(DIRECTORY)/src/glut/glx/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/beos/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/beos/*.cpp \
|
||||
$(DIRECTORY)/src/glut/beos/Makefile
|
||||
$(DIRECTORY)/src/glut/beos/Makefile \
|
||||
$(DIRECTORY)/src/glut/dos/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
|
||||
$(DIRECTORY)/src/glut/ggi/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/ggi/Makefile \
|
||||
$(DIRECTORY)/src/glut/fbdev/Makefile \
|
||||
$(DIRECTORY)/src/glut/fbdev/*[ch] \
|
||||
$(DIRECTORY)/src/glut/mini/*[ch] \
|
||||
$(DIRECTORY)/src/glut/mini/glut.pc.in \
|
||||
$(DIRECTORY)/src/glut/directfb/Makefile \
|
||||
$(DIRECTORY)/src/glut/directfb/NOTES \
|
||||
$(DIRECTORY)/src/glut/directfb/*[ch] \
|
||||
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
|
||||
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
|
||||
|
||||
DEPEND_FILES = \
|
||||
$(TOP)/src/mesa/depend \
|
||||
$(TOP)/src/glx/depend \
|
||||
$(TOP)/src/glx/x11/depend \
|
||||
$(TOP)/src/glw/depend \
|
||||
$(TOP)/src/glut/glx/depend \
|
||||
$(TOP)/src/glu/sgi/depend
|
||||
@@ -415,7 +488,6 @@ DEPEND_FILES = \
|
||||
|
||||
LIB_FILES = \
|
||||
$(MAIN_FILES) \
|
||||
$(MAPI_FILES) \
|
||||
$(ES_FILES) \
|
||||
$(EGL_FILES) \
|
||||
$(GALLIUM_FILES) \
|
||||
@@ -425,8 +497,8 @@ LIB_FILES = \
|
||||
|
||||
|
||||
# Everything for new a Mesa release:
|
||||
tarballs: rm_depend configure aclocal.m4 lib_gz glut_gz \
|
||||
lib_bz2 glut_bz2 lib_zip glut_zip md5
|
||||
tarballs: rm_depend configure aclocal.m4 lib_gz demo_gz glut_gz \
|
||||
lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
|
||||
|
||||
|
||||
# Helper for autoconf builds
|
||||
@@ -445,40 +517,60 @@ rm_depend:
|
||||
touch $$dep ; \
|
||||
done
|
||||
|
||||
rm_config:
|
||||
rm -f configs/current
|
||||
rm -f configs/autoconf
|
||||
|
||||
lib_gz: rm_config
|
||||
lib_gz:
|
||||
rm -f configs/current ; \
|
||||
rm -f configs/autoconf ; \
|
||||
cd .. ; \
|
||||
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
gzip $(LIB_NAME).tar ; \
|
||||
mv $(LIB_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
demo_gz:
|
||||
cd .. ; \
|
||||
tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
|
||||
gzip $(DEMO_NAME).tar ; \
|
||||
mv $(DEMO_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
glut_gz:
|
||||
cd .. ; \
|
||||
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
|
||||
gzip $(GLUT_NAME).tar ; \
|
||||
mv $(GLUT_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
lib_bz2: rm_config
|
||||
lib_bz2:
|
||||
rm -f configs/current ; \
|
||||
rm -f configs/autoconf ; \
|
||||
cd .. ; \
|
||||
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
bzip2 $(LIB_NAME).tar ; \
|
||||
mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
demo_bz2:
|
||||
cd .. ; \
|
||||
tar -cf $(DEMO_NAME).tar $(DEMO_FILES) ; \
|
||||
bzip2 $(DEMO_NAME).tar ; \
|
||||
mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
glut_bz2:
|
||||
cd .. ; \
|
||||
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
|
||||
bzip2 $(GLUT_NAME).tar ; \
|
||||
mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
lib_zip: rm_config
|
||||
lib_zip:
|
||||
rm -f configs/current ; \
|
||||
rm -f configs/autoconf ; \
|
||||
rm -f $(LIB_NAME).zip ; \
|
||||
cd .. ; \
|
||||
zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
|
||||
mv $(LIB_NAME).zip $(DIRECTORY)
|
||||
|
||||
demo_zip:
|
||||
rm -f $(DEMO_NAME).zip ; \
|
||||
cd .. ; \
|
||||
zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
|
||||
mv $(DEMO_NAME).zip $(DIRECTORY)
|
||||
|
||||
glut_zip:
|
||||
rm -f $(GLUT_NAME).zip ; \
|
||||
cd .. ; \
|
||||
@@ -489,11 +581,12 @@ md5:
|
||||
@-md5sum $(LIB_NAME).tar.gz
|
||||
@-md5sum $(LIB_NAME).tar.bz2
|
||||
@-md5sum $(LIB_NAME).zip
|
||||
@-md5sum $(DEMO_NAME).tar.gz
|
||||
@-md5sum $(DEMO_NAME).tar.bz2
|
||||
@-md5sum $(DEMO_NAME).zip
|
||||
@-md5sum $(GLUT_NAME).tar.gz
|
||||
@-md5sum $(GLUT_NAME).tar.bz2
|
||||
@-md5sum $(GLUT_NAME).zip
|
||||
|
||||
.PHONY: tarballs rm_depend rm_config md5 \
|
||||
lib_gz glut_gz \
|
||||
lib_bz2 glut_bz2 \
|
||||
lib_zip glut_zip
|
||||
.PHONY: tarballs rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 \
|
||||
glut_bz2 lib_zip demo_zip glut_zip md5
|
||||
|
133
SConstruct
133
SConstruct
@@ -23,7 +23,6 @@
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
import SCons.Util
|
||||
|
||||
import common
|
||||
|
||||
@@ -31,17 +30,13 @@ import common
|
||||
# Configuration options
|
||||
|
||||
default_statetrackers = 'mesa'
|
||||
default_targets = 'graw-null'
|
||||
|
||||
if common.default_platform in ('linux', 'freebsd', 'darwin'):
|
||||
default_drivers = 'softpipe,galahad,failover,svga,i915,i965,trace,identity,llvmpipe'
|
||||
default_drivers = 'softpipe,failover,i915simple,trace,identity,llvmpipe'
|
||||
default_winsys = 'xlib'
|
||||
elif common.default_platform in ('winddk',):
|
||||
default_drivers = 'softpipe,svga,i915,i965,trace,identity'
|
||||
default_drivers = 'softpipe,i915simple,trace,identity'
|
||||
default_winsys = 'all'
|
||||
elif common.default_platform in ('embedded',):
|
||||
default_drivers = 'softpipe,llvmpipe'
|
||||
default_winsys = 'xlib'
|
||||
else:
|
||||
default_drivers = 'all'
|
||||
default_winsys = 'all'
|
||||
@@ -49,34 +44,11 @@ else:
|
||||
opts = Variables('config.py')
|
||||
common.AddOptions(opts)
|
||||
opts.Add(ListVariable('statetrackers', 'state trackers to build', default_statetrackers,
|
||||
['mesa', 'python', 'xorg', 'egl']))
|
||||
['mesa', 'python', 'xorg']))
|
||||
opts.Add(ListVariable('drivers', 'pipe drivers to build', default_drivers,
|
||||
['softpipe', 'galahad', 'failover', 'svga', 'i915', 'i965', 'trace', 'r300', 'r600', 'identity', 'llvmpipe', 'nouveau', 'nv50', 'nvfx']))
|
||||
['softpipe', 'failover', 'i915simple', 'i965simple', 'cell', 'trace', 'r300', 'identity', 'llvmpipe']))
|
||||
opts.Add(ListVariable('winsys', 'winsys drivers to build', default_winsys,
|
||||
['xlib', 'vmware', 'i915', 'i965', 'gdi', 'radeon', 'r600', 'graw-xlib']))
|
||||
|
||||
opts.Add(ListVariable('targets', 'driver targets to build', default_targets,
|
||||
['dri-i915',
|
||||
'dri-i965',
|
||||
'dri-nouveau',
|
||||
'dri-radeong',
|
||||
'dri-swrast',
|
||||
'dri-vmwgfx',
|
||||
'egl-i915',
|
||||
'egl-i965',
|
||||
'egl-nouveau',
|
||||
'egl-radeon',
|
||||
'egl-swrast',
|
||||
'egl-vmwgfx',
|
||||
'graw-xlib',
|
||||
'graw-null',
|
||||
'libgl-gdi',
|
||||
'libgl-xlib',
|
||||
'xorg-i915',
|
||||
'xorg-i965',
|
||||
'xorg-nouveau',
|
||||
'xorg-radeon',
|
||||
'xorg-vmwgfx']))
|
||||
['xlib', 'intel', 'gdi', 'radeon']))
|
||||
|
||||
opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
|
||||
|
||||
@@ -87,29 +59,19 @@ env = Environment(
|
||||
ENV = os.environ,
|
||||
)
|
||||
|
||||
if os.environ.has_key('CC'):
|
||||
env['CC'] = os.environ['CC']
|
||||
if os.environ.has_key('CFLAGS'):
|
||||
env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
|
||||
if os.environ.has_key('CXX'):
|
||||
env['CXX'] = os.environ['CXX']
|
||||
if os.environ.has_key('CXXFLAGS'):
|
||||
env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
|
||||
if os.environ.has_key('LDFLAGS'):
|
||||
env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
|
||||
|
||||
Help(opts.GenerateHelpText(env))
|
||||
|
||||
# replicate options values in local variables
|
||||
debug = env['debug']
|
||||
dri = env['dri']
|
||||
llvm = env['llvm']
|
||||
machine = env['machine']
|
||||
platform = env['platform']
|
||||
|
||||
# derived options
|
||||
x86 = machine == 'x86'
|
||||
ppc = machine == 'ppc'
|
||||
gcc = platform in ('linux', 'freebsd', 'darwin', 'embedded')
|
||||
gcc = platform in ('linux', 'freebsd', 'darwin')
|
||||
msvc = platform in ('windows', 'winddk')
|
||||
|
||||
Export([
|
||||
@@ -117,6 +79,7 @@ Export([
|
||||
'x86',
|
||||
'ppc',
|
||||
'dri',
|
||||
'llvm',
|
||||
'platform',
|
||||
'gcc',
|
||||
'msvc',
|
||||
@@ -126,52 +89,14 @@ Export([
|
||||
#######################################################################
|
||||
# Environment setup
|
||||
|
||||
# Always build trace, rbug, identity, softpipe, and llvmpipe (where possible)
|
||||
if 'trace' not in env['drivers']:
|
||||
env['drivers'].append('trace')
|
||||
if 'rbug' not in env['drivers']:
|
||||
env['drivers'].append('rbug')
|
||||
if 'galahad' not in env['drivers']:
|
||||
env['drivers'].append('galahad')
|
||||
if 'identity' not in env['drivers']:
|
||||
env['drivers'].append('identity')
|
||||
if 'softpipe' not in env['drivers']:
|
||||
env['drivers'].append('softpipe')
|
||||
if env['llvm'] and 'llvmpipe' not in env['drivers']:
|
||||
env['drivers'].append('llvmpipe')
|
||||
if 'sw' not in env['drivers']:
|
||||
env['drivers'].append('sw')
|
||||
|
||||
# Includes
|
||||
env.Prepend(CPPPATH = [
|
||||
'#/include',
|
||||
])
|
||||
env.Append(CPPPATH = [
|
||||
'#/include',
|
||||
'#/src/gallium/include',
|
||||
'#/src/gallium/auxiliary',
|
||||
'#/src/gallium/drivers',
|
||||
'#/src/gallium/winsys',
|
||||
])
|
||||
|
||||
if env['msvc']:
|
||||
env.Append(CPPPATH = ['#include/c99'])
|
||||
|
||||
# Embedded
|
||||
if platform == 'embedded':
|
||||
env.Append(CPPDEFINES = [
|
||||
'_POSIX_SOURCE',
|
||||
('_POSIX_C_SOURCE', '199309L'),
|
||||
'_SVID_SOURCE',
|
||||
'_BSD_SOURCE',
|
||||
'_GNU_SOURCE',
|
||||
|
||||
'PTHREADS',
|
||||
])
|
||||
env.Append(LIBS = [
|
||||
'm',
|
||||
'pthread',
|
||||
'dl',
|
||||
])
|
||||
|
||||
# Posix
|
||||
if platform in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
@@ -181,19 +106,48 @@ if platform in ('posix', 'linux', 'freebsd', 'darwin'):
|
||||
'_SVID_SOURCE',
|
||||
'_BSD_SOURCE',
|
||||
'_GNU_SOURCE',
|
||||
|
||||
'PTHREADS',
|
||||
'HAVE_POSIX_MEMALIGN',
|
||||
])
|
||||
if gcc:
|
||||
env.Append(CFLAGS = ['-fvisibility=hidden'])
|
||||
if platform == 'darwin':
|
||||
env.Append(CPPDEFINES = ['_DARWIN_C_SOURCE'])
|
||||
env.Append(CPPPATH = ['/usr/X11R6/include'])
|
||||
env.Append(LIBPATH = ['/usr/X11R6/lib'])
|
||||
env.Append(LIBS = [
|
||||
'm',
|
||||
'pthread',
|
||||
'expat',
|
||||
'dl',
|
||||
])
|
||||
|
||||
|
||||
# DRI
|
||||
if dri:
|
||||
env.ParseConfig('pkg-config --cflags --libs libdrm')
|
||||
env.Append(CPPDEFINES = [
|
||||
('USE_EXTERNAL_DXTN_LIB', '1'),
|
||||
'IN_DRI_DRIVER',
|
||||
'GLX_DIRECT_RENDERING',
|
||||
'GLX_INDIRECT_RENDERING',
|
||||
])
|
||||
|
||||
# LLVM
|
||||
if llvm:
|
||||
# See also http://www.scons.org/wiki/UsingPkgConfig
|
||||
env.ParseConfig('llvm-config --cflags --ldflags --libs backend bitreader engine instrumentation interpreter ipo')
|
||||
env.Append(CPPDEFINES = ['MESA_LLVM'])
|
||||
# Force C++ linkage
|
||||
env['LINK'] = env['CXX']
|
||||
|
||||
# libGL
|
||||
if platform in ('linux', 'freebsd', 'darwin'):
|
||||
env.Append(LIBS = [
|
||||
'X11',
|
||||
'Xext',
|
||||
'Xxf86vm',
|
||||
'Xdamage',
|
||||
'Xfixes',
|
||||
])
|
||||
|
||||
# for debugging
|
||||
#print env.Dump()
|
||||
|
||||
@@ -211,6 +165,3 @@ SConscript(
|
||||
variant_dir = env['build'],
|
||||
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||
)
|
||||
|
||||
env.Default('src')
|
||||
|
||||
|
21
bin/minstall
21
bin/minstall
@@ -31,7 +31,7 @@ if [ $# -ge 2 ] ; then
|
||||
|
||||
# Last cmd line arg is the dest dir
|
||||
for FILE in $@ ; do
|
||||
DESTDIR="$FILE"
|
||||
DEST="$FILE"
|
||||
done
|
||||
|
||||
# Loop over args, moving them to DEST directory
|
||||
@@ -42,25 +42,6 @@ if [ $# -ge 2 ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DEST=$DESTDIR
|
||||
|
||||
# On CYGWIN, because DLLs are loaded by the native Win32 loader,
|
||||
# they are installed in the executable path. Stub libraries used
|
||||
# only for linking are installed in the library path
|
||||
case `uname` in
|
||||
CYGWIN*)
|
||||
case $FILE in
|
||||
*.dll)
|
||||
DEST="$DEST/../bin"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
PWDSAVE=`pwd`
|
||||
|
||||
# determine file's type
|
||||
|
311
bin/mklib
311
bin/mklib
@@ -25,109 +25,6 @@
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
# Clear CDPATH as the 'cd' command will echo stuff
|
||||
# to stdout if it is set
|
||||
unset CDPATH
|
||||
|
||||
# Given a list of files, look for .a archives and unpack them.
|
||||
# Return the original list of files minus the .a files plus the unpacked files.
|
||||
# first param: name of a temp directory (to be deleted when finished)
|
||||
# remaining params: list of .o and .a files
|
||||
expand_archives() {
|
||||
DIR=$1
|
||||
shift
|
||||
FILES=$@
|
||||
NEWFILES=""
|
||||
ORIG_DIR=`pwd`
|
||||
mkdir -p "$DIR"
|
||||
cd "$DIR"
|
||||
for FILE in $FILES ; do
|
||||
case $FILE in
|
||||
*.a)
|
||||
# extract the .o files from this .a archive
|
||||
case $FILE in
|
||||
/*) ;;
|
||||
*) FILE="$ORIG_DIR/$FILE" ;;
|
||||
esac
|
||||
MEMBERS=`ar t $FILE`
|
||||
ar x $FILE
|
||||
for MEMBER in $MEMBERS ; do
|
||||
NEWFILES="$NEWFILES $DIR/$MEMBER"
|
||||
done
|
||||
;;
|
||||
*)
|
||||
# other file type, just add to list
|
||||
NEWFILES="$NEWFILES $FILE"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
cd "$ORIG_DIR"
|
||||
echo $NEWFILES
|
||||
}
|
||||
|
||||
|
||||
# Make static library with 'ar'
|
||||
# params:
|
||||
# options to ar
|
||||
# 1 or 0 to indicate if ranlib should be run
|
||||
# libname to make
|
||||
# list of object files
|
||||
# Return name of library we made
|
||||
# Example: "make_ar_static_lib -ru 1 libfoo.a foo.o bar.o"
|
||||
make_ar_static_lib() {
|
||||
OPTS=$1
|
||||
shift;
|
||||
RANLIB=$1
|
||||
shift;
|
||||
LIBNAME=$1
|
||||
shift;
|
||||
OBJECTS=$@
|
||||
|
||||
# remove existing lib, if present
|
||||
rm -f ${LIBNAME}
|
||||
|
||||
# make static lib
|
||||
ar ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||
|
||||
# run ranlib
|
||||
if [ ${RANLIB} = 1 ] ; then
|
||||
ranlib ${LIBNAME}
|
||||
fi
|
||||
|
||||
echo ${LIBNAME}
|
||||
}
|
||||
|
||||
|
||||
# Print usage info.
|
||||
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 at build time'
|
||||
echo ' -RDIR search in DIR for library dependencies at run time'
|
||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||
echo ' Not observed on all systems at this time.'
|
||||
echo ' -ldflags OPT specify any additional linker flags in OPT'
|
||||
echo ' -cplusplus link with C++ runtime'
|
||||
echo ' -static make a static library (default is dynamic/shared)'
|
||||
echo ' -dlopen make a shared library suitable for dynamic loading'
|
||||
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 ' -altopts OPTS alternate options to override all others'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -id NAME Sets the id of the dylib (Darwin)'
|
||||
echo ' -h, --help display this information and exit'
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Option defaults
|
||||
#
|
||||
@@ -155,7 +52,31 @@ while true
|
||||
do
|
||||
case $1 in
|
||||
'-h' | '--help')
|
||||
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 at build time'
|
||||
echo ' -RDIR search in DIR for library dependencies at run time'
|
||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||
echo ' Not observed on all systems at this time.'
|
||||
echo ' -ldflags OPT specify any additional linker flags in OPT'
|
||||
echo ' -cplusplus link with C++ runtime'
|
||||
echo ' -static make a static library (default is dynamic/shared)'
|
||||
echo ' -dlopen make a shared library suitable for dynamic loading'
|
||||
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 ' -altopts OPTS alternate options to override all others'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -id NAME Sets the id of the dylib (Darwin)'
|
||||
echo ' -h, --help display this information and exit'
|
||||
exit 1
|
||||
;;
|
||||
'-o')
|
||||
@@ -276,11 +197,11 @@ fi
|
||||
# Error checking
|
||||
#
|
||||
if [ "x${LIBNAME}" = "x" ] ; then
|
||||
echo "mklib: Error: no library name specified (-h for help)"
|
||||
echo "mklib: Error: no library name specified"
|
||||
exit 1
|
||||
fi
|
||||
if [ "x${OBJECTS}" = "x" ] ; then
|
||||
echo "mklib: Error: no object files specified (-h for help)"
|
||||
echo "mklib: Error: no object files specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -348,24 +269,45 @@ case $ARCH in
|
||||
# finish up
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
elif [ $STATIC = 1 ] ; then
|
||||
# make a static .a library
|
||||
LIBNAME="lib${LIBNAME}.a" # prefix with "lib", suffix with ".a"
|
||||
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
|
||||
LINK="ar"
|
||||
OPTS="-ru"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
rm -f ${LIBNAME}
|
||||
|
||||
# expand .a into .o files
|
||||
NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
|
||||
# expand any .a objects into constituent .o files.
|
||||
NEWOBJECTS=""
|
||||
DELETIA=""
|
||||
for OBJ in $OBJECTS ; do
|
||||
case $OBJ in
|
||||
*.a)
|
||||
# extract the .o files from this .a archive
|
||||
FILES=`ar t $OBJ`
|
||||
ar x $OBJ
|
||||
NEWOBJECTS="$NEWOBJECTS $FILES"
|
||||
# keep track of temporary .o files and delete them below
|
||||
DELETIA="$DELETIA $FILES"
|
||||
;;
|
||||
*)
|
||||
# ordinary .o file
|
||||
NEWOBJECTS="$NEWOBJECTS $OBJ"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# make static lib
|
||||
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS}
|
||||
ranlib ${LIBNAME}
|
||||
|
||||
# remove temporary extracted .o files
|
||||
rm -rf ${LIBNAME}.obj
|
||||
rm -f ${DELETIA}
|
||||
|
||||
# finish up
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
# make dynamic library
|
||||
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
||||
case $ARCH in 'Linux' | 'GNU' | GNU/*)
|
||||
OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
|
||||
@@ -426,7 +368,9 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making SunOS static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ruc 0 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar -ruv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
if [ $NOPREFIX = 0 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
@@ -494,16 +438,13 @@ case $ARCH in
|
||||
OPTS="${OPTS} -Wl,-Mmapfile.scope"
|
||||
fi
|
||||
|
||||
# Check if objects are 64-bit
|
||||
# Check if objects are SPARC v9
|
||||
# file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
|
||||
set ${OBJECTS}
|
||||
if [ ${LINK} = "cc" -o ${LINK} = "CC" ] ; then
|
||||
ABI64=`file $1 | grep "ELF 64-bit"`
|
||||
if [ "${ABI64}" ] ; then
|
||||
case `uname -p` in
|
||||
sparc) OPTS="${OPTS} -xarch=v9" ;;
|
||||
i386) OPTS="${OPTS} -xarch=amd64" ;;
|
||||
esac
|
||||
SPARCV9=`file $1 | grep SPARCV9`
|
||||
if [ "${SPARCV9}" ] ; then
|
||||
OPTS="${OPTS} -xarch=v9"
|
||||
fi
|
||||
fi
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
@@ -548,19 +489,13 @@ case $ARCH in
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
elif [ $STATIC = 1 ] ; then
|
||||
# make a static .a library
|
||||
STLIB="lib${LIBNAME}.a"
|
||||
echo "mklib: Making FreeBSD static library: " ${STLIB}
|
||||
|
||||
# expand .a into .o files
|
||||
NEW_OBJECTS=`expand_archives ${STLIB}.obj $OBJECTS`
|
||||
|
||||
FINAL_LIBS=`make_ar_static_lib cq 1 ${STLIB} ${NEW_OBJECTS}`
|
||||
|
||||
# remove temporary extracted .o files
|
||||
rm -rf ${STLIB}.obj
|
||||
rm -f ${STLIB}
|
||||
ar cq ${STLIB} ${OBJECTS}
|
||||
ranlib ${STLIB}
|
||||
FINAL_LIBS=${STLIB}
|
||||
else
|
||||
# make dynamic library
|
||||
SHLIB="lib${LIBNAME}.so.${MAJOR}"
|
||||
OPTS="-shared -Wl,-soname,${SHLIB}"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
@@ -578,7 +513,10 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}_pic.a"
|
||||
echo "mklib: Making NetBSD PIC static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib cq 1 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar cq ${LIBNAME} ${OBJECTS}
|
||||
ranlib ${LIBNAME}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
|
||||
echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
|
||||
@@ -591,7 +529,9 @@ case $ARCH in
|
||||
'IRIX' | 'IRIX64')
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
FINAL_LIBS=`make_ar_static_lib rc 0 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar rc ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||
|
||||
@@ -642,7 +582,9 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making HP-UX static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar -ruv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
# HP uses a .2 for their current GL/GLU libraries
|
||||
if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then
|
||||
@@ -672,7 +614,8 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making AIX static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
|
||||
ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
EXPFILE="lib${LIBNAME}.exp"
|
||||
LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
|
||||
@@ -723,7 +666,9 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making OSF/1 static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar -ruv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
VERSION="${MAJOR}.${MINOR}"
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
@@ -746,20 +691,12 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making Darwin static library: " ${LIBNAME}
|
||||
LINK="ar"
|
||||
OPTS="-ruvs"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
# expand .a into .o files
|
||||
NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
|
||||
|
||||
# make static lib
|
||||
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
|
||||
|
||||
# remove temporary extracted .o files
|
||||
rm -rf ${LIBNAME}.obj
|
||||
|
||||
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
# On Darwin a .bundle is used for a library that you want to dlopen
|
||||
@@ -787,10 +724,22 @@ case $ARCH in
|
||||
|
||||
# examine first object to determine ABI
|
||||
set ${OBJECTS}
|
||||
ABIS=`lipo -info $1 | sed s/.*://`
|
||||
for ABI in $ABIS; do
|
||||
OPTS="${OPTS} -arch ${ABI}"
|
||||
done
|
||||
ABI_PPC=`file $1 | grep ' ppc'`
|
||||
ABI_I386=`file $1 | grep ' i386'`
|
||||
ABI_PPC64=`file $1 | grep ' ppc64'`
|
||||
ABI_X86_64=`file $1 | grep ' x86_64'`
|
||||
if [ "${ABI_PPC}" ] ; then
|
||||
OPTS="${OPTS} -arch ppc"
|
||||
fi
|
||||
if [ "${ABI_I386}" ] ; then
|
||||
OPTS="${OPTS} -arch i386"
|
||||
fi
|
||||
if [ "${ABI_PPC64}" ] ; then
|
||||
OPTS="${OPTS} -arch ppc64"
|
||||
fi
|
||||
if [ "${ABI_X86_64}" ] ; then
|
||||
OPTS="${OPTS} -arch x86_64"
|
||||
fi
|
||||
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
@@ -818,14 +767,16 @@ case $ARCH in
|
||||
'LynxOS')
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making LynxOS static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -ru 0 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar ru ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
;;
|
||||
|
||||
'BeOS')
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making BeOS static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib -cru 0 ${LIBNAME} ${OBJECTS}`
|
||||
ar -cru "${LIBNAME}" ${OBJECTS}
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
echo "mklib: Making BeOS shared library: " ${LIBNAME}
|
||||
@@ -904,7 +855,9 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making AIX GCC static library: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar ru ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||
echo "mklib: Making AIX GCC shared library: " ${LIBNAME}
|
||||
@@ -925,21 +878,13 @@ case $ARCH in
|
||||
fi
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making static library for Ultrix: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar ru ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
;;
|
||||
|
||||
CYGWIN*)
|
||||
# GCC-based environment
|
||||
|
||||
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
|
||||
# No "lib" or ".so" part
|
||||
echo "mklib: Making CYGWIN shared library: " ${LIBNAME}
|
||||
@@ -948,33 +893,36 @@ case $ARCH in
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
rm -f ${LIBNAME}
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} || exit $?
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
CYGNAME="cyg${LIBNAME}" # prefix with "cyg"
|
||||
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
||||
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME=${LIBNAME}.a
|
||||
echo "mklib: Making CYGWIN static library: " ${LIBNAME}
|
||||
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
|
||||
LINK="ar"
|
||||
OPTS="-ru"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
# expand .a into .o files
|
||||
NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
|
||||
|
||||
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
|
||||
|
||||
# remove temporary extracted .o files
|
||||
rm -rf ${LIBNAME}.obj
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
|
||||
ranlib ${LIBNAME}.a
|
||||
# finish up
|
||||
FINAL_LIBS=${LIBNAME}.a
|
||||
else
|
||||
OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
echo "mklib: Making CYGWIN shared library: " ${CYGNAME}-${MAJOR}.dll
|
||||
echo "mklib: Making" $ARCH "shared library: " ${CYGNAME}-${MAJOR}.dll
|
||||
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK="g++"
|
||||
else
|
||||
LINK="gcc"
|
||||
fi
|
||||
|
||||
# rm any old libs
|
||||
rm -f ${CYGNAME}-${MAJOR}.dll
|
||||
@@ -983,7 +931,7 @@ case $ARCH in
|
||||
rm -f ${LIBNAME}.a
|
||||
|
||||
# make lib
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} || exit $?
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
|
||||
# make usual symlinks
|
||||
ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
|
||||
# finish up
|
||||
@@ -1000,7 +948,9 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making static library for example arch: " ${LIBNAME}
|
||||
FINAL_LIBS=`make_ar_static_lib rv 0 ${LIBNAME} ${OBJECTS}`
|
||||
rm -f ${LIBNAME}
|
||||
ar rv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||
echo "mklib: Making shared library for example arch: " ${LIBNAME}
|
||||
@@ -1023,9 +973,4 @@ if [ ${INSTALLDIR} != "." ] ; then
|
||||
echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR}
|
||||
test -d ${INSTALLDIR} || mkdir -p ${INSTALLDIR}
|
||||
mv ${FINAL_LIBS} ${INSTALLDIR}/
|
||||
|
||||
if [ "x${FINAL_BINS}" != "x" ] ; then
|
||||
echo "mklib: Installing" ${FINAL_BINS} "in" ${INSTALLDIR}
|
||||
mv ${FINAL_BINS} ${INSTALLDIR}/
|
||||
fi
|
||||
fi
|
||||
|
366
bin/raw2png.py
Executable file
366
bin/raw2png.py
Executable file
@@ -0,0 +1,366 @@
|
||||
#!/usr/bin/env python
|
||||
##########################################################################
|
||||
#
|
||||
# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
# 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, 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 TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
|
||||
import os.path
|
||||
import sys
|
||||
import struct
|
||||
import Image # http://www.pythonware.com/products/pil/
|
||||
|
||||
PIPE_FORMAT_LAYOUT_RGBAZS = 0
|
||||
PIPE_FORMAT_LAYOUT_YCBCR = 1
|
||||
PIPE_FORMAT_LAYOUT_DXT = 2
|
||||
PIPE_FORMAT_LAYOUT_MIXED = 3
|
||||
|
||||
PIPE_FORMAT_COMP_R = 0
|
||||
PIPE_FORMAT_COMP_G = 1
|
||||
PIPE_FORMAT_COMP_B = 2
|
||||
PIPE_FORMAT_COMP_A = 3
|
||||
PIPE_FORMAT_COMP_0 = 4
|
||||
PIPE_FORMAT_COMP_1 = 5
|
||||
PIPE_FORMAT_COMP_Z = 6
|
||||
PIPE_FORMAT_COMP_S = 7
|
||||
|
||||
PIPE_FORMAT_TYPE_UNKNOWN = 0
|
||||
PIPE_FORMAT_TYPE_FLOAT = 1
|
||||
PIPE_FORMAT_TYPE_UNORM = 2
|
||||
PIPE_FORMAT_TYPE_SNORM = 3
|
||||
PIPE_FORMAT_TYPE_USCALED = 4
|
||||
PIPE_FORMAT_TYPE_SSCALED = 5
|
||||
PIPE_FORMAT_TYPE_SRGB = 6
|
||||
PIPE_FORMAT_TYPE_FIXED = 7
|
||||
|
||||
def _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, EXP2, TYPE ):
|
||||
return ((PIPE_FORMAT_LAYOUT_RGBAZS << 0) |\
|
||||
((SWZ) << 2) |\
|
||||
((SIZEX) << 14) |\
|
||||
((SIZEY) << 17) |\
|
||||
((SIZEZ) << 20) |\
|
||||
((SIZEW) << 23) |\
|
||||
((EXP2) << 26) |\
|
||||
((TYPE) << 29) )
|
||||
|
||||
def _PIPE_FORMAT_SWZ( SWZX, SWZY, SWZZ, SWZW ):
|
||||
return (((SWZX) << 0) | ((SWZY) << 3) | ((SWZZ) << 6) | ((SWZW) << 9))
|
||||
|
||||
def _PIPE_FORMAT_RGBAZS_1( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE ):
|
||||
return _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 0, TYPE )
|
||||
|
||||
def _PIPE_FORMAT_RGBAZS_2( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE ):
|
||||
_PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 1, TYPE )
|
||||
|
||||
def _PIPE_FORMAT_RGBAZS_8( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE ):
|
||||
return _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 3, TYPE )
|
||||
|
||||
def _PIPE_FORMAT_RGBAZS_64( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE ):
|
||||
return _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 6, TYPE )
|
||||
|
||||
def _PIPE_FORMAT_MIXED( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, SIGNX, SIGNY, SIGNZ, SIGNW, NORMALIZED, SCALE8 ):
|
||||
return ((PIPE_FORMAT_LAYOUT_MIXED << 0) |\
|
||||
((SWZ) << 2) |\
|
||||
((SIZEX) << 14) |\
|
||||
((SIZEY) << 17) |\
|
||||
((SIZEZ) << 20) |\
|
||||
((SIZEW) << 23) |\
|
||||
((SIGNX) << 26) |\
|
||||
((SIGNY) << 27) |\
|
||||
((SIGNZ) << 28) |\
|
||||
((SIGNW) << 29) |\
|
||||
((NORMALIZED) << 30) |\
|
||||
((SCALE8) << 31) )
|
||||
|
||||
|
||||
_PIPE_FORMAT_R001 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1 )
|
||||
_PIPE_FORMAT_RG01 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1 )
|
||||
_PIPE_FORMAT_RGB1 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_1 )
|
||||
_PIPE_FORMAT_RGBA = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_A )
|
||||
_PIPE_FORMAT_ARGB = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )
|
||||
_PIPE_FORMAT_ABGR = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R )
|
||||
_PIPE_FORMAT_BGRA = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_A )
|
||||
_PIPE_FORMAT_1RGB = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )
|
||||
_PIPE_FORMAT_1BGR = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R )
|
||||
_PIPE_FORMAT_BGR1 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )
|
||||
_PIPE_FORMAT_0000 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
|
||||
_PIPE_FORMAT_000R = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_R )
|
||||
_PIPE_FORMAT_RRR1 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )
|
||||
_PIPE_FORMAT_RRRR = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R )
|
||||
_PIPE_FORMAT_RRRG = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G )
|
||||
_PIPE_FORMAT_Z000 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
|
||||
_PIPE_FORMAT_0Z00 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
|
||||
_PIPE_FORMAT_SZ00 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
|
||||
_PIPE_FORMAT_ZS00 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
|
||||
_PIPE_FORMAT_S000 = _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
|
||||
|
||||
def _PIPE_FORMAT_YCBCR( REV ):
|
||||
return ((PIPE_FORMAT_LAYOUT_YCBCR << 0) |\
|
||||
((REV) << 2) )
|
||||
|
||||
def _PIPE_FORMAT_DXT( LEVEL, RSIZE, GSIZE, BSIZE, ASIZE ):
|
||||
return ((PIPE_FORMAT_LAYOUT_DXT << 0) | \
|
||||
((LEVEL) << 2) | \
|
||||
((RSIZE) << 5) | \
|
||||
((GSIZE) << 8) | \
|
||||
((BSIZE) << 11) | \
|
||||
((ASIZE) << 14) )
|
||||
|
||||
PIPE_FORMAT_NONE = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_0000, 0, 0, 0, 0, PIPE_FORMAT_TYPE_UNKNOWN )
|
||||
PIPE_FORMAT_A8R8G8B8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_ARGB, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_X8R8G8B8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_1RGB, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_B8G8R8A8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGRA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_B8G8R8X8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGR1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_A1R5G5B5_UNORM = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_ARGB, 1, 5, 5, 5, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_A4R4G4B4_UNORM = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_ARGB, 4, 4, 4, 4, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R5G6B5_UNORM = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_RGB1, 5, 6, 5, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_A2B10G10R10_UNORM = _PIPE_FORMAT_RGBAZS_2 ( _PIPE_FORMAT_ABGR, 1, 5, 5, 5, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_L8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_A8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_000R, 0, 0, 0, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_I8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRR, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_A8L8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRG, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_L16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_YCBCR = _PIPE_FORMAT_YCBCR( 0 )
|
||||
PIPE_FORMAT_YCBCR_REV = _PIPE_FORMAT_YCBCR( 1 )
|
||||
PIPE_FORMAT_Z16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 2, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_Z32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_Z32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_S8Z24_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_SZ00, 1, 3, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_Z24S8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_ZS00, 3, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_X8Z24_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_0Z00, 1, 3, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_Z24X8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 3, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_S8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_S000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R64_FLOAT = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_R64G64_FLOAT = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_R64G64B64_FLOAT = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_R64G64B64A64_FLOAT = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_R32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_R32G32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_R32G32B32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_R32G32B32A32_FLOAT = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_FLOAT )
|
||||
PIPE_FORMAT_R32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R32G32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R32G32B32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R32G32B32A32_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R32_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R32G32_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R32G32B32_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R32G32B32A32_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R32_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R32G32_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R32G32B32_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R32G32B32A32_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R32_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R32G32_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R32G32B32_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R32G32B32A32_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R16G16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R16G16B16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R16G16B16A16_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R16_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R16G16_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R16G16B16_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R16G16B16A16_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R16_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R16G16_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R16G16B16_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R16G16B16A16_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R16_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R16G16_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R16G16B16_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R16G16B16A16_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R8G8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R8G8B8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R8G8B8A8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R8G8B8X8_UNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )
|
||||
PIPE_FORMAT_R8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R8G8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R8G8B8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R8G8B8A8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R8G8B8X8_USCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_USCALED )
|
||||
PIPE_FORMAT_R8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R8G8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R8G8B8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R8G8B8A8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R8G8B8X8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_B6G5R5_SNORM = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_BGR1, 6, 5, 5, 0, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_A8B8G8R8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGRA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_X8B8G8R8_SNORM = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )
|
||||
PIPE_FORMAT_R8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R8G8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R8G8B8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R8G8B8A8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R8G8B8X8_SSCALED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SSCALED )
|
||||
PIPE_FORMAT_R32_FIXED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FIXED )
|
||||
PIPE_FORMAT_R32G32_FIXED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_FIXED )
|
||||
PIPE_FORMAT_R32G32B32_FIXED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_FIXED )
|
||||
PIPE_FORMAT_R32G32B32A32_FIXED = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_FIXED )
|
||||
PIPE_FORMAT_L8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SRGB )
|
||||
PIPE_FORMAT_A8_L8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRG, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB )
|
||||
PIPE_FORMAT_R8G8B8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SRGB )
|
||||
PIPE_FORMAT_R8G8B8A8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB )
|
||||
PIPE_FORMAT_R8G8B8X8_SRGB = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB )
|
||||
PIPE_FORMAT_X8UB8UG8SR8S_NORM = _PIPE_FORMAT_MIXED( _PIPE_FORMAT_1BGR, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 )
|
||||
PIPE_FORMAT_B6UG5SR5S_NORM = _PIPE_FORMAT_MIXED( _PIPE_FORMAT_BGR1, 6, 5, 5, 0, 0, 1, 1, 0, 1, 0 )
|
||||
PIPE_FORMAT_DXT1_RGB = _PIPE_FORMAT_DXT( 1, 8, 8, 8, 0 )
|
||||
PIPE_FORMAT_DXT1_RGBA = _PIPE_FORMAT_DXT( 1, 8, 8, 8, 8 )
|
||||
PIPE_FORMAT_DXT3_RGBA = _PIPE_FORMAT_DXT( 3, 8, 8, 8, 8 )
|
||||
PIPE_FORMAT_DXT5_RGBA = _PIPE_FORMAT_DXT( 5, 8, 8, 8, 8 )
|
||||
|
||||
|
||||
formats = {}
|
||||
for name, value in globals().items():
|
||||
if name.startswith("PIPE_FORMAT_") and isinstance(value, int):
|
||||
formats[value] = name
|
||||
|
||||
|
||||
def clip(g):
|
||||
return min(max(g, 0), 255)
|
||||
|
||||
|
||||
def yuv2rgb(y, u, v):
|
||||
C = y - 16
|
||||
D = u - 128
|
||||
E = v - 128
|
||||
|
||||
r = clip(( 298 * C + 409 * E + 128) >> 8)
|
||||
g = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8)
|
||||
b = clip(( 298 * C + 516 * D + 128) >> 8)
|
||||
|
||||
return r, g, b
|
||||
|
||||
|
||||
def translate_r5g6b5(data):
|
||||
value, = struct.unpack_from("H", data)
|
||||
r = ((value >> 11) & 0x1f)*0xff/0x1f
|
||||
g = ((value >> 5) & 0x3f)*0xff/0x3f
|
||||
b = ((value >> 0) & 0x1f)*0xff/0x1f
|
||||
a = 255
|
||||
return [[(r, g, b, a)]]
|
||||
|
||||
def translate_a8r8g8b8(data):
|
||||
b, g, r, a = struct.unpack_from("BBBB", data)
|
||||
return [[(r, g, b, a)]]
|
||||
|
||||
|
||||
def translate_x8r8g8b8(data):
|
||||
b, g, r, x = struct.unpack_from("BBBB", data)
|
||||
a = 255
|
||||
return [[(r, g, b, a)]]
|
||||
|
||||
def translate_r8g8b8a8(data):
|
||||
r, g, b, a = struct.unpack_from("BBBB", data)
|
||||
return [[(r, g, b, a)]]
|
||||
|
||||
def translate_ycbcr(data):
|
||||
y1, u, y2, v = struct.unpack_from("BBBB", data)
|
||||
r1, g1, b1 = yuv2rgb(y1, u, v)
|
||||
r2, g2, b2 = yuv2rgb(y1, u, v)
|
||||
return [[(r1, g1, b1, 255), (r2, g2, b2, 255)]]
|
||||
|
||||
def translate_ycbcr_rev(data):
|
||||
v, y2, u, y1 = struct.unpack_from("BBBB", data)
|
||||
r1, g1, b1 = yuv2rgb(y1, u, v)
|
||||
r2, g2, b2 = yuv2rgb(y1, u, v)
|
||||
return [[(r1, g1, b1, 255), (r2, g2, b2, 255)]]
|
||||
|
||||
def translate_x8z24(data):
|
||||
value, = struct.unpack_from("I", data)
|
||||
r = g = b = (value & 0xffffff)*0xff/0xffffff
|
||||
a = 255
|
||||
return [[(r, g, b, a)]]
|
||||
|
||||
def translate_s8z24(data):
|
||||
value, = struct.unpack_from("I", data)
|
||||
r = (value & 0xffffff)*0xff/0xffffff
|
||||
g = value >> 24
|
||||
b = 0
|
||||
a = 255
|
||||
return [[(r, g, b, a)]]
|
||||
|
||||
|
||||
translate = {
|
||||
PIPE_FORMAT_A8R8G8B8_UNORM: (4, 1, 1, translate_a8r8g8b8),
|
||||
PIPE_FORMAT_X8R8G8B8_UNORM: (4, 1, 1, translate_x8r8g8b8),
|
||||
PIPE_FORMAT_B8G8R8A8_UNORM: (4, 1, 1, translate_r8g8b8a8),
|
||||
PIPE_FORMAT_B8G8R8X8_UNORM: (4, 1, 1, translate_r8g8b8a8),
|
||||
PIPE_FORMAT_A8B8G8R8_SNORM: (4, 1, 1, translate_r8g8b8a8),
|
||||
PIPE_FORMAT_R5G6B5_UNORM: (2, 1, 1, translate_r5g6b5),
|
||||
PIPE_FORMAT_YCBCR: (4, 2, 1, translate_ycbcr),
|
||||
PIPE_FORMAT_YCBCR_REV: (4, 2, 1, translate_ycbcr_rev),
|
||||
PIPE_FORMAT_S8Z24_UNORM: (4, 1, 1, translate_s8z24),
|
||||
PIPE_FORMAT_X8Z24_UNORM: (4, 1, 1, translate_x8z24),
|
||||
}
|
||||
|
||||
def read_header(infile):
|
||||
header_fmt = "IIII"
|
||||
header = infile.read(struct.calcsize(header_fmt))
|
||||
return struct.unpack_from(header_fmt, header)
|
||||
|
||||
def process(infilename, outfilename):
|
||||
sys.stderr.write("%s -> %s\n" % (infilename, outfilename))
|
||||
infile = open(infilename, "rb")
|
||||
format, cpp, width, height = read_header(infile)
|
||||
sys.stderr.write(" %ux%ux%ubpp %s\n" % (width, height, cpp*8, formats[format]))
|
||||
outimage = Image.new(
|
||||
mode='RGB',
|
||||
size=(width, height),
|
||||
color=(0,0,0))
|
||||
outpixels = outimage.load()
|
||||
try:
|
||||
bsize, bwidth, bheight, translate_func = translate[format]
|
||||
except KeyError:
|
||||
sys.stderr.write('error: unsupported format %s\n' % formats[format])
|
||||
return
|
||||
for y in range(0, height, bheight):
|
||||
for x in range(0, width, bwidth):
|
||||
indata = infile.read(bsize)
|
||||
outdata = translate_func(indata)
|
||||
for j in range(bheight):
|
||||
for i in range(bwidth):
|
||||
r, g, b, a = outdata[j][i]
|
||||
outpixels[x+i, y+j] = r, g, b
|
||||
outimage.save(outfilename, "PNG")
|
||||
|
||||
|
||||
def main():
|
||||
if sys.platform == 'win32':
|
||||
# wildcard expansion
|
||||
from glob import glob
|
||||
args = []
|
||||
for arg in sys.argv[1:]:
|
||||
args.extend(glob(arg))
|
||||
else:
|
||||
args = sys.argv[1:]
|
||||
for infilename in args:
|
||||
root, ext = os.path.splitext(infilename)
|
||||
outfilename = root + ".png"
|
||||
process(infilename, outfilename)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
309
bin/win32kprof.py
Executable file
309
bin/win32kprof.py
Executable file
@@ -0,0 +1,309 @@
|
||||
#!/usr/bin/env python
|
||||
##########################################################################
|
||||
#
|
||||
# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
# 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, 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 TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
|
||||
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
##########################################################################
|
||||
|
||||
|
||||
import sys
|
||||
import optparse
|
||||
import re
|
||||
import struct
|
||||
|
||||
from gprof2dot import Call, Function, Profile
|
||||
from gprof2dot import CALLS, SAMPLES, TIME, TIME_RATIO, TOTAL_TIME, TOTAL_TIME_RATIO
|
||||
from gprof2dot import DotWriter, TEMPERATURE_COLORMAP
|
||||
|
||||
|
||||
__version__ = '0.1'
|
||||
|
||||
|
||||
class ParseError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class MsvcDemangler:
|
||||
# http://www.kegel.com/mangle.html
|
||||
|
||||
def __init__(self, symbol):
|
||||
self._symbol = symbol
|
||||
self._pos = 0
|
||||
|
||||
def lookahead(self):
|
||||
return self._symbol[self._pos]
|
||||
|
||||
def consume(self):
|
||||
ret = self.lookahead()
|
||||
self._pos += 1
|
||||
return ret
|
||||
|
||||
def match(self, c):
|
||||
if self.lookahead() != c:
|
||||
raise ParseError
|
||||
self.consume()
|
||||
|
||||
def parse(self):
|
||||
self.match('?')
|
||||
name = self.parse_name()
|
||||
qualifications = self.parse_qualifications()
|
||||
return '::'.join(qualifications + [name])
|
||||
|
||||
def parse_name(self):
|
||||
if self.lookahead() == '?':
|
||||
return self.consume() + self.consume()
|
||||
else:
|
||||
name = self.parse_id()
|
||||
self.match('@')
|
||||
return name
|
||||
|
||||
def parse_qualifications(self):
|
||||
qualifications = []
|
||||
while self.lookahead() != '@':
|
||||
name = self.parse_id()
|
||||
qualifications.append(name)
|
||||
self.match('@')
|
||||
return qualifications
|
||||
|
||||
def parse_id(self):
|
||||
s = ''
|
||||
while True:
|
||||
c = self.lookahead()
|
||||
if c.isalnum() or c in '_':
|
||||
s += c
|
||||
self.consume()
|
||||
else:
|
||||
break
|
||||
return s
|
||||
|
||||
|
||||
def demangle(name):
|
||||
if name.startswith('_'):
|
||||
name = name[1:]
|
||||
idx = name.rfind('@')
|
||||
if idx != -1 and name[idx+1:].isdigit():
|
||||
name = name[:idx]
|
||||
return name
|
||||
if name.startswith('?'):
|
||||
demangler = MsvcDemangler(name)
|
||||
return demangler.parse()
|
||||
return name
|
||||
|
||||
|
||||
class Reader:
|
||||
|
||||
def __init__(self):
|
||||
self.symbols = []
|
||||
self.symbol_cache = {}
|
||||
self.base_addr = None
|
||||
|
||||
def read_map(self, mapfile):
|
||||
# See http://msdn.microsoft.com/en-us/library/k7xkk3e2.aspx
|
||||
last_addr = 0
|
||||
last_name = 0
|
||||
for line in file(mapfile, "rt"):
|
||||
fields = line.split()
|
||||
try:
|
||||
section_offset, name, addr, type, lib_object = fields
|
||||
except ValueError:
|
||||
continue
|
||||
if type != 'f':
|
||||
continue
|
||||
section, offset = section_offset.split(':')
|
||||
addr = int(offset, 16)
|
||||
self.symbols.append((addr, name))
|
||||
last_addr = addr
|
||||
last_name = name
|
||||
|
||||
# sort symbols
|
||||
self.symbols.sort(key = lambda (addr, name): addr)
|
||||
|
||||
def lookup_addr(self, addr):
|
||||
try:
|
||||
return self.symbol_cache[addr]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
tolerance = 4196
|
||||
s, e = 0, len(self.symbols)
|
||||
while s != e:
|
||||
i = (s + e)//2
|
||||
start_addr, name = self.symbols[i]
|
||||
try:
|
||||
end_addr, next_name = self.symbols[i + 1]
|
||||
except IndexError:
|
||||
end_addr = start_addr + tolerance
|
||||
if addr < start_addr:
|
||||
e = i
|
||||
continue
|
||||
if addr == end_addr:
|
||||
return next_name, addr - start_addr
|
||||
if addr > end_addr:
|
||||
s = i
|
||||
continue
|
||||
return name, addr - start_addr
|
||||
raise ValueError
|
||||
|
||||
def lookup_symbol(self, name):
|
||||
for symbol_addr, symbol_name in self.symbols:
|
||||
if name == symbol_name:
|
||||
return symbol_addr
|
||||
return 0
|
||||
|
||||
def read_data(self, data):
|
||||
profile = Profile()
|
||||
|
||||
fp = file(data, "rb")
|
||||
entry_format = "IIII"
|
||||
entry_size = struct.calcsize(entry_format)
|
||||
caller = None
|
||||
caller_stack = []
|
||||
while True:
|
||||
entry = fp.read(entry_size)
|
||||
if len(entry) < entry_size:
|
||||
break
|
||||
caller_addr, callee_addr, samples_lo, samples_hi = struct.unpack(entry_format, entry)
|
||||
if caller_addr == 0 and callee_addr == 0:
|
||||
continue
|
||||
|
||||
if self.base_addr is None:
|
||||
ref_addr = self.lookup_symbol('___debug_profile_reference@0')
|
||||
if ref_addr:
|
||||
self.base_addr = (caller_addr - ref_addr) & ~(options.align - 1)
|
||||
else:
|
||||
self.base_addr = 0
|
||||
sys.stderr.write('Base addr: %08x\n' % self.base_addr)
|
||||
|
||||
samples = (samples_hi << 32) | samples_lo
|
||||
|
||||
try:
|
||||
caller_raddr = caller_addr - self.base_addr
|
||||
caller_sym, caller_ofs = self.lookup_addr(caller_raddr)
|
||||
|
||||
try:
|
||||
caller = profile.functions[caller_sym]
|
||||
except KeyError:
|
||||
caller_name = demangle(caller_sym)
|
||||
caller = Function(caller_sym, caller_name)
|
||||
profile.add_function(caller)
|
||||
caller[CALLS] = 0
|
||||
caller[SAMPLES] = 0
|
||||
except ValueError:
|
||||
caller = None
|
||||
|
||||
if not callee_addr:
|
||||
if caller:
|
||||
caller[SAMPLES] += samples
|
||||
else:
|
||||
callee_raddr = callee_addr - self.base_addr
|
||||
callee_sym, callee_ofs = self.lookup_addr(callee_raddr)
|
||||
|
||||
try:
|
||||
callee = profile.functions[callee_sym]
|
||||
except KeyError:
|
||||
callee_name = demangle(callee_sym)
|
||||
callee = Function(callee_sym, callee_name)
|
||||
profile.add_function(callee)
|
||||
callee[CALLS] = samples
|
||||
callee[SAMPLES] = 0
|
||||
else:
|
||||
callee[CALLS] += samples
|
||||
|
||||
if caller is not None:
|
||||
try:
|
||||
call = caller.calls[callee.id]
|
||||
except KeyError:
|
||||
call = Call(callee.id)
|
||||
call[CALLS] = samples
|
||||
caller.add_call(call)
|
||||
else:
|
||||
call[CALLS] += samples
|
||||
|
||||
if options.verbose:
|
||||
if not callee_addr:
|
||||
sys.stderr.write('%s+%u: %u\n' % (caller_sym, caller_ofs, samples))
|
||||
else:
|
||||
sys.stderr.write('%s+%u -> %s+%u: %u\n' % (caller_sym, caller_ofs, callee_sym, callee_ofs, samples))
|
||||
|
||||
# compute derived data
|
||||
profile.validate()
|
||||
profile.find_cycles()
|
||||
profile.aggregate(SAMPLES)
|
||||
profile.ratio(TIME_RATIO, SAMPLES)
|
||||
profile.call_ratios(CALLS)
|
||||
profile.integrate(TOTAL_TIME_RATIO, TIME_RATIO)
|
||||
|
||||
return profile
|
||||
|
||||
|
||||
def main():
|
||||
parser = optparse.OptionParser(
|
||||
usage="\n\t%prog [options] [file] ...",
|
||||
version="%%prog %s" % __version__)
|
||||
parser.add_option(
|
||||
'-a', '--align', metavar='NUMBER',
|
||||
type="int", dest="align", default=16,
|
||||
help="section alignment")
|
||||
parser.add_option(
|
||||
'-m', '--map', metavar='FILE',
|
||||
type="string", dest="map",
|
||||
help="map file")
|
||||
parser.add_option(
|
||||
'-b', '--base', metavar='FILE',
|
||||
type="string", dest="base",
|
||||
help="base addr")
|
||||
parser.add_option(
|
||||
'-n', '--node-thres', metavar='PERCENTAGE',
|
||||
type="float", dest="node_thres", default=0.5,
|
||||
help="eliminate nodes below this threshold [default: %default]")
|
||||
parser.add_option(
|
||||
'-e', '--edge-thres', metavar='PERCENTAGE',
|
||||
type="float", dest="edge_thres", default=0.1,
|
||||
help="eliminate edges below this threshold [default: %default]")
|
||||
parser.add_option(
|
||||
'-v', '--verbose',
|
||||
action="count",
|
||||
dest="verbose", default=0,
|
||||
help="verbose output")
|
||||
|
||||
global options
|
||||
(options, args) = parser.parse_args(sys.argv[1:])
|
||||
|
||||
reader = Reader()
|
||||
if options.base is not None:
|
||||
reader.base_addr = int(options.base, 16)
|
||||
if options.map is not None:
|
||||
reader.read_map(options.map)
|
||||
for arg in args:
|
||||
profile = reader.read_data(arg)
|
||||
profile.prune(options.node_thres/100.0, options.edge_thres/100.0)
|
||||
output = sys.stdout
|
||||
dot = DotWriter(output)
|
||||
colormap = TEMPERATURE_COLORMAP
|
||||
dot.graph(profile, colormap)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
40
common.py
40
common.py
@@ -3,8 +3,6 @@
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import platform as _platform
|
||||
|
||||
@@ -14,7 +12,7 @@ import platform as _platform
|
||||
|
||||
_platform_map = {
|
||||
'linux2': 'linux',
|
||||
'win32': 'windows',
|
||||
'win32': 'winddk',
|
||||
}
|
||||
|
||||
default_platform = sys.platform
|
||||
@@ -29,38 +27,12 @@ _machine_map = {
|
||||
'ppc' : 'ppc',
|
||||
'x86_64': 'x86_64',
|
||||
}
|
||||
|
||||
|
||||
# find default_machine value
|
||||
if 'PROCESSOR_ARCHITECTURE' in os.environ:
|
||||
default_machine = os.environ['PROCESSOR_ARCHITECTURE']
|
||||
else:
|
||||
default_machine = _platform.machine()
|
||||
default_machine = _machine_map.get(default_machine, 'generic')
|
||||
|
||||
|
||||
# find default_llvm value
|
||||
if 'LLVM' in os.environ:
|
||||
default_llvm = 'yes'
|
||||
else:
|
||||
# Search sys.argv[] for a "platform=foo" argument since we don't have
|
||||
# an 'env' variable at this point.
|
||||
platform = default_platform
|
||||
pattern = re.compile("(platform=)(.*)")
|
||||
for arg in sys.argv:
|
||||
m = pattern.match(arg)
|
||||
if m:
|
||||
platform = m.group(2)
|
||||
|
||||
default_llvm = 'no'
|
||||
try:
|
||||
if platform != 'windows' and subprocess.call(['llvm-config', '--version'], stdout=subprocess.PIPE) == 0:
|
||||
default_llvm = 'yes'
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
# find default_dri value
|
||||
if default_platform in ('linux', 'freebsd'):
|
||||
default_dri = 'yes'
|
||||
elif default_platform in ('winddk', 'windows', 'wince', 'darwin'):
|
||||
@@ -81,13 +53,15 @@ def AddOptions(opts):
|
||||
from SCons.Variables.EnumVariable import EnumVariable as EnumOption
|
||||
except ImportError:
|
||||
from SCons.Options.EnumOption import EnumOption
|
||||
opts.Add(BoolOption('debug', 'debug build', 'yes'))
|
||||
opts.Add(BoolOption('debug', 'debug build', 'no'))
|
||||
opts.Add(BoolOption('profile', 'profile build', 'no'))
|
||||
opts.Add(BoolOption('quiet', 'quiet command lines', 'yes'))
|
||||
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
|
||||
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
|
||||
opts.Add(EnumOption('platform', 'target platform', default_platform,
|
||||
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos5', 'freebsd8')))
|
||||
opts.Add('toolchain', 'compiler toolchain', 'default')
|
||||
opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
|
||||
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin')))
|
||||
opts.Add(EnumOption('toolchain', 'compiler toolchain', 'default',
|
||||
allowed_values=('default', 'crossmingw', 'winsdk', 'winddk')))
|
||||
opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
|
||||
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))
|
||||
|
||||
|
@@ -14,8 +14,6 @@ ARCH_FLAGS = @ARCH_FLAGS@
|
||||
ASM_FLAGS = @ASM_FLAGS@
|
||||
PIC_FLAGS = @PIC_FLAGS@
|
||||
DEFINES = @DEFINES@
|
||||
API_DEFINES = @API_DEFINES@
|
||||
GLES_OVERLAY = @GLES_OVERLAY@
|
||||
CFLAGS = @CPPFLAGS@ @CFLAGS@ \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
|
||||
@@ -24,23 +22,8 @@ LDFLAGS = @LDFLAGS@
|
||||
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
|
||||
RADEON_CFLAGS = @RADEON_CFLAGS@
|
||||
RADEON_LDFLAGS = @RADEON_LDFLAGS@
|
||||
INTEL_LIBS = @INTEL_LIBS@
|
||||
INTEL_CFLAGS = @INTEL_CFLAGS@
|
||||
X11_LIBS = @X11_LIBS@
|
||||
X11_CFLAGS = @X11_CFLAGS@
|
||||
LLVM_CFLAGS = @LLVM_CFLAGS@
|
||||
LLVM_LDFLAGS = @LLVM_LDFLAGS@
|
||||
LLVM_LIBS = @LLVM_LIBS@
|
||||
GLW_CFLAGS = @GLW_CFLAGS@
|
||||
GLUT_CFLAGS = @GLUT_CFLAGS@
|
||||
|
||||
TALLOC_LIBS = @TALLOC_LIBS@
|
||||
TALLOC_CFLAGS = @TALLOC_CFLAGS@
|
||||
|
||||
# dlopen
|
||||
DLOPEN_LIBS = @DLOPEN_LIBS@
|
||||
|
||||
# Source selection
|
||||
# Assembler
|
||||
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
|
||||
GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@
|
||||
|
||||
@@ -62,9 +45,6 @@ GLU_LIB = GLU
|
||||
GLUT_LIB = glut
|
||||
GLW_LIB = GLw
|
||||
OSMESA_LIB = @OSMESA_LIB@
|
||||
GLESv1_CM_LIB = GLESv1_CM
|
||||
GLESv2_LIB = GLESv2
|
||||
VG_LIB = OpenVG
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = @GL_LIB_NAME@
|
||||
@@ -72,10 +52,6 @@ GLU_LIB_NAME = @GLU_LIB_NAME@
|
||||
GLUT_LIB_NAME = @GLUT_LIB_NAME@
|
||||
GLW_LIB_NAME = @GLW_LIB_NAME@
|
||||
OSMESA_LIB_NAME = @OSMESA_LIB_NAME@
|
||||
EGL_LIB_NAME = @EGL_LIB_NAME@
|
||||
GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@
|
||||
GLESv2_LIB_NAME = @GLESv2_LIB_NAME@
|
||||
VG_LIB_NAME = @VG_LIB_NAME@
|
||||
|
||||
# Globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = @GL_LIB_GLOB@
|
||||
@@ -83,29 +59,28 @@ GLU_LIB_GLOB = @GLU_LIB_GLOB@
|
||||
GLUT_LIB_GLOB = @GLUT_LIB_GLOB@
|
||||
GLW_LIB_GLOB = @GLW_LIB_GLOB@
|
||||
OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@
|
||||
EGL_LIB_GLOB = @EGL_LIB_GLOB@
|
||||
GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@
|
||||
GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@
|
||||
VG_LIB_GLOB = @VG_LIB_GLOB@
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = @LIB_DIR@
|
||||
SRC_DIRS = @SRC_DIRS@
|
||||
GLU_DIRS = @GLU_DIRS@
|
||||
DRIVER_DIRS = @DRIVER_DIRS@
|
||||
EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@
|
||||
GALLIUM_DIRS = @GALLIUM_DIRS@
|
||||
GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@
|
||||
GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@
|
||||
GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@
|
||||
GALLIUM_TARGET_DIRS = @GALLIUM_TARGET_DIRS@
|
||||
GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@
|
||||
GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@
|
||||
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
|
||||
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
|
||||
# Which subdirs under $(TOP)/progs/ to enter:
|
||||
PROGRAM_DIRS = @PROGRAM_DIRS@
|
||||
|
||||
# Driver specific build vars
|
||||
DRI_DIRS = @DRI_DIRS@
|
||||
EGL_PLATFORMS = @EGL_PLATFORMS@
|
||||
EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
|
||||
WINDOW_SYSTEM = @WINDOW_SYSTEM@
|
||||
USING_EGL = @USING_EGL@
|
||||
|
||||
# Dependencies
|
||||
X11_INCLUDES = @X11_INCLUDES@
|
||||
@@ -126,9 +101,6 @@ GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \
|
||||
$(EXTRA_LIB_PATH) @GLW_LIB_DEPS@
|
||||
APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
|
||||
GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@
|
||||
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@
|
||||
VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@
|
||||
|
||||
# DRI dependencies
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
|
||||
@@ -152,10 +124,7 @@ INSTALL_INC_DIR = $(includedir)
|
||||
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
|
||||
|
||||
# Where libGL will look for DRI hardware drivers
|
||||
DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@
|
||||
|
||||
# EGL driver install directory
|
||||
EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@
|
||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||
|
||||
# Xorg driver install directory (for xorg state-tracker)
|
||||
XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@
|
||||
@@ -177,23 +146,3 @@ GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@
|
||||
GLW_PC_CFLAGS = @GLW_PC_CFLAGS@
|
||||
OSMESA_PC_REQ = @OSMESA_PC_REQ@
|
||||
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
|
||||
GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@
|
||||
GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@
|
||||
EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
|
||||
EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
|
||||
EGL_PC_CFLAGS = @GL_PC_CFLAGS@
|
||||
|
||||
XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@
|
||||
XCB_DRI2_LIBS = @XCB_DRI2_LIBS@
|
||||
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
|
||||
LIBUDEV_LIBS = @LIBUDEV_LIBS@
|
||||
|
||||
MESA_LLVM = @MESA_LLVM@
|
||||
|
||||
LLVM_VERSION = @LLVM_VERSION@
|
||||
ifneq ($(LLVM_VERSION),)
|
||||
HAVE_LLVM := 0x0$(subst .,0,$(LLVM_VERSION:svn=))
|
||||
DEFINES += -DHAVE_LLVM=$(HAVE_LLVM)
|
||||
endif
|
||||
|
||||
HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@
|
||||
|
@@ -90,9 +90,10 @@ else
|
||||
endif
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = gallium mesa glu glut/beos
|
||||
SRC_DIRS = gallium mesa glu glut/beos glew
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = beos
|
||||
PROGRAM_DIRS = beos samples redbook demos tests
|
||||
|
||||
# Library/program dependencies
|
||||
GL_LIB_DEPS =
|
||||
|
@@ -24,6 +24,7 @@ OSMESA_LIB_NAME = libOSMesa.a
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS = osdemos
|
||||
|
||||
|
||||
# Dependencies
|
||||
|
@@ -20,6 +20,7 @@ OSMESA_LIB_NAME = libOSMesa.a
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS = osdemos
|
||||
|
||||
|
||||
# Dependencies
|
||||
|
@@ -23,6 +23,7 @@ OSMESA_LIB_NAME = libOSMesa.a
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS = osdemos
|
||||
|
||||
|
||||
# Dependencies
|
||||
|
@@ -12,14 +12,11 @@ X11_DIR = $(INSTALL_DIR)
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
PIC_FLAGS = -fPIC
|
||||
DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
|
||||
-DGLX_ALIAS_UNSUPPORTED \
|
||||
-DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL
|
||||
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
||||
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
|
||||
-DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
|
||||
|
||||
# -DGLX_INDIRECT_RENDERING \
|
||||
|
||||
# -D_GNU_SOURCE - for src/mesa/main ...
|
||||
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx
|
||||
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
|
||||
# -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile
|
||||
# -DIN_DRI_DRIVER
|
||||
|
||||
@@ -52,8 +49,9 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = glsl mapi/glapi mapi/vgapi glx/apple mesa gallium glu glut/glx
|
||||
SRC_DIRS = glx/x11 mesa glu glut/glx glew
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = osmesa
|
||||
#DRIVER_DIRS = dri
|
||||
DRI_DIRS = swrast
|
||||
PROGRAM_DIRS = xdemos
|
||||
|
33
configs/darwin-x86ppc
Normal file
33
configs/darwin-x86ppc
Normal file
@@ -0,0 +1,33 @@
|
||||
# Configuration for Darwin / MacOS X, making dynamic libs
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = darwin
|
||||
|
||||
# Compiler and flags
|
||||
CC = cc
|
||||
CXX = cc
|
||||
CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
|
||||
MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.dylib
|
||||
GLU_LIB_NAME = libGLU.dylib
|
||||
GLUT_LIB_NAME = libglut.dylib
|
||||
GLW_LIB_NAME = libGLw.dylib
|
||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(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 = gallium mesa glu glut/glx glew
|
||||
|
@@ -9,7 +9,7 @@ CONFIG_NAME = default
|
||||
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=9
|
||||
MESA_MINOR=7
|
||||
MESA_TINY=0
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
@@ -23,7 +23,6 @@ HOST_CC = $(CC)
|
||||
CFLAGS = -O
|
||||
CXXFLAGS = -O
|
||||
LDFLAGS =
|
||||
HOST_CFLAGS = $(CFLAGS)
|
||||
GLU_CFLAGS =
|
||||
|
||||
# Compiler for building demos/tests/etc
|
||||
@@ -52,24 +51,18 @@ INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
|
||||
GL_LIB = GL
|
||||
GLU_LIB = GLU
|
||||
GLUT_LIB = glut
|
||||
GLEW_LIB = GLEW
|
||||
GLW_LIB = GLw
|
||||
OSMESA_LIB = OSMesa
|
||||
EGL_LIB = EGL
|
||||
GLESv1_CM_LIB = GLESv1_CM
|
||||
GLESv2_LIB = GLESv2
|
||||
VG_LIB = OpenVG
|
||||
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = lib$(GL_LIB).so
|
||||
GLU_LIB_NAME = lib$(GLU_LIB).so
|
||||
GLUT_LIB_NAME = lib$(GLUT_LIB).so
|
||||
GLEW_LIB_NAME = lib$(GLEW_LIB).a
|
||||
GLW_LIB_NAME = lib$(GLW_LIB).so
|
||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
|
||||
EGL_LIB_NAME = lib$(EGL_LIB).so
|
||||
GLESv1_CM_LIB_NAME = lib$(GLESv1_CM_LIB).so
|
||||
GLESv2_LIB_NAME = lib$(GLESv2_LIB).so
|
||||
VG_LIB_NAME = lib$(VG_LIB).so
|
||||
|
||||
# globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = $(GL_LIB_NAME)*
|
||||
@@ -77,13 +70,6 @@ GLU_LIB_GLOB = $(GLU_LIB_NAME)*
|
||||
GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
|
||||
GLW_LIB_GLOB = $(GLW_LIB_NAME)*
|
||||
OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
|
||||
EGL_LIB_GLOB = $(EGL_LIB_NAME)*
|
||||
GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)*
|
||||
GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
|
||||
VG_LIB_GLOB = $(VG_LIB_NAME)*
|
||||
|
||||
TALLOC_LIBS = `pkg-config --libs talloc`
|
||||
TALLOC_CFLAGS = `pkg-config --cflags talloc`
|
||||
|
||||
# Optional assembly language optimization files for libGL
|
||||
MESA_ASM_SOURCES =
|
||||
@@ -96,45 +82,39 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = lib
|
||||
SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
|
||||
gallium egl gallium/winsys gallium/targets glu glut/glx glw
|
||||
SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = x11 osmesa
|
||||
# Which subdirs under $(TOP)/progs/ to enter:
|
||||
PROGRAM_DIRS = demos redbook samples glsl xdemos
|
||||
|
||||
# EGL drivers to build
|
||||
EGL_DRIVERS_DIRS = glx
|
||||
# EGL directories
|
||||
EGL_DRIVERS_DIRS = demo
|
||||
|
||||
# Gallium directories and
|
||||
GALLIUM_DIRS = auxiliary drivers state_trackers
|
||||
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
|
||||
GALLIUM_DRIVERS_DIRS = softpipe trace rbug identity galahad i915 i965 svga r300 nvfx nv50 failover
|
||||
GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices
|
||||
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_DRIVERS_DIRS = softpipe i915simple failover trace identity
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_WINSYS_DIRS = sw sw/xlib
|
||||
GALLIUM_TARGET_DIRS = libgl-xlib
|
||||
GALLIUM_STATE_TRACKERS_DIRS = glx vega
|
||||
GALLIUM_WINSYS_DIRS = xlib egl_xlib
|
||||
GALLIUM_WINSYS_DRM_DIRS =
|
||||
GALLIUM_STATE_TRACKERS_DIRS = glx
|
||||
|
||||
# native platforms EGL should support
|
||||
EGL_PLATFORMS = x11
|
||||
EGL_CLIENT_APIS = $(GL_LIB)
|
||||
|
||||
# Library dependencies
|
||||
#EXTRA_LIB_PATH ?=
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread $(TALLOC_LIBS)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
|
||||
EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
|
||||
OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
|
||||
GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
|
||||
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
|
||||
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
|
||||
VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
|
||||
|
||||
# Program dependencies - specific GL/glut libraries added in Makefiles
|
||||
APP_LIB_DEPS = -lm
|
||||
X11_LIBS = -lX11
|
||||
|
||||
DLOPEN_LIBS = -ldl
|
||||
|
||||
# Installation directories (for make install)
|
||||
INSTALL_DIR = /usr/local
|
||||
@@ -145,9 +125,6 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
|
||||
# Where libGL will look for DRI hardware drivers
|
||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||
|
||||
# EGL driver install directory
|
||||
EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl
|
||||
|
||||
# Xorg driver install directory (for xorg state-tracker)
|
||||
XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
|
||||
|
||||
@@ -168,12 +145,3 @@ GLW_PC_LIB_PRIV =
|
||||
GLW_PC_CFLAGS =
|
||||
OSMESA_PC_REQ =
|
||||
OSMESA_PC_LIB_PRIV =
|
||||
GLESv1_CM_PC_REQ_PRIV =
|
||||
GLESv1_CM_PC_LIB_PRIV =
|
||||
GLESv1_CM_PC_CFLAGS =
|
||||
GLESv2_PC_REQ_PRIV =
|
||||
GLESv2_PC_LIB_PRIV =
|
||||
GLESv2_PC_CFLAGS =
|
||||
VG_PC_REQ_PRIV =
|
||||
VG_PC_LIB_PRIV =
|
||||
VG_PC_CFLAGS =
|
||||
|
@@ -41,11 +41,15 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glx gallium mesa glu glut/glx glw
|
||||
SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
|
||||
DRIVER_DIRS = dri
|
||||
PROGRAM_DIRS =
|
||||
WINDOW_SYSTEM=dri
|
||||
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
|
||||
# ffb and gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
|
||||
unichrome savage sis
|
||||
|
||||
|
@@ -23,11 +23,11 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = -Wall -Wmissing-prototypes -Wdeclaration-after-statement \
|
||||
-Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
$(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
$(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = -Wall -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
$(DEFINES) $(X11_INCLUDES)
|
||||
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(X11_INCLUDES)
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
|
@@ -1,12 +1,12 @@
|
||||
# linux-cell (non-debug build)
|
||||
|
||||
include $(TOP)/configs/linux
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = linux-cell
|
||||
|
||||
|
||||
# Omiting other gallium drivers:
|
||||
GALLIUM_DRIVERS_DIRS = cell softpipe trace rbug identity
|
||||
GALLIUM_DRIVERS_DIRS = cell softpipe trace
|
||||
|
||||
|
||||
# Compiler and flags
|
||||
@@ -25,20 +25,15 @@ OPT_FLAGS = -O3
|
||||
SDK = /opt/cell/sdk/usr
|
||||
|
||||
|
||||
|
||||
COMMON_C_CPP_FLAGS = $(OPT_FLAGS) -Wall -Winline \
|
||||
-fPIC -m32 -mabi=altivec -maltivec \
|
||||
CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \
|
||||
-fPIC -m32 -std=c99 -mabi=altivec -maltivec \
|
||||
-I. -I$(SDK)/include \
|
||||
-DGALLIUM_CELL $(DEFINES)
|
||||
|
||||
CFLAGS = $(COMMON_C_CPP_FLAGS) -Wmissing-prototypes -std=c99
|
||||
|
||||
CXXFLAGS = $(COMMON_C_CPP_FLAGS)
|
||||
-DGALLIUM_CELL -DUSE_XSHM -D_BSD_SOURCE -D_SVID_SOURCE
|
||||
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
# Omitting glw here:
|
||||
SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
|
||||
gallium gallium/winsys gallium/targets glu glut/glx
|
||||
SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew
|
||||
|
||||
# Build no traditional Mesa drivers:
|
||||
DRIVER_DIRS =
|
||||
|
@@ -4,6 +4,5 @@ include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-debug
|
||||
|
||||
OPT_FLAGS = -g
|
||||
#CFLAGS += -pedantic
|
||||
OPT_FLAGS = -g -ansi -pedantic
|
||||
DEFINES += -DDEBUG -DDEBUG_MATH
|
||||
|
38
configs/linux-directfb
Normal file
38
configs/linux-directfb
Normal file
@@ -0,0 +1,38 @@
|
||||
# Configuration for DirectFB
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = linux-directfb
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
CFLAGS = -Wall -O3 -ffast-math -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -D_SVID_SOURCE \
|
||||
-D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DPTHREADS
|
||||
|
||||
CXXFLAGS = -Wall -O3 -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
HAVE_X86 = $(shell uname -m | grep 'i[3-6]86' >/dev/null && echo yes)
|
||||
ifeq ($(HAVE_X86), yes)
|
||||
CFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
|
||||
CXXFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
|
||||
MESA_ASM_SOURCES = $(X86_SOURCES)
|
||||
GLAPI_ASM_SOURCES = $(X86_API)
|
||||
endif
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = gallium mesa glu glut/directfb glew
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = directfb
|
||||
PROGRAM_DIRS = demos directfb
|
||||
|
||||
# Library/program dependencies
|
||||
GL_LIB_DEPS = -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB)
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB) -l$(GLUT_LIB)
|
||||
|
@@ -45,27 +45,23 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
|
||||
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl -ltalloc $(LIBDRM_LIB)
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -lpthread -ldl $(LIBDRM_LIB)
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS := glx egl $(SRC_DIRS)
|
||||
SRC_DIRS := glx/x11 egl $(SRC_DIRS)
|
||||
PROGRAM_DIRS := egl $(PROGRAM_DIRS)
|
||||
|
||||
# EGL directories
|
||||
EGL_DRIVERS_DIRS = glx
|
||||
EGL_DRIVERS_DIRS = demo glx
|
||||
|
||||
DRIVER_DIRS = dri
|
||||
GALLIUM_WINSYS_DIRS = sw sw/xlib drm/vmware drm/intel drm/i965
|
||||
GALLIUM_TARGET_DIRS = egl-swrast
|
||||
WINDOW_SYSTEM = dri
|
||||
GALLIUM_WINSYS_DIRS = drm
|
||||
GALLIUM_WINSYS_DRM_DIRS = intel
|
||||
GALLIUM_STATE_TRACKERS_DIRS = egl
|
||||
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
|
||||
savage sis tdfx unichrome swrast
|
||||
|
||||
INTEL_LIBS = `pkg-config --libs libdrm_intel`
|
||||
INTEL_CFLAGS = `pkg-config --cflags libdrm_intel`
|
||||
|
||||
RADEON_LIBS = `pkg-config --libs libdrm_radeon`
|
||||
RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon`
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
|
||||
savage sis tdfx trident unichrome ffb swrast
|
||||
|
@@ -11,6 +11,6 @@ ARCH_FLAGS = -DDEBUG
|
||||
#DRI_DIRS = i915tex i915
|
||||
#DRI_DIRS = i965
|
||||
#DRI_DIRS = radeon r200 r300
|
||||
#DRI_DIRS = unichrome sis
|
||||
#DRI_DIRS = unichrome sis trident
|
||||
#DRI_DIRS = i810 mga r128 tdfx
|
||||
|
||||
|
@@ -16,7 +16,7 @@ LIB_DIR = lib64
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib64
|
||||
|
||||
# sis is missing because it has not been converted to use
|
||||
# ffb, gamma, and sis are missing because they have not be converted to use
|
||||
# the new interface. i810 are missing because there is no x86-64
|
||||
# system where they could *ever* be used.
|
||||
#
|
||||
|
@@ -47,8 +47,26 @@ DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
|
||||
$(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
|
||||
|
||||
SRC_DIRS = glx gallium mesa glu glut/glx glw
|
||||
|
||||
# This is now 0 by default since it seems to confuse the hell out of people
|
||||
# and generate a lot of extra noise on bugzilla. If you need to build with
|
||||
# EGL, do 'make linux-dri USING_EGL=1'
|
||||
|
||||
USING_EGL=0
|
||||
|
||||
# Directories
|
||||
ifeq ($(USING_EGL), 1)
|
||||
SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glew glw
|
||||
PROGRAM_DIRS = egl
|
||||
else
|
||||
SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw
|
||||
PROGRAM_DIRS = xdemos
|
||||
endif
|
||||
|
||||
DRIVER_DIRS = dri
|
||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon \
|
||||
savage sis tdfx unichrome
|
||||
WINDOW_SYSTEM=dri
|
||||
|
||||
# gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
|
||||
savage sis tdfx trident unichrome ffb
|
||||
|
@@ -46,11 +46,20 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
$(LIBDRM_LIB)
|
||||
|
||||
|
||||
# This is now 0 by default since it seems to confuse the hell out of people
|
||||
# and generate a lot of extra noise on bugzilla. If you need to build with
|
||||
# EGL, do 'make linux-dri USING_EGL=1'
|
||||
|
||||
USING_EGL=0
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = gallium mesa gallium/winsys gallium/targets glu egl
|
||||
SRC_DIRS = gallium mesa gallium/winsys glu egl
|
||||
PROGRAM_DIRS = egl
|
||||
|
||||
DRIVER_DIRS = dri
|
||||
WINDOW_SYSTEM = dri
|
||||
GALLIUM_WINSYS_DIRS = egl_drm
|
||||
GALLIUM_TARGET_DIRS =
|
||||
|
||||
# gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = intel
|
||||
|
@@ -4,13 +4,14 @@ include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-fbdev
|
||||
|
||||
CFLAGS += -DUSE_GLFBDEV_DRIVER
|
||||
CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -DUSE_GLFBDEV_DRIVER
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
|
||||
SRC_DIRS += glut/fbdev
|
||||
SRC_DIRS = gallium mesa glu glut/fbdev glew
|
||||
DRIVER_DIRS = fbdev osmesa
|
||||
PROGRAM_DIRS = fbdev demos redbook samples
|
||||
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
|
23
configs/linux-glide
Normal file
23
configs/linux-glide
Normal file
@@ -0,0 +1,23 @@
|
||||
# Configuration for generic Linux with 3Dfx Glide driver
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = linux-glide
|
||||
|
||||
# Compiler and flags
|
||||
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 -DFX -I/usr/include/glide -I/usr/local/glide/include
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library/program dependencies
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm
|
@@ -1,9 +0,0 @@
|
||||
# Configuration for standalone mode i965 debug
|
||||
|
||||
include $(TOP)/configs/linux-debug
|
||||
|
||||
CONFIG_NAME = linux-i965
|
||||
|
||||
GALLIUM_DRIVER_DIRS = i965
|
||||
GALLIUM_WINSYS_DIRS = drm/i965/xlib
|
||||
GALLIUM_TARGET_DIRS =
|
@@ -47,5 +47,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glx glu glut/glx glw
|
||||
SRC_DIRS = glx/x11 glu glut/glx glew glw
|
||||
DRIVER_DIRS =
|
||||
PROGRAM_DIRS =
|
||||
WINDOW_SYSTEM=dri
|
||||
|
@@ -1,21 +1,21 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for Linux and LLVM with optimizations
|
||||
# Configuration for Linux and LLVM with debugging info
|
||||
# Builds the llvmpipe gallium driver
|
||||
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-llvm
|
||||
|
||||
#GALLIUM_AUXILIARY_DIRS += gallivm
|
||||
|
||||
# Add llvmpipe driver
|
||||
GALLIUM_DRIVERS_DIRS += llvmpipe
|
||||
|
||||
OPT_FLAGS = -O3 -ansi -pedantic
|
||||
ARCH_FLAGS = -mmmx -msse -msse2 -mstackrealign
|
||||
|
||||
DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
|
||||
OPT_FLAGS = -g -ansi -pedantic
|
||||
DEFINES += -DDEBUG -DDEBUG_MATH -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
|
||||
|
||||
# override -std=c99
|
||||
CFLAGS += -std=gnu99 -D__STDC_CONSTANT_MACROS
|
||||
CFLAGS += -std=gnu99
|
||||
|
||||
LLVM_VERSION := $(shell llvm-config --version)
|
||||
|
||||
@@ -24,8 +24,6 @@ ifeq ($(LLVM_VERSION),)
|
||||
MESA_LLVM=0
|
||||
else
|
||||
MESA_LLVM=1
|
||||
HAVE_LLVM := 0x0$(subst .,0,$(LLVM_VERSION:svn=))
|
||||
DEFINES += -DHAVE_LLVM=$(HAVE_LLVM)
|
||||
# $(info Using LLVM version: $(LLVM_VERSION))
|
||||
endif
|
||||
|
||||
@@ -33,7 +31,7 @@ ifeq ($(MESA_LLVM),1)
|
||||
# LLVM_CFLAGS=`llvm-config --cflags`
|
||||
LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
|
||||
LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation)
|
||||
LLVM_LIBS = $(shell llvm-config --libs backend bitwriter bitreader engine ipo interpreter instrumentation)
|
||||
LLVM_LIBS = $(shell llvm-config --libs backend bitreader engine ipo interpreter instrumentation)
|
||||
MKLIB_OPTIONS=-cplusplus
|
||||
else
|
||||
LLVM_CFLAGS=
|
||||
@@ -41,4 +39,4 @@ else
|
||||
endif
|
||||
|
||||
LD = g++
|
||||
GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -ltalloc -lstdc++ -ludis86
|
||||
GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -lstdc++ -ludis86
|
||||
|
@@ -1,12 +0,0 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for Linux and LLVM with debugging info
|
||||
# Builds the llvmpipe gallium driver
|
||||
|
||||
include $(TOP)/configs/linux-llvm
|
||||
|
||||
CONFIG_NAME = linux-llvm-debug
|
||||
|
||||
OPT_FLAGS = -g -ansi -pedantic
|
||||
|
||||
DEFINES += -DDEBUG -UNDEBUG
|
||||
|
@@ -1,28 +0,0 @@
|
||||
# Configuration for OpenGL ES on Linux
|
||||
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-opengl-es
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = lib
|
||||
SRC_DIRS = egl glsl mapi/es1api mapi/es2api mesa/es \
|
||||
gallium gallium/winsys gallium/targets
|
||||
|
||||
# egl st needs this
|
||||
DEFINES += -DGLX_DIRECT_RENDERING
|
||||
|
||||
# no mesa or egl drivers
|
||||
DRIVER_DIRS =
|
||||
EGL_DRIVERS_DIRS =
|
||||
|
||||
GALLIUM_DRIVERS_DIRS = softpipe
|
||||
|
||||
# build libGLES*.so
|
||||
GALLIUM_STATE_TRACKERS_DIRS = es
|
||||
|
||||
# build egl_x11_{swrast,i915}.so
|
||||
GALLIUM_DRIVERS_DIRS += trace rbug i915
|
||||
GALLIUM_STATE_TRACKERS_DIRS += egl
|
||||
GALLIUM_WINSYS_DIRS += drm/intel
|
||||
GALLIUM_TARGET_DIRS += egl-swrast egl-i915
|
@@ -9,7 +9,7 @@ CONFIG_NAME = linux-osmesa
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -g -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
@@ -17,11 +17,12 @@ CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mapi/glapi glsl mesa glu
|
||||
SRC_DIRS = gallium mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS = osdemos
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread -ldl
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lm -lpthread
|
||||
|
@@ -24,6 +24,7 @@ OSMESA_LIB_NAME = libOSMesa.a
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS = osdemos
|
||||
|
||||
|
||||
# Dependencies
|
||||
|
@@ -20,8 +20,9 @@ OSMESA_LIB_NAME = libOSMesa16.so
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mapi/glapi glsl mesa glu
|
||||
SRC_DIRS = gallium mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
|
@@ -24,6 +24,7 @@ OSMESA_LIB_NAME = libOSMesa16.a
|
||||
# Directories
|
||||
SRC_DIRS = gallium mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
|
@@ -20,8 +20,9 @@ OSMESA_LIB_NAME = libOSMesa32.so
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mapi/glapi glsl mesa glu
|
||||
SRC_DIRS = gallium mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
|
54
configs/linux-solo
Normal file
54
configs/linux-solo
Normal file
@@ -0,0 +1,54 @@
|
||||
# Configuration for linux-solo: Linux DRI hardware drivers for fbdev
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = linux-solo
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
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 ?=
|
||||
|
||||
# DRM and pciaccess
|
||||
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
|
||||
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
|
||||
PCIACCESS_CFLAGS = $(shell pkg-config --cflags pciaccess)
|
||||
PCIACCESS_LIB = $(shell pkg-config --libs pciaccess)
|
||||
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE -DHAVE_POSIX_MEMALIGN \
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DHAVE_ALIAS
|
||||
|
||||
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)
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
MESA_ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(TOP)/$(LIB_DIR) $(PCIACCESS_LIB)
|
||||
GL_LIB_DEPS = -lm -lpthread -ldl
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glx/mini gallium mesa glu glut/mini glew
|
||||
DRIVER_DIRS = dri
|
||||
PROGRAM_DIRS = miniglx
|
||||
|
||||
#DRI_DIRS = ffb gamma sis savage tdfx unichrome fb
|
||||
DRI_DIRS = i810 i915tex i915 mach64 mga r128 r200 radeon
|
7
configs/linux-solo-ia64
Normal file
7
configs/linux-solo-ia64
Normal file
@@ -0,0 +1,7 @@
|
||||
# Configuration for linux-solo-ia64: Linux DRI hardware drivers for fbdev
|
||||
|
||||
include $(TOP)/configs/linux-solo
|
||||
|
||||
CONFIG_NAME = linux-solo-ia64
|
||||
|
||||
DRI_DIRS = fb mach64 mga r128 r200 radeon sis tdfx unichrome
|
10
configs/linux-solo-x86
Normal file
10
configs/linux-solo-x86
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for linux-solo-x86: Linux hardware drivers for fbdev for x86
|
||||
|
||||
include $(TOP)/configs/linux-solo
|
||||
|
||||
CONFIG_NAME = linux-solo-x86
|
||||
|
||||
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
|
||||
MESA_ASM_SOURCES = $(X86_SOURCES)
|
||||
GLAPI_ASM_SOURCES = $(X86_API)
|
28
configs/linux-x86-glide
Normal file
28
configs/linux-x86-glide
Normal file
@@ -0,0 +1,28 @@
|
||||
# Configuration for Linux with 3Dfx Glide driver and x86 optimizations
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = linux-x86-glide
|
||||
|
||||
# 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 -DFX -I/usr/include/glide -I/usr/local/glide/include
|
||||
|
||||
CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
MESA_ASM_SOURCES = $(X86_SOURCES)
|
||||
GLAPI_ASM_SOURCES = $(X86_API)
|
||||
|
||||
# Library/program dependencies
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm
|
82
configs/mine
Normal file
82
configs/mine
Normal file
@@ -0,0 +1,82 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = mine
|
||||
|
||||
# Compiler and flags
|
||||
CC = ccache gcc
|
||||
CXX = ccache g++
|
||||
|
||||
#MKDEP = /usr/X11R6/bin/makedepend
|
||||
#MKDEP = gcc -M
|
||||
#MKDEP_OPTIONS = -MF depend
|
||||
|
||||
OPT_FLAGS = -O0 -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 \
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 \
|
||||
-DGLX_DIRECT_RENDERING \
|
||||
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
|
||||
|
||||
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
MESA_ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -lpthread -ldl $(LIBDRM_LIB)
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = egl mesa gallium gallium/winsys
|
||||
PROGRAM_DIRS := egl openvg/demos demos xdemos
|
||||
|
||||
# EGL directories
|
||||
EGL_DRIVERS_DIRS = glx xdri
|
||||
|
||||
ifeq ($(USE_DRI),yes)
|
||||
DEFINES += -DIN_DRI_DRIVER -DGLX_INDIRECT_RENDERING
|
||||
|
||||
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
|
||||
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
|
||||
|
||||
SRC_DIRS := glx/x11 $(SRC_DIRS)
|
||||
DRIVER_DIRS = dri
|
||||
WINDOW_SYSTEM = dri
|
||||
DRI_DIRS = i915
|
||||
|
||||
GALLIUM_WINSYS_DIRS = drm egl_xlib
|
||||
GALLIUM_WINSYS_DRM_DIRS = intel
|
||||
GALLIUM_STATE_TRACKERS_DIRS = egl glx vega
|
||||
|
||||
else
|
||||
|
||||
DRIVER_DIRS =
|
||||
WINDOW_SYSTEM =
|
||||
DRI_DIRS =
|
||||
|
||||
GALLIUM_WINSYS_DIRS = egl_xlib xlib
|
||||
GALLIUM_STATE_TRACKERS_DIRS = glx vega
|
||||
|
||||
endif
|
5
configs/mine-dri
Normal file
5
configs/mine-dri
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
|
||||
|
||||
USE_DRI = yes
|
||||
include $(TOP)/configs/mine
|
724
configure.ac
724
configure.ac
File diff suppressed because it is too large
Load Diff
101
docs/GL3.txt
101
docs/GL3.txt
@@ -1,101 +0,0 @@
|
||||
|
||||
Status of OpenGL 3.x features in Mesa
|
||||
|
||||
|
||||
Note: when an item is marked as "DONE" it means all the core Mesa
|
||||
infrastructure is complete but it may be the case that few (if any) drivers
|
||||
implement the features.
|
||||
|
||||
|
||||
Feature Status
|
||||
----------------------------------------------------- ------------------------
|
||||
|
||||
GL 3.0:
|
||||
|
||||
GLSL changes (GL_EXT_gpu_shader4, etc) not started
|
||||
Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe)
|
||||
Map buffer subranges (GL_ARB_map_buffer_range) DONE
|
||||
Float textures, renderbuffers some infrastructure done
|
||||
(incl. GL_EXT_packed_float, GL_EXT_shared_exponent)
|
||||
Framebuffer objects (GL_EXT_framebuffer_object) DONE
|
||||
Half-float some infrastructure done
|
||||
Multisample blit DONE
|
||||
Non-normalized Integer texture/framebuffer formats not started
|
||||
1D/2D Texture arrays core Mesa, swrast done
|
||||
Packed depth/stencil formats DONE
|
||||
Per-buffer blend and masks (GL_EXT_draw_buffers2) DONE
|
||||
GL_EXT_texture_compression_rgtc not started
|
||||
Red and red/green texture formats Ian?
|
||||
Transform feedback (GL_EXT_transform_feedback) ~50% done
|
||||
glBindFragDataLocation, glGetFragDataLocation,
|
||||
glBindBufferRange, glBindBufferBase commands
|
||||
Vertex array objects (GL_APPLE_vertex_array_object) DONE
|
||||
sRGB framebuffer format (GL_EXT_framebuffer_sRGB) not started
|
||||
glClearBuffer commands DONE, except for dispatch
|
||||
glGetStringi command DONE, except for dispatch
|
||||
glTexParameterI, glGetTexParameterI commands DONE, except for dispatch
|
||||
glVertexAttribI commands not started
|
||||
|
||||
|
||||
GL 3.1:
|
||||
|
||||
GLSL 1.30 and 1.40 not started
|
||||
Instanced drawing (GL_ARB_draw_instanced) ~50% done
|
||||
Buffer copying (GL_ARB_copy_buffer) DONE
|
||||
Primitive restart (GL_NV_primitive_restart) not started
|
||||
16 vertex texture image units not started
|
||||
Texture buffer objs (GL_ARB_textur_buffer_object) not started
|
||||
Rectangular textures (GL_ARB_texture_rectangle) DONE
|
||||
Uniform buffer objs (GL_ARB_uniform_buffer_object) not started
|
||||
Signed normalized texture formats ~50% done
|
||||
|
||||
|
||||
GL 3.2:
|
||||
|
||||
Core/compatibility profiles not started
|
||||
GLSL 1.50 not started
|
||||
Geometry shaders (GL_ARB_geometry_shader4) partially done (Zack)
|
||||
BGRA vertex order (GL_ARB_vertex_array_bgra) DONE
|
||||
Base vertex offset(GL_ARB_draw_elements_base_vertex) DONE
|
||||
Frag shader coord (GL_ARB_fragment_coord_conventions) DONE (swrast, gallium)
|
||||
Provoking vertex (GL_ARB_provoking_vertex) DONE
|
||||
Seamless cubemaps (GL_ARB_seamless_cube_map) DONE, mostly?
|
||||
Multisample textures (GL_ARB_texture_multisample) not started
|
||||
Frag depth clamp (GL_ARB_depth_clamp) DONE
|
||||
Fence objects (GL_ARB_sync) DONE
|
||||
|
||||
|
||||
GL 3.3:
|
||||
|
||||
GLSL 3.30 not started
|
||||
GL_ARB_blend_func_extended not started
|
||||
GL_ARB_explicit_attrib_location not started
|
||||
GL_ARB_occlusion_query2 not started
|
||||
GL_ARB_sampler_objects not started
|
||||
GL_ARB_texture_rgb10_a2ui not started
|
||||
GL_ARB_texture_swizzle DONE (same as EXT version)
|
||||
GL_ARB_timer_query DONE (only Xlib sw driver)
|
||||
GL_ARB_instanced_arrays not started
|
||||
GL_ARB_vertex_type_2_10_10_10_rev not started
|
||||
|
||||
|
||||
GL 4.0:
|
||||
|
||||
GLSL 4.0 not started
|
||||
GL_ARB_texture_query_lod not started
|
||||
GL_ARB_draw_buffers_blend not started
|
||||
GL_ARB_draw_indirect not started
|
||||
GL_ARB_gpu_shader_fp64 not started
|
||||
GL_ARB_sample_shading not started
|
||||
GL_ARB_shader_subroutine not started
|
||||
GL_ARB_tessellation_shader not started
|
||||
GL_ARB_texture_buffer_object_rgb32 not started
|
||||
GL_ARB_texture_cube_map_array not started
|
||||
GL_ARB_texture_gather not started
|
||||
GL_ARB_transform_feedback2 not started
|
||||
|
||||
|
||||
|
||||
|
||||
More info about these features and the work involved can be found at
|
||||
http://dri.freedesktop.org/wiki/MissingFunctionality
|
@@ -1,149 +0,0 @@
|
||||
Name
|
||||
|
||||
MESA_drm_image
|
||||
|
||||
Name Strings
|
||||
|
||||
EGL_MESA_drm_image
|
||||
|
||||
Contact
|
||||
|
||||
Kristian Høgsberg <krh@bitplanet.net>
|
||||
|
||||
Status
|
||||
|
||||
Proposal
|
||||
|
||||
Version
|
||||
|
||||
Version 2, August 25, 2010
|
||||
|
||||
Number
|
||||
|
||||
EGL Extension #not assigned
|
||||
|
||||
Dependencies
|
||||
|
||||
Reguires EGL 1.4 or later. This extension is written against the
|
||||
wording of the EGL 1.4 specification.
|
||||
|
||||
EGL_KHR_base_image is required.
|
||||
|
||||
Overview
|
||||
|
||||
This extension provides entry points for integrating EGLImage with the
|
||||
Linux DRM mode setting and memory management drivers. The extension
|
||||
lets applications create EGLImages without a client API resource and
|
||||
lets the application get the DRM buffer handles.
|
||||
|
||||
IP Status
|
||||
|
||||
Open-source; freely implementable.
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
EGLImageKHR eglCreateDRMImageMESA(EGLDisplay dpy,
|
||||
const EGLint *attrib_list);
|
||||
|
||||
EGLBoolean eglExportDRMImageMESA(EGLDisplay dpy,
|
||||
EGLImageKHR image,
|
||||
EGLint *name,
|
||||
EGLint *handle,
|
||||
EGLint *stride);
|
||||
|
||||
New Tokens
|
||||
|
||||
Accepted in the <attrib_list> parameter of eglCreateDRMImageMESA:
|
||||
|
||||
EGL_DRM_BUFFER_FORMAT_MESA 0x31D0
|
||||
EGL_DRM_BUFFER_USE_MESA 0x31D1
|
||||
|
||||
Accepted as values for the EGL_IMAGE_FORMAT_MESA attribute:
|
||||
|
||||
EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2
|
||||
|
||||
Bits accepted in EGL_DRM_BUFFER_USE_MESA:
|
||||
|
||||
EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002
|
||||
|
||||
Accepted in the <target> parameter of eglCreateImageKHR:
|
||||
|
||||
EGL_DRM_BUFFER_MESA 0x31D3
|
||||
|
||||
Use when importing drm buffer:
|
||||
|
||||
EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
|
||||
EGL_DRM_BUFFER_FORMAT_MESA 0x31D0
|
||||
|
||||
Additions to the EGL 1.4 Specification:
|
||||
|
||||
To create a DRM EGLImage, call
|
||||
|
||||
EGLImageKHR eglCreateDRMImageMESA(EGLDisplay dpy,
|
||||
const EGLint *attrib_list);
|
||||
|
||||
In the attribute list, pass EGL_WIDTH, EGL_EIGHT and format and
|
||||
use in the attrib list using EGL_DRM_BUFFER_FORMAT_MESA and
|
||||
EGL_DRM_BUFFER_USE_MESA. The only format specified by this
|
||||
extension is EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, where each pixel
|
||||
is a CPU-endian, 32-bit quantity, with alpha in the upper 8 bits,
|
||||
then red, then green, then blue. The bit values accepted by
|
||||
EGL_DRM_BUFFER_USE_MESA are EGL_DRM_BUFFER_USE_SCANOUT_MESA and
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA. EGL_DRM_BUFFER_USE_SCANOUT_MESA
|
||||
requests that the created EGLImage should be usable as a scanout
|
||||
buffer with the DRM kernel modesetting API. The
|
||||
EGL_DRM_BUFFER_USE_SHARE_MESA bit requests that the EGLImage can
|
||||
be shared with other processes by passing the underlying DRM
|
||||
buffer name.
|
||||
|
||||
To create a process local handle or a global DRM name for a
|
||||
buffer, call
|
||||
|
||||
EGLBoolean eglExportDRMImageMESA(EGLDisplay dpy,
|
||||
EGLImageKHR image,
|
||||
EGLint *name,
|
||||
EGLint *handle,
|
||||
EGLint *stride);
|
||||
|
||||
If <name> is non-NULL, a global name is assigned to the image and
|
||||
written to <name>, the handle (local to the DRM file descriptor,
|
||||
for use with DRM kernel modesetting API) is written to <handle> if
|
||||
non-NULL and the stride (in bytes) is written to <stride>, if
|
||||
non-NULL.
|
||||
|
||||
Import a shared buffer by calling eglCreateImageKHR with
|
||||
EGL_DRM_BUFFER_MESA as the target, using EGL_WIDTH, EGL_HEIGHT,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_STRIDE_MESA
|
||||
in the attrib list.
|
||||
|
||||
Issues
|
||||
|
||||
1. Why don't we use eglCreateImageKHR with a target that
|
||||
indicates that we want to create an EGLImage from scratch?
|
||||
|
||||
RESOLVED: The eglCreateImageKHR entry point is reserved for
|
||||
creating an EGLImage from an already existing client API
|
||||
resource. This is fine when we're creating the EGLImage from
|
||||
an existing DRM buffer name, it doesn't seem right to overload
|
||||
the function to also allocate the underlying resource.
|
||||
|
||||
2. Why don't we use an eglQueryImageMESA type functions for
|
||||
querying the DRM EGLImage attributes (name, handle, and stride)?
|
||||
|
||||
RESOLVED: The eglQueryImage function has been proposed often,
|
||||
but it goes against the EGLImage design. EGLImages are opaque
|
||||
handles to a 2D array of pixels, which can be passed between
|
||||
client APIs. By referenceing an EGLImage in a client API, the
|
||||
EGLImage target (a texture, a renderbuffer or such) can be
|
||||
used to query the attributes of the EGLImage. We don't have a
|
||||
full client API for creating and querying DRM buffers, though,
|
||||
so we use a new EGL extension entry point instead.
|
||||
|
||||
Revision History
|
||||
|
||||
Version 1, June 3, 2010
|
||||
Initial draft (Kristian Høgsberg)
|
||||
Version 2, August 25, 2010
|
||||
Flesh out the extension a bit, add final EGL tokens, capture
|
||||
some of the original discussion in the issues section.
|
@@ -43,7 +43,7 @@ Issues
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
int glXSwapIntervalMESA(unsigned int interval)
|
||||
int glXSwapIntervalMESA(int interval)
|
||||
int glXGetSwapIntervalMESA(void)
|
||||
|
||||
New Tokens
|
||||
@@ -103,8 +103,11 @@ Additions to the GLX 1.3 Specification
|
||||
|
||||
Errors
|
||||
|
||||
glXSwapIntervalMESA returns GLX_BAD_VALUE if parameter <interval> is
|
||||
less than zero.
|
||||
|
||||
glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current
|
||||
GLXContext or if the current context is not a direct rendering context.
|
||||
GLXContext.
|
||||
|
||||
GLX Protocol
|
||||
|
||||
|
534
docs/MiniGLX.html
Normal file
534
docs/MiniGLX.html
Normal file
@@ -0,0 +1,534 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Mini GLX Specification</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
<center>Mini GLX Specification</center>
|
||||
</h1>
|
||||
<h2>
|
||||
<center>Tungsten Graphics, Inc.<br>
|
||||
<br>
|
||||
January 20, 2003<br>
|
||||
<br>
|
||||
</center>
|
||||
</h2>
|
||||
<p> Copyright © 2002-2003 by Tungsten Graphics, Inc., Cedar Park,
|
||||
Texas. All Rights Reserved. <br>
|
||||
<br>
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
document provided the copyright notice and this permission notice are
|
||||
preserved on all copies.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h1>1. Introduction</h1>
|
||||
<p>The Mini GLX interface facilitates OpenGL rendering on embedded
|
||||
devices. The interface is a subset of the GLX interface, plus a minimal
|
||||
set of Xlib-like functions.</p>
|
||||
<p>Programs written to the Mini GLX specification should run unchanged
|
||||
on systems with the X Window System and the GLX extension. The intention
|
||||
is to allow flexibility for prototyping and testing.</p>
|
||||
<p>This document serves as both the reference guide and programming
|
||||
guide for Mini GLX.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h1>2. Mini GLX Concepts</h1>
|
||||
<p>The OpenGL specification does not describe how OpenGL rendering
|
||||
contexts and drawing surfaces (i.e. the frame buffer) are created and
|
||||
managed. Rather, this is handled by an OpenGL window system interface,
|
||||
such as Mini GLX.</p>
|
||||
<p>There are three main datatypes or resources managed by Mini GLX. The
|
||||
resources and their corresponding GLX or Xlib data types are:</p>
|
||||
<table cellspacing="10" align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><u>Resource</u></td>
|
||||
<td><u>Data type</u></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pixel formats</td>
|
||||
<td>X Visual and XVisualInfo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>drawing surfaces</td>
|
||||
<td>X Window or GLXDrawable</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>rendering contexts</td>
|
||||
<td>GLXContext</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Pixel formats or X Visuals describe the per-pixel attributes of the
|
||||
frame buffer. For example, bits per color component, Z buffer size,
|
||||
stencil size, TrueColor vs PseudoColor, etc.</p>
|
||||
<p>Drawing surfaces or X Windows typically describe a spatial
|
||||
allocation of the frame buffer (i.e. the position and size of a
|
||||
rectangular region of pixels). Since MiniGLX doesn't really support a
|
||||
window system, the window is effectively the entire frame buffer.</p>
|
||||
<p>A rendering context represents the current OpenGL state such as
|
||||
current drawing color, line width, blending mode, texture parameters,
|
||||
etc. Several rendering contexts can be created but only one can be in
|
||||
use at any given time.</p>
|
||||
<p>The Mini GLX interface provides all the functions needed for
|
||||
choosing pixel formats, create drawing surfaces, creating rendering
|
||||
contexts and binding rendering contexts to drawing surfaces.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h1>3. Using Mini GLX</h1>
|
||||
<p>To use the Mini GLX interface in your application, include the
|
||||
GL/miniglx.h header file at compile time:</p>
|
||||
<blockquote><code> #include <GL/miniglx.h><br>
|
||||
</code></blockquote>
|
||||
<code></code>Applications should link with libGL.so (i.e. <code>gcc
|
||||
myprogram.o -lGL -o myprogram</code>). libGL.so implements the
|
||||
MiniGLX API functions and, in turn, loads a hardware-specific device
|
||||
driver (such as <code>radeon_dri.so</code>) at runtime. The
|
||||
environment variable <code>LIBGL_DRIVERS_PATH</code> should name the
|
||||
directory where these modules are located.<br>
|
||||
<br>
|
||||
The remainder of this section describes the MiniGLX API functions.<br>
|
||||
<br>
|
||||
<h2>3.1 Initialization</h2>
|
||||
<p>The XOpenDisplay function is used to initialize the graphics system:</p>
|
||||
<blockquote>
|
||||
<pre>Display *XOpenDisplay(const char *displayname)<br></pre>
|
||||
</blockquote>
|
||||
<p>The <code>displayName</code> parameter is currently ignored in Mini
|
||||
GLX. It is recommended that <code>NULL</code> be passed as the<code>displayName</code>
|
||||
parameter.</p>
|
||||
<p>If XOpenDisplay is able to initialize the graphics system a pointer
|
||||
to a Display will be returned. Otherwise, NULL will be returned.</p>
|
||||
<h2>3.2 Choosing a Visual</h2>
|
||||
<p>A visual (i.e. pixel format) must be chosen before a drawing surface
|
||||
or rendering context can be created. This is done with the
|
||||
glXChooseVisual function:</p>
|
||||
<blockquote>
|
||||
<pre>XVisualInfo *glXChooseVisual(Display *dpy, int screen, const int *attribList)<br></pre>
|
||||
</blockquote>
|
||||
<p><code>dpy</code> is a pointer to the display returned by
|
||||
XOpenDisplay. </p>
|
||||
<p><code>screen</code> is currently ignored by Mini GLX and should be
|
||||
zero. </p>
|
||||
<p><code>attribList</code> is a list of GLX attributes which describe
|
||||
the desired pixel format. It is terminated by the token <code>None</code>.
|
||||
The attributes are as follows:</p>
|
||||
<blockquote>
|
||||
<dl>
|
||||
<dt><code>GLX_USE_GL</code></dt>
|
||||
<dd>This attribute should always be present in order to maintain
|
||||
compatibility with GLX.</dd>
|
||||
<dt><code>GLX_RGBA</code></dt>
|
||||
<dd>If present, only RGBA pixel formats will be considered.
|
||||
Otherwise, only color index formats are considered.</dd>
|
||||
<dt><code>GLX_DOUBLEBUFFER</code></dt>
|
||||
<dd>if present, only double-buffered pixel formats will be chosen.</dd>
|
||||
<dt><code>GLX_RED_SIZE n</code></dt>
|
||||
<dd>Must be followed by a non-negative integer indicating the
|
||||
minimum number of bits per red pixel component that is acceptable.</dd>
|
||||
<dt><code>GLX_GREEN_SIZE n</code></dt>
|
||||
<dd>Must be followed by a non-negative integer indicating the
|
||||
minimum number of bits per green pixel component that is acceptable.</dd>
|
||||
<dt><code>GLX_BLUE_SIZE n</code></dt>
|
||||
<dd>Must be followed by a non-negative integer indicating the
|
||||
minimum number of bits per blue pixel component that is acceptable.</dd>
|
||||
<dt><code>GLX_ALPHA_SIZE n</code></dt>
|
||||
<dd>Must be followed by a non-negative integer indicating the
|
||||
minimum number of bits per alpha pixel component that is acceptable.</dd>
|
||||
<dt><code>GLX_STENCIL_SIZE n</code></dt>
|
||||
<dd>Must be followed by a non-negative integer indicating the
|
||||
minimum number of bits per stencil value that is acceptable.</dd>
|
||||
<dt><code>None</code></dt>
|
||||
<dd>This token is used to terminate the attribute list.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
<p>glXChooseVisual will return a pointer to an XVisualInfo object which
|
||||
most closely matches the requirements of the attribute list. If there
|
||||
is no visual which matches the request, NULL will be returned.</p>
|
||||
<p>Note that visuals with accumulation buffers and depth buffers are
|
||||
not available.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h2>3.3 Creating a Drawing Surface</h2>
|
||||
<p>Drawing surfaces are created as X windows. For Mini GLX,
|
||||
windows are <i>full-screen</i>; they cover the entire frame buffer.
|
||||
Also, Mini GLX imposes a limit of one window. A second window
|
||||
cannot be created until the first one is destroyed.</p>
|
||||
<h3>3.3.1 Window Creation</h3>
|
||||
<p>The XCreateWindow function is used to create a drawing surface:</p>
|
||||
<blockquote>
|
||||
<pre>Window XCreateWindow( Display *display,<br> Window parent,<br> int x, int y,<br> unsigned int width, unsigned int height,<br> unsigned int borderWidth,<br> int depth,<br> unsigned int class,<br> Visual *visual,<br> unsigned long valuemask,<br> XSetWindowAttributes *attributes )<br></pre>
|
||||
</blockquote>
|
||||
<p>The parameters are as follows:</p>
|
||||
<blockquote>
|
||||
<dl>
|
||||
<dt><code>display</code></dt>
|
||||
<dd>A Display pointer, as returned by XOpenDisplay.</dd>
|
||||
<dt><code>parent</code></dt>
|
||||
<dd>The parent window for the new window. For Mini GLX, this
|
||||
should be<code>RootWindow(dpy, 0)</code>.</dd>
|
||||
<dt><code>x, y</code></dt>
|
||||
<dd>The position of the window. For Mini GLX, both values should
|
||||
be zero.</dd>
|
||||
<dt><code>width, height</code></dt>
|
||||
<dd>The size of the window. For Mini GLX, this specifies the
|
||||
desired screen size such as 1024, 768 or 1280, 1024.</dd>
|
||||
<dt><code>borderWidth</code></dt>
|
||||
<dd>This parameter should be zero.</dd>
|
||||
<dt><code>depth</code></dt>
|
||||
<dd>The pixel depth for the window. For Mini GLX this should be
|
||||
the depth found in the XVisualInfo object returned by <code>glxChooseVisual</code>.</dd>
|
||||
<dt><code>class</code></dt>
|
||||
<dd>The window class. For Mini GLX this value should be <code>InputOutput</code>.</dd>
|
||||
<dt><code>visual</code></dt>
|
||||
<dd>This parameter should be the <code>visual</code> field of the <code>XVisualInfo</code>
|
||||
object returned by <code>glxChooseVisual</code>.</dd>
|
||||
<dt><code>valuemask</code></dt>
|
||||
<dd>This parameter indicates which fields of the <code>XSetWindowAttributes</code>
|
||||
are to be used. For Mini GLX this is typically the bitmask<code>CWBackPixel
|
||||
| CWBorderPixel | CWColormap</code>.</dd>
|
||||
<dt><code>attributes</code></dt>
|
||||
<dd>Initial window attributes. Of the fields in the <code>XSetWindowAttributes</code>
|
||||
structure, the<code>background_pixel</code>, <code>border_pixel</code>
|
||||
and <code>colormap</code> fields should be set. See the discussion
|
||||
below regarding colormaps.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
<p><code>XCreateWindow</code> will return a window handle if it succeeds
|
||||
or zero if it fails.</p>
|
||||
<h3>3.3.2 Window Mapping</h3>
|
||||
<p>To display the window the XMapWindow function must be called:</p>
|
||||
<blockquote>
|
||||
<pre>void XMapWindow(Display *dpy, Window w)</pre>
|
||||
</blockquote>
|
||||
<p>This function does nothing in Mini GLX but is required for Xlib/GLX
|
||||
compatibility</p>
|
||||
<h3>3.3.3 Colormaps<br>
|
||||
</h3>
|
||||
<p>Xlib requires specification of a colormap when creating a window.
|
||||
For purposes of interoperability, Mini GLX requires this as well,
|
||||
though the colormap is not actually used. The XCreateColormap
|
||||
function is used to create a colormap:</p>
|
||||
<blockquote><code>Colormap XCreateColormap(Display *dpy, Window window,
|
||||
Visual *visual, int alloc)</code><br>
|
||||
<code></code></blockquote>
|
||||
<p>The parameters are as follows:<br>
|
||||
</p>
|
||||
<blockquote>
|
||||
<dl>
|
||||
<dt><code>dpy</code></dt>
|
||||
<dd>The display handle as returned by XOpenDisplay.</dd>
|
||||
<dt><code>window</code></dt>
|
||||
<dd> This parameter is ignored by Mini GLX but should be the value
|
||||
returned by the <code>RootWindow(dpy, 0)</code> macro.<br>
|
||||
</dd>
|
||||
<dt><code>visual</code></dt>
|
||||
<dd>This parameter is ignored by Mini GLX but should be the visual
|
||||
field of the XVisualInfo object returned by glXChooseVisual. </dd>
|
||||
<dt><code>alloc</code></dt>
|
||||
<dd>This parameter is ignored by Mini GLX but should be set to <code>AllocNone</code>.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
<br>
|
||||
<h2>3.4 Creating a Rendering Context</h2>
|
||||
<p>An OpenGL rendering context is created with the <code>glXCreateContext</code>
|
||||
function:</p>
|
||||
<blockquote>
|
||||
<pre>GLXContext glXCreateContext(Display *dpy, XVisualInfo *visInfo, GLXContext shareList, Bool direct)<br></pre>
|
||||
</blockquote>
|
||||
<p>The parameters are as follows:</p>
|
||||
<blockquote>
|
||||
<dl>
|
||||
<dt><code>dpy</code></dt>
|
||||
<dd>The display handle as returned by XOpenDisplay.</dd>
|
||||
<dt><code>visInfo</code></dt>
|
||||
<dd>The visual as returned by glXChooseVisual.</dd>
|
||||
<dt><code>shareList</code></dt>
|
||||
<dd>If non-zero, texture objects and display lists are shared with
|
||||
the named rendering context. If zero, texture objects and display lists
|
||||
will (initially) be private to this context. They may be shared when a
|
||||
subsequent context is created.</dd>
|
||||
<dt><code>direct</code></dt>
|
||||
<dd>Specifies whether direct or indirect rendering is desired. For
|
||||
Mini GLX this value is ignored but it should be set to <code>True</code>.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
<p><code>glXCreateContext</code> will return a GLXContext handle if it
|
||||
succeeds or zero if it fails due to invalid parameter or insufficient
|
||||
resources.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h2>3.5 Binding a Rendering Context</h2>
|
||||
<p>The final step before beginning OpenGL rendering is to bind (i.e.
|
||||
activate) a rendering context and drawing surface with the
|
||||
glXMakeCurrent function:</p>
|
||||
<blockquote>
|
||||
<pre>Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)<br></pre>
|
||||
</blockquote>
|
||||
<p>The parameters are as follows:</p>
|
||||
<blockquote>
|
||||
<dl>
|
||||
<dt><code>dpy</code></dt>
|
||||
<dd>The display handle, as returned by XOpenDisplay.</dd>
|
||||
<dt><code>drawable</code></dt>
|
||||
<dd>The window or drawable to bind to the rendering context. This
|
||||
should be the value returned by XCreateWindow.</dd>
|
||||
<dt><code>ctx</code></dt>
|
||||
<dd>The rendering context to bind, as returned by glXCreateContext.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
<p>If glXMakeCurrent succeeds True is returned. Otherwise False is
|
||||
returned to indicate an invalid display, window or context parameter.</p>
|
||||
<p>After the rendering context has been bound to the drawing surface
|
||||
OpenGL rendering can begin.</p>
|
||||
<p>The current rendering context may be unbound by calling
|
||||
glXMakeCurrent with the window and context parameters set to zero.</p>
|
||||
<p>An application may create any number of rendering contexts and bind
|
||||
them as needed. Note that binding a rendering context is generally not a
|
||||
light-weight operation. Most simple OpenGL applications create
|
||||
only one rendering context.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h2>3.6 Color Buffer Swapping</h2>
|
||||
<p>A double buffered window has two color buffers: a front buffer and a
|
||||
back buffer. Normally, rendering is directed to the back buffer while
|
||||
the front buffer is displayed. When rendering of a frame is finished
|
||||
the front and back buffers are swapped to provide the illusion of
|
||||
instanteous screen updates.</p>
|
||||
<p>The color buffers for a particular window (i.e. drawable) may be
|
||||
swapped with the glXSwapBuffers command:</p>
|
||||
<blockquote>
|
||||
<pre>void glXSwapBuffers(Display *dpy, GLXDrawable drawable)<br></pre>
|
||||
</blockquote>
|
||||
Any pending rendering commands will be completed before the buffer swap
|
||||
takes place.<br>
|
||||
<br>
|
||||
Calling glXSwapBuffers on a window which is single-buffered has no
|
||||
effect.<br>
|
||||
<br>
|
||||
<h2>3.7 Releasing Resources</h2>
|
||||
<h3>3.7.1 Releasing Rendering Contexts</h3>
|
||||
<p>A rendering context may be destroyed by calling glXDestroyContext:</p>
|
||||
<blockquote>
|
||||
<pre>void glXDestroyContext(Display *dpy, GLXContext ctx)<br></pre>
|
||||
</blockquote>
|
||||
<h3>3.7.2 Releasing Windows</h3>
|
||||
<p>A window may be destroyed by calling XDestroyWindow:</p>
|
||||
<blockquote>
|
||||
<pre>void XDestroyWindow(Display *dpy, Window window)<br></pre>
|
||||
</blockquote>
|
||||
<h3>3.7.3 Releasing Visuals</h3>
|
||||
<p>An XVisualInfo object may be freed by calling XFree:</p>
|
||||
<blockquote>
|
||||
<pre>void XFree(void *data)<br></pre>
|
||||
</blockquote>
|
||||
<h3>3.7.4 Releasing Colormaps</h3>
|
||||
<p>A colormap may be freed by calling XFreeColormap:</p>
|
||||
<blockquote>
|
||||
<pre>void XFreeColormap(Display *dpy, Colormap colormap)<br></pre>
|
||||
</blockquote>
|
||||
<h3>3.7.4 Releasing Display Resources</h3>
|
||||
<p>When the application is about to exit, the resources associated with
|
||||
the graphics system can be released by calling XCloseDisplay:</p>
|
||||
<blockquote>
|
||||
<pre>void XCloseDisplay(Display *dpy)<br></pre>
|
||||
</blockquote>
|
||||
<p>The display handle becomes invalid at this point.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h2>3.8 Query Functions</h2>
|
||||
<h3>3.8.1 Querying Available Visuals</h3>
|
||||
A list of all available visuals can be obtained with the XGetVisualInfo
|
||||
function:<br>
|
||||
<br>
|
||||
<div style="margin-left: 40px;"><code>XVisualInfo
|
||||
*XGetVisualInfo(Display *dpy, long vinfo_mask, XVisualInfo
|
||||
*vinfo_template, int *nitems_return)<br>
|
||||
</code></div>
|
||||
<br>
|
||||
The parameters are as follows:<br>
|
||||
<blockquote>
|
||||
<dl>
|
||||
<dt><code>dpy</code></dt>
|
||||
<dd>The display handle, as returned by XOpenDisplay.</dd>
|
||||
<dt><code>vinfo_mask</code></dt>
|
||||
<dd>A bitmask indicating which fields of the vinfo_template are to
|
||||
be matched. The value must be VisualScreenMask.</dd>
|
||||
<dt><code>vinfo_template</code></dt>
|
||||
<dd>A template whose fields indicate which visual attributes must
|
||||
be matched by the results. The screen field of this structure must
|
||||
be zero.</dd>
|
||||
<dt><code>nitems_return</code></dt>
|
||||
<dd>Returns the number of visuals returned. </dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
The return value is the address of an array of all available visuals.<br>
|
||||
<br>
|
||||
An example of using XGetVisualInfo to get all available visuals follows:<br>
|
||||
<br>
|
||||
<div style="margin-left: 40px;"><code>XVisualInfo visTemplate, *results;</code><br>
|
||||
<code>int numVisuals;</code><br>
|
||||
<code>Display *dpy = XOpenDisplay(NULL);</code><br>
|
||||
<code>visTemplate.screen = 0;</code><br>
|
||||
<code>results = XGetVisualInfo(dpy, VisualScreenMask, &visTemplate,
|
||||
&numVisuals);</code><br>
|
||||
<code></code></div>
|
||||
<br>
|
||||
<h3>3.8.2 Querying Visual Attributes</h3>
|
||||
<p>The GLX attributes of an X visual may be queried with the
|
||||
glXGetConfig function:</p>
|
||||
<blockquote>
|
||||
<pre>int glXGetConfig(Display *dpy, XVisualInfo *vis, int attribute, int *value)<br></pre>
|
||||
</blockquote>
|
||||
<p>The parameters are as follows:</p>
|
||||
<blockquote>
|
||||
<dl>
|
||||
<dt><code>dpy</code></dt>
|
||||
<dd>The display handle, as returned by XOpenDisplay.</dd>
|
||||
<dt><code>vis</code></dt>
|
||||
<dd>The visual, as returned by glXChooseVisual.</dd>
|
||||
<dt><code>attribute</code></dt>
|
||||
<dd>The attribute to query. The attributes are listed below.</dd>
|
||||
<dt><code>value</code></dt>
|
||||
<dd>Pointer to an integer in which the result of the query will be
|
||||
stored. </dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
<p>The return value will be zero if no error occurs.<code>
|
||||
GLX_INVALID_ATTRIBUTE</code> will be returned if the attribute
|
||||
parameter is invalid.<code> GLX_BAD_VISUAL</code> will be returned
|
||||
if the XVisualInfo parameter is invalid.</p>
|
||||
<p>The following attributes may be queried:</p>
|
||||
<blockquote>
|
||||
<dl>
|
||||
<dt><code>GLX_USE_GL</code></dt>
|
||||
<dd>The result will be <code>True</code> or <code>False</code> to
|
||||
indicate if OpenGL rendering is supported with the visual. Mini GLX
|
||||
always return <code>True</code>.</dd>
|
||||
<dt><code>GLX_RGBA</code></dt>
|
||||
<dd>The result will be <code>True</code> for RGBA visuals or <code>False</code>
|
||||
for color index visuals.</dd>
|
||||
<dt><code>GLX_DOUBLEBUFFER</code></dt>
|
||||
<dd>The result will be <code>True</code> if the visual has two
|
||||
color buffers or <code>False</code> if the visual has one color buffer.</dd>
|
||||
<dt><code>GLX_RED_SIZE</code></dt>
|
||||
<dd>The result will be the number of red bits per pixel.</dd>
|
||||
<dt><code>GLX_GREEN_SIZE</code></dt>
|
||||
<dd>The result will be the number of green bits per pixel.</dd>
|
||||
<dt><code>GLX_BLUE_SIZE</code></dt>
|
||||
<dd>The result will be the number of blue bits per pixel.</dd>
|
||||
<dt><code>GLX_ALPHA_SIZE</code></dt>
|
||||
<dd>The result will be the number of alpha bits per pixel.</dd>
|
||||
<dt><code>GLX_DEPTH_SIZE</code></dt>
|
||||
<dd>The result will be the number of bits per Z value.</dd>
|
||||
<dt><code>GLX_STENCIL_SIZE</code></dt>
|
||||
<dd>The result will be the number of bits per stencil value.<br>
|
||||
<br>
|
||||
</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
<h3>3.8.3 Querying the Current Rendering Context</h3>
|
||||
<p>The current rendering context can be queried with
|
||||
glXGetCurrentContext: </p>
|
||||
<blockquote>
|
||||
<pre>GLXContext glXGetCurrentContext(void)<br></pre>
|
||||
</blockquote>
|
||||
<p>Zero will be returned if no context is currently bound.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h3>3.8.4 Querying the Current Drawable</h3>
|
||||
<p>The current drawable (i.e. window or drawing surface) can be queried
|
||||
with glXGetCurrentDrawable:</p>
|
||||
<blockquote>
|
||||
<pre>GLXDrawable glXGetCurrentDrawable(void)<br></pre>
|
||||
</blockquote>
|
||||
<p>Zero will be returned if no drawable is currently bound.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h3>3.8.5 Function Address Queries</h3>
|
||||
<p>The glXGetProcAddress function will return the address of any
|
||||
available OpenGL or Mini GLX function:</p>
|
||||
<blockquote>
|
||||
<pre>void *glXGetProcAddress(const GLubyte *procName)<br></pre>
|
||||
</blockquote>
|
||||
<p>If <code>procName</code> is a valid function name, a pointer to that
|
||||
function will be returned. Otherwise, NULL will be returned.</p>
|
||||
<p>The purpose of glXGetProcAddress is to facilitate using future
|
||||
extensions to OpenGL or Mini GLX. If a future version of the library
|
||||
adds new extension functions they'll be accessible via
|
||||
glXGetProcAddress. The alternative is to hard-code calls to the new
|
||||
functions in the application but doing so will prevent linking the
|
||||
application with older versions of the library.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h2>3.9 Versioning</h2>
|
||||
The Mini GLX version can be queried at run time with glXQueryVersion:
|
||||
<blockquote>
|
||||
<pre>Bool glXQueryVersion(Display *dpy, int *major, int *minor)<br></pre>
|
||||
</blockquote>
|
||||
<p><code>major</code> will be set to the major version number and<code>minor</code>
|
||||
will be set to the minor version number.<code>True</code> will be
|
||||
returned if the function succeeds. <code>False</code> will be returned
|
||||
if the function fails due to invalid parameters. The <code>dpy</code>
|
||||
argument is currently ignored, but should be the value returned by
|
||||
XOpenDisplay.</p>
|
||||
<p>At compile time, the Mini GLX interface version can be tested with
|
||||
the MINI_GLX_VERSION_1_<i>x</i> preprocessor tokens. For example, if
|
||||
version 1.0 of Mini GLX is supported, then<code> MINI_GLX_VERSION_1_0</code>
|
||||
will be defined. If version 1.1 of Mini GLX is supported, then<code>
|
||||
MINI_GLX_VERSION_1_1</code> will be defined.</p>
|
||||
<p>At the time of writing the current Mini GLX version is 1.0.<br>
|
||||
<br>
|
||||
</p>
|
||||
<h1>4.0 Interoperability with GLX and Xlib</h1>
|
||||
While Mini GLX strives to be compatible with GLX and Xlib there are
|
||||
some unavoidable differences which must be taken into consideration.<br>
|
||||
<h2>4.1 Public vs Private Structures</h2>
|
||||
The structure of many X data types is public. For example, the <code>Display</code>
|
||||
data type is defined as a structure in /usr/include/X11/Xlib.h and
|
||||
programmers may access any fields of that structure at will. Mini
|
||||
GLX also defines a Display data type but its fields are hidden and not
|
||||
visiblein <code>miniglx.h</code>. Duplicating the Xlib
|
||||
declaration for the <code>Display</code> data type in minigl.h would
|
||||
require defining a large number of other superfluous Xlib datatypes.<br>
|
||||
<br>
|
||||
Mini GLX users are discouraged from directly accessing the fields of
|
||||
Xlib data types to maximize portability - though this is unavoidable to
|
||||
some extent. For example, the <code>XVisualInfo</code> and <code>XSetWindowAtttributes</code>
|
||||
data types must be completely public.
|
||||
<h2>4.2 Macros</h2>
|
||||
In some cases, Xlib defines macros which are meant to be used instead
|
||||
of direct structure accesses. For example, the <code>RootWindow(dpy,
|
||||
screen)</code> macro returns the root window for a given screen on a
|
||||
given display. Unfortunately, macros do nothing to aid in ABI
|
||||
compatibility since they are resolved at compile time instead of at
|
||||
link/run time.<br>
|
||||
<br>
|
||||
Mini GLX also defines a <code>RootWindow</code> macro since it's
|
||||
essential for creating windows. But the implementation of this
|
||||
macro by Xlib and Mini GLX is completely different.<br>
|
||||
<h2>4.3 Summary</h2>
|
||||
Because Xlib and Mini GLX define data types and macros differently,
|
||||
Mini GLX applications must be recompiled when retargeting Mini GLX or
|
||||
native Xlib/GLX. That is, applications can't simply be re-linked
|
||||
because of ABI incompatibilities.<br>
|
||||
<br>
|
||||
Nevertheless, the fact that Mini GLX programs can be recompiled for
|
||||
Xlib and GLX increases portability and flexibility for testing and
|
||||
prototyping.<br>
|
||||
<br>
|
||||
<h1>5.0 Example Program</h1>
|
||||
<p>This section shows an example program which uses the Mini GLX
|
||||
interface. The program simply draws several frames of a rotating square.<br>
|
||||
</p>
|
||||
<p>The program may be compiled for use with Xlib/GLX or Mini GLX by
|
||||
setting the <code>USE_MINIGLX</code> token to 0 or 1, respectively.
|
||||
Note that the only difference is the header files which are
|
||||
included.<br>
|
||||
</p>
|
||||
<p> </p>
|
||||
<pre><code><br></code>#define USE_MINIGLX 1 /* 1 = use Mini GLX, 0 = use Xlib/GLX */<br><br>#include <stdio.h><br>#include <stdlib.h><br>#include <GL/gl.h><br><br>#if USE_MINIGLX<br>#include <GL/miniglx.h><br>#else<br>#include <GL/glx.h><br>#include <X11/Xlib.h><br>#endif<br><br><code>/*<br> * Create a simple double-buffered RGBA window.<br> */<br>static Window<br>MakeWindow(Display * dpy, unsigned int width, unsigned int height)<br>{<br> int visAttributes[] = {<br> GLX_RGBA,<br> GLX_RED_SIZE, 1,<br> GLX_GREEN_SIZE, 1,<br> GLX_BLUE_SIZE, 1,<br> GLX_DOUBLEBUFFER,<br> None<br> };<br> XSetWindowAttributes attr;<br> unsigned long attrMask;<br> Window root;<br> Window win;<br> GLXContext ctx;<br> XVisualInfo *visinfo;<br><br> root = RootWindow(dpy, 0);<br><br> /* Choose GLX visual / pixel format */<br> visinfo = glXChooseVisual(dpy, 0, visAttributes);<br> if (!visinfo) {<br> printf("Error: couldn't get an RGB, Double-buffered visual\n");<br> exit(1);<br> }<br><br> /* Create the window */<br> attr.background_pixel = 0;<br> attr.border_pixel = 0;<br> attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);<br> attrMask = CWBackPixel | CWBorderPixel | CWColormap;<br> win = XCreateWindow(dpy, root, 0, 0, width, height,<br> 0, visinfo->depth, InputOutput,<br> visinfo->visual, attrMask, &attr);<br> if (!win) {<br> printf("Error: XCreateWindow failed\n");<br> exit(1);<br> }<br><br> /* Display the window */<br> XMapWindow(dpy, win);<br><br> /* Create GLX rendering context */<br> ctx = glXCreateContext(dpy, visinfo, NULL, True);<br> if (!ctx) {<br> printf("Error: glXCreateContext failed\n");<br> exit(1);<br> }<br><br> /* Bind the rendering context and window */<br> glXMakeCurrent(dpy, win, ctx);<br><br> return win;<br>}<br><br><br>/*<br> * Draw a few frames of a rotating square.<br> */<br>static void<br>DrawFrames(Display * dpy, Window win)<br>{<br> int angle;<br> glShadeModel(GL_FLAT);<br> glClearColor(0.5, 0.5, 0.5, 1.0);<br> for (angle = 0; angle < 360; angle += 10) {<br> glClear(GL_COLOR_BUFFER_BIT);<br> glColor3f(1.0, 1.0, 0.0);<br> glPushMatrix();<br> glRotatef(angle, 0, 0, 1);<br> glRectf(-0.8, -0.8, 0.8, 0.8);<br> glPopMatrix();<br> glXSwapBuffers(dpy, win);<br> }<br>}<br><br><br>int<br>main(int argc, char *argv[])<br>{<br> Display *dpy;<br> Window win;<br><br> dpy = XOpenDisplay(NULL);<br> if (!dpy) {<br> printf("Error: XOpenDisplay failed\n");<br> return 1;<br> }<br><br> win = MakeWindow(dpy, 300, 300);<br><br> DrawFrames(dpy, win);<br><br> return 0;<br>}<br></code></pre>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
@@ -644,7 +644,7 @@ Hints and Special Features:
|
||||
|
||||
- The Voodoo driver supports the GL_EXT_paletted_texture. it works
|
||||
only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
|
||||
is ignored because this is a limitation of the current Glide
|
||||
is ignored because this is a limitation of the the current Glide
|
||||
version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for
|
||||
a demo of this extension.
|
||||
|
||||
|
124
docs/README.D3D
Normal file
124
docs/README.D3D
Normal file
@@ -0,0 +1,124 @@
|
||||
|
||||
DirectX 6 Driver for Mesa 3.0
|
||||
|
||||
|
||||
This software is distributed under the terms of the GNU Library
|
||||
General Public License, see the LICENSE file for details.
|
||||
|
||||
|
||||
|
||||
What do you need ?
|
||||
------------------
|
||||
|
||||
- A PC with a DirectX 6 video driver installed.
|
||||
|
||||
- Mesa 3.0
|
||||
|
||||
- The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine).
|
||||
The Voodoo2 requires the Glide library 2.51. The Glide 3.0 is not
|
||||
compatible with the Glide 2.x so it doesn't work with the current
|
||||
version of the driver;
|
||||
|
||||
- Visual C++ 5.0 is only compiler test but others should be ok with
|
||||
changes to the makefiles (CFLAGS/LFLAGS).
|
||||
|
||||
- DirectX 6 SDK (was a MS download but not sure if still available).
|
||||
|
||||
- SoftIce or another debugger that will get DPF's is nice.
|
||||
|
||||
|
||||
Tested on:
|
||||
----------
|
||||
Windows 95
|
||||
Windows 98
|
||||
Windows NT 5.0 (beta 2)
|
||||
|
||||
|
||||
What is able to do ?
|
||||
--------------------
|
||||
|
||||
- the driver will try and use DirectX to rasterize the OpenGL primitives
|
||||
that are sent to the driver. The driver will fall back to SW if the rendering
|
||||
context is too big. The fallback to SW still uses DirectDraw. If the driver
|
||||
fails to support and operation (accum, stencil, etc) then it will try and get
|
||||
Mesa to render it in SW. DirectX 6 features that are unsupported by the
|
||||
installed DirectX 6 driver will be mapped to some other best fit feature.
|
||||
|
||||
|
||||
How to compile:
|
||||
---------------
|
||||
|
||||
These instructions assume you have Visual C++ installed.
|
||||
|
||||
You might need to increase you enviroment space. You can do this by
|
||||
adding the following statement to you config.sys.
|
||||
|
||||
shell=C:\COMMAND.COM C:\ /p /e:8198
|
||||
|
||||
Next setup you compiler enviroment by running vcvars32.bat in the Visual C++
|
||||
'bin' directoy.
|
||||
|
||||
c:\DevStudio\VC\bin\vcvars32.bat
|
||||
|
||||
Modify the D3D makefile to point at your SDK install. Example has the SDK
|
||||
installed on my 'f' drive in the root.
|
||||
|
||||
file: \Mesa-3.0\src\makefile.d3d
|
||||
|
||||
SDKROOT=f:\mssdk
|
||||
|
||||
Now you can simply make the project. If you look in the makefile you can see
|
||||
I have some different targets like 'install'.
|
||||
|
||||
nmake /f makefile.d3d
|
||||
|
||||
|
||||
FAQ:
|
||||
----
|
||||
|
||||
1) I don't think the driver is using my DirectX driver.
|
||||
|
||||
This maybe true as the current version will only select the Primary D3D driver
|
||||
installed. If you 3D card is the secondary (3dfx) then your out of luck for this
|
||||
release.
|
||||
|
||||
2) The driver seems like its not HW accelerated.
|
||||
|
||||
If you have a video card with limited memory then you might want to try and
|
||||
change your destop resolution to a low setting (640x480x16) so that the 3D part
|
||||
of the card has more resources. Remeber the driver can't make the card better...
|
||||
|
||||
3) Nothing works.
|
||||
|
||||
Make sure you have a DirectX '6' driver installed. Check you driver docs for this
|
||||
info or use the SDK info utilities.
|
||||
The final 'dll' is named opengl32.dll and is either in the same directory as the
|
||||
OpenGL program or in your system directory (x:\windows\system or x:\winnt\system32).
|
||||
Check your destop resolution. Most DirectX 6 drivers will only support 16bit and
|
||||
32bit color depth. To find out for sure you can check the DirectX Info Viewer in
|
||||
the SDK.
|
||||
|
||||
|
||||
4) Rendering doesn't look right.
|
||||
|
||||
Sometimes this is because the card doesn't support a feature that that is required.
|
||||
This is usually due to unsupported alpha functions (test/blend) or texture mapping.
|
||||
Some cards suffer from too small of an alpha channel. The driver does its best to
|
||||
fallback on unsupported features. This is not to say the driver may not have a bug(s).
|
||||
|
||||
5) Textures look bad.
|
||||
|
||||
No mipmapping in this release.
|
||||
|
||||
|
||||
Thanks to:
|
||||
----------
|
||||
|
||||
Brian Paul
|
||||
|
||||
|
||||
|
||||
|
||||
Leigh McRae (leigh@altsoftware.com)
|
||||
February 9, 1999
|
||||
|
@@ -27,6 +27,12 @@ using the SDK with Visual Studio Express can be found at
|
||||
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
|
||||
|
||||
If you are stuck using VC6 or VC7, you may start with these project
|
||||
files, but you may need to modify them to reflect changes in the
|
||||
Mesa source code tree. If you sucessfully update the project files,
|
||||
please submit them to the author of this document so that they may
|
||||
be included in the next distribution.
|
||||
|
||||
The project files to build the core Mesa library, Windows Mesa
|
||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||
to build GLUT and some demo programs are in the progs directory.
|
||||
@@ -100,6 +106,23 @@ should build all the demos.
|
||||
Build System Notes
|
||||
----- ------ -----
|
||||
|
||||
VC6 (not actively supported)
|
||||
---
|
||||
|
||||
Visual Studio 6 does not recognize files with the .cc extension as C++
|
||||
language files, without a lot of unnatural tweaking. So, the VC6
|
||||
build process uses custom build steps to compile these files in the
|
||||
GLU library.
|
||||
|
||||
Two additional configurations are provided, Debug x86 and Release x86
|
||||
that activate the shader code compilation by defining SLANG_86. It is
|
||||
unknown if and how this works.
|
||||
|
||||
VC7 (not actively supported)
|
||||
---
|
||||
|
||||
The above-mentioned .cc problem does not exist in this version.
|
||||
|
||||
VC8
|
||||
---
|
||||
|
||||
|
29
docs/README.directfb
Normal file
29
docs/README.directfb
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
Mesa DirectFB Information
|
||||
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
To build Mesa with DirectFB (DirectFBGL) support you need:
|
||||
- DirectFB at least 1.0.0 (http://directfb.org)
|
||||
- pkg-config at least 0.9 (http://pkgconfig.sf.net)
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
Run
|
||||
|
||||
make linux-directfb
|
||||
|
||||
to build Mesa and DirectFBGL module,
|
||||
|
||||
make install
|
||||
|
||||
to install OpenGL libraries and
|
||||
|
||||
cd src/mesa/drivers/directfb ; make install
|
||||
|
||||
to install DirectFBGL module in the proper location.
|
||||
Actually, that last command may not be needed. Please provide feedback.
|
||||
|
@@ -52,12 +52,9 @@ a:visited {
|
||||
|
||||
<b>User Topics</b>
|
||||
<ul>
|
||||
<li><a href="shading.html" target="MainFrame">Shading Language</a>
|
||||
<li><a href="egl.html" target="MainFrame">EGL</a>
|
||||
<li><a href="opengles.html" target="MainFrame">OpenGL ES</a>
|
||||
<li><a href="openvg.html" target="MainFrame">OpenVG / Vega</a>
|
||||
<LI><A HREF="envvars.html" target="MainFrame">Environment Variables</A>
|
||||
<LI><A HREF="osmesa.html" target="MainFrame">Off-Screen Rendering</A>
|
||||
<LI><A HREF="pbuffers.html" target="MainFrame">Pbuffer Rendering</A>
|
||||
<LI><A HREF="debugging.html" target="MainFrame">Debugging Tips</A>
|
||||
<LI><A HREF="perf.html" target="MainFrame">Performance Tips</A>
|
||||
<LI><A HREF="extensions.html" target="MainFrame">Mesa Extensions</A>
|
||||
@@ -68,7 +65,8 @@ a:visited {
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/mesa3d" target="_parent">SourceForge homepage</a>
|
||||
<li><a href="repository.html" target="MainFrame">Source Code Repository</a>
|
||||
<li><a href="sourcetree.html" target="MainFrame">Source Code Tree</a>
|
||||
<li><a href="memory.html" target="MainFrame">DRI Memory Management</a>
|
||||
<li><a href="shading.html" target="MainFrame">Shading Language</a>
|
||||
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
|
||||
<li><a href="utilities.html" target="MainFrame">Utilities</a>
|
||||
<li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
|
||||
@@ -91,6 +89,7 @@ a:visited {
|
||||
<li><a href="modelers.html" target="MainFrame">Modeling and Rendering</a>
|
||||
<li><a href="science.html" target="MainFrame">Science and Technical</a>
|
||||
<li><a href="utility.html" target="MainFrame">Utilities</a>
|
||||
<li><a href="demos.html" target="MainFrame">Demos / other</a>
|
||||
</ul>
|
||||
|
||||
<b>Hosted by:</b>
|
||||
|
18
docs/demos.html
Normal file
18
docs/demos.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Demos</TITLE>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<H1>Demos</H1>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.geocities.com/shobhand/homepage.html">Shobhan Dutta's Geartrain and Walkthrough Demos</a>
|
||||
</li></ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -12,14 +12,12 @@
|
||||
Both professional and volunteer developers contribute to Mesa.
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://www.vmware.com/" target="_parent">VMware</a>
|
||||
<a href="http://www.tungstengraphics.com/" target="_parent">Tungsten Graphics</a>
|
||||
employs several of the main Mesa developers including Brian Paul
|
||||
and Keith Whitwell.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In the past, Tungsten Graphics contracts implemented many Mesa features
|
||||
including:
|
||||
Much of the on-going work in Mesa is done through Tungsten Graphics engineering
|
||||
contracts.
|
||||
Prominent examples of this work includes:
|
||||
</p>
|
||||
<ul>
|
||||
<li>DRI drivers for Intel i965, i945, i915 and other chips
|
||||
@@ -31,13 +29,7 @@ including:
|
||||
<p>
|
||||
Other companies including
|
||||
<a href="http://www.intellinuxgraphics.org/index.html" target="_parent">Intel</a>
|
||||
and RedHat also actively contribute to the project.
|
||||
Intel has recently contributed the new GLSL compiler in Mesa 7.9.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="http://www.lunarg.com/" target="_parent">LunarG</a> can be contacted
|
||||
for custom Mesa / 3D graphics development.
|
||||
and IBM also actively contribute to the project.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -45,5 +37,15 @@ Volunteers have made significant contributions to all parts of Mesa, including
|
||||
complete device drivers.
|
||||
</p>
|
||||
|
||||
|
||||
<H1>Custom Development</H1>
|
||||
<p>
|
||||
Contact <a href="http://www.tungstengraphics.com/" target="_parent">
|
||||
Tungsten Graphics</a>
|
||||
for information about custom development in Mesa, OpenGL, X and other
|
||||
graphics technologies.
|
||||
</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -107,7 +107,7 @@ Global variables are not allowed.
|
||||
Function name examples:
|
||||
</p>
|
||||
<pre>
|
||||
glFooBar() - a public GL entry point (in glapi_dispatch.c)
|
||||
glFooBar() - a public GL entry point (in dispatch.c)
|
||||
_mesa_FooBar() - the internal immediate mode function
|
||||
save_FooBar() - retained mode (display list) function in dlist.c
|
||||
foo_bar() - a static (private) function
|
||||
|
@@ -199,7 +199,7 @@ few preprocessor defines.</p>
|
||||
<li>If <tt>GLX_USE_TLS</tt> is defined, method #4 is used.</li>
|
||||
<li>If <tt>PTHREADS</tt> is defined, method #3 is used.</li>
|
||||
<li>If any of <tt>PTHREADS</tt>,
|
||||
<tt>WIN32_THREADS</tt>, or <tt>BEOS_THREADS</tt>
|
||||
<tt>SOLARIS_THREADS</tt>, <tt>WIN32_THREADS</tt>, or <tt>BEOS_THREADS</tt>
|
||||
is defined, method #2 is used.</li>
|
||||
<li>If none of the preceeding are defined, method #1 is used.</li>
|
||||
</ul>
|
||||
@@ -244,8 +244,8 @@ isn't a significant problem.</p>
|
||||
system. There are two steps to this. The file must first be added to
|
||||
<tt>src/mesa/sources</tt>. That gets the file built and linked. The second
|
||||
step is to add the correct <tt>#ifdef</tt> magic to
|
||||
<tt>src/mesa/glapi/glapi_dispatch.c</tt> to prevent the C version of the
|
||||
dispatch functions from being built.</p>
|
||||
<tt>src/mesa/main/dispatch.c</tt> to prevent the C version of the dispatch
|
||||
functions from being built.</p>
|
||||
|
||||
<A NAME="fixedsize"/>
|
||||
<H3>3.4. Fixed-Length Dispatch Stubs</H3>
|
||||
|
308
docs/egl.html
308
docs/egl.html
@@ -1,308 +0,0 @@
|
||||
<html>
|
||||
|
||||
<title>Mesa EGL</title>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Mesa EGL</h1>
|
||||
|
||||
<p>The current version of EGL in Mesa implements EGL 1.4. More information
|
||||
about EGL can be found at
|
||||
<a href="http://www.khronos.org/egl/" target="_parent">
|
||||
http://www.khronos.org/egl/</a>.</p>
|
||||
|
||||
<p>The Mesa's implementation of EGL uses a driver architecture. The main
|
||||
library (<code>libEGL</code>) is window system neutral. It provides the EGL
|
||||
API entry points and helper functions for use by the drivers. Drivers are
|
||||
dynamically loaded by the main library and most of the EGL API calls are
|
||||
directly dispatched to the drivers.</p>
|
||||
|
||||
<p>The driver in use decides the window system to support. For drivers that
|
||||
support hardware rendering, there are usually multiple drivers supporting the
|
||||
same window system. Each one of of them supports a certain range of graphics
|
||||
cards.</p>
|
||||
|
||||
<h2>Build EGL</h2>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<p>Run <code>configure</code> with the desired state trackers and enable
|
||||
the Gallium driver for your hardware. For example</p>
|
||||
|
||||
<pre>
|
||||
$ ./configure --enable-gles-overlay --with-state-trackers=egl,vega --enable-gallium-intel
|
||||
</pre>
|
||||
|
||||
<p>The main library and OpenGL is enabled by default. The first option enables
|
||||
<a href="opengles.html">OpenGL ES 1.x and 2.x</a>. The <code>egl</code> state
|
||||
tracker is needed by a number of EGL drivers. EGL drivers will be covered
|
||||
later. The <a href="openvg.html">vega state tracker</a> provides OpenVG
|
||||
1.x.</p>
|
||||
</li>
|
||||
|
||||
<li>Build and install Mesa as usual.</li>
|
||||
</ol>
|
||||
|
||||
<p>In the given example, it will build and install <code>libEGL</code>,
|
||||
<code>libGL</code>, <code>libGLESv1_CM</code>, <code>libGLESv2</code>,
|
||||
<code>libOpenVG</code>, and one or more EGL drivers.</p>
|
||||
|
||||
<h3>Configure Options</h3>
|
||||
|
||||
<p>There are several options that control the build of EGL at configuration
|
||||
time</p>
|
||||
|
||||
<ul>
|
||||
<li><code>--enable-egl</code>
|
||||
|
||||
<p>By default, EGL is enabled. When disabled, the main library and the drivers
|
||||
will not be built.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--with-egl-driver-dir</code>
|
||||
|
||||
<p>The directory EGL drivers should be installed to. If not specified, EGL
|
||||
drivers will be installed to <code>${libdir}/egl</code>.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--with-egl-platforms</code>
|
||||
|
||||
<p>List the platforms (window systems) to support. Its argument is a comma
|
||||
seprated string such as <code>--with-egl-platforms=x11,drm</code>. It decides
|
||||
the platforms a driver may support. The first listed platform is also used by
|
||||
the main library to decide the native platform: the platform the EGL native
|
||||
types such as <code>EGLNativeDisplayType</code> or
|
||||
<code>EGLNativeWindowType</code> defined for.</p>
|
||||
|
||||
<p>The available platforms are <code>x11</code>, <code>drm</code>,
|
||||
<code>fbdev</code>, and <code>gdi</code>. The <code>gdi</code> platform can
|
||||
only be built with SCons.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--with-state-trackers</code>
|
||||
|
||||
<p>The argument is a comma separated string. It is usually used to specify the
|
||||
rendering APIs, such as OpenVG, to build. But it is also used to specify
|
||||
<code>egl</code> state tracker that <code>egl_gallium</code> depends on.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--enable-gles-overlay</code>
|
||||
|
||||
<p>OpenGL and OpenGL ES are not controlled by
|
||||
<code>--with-state-trackers</code>. OpenGL is always built. To build OpenGL
|
||||
ES, this option must be explicitly given.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>--enable-gles1</code> and <code>--enable-gles2</code>
|
||||
|
||||
<p>Unlike <code>--enable-gles-overlay</code>, which builds one library for each
|
||||
rendering API, these options enable OpenGL ES support in OpenGL. The result is
|
||||
one big library that supports multiple APIs.</p>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Use EGL</h2>
|
||||
|
||||
<h3>Demos</h3>
|
||||
|
||||
<p>There are demos for the client APIs supported by EGL. They can be found in
|
||||
mesa/demos repository.</p>
|
||||
|
||||
<h3>Environment Variables</h3>
|
||||
|
||||
<p>There are several environment variables that control the behavior of EGL at
|
||||
runtime</p>
|
||||
|
||||
<ul>
|
||||
<li><code>EGL_DRIVERS_PATH</code>
|
||||
|
||||
<p>By default, the main library will look for drivers in the directory where
|
||||
the drivers are installed to. This variable specifies a list of
|
||||
colon-separated directories where the main library will look for drivers, in
|
||||
addition to the default directory. This variable is ignored for setuid/setgid
|
||||
binaries.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>EGL_DRIVER</code>
|
||||
|
||||
<p>This variable specifies a full path to an EGL driver and it forces the
|
||||
specified EGL driver to be loaded. It comes in handy when one wants to test a
|
||||
specific driver. This variable is ignored for setuid/setgid binaries.</p>
|
||||
|
||||
<p><code>egl_gallium</code> dynamically loads hardware drivers and client API
|
||||
modules found in <code>EGL_DRIVERS_PATH</code>. Thus, specifying this variable
|
||||
alone is not sufficient for <code>egl_gallium</code> for uninstalled build.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>EGL_PLATFORM</code>
|
||||
|
||||
<p>This variable specifies the native platform. The valid values are the same
|
||||
as those for <code>--with-egl-platforms</code>. When the variable is not set,
|
||||
the main library uses the first platform listed in
|
||||
<code>--with-egl-platforms</code> as the native platform</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>EGL_LOG_LEVEL</code>
|
||||
|
||||
<p>This changes the log level of the main library and the drivers. The valid
|
||||
values are: <code>debug</code>, <code>info</code>, <code>warning</code>, and
|
||||
<code>fatal</code>.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>EGL_SOFTWARE</code>
|
||||
|
||||
<p>For drivers that support both hardware and software rendering, setting this
|
||||
variable to true forces the use of software rendering.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>EGL Drivers</h2>
|
||||
|
||||
<ul>
|
||||
<li><code>egl_gallium</code>
|
||||
|
||||
<p>This driver is based on Gallium3D. It supports all rendering APIs and
|
||||
hardwares supported by Gallium3D. It is the only driver that supports OpenVG.
|
||||
The supported platforms are X11, KMS, FBDEV, and GDI.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li><code>egl_glx</code>
|
||||
|
||||
<p>This driver provides a wrapper to GLX. It uses exclusively GLX to implement
|
||||
the EGL API. It supports both direct and indirect rendering when the GLX does.
|
||||
It is accelerated when the GLX is. As such, it cannot provide functions that
|
||||
is not available in GLX or GLX extensions.</p>
|
||||
</li>
|
||||
|
||||
<li><code>egl_dri2</code>
|
||||
|
||||
<p>This driver supports the X Window System as its window system. It functions
|
||||
as a DRI2 driver loader. Unlike <code>egl_glx</code>, it has no dependency on
|
||||
<code>libGL</code>. It talks to the X server directly using DRI2 protocol.</p>
|
||||
|
||||
</li>
|
||||
<li><code>egl_dri</code>
|
||||
|
||||
<p>This driver lacks maintenance and does <em>not</em> build. It is similiar
|
||||
to <code>egl_dri2</code> in that it functions as a DRI(1) driver loader. But
|
||||
unlike <code>egl_dri2</code>, it supports Linux framebuffer devices as its
|
||||
window system and supports EGL_MESA_screen_surface extension. As DRI1 drivers
|
||||
are phasing out, it might eventually be replaced by <code>egl_dri2</code>.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Developers</h2>
|
||||
|
||||
<p>The sources of the main library and the classic drivers can be found at
|
||||
<code>src/egl/</code>. The sources of the <code>egl</code> state tracker can
|
||||
be found at <code>src/gallium/state_trackers/egl/</code>.</p>
|
||||
|
||||
<p>The suggested way to learn to write a EGL driver is to see how other drivers
|
||||
are written. <code>egl_glx</code> should be a good reference. It works in any
|
||||
environment that has GLX support, and it is simpler than most drivers.</p>
|
||||
|
||||
<h3>Lifetime of Display Resources</h3>
|
||||
|
||||
<p>Contexts and surfaces are examples of display resources. They might live
|
||||
longer than the display that creates them.</p>
|
||||
|
||||
<p>In EGL, when a display is terminated through <code>eglTerminate</code>, all
|
||||
display resources should be destroyed. Similarly, when a thread is released
|
||||
throught <code>eglReleaseThread</code>, all current display resources should be
|
||||
released. Another way to destory or release resources is through functions
|
||||
such as <code>eglDestroySurface</code> or <code>eglMakeCurrent</code>.</p>
|
||||
|
||||
<p>When a resource that is current to some thread is destroyed, the resource
|
||||
should not be destroyed immediately. EGL requires the resource to live until
|
||||
it is no longer current. A driver usually calls
|
||||
<code>eglIs<Resource>Bound</code> to check if a resource is bound
|
||||
(current) to any thread in the destroy callbacks. If it is still bound, the
|
||||
resource is not destroyed.</p>
|
||||
|
||||
<p>The main library will mark destroyed current resources as unlinked. In a
|
||||
driver's <code>MakeCurrent</code> callback,
|
||||
<code>eglIs<Resource>Linked</code> can then be called to check if a newly
|
||||
released resource is linked to a display. If it is not, the last reference to
|
||||
the resource is removed and the driver should destroy the resource. But it
|
||||
should be careful here because <code>MakeCurrent</code> might be called with an
|
||||
uninitialized display.</p>
|
||||
|
||||
<p>This is the only mechanism provided by the main library to help manage the
|
||||
resources. The drivers are responsible to the correct behavior as defined by
|
||||
EGL.</p>
|
||||
|
||||
<h3><code>EGL_RENDER_BUFFER</code></h3>
|
||||
|
||||
<p>In EGL, the color buffer a context should try to render to is decided by the
|
||||
binding surface. It should try to render to the front buffer if the binding
|
||||
surface has <code>EGL_RENDER_BUFFER</code> set to
|
||||
<code>EGL_SINGLE_BUFFER</code>; If the same context is later bound to a
|
||||
surface with <code>EGL_RENDER_BUFFER</code> set to
|
||||
<code>EGL_BACK_BUFFER</code>, the context should try to render to the back
|
||||
buffer. However, the context is allowed to make the final decision as to which
|
||||
color buffer it wants to or is able to render to.</p>
|
||||
|
||||
<p>For pbuffer surfaces, the render buffer is always
|
||||
<code>EGL_BACK_BUFFER</code>. And for pixmap surfaces, the render buffer is
|
||||
always <code>EGL_SINGLE_BUFFER</code>. Unlike window surfaces, EGL spec
|
||||
requires their <code>EGL_RENDER_BUFFER</code> values to be honored. As a
|
||||
result, a driver should never set <code>EGL_PIXMAP_BIT</code> or
|
||||
<code>EGL_PBUFFER_BIT</code> bits of a config if the contexts created with the
|
||||
config won't be able to honor the <code>EGL_RENDER_BUFFER</code> of pixmap or
|
||||
pbuffer surfaces.</p>
|
||||
|
||||
<p>It should also be noted that pixmap and pbuffer surfaces are assumed to be
|
||||
single-buffered, in that <code>eglSwapBuffers</code> has no effect on them. It
|
||||
is desirable that a driver allocates a private color buffer for each pbuffer
|
||||
surface created. If the window system the driver supports has native pbuffers,
|
||||
or if the native pixmaps have more than one color buffers, the driver should
|
||||
carefully attach the native color buffers to the EGL surfaces, re-route them if
|
||||
required.</p>
|
||||
|
||||
<p>There is no defined behavior as to, for example, how
|
||||
<code>glDrawBuffer</code> interacts with <code>EGL_RENDER_BUFFER</code>. Right
|
||||
now, it is desired that the draw buffer in a client API be fixed for pixmap and
|
||||
pbuffer surfaces. Therefore, the driver is responsible to guarantee that the
|
||||
client API renders to the specified render buffer for pixmap and pbuffer
|
||||
surfaces.</p>
|
||||
|
||||
<h3><code>EGLDisplay</code> Mutex</h3>
|
||||
|
||||
The <code>EGLDisplay</code> will be locked before calling any of the dispatch
|
||||
functions (well, except for GetProcAddress which does not take an
|
||||
<code>EGLDisplay</code>). This guarantees that the same dispatch function will
|
||||
not be called with the sample display at the same time. If a driver has access
|
||||
to an <code>EGLDisplay</code> without going through the EGL APIs, the driver
|
||||
should as well lock the display before using it.
|
||||
|
||||
<h3>TODOs</h3>
|
||||
|
||||
<ul>
|
||||
<li>Pass the conformance tests</li>
|
||||
<li>Reference counting in main library?</li>
|
||||
<li>Mixed use of OpenGL, OpenGL ES 1.1, and OpenGL ES 2.0 is supported. But
|
||||
which one of <code>libGL.so</code>, <code>libGLESv1_CM.so</code>, and
|
||||
<code>libGLESv2.so</code> should an application link to? Bad things may happen
|
||||
when, say, an application is linked to <code>libGLESv2.so</code> and
|
||||
<code>libcairo</code>, which is linked to <code>libGL.so</code> instead.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -28,7 +28,6 @@ Setting this variable automatically sets the MESA_TEX_PROG variable as well.
|
||||
<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
|
||||
A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
|
||||
and disable the GL_EXT_bar extension.
|
||||
<li>MESA_GLSL - <a href="shading.html#envvars">shading language options</a>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
@@ -51,28 +50,5 @@ See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
|
||||
</ul>
|
||||
|
||||
|
||||
<p>
|
||||
These environment variables are for the Intel i945/i965 drivers:
|
||||
</p>
|
||||
<ul>
|
||||
<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
|
||||
OpenGL conformance. If set to 2, always use software rendering.
|
||||
<li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
|
||||
glCopyPixels, glDrawPixels.
|
||||
</ul>
|
||||
|
||||
|
||||
<p>
|
||||
These environment variables are for the Radeon R300 driver:
|
||||
</p>
|
||||
<ul>
|
||||
<li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Mesa EGL supports different sets of environment variables. See the
|
||||
<a href="egl.html">Mesa EGL</a> page for the details.
|
||||
</p>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
@@ -9,9 +9,6 @@
|
||||
<center><h1>Mesa fbdev/DRI Drivers</h1></center>
|
||||
<br>
|
||||
|
||||
<h1><center>NOTE: this information is obsolete and will be removed at
|
||||
a future date</center></h1>
|
||||
|
||||
<h1>1. Introduction</h1>
|
||||
|
||||
<p>
|
||||
@@ -25,7 +22,7 @@ Contributors to this project include Jon Smirl, Keith Whitwell and Dave Airlie.
|
||||
|
||||
<p>
|
||||
Applications in the fbdev/DRI environment use
|
||||
the MiniGLX interface to choose pixel
|
||||
the <a href="http://www.nabble.com/file/p15480666/MiniGXL.html"> MiniGLX</a> interface to choose pixel
|
||||
formats, create rendering contexts, etc. It's a subset of the GLX and
|
||||
Xlib interfaces allowing some degree of application portability between
|
||||
the X and X-less environments.
|
||||
@@ -318,7 +315,8 @@ It means that the sample_server process is not running.
|
||||
<h1>5.0 Programming Information</h1>
|
||||
|
||||
<p>
|
||||
OpenGL/Mesa is interfaced to fbdev via the MiniGLX interface.
|
||||
OpenGL/Mesa is interfaced to fbdev via the <a href="http://www.nabble.com/file/p15480666/MiniGLX.html">MiniGLX</a>
|
||||
interface.
|
||||
MiniGLX is a subset of Xlib and GLX API functions which provides just
|
||||
enough functionality to setup OpenGL rendering and respond to simple
|
||||
input events.
|
||||
@@ -334,7 +332,7 @@ This allows some degree of flexibility for software development and testing.
|
||||
However, the MiniGLX API is not binary-compatible with full Xlib/GLX.
|
||||
Some of the structures are different and some macros/functions work
|
||||
differently.
|
||||
See the GL/miniglx.h header file for details.
|
||||
See the <code>GL/miniglx.h</code> header file for details.
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -35,14 +35,14 @@
|
||||
<h3>1.1 Prerequisites for DRI and hardware acceleration</h3>
|
||||
|
||||
<p>
|
||||
The following are required for DRI-based hardware acceleration with Mesa:
|
||||
The following are required for DRI-based hardware acceleration with Mesa 7.3:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://xorg.freedesktop.org/releases/individual/proto/">dri2proto</a> version 1.99.3 or later
|
||||
<li>Linux 2.6.28
|
||||
<li><a href="http://dri.freedesktop.org/libdrm/" target="_parent">libDRM</a>
|
||||
version 2.4.15 or later
|
||||
version 2.4.3 or later
|
||||
<li>Xorg server version 1.5 or later
|
||||
</ul>
|
||||
</p>
|
||||
@@ -351,17 +351,26 @@ example linux or windows, <i>machine</i> is x86 or x86_64, optionally followed
|
||||
by -debug for debug builds.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The sample programs are built seperately. To build them do
|
||||
<pre>
|
||||
scons -C progs
|
||||
</pre>
|
||||
And the build output will be placed in progs/build/...
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do
|
||||
</p>
|
||||
<pre>
|
||||
scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
|
||||
scons -C progs platform=windows toolchain=crossmingw machine=x86 -k
|
||||
</pre>
|
||||
<p>
|
||||
This will create:
|
||||
</p>
|
||||
<ul>
|
||||
<li>build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll — Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll
|
||||
<li>build/windows-x86-debug/gallium/winsys/gdi/opengl32.dll — Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll
|
||||
<li>build/windows-x86-debug/glut/glx/glut32.dll
|
||||
<li>progs/build/windows-x86-debug/wgl/wglinfo.exe
|
||||
<li>progs/build/windows-x86-debug/trivial/tri.exe
|
||||
|
@@ -111,9 +111,11 @@ It implements the OpenGL 1.3 specification.
|
||||
|
||||
|
||||
<p>
|
||||
November 2001: I cofounded Tungsten Graphics, Inc. with Keith Whitwell,
|
||||
Jens Owen, David Dawes and Frank LaMonica.
|
||||
Tungsten Graphics was acquired by VMware in December 2008.
|
||||
November 2001: I cofound <a href="http://www.tungstengraphics.com" target="_parent">
|
||||
Tungsten Graphics, Inc.</a> with Keith Whitwell, Jens Owen, David Dawes and
|
||||
Frank LaMonica.
|
||||
I continue to develop Mesa as part of my resposibilities with Tungsten
|
||||
Graphics and as a spare-time project.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
197
docs/libGL.txt
197
docs/libGL.txt
@@ -1,197 +0,0 @@
|
||||
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
This document describes the implementation of the XFree86 4.0 libGL.so
|
||||
library defined by the Linux/OpenGL Base specification found at
|
||||
http://reality.sgi.com/opengl/linux/linuxbase.html.
|
||||
|
||||
The documentation is divided into two sections:
|
||||
User's Guide
|
||||
Driver Developer's Guide
|
||||
|
||||
Author: Brian Paul (brian@precisioninsight.com)
|
||||
Date: February 2000
|
||||
|
||||
|
||||
|
||||
User's Guide
|
||||
------------
|
||||
|
||||
Using libGL.so
|
||||
|
||||
The libGL.so library defines the gl- and glX-prefixed functions needed to
|
||||
run OpenGL programs. OpenGL client applications should link with the
|
||||
-lGL option to use it.
|
||||
|
||||
libGL.so serves two primary functions: GLX protocol generation for indirect
|
||||
rendering and loading/management of hardware drivers for direct rendering.
|
||||
|
||||
When libGL.so initializes itself it uses the DRI to determine the
|
||||
appropriate hardware driver for each screen on the local X display.
|
||||
The hardware drivers are expected to be in the /usr/X11R6/lib/modules/dri/
|
||||
directory. Drivers are named with the convention <name>_dri.so where
|
||||
<name> is a driver such as "tdfx", "i810", "gamma", etc.
|
||||
|
||||
The LIBGL_DRIVERS_DIR environment variable may be used to specify a
|
||||
different DRI modules directory, overriding /usr/X11R6/lib/modules/dri/.
|
||||
This environment variable is ignored in setuid programs for security
|
||||
reasons.
|
||||
|
||||
When libGL.so is unable to locate appropriate hardware drivers it will
|
||||
fall back to using indirect GLX rendering.
|
||||
|
||||
To aid in solving problems, libGL.so will print diagnostic messages to
|
||||
stderr if the LIBGL_DEBUG environment variable is defined.
|
||||
|
||||
libGL.so is thread safe. The overhead of thread safety for common,
|
||||
single-thread clients is negligible. However, the overhead of thread
|
||||
safety for multi-threaded clients is significant. Each GL API call
|
||||
requires two calls to pthread_get_specific() which can noticably
|
||||
impact performance. Warning: libGL.so is thread safe but individual
|
||||
DRI drivers may not be. Please consult the documentation for a driver
|
||||
to learn if it is thread safe.
|
||||
|
||||
|
||||
|
||||
Indirect Rendering
|
||||
|
||||
You can force indirect rendering mode by setting the LIBGL_ALWAYS_INDIRECT
|
||||
environment variable. Hardware acceleration will not be used.
|
||||
|
||||
|
||||
|
||||
libGL.so Extensibility
|
||||
|
||||
libGL.so is designed to be extended without upgrading. That is,
|
||||
drivers may install new OpenGL extension functions into libGL.so
|
||||
without requiring libGL.so to be replaced. Clients of libGL.so should
|
||||
use the glXGetProcAddressEXT() function to obtain the address of
|
||||
functions by name. For more details of GLX_ARB_get_proc_address see
|
||||
http://oss.sgi.com/projects/ogl-sample/registry/ARB/get_proc_address.spec
|
||||
|
||||
libGL.so is also designed with flexibility such that it may be used
|
||||
with many generations of hardware drivers to come.
|
||||
|
||||
|
||||
|
||||
|
||||
Driver Developer's Guide
|
||||
------------------------
|
||||
|
||||
This section describes the requirements to make an XFree86 4.0
|
||||
libGL.so-compatible hardware driver. It is not intended for end
|
||||
users of libGL.so.
|
||||
|
||||
|
||||
XFree86 source files
|
||||
|
||||
libGL.so is built inside XFree86 with sources found in xc/lib/GL/.
|
||||
Specifically, libGL.so is built from:
|
||||
|
||||
xc/lib/GL/glx/*.c
|
||||
xc/lib/dri/XF86dri.c
|
||||
xc/lib/dri/dri_glx.c
|
||||
xc/lib/GL/mesa/src/glapi.c
|
||||
xc/lib/GL/mesa/src/glapitemp.h
|
||||
xc/lib/GL/mesa/src/glapitable.h
|
||||
xc/lib/GL/mesa/src/glapioffsets.h
|
||||
xc/lib/GL/mesa/src/glapinoop.c
|
||||
xc/lib/GL/mesa/src/glheader.h
|
||||
xc/lib/GL/mesa/src/glthread.c
|
||||
xc/lib/GL/mesa/src/glthread.h
|
||||
xc/lib/GL/mesa/src/X86/glapi_x86.S
|
||||
xc/lib/GL/mesa/src/X86/assyntax.h
|
||||
|
||||
Understand that the mesa/src/gl*.[ch] files are not tied to Mesa. They
|
||||
have no dependencies on the rest of Mesa and are designed to be reusable
|
||||
in a number of projects.
|
||||
|
||||
The glapi_x86.X and assyntax.h files implement x86-optimized dispatch
|
||||
of GL functions. They are not required; C-based dispatch can be used
|
||||
instead, with a slight performance penalty.
|
||||
|
||||
|
||||
|
||||
Driver loading and binding
|
||||
|
||||
When libGL.so initializes itself (via the __glXInitialize function) a
|
||||
call is made to driCreateDisplay(). This function uses DRI facilities
|
||||
to determine the driver file appropriate for each screen on the local
|
||||
display. Each screen's driver is then opened with dlopen() and asked
|
||||
for its __driCreateScreen() function. The pointers to the __driCreateScreen()
|
||||
functions are kept in an array, indexed by screen number, in the
|
||||
__DRIdisplayRec struct.
|
||||
|
||||
When a driver's __driCreateScreen() function is called, it must initialize
|
||||
a __DRIscreenRec struct. This struct acts as the root of a tree of
|
||||
function pointers which are called to create and destroy contexts and
|
||||
drawables and perform all the operations needed by the GLX interface.
|
||||
See the xc/lib/GL/glx/glxclient.h file for details.
|
||||
|
||||
|
||||
|
||||
Dynamic Extension Function Registration
|
||||
|
||||
In order to provide forward compatibility with future drivers, libGL.so
|
||||
allows drivers to register new OpenGL extension functions which weren't
|
||||
known when libGL.so was built.
|
||||
|
||||
The register_extensions() function in xc/lib/GL/dri/dri_glx.c is called
|
||||
as soon as libGL.so is loaded. This is done with gcc's constructor
|
||||
attribute. This mechanism will likely have to be changed for other compilers.
|
||||
|
||||
register_extensions() loops over all local displays and screens, determines
|
||||
the DRI driver for each, and calls the driver's __driRegisterExtensions()
|
||||
function, if present.
|
||||
|
||||
The __driRegisterExtensions() function can add new entrypoints to libGL
|
||||
by calling:
|
||||
|
||||
GLboolean _glapi_add_entrypoint(const char *funcName, GLuint offset)
|
||||
|
||||
The parameters are the name of the function (such as "glFoobarEXT") and the
|
||||
offset of the dispatch slot in the API dispatch table. The return value
|
||||
indicates success (GL_TRUE) or failure (GL_FALSE).
|
||||
|
||||
_glapi_add_entrypoint() will synthesize entrypoint code in assembly
|
||||
language. Assembly languages is required since parameter passing
|
||||
can't be handled correctly using a C-based solution.
|
||||
|
||||
The address of the new entrypoint is obtained by calling the
|
||||
glXGetProcAddressARB() function.
|
||||
|
||||
The dispatch offset number MUST be a number allocated by SGI in the same
|
||||
manner in which new GL_* constants are allocated. Using an arbitrary
|
||||
offset number will result in many problems.
|
||||
|
||||
|
||||
|
||||
Dispatch Management
|
||||
|
||||
When a GL context is made current, the driver must install its dispatch
|
||||
table as the current dispatch table. This is done by calling
|
||||
|
||||
void _glapi_set_dispatch(struct _glapi_table *dispatch);
|
||||
|
||||
This will install the named dispatch table for the calling thread.
|
||||
The current dispatch table for a thread can be obtained by calling
|
||||
|
||||
struct _glapi_table *_glapi_get_dispatch(void);
|
||||
|
||||
For higher performance in the common single-thread case, the global
|
||||
variable _glapi_Dispatch will point to the current dispatch table.
|
||||
This variable will be NULL when in multi-thread mode.
|
||||
|
||||
|
||||
|
||||
Context Management
|
||||
|
||||
libGL.so uses the XFree86 xthreads package to manage a thread-specific
|
||||
current context pointer. See __glXGet/SetCurrentContext() in glext.c
|
||||
|
||||
Drivers may use the _glapi_set/get_context() functions to maintain
|
||||
a private thread-specific context pointer.
|
||||
|
@@ -13,50 +13,36 @@
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-users"
|
||||
target="_parent">mesa-users</a> - intended for end-users of Mesa and DRI
|
||||
drivers. Newbie questions are OK, but please try the general OpenGL
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-announce"
|
||||
target="_parent">mesa3d-announce</a> - announcements of new Mesa
|
||||
versions are sent to this list.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users"
|
||||
target="_parent">mesa3d-users</a> - intended for users of the Mesa and DRI.
|
||||
Newbie questions are appropriate, but please try the general OpenGL
|
||||
resources and Mesa/DRI documentation first.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev"
|
||||
target="_parent">mesa-dev</a> - for Mesa, Gallium and DRI development
|
||||
discussion. Not for beginners.
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
|
||||
target="_parent">mesa3d-dev</a> - for discussion of Mesa and Direct Rendering
|
||||
Infrastructure development. Not for beginners.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-commit"
|
||||
target="_parent">mesa-commit</a> - relays git check-in messages
|
||||
(for developers).
|
||||
In general, people should not post to this list.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-announce"
|
||||
target="_parent">mesa-announce</a> - announcements of new Mesa
|
||||
versions are sent to this list. Very low traffic.
|
||||
Note: the old mesa3d-cvs list is no longer in use.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Follow the links above for list archives.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The old Mesa lists hosted at SourceForge are no longer in use.
|
||||
The archives are still available, however:
|
||||
<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-announce" target="_parent">mesa3d-announce</a>,
|
||||
<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-users" target="_parent">mesa3d-users</a>,
|
||||
<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=mesa3d-dev" target="_parent">mesa3d-dev</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<p>For mailing lists about Direct Rendering Modules (drm) in Linux/BSD
|
||||
kernels, see the
|
||||
<a href="http://dri.freedesktop.org/wiki/MailingLists" target="_parent">
|
||||
DRI wiki</a>.
|
||||
</p>
|
||||
kernels, see <a href="http://dri.freedesktop.org/wiki/MailingLists">wiki</a>.
|
||||
|
||||
<p>
|
||||
<b>Notice</b>: You must subscribe to these lists in order to post to them.
|
||||
<b>Notice</b>: non-member posts to any of these lists will be automatically
|
||||
rejected.
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -11,65 +11,6 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>September 27, 2010</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.9.0.html">Mesa 7.9.0-rc1</a> is released. This is a
|
||||
release candidate for the 7.9 development release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>June 16, 2010</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.8.2.html">Mesa 7.8.2</a> is released. This is a bug-fix
|
||||
release collecting fixes since the 7.8.1 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>April 5, 2010</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-7.8.1.html">Mesa 7.8.1</a> is released. This is a bug-fix
|
||||
release for a few critical issues in the 7.8 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>March 28, 2010</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.7.1.html">Mesa 7.7.1</a> is released. This is a bug-fix
|
||||
release fixing issues found in the 7.7 release.
|
||||
</p>
|
||||
<p>
|
||||
Also, <a href="relnotes-7.8.html">Mesa 7.8</a> is released. This is a new
|
||||
development release.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2>December 21, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.6.1.html">Mesa 7.6.1</a> is released. This is a bug-fix
|
||||
release fixing issues found in the 7.6 release.
|
||||
</p>
|
||||
<p>
|
||||
Also, <a href="relnotes-7.7.html">Mesa 7.7</a> is released. This is a new
|
||||
development release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>September 28, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.6.html">Mesa 7.6</a> is released. This is a new feature
|
||||
release. Those especially concerned about stability may want to wait for the
|
||||
follow-on 7.6.1 bug-fix release.
|
||||
</p>
|
||||
<p>
|
||||
<a href="relnotes-7.5.2.html">Mesa 7.5.2</a> is also released.
|
||||
This is a stable release fixing bugs since the 7.5.1 release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>September 3, 2009</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.5.1.html">Mesa 7.5.1</a> is released.
|
||||
@@ -173,6 +114,9 @@ Added a new page describing the <a href="cell.html">Mesa Cell driver</a>.
|
||||
<p>
|
||||
Gallium3D is the codename for the new Mesa device driver architecture
|
||||
which is currently under development.
|
||||
A <a href="http://wiki.freedesktop.org/wiki/Software/gallium"
|
||||
target="_parent"> summary</a> of the architecture can be found on the
|
||||
Tungsten Graphics website.
|
||||
</p>
|
||||
<p>
|
||||
Gallium3D development is taking place on the <em>gallium-0.1</em> branch
|
||||
@@ -223,8 +167,11 @@ shading language and built-in functions.
|
||||
|
||||
<h2>April 2007</h2>
|
||||
<p>
|
||||
Thomas Hellström of Tungsten Graphics has written a whitepaper
|
||||
describing the new DRI memory management system</a>.
|
||||
Thomas Hellström of
|
||||
<a href="http://www.tungstengraphics.com" target="_parent">
|
||||
Tungsten Graphics</a> has written a whitepaper describing the new
|
||||
<a href="http://www.tungstengraphics.com/mm.pdf">DRI memory management
|
||||
system</a>.
|
||||
</p>
|
||||
|
||||
<h2>December 5, 2006</h2>
|
||||
@@ -1285,6 +1232,7 @@ grateful.
|
||||
<p>
|
||||
</p><h2>March 18, 1999</h2>
|
||||
<p>The new webpages are now online. Enjoy, and let me know if you find any errors.
|
||||
For an eye-candy free version you can use <a href="http://www.mesa3d.org/txt/">http://www.mesa3d.org/txt/</a>.</p>
|
||||
<p>
|
||||
</p><h2>February 16, 1999</h2>
|
||||
<p><a href="http://www.sgi.com/">SGI</a> releases its <a href="http://www.sgi.com/software/opensource/glx/">GLX
|
||||
|
@@ -1,80 +0,0 @@
|
||||
<html>
|
||||
|
||||
<title>OpenGL ES</title>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>OpenGL ES</h1>
|
||||
|
||||
<p>Mesa implements OpenGL ES 1.1 and OpenGL ES 2.0. More informations about
|
||||
OpenGL ES can be found at <a href="http://www.khronos.org/opengles/"
|
||||
target="_parent"> http://www.khronos.org/opengles/</a>.</p>
|
||||
|
||||
<p>OpenGL ES depends on a working EGL implementation. Please refer to
|
||||
<a href="egl.html">Mesa EGL</a> for more information about EGL.</p>
|
||||
|
||||
<h2>Build the Libraries</h2>
|
||||
<ol>
|
||||
<li>Run <code>configure</code> with <code>--enable-gles-overlay</code> and enable the Gallium driver for your hardware.</li>
|
||||
<li>Build and install Mesa as usual.</li>
|
||||
</ol>
|
||||
|
||||
Alternatively, if XCB-DRI2 is installed on the system, one can use
|
||||
<code>egl_dri2</code> EGL driver with OpenGL|ES-enabled DRI drivers
|
||||
|
||||
<ol>
|
||||
<li>Run <code>configure</code> with <code>--enable-gles1 --enable-gles2</code>.</li>
|
||||
<li>Build and install Mesa as usual.</li>
|
||||
</ol>
|
||||
|
||||
<p>Both methods will install libGLESv1_CM, libGLESv2, libEGL, and one or more
|
||||
EGL drivers for your hardware.</p>
|
||||
|
||||
<h2>Run the Demos</h2>
|
||||
|
||||
<p>There are some demos in <code>progs/egl/</code>. You can use them to test
|
||||
your build. For example,</p>
|
||||
|
||||
<pre>
|
||||
$ cd progs/egl/eglut
|
||||
$ make
|
||||
$ cd ../opengles1
|
||||
$ make
|
||||
$ ./torus_x11
|
||||
</pre>
|
||||
|
||||
<h2>Developers</h2>
|
||||
|
||||
<h3>Internal Libraries</h3>
|
||||
|
||||
<table border="1" style="text-align: center;">
|
||||
<tr><td>Library Name</td><td>Used By</td><td>Enabled</td><td>OpenGL</td><td>OpenGL ES 1.x</td><td>OpenGL ES 2.x</td></tr>
|
||||
<tr><td><code>libmesa.a</td><td>Classic DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
|
||||
<tr><td><code>libmesagallium.a</td><td>Gallium EGL and DRI drivers</td><td>y</td><td>y</td><td>--enable-gles1</td><td>--enable-gles2</td></tr>
|
||||
<tr><td><code>libes1gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>y</td><td>n</td></tr>
|
||||
<tr><td><code>libes2gallium.a</td><td>Gallium EGL drivers</td><td>--enable-gles-overlay</td><td>n</td><td>n</td><td>y</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>Dispatch Table</h3>
|
||||
|
||||
<p>OpenGL ES has an additional indirection when dispatching fucntions</p>
|
||||
|
||||
<pre>
|
||||
Mesa: glFoo() --> _mesa_Foo()
|
||||
OpenGL ES: glFoo() --> _es_Foo() --> _mesa_Foo()
|
||||
</pre>
|
||||
|
||||
<p>The indirection serves several purposes</p>
|
||||
|
||||
<ul>
|
||||
<li>When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.</li>
|
||||
<li>When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.</li>
|
||||
<li>When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.</li>
|
||||
</ul>
|
||||
|
||||
<p>Other than the last case, OpenGL ES uses <code>APIspec.xml</code> to generate functions to check and/or converts the arguments.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>OpenVG State Tracker</TITLE>
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
@@ -20,13 +20,12 @@ http://www.khronos.org/openvg/</a> .
|
||||
</p>
|
||||
<p>
|
||||
The OpenVG state tracker depends on the Gallium architecture and a working EGL implementation.
|
||||
Please refer to <a href="egl.html">Mesa EGL</a> for more information about EGL.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Building the library</h2>
|
||||
<ol>
|
||||
<li>Build Mesa3D with Gallium3D. Any build that builds Gallium3D libraries, EGL, and Gallium EGL drivers will suffice</li>
|
||||
<li>Build Mesa3D with Gallium3D. Any build that builds Gallium3D libraries and EGL will suffice</li>
|
||||
<li>cd src/gallium/state_trackers/vega; make</li>
|
||||
<li>The last step will build libOpenVG library. You can add the libdir to LD_LIBRARY_PATH or install libOpenVG</li>
|
||||
</ol>
|
||||
@@ -34,9 +33,12 @@ Please refer to <a href="egl.html">Mesa EGL</a> for more information about EGL.
|
||||
<h3>Sample build</h3>
|
||||
A sample build looks as follows:
|
||||
<pre>
|
||||
$ ./configure --with-state-trackers=egl,vega --enable-gallium-intel
|
||||
$ make
|
||||
$ make install
|
||||
make linux-x86-64-debug
|
||||
cd src/gallium/state_trackers/vega
|
||||
make
|
||||
cd ../../../..
|
||||
export LD_LIBRARY_PATH=$PWD/lib64
|
||||
export EGL_DRIVER="egl_softpipe"
|
||||
</pre>
|
||||
|
||||
<h2>OpenVG Demos</h2>
|
||||
@@ -57,5 +59,10 @@ To run a demo:
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>Notes</h2>
|
||||
<ul>
|
||||
<li>EGL_DRIVER environmental variable: forces usage of a specific EGL driver. Unless you force egl_softpipe the implementation will look for a DRI hardware accelerate driver and unless you have a Gallium driver that supports it, you'll see crashes</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -26,7 +26,7 @@ more information about the API functions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There are several examples of OSMesa in the <code>progs/osdemos/</code>
|
||||
There are several examples of OSMesa in the <code>progs/osdemo/</code>
|
||||
directory.
|
||||
</p>
|
||||
|
||||
|
54
docs/pbuffers.html
Normal file
54
docs/pbuffers.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>PBuffer Rendering</TITLE>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<H1>PBuffer Rendering</H1>
|
||||
|
||||
<p>
|
||||
Basically, FBconfigs and PBuffers allow you to do off-screen rendering
|
||||
with OpenGL. The OSMesa interface does basically the same thing, but
|
||||
fbconfigs and pbuffers are supported by more vendors.
|
||||
PBuffer rendering may also be hardware accelerated.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
PBuffers are getting more use nowadays, though they've actually been
|
||||
around for a long time on IRIX systems and other workstations.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The
|
||||
<a href="http://oss.sgi.com/projects/ogl-sample/registry/SGIX/fbconfig.txt"
|
||||
target="_parent">GL_SGIX_fbconfig</a>
|
||||
and
|
||||
<a href="http://oss.sgi.com/projects/ogl-sample/registry/SGIX/pbuffer.txt"
|
||||
target="_parent">
|
||||
GL_SGIX_pbuffer</a> extensions describe the functionality.
|
||||
More recently, these extensions have been promoted to ARB extensions (on
|
||||
Windows at least).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Mesa/progs/xdemos/ directory has some useful code for working
|
||||
with pbuffers:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><b>pbinfo.c</b> - like glxinfo, it prints a list of available
|
||||
fbconfigs and whether each supports pbuffers.
|
||||
<li><b>pbutil.c</b> - a few utility functions for dealing with
|
||||
fbconfigs and pbuffers.
|
||||
<li><b>pbdemo.c</b> - a demonstration of off-screen rendering with pbuffers.
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Mesa 4.1 and later support GL_SGIX_fbconfig and GL_SGIX_pbuffer (software
|
||||
rendering only).
|
||||
</p>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.5.2 Release Notes, 28 September 2009</H1>
|
||||
<H1>Mesa 7.5.2 Release Notes, (date tbd)</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.5.2 is a bug-fix release fixing issues found since the 7.5.1 release.
|
||||
@@ -31,15 +31,7 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
43a90191dd9f76cd65dcc1ac91f3be70 MesaLib-7.5.2.tar.gz
|
||||
94e47a499f1226803869c2e37a6a8e3a MesaLib-7.5.2.tar.bz2
|
||||
1ecb822b567ad67a0617361d45206b67 MesaLib-7.5.2.zip
|
||||
2718fdce7e075911d6147beb8f27104b MesaDemos-7.5.2.tar.gz
|
||||
4e0f5ccd58afe21eddcd94327d926e86 MesaDemos-7.5.2.tar.bz2
|
||||
f621f8c223b278d7c8e49a012d56ca25 MesaDemos-7.5.2.zip
|
||||
83c16c1d6bcfcc3f97aab5d2fe430b4c MesaGLUT-7.5.2.tar.gz
|
||||
e5d03bedae369ea3705783573bb33813 MesaGLUT-7.5.2.tar.bz2
|
||||
e82ba28e00d653e6f437d32be8ca8481 MesaGLUT-7.5.2.zip
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -53,15 +45,8 @@ e82ba28e00d653e6f437d32be8ca8481 MesaGLUT-7.5.2.zip
|
||||
<ul>
|
||||
<li>Assorted bug fixes for i965/i945 drivers
|
||||
<li>Fixed Gallium glDrawPixels(GL_STENCIL_INDEX) failure.
|
||||
<li>Fixed GLSL linker/preprocessor version directive issue seen in Wine
|
||||
(such as bug 23946)
|
||||
<li>glUseProgram() is now compiled into display lists (bug 23746).
|
||||
<li>glUniform functions are now compiled into display lists
|
||||
<li>Auto mipmap generation didn't work reliably with Gallium.
|
||||
<li>Fixed random number usage in GLX code.
|
||||
<li>Fixed invalid GL_OUT_OF_MEMORY error sometimes raised by glTexSubImage2D
|
||||
when using Gallium.
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,80 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.6.1 Release Notes, 21 December 2009</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.6.1 is a bug-fix release fixing issues since version 7.6.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.6.1 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
e80fabad2e3eb7990adae773d6aeacba MesaLib-7.6.1.tar.gz
|
||||
7db4617e9e10ad3aca1b64339fd71b7d MesaLib-7.6.1.tar.bz2
|
||||
dd3275dbf9833480d2e92d0c69b22abd MesaLib-7.6.1.zip
|
||||
f7fdcfe3c0f363e571c60f02f74368fb MesaDemos-7.6.1.tar.gz
|
||||
a4226f06732a02556fcf6be290b86dff MesaDemos-7.6.1.tar.bz2
|
||||
849425f356bd940726cebedfa79de176 MesaDemos-7.6.1.zip
|
||||
d40cc7c5e337a85b674e27a8e494f52f MesaGLUT-7.6.1.tar.gz
|
||||
ca9aecb91f05b1da9fd7d5eeb19d47d7 MesaGLUT-7.6.1.tar.bz2
|
||||
23fad8398004c977a1d8953079b72ca6 MesaGLUT-7.6.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>Upgraded GL/glext.h to version 56, GL/glxext.h to version 25,
|
||||
GL/wglext.h to version 17
|
||||
<li>New 3D driver, r600, for Radeon R6xx, R7xx hardware
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fixed crash caused by glXCopyContext() and glXDestroyContext(), bug 24217
|
||||
<li>glXQueryContext(GLX_RENDER_TYPE) returned wrong values (bug 24211)
|
||||
<li>GLSL sqrt(0) returned unpredictable results
|
||||
<li>Fixed default texture binding bug when a bound texture was deleted.
|
||||
<li>r300: Work around an issue with very large fragment programs on R500.
|
||||
<li>Fake glXQueryDrawable() didn't return good values (bug 24320)
|
||||
<li>Fixed AUX buffer breakage (bug 24426).
|
||||
<li>Fixed locale-dependent float parsing bug in GLSL compiler (bug 24531)
|
||||
<li>Fixed Gallium Cell driver compilation failure.
|
||||
<li>Fixed glGetTexLevelParameter(GL_TEXTURE_INTERNAL_FORMAT) query so that
|
||||
it returns the actual compressed format chosen.
|
||||
<li>Fixed glBitmap bugs in Intel drivers.
|
||||
<li>Fixed a number of Microsoft Visual Studio compilation problems.
|
||||
<li>Fixed clipping / provoking vertex bugs in i965 driver.
|
||||
<li>Assorted build fixes for AIX.
|
||||
<li>Endianness fixes for the DRI swrast driver (bug 22767).</li>
|
||||
<li>Point sprite fixes for i915/945 driver.
|
||||
<li>Fixed assorted memory leaks (usually on error paths)
|
||||
<li>Fixed some GLSL compiler bugs (ex: 25579)
|
||||
<li>Assorted build fixes for BlueGene
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Removed old VC6, VC7 project files for Windows
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.6 Release Notes, 28 September 2009</H1>
|
||||
<H1>Mesa 7.6 Release Notes / date TBD</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.6 is a new development release.
|
||||
@@ -28,15 +28,7 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
5ffa7d7abf8973f57a1bc4f813e6dade MesaLib-7.6.tar.gz
|
||||
8c75f90cd0303cfac9e4b6d54f6759ca MesaLib-7.6.tar.bz2
|
||||
27fcfd69708599c978cb34ba5cd363e1 MesaLib-7.6.zip
|
||||
e7befb3ae604f591806194a4da445628 MesaDemos-7.6.tar.gz
|
||||
0ede7adf217951acd90dbe4551210c07 MesaDemos-7.6.tar.bz2
|
||||
ed9298409cf6613bc0964525ca4afc8a MesaDemos-7.6.zip
|
||||
666955668e44ff14acf7d15dc78407d3 MesaGLUT-7.6.tar.gz
|
||||
b8b59706f827d18d1b784a0ff98b4dc2 MesaGLUT-7.6.tar.bz2
|
||||
c49c19c2bbef4f3b7f1389974dff25f4 MesaGLUT-7.6.zip
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -58,8 +50,6 @@ This was written by Zack Rusin at Tungsten Graphics.
|
||||
<li>Rewritten radeon/r200/r300 driver using a buffer manager
|
||||
<li>radeon/r200/r300 GL_EXT_framebuffer_object support when used with
|
||||
kernel memory manager
|
||||
<li>radeon/r200/r300 support for GL_ARB_occlusion_query</li>
|
||||
<li>r300 driver supports OpenGL 1.5</li>
|
||||
<li>r300 driver support for GL_EXT_vertex_array_bgra, GL_EXT_texture_sRGB
|
||||
<li>i915/945 driver support for GL_ARB_point_sprite, GL_EXT_stencil_two_side
|
||||
and GL_ATI_separate_stencil extensions
|
||||
@@ -67,10 +57,6 @@ This was written by Zack Rusin at Tungsten Graphics.
|
||||
GL_ARB_fragment_program.</li>
|
||||
<li>Added configure --with-max-width=W, --with-max-height=H options to specify
|
||||
max framebuffer, viewport size.
|
||||
<li>Initial version of Gallium llvmpipe driver. This is a new driver based
|
||||
on LLVM which makes exensive use of run-time code generation. This is
|
||||
an "alpha" stage driver. See the src/gallium/drivers/llvmpipe/README
|
||||
file for more information.
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -80,5 +66,10 @@ This was written by Zack Rusin at Tungsten Graphics.
|
||||
buffers (GLSL uniforms)
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,60 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.7.1 Release Notes / March 28, 2010</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.7.1 is a bug-fix release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.7.1 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
3ab0638cfa7ce8157337a229cf0db2c4 MesaLib-7.7.1.tar.gz
|
||||
46664d99e03f1e3ac078a7fea02af115 MesaLib-7.7.1.tar.bz2
|
||||
4e73ba8abb59aff79485eb95d7cefff7 MesaLib-7.7.1.zip
|
||||
bf1b108983995f7a712cf3343df1c918 MesaDemos-7.7.1.tar.gz
|
||||
aeb39645d80d656e0adebaa09e5bcd03 MesaDemos-7.7.1.tar.bz2
|
||||
01c49b7454fd292244eaf8bdc6ed8cf0 MesaDemos-7.7.1.zip
|
||||
37ec6386693dcb6dc770d1efd63a7a93 MesaGLUT-7.7.1.tar.gz
|
||||
1e16c85282f843791a21f7bc7b6a1ca8 MesaGLUT-7.7.1.tar.bz2
|
||||
d352c9e36a8e4d1059f4abc017b131e0 MesaGLUT-7.7.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Assorted fixes to VMware SVGA gallium driver.
|
||||
<li>Fixed broken blending to multiple color buffers in swrast driver.
|
||||
<li>Allocate constants more tightly in GL_ARB_vertex/fragment parser.
|
||||
<li>Fixed mipmap generation bug caused by invalid viewport state.
|
||||
<li>Gallium SSE codegen for XPD didn't always work.
|
||||
<li>Fixed Windows build.
|
||||
<li>Fixed broken glMultiDrawElements().
|
||||
<li>Silence bogus GL errors generated in glxinfo.
|
||||
<li>Fixed several render to texture bugs.
|
||||
<li>Assorted bug fixes in Mesa/Gallium state tracker including
|
||||
glCopy/DrawPixels() to FBOs.
|
||||
<li>Assorted fixes to Gallium drivers.
|
||||
<li>Fixed broken glPush/PopClientAttrib() for vertex arrays in GLX code.
|
||||
</ul>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.7 Release Notes / 21 December 2009</H1>
|
||||
<H1>Mesa 7.7 Release Notes / date TBD</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.7 is a new development release.
|
||||
@@ -28,42 +28,25 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
395c9516edf1ad54b0934d8db15557bf MesaLib-7.7.tar.gz
|
||||
e3fa64a1508bc23dd9de9dd2cea7cfb1 MesaLib-7.7.tar.bz2
|
||||
e54903eb5e49c3969821fa16b32da245 MesaLib-7.7.zip
|
||||
53b5b6f78e55de170d43c98cb6aaab7e MesaDemos-7.7.tar.gz
|
||||
6fd616b27b9826d0faa23e08e05d9435 MesaDemos-7.7.tar.bz2
|
||||
240fe06159ad73d5e22c27033b66c80a MesaDemos-7.7.zip
|
||||
9fe11a904b2a9d8cd06cc52bc330b716 MesaGLUT-7.7.tar.gz
|
||||
e8dceed05a59a2d3c2619d7d734587e3 MesaGLUT-7.7.tar.bz2
|
||||
96af041d435349ee23ead4667ec36363 MesaGLUT-7.7.zip
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>VMware "SVGA" Gallium driver. This is a Gallium3D driver which targets the
|
||||
VMware virtual graphics device. It allows Linux OpenGL guest applications
|
||||
to utilize the 3D graphics hardware of the host operating system.
|
||||
<li>GL_ARB_draw_elements_base_vertex (supported in Intel i965 and software drivers)</li>
|
||||
<li>GL_ARB_depth_clamp (supported in Intel i965 DRI and software drivers)</li>
|
||||
<li>GL_NV_depth_clamp (supported in Intel i965 DRI and software drivers)</li>
|
||||
<li>GL_ARB_provoking_vertex (same as GL_EXT_provoking_vertex)</li>
|
||||
<li>Wavefront .obj file loader/viewer demo (progs/demos/objviewer)
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Many assorted i965 driver fixes.
|
||||
<li>Many r300-gallium driver fixes; this driver is now considered unstable-quality instead of experimental-quality.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>New Mesa texture/surface format infrastructure
|
||||
<li>Removed some unused Mesa device driver hooks
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
@@ -1,62 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8.1 Release Notes / April, 5, 2010</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8.1 fixes a couple critical bugs in the recent Mesa 7.8 release. Even
|
||||
though this is a bug fix release, given its proximity to the 7.8 release, a
|
||||
new development release, it should also be considered new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release, such as 7.7.1, or wait for Mesa 7.8.2.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.8.1 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
62e8e47cbd63741b4bbe634dcdc8a56a MesaLib-7.8.1.tar.gz
|
||||
25ec15f8e41fde6d206118cc786dbac4 MesaLib-7.8.1.tar.bz2
|
||||
22b1153010ffdf513836ea9931159e80 MesaLib-7.8.1.zip
|
||||
c9c0a830923d3820807a08c09d521b3e MesaDemos-7.8.1.tar.gz
|
||||
9ef47f911869657c6bf2f43ebce86b61 MesaDemos-7.8.1.tar.bz2
|
||||
93720605eb3f784f9bcc289a4dd2ff52 MesaDemos-7.8.1.zip
|
||||
ed1d0b1e960afe6a3768eab747cbdbd3 MesaGLUT-7.8.1.tar.gz
|
||||
6bae516a44c6d26ff3152c960ab648e7 MesaGLUT-7.8.1.tar.bz2
|
||||
ba306f603ea73c30ee0e7efa14dc5581 MesaGLUT-7.8.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fix incorrect enums for GLX_INTEL_swap_event by updating glxext.h to
|
||||
version 27 from OpenGL.org.</li>
|
||||
<li>Fix compilation errors on non-GLX_DIRECT_RENDERING builds.</li>
|
||||
<li>Various fixes for building Mesa on OS X.</li>
|
||||
<li>Pass GLX drawable ID to dri2InvalidateBuffers. Fixes bug #27190.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>None.</p>
|
||||
</body>
|
||||
</html>
|
@@ -1,53 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8.2 Release Notes / (date tbd)</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8.2 is a bug fix release which fixes bugs found since the 7.8.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.8.2 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
tbd
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None.</p>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Upgraded glext.h to version 61, and upgraded glxext.h
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT).
|
||||
<li>Fixed Gallium Cell driver to buildable, runable state
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>None.</p>
|
||||
</body>
|
||||
</html>
|
@@ -1,70 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.8 Release Notes / March 28, 2010</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.8 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release or wait for Mesa 7.8.1.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.8 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
5fcfde5383eccb3e9fd665f08a0ea59b MesaLib-7.8.tar.gz
|
||||
85cb891eecb89aae4fdd3499cccd934b MesaLib-7.8.tar.bz2
|
||||
754f39593006effc1c8ec3c27c2f1296 MesaLib-7.8.zip
|
||||
c3869c29fa6c3dbdd763f7428d271e12 MesaDemos-7.8.tar.gz
|
||||
9fe8ec184c7f78691e43c4c0a7f97d56 MesaDemos-7.8.tar.bz2
|
||||
063a96947f7b83d4ad789c6cf291b184 MesaDemos-7.8.zip
|
||||
5f4246756b7daaddb4fb3f970cad1e28 MesaGLUT-7.8.tar.gz
|
||||
ca7048a4aa7a437dcc84cc2c7d731336 MesaGLUT-7.8.tar.bz2
|
||||
b54581aeb79b585b158d6a32f94feff2 MesaGLUT-7.8.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>GL_NV_conditional_render extension (swrast driver only)
|
||||
<li>GL_EXT_draw_buffers2 extension (swrast and i965 driver only)
|
||||
<li>GL_ARB_fragment_coord_conventions extension (for swrast, i965, and Gallium drivers)
|
||||
<li>GL_EXT_texture_array extension (swrast driver only)
|
||||
<li>GL_APPLE_object_purgeable extension (swrast and i945/i965 DRI drivers)
|
||||
<li>Much improved support for <a href="egl.html">EGL in Mesa</a>
|
||||
<li>New state trackers for <a href="opengles.html">OpenGL ES 1.1 and 2.0</a>
|
||||
<li>Dedicated documentation for Gallium
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Massive improvements to the Gallium driver for R300-R500 Radeons; this
|
||||
driver is now moderately stable but not terribly performant.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Removed support for color-index rendering</li>
|
||||
<li>Removed support for GCC versions earlier than 3.3.0.</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -1,68 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.9 Release Notes / date TBD</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.9 is a new development release.
|
||||
People who are concerned with stability and reliability should stick
|
||||
with a previous release or wait for Mesa 7.9.1.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 7.9 implements the OpenGL 2.1 API, but the version reported by
|
||||
glGetString(GL_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 2.1.
|
||||
</p>
|
||||
<p>
|
||||
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
|
||||
for DRI hardware acceleration.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
f1f01a7baec255f13e9468fb4b05922a MesaLib-7.9-rc1.tar.gz
|
||||
7ffbda3b7056c60b8f87e3082d853af1 MesaLib-7.9-rc1.tar.bz2
|
||||
9d4650df4e5b530178d6fde840f76664 MesaLib-7.9-rc1.zip
|
||||
a81c2e7a0c7832e67c768d6f209f2c8f MesaGLUT-7.9-rc1.tar.gz
|
||||
b4c1c2f0b47a07be10fa2dd42e6a63d7 MesaGLUT-7.9-rc1.tar.bz2
|
||||
c9dd7419a19bcb24a1fe556ec2e78451 MesaGLUT-7.9-rc1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>New, improved GLSL compiler written by Intel.
|
||||
See the <a href="shading.html"> Shading Language</a> page for
|
||||
more information.
|
||||
<li>GL_EXT_timer_query extension (i965 driver only)
|
||||
<li>GL_EXT_framebuffer_multisample extension (intel drivers, MAX_SAMPLES = 1)
|
||||
<li>GL_ARB_texture_swizzle extension (alias of GL_EXT_texture_swizzle)
|
||||
<li>GL_ARB_draw_elements_base_vertex, GL_ARB_fragment_program_shadow
|
||||
and GL_EXT_draw_buffers2 in Gallium drivers
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>The Mesa demo/test programs have been moved into a separate git
|
||||
repository.
|
||||
<li>GL/glext.h file upgraded to version 64
|
||||
<li>GL/glxext.h file upgraded to version 32
|
||||
<li>GL/wglext.h file upgraded to version 22
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -13,13 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-7.9.html">7.9 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.2.html">7.8.2 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.1.html">7.8.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.8.html">7.8 release notes</A>
|
||||
<LI><A HREF="relnotes-7.7.1.html">7.7.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.7.html">7.7 release notes</A>
|
||||
<LI><A HREF="relnotes-7.6.1.html">7.6.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.6.html">7.6 release notes</A>
|
||||
<LI><A HREF="relnotes-7.5.2.html">7.5.2 release notes</A>
|
||||
<LI><A HREF="relnotes-7.5.1.html">7.5.1 release notes</A>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Code Repository</TITLE>
|
||||
<TITLE>Cocd Repository</TITLE>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
@@ -9,8 +9,11 @@
|
||||
<h1>Code Repository</h1>
|
||||
|
||||
<p>
|
||||
Mesa uses <a href="http://git.or.cz/"target="_parent">git</a>
|
||||
As of December 5, 2006, Mesa is using
|
||||
<a href="http://git.or.cz/"target="_parent">git</a>
|
||||
as its source code management system.
|
||||
CVS was used previously.
|
||||
The old CVS repository should no longer be used.
|
||||
</p>
|
||||
|
||||
The master git repository is hosted on
|
||||
@@ -27,9 +30,7 @@ You may access the repository either as an
|
||||
<p>
|
||||
You may also
|
||||
<a href="http://gitweb.freedesktop.org/?p=mesa/mesa.git"
|
||||
target="_parent">browse the main Mesa git repository</a> and the
|
||||
<a href="http://cgit.freedesktop.org/mesa/demos"
|
||||
target="_parent">Mesa demos and tests git repository</a>.
|
||||
target="_parent">browse the git repository</a>.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -50,10 +51,6 @@ To get the Mesa sources anonymously (read-only):
|
||||
<pre>
|
||||
git pull origin
|
||||
</pre>
|
||||
<li>If you also want the Mesa demos/tests repository:
|
||||
<pre>
|
||||
git clone git://anongit.freedesktop.org/git/mesa/demos
|
||||
</pre>
|
||||
</ol>
|
||||
|
||||
|
||||
@@ -85,10 +82,6 @@ Once your account is established:
|
||||
<pre>
|
||||
git pull origin
|
||||
</pre>
|
||||
<li>If you also want the Mesa demos/tests repository:
|
||||
<pre>
|
||||
git clone git+ssh://username@git.freedesktop.org/git/mesa/demos
|
||||
</pre>
|
||||
</ol>
|
||||
|
||||
|
||||
@@ -132,83 +125,6 @@ Questions about branch status/activity should be posted to the
|
||||
mesa3d-dev mailing list.
|
||||
</p>
|
||||
|
||||
<H2>Developer Git Tips</H2>
|
||||
|
||||
<ol>
|
||||
<li>Setting up to edit the master branch
|
||||
<p>
|
||||
If you try to do a pull by just saying<code> git pull </code>
|
||||
and git complains that you have not specified a
|
||||
branch, try:
|
||||
<pre>
|
||||
git config branch.master.remote origin
|
||||
git config branch.master.merge master
|
||||
</pre>
|
||||
Otherwise, you have to say<code> git pull origin master </code>
|
||||
each time you do a pull.
|
||||
</p>
|
||||
<li>Small changes to master
|
||||
<p>
|
||||
If you are an experienced git user working on substancial modifications,
|
||||
you are probably
|
||||
working on a separate branch and would rebase your branch prior to
|
||||
merging with master.
|
||||
But for small changes to the master branch itself,
|
||||
you also need to use the rebase feature in order to avoid an
|
||||
unnecessary and distracting branch in master.
|
||||
</p>
|
||||
<p>
|
||||
If it has been awhile since you've done the initial clone, try
|
||||
<pre>
|
||||
git pull
|
||||
</pre>
|
||||
to get the latest files before you start working.
|
||||
</p>
|
||||
<p>
|
||||
Make your changes and use
|
||||
<pre>
|
||||
git add <files to commit>
|
||||
git commit
|
||||
</pre>
|
||||
to get your changes ready to push back into the fd.o repository.
|
||||
</p>
|
||||
<p>
|
||||
It is possible (and likely) that someone has changed master since
|
||||
you did your last pull. Even if your changes do not conflict with
|
||||
their changes, git will make a fast-forward
|
||||
merge branch, branching from the point in time
|
||||
where you did your last pull and merging it to a point after the other changes.
|
||||
</p>
|
||||
<p>
|
||||
To avoid this,
|
||||
<pre>
|
||||
git pull --rebase
|
||||
git push
|
||||
</pre>
|
||||
If you are familiar with CVS or similar system, this is similar to doing a
|
||||
<code> cvs update </code> in order to update your source tree to
|
||||
the current repository state, instead of the time you did the last update.
|
||||
(CVS doesn't work like git in this respect, but this is easiest way
|
||||
to explain it.)
|
||||
</br>
|
||||
In any case, your repository now looks like you made your changes after
|
||||
all the other changes.
|
||||
</p>
|
||||
<p>
|
||||
If the rebase resulted in conflicts or changes that could affect
|
||||
the proper operation of your changes, you'll need to investigate
|
||||
those before doing the push.
|
||||
</p>
|
||||
<p>
|
||||
If you want the rebase action to be the default action, then
|
||||
<pre>
|
||||
git config branch.master.rebase true
|
||||
git config --global branch.autosetuprebase=always
|
||||
</pre>
|
||||
<p>
|
||||
See <a href="http://www.eecs.harvard.edu/~cduan/technical/git/" target="_parent">Understanding Git Conceptually</a> for a fairly clear explanation about all of this.
|
||||
</p>
|
||||
</ol>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -14,6 +14,10 @@ This page describes the features and status of Mesa's support for the
|
||||
OpenGL Shading Language</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Last updated on 15 December 2008.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Contents
|
||||
</p>
|
||||
@@ -35,23 +39,16 @@ Contents
|
||||
|
||||
<p>
|
||||
The <b>MESA_GLSL</b> environment variable can be set to a comma-separated
|
||||
list of keywords to control some aspects of the GLSL compiler and shader
|
||||
execution. These are generally used for debugging.
|
||||
list of keywords to control some aspects of the GLSL compiler:
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>dump</b> - print GLSL shader code to stdout at link time
|
||||
<li><b>log</b> - log all GLSL shaders to files.
|
||||
<li>dump - print GLSL shader code to stdout at link time
|
||||
<li>log - log all GLSL shaders to files.
|
||||
The filenames will be "shader_X.vert" or "shader_X.frag" where X
|
||||
the shader ID.
|
||||
<li><b>nopt</b> - disable compiler optimizations
|
||||
<li><b>opt</b> - force compiler optimizations
|
||||
<li><b>uniform</b> - print message to stdout when glUniform is called
|
||||
<li><b>nopvert</b> - force vertex shaders to be a simple shader that just transforms
|
||||
the vertex position with ftransform() and passes through the color and
|
||||
texcoord[0] attributes.
|
||||
<li><b>nopfrag</b> - force fragment shader to be a simple shader that passes
|
||||
through the color attribute.
|
||||
<li><b>useprog</b> - log glUseProgram calls to stderr
|
||||
<li>nopt - disable compiler optimizations
|
||||
<li>opt - force compiler optimizations
|
||||
<li>uniform - print message to stdout when glUniform is called
|
||||
</ul>
|
||||
<p>
|
||||
Example: export MESA_GLSL=dump,nopt
|
||||
@@ -59,28 +56,30 @@ Example: export MESA_GLSL=dump,nopt
|
||||
|
||||
|
||||
<a name="120">
|
||||
<h2>GLSL Version</h2>
|
||||
<h2>GLSL 1.20 support</h2>
|
||||
|
||||
<p>
|
||||
The GLSL compiler currently supports version 1.20 of the shading language.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Several GLSL extensions are also supported:
|
||||
</p>
|
||||
GLSL version 1.20 is supported in Mesa 7.3 and later.
|
||||
Among the features/differences of GLSL 1.20 are:
|
||||
<ul>
|
||||
<li>GL_ARB_draw_buffers
|
||||
<li>GL_ARB_texture_rectangle
|
||||
<li>GL_ARB_fragment_coord_conventions
|
||||
<li>GL_EXT_texture_array
|
||||
<li><code>mat2x3, mat2x4</code>, etc. types and functions
|
||||
<li><code>transpose(), outerProduct(), matrixCompMult()</code> functions
|
||||
(but untested)
|
||||
<li>precision qualifiers (lowp, mediump, highp)
|
||||
<li><code>invariant</code> qualifier
|
||||
<li><code>array.length()</code> method
|
||||
<li><code>float[5] a;</code> array syntax
|
||||
<li><code>centroid</code> qualifier
|
||||
<li>unsized array constructors
|
||||
<li>initializers for uniforms
|
||||
<li>const initializers calling built-in functions
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<a name="unsup">
|
||||
<h2>Unsupported Features</h2>
|
||||
|
||||
<p>XXX update this section</p>
|
||||
|
||||
<p>
|
||||
The following features of the shading language are not yet fully supported
|
||||
in Mesa:
|
||||
@@ -128,6 +127,39 @@ These issues will be addressed/resolved in the future.
|
||||
<h2>Programming Hints</h2>
|
||||
|
||||
<ul>
|
||||
<li>Declare <em>in</em> function parameters as <em>const</em> whenever possible.
|
||||
This improves the efficiency of function inlining.
|
||||
</li>
|
||||
<br>
|
||||
<li>To reduce register usage, declare variables within smaller scopes.
|
||||
For example, the following code:
|
||||
<pre>
|
||||
void main()
|
||||
{
|
||||
vec4 a1, a2, b1, b2;
|
||||
gl_Position = expression using a1, a2.
|
||||
gl_Color = expression using b1, b2;
|
||||
}
|
||||
</pre>
|
||||
Can be rewritten as follows to use half as many registers:
|
||||
<pre>
|
||||
void main()
|
||||
{
|
||||
{
|
||||
vec4 a1, a2;
|
||||
gl_Position = expression using a1, a2.
|
||||
}
|
||||
{
|
||||
vec4 b1, b2;
|
||||
gl_Color = expression using b1, b2;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
Alternately, rather than using several float variables, use
|
||||
a vec4 instead. Use swizzling and writemasks to access the
|
||||
components of the vec4 as floats.
|
||||
</li>
|
||||
<br>
|
||||
<li>Use the built-in library functions whenever possible.
|
||||
For example, instead of writing this:
|
||||
<pre>
|
||||
@@ -137,6 +169,8 @@ These issues will be addressed/resolved in the future.
|
||||
<pre>
|
||||
float x = inversesqrt(y);
|
||||
</pre>
|
||||
<li>
|
||||
Use ++i when possible as it's more efficient than i++
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -145,8 +179,13 @@ These issues will be addressed/resolved in the future.
|
||||
<h2>Stand-alone GLSL Compiler</h2>
|
||||
|
||||
<p>
|
||||
The stand-alone GLSL compiler program can be used to compile GLSL shaders
|
||||
into low-level GPU code.
|
||||
A unique stand-alone GLSL compiler driver has been added to Mesa.
|
||||
<p>
|
||||
|
||||
<p>
|
||||
The stand-alone compiler (like a conventional command-line compiler)
|
||||
is a tool that accepts Shading Language programs and emits low-level
|
||||
GPU programs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -159,25 +198,59 @@ This tool is useful for:
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
After building Mesa, the compiler can be found at src/glsl/glsl_compiler
|
||||
After building Mesa, the glslcompiler can be built by manually running:
|
||||
</p>
|
||||
<pre>
|
||||
make realclean
|
||||
make linux
|
||||
cd src/mesa/drivers/glslcompiler
|
||||
make
|
||||
</pre>
|
||||
|
||||
|
||||
<p>
|
||||
Here's an example of using the compiler to compile a vertex shader and
|
||||
emit GL_ARB_vertex_program-style instructions:
|
||||
</p>
|
||||
<pre>
|
||||
src/glsl/glslcompiler --dump-ast myshader.vert
|
||||
bin/glslcompiler --debug --numbers --fs progs/glsl/CH06-brick.frag.txt
|
||||
</pre>
|
||||
<p>
|
||||
results in:
|
||||
</p>
|
||||
<pre>
|
||||
# Fragment Program/Shader
|
||||
0: RCP TEMP[4].x, UNIFORM[2].xxxx;
|
||||
1: RCP TEMP[4].y, UNIFORM[2].yyyy;
|
||||
2: MUL TEMP[3].xy, VARYING[0], TEMP[4];
|
||||
3: MOV TEMP[1], TEMP[3];
|
||||
4: MUL TEMP[0].w, TEMP[1].yyyy, CONST[4].xxxx;
|
||||
5: FRC TEMP[1].z, TEMP[0].wwww;
|
||||
6: SGT.C TEMP[0].w, TEMP[1].zzzz, CONST[4].xxxx;
|
||||
7: IF (NE.wwww); # (if false, goto 9);
|
||||
8: ADD TEMP[1].x, TEMP[1].xxxx, CONST[4].xxxx;
|
||||
9: ENDIF;
|
||||
10: FRC TEMP[1].xy, TEMP[1];
|
||||
11: SGT TEMP[2].xy, UNIFORM[3], TEMP[1];
|
||||
12: MUL TEMP[1].z, TEMP[2].xxxx, TEMP[2].yyyy;
|
||||
13: LRP TEMP[0], TEMP[1].zzzz, UNIFORM[0], UNIFORM[1];
|
||||
14: MUL TEMP[0].xyz, TEMP[0], VARYING[1].xxxx;
|
||||
15: MOV OUTPUT[0].xyz, TEMP[0];
|
||||
16: MOV OUTPUT[0].w, CONST[4].yyyy;
|
||||
17: END
|
||||
</pre>
|
||||
|
||||
Options include
|
||||
<ul>
|
||||
<li><b>--dump-ast</b> - dump GPU code
|
||||
<li><b>--dump-hir</b> - dump high-level IR code
|
||||
<li><b>--dump-lir</b> - dump low-level IR code
|
||||
<li><b>--link</b> - ???
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Note that some shading language constructs (such as uniform and varying
|
||||
variables) aren't expressible in ARB or NV-style programs.
|
||||
Therefore, the resulting output is not always legal by definition of
|
||||
those program languages.
|
||||
</p>
|
||||
<p>
|
||||
Also note that this compiler driver is still under development.
|
||||
Over time, the correctness of the GPU programs, with respect to the ARB
|
||||
and NV languagues, should improve.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
@@ -186,12 +259,38 @@ Options include
|
||||
|
||||
<p>
|
||||
The source code for Mesa's shading language compiler is in the
|
||||
<code>src/glsl/</code> directory.
|
||||
<code>src/mesa/shader/slang/</code> directory.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
XXX provide some info about the compiler....
|
||||
The compiler follows a fairly standard design and basically works as follows:
|
||||
</p>
|
||||
<ul>
|
||||
<li>The input string is tokenized (see grammar.c) and parsed
|
||||
(see slang_compiler_*.c) to produce an Abstract Syntax Tree (AST).
|
||||
The nodes in this tree are slang_operation structures
|
||||
(see slang_compile_operation.h).
|
||||
The nodes are decorated with symbol table, scoping and datatype information.
|
||||
<li>The AST is converted into an Intermediate representation (IR) tree
|
||||
(see the slang_codegen.c file).
|
||||
The IR nodes represent basic GPU instructions, like add, dot product,
|
||||
move, etc.
|
||||
The IR tree is mostly a binary tree, but a few nodes have three or four
|
||||
children.
|
||||
In principle, the IR tree could be executed by doing an in-order traversal.
|
||||
<li>The IR tree is traversed in-order to emit code (see slang_emit.c).
|
||||
This is also when registers are allocated to store variables and temps.
|
||||
<li>In the future, a pattern-matching code generator-generator may be
|
||||
used for code generation.
|
||||
Programs such as L-BURG (Bottom-Up Rewrite Generator) and Twig look for
|
||||
patterns in IR trees, compute weights for subtrees and use the weights
|
||||
to select the best instructions to represent the sub-tree.
|
||||
<li>The emitted GPU instructions (see prog_instruction.h) are stored in a
|
||||
gl_program object (see mtypes.h).
|
||||
<li>When a fragment shader and vertex shader are linked (see slang_link.c)
|
||||
the varying vars are matched up, uniforms are merged, and vertex
|
||||
attributes are resolved (rewriting instructions as needed).
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The final vertex and fragment programs may be interpreted in software
|
||||
@@ -249,20 +348,20 @@ Extra NOP instructions will also be inserted.
|
||||
<h2>Compiler Validation</h2>
|
||||
|
||||
<p>
|
||||
Developers working on the GLSL compiler should test frequently to avoid
|
||||
A <a href="http://glean.sf.net" target="_parent">Glean</a> test has
|
||||
been create to exercise the GLSL compiler.
|
||||
</p>
|
||||
<p>
|
||||
The <em>glsl1</em> test runs over 170 sub-tests to check that the language
|
||||
features and built-in functions work properly.
|
||||
This test should be run frequently while working on the compiler to catch
|
||||
regressions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <a href="http://people.freedesktop.org/~nh/piglit/">Piglit</a> project
|
||||
has many GLSL tests and the
|
||||
<a href="http://glean.sf.net" target="_parent">Glean</a> glsl1 test
|
||||
tests GLSL features.
|
||||
The test coverage is reasonably broad and complete but additional tests
|
||||
should be added.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Mesa demos repository also has some good GLSL tests.
|
||||
</p>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
@@ -1,165 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Source Tree</TITLE>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<h1>Mesa source code tree overview</h1>
|
||||
|
||||
<p>
|
||||
This is a brief summary of Mesa's directory tree and what's contained in
|
||||
each directory.
|
||||
</p>
|
||||
|
||||
|
||||
<ul>
|
||||
<li><b>docs</b> - Documentation
|
||||
<li><b>include</b> - Public OpenGL header files
|
||||
<li><b>src</b>
|
||||
<ul>
|
||||
<li><b>egl</b> - EGL library sources
|
||||
<ul>
|
||||
<li><b>docs</b> - EGL documentation
|
||||
<li><b>drivers</b> - EGL drivers
|
||||
<li><b>main</b> - main EGL library implementation. This is where all
|
||||
the EGL API functions are implemented, like eglCreateContext().
|
||||
</ul>
|
||||
<li><b>mesa</b> - Main Mesa sources
|
||||
<ul>
|
||||
<li><b>glapi</b> - OpenGL API dispatch layer. This is where all the
|
||||
GL entrypoints like glClear, glBegin, etc. are generated, as well as
|
||||
the GL dispatch table. All GL function calls jump through the
|
||||
dispatch table to functions found in main/.
|
||||
<li><b>main</b> - The core Mesa code (mainly state management)
|
||||
<li><b>drivers</b> - Mesa drivers (not used with Gallium)
|
||||
<ul>
|
||||
<li><b>common</b> - code which may be shared by all drivers
|
||||
<li><b>dri</b> - Direct Rendering Infrastructure drivers
|
||||
<ul>
|
||||
<li><b>common</b> - code shared by all DRI drivers
|
||||
<li><b>i915</b> - driver for Intel i915/i945
|
||||
<li><b>i965</b> - driver for Intel i965
|
||||
<li>XXX more
|
||||
</ul>
|
||||
<li><b>x11</b> - Xlib-based software driver
|
||||
<li><b>osmesa</b> - off-screen software driver
|
||||
<li><b>glslcompiler</b> - a stand-alone GLSL compiler driver
|
||||
<li>XXX more
|
||||
</ul>
|
||||
<li><b>es</b> - OpenGL ES overlay, parallelly buildable with the core Mesa
|
||||
<li><b>math</b> - vertex array translation and transformation code
|
||||
(not used with Gallium)
|
||||
<li><b>ppc</b> - Assembly code/optimizations for PPC systems
|
||||
(not used with Gallium)
|
||||
<li><b>shader</b> - Vertex/fragment shader and GLSL compiler code
|
||||
<li><b>sparc</b> - Assembly code/optimizations for SPARC systems
|
||||
(not used with Gallium)
|
||||
<li><b>state_tracker</b> - State tracker / driver for Gallium. This
|
||||
is basically a Mesa device driver that speaks to Gallium. This
|
||||
directory may be moved to src/mesa/drivers/gallium at some point.
|
||||
<li><b>swrast</b> - Software rasterization module. For drawing points,
|
||||
lines, triangles, bitmaps, images, etc. in software.
|
||||
(not used with Gallium)
|
||||
<li><b>swrast_setup</b> - Software primitive setup. Does things like
|
||||
polygon culling, glPolygonMode, polygon offset, etc.
|
||||
(not used with Gallium)
|
||||
<li><b>tnl</b> - Software vertex Transformation 'n Lighting.
|
||||
(not used with Gallium)
|
||||
<li><b>tnl_dd</b> - TNL code for device drivers.
|
||||
(not used with Gallium)
|
||||
<li><b>vbo</b> - Vertex Buffer Object code. All drawing with
|
||||
glBegin/glEnd, glDrawArrays, display lists, etc. goes through this
|
||||
module. The results is a well-defined set of vertex arrays which
|
||||
are passed to the device driver (or tnl module) for rendering.
|
||||
<li><b>vf</b> - vertex format conversion (currently unused)
|
||||
<li><b>x86</b> - Assembly code/optimizations for 32-bit x86 systems
|
||||
(not used with Gallium)
|
||||
<li><b>x86-64</b> - Assembly code/optimizations for 64-bit x86 systems
|
||||
(not used with Gallium)
|
||||
</ul>
|
||||
<li><b>gallium</b> - Gallium3D source code
|
||||
<ul>
|
||||
<li><b>include</b> - Gallium3D header files which define the Gallium3D
|
||||
interfaces
|
||||
<li><b>drivers</b> - Gallium3D device drivers
|
||||
<ul>
|
||||
<li><b>cell</b> - Driver for Cell processor.
|
||||
<li><b>i915</b> - Driver for Intel i915/i945.
|
||||
<li><b>i965</b> - Driver for Intel i965.
|
||||
<li><b>llvmpipe</b> - Software driver using LLVM for runtime code generation.
|
||||
<li><b>nv*</b> - Drivers for NVIDIA GPUs.
|
||||
<li><b>r300</b> - Driver for ATI/AMD R300.
|
||||
<li><b>softpipe</b> - Software reference driver.
|
||||
<li><b>svga</b> - Driver for VMware's SVGA virtual GPU.
|
||||
<li><b>trace</b> - Driver for tracing Gallium calls.
|
||||
<li>XXX more
|
||||
</ul>
|
||||
<li><b>auxiliary</b> - Gallium support code
|
||||
<ul>
|
||||
<li><b>draw</b> - Software vertex processing and primitive assembly
|
||||
module. This includes vertex program execution, clipping, culling
|
||||
and optional stages for drawing wide lines, stippled lines,
|
||||
polygon stippling, two-sided lighting, etc.
|
||||
Intended for use by drivers for hardware that does not have
|
||||
vertex shaders.
|
||||
Geometry shaders will also be implemented in this module.
|
||||
<li><b>cso_cache</b> - Constant State Objects Cache. Used to filter out
|
||||
redundant state changes between state trackers and drivers.
|
||||
<li><b>gallivm</b> - LLVM module for Gallium. For LLVM-based
|
||||
compilation, optimization and code generation for TGSI shaders.
|
||||
Incomplete.
|
||||
<li><b>pipebuffer</b> - utility module for managing buffers
|
||||
<li><b>rbug</b> - Gallium remote debug utility
|
||||
<li><b>rtasm</b> - run-time assembly/machine code generation.
|
||||
Currently there's run-time code generation for x86/SSE, PowerPC
|
||||
and Cell SPU.
|
||||
<li><b>tgsi</b> - TG Shader Infrastructure. Code for encoding,
|
||||
manipulating and interpretting GPU programs.
|
||||
<li><b>translate</b> - module for translating vertex data from one format
|
||||
to another.
|
||||
<li><b>util</b> - assorted utilities for arithmetic, hashing, surface
|
||||
creation, memory management, 2D blitting, simple rendering, etc.
|
||||
</ul>
|
||||
<li><b>state_trackers</b> -
|
||||
<ul>
|
||||
<li><b>dri</b> - Meta state tracker for DRI drivers
|
||||
<li><b>egl</b> - Meta state tracker for EGL drivers
|
||||
<li><b>es</b> - OpenGL ES 1.x and 2.x state trackers
|
||||
<li><b>g3dvl</b> -
|
||||
<li><b>glx</b> - Meta state tracker for GLX
|
||||
<li><b>python</b> -
|
||||
<li><b>vega</b> - OpenVG 1.x state tracker
|
||||
<li><b>wgl</b> -
|
||||
<li><b>xorg</b> - Meta state tracker for Xorg video drivers
|
||||
</ul>
|
||||
<li><b>winsys</b> -
|
||||
<ul>
|
||||
<li><b>drm</b> -
|
||||
<li><b>g3dvl</b> -
|
||||
<li><b>gdi</b> -
|
||||
<li><b>xlib</b> -
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><b>glu</b> - The OpenGL Utility library
|
||||
<ul>
|
||||
<li><b>sgi</b> - GLU from SGI
|
||||
<li><b>mesa</b> - Mesa version of GLU (deprecated)
|
||||
</ul>
|
||||
<li><b>glut</b> - Mark Kilgard's OpenGL OpenGL Utility Toolkit library
|
||||
<li><b>glx</b> - The GLX library code for building libGL. This is used for
|
||||
direct rendering drivers. It will dynamically load one of the
|
||||
xxx_dri.so drivers.
|
||||
<li><b>glw</b> - Widgets for Xt/Motif.
|
||||
<li><b>glew</b> - OpenGL Extension Wrangler library (used by demo programs)
|
||||
</ul>
|
||||
<li><b>progs</b> - OpenGL test and demonstration programs
|
||||
<li><b>lib</b> - where the GL libraries are placed
|
||||
</ul>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
@@ -16,7 +16,8 @@
|
||||
</h3>
|
||||
</center>
|
||||
</h2>
|
||||
<p> Copyright © 2002-2003 by Tungsten Graphics, Inc.,
|
||||
<p> Copyright © 2002-2003 by <a
|
||||
href="http://www.tungstengraphics.com/">Tungsten Graphics, Inc.</a>,
|
||||
Cedar Park, Texas. All Rights Reserved. <br>
|
||||
<br>
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
|
@@ -22,7 +22,8 @@ full: $(FULL:.doxy=.tag)
|
||||
|
||||
SUBSET = \
|
||||
main.doxy \
|
||||
math.doxy
|
||||
math.doxy \
|
||||
miniglx.doxy
|
||||
|
||||
subset: $(SUBSET:.doxy=.tag)
|
||||
$(foreach FILE,$(SUBSET),doxygen $(FILE);)
|
||||
|
@@ -33,7 +33,8 @@
|
||||
|
||||
- Pipe drivers:
|
||||
- \ref softpipe
|
||||
- \ref i915g
|
||||
- \ref i915simple
|
||||
- Simple 965 driver (brw_context.h, brw_winsys.h)
|
||||
- Cell driver (cell_context.h, cell_winsys.h)
|
||||
- \ref failover
|
||||
|
||||
@@ -119,7 +120,7 @@
|
||||
\sa sp_winsys.h
|
||||
*/
|
||||
|
||||
/** \page i915g i915 Driver
|
||||
/** \page i915simple Simple i915 Driver
|
||||
|
||||
The i915 Gallium3D Driver is an initial hardware driver implementation within
|
||||
the Gallium3D driver architecture. We expect that once complete this driver
|
||||
@@ -162,7 +163,7 @@
|
||||
The Draw module is effectively the part of \ref softpipe which is concerned with
|
||||
vertex processing, split off into a separate module so that it can be reused
|
||||
by drivers for rasterization-only hardware. As such it is also instantiated
|
||||
by the \ref i915g driver.
|
||||
by the \ref i915simple driver.
|
||||
|
||||
Additionally, there are cases in the Mesa OpenGL state_tracker where it is
|
||||
required to obtain transformed vertices and yet it is anticipated that using
|
||||
|
179
doxygen/miniglx.doxy
Normal file
179
doxygen/miniglx.doxy
Normal file
@@ -0,0 +1,179 @@
|
||||
# Doxyfile 0.1
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# General configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "MiniGLX"
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY =
|
||||
OUTPUT_LANGUAGE = English
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH =
|
||||
INTERNAL_DOCS = YES
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
CASE_SENSE_NAMES = YES
|
||||
SHORT_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
INHERIT_DOCS = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 8
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
ALIASES =
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
SHOW_USED_FILES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
WARN_FORMAT =
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../src/glx/mini/ ../include/GL/miniglx.h
|
||||
FILE_PATTERNS = *.h *.c
|
||||
RECURSIVE = NO
|
||||
EXCLUDE = ../src/glx/mini/glapi.c
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = miniglx
|
||||
HTML_HEADER = header_subset.html
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT =
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT =
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT =
|
||||
MAN_EXTENSION =
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH = ../include/
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES = \
|
||||
core_subset.tag=../core_subset \
|
||||
math_subset.tag=../math_subset
|
||||
GENERATE_TAGFILE = miniglx.tag
|
||||
ALLEXTERNALS = NO
|
||||
PERL_PATH =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
TEMPLATE_RELATIONS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::addtions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
CGI_NAME =
|
||||
CGI_URL =
|
||||
DOC_URL =
|
||||
DOC_ABSPATH =
|
||||
BIN_ABSPATH =
|
||||
EXT_DOC_PATHS =
|
@@ -1,32 +1,9 @@
|
||||
/* -*- mode: c; tab-width: 8; -*- */
|
||||
/* vi: set sw=4 ts=8: */
|
||||
/* Reference version of egl.h for EGL 1.4.
|
||||
* $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
|
||||
* Last modified 2008/05/02
|
||||
*/
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#ifndef __egl_h_
|
||||
#define __egl_h_
|
||||
|
||||
@@ -40,7 +17,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* EGL Types */
|
||||
/* EGLint is defined in eglplatform.h */
|
||||
typedef int32_t EGLint;
|
||||
typedef unsigned int EGLBoolean;
|
||||
typedef unsigned int EGLenum;
|
||||
typedef void *EGLConfig;
|
||||
@@ -65,7 +42,7 @@ typedef void *EGLClientBuffer;
|
||||
#define EGL_TRUE 1
|
||||
|
||||
/* Out-of-band handle values */
|
||||
#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
|
||||
#define EGL_DEFAULT_DISPLAY ((void *)0)
|
||||
#define EGL_NO_CONTEXT ((EGLContext)0)
|
||||
#define EGL_NO_DISPLAY ((EGLDisplay)0)
|
||||
#define EGL_NO_SURFACE ((EGLSurface)0)
|
||||
@@ -109,6 +86,7 @@ typedef void *EGLClientBuffer;
|
||||
#define EGL_NATIVE_RENDERABLE 0x302D
|
||||
#define EGL_NATIVE_VISUAL_ID 0x302E
|
||||
#define EGL_NATIVE_VISUAL_TYPE 0x302F
|
||||
#define EGL_PRESERVED_RESOURCES 0x3030
|
||||
#define EGL_SAMPLES 0x3031
|
||||
#define EGL_SAMPLE_BUFFERS 0x3032
|
||||
#define EGL_SURFACE_TYPE 0x3033
|
||||
@@ -313,14 +291,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
|
||||
EGLNativePixmapType target);
|
||||
|
||||
/* This is a generic function pointer type, whose name indicates it must
|
||||
* be cast to the proper type *and calling convention* before use.
|
||||
*/
|
||||
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
|
||||
|
||||
/* Now, define eglGetProcAddress using the generic function ptr. type */
|
||||
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
|
||||
eglGetProcAddress(const char *procname);
|
||||
EGLAPI void (* EGLAPIENTRY eglGetProcAddress(const char *procname))(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2010 The Khronos Group Inc.
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
@@ -34,8 +34,8 @@ extern "C" {
|
||||
|
||||
/* Header file version number */
|
||||
/* Current version at http://www.khronos.org/registry/egl/ */
|
||||
/* $Revision: 12124 $ on $Date: 2010-07-27 20:12:35 -0700 (Tue, 27 Jul 2010) $ */
|
||||
#define EGL_EGLEXT_VERSION 7
|
||||
/* $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $ */
|
||||
#define EGL_EGLEXT_VERSION 3
|
||||
|
||||
#ifndef EGL_KHR_config_attribs
|
||||
#define EGL_KHR_config_attribs 1
|
||||
@@ -120,60 +120,6 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
|
||||
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_MESA_drm_image
|
||||
#define EGL_MESA_drm_image 1
|
||||
#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* eglCreateImageKHR attribute */
|
||||
#define EGL_DRM_BUFFER_USE_MESA 0x31D1
|
||||
|
||||
/* EGL_DRM_BUFFER_FORMAT_MESA tokens */
|
||||
#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2
|
||||
|
||||
/* EGL_DRM_BUFFER_USE_MESA bits */
|
||||
#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001
|
||||
#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002
|
||||
|
||||
#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */
|
||||
#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 /* eglCreateImageKHR attribute */
|
||||
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
|
||||
#endif
|
||||
typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESA) (EGLDisplay dpy, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESA) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
|
||||
#ifndef EGL_KHR_reusable_sync
|
||||
#define EGL_KHR_reusable_sync 1
|
||||
|
||||
typedef void* EGLSyncKHR;
|
||||
typedef khronos_utime_nanoseconds_t EGLTimeKHR;
|
||||
|
||||
#define EGL_SYNC_STATUS_KHR 0x30F1
|
||||
#define EGL_SIGNALED_KHR 0x30F2
|
||||
#define EGL_UNSIGNALED_KHR 0x30F3
|
||||
#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
|
||||
#define EGL_CONDITION_SATISFIED_KHR 0x30F6
|
||||
#define EGL_SYNC_TYPE_KHR 0x30F7
|
||||
#define EGL_SYNC_REUSABLE_KHR 0x30FA
|
||||
#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
|
||||
#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
|
||||
#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
|
||||
EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* EGL_MESA_screen extension >>> PRELIMINARY <<< */
|
||||
#ifndef EGL_MESA_screen_surface
|
||||
@@ -190,8 +136,8 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
|
||||
#define EGL_INTERLACED_MESA 0x4008
|
||||
#define EGL_SCREEN_BIT_MESA 0x08
|
||||
|
||||
typedef khronos_uint32_t EGLScreenMESA;
|
||||
typedef khronos_uint32_t EGLModeMESA;
|
||||
typedef uint32_t EGLScreenMESA;
|
||||
typedef uint32_t EGLModeMESA;
|
||||
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes);
|
||||
@@ -233,17 +179,6 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLCont
|
||||
|
||||
#endif /* EGL_MESA_copy_context */
|
||||
|
||||
#ifndef EGL_MESA_drm_display
|
||||
#define EGL_MESA_drm_display 1
|
||||
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
|
||||
typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd);
|
||||
|
||||
#endif /* EGL_MESA_drm_display */
|
||||
|
||||
#ifndef EGL_KHR_image_base
|
||||
#define EGL_KHR_image_base 1
|
||||
/* Most interfaces defined by EGL_KHR_image_pixmap above */
|
||||
@@ -255,128 +190,6 @@ typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd);
|
||||
/* Interfaces defined by EGL_KHR_image above */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_IMG_context_priority
|
||||
#define EGL_IMG_context_priority 1
|
||||
#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
|
||||
#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
|
||||
#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
|
||||
#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_lock_surface2
|
||||
#define EGL_KHR_lock_surface2 1
|
||||
#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_coverage_sample
|
||||
#define EGL_NV_coverage_sample 1
|
||||
#define EGL_COVERAGE_BUFFERS_NV 0x30E0
|
||||
#define EGL_COVERAGE_SAMPLES_NV 0x30E1
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_depth_nonlinear
|
||||
#define EGL_NV_depth_nonlinear 1
|
||||
#define EGL_DEPTH_ENCODING_NV 0x30E2
|
||||
#define EGL_DEPTH_ENCODING_NONE_NV 0
|
||||
#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */
|
||||
#ifndef EGL_NV_sync
|
||||
#define EGL_NV_sync 1
|
||||
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
|
||||
#define EGL_SYNC_STATUS_NV 0x30E7
|
||||
#define EGL_SIGNALED_NV 0x30E8
|
||||
#define EGL_UNSIGNALED_NV 0x30E9
|
||||
#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
|
||||
#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
|
||||
#define EGL_ALREADY_SIGNALED_NV 0x30EA
|
||||
#define EGL_TIMEOUT_EXPIRED_NV 0x30EB
|
||||
#define EGL_CONDITION_SATISFIED_NV 0x30EC
|
||||
#define EGL_SYNC_TYPE_NV 0x30ED
|
||||
#define EGL_SYNC_CONDITION_NV 0x30EE
|
||||
#define EGL_SYNC_FENCE_NV 0x30EF
|
||||
#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
|
||||
typedef void* EGLSyncNV;
|
||||
typedef khronos_utime_nanoseconds_t EGLTimeNV;
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
|
||||
EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
|
||||
EGLBoolean eglFenceNV (EGLSyncNV sync);
|
||||
EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
|
||||
EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
|
||||
EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */
|
||||
#ifndef EGL_KHR_fence_sync
|
||||
#define EGL_KHR_fence_sync 1
|
||||
/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
|
||||
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
|
||||
#define EGL_SYNC_CONDITION_KHR 0x30F8
|
||||
#define EGL_SYNC_FENCE_KHR 0x30F9
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EGL_HI_clientpixmap
|
||||
#define EGL_HI_clientpixmap 1
|
||||
|
||||
/* Surface Attribute */
|
||||
#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74
|
||||
/*
|
||||
* Structure representing a client pixmap
|
||||
* (pixmap's data is in client-space memory).
|
||||
*/
|
||||
struct EGLClientPixmapHI
|
||||
{
|
||||
void* pData;
|
||||
EGLint iWidth;
|
||||
EGLint iHeight;
|
||||
EGLint iStride;
|
||||
};
|
||||
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
|
||||
#endif /* EGL_HI_clientpixmap */
|
||||
|
||||
#ifndef EGL_HI_colorformats
|
||||
#define EGL_HI_colorformats 1
|
||||
/* Config Attribute */
|
||||
#define EGL_COLOR_FORMAT_HI 0x8F70
|
||||
/* Color Formats */
|
||||
#define EGL_COLOR_RGB_HI 0x8F71
|
||||
#define EGL_COLOR_RGBA_HI 0x8F72
|
||||
#define EGL_COLOR_ARGB_HI 0x8F73
|
||||
#endif /* EGL_HI_colorformats */
|
||||
|
||||
#ifndef EGL_NOK_swap_region
|
||||
#define EGL_NOK_swap_region 1
|
||||
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
|
||||
#endif
|
||||
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef EGL_NOK_texture_from_pixmap
|
||||
#define EGL_NOK_texture_from_pixmap 1
|
||||
|
||||
#define EGL_Y_INVERTED_NOK 0x307F
|
||||
#endif /* EGL_NOK_texture_from_pixmap */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,59 +1,38 @@
|
||||
/* -*- mode: c; tab-width: 8; -*- */
|
||||
/* vi: set sw=4 ts=8: */
|
||||
/* Platform-specific types and definitions for egl.h */
|
||||
|
||||
#ifndef __eglplatform_h_
|
||||
#define __eglplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
/* Windows calling convention boilerplate */
|
||||
#if (defined(WIN32) || defined(_WIN32_WCE))
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/* Platform-specific types and definitions for egl.h
|
||||
* $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* You are encouraged to submit all modifications to the Khronos group so that
|
||||
* they can be included in future versions of this file. Please submit changes
|
||||
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
|
||||
* by filing a bug against product "EGL" component "Registry".
|
||||
*/
|
||||
|
||||
#include <KHR/khrplatform.h>
|
||||
#if !defined(_WIN32_WCE)
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
/* Macros used in EGL function prototype declarations.
|
||||
*
|
||||
* EGL functions should be prototyped as:
|
||||
*
|
||||
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
|
||||
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
|
||||
*
|
||||
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
|
||||
* On Windows, EGLAPIENTRY can be defined like APIENTRY.
|
||||
* On most other platforms, it should be empty.
|
||||
*/
|
||||
|
||||
#ifndef EGLAPI
|
||||
#define EGLAPI KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef EGLAPIENTRY
|
||||
#define EGLAPIENTRY KHRONOS_APIENTRY
|
||||
#define EGLAPIENTRY
|
||||
#endif
|
||||
#ifndef EGLAPIENTRYP
|
||||
#define EGLAPIENTRYP EGLAPIENTRY *
|
||||
#endif
|
||||
#define EGLAPIENTRYP EGLAPIENTRY*
|
||||
|
||||
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
||||
* are aliases of window-system-dependent types, such as X Display * or
|
||||
@@ -62,59 +41,53 @@
|
||||
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
/* Unix (tentative)
|
||||
#include <X headers>
|
||||
typedef Display *NativeDisplayType;
|
||||
- or maybe, if encoding "hostname:display.head"
|
||||
typedef const char *NativeWindowType;
|
||||
etc.
|
||||
*/
|
||||
|
||||
|
||||
#if (defined(WIN32) || defined(_WIN32_WCE))
|
||||
|
||||
/** BEGIN Added for Windows **/
|
||||
#ifndef EGLAPI
|
||||
#define EGLAPI __declspec(dllexport)
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
typedef HDC EGLNativeDisplayType;
|
||||
typedef HBITMAP EGLNativePixmapType;
|
||||
typedef HWND EGLNativeWindowType;
|
||||
typedef long int32_t;
|
||||
typedef unsigned long uint32_t;
|
||||
typedef unsigned char uint8_t;
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp _stricmp
|
||||
#define vsnprintf _vsnprintf
|
||||
|
||||
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
|
||||
typedef HDC NativeDisplayType;
|
||||
typedef HWND NativeWindowType;
|
||||
typedef HBITMAP NativePixmapType;
|
||||
/** END Added for Windows **/
|
||||
|
||||
typedef int EGLNativeDisplayType;
|
||||
typedef void *EGLNativeWindowType;
|
||||
typedef void *EGLNativePixmapType;
|
||||
#elif defined(__gnu_linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__APPLE__)
|
||||
|
||||
#elif defined(__unix__) || defined(__unix)
|
||||
|
||||
#ifdef MESA_EGL_NO_X11_HEADERS
|
||||
/** BEGIN Added for X (Mesa) **/
|
||||
#ifndef EGLAPI
|
||||
#define EGLAPI extern
|
||||
#endif
|
||||
|
||||
typedef void *EGLNativeDisplayType;
|
||||
typedef khronos_uint32_t EGLNativePixmapType;
|
||||
typedef khronos_uint32_t EGLNativeWindowType;
|
||||
|
||||
#else
|
||||
|
||||
/* X11 (tentative) */
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
typedef Display *NativeDisplayType;
|
||||
typedef Window NativeWindowType;
|
||||
typedef Pixmap NativePixmapType;
|
||||
/** END Added for X (Mesa) **/
|
||||
|
||||
typedef Display *EGLNativeDisplayType;
|
||||
typedef Pixmap EGLNativePixmapType;
|
||||
typedef Window EGLNativeWindowType;
|
||||
|
||||
#endif /* MESA_EGL_NO_X11_HEADERS */
|
||||
|
||||
#else
|
||||
#error "Platform not recognized"
|
||||
#endif
|
||||
|
||||
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
|
||||
typedef EGLNativeDisplayType NativeDisplayType;
|
||||
typedef EGLNativePixmapType NativePixmapType;
|
||||
typedef EGLNativeWindowType NativeWindowType;
|
||||
|
||||
|
||||
/* Define EGLint. This must be a signed integral type large enough to contain
|
||||
* all legal attribute names and values passed into and out of EGL, whether
|
||||
* their type is boolean, bitmask, enumerant (symbolic constant), integer,
|
||||
* handle, or other. While in general a 32-bit integer will suffice, if
|
||||
* handles are 64 bit types, then EGLint should be defined as a signed 64-bit
|
||||
* integer type.
|
||||
*/
|
||||
typedef khronos_int32_t EGLint;
|
||||
typedef NativeDisplayType EGLNativeDisplayType;
|
||||
typedef NativePixmapType EGLNativePixmapType;
|
||||
typedef NativeWindowType EGLNativeWindowType;
|
||||
|
||||
#endif /* __eglplatform_h */
|
||||
|
27
include/EGL/internal/eglimage_dri.h
Normal file
27
include/EGL/internal/eglimage_dri.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef EGLIMAGE_DRI_INCLUDED
|
||||
#define EGLIMAGE_DRI_INCLUDED
|
||||
|
||||
#include "GL/internal/dri_interface.h"
|
||||
|
||||
#define __DRI_EGL_IMAGE_MAGIC \
|
||||
(('D' << 24) | \
|
||||
('R' << 16) | \
|
||||
('I' << 8) | \
|
||||
('0'))
|
||||
|
||||
typedef void *__DRIEGLImageHandle;
|
||||
typedef struct __DRIEGLImageRec __DRIEGLImage;
|
||||
|
||||
struct __DRIEGLImageRec {
|
||||
GLint magic;
|
||||
|
||||
__DRIdrawable *drawable;
|
||||
|
||||
GLboolean texture_format_rgba;
|
||||
GLint level;
|
||||
GLint __pad[4];
|
||||
};
|
||||
|
||||
extern __DRIEGLImage *_eglClientGetImageData(__DRIEGLImageHandle handle);
|
||||
|
||||
#endif /* EGLIMAGE_DRI_INCLUDED */
|
38
include/GL/Makefile.am
Normal file
38
include/GL/Makefile.am
Normal file
@@ -0,0 +1,38 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
GLincludedir = $(includedir)/GL
|
||||
|
||||
INC_GGI = ggimesa.h
|
||||
INC_OSMESA = osmesa.h
|
||||
INC_SVGA = svgamesa.h
|
||||
INC_X11 = glx.h glxext.h glx_mangle.h
|
||||
INC_GLUT = glut.h glutf90.h
|
||||
|
||||
if HAVE_GGI
|
||||
sel_inc_ggi = $(INC_GGI)
|
||||
endif
|
||||
|
||||
if HAVE_OSMESA
|
||||
sel_inc_osmesa = $(INC_OSMESA)
|
||||
endif
|
||||
|
||||
if HAVE_SVGA
|
||||
sel_inc_svga = $(INC_SVGA)
|
||||
endif
|
||||
|
||||
if HAVE_X11
|
||||
sel_inc_x11 = $(INC_X11)
|
||||
endif
|
||||
|
||||
if NEED_GLUT
|
||||
sel_inc_glut = $(INC_GLUT)
|
||||
endif
|
||||
|
||||
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
|
||||
vms_x_fix.h wmesa.h \
|
||||
$(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
|
||||
|
||||
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
|
||||
$(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
|
||||
$(sel_inc_x11) $(sel_inc_glut)
|
||||
include $(top_srcdir)/common_rules.make
|
89
include/GL/directfbgl.h
Normal file
89
include/GL/directfbgl.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
(c) Copyright 2001 convergence integrated media GmbH.
|
||||
All rights reserved.
|
||||
|
||||
Written by Denis Oliver Kropp <dok@convergence.de> and
|
||||
Andreas Hundt <andi@convergence.de>.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __DIRECTFBGL_H__
|
||||
#define __DIRECTFBGL_H__
|
||||
|
||||
#include <directfb.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
int buffer_size;
|
||||
int depth_size;
|
||||
int stencil_size;
|
||||
int aux_buffers;
|
||||
|
||||
int red_size;
|
||||
int green_size;
|
||||
int blue_size;
|
||||
int alpha_size;
|
||||
|
||||
int accum_red_size;
|
||||
int accum_green_size;
|
||||
int accum_blue_size;
|
||||
int accum_alpha_size;
|
||||
|
||||
DFBBoolean double_buffer;
|
||||
DFBBoolean stereo;
|
||||
} DFBGLAttributes;
|
||||
|
||||
|
||||
DEFINE_INTERFACE( IDirectFBGL,
|
||||
|
||||
/** Context handling **/
|
||||
|
||||
/*
|
||||
* Acquire the hardware lock.
|
||||
*/
|
||||
DFBResult (*Lock) (
|
||||
IDirectFBGL *thiz
|
||||
);
|
||||
|
||||
/*
|
||||
* Release the lock.
|
||||
*/
|
||||
DFBResult (*Unlock) (
|
||||
IDirectFBGL *thiz
|
||||
);
|
||||
|
||||
/*
|
||||
* Query the OpenGL attributes.
|
||||
*/
|
||||
DFBResult (*GetAttributes) (
|
||||
IDirectFBGL *thiz,
|
||||
DFBGLAttributes *attributes
|
||||
);
|
||||
)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
160
include/GL/dmesa.h
Normal file
160
include/GL/dmesa.h
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.1
|
||||
*
|
||||
* Copyright (C) 1999-2004 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* DOS/DJGPP device driver for Mesa
|
||||
*
|
||||
* Author: Daniel Borca
|
||||
* Email : dborca@users.sourceforge.net
|
||||
* Web : http://www.geocities.com/dborca
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DMESA_H_included
|
||||
#define DMESA_H_included
|
||||
|
||||
#define DMESA_MAJOR_VERSION 6
|
||||
#define DMESA_MINOR_VERSION 5
|
||||
|
||||
/* Sample Usage:
|
||||
*
|
||||
* 1. Call DMesaCreateVisual() to initialize graphics.
|
||||
* 2. Call DMesaCreateContext() to create a DMesa rendering context.
|
||||
* 3. Call DMesaCreateBuffer() to define the window.
|
||||
* 4. Call DMesaMakeCurrent() to bind the DMesaBuffer to a DMesaContext.
|
||||
* 5. Make gl* calls to render your graphics.
|
||||
* 6. Use DMesaSwapBuffers() when double buffering to swap front/back buffers.
|
||||
* 7. Before exiting, destroy DMesaBuffer, DMesaContext and DMesaVisual.
|
||||
*/
|
||||
|
||||
typedef struct dmesa_context *DMesaContext;
|
||||
typedef struct dmesa_visual *DMesaVisual;
|
||||
typedef struct dmesa_buffer *DMesaBuffer;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Create a new Visual and set graphics mode.
|
||||
*/
|
||||
DMesaVisual DMesaCreateVisual (GLint width, /* X res */
|
||||
GLint height, /* Y res */
|
||||
GLint colDepth, /* BPP */
|
||||
GLint refresh, /* refresh rate: 0=default */
|
||||
GLboolean dbFlag, /* double-buffered */
|
||||
GLboolean rgbFlag, /* RGB mode */
|
||||
GLint alphaSize, /* requested bits/alpha */
|
||||
GLint depthSize, /* requested bits/depth */
|
||||
GLint stencilSize, /* requested bits/stencil */
|
||||
GLint accumSize); /* requested bits/accum */
|
||||
|
||||
/*
|
||||
* Destroy Visual and restore screen.
|
||||
*/
|
||||
void DMesaDestroyVisual (DMesaVisual v);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Create a new Context for rendering.
|
||||
*/
|
||||
DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share);
|
||||
|
||||
/*
|
||||
* Destroy Context.
|
||||
*/
|
||||
void DMesaDestroyContext (DMesaContext c);
|
||||
|
||||
/*
|
||||
* Return a handle to the current context.
|
||||
*/
|
||||
DMesaContext DMesaGetCurrentContext (void);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Create a new Buffer (window).
|
||||
*/
|
||||
DMesaBuffer DMesaCreateBuffer (DMesaVisual visual,
|
||||
GLint xpos, GLint ypos,
|
||||
GLint width, GLint height);
|
||||
|
||||
/*
|
||||
* Destroy Buffer.
|
||||
*/
|
||||
void DMesaDestroyBuffer (DMesaBuffer b);
|
||||
|
||||
/*
|
||||
* Return a handle to the current buffer.
|
||||
*/
|
||||
DMesaBuffer DMesaGetCurrentBuffer (void);
|
||||
|
||||
/*
|
||||
* Swap the front and back buffers for the given Buffer.
|
||||
* No action is taken if the buffer is not double buffered.
|
||||
*/
|
||||
void DMesaSwapBuffers (DMesaBuffer b);
|
||||
|
||||
/*
|
||||
* Bind Buffer to Context and make the Context the current one.
|
||||
*/
|
||||
GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Move/Resize current Buffer.
|
||||
*/
|
||||
GLboolean DMesaMoveBuffer (GLint xpos, GLint ypos);
|
||||
GLboolean DMesaResizeBuffer (GLint width, GLint height);
|
||||
|
||||
/*
|
||||
* Set palette index, using normalized values.
|
||||
*/
|
||||
void DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue);
|
||||
|
||||
/*
|
||||
* DMesa functions
|
||||
*/
|
||||
typedef void (*DMesaProc) ();
|
||||
DMesaProc DMesaGetProcAddress (const char *name);
|
||||
|
||||
/*
|
||||
* DMesa state retrieval.
|
||||
*/
|
||||
#define DMESA_GET_SCREEN_SIZE 0x0100
|
||||
#define DMESA_GET_DRIVER_CAPS 0x0200
|
||||
#define DMESA_GET_VIDEO_MODES 0x0300
|
||||
#define DMESA_GET_BUFFER_ADDR 0x0400
|
||||
|
||||
#define DMESA_DRIVER_DBL_BIT 0x1 /* double-buffered */
|
||||
#define DMESA_DRIVER_YUP_BIT 0x2 /* lower-left window origin */
|
||||
int DMesaGetIntegerv (GLenum pname, GLint *params);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
85
include/GL/ggimesa.h
Normal file
85
include/GL/ggimesa.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library GGI bindings (GGIGL [giggle])
|
||||
* Version: 4.0
|
||||
* Copyright (C) 1995-2000 Brian Paul
|
||||
* Copyright (C) 1998 Uwe Maurer
|
||||
* Copyrigth (C) 2001 Filip Spacek
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GGIMESA_H
|
||||
#define GGIMESA_H
|
||||
|
||||
#define GGIMESA_MAJOR_VERSION 4
|
||||
#define GGIMESA_MINOR_VERSION 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <ggi/ggi.h>
|
||||
#include "GL/gl.h"
|
||||
|
||||
typedef struct ggi_mesa_context *ggi_mesa_context_t;
|
||||
|
||||
/*
|
||||
* Initialize Mesa GGI extension
|
||||
*/
|
||||
int ggiMesaInit(void);
|
||||
/*
|
||||
* Clean up Mesa GGI exension
|
||||
*/
|
||||
int ggiMesaExit(void);
|
||||
|
||||
/*
|
||||
* Attach Mesa GGI extension to the visual 'vis'
|
||||
*/
|
||||
int ggiMesaAttach(ggi_visual_t vis);
|
||||
/*
|
||||
* Detach Mesa GGI extension from the visual 'vis'
|
||||
*/
|
||||
int ggiMesaDetach(ggi_visual_t vis);
|
||||
|
||||
int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
|
||||
GLboolean stereo_flag, GLint depth_size,
|
||||
GLint stencil_size, GLint accum_red_size,
|
||||
GLint accum_green_size, GLint accum_blue_size,
|
||||
GLint accum_alpha_size, GLint num_samples);
|
||||
|
||||
/*
|
||||
* Create a new context capable of displaying on the visual vis.
|
||||
*/
|
||||
ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis);
|
||||
/*
|
||||
* Destroy the context 'ctx'
|
||||
*/
|
||||
void ggiMesaDestroyContext(ggi_mesa_context_t ctx);
|
||||
|
||||
/*
|
||||
* Make context 'ctx' the current context and bind it to visual 'vis'.
|
||||
* Note that the context must have been created with respect to that visual.
|
||||
*/
|
||||
void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis);
|
||||
|
||||
void ggiMesaSwapBuffers(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -67,7 +67,7 @@
|
||||
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
|
||||
# define GLAPI extern
|
||||
# define GLAPIENTRY __stdcall
|
||||
#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
|
||||
# define GLAPI __attribute__((visibility("default")))
|
||||
# define GLAPIENTRY
|
||||
#endif /* WIN32 && !CYGWIN */
|
||||
@@ -85,9 +85,7 @@
|
||||
* glut.h or gl.h.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
@@ -1742,9 +1740,6 @@ GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,
|
||||
GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
|
||||
GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
|
||||
|
||||
typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -1950,18 +1945,6 @@ GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
|
||||
GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
|
||||
|
||||
|
||||
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
||||
typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
|
||||
*/
|
||||
@@ -2195,21 +2178,6 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
|
||||
#endif /* GL_ATI_blend_equation_separate */
|
||||
|
||||
|
||||
/* GL_OES_EGL_image */
|
||||
#ifndef GL_OES_EGL_image
|
||||
typedef void* GLeglImageOES;
|
||||
#endif
|
||||
|
||||
#ifndef GL_OES_EGL_image
|
||||
#define GL_OES_EGL_image 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
|
||||
GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
|
||||
typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
** NOTE!!!!! If you add new functions to this file, or update
|
||||
|
@@ -30,7 +30,6 @@
|
||||
/*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */
|
||||
|
||||
#define glAccum MANGLE(Accum)
|
||||
#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
|
||||
#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
|
||||
#define glActiveTextureARB MANGLE(ActiveTextureARB)
|
||||
#define glActiveTexture MANGLE(ActiveTexture)
|
||||
@@ -61,7 +60,6 @@
|
||||
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
|
||||
#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
|
||||
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
|
||||
#define glBeginVideoCaptureNV MANGLE(BeginVideoCaptureNV)
|
||||
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
|
||||
#define glBindAttribLocation MANGLE(BindAttribLocation)
|
||||
#define glBindBufferARB MANGLE(BindBufferARB)
|
||||
@@ -95,8 +93,6 @@
|
||||
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
|
||||
#define glBindVertexArray MANGLE(BindVertexArray)
|
||||
#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
|
||||
#define glBindVideoCaptureStreamBufferNV MANGLE(BindVideoCaptureStreamBufferNV)
|
||||
#define glBindVideoCaptureStreamTextureNV MANGLE(BindVideoCaptureStreamTextureNV)
|
||||
#define glBinormal3bEXT MANGLE(Binormal3bEXT)
|
||||
#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
|
||||
#define glBinormal3dEXT MANGLE(Binormal3dEXT)
|
||||
@@ -112,25 +108,16 @@
|
||||
#define glBlendColorEXT MANGLE(BlendColorEXT)
|
||||
#define glBlendColor MANGLE(BlendColor)
|
||||
#define glBlendEquationEXT MANGLE(BlendEquationEXT)
|
||||
#define glBlendEquationi MANGLE(BlendEquationi)
|
||||
#define glBlendEquationIndexedAMD MANGLE(BlendEquationIndexedAMD)
|
||||
#define glBlendEquation MANGLE(BlendEquation)
|
||||
#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI)
|
||||
#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT)
|
||||
#define glBlendEquationSeparatei MANGLE(BlendEquationSeparatei)
|
||||
#define glBlendEquationSeparateIndexedAMD MANGLE(BlendEquationSeparateIndexedAMD)
|
||||
#define glBlendEquationSeparate MANGLE(BlendEquationSeparate)
|
||||
#define glBlendFunci MANGLE(BlendFunci)
|
||||
#define glBlendFuncIndexedAMD MANGLE(BlendFuncIndexedAMD)
|
||||
#define glBlendFunc MANGLE(BlendFunc)
|
||||
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
|
||||
#define glBlendFuncSeparatei MANGLE(BlendFuncSeparatei)
|
||||
#define glBlendFuncSeparateIndexedAMD MANGLE(BlendFuncSeparateIndexedAMD)
|
||||
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
|
||||
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
|
||||
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
|
||||
#define glBlitFramebuffer MANGLE(BlitFramebuffer)
|
||||
#define glBufferAddressRangeNV MANGLE(BufferAddressRangeNV)
|
||||
#define glBufferDataARB MANGLE(BufferDataARB)
|
||||
#define glBufferData MANGLE(BufferData)
|
||||
#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
|
||||
@@ -161,7 +148,6 @@
|
||||
#define glClientActiveTexture MANGLE(ClientActiveTexture)
|
||||
#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI)
|
||||
#define glClientAttribDefaultEXT MANGLE(ClientAttribDefaultEXT)
|
||||
#define glClientWaitSync MANGLE(ClientWaitSync)
|
||||
#define glClipPlane MANGLE(ClipPlane)
|
||||
#define glColor3b MANGLE(Color3b)
|
||||
#define glColor3bv MANGLE(Color3bv)
|
||||
@@ -207,7 +193,6 @@
|
||||
#define glColor4uiv MANGLE(Color4uiv)
|
||||
#define glColor4us MANGLE(Color4us)
|
||||
#define glColor4usv MANGLE(Color4usv)
|
||||
#define glColorFormatNV MANGLE(ColorFormatNV)
|
||||
#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
|
||||
#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
|
||||
#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
|
||||
@@ -282,7 +267,6 @@
|
||||
#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D)
|
||||
#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT)
|
||||
#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D)
|
||||
#define glCopyImageSubDataNV MANGLE(CopyImageSubDataNV)
|
||||
#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT)
|
||||
#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT)
|
||||
#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT)
|
||||
@@ -309,7 +293,6 @@
|
||||
#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
|
||||
#define glCreateShader MANGLE(CreateShader)
|
||||
#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
|
||||
#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT)
|
||||
#define glCullFace MANGLE(CullFace)
|
||||
#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
|
||||
#define glCullParameterfvEXT MANGLE(CullParameterfvEXT)
|
||||
@@ -337,7 +320,6 @@
|
||||
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
|
||||
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
|
||||
#define glDeleteShader MANGLE(DeleteShader)
|
||||
#define glDeleteSync MANGLE(DeleteSync)
|
||||
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
|
||||
#define glDeleteTextures MANGLE(DeleteTextures)
|
||||
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
|
||||
@@ -359,7 +341,6 @@
|
||||
#define glDisableIndexedEXT MANGLE(DisableIndexedEXT)
|
||||
#define glDisable MANGLE(Disable)
|
||||
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
|
||||
#define glDisableVertexAttribAPPLE MANGLE(DisableVertexAttribAPPLE)
|
||||
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
|
||||
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
|
||||
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
|
||||
@@ -373,9 +354,7 @@
|
||||
#define glDrawBuffers MANGLE(DrawBuffers)
|
||||
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
|
||||
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
|
||||
#define glDrawElementsBaseVertex MANGLE(DrawElementsBaseVertex)
|
||||
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
|
||||
#define glDrawElementsInstancedBaseVertex MANGLE(DrawElementsInstancedBaseVertex)
|
||||
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
|
||||
#define glDrawElementsInstanced MANGLE(DrawElementsInstanced)
|
||||
#define glDrawElements MANGLE(DrawElements)
|
||||
@@ -383,18 +362,14 @@
|
||||
#define glDrawPixels MANGLE(DrawPixels)
|
||||
#define glDrawRangeElementArrayAPPLE MANGLE(DrawRangeElementArrayAPPLE)
|
||||
#define glDrawRangeElementArrayATI MANGLE(DrawRangeElementArrayATI)
|
||||
#define glDrawRangeElementsBaseVertex MANGLE(DrawRangeElementsBaseVertex)
|
||||
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
|
||||
#define glDrawRangeElements MANGLE(DrawRangeElements)
|
||||
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
|
||||
#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
|
||||
#define glEdgeFlag MANGLE(EdgeFlag)
|
||||
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
|
||||
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
|
||||
#define glEdgeFlagPointer MANGLE(EdgeFlagPointer)
|
||||
#define glEdgeFlagv MANGLE(EdgeFlagv)
|
||||
#define glEGLImageTargetRenderbufferStorageOES MANGLE(EGLImageTargetRenderbufferStorageOES)
|
||||
#define glEGLImageTargetTexture2DOES MANGLE(EGLImageTargetTexture2DOES)
|
||||
#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
|
||||
#define glElementPointerATI MANGLE(ElementPointerATI)
|
||||
#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT)
|
||||
@@ -403,7 +378,6 @@
|
||||
#define glEnableIndexedEXT MANGLE(EnableIndexedEXT)
|
||||
#define glEnable MANGLE(Enable)
|
||||
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
|
||||
#define glEnableVertexAttribAPPLE MANGLE(EnableVertexAttribAPPLE)
|
||||
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
|
||||
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
|
||||
#define glEndConditionalRender MANGLE(EndConditionalRender)
|
||||
@@ -419,7 +393,6 @@
|
||||
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
|
||||
#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
|
||||
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
|
||||
#define glEndVideoCaptureNV MANGLE(EndVideoCaptureNV)
|
||||
#define glEvalCoord1d MANGLE(EvalCoord1d)
|
||||
#define glEvalCoord1dv MANGLE(EvalCoord1dv)
|
||||
#define glEvalCoord1f MANGLE(EvalCoord1f)
|
||||
@@ -436,7 +409,6 @@
|
||||
#define glExecuteProgramNV MANGLE(ExecuteProgramNV)
|
||||
#define glExtractComponentEXT MANGLE(ExtractComponentEXT)
|
||||
#define glFeedbackBuffer MANGLE(FeedbackBuffer)
|
||||
#define glFenceSync MANGLE(FenceSync)
|
||||
#define glFinalCombinerInputNV MANGLE(FinalCombinerInputNV)
|
||||
#define glFinishAsyncSGIX MANGLE(FinishAsyncSGIX)
|
||||
#define glFinishFenceAPPLE MANGLE(FinishFenceAPPLE)
|
||||
@@ -457,7 +429,6 @@
|
||||
#define glFogCoorddv MANGLE(FogCoorddv)
|
||||
#define glFogCoordfEXT MANGLE(FogCoordfEXT)
|
||||
#define glFogCoordf MANGLE(FogCoordf)
|
||||
#define glFogCoordFormatNV MANGLE(FogCoordFormatNV)
|
||||
#define glFogCoordfvEXT MANGLE(FogCoordfvEXT)
|
||||
#define glFogCoordfv MANGLE(FogCoordfv)
|
||||
#define glFogCoordhNV MANGLE(FogCoordhNV)
|
||||
@@ -498,11 +469,9 @@
|
||||
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
|
||||
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
|
||||
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
|
||||
#define glFramebufferTextureFace MANGLE(FramebufferTextureFace)
|
||||
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
|
||||
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
|
||||
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
|
||||
#define glFramebufferTexture MANGLE(FramebufferTexture)
|
||||
#define glFrameTerminatorGREMEDY MANGLE(FrameTerminatorGREMEDY)
|
||||
#define glFrameZoomSGIX MANGLE(FrameZoomSGIX)
|
||||
#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI)
|
||||
@@ -554,10 +523,8 @@
|
||||
#define glGetBooleanIndexedvEXT MANGLE(GetBooleanIndexedvEXT)
|
||||
#define glGetBooleani_v MANGLE(GetBooleani_v)
|
||||
#define glGetBooleanv MANGLE(GetBooleanv)
|
||||
#define glGetBufferParameteri64v MANGLE(GetBufferParameteri64v)
|
||||
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
|
||||
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
|
||||
#define glGetBufferParameterui64vNV MANGLE(GetBufferParameterui64vNV)
|
||||
#define glGetBufferPointervARB MANGLE(GetBufferPointervARB)
|
||||
#define glGetBufferPointerv MANGLE(GetBufferPointerv)
|
||||
#define glGetBufferSubDataARB MANGLE(GetBufferSubDataARB)
|
||||
@@ -619,12 +586,8 @@
|
||||
#define glGetImageTransformParameterivHP MANGLE(GetImageTransformParameterivHP)
|
||||
#define glGetInfoLogARB MANGLE(GetInfoLogARB)
|
||||
#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX)
|
||||
#define glGetInteger64i_v MANGLE(GetInteger64i_v)
|
||||
#define glGetInteger64v MANGLE(GetInteger64v)
|
||||
#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
|
||||
#define glGetIntegeri_v MANGLE(GetIntegeri_v)
|
||||
#define glGetIntegerui64i_vNV MANGLE(GetIntegerui64i_vNV)
|
||||
#define glGetIntegerui64vNV MANGLE(GetIntegerui64vNV)
|
||||
#define glGetIntegerv MANGLE(GetIntegerv)
|
||||
#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
|
||||
#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
|
||||
@@ -652,7 +615,6 @@
|
||||
#define glGetMinmaxParameterfv MANGLE(GetMinmaxParameterfv)
|
||||
#define glGetMinmaxParameterivEXT MANGLE(GetMinmaxParameterivEXT)
|
||||
#define glGetMinmaxParameteriv MANGLE(GetMinmaxParameteriv)
|
||||
#define glGetMultisamplefv MANGLE(GetMultisamplefv)
|
||||
#define glGetMultisamplefvNV MANGLE(GetMultisamplefvNV)
|
||||
#define glGetMultiTexEnvfvEXT MANGLE(GetMultiTexEnvfvEXT)
|
||||
#define glGetMultiTexEnvivEXT MANGLE(GetMultiTexEnvivEXT)
|
||||
@@ -667,7 +629,6 @@
|
||||
#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT)
|
||||
#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT)
|
||||
#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT)
|
||||
#define glGetNamedBufferParameterui64vNV MANGLE(GetNamedBufferParameterui64vNV)
|
||||
#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT)
|
||||
#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT)
|
||||
#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
|
||||
@@ -681,7 +642,6 @@
|
||||
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
|
||||
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
|
||||
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
|
||||
#define glGetObjectParameterivAPPLE MANGLE(GetObjectParameterivAPPLE)
|
||||
#define glGetObjectParameterivARB MANGLE(GetObjectParameterivARB)
|
||||
#define glGetOcclusionQueryivNV MANGLE(GetOcclusionQueryivNV)
|
||||
#define glGetOcclusionQueryuivNV MANGLE(GetOcclusionQueryuivNV)
|
||||
@@ -738,7 +698,6 @@
|
||||
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
|
||||
#define glGetStringi MANGLE(GetStringi)
|
||||
#define glGetString MANGLE(GetString)
|
||||
#define glGetSynciv MANGLE(GetSynciv)
|
||||
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
|
||||
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
|
||||
#define glGetTexEnvfv MANGLE(GetTexEnvfv)
|
||||
@@ -756,7 +715,6 @@
|
||||
#define glGetTexParameterIuivEXT MANGLE(GetTexParameterIuivEXT)
|
||||
#define glGetTexParameterIuiv MANGLE(GetTexParameterIuiv)
|
||||
#define glGetTexParameteriv MANGLE(GetTexParameteriv)
|
||||
#define glGetTexParameterPointervAPPLE MANGLE(GetTexParameterPointervAPPLE)
|
||||
#define glGetTextureImageEXT MANGLE(GetTextureImageEXT)
|
||||
#define glGetTextureLevelParameterfvEXT MANGLE(GetTextureLevelParameterfvEXT)
|
||||
#define glGetTextureLevelParameterivEXT MANGLE(GetTextureLevelParameterivEXT)
|
||||
@@ -778,7 +736,6 @@
|
||||
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
|
||||
#define glGetUniformLocation MANGLE(GetUniformLocation)
|
||||
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
|
||||
#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
|
||||
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
|
||||
#define glGetUniformuiv MANGLE(GetUniformuiv)
|
||||
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
|
||||
@@ -806,10 +763,6 @@
|
||||
#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
|
||||
#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
|
||||
#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
|
||||
#define glGetVideoCaptureivNV MANGLE(GetVideoCaptureivNV)
|
||||
#define glGetVideoCaptureStreamdvNV MANGLE(GetVideoCaptureStreamdvNV)
|
||||
#define glGetVideoCaptureStreamfvNV MANGLE(GetVideoCaptureStreamfvNV)
|
||||
#define glGetVideoCaptureStreamivNV MANGLE(GetVideoCaptureStreamivNV)
|
||||
#define glGetVideoi64vNV MANGLE(GetVideoi64vNV)
|
||||
#define glGetVideoivNV MANGLE(GetVideoivNV)
|
||||
#define glGetVideoui64vNV MANGLE(GetVideoui64vNV)
|
||||
@@ -834,7 +787,6 @@
|
||||
#define glIndexd MANGLE(Indexd)
|
||||
#define glIndexdv MANGLE(Indexdv)
|
||||
#define glIndexf MANGLE(Indexf)
|
||||
#define glIndexFormatNV MANGLE(IndexFormatNV)
|
||||
#define glIndexFuncEXT MANGLE(IndexFuncEXT)
|
||||
#define glIndexfv MANGLE(Indexfv)
|
||||
#define glIndexi MANGLE(Indexi)
|
||||
@@ -855,7 +807,6 @@
|
||||
#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
|
||||
#define glIsBufferARB MANGLE(IsBufferARB)
|
||||
#define glIsBuffer MANGLE(IsBuffer)
|
||||
#define glIsBufferResidentNV MANGLE(IsBufferResidentNV)
|
||||
#define glIsEnabledi MANGLE(IsEnabledi)
|
||||
#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
|
||||
#define glIsEnabled MANGLE(IsEnabled)
|
||||
@@ -864,7 +815,6 @@
|
||||
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
|
||||
#define glIsFramebuffer MANGLE(IsFramebuffer)
|
||||
#define glIsList MANGLE(IsList)
|
||||
#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
|
||||
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
|
||||
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
|
||||
#define glIsProgramARB MANGLE(IsProgramARB)
|
||||
@@ -875,14 +825,12 @@
|
||||
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
|
||||
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
|
||||
#define glIsShader MANGLE(IsShader)
|
||||
#define glIsSync MANGLE(IsSync)
|
||||
#define glIsTextureEXT MANGLE(IsTextureEXT)
|
||||
#define glIsTexture MANGLE(IsTexture)
|
||||
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
|
||||
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
|
||||
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
|
||||
#define glIsVertexArray MANGLE(IsVertexArray)
|
||||
#define glIsVertexAttribEnabledAPPLE MANGLE(IsVertexAttribEnabledAPPLE)
|
||||
#define glLightEnviSGIX MANGLE(LightEnviSGIX)
|
||||
#define glLightf MANGLE(Lightf)
|
||||
#define glLightfv MANGLE(Lightfv)
|
||||
@@ -913,8 +861,6 @@
|
||||
#define glLoadTransposeMatrixf MANGLE(LoadTransposeMatrixf)
|
||||
#define glLockArraysEXT MANGLE(LockArraysEXT)
|
||||
#define glLogicOp MANGLE(LogicOp)
|
||||
#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
|
||||
#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
|
||||
#define glMap1d MANGLE(Map1d)
|
||||
#define glMap1f MANGLE(Map1f)
|
||||
#define glMap2d MANGLE(Map2d)
|
||||
@@ -931,10 +877,6 @@
|
||||
#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
|
||||
#define glMapParameterfvNV MANGLE(MapParameterfvNV)
|
||||
#define glMapParameterivNV MANGLE(MapParameterivNV)
|
||||
#define glMapVertexAttrib1dAPPLE MANGLE(MapVertexAttrib1dAPPLE)
|
||||
#define glMapVertexAttrib1fAPPLE MANGLE(MapVertexAttrib1fAPPLE)
|
||||
#define glMapVertexAttrib2dAPPLE MANGLE(MapVertexAttrib2dAPPLE)
|
||||
#define glMapVertexAttrib2fAPPLE MANGLE(MapVertexAttrib2fAPPLE)
|
||||
#define glMaterialf MANGLE(Materialf)
|
||||
#define glMaterialfv MANGLE(Materialfv)
|
||||
#define glMateriali MANGLE(Materiali)
|
||||
@@ -965,11 +907,9 @@
|
||||
#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
|
||||
#define glMinmaxEXT MANGLE(MinmaxEXT)
|
||||
#define glMinmax MANGLE(Minmax)
|
||||
#define glMinSampleShading MANGLE(MinSampleShading)
|
||||
#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
|
||||
#define glMultiDrawArrays MANGLE(MultiDrawArrays)
|
||||
#define glMultiDrawElementArrayAPPLE MANGLE(MultiDrawElementArrayAPPLE)
|
||||
#define glMultiDrawElementsBaseVertex MANGLE(MultiDrawElementsBaseVertex)
|
||||
#define glMultiDrawElementsEXT MANGLE(MultiDrawElementsEXT)
|
||||
#define glMultiDrawElements MANGLE(MultiDrawElements)
|
||||
#define glMultiDrawRangeElementArrayAPPLE MANGLE(MultiDrawRangeElementArrayAPPLE)
|
||||
@@ -1087,8 +1027,6 @@
|
||||
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
|
||||
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
|
||||
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
|
||||
#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV)
|
||||
#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV)
|
||||
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
|
||||
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
|
||||
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
|
||||
@@ -1120,7 +1058,6 @@
|
||||
#define glNormal3iv MANGLE(Normal3iv)
|
||||
#define glNormal3s MANGLE(Normal3s)
|
||||
#define glNormal3sv MANGLE(Normal3sv)
|
||||
#define glNormalFormatNV MANGLE(NormalFormatNV)
|
||||
#define glNormalPointerEXT MANGLE(NormalPointerEXT)
|
||||
#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
|
||||
#define glNormalPointer MANGLE(NormalPointer)
|
||||
@@ -1135,8 +1072,6 @@
|
||||
#define glNormalStream3ivATI MANGLE(NormalStream3ivATI)
|
||||
#define glNormalStream3sATI MANGLE(NormalStream3sATI)
|
||||
#define glNormalStream3svATI MANGLE(NormalStream3svATI)
|
||||
#define glObjectPurgeableAPPLE MANGLE(ObjectPurgeableAPPLE)
|
||||
#define glObjectUnpurgeableAPPLE MANGLE(ObjectUnpurgeableAPPLE)
|
||||
#define glOrtho MANGLE(Ortho)
|
||||
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
|
||||
#define glPassThrough MANGLE(PassThrough)
|
||||
@@ -1227,7 +1162,6 @@
|
||||
#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV)
|
||||
#define glProgramParameteriARB MANGLE(ProgramParameteriARB)
|
||||
#define glProgramParameteriEXT MANGLE(ProgramParameteriEXT)
|
||||
#define glProgramParameteri MANGLE(ProgramParameteri)
|
||||
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
|
||||
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
|
||||
#define glProgramStringARB MANGLE(ProgramStringARB)
|
||||
@@ -1264,11 +1198,8 @@
|
||||
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
|
||||
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
|
||||
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
|
||||
#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
|
||||
#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
|
||||
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
|
||||
#define glProvokingVertexEXT MANGLE(ProvokingVertexEXT)
|
||||
#define glProvokingVertex MANGLE(ProvokingVertex)
|
||||
#define glPushAttrib MANGLE(PushAttrib)
|
||||
#define glPushClientAttribDefaultEXT MANGLE(PushClientAttribDefaultEXT)
|
||||
#define glPushClientAttrib MANGLE(PushClientAttrib)
|
||||
@@ -1352,7 +1283,6 @@
|
||||
#define glSampleCoverage MANGLE(SampleCoverage)
|
||||
#define glSampleMapATI MANGLE(SampleMapATI)
|
||||
#define glSampleMaskEXT MANGLE(SampleMaskEXT)
|
||||
#define glSampleMaski MANGLE(SampleMaski)
|
||||
#define glSampleMaskIndexedNV MANGLE(SampleMaskIndexedNV)
|
||||
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
|
||||
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
|
||||
@@ -1394,7 +1324,6 @@
|
||||
#define glSecondaryColor3us MANGLE(SecondaryColor3us)
|
||||
#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
|
||||
#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
|
||||
#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
|
||||
#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
|
||||
#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
|
||||
#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
|
||||
@@ -1508,7 +1437,6 @@
|
||||
#define glTexCoord4iv MANGLE(TexCoord4iv)
|
||||
#define glTexCoord4s MANGLE(TexCoord4s)
|
||||
#define glTexCoord4sv MANGLE(TexCoord4sv)
|
||||
#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
|
||||
#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
|
||||
#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
|
||||
#define glTexCoordPointer MANGLE(TexCoordPointer)
|
||||
@@ -1526,10 +1454,8 @@
|
||||
#define glTexGeniv MANGLE(TexGeniv)
|
||||
#define glTexImage1D MANGLE(TexImage1D)
|
||||
#define glTexImage2D MANGLE(TexImage2D)
|
||||
#define glTexImage2DMultisample MANGLE(TexImage2DMultisample)
|
||||
#define glTexImage3DEXT MANGLE(TexImage3DEXT)
|
||||
#define glTexImage3D MANGLE(TexImage3D)
|
||||
#define glTexImage3DMultisample MANGLE(TexImage3DMultisample)
|
||||
#define glTexImage4DSGIS MANGLE(TexImage4DSGIS)
|
||||
#define glTexParameterf MANGLE(TexParameterf)
|
||||
#define glTexParameterfv MANGLE(TexParameterfv)
|
||||
@@ -1547,7 +1473,6 @@
|
||||
#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT)
|
||||
#define glTexSubImage3D MANGLE(TexSubImage3D)
|
||||
#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS)
|
||||
#define glTextureBarrierNV MANGLE(TextureBarrierNV)
|
||||
#define glTextureBufferEXT MANGLE(TextureBufferEXT)
|
||||
#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS)
|
||||
#define glTextureImage1DEXT MANGLE(TextureImage1DEXT)
|
||||
@@ -1562,7 +1487,6 @@
|
||||
#define glTextureParameterIivEXT MANGLE(TextureParameterIivEXT)
|
||||
#define glTextureParameterIuivEXT MANGLE(TextureParameterIuivEXT)
|
||||
#define glTextureParameterivEXT MANGLE(TextureParameterivEXT)
|
||||
#define glTextureRangeAPPLE MANGLE(TextureRangeAPPLE)
|
||||
#define glTextureRenderbufferEXT MANGLE(TextureRenderbufferEXT)
|
||||
#define glTextureSubImage1DEXT MANGLE(TextureSubImage1DEXT)
|
||||
#define glTextureSubImage2DEXT MANGLE(TextureSubImage2DEXT)
|
||||
@@ -1636,8 +1560,6 @@
|
||||
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
|
||||
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
|
||||
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
|
||||
#define glUniformui64NV MANGLE(Uniformui64NV)
|
||||
#define glUniformui64vNV MANGLE(Uniformui64vNV)
|
||||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
|
||||
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
|
||||
#define glUnmapBuffer MANGLE(UnmapBuffer)
|
||||
@@ -1646,7 +1568,6 @@
|
||||
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
|
||||
#define glUseProgram MANGLE(UseProgram)
|
||||
#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
|
||||
#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT)
|
||||
#define glValidateProgramARB MANGLE(ValidateProgramARB)
|
||||
#define glValidateProgram MANGLE(ValidateProgram)
|
||||
#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
|
||||
@@ -1800,7 +1721,6 @@
|
||||
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
|
||||
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
|
||||
#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB)
|
||||
#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV)
|
||||
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
|
||||
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
|
||||
#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
|
||||
@@ -1841,7 +1761,6 @@
|
||||
#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv)
|
||||
#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
|
||||
#define glVertexAttribI4usv MANGLE(VertexAttribI4usv)
|
||||
#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
|
||||
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
|
||||
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
|
||||
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
|
||||
@@ -1867,7 +1786,6 @@
|
||||
#define glVertexBlendARB MANGLE(VertexBlendARB)
|
||||
#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
|
||||
#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
|
||||
#define glVertexFormatNV MANGLE(VertexFormatNV)
|
||||
#define glVertexPointerEXT MANGLE(VertexPointerEXT)
|
||||
#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
|
||||
#define glVertexPointer MANGLE(VertexPointer)
|
||||
@@ -1909,12 +1827,7 @@
|
||||
#define glVertexWeighthNV MANGLE(VertexWeighthNV)
|
||||
#define glVertexWeighthvNV MANGLE(VertexWeighthvNV)
|
||||
#define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT)
|
||||
#define glVideoCaptureNV MANGLE(VideoCaptureNV)
|
||||
#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV)
|
||||
#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV)
|
||||
#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV)
|
||||
#define glViewport MANGLE(Viewport)
|
||||
#define glWaitSync MANGLE(WaitSync)
|
||||
#define glWeightbvARB MANGLE(WeightbvARB)
|
||||
#define glWeightdvARB MANGLE(WeightdvARB)
|
||||
#define glWeightfvARB MANGLE(WeightfvARB)
|
||||
|
12262
include/GL/glew.h
Normal file
12262
include/GL/glew.h
Normal file
File diff suppressed because it is too large
Load Diff
4927
include/GL/glext.h
4927
include/GL/glext.h
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user