Compare commits
	
		
			102 Commits
		
	
	
		
			android-x8
			...
			mesa_7_0_1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | ae16a51e95 | ||
|  | 4398d67546 | ||
|  | c93738687c | ||
|  | 799492e606 | ||
|  | f33ff071bb | ||
|  | 99e854743c | ||
|  | 6f79062d91 | ||
|  | 2f682c3995 | ||
|  | 067370e68f | ||
|  | 2aa439a6a4 | ||
|  | b477182dc3 | ||
|  | a8964ca89e | ||
|  | 4f0e92d07c | ||
|  | 577f4e8a5f | ||
|  | 0586d9fe56 | ||
|  | 1f0d9bf05e | ||
|  | 8bcae2a527 | ||
|  | 35ca9aae91 | ||
|  | 6cdd2bf8d7 | ||
|  | ce7d175adb | ||
|  | 1904fd095f | ||
|  | 897d0ac5cc | ||
|  | e262d0182f | ||
|  | aa5b748c10 | ||
|  | 3c182c5bc8 | ||
|  | 1b5677847b | ||
|  | 1be59a9dbe | ||
|  | 55c2178ad4 | ||
|  | 3e3d392e1c | ||
|  | 756a7a4e4b | ||
|  | 121b4ac220 | ||
|  | cdbd5db3af | ||
|  | b2240f6ad4 | ||
|  | 33814a55f8 | ||
|  | a57c5a417b | ||
|  | ff1a28de17 | ||
|  | 772f57f99b | ||
|  | dacee32b8b | ||
|  | fa1a3eb06d | ||
|  | bd4817ca54 | ||
|  | 005eea249c | ||
|  | 9747de8ec6 | ||
|  | 849a9799d0 | ||
|  | e32ae4fe33 | ||
|  | 4595389c4c | ||
|  | e8ccc7cc49 | ||
|  | 673d21047a | ||
|  | fdefc2bbda | ||
|  | 2079df8527 | ||
|  | b53659452c | ||
|  | 46f1d6653e | ||
|  | c1938a60f7 | ||
|  | d65110f352 | ||
|  | 9fa3bbcb5a | ||
|  | 99d62f2922 | ||
|  | 284743cafe | ||
|  | 08d7307b2a | ||
|  | ef6a64abe6 | ||
|  | 18bfa52ef7 | ||
|  | d62be2652c | ||
|  | ea53ff80af | ||
|  | feeca1bcbc | ||
|  | 12e7278c08 | ||
|  | 45b5c44eb9 | ||
|  | e3456c1028 | ||
|  | 327fb38573 | ||
|  | 1d25d9e15f | ||
|  | cc7cee3f48 | ||
|  | d7062710cd | ||
|  | 9bfba734d8 | ||
|  | aaebf2f47e | ||
|  | 23f8d77b38 | ||
|  | 87d22ee0fe | ||
|  | 52e25f63d4 | ||
|  | f3fb67972b | ||
|  | 6400756364 | ||
|  | d59f0314bd | ||
|  | 131baefac3 | ||
|  | a450078b67 | ||
|  | f6b041bf6c | ||
|  | 4f340d181a | ||
|  | b58e38e936 | ||
|  | 8713cb48a8 | ||
|  | 277c5e57ed | ||
|  | b3d62d5af5 | ||
|  | 9c0f0c8d81 | ||
|  | 18a0a2a7ac | ||
|  | 8b99d9e33c | ||
|  | 01e7e153e3 | ||
|  | 0ad4ca24d2 | ||
|  | 724a155552 | ||
|  | d38b74a316 | ||
|  | 54cab4b47b | ||
|  | c093666bc5 | ||
|  | 04972f6761 | ||
|  | 67f8234622 | ||
|  | 201d6dbd9c | ||
|  | fbcac5aa83 | ||
|  | 2b72ab8f8f | ||
|  | 0ea97b9408 | ||
|  | 28683ac7c0 | ||
|  | c72e3e210f | 
| @@ -1,10 +0,0 @@ | ||||
| ;; -*- emacs-lisp -*- | ||||
| ;; | ||||
| ;; This file is processed by the dirvars emacs package.  Each variable | ||||
| ;; setting below is performed when this dirvars file is loaded. | ||||
| ;; | ||||
| indent-tabs-mode: nil | ||||
| tab-width: 8 | ||||
| c-basic-offset: 3 | ||||
| kde-emacs-after-parent-string: "" | ||||
| evaluate: (c-set-offset 'inline-open '0) | ||||
							
								
								
									
										4
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							| @@ -1,4 +0,0 @@ | ||||
| *.dsp -crlf | ||||
| *.dsw -crlf | ||||
| *.sln -crlf | ||||
| *.vcproj -crlf | ||||
							
								
								
									
										17
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,13 +1,5 @@ | ||||
| *.a | ||||
| *.dll | ||||
| *.exe | ||||
| *.ilk | ||||
| *.o | ||||
| *.obj | ||||
| *.pc | ||||
| *.pdb | ||||
| *.pyc | ||||
| *.pyo | ||||
| *.so | ||||
| *.sw[a-z] | ||||
| *~ | ||||
| @@ -15,12 +7,3 @@ depend | ||||
| depend.bak | ||||
| lib | ||||
| lib64 | ||||
| configure | ||||
| autom4te.cache | ||||
| aclocal.m4 | ||||
| config.log | ||||
| config.status | ||||
| cscope* | ||||
| .scon* | ||||
| config.py | ||||
| build | ||||
|   | ||||
| @@ -1 +0,0 @@ | ||||
| include $(call all-subdir-makefiles) | ||||
							
								
								
									
										230
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										230
									
								
								Makefile
									
									
									
									
									
								
							| @@ -1,5 +1,7 @@ | ||||
| # Top-level Mesa makefile | ||||
|  | ||||
| SHELL = /bin/bash | ||||
|  | ||||
| TOP = . | ||||
|  | ||||
| SUBDIRS = src progs | ||||
| @@ -12,33 +14,29 @@ default: $(TOP)/configs/current | ||||
| 		fi \ | ||||
| 	done | ||||
|  | ||||
| all: default | ||||
|  | ||||
|  | ||||
| doxygen: | ||||
| 	cd doxygen && $(MAKE) | ||||
| 	(cd doxygen ; make) ; \ | ||||
|  | ||||
| clean: | ||||
| 	-@touch $(TOP)/configs/current | ||||
| 	-@for dir in $(SUBDIRS) ; do \ | ||||
| 	@for dir in $(SUBDIRS) ; do \ | ||||
| 		if [ -d $$dir ] ; then \ | ||||
| 			(cd $$dir && $(MAKE) clean) ; \ | ||||
| 		fi \ | ||||
| 	done | ||||
| 	-@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current | ||||
|  | ||||
|  | ||||
| realclean: clean | ||||
| realclean: | ||||
| 	touch $(TOP)/configs/current | ||||
| 	$(MAKE) clean | ||||
| 	-rm -rf lib* | ||||
| 	-rm -f $(TOP)/configs/current | ||||
| 	-rm -f $(TOP)/configs/autoconf | ||||
| 	-rm -rf autom4te.cache | ||||
| 	-find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \ | ||||
| 	  -name depend -o -name depend.bak ')' -exec rm -f '{}' ';' | ||||
| 	-rm -f `find . -name \*.o` | ||||
| 	-rm -f `find . -name \*.a` | ||||
| 	-rm -f `find . -name \*.so` | ||||
| 	-rm -f `find . -name depend` | ||||
|  | ||||
|  | ||||
| distclean: realclean | ||||
|  | ||||
|  | ||||
| install: | ||||
| 	@for dir in $(SUBDIRS) ; do \ | ||||
| @@ -48,20 +46,18 @@ install: | ||||
| 	done | ||||
|  | ||||
|  | ||||
| .PHONY: default doxygen clean realclean distclean install linux-directfb-install | ||||
| # DirectFBGL module installation | ||||
| linux-directfb-install: | ||||
| 	cd src/mesa/drivers/directfb && $(MAKE) install | ||||
|  | ||||
| # If there's no current configuration file | ||||
| $(TOP)/configs/current: | ||||
| 	@echo | ||||
| 	@echo | ||||
| 	@echo "Please choose a configuration from the following list:" | ||||
| 	@ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*" | ||||
| 	@ls -1 $(TOP)/configs | grep -v "current\|default\|CVS" | ||||
| 	@echo | ||||
| 	@echo "Then type 'make <config>' (ex: 'make linux-x86')" | ||||
| 	@echo | ||||
| 	@echo "Or, run './configure' then 'make'" | ||||
| 	@echo "See './configure --help' for details" | ||||
| 	@echo | ||||
| 	@echo "(ignore the following error message)" | ||||
| 	@exit 1 | ||||
|  | ||||
| @@ -72,16 +68,12 @@ aix-64 \ | ||||
| aix-64-static \ | ||||
| aix-gcc \ | ||||
| aix-static \ | ||||
| autoconf \ | ||||
| bluegene-osmesa \ | ||||
| bluegene-xlc-osmesa \ | ||||
| beos \ | ||||
| catamount-osmesa-pgi \ | ||||
| bluegene-osmesa \ | ||||
| darwin \ | ||||
| darwin-fat-32bit \ | ||||
| darwin-fat-all \ | ||||
| darwin-static \ | ||||
| darwin-static-x86ppc \ | ||||
| darwin-x86ppc \ | ||||
| freebsd \ | ||||
| freebsd-dri \ | ||||
| freebsd-dri-amd64 \ | ||||
| @@ -105,12 +97,8 @@ irix6-n32-static \ | ||||
| irix6-o32 \ | ||||
| irix6-o32-static \ | ||||
| linux \ | ||||
| mine \ | ||||
| mine-dri \ | ||||
| linux-alpha \ | ||||
| linux-alpha-static \ | ||||
| linux-cell \ | ||||
| linux-cell-debug \ | ||||
| linux-debug \ | ||||
| linux-directfb \ | ||||
| linux-dri \ | ||||
| @@ -119,7 +107,6 @@ linux-dri-x86 \ | ||||
| linux-dri-x86-64 \ | ||||
| linux-dri-ppc \ | ||||
| linux-dri-xcb \ | ||||
| linux-egl \ | ||||
| linux-indirect \ | ||||
| linux-fbdev \ | ||||
| linux-glide \ | ||||
| @@ -127,15 +114,12 @@ linux-ia64-icc \ | ||||
| linux-ia64-icc-static \ | ||||
| linux-icc \ | ||||
| linux-icc-static \ | ||||
| linux-llvm \ | ||||
| linux-osmesa \ | ||||
| linux-osmesa-static \ | ||||
| linux-osmesa16 \ | ||||
| linux-osmesa16-static \ | ||||
| linux-osmesa32 \ | ||||
| linux-ppc \ | ||||
| linux-ppc-static \ | ||||
| linux-profile \ | ||||
| linux-solo \ | ||||
| linux-solo-x86 \ | ||||
| linux-solo-ia64 \ | ||||
| @@ -149,10 +133,8 @@ linux-x86-debug \ | ||||
| linux-x86-32 \ | ||||
| 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 \ | ||||
| openbsd \ | ||||
| @@ -174,7 +156,7 @@ sunos5-v9 \ | ||||
| sunos5-v9-static \ | ||||
| sunos5-v9-cc-g++ \ | ||||
| ultrix-gcc: | ||||
| 	@ if test -f configs/current || test -L configs/current ; then \ | ||||
| 	@ if [ -e configs/current ] ; then \ | ||||
| 		echo "Please run 'make realclean' before changing configs" ; \ | ||||
| 		exit 1 ; \ | ||||
| 	fi | ||||
| @@ -184,24 +166,17 @@ ultrix-gcc: | ||||
|  | ||||
| # Rules for making release tarballs | ||||
|  | ||||
| VERSION=7.7-devel | ||||
| DIRECTORY = Mesa-$(VERSION) | ||||
| LIB_NAME = MesaLib-$(VERSION) | ||||
| DEMO_NAME = MesaDemos-$(VERSION) | ||||
| GLUT_NAME = MesaGLUT-$(VERSION) | ||||
| DIRECTORY = Mesa-7.0.1 | ||||
| LIB_NAME = MesaLib-7.0.1 | ||||
| DEMO_NAME = MesaDemos-7.0.1 | ||||
| GLUT_NAME = MesaGLUT-7.0.1 | ||||
|  | ||||
| MAIN_FILES = \ | ||||
| 	$(DIRECTORY)/Makefile*						\ | ||||
| 	$(DIRECTORY)/configure						\ | ||||
| 	$(DIRECTORY)/configure.ac					\ | ||||
| 	$(DIRECTORY)/acinclude.m4					\ | ||||
| 	$(DIRECTORY)/aclocal.m4						\ | ||||
| 	$(DIRECTORY)/bin/config.guess					\ | ||||
| 	$(DIRECTORY)/bin/config.sub					\ | ||||
| 	$(DIRECTORY)/bin/install-sh					\ | ||||
| 	$(DIRECTORY)/descrip.mms					\ | ||||
| 	$(DIRECTORY)/mms-config.					\ | ||||
| 	$(DIRECTORY)/bin/mklib						\ | ||||
| 	$(DIRECTORY)/bin/minstall					\ | ||||
| 	$(DIRECTORY)/bin/version.mk					\ | ||||
| 	$(DIRECTORY)/configs/[a-z]*					\ | ||||
| 	$(DIRECTORY)/docs/*.html					\ | ||||
| 	$(DIRECTORY)/docs/COPYING					\ | ||||
| @@ -209,7 +184,9 @@ MAIN_FILES = \ | ||||
| 	$(DIRECTORY)/docs/RELNOTES*					\ | ||||
| 	$(DIRECTORY)/docs/*.spec					\ | ||||
| 	$(DIRECTORY)/include/GL/internal/glcore.h			\ | ||||
| 	$(DIRECTORY)/include/GL/amesa.h					\ | ||||
| 	$(DIRECTORY)/include/GL/dmesa.h					\ | ||||
| 	$(DIRECTORY)/include/GL/fxmesa.h				\ | ||||
| 	$(DIRECTORY)/include/GL/ggimesa.h				\ | ||||
| 	$(DIRECTORY)/include/GL/gl.h					\ | ||||
| 	$(DIRECTORY)/include/GL/glext.h					\ | ||||
| @@ -224,51 +201,63 @@ MAIN_FILES = \ | ||||
| 	$(DIRECTORY)/include/GL/mglmesa.h				\ | ||||
| 	$(DIRECTORY)/include/GL/osmesa.h				\ | ||||
| 	$(DIRECTORY)/include/GL/svgamesa.h				\ | ||||
| 	$(DIRECTORY)/include/GL/ugl*.h					\ | ||||
| 	$(DIRECTORY)/include/GL/vms_x_fix.h				\ | ||||
| 	$(DIRECTORY)/include/GL/wglext.h				\ | ||||
| 	$(DIRECTORY)/include/GL/wmesa.h					\ | ||||
| 	$(DIRECTORY)/include/GL/xmesa.h					\ | ||||
| 	$(DIRECTORY)/include/GL/xmesa_x.h				\ | ||||
| 	$(DIRECTORY)/include/GL/xmesa_xf86.h				\ | ||||
| 	$(DIRECTORY)/include/GLView.h					\ | ||||
| 	$(DIRECTORY)/src/Makefile					\ | ||||
| 	$(DIRECTORY)/src/descrip.mms					\ | ||||
| 	$(DIRECTORY)/src/mesa/Makefile*					\ | ||||
| 	$(DIRECTORY)/src/mesa/sources.mak				\ | ||||
| 	$(DIRECTORY)/src/mesa/sources					\ | ||||
| 	$(DIRECTORY)/src/mesa/descrip.mms				\ | ||||
| 	$(DIRECTORY)/src/mesa/gl.pc.in					\ | ||||
| 	$(DIRECTORY)/src/mesa/osmesa.pc.in				\ | ||||
| 	$(DIRECTORY)/src/mesa/depend					\ | ||||
| 	$(DIRECTORY)/src/mesa/main/*.[chS]				\ | ||||
| 	$(DIRECTORY)/src/mesa/main/descrip.mms				\ | ||||
| 	$(DIRECTORY)/src/mesa/main/sources				\ | ||||
| 	$(DIRECTORY)/src/mesa/glapi/*.[chS]				\ | ||||
| 	$(DIRECTORY)/src/mesa/glapi/descrip.mms				\ | ||||
| 	$(DIRECTORY)/src/mesa/glapi/sources				\ | ||||
| 	$(DIRECTORY)/src/mesa/math/*.[ch]				\ | ||||
| 	$(DIRECTORY)/src/mesa/math/descrip.mms				\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/*.[chly]				\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/Makefile				\ | ||||
| 	$(DIRECTORY)/src/mesa/math/sources				\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/*.[ch]				\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/descrip.mms			\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/sources				\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/grammar/*.[ch]			\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/grammar/descrip.mms		\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/grammar/sources			\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/slang/*.[ch]			\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/slang/descrip.mms			\ | ||||
| 	$(DIRECTORY)/src/mesa/shader/slang/sources			\ | ||||
| 	$(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/sources				\ | ||||
| 	$(DIRECTORY)/src/mesa/swrast_setup/*.[ch]			\ | ||||
| 	$(DIRECTORY)/src/mesa/swrast_setup/descrip.mms			\ | ||||
| 	$(DIRECTORY)/src/mesa/swrast_setup/sources			\ | ||||
| 	$(DIRECTORY)/src/mesa/vbo/*.[chS]				\ | ||||
| 	$(DIRECTORY)/src/mesa/vbo/descrip.mms				\ | ||||
| 	$(DIRECTORY)/src/mesa/tnl/*.[chS]				\ | ||||
| 	$(DIRECTORY)/src/mesa/tnl/descrip.mms				\ | ||||
| 	$(DIRECTORY)/src/mesa/tnl/sources				\ | ||||
| 	$(DIRECTORY)/src/mesa/tnl_dd/*.[ch]				\ | ||||
| 	$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch]				\ | ||||
| 	$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/Makefile				\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/beos/*.cpp			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/beos/Makefile			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/common/*.[ch]			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/common/descrip.mms		\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/common/sources			\ | ||||
| 	$(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]			\ | ||||
| @@ -278,7 +267,6 @@ MAIN_FILES = \ | ||||
| 	$(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			\ | ||||
| @@ -286,11 +274,9 @@ MAIN_FILES = \ | ||||
| 	$(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/sources			\ | ||||
| 	$(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				\ | ||||
| @@ -303,83 +289,44 @@ MAIN_FILES = \ | ||||
| 	$(DIRECTORY)/progs/util/README					\ | ||||
| 	$(DIRECTORY)/progs/util/*.[ch]					\ | ||||
| 	$(DIRECTORY)/progs/util/sampleMakefile				\ | ||||
| 	$(DIRECTORY)/windows/VC8/ | ||||
|  | ||||
| ES_FILES = \ | ||||
| 	$(DIRECTORY)/include/GLES/*.h					\ | ||||
| 	$(DIRECTORY)/include/GLES2/*.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/EGL/*.h					\ | ||||
| 	$(DIRECTORY)/src/egl/Makefile					\ | ||||
| 	$(DIRECTORY)/src/egl/*/Makefile					\ | ||||
| 	$(DIRECTORY)/src/egl/*/*.[ch]					\ | ||||
| 	$(DIRECTORY)/src/egl/*/*/Makefile				\ | ||||
| 	$(DIRECTORY)/src/egl/*/*/*.[ch]					\ | ||||
|  | ||||
| GALLIUM_FILES = \ | ||||
| 	$(DIRECTORY)/src/mesa/state_tracker/*[ch]			\ | ||||
| 	$(DIRECTORY)/src/gallium/Makefile				\ | ||||
| 	$(DIRECTORY)/src/gallium/Makefile.template			\ | ||||
| 	$(DIRECTORY)/src/gallium/SConscript				\ | ||||
| 	$(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/*/*/*.py				\ | ||||
| 	$(DIRECTORY)/src/gallium/*/*/*.csv				\ | ||||
| 	$(DIRECTORY)/src/gallium/*/*/*/Makefile				\ | ||||
| 	$(DIRECTORY)/src/gallium/*/*/*/SConscript			\ | ||||
| 	$(DIRECTORY)/src/gallium/*/*/*/*.[ch]				\ | ||||
| 	$(DIRECTORY)/src/gallium/*/*/*/*.py				\ | ||||
| 	$(DIRECTORY)/src/gallium/*/*/*/*/Makefile			\ | ||||
| 	$(DIRECTORY)/src/gallium/*/*/*/*/*.[ch]				\ | ||||
| 	$(DIRECTORY)/vms/analyze_map.com				\ | ||||
| 	$(DIRECTORY)/vms/xlib.opt					\ | ||||
| 	$(DIRECTORY)/vms/xlib_share.opt					\ | ||||
| 	$(DIRECTORY)/windows/VC8/mesa/mesa.sln				\ | ||||
| 	$(DIRECTORY)/windows/VC8/mesa/gdi/gdi.vcproj			\ | ||||
| 	$(DIRECTORY)/windows/VC8/mesa/glu/glu.vcproj			\ | ||||
| 	$(DIRECTORY)/windows/VC8/mesa/mesa/mesa.vcproj			\ | ||||
| 	$(DIRECTORY)/windows/VC8/mesa/osmesa/osmesa.vcproj		\ | ||||
| 	$(DIRECTORY)/windows/VC8/progs/progs.sln			\ | ||||
| 	$(DIRECTORY)/windows/VC8/progs/demos/gears.vcproj		\ | ||||
| 	$(DIRECTORY)/windows/VC8/progs/glut/glut.vcproj | ||||
|  | ||||
|  | ||||
| DRI_FILES = \ | ||||
| 	$(DIRECTORY)/include/GL/internal/dri_interface.h		\ | ||||
| 	$(DIRECTORY)/include/GL/internal/glcore.h			\ | ||||
| 	$(DIRECTORY)/include/GL/internal/sarea.h			\ | ||||
| 	$(DIRECTORY)/src/glx/Makefile					\ | ||||
| 	$(DIRECTORY)/src/glx/x11/Makefile				\ | ||||
| 	$(DIRECTORY)/src/glx/x11/*.[ch]					\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/dri/Makefile			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template		\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/dri/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/*/*/*.[chS]			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/dri/*/*/Makefile			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile			\ | ||||
| 	$(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch] | ||||
|  | ||||
| SGI_GLU_FILES = \ | ||||
| 	$(DIRECTORY)/src/glu/Makefile					\ | ||||
| 	$(DIRECTORY)/src/glu/glu.pc.in					\ | ||||
| 	$(DIRECTORY)/src/glu/descrip.mms				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/Makefile				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/Makefile.mgw				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/Makefile.win				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/Makefile.DJ				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/glu.def				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/dummy.cc				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/glu.exports				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/glu.exports.darwin			\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/descrip.mms				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/mesaglu.opt				\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/include/gluos.h			\ | ||||
| 	$(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h			\ | ||||
| @@ -406,20 +353,9 @@ GLW_FILES = \ | ||||
| 	$(DIRECTORY)/src/glw/*.[ch]			\ | ||||
| 	$(DIRECTORY)/src/glw/Makefile*			\ | ||||
| 	$(DIRECTORY)/src/glw/README			\ | ||||
| 	$(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			\ | ||||
| @@ -435,6 +371,7 @@ DEMO_FILES = \ | ||||
| 	$(DIRECTORY)/progs/osdemos/Makefile		\ | ||||
| 	$(DIRECTORY)/progs/osdemos/*.c			\ | ||||
| 	$(DIRECTORY)/progs/xdemos/Makefile*		\ | ||||
| 	$(DIRECTORY)/progs/xdemos/descrip.mms		\ | ||||
| 	$(DIRECTORY)/progs/xdemos/*.[chf]		\ | ||||
| 	$(DIRECTORY)/progs/redbook/Makefile*		\ | ||||
| 	$(DIRECTORY)/progs/redbook/README		\ | ||||
| @@ -444,13 +381,14 @@ DEMO_FILES = \ | ||||
| 	$(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/glsl/*.txt			\ | ||||
| 	$(DIRECTORY)/progs/windml/Makefile.ugl		\ | ||||
| 	$(DIRECTORY)/progs/windml/*.c			\ | ||||
| 	$(DIRECTORY)/progs/windml/*.bmp			\ | ||||
| 	$(DIRECTORY)/progs/ggi/*.c			\ | ||||
| 	$(DIRECTORY)/windows/VC6/progs/demos/*.dsp	\ | ||||
| 	$(DIRECTORY)/windows/VC6/progs/progs.dsw	\ | ||||
| 	$(DIRECTORY)/windows/VC7/progs/demos/*.vcproj	\ | ||||
| 	$(DIRECTORY)/windows/VC7/progs/progs.sln | ||||
|  | ||||
| GLUT_FILES = \ | ||||
| @@ -458,23 +396,21 @@ GLUT_FILES = \ | ||||
| 	$(DIRECTORY)/include/GL/glutf90.h		\ | ||||
| 	$(DIRECTORY)/src/glut/glx/Makefile*		\ | ||||
| 	$(DIRECTORY)/src/glut/glx/depend		\ | ||||
| 	$(DIRECTORY)/src/glut/glx/glut.pc.in		\ | ||||
| 	$(DIRECTORY)/src/glut/glx/*def			\ | ||||
| 	$(DIRECTORY)/src/glut/glx/descrip.mms		\ | ||||
| 	$(DIRECTORY)/src/glut/glx/mms_depend		\ | ||||
| 	$(DIRECTORY)/src/glut/glx/*.[ch]		\ | ||||
| 	$(DIRECTORY)/src/glut/beos/*.[ch]		\ | ||||
| 	$(DIRECTORY)/src/glut/beos/*.cpp		\ | ||||
| 	$(DIRECTORY)/src/glut/beos/Makefile		\ | ||||
| 	$(DIRECTORY)/src/glut/dos/*.[ch]		\ | ||||
| 	$(DIRECTORY)/src/glut/dos/Makefile.DJ		\ | ||||
| 	$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS]		\ | ||||
| 	$(DIRECTORY)/src/glut/ggi/*.[ch]		\ | ||||
| 	$(DIRECTORY)/src/glut/ggi/Makefile		\ | ||||
| 	$(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 | ||||
|  | ||||
| @@ -486,31 +422,13 @@ DEPEND_FILES = \ | ||||
| 	$(TOP)/src/glu/sgi/depend | ||||
|  | ||||
|  | ||||
| LIB_FILES = \ | ||||
| 	$(MAIN_FILES)		\ | ||||
| 	$(ES_FILES)		\ | ||||
| 	$(EGL_FILES)		\ | ||||
| 	$(GALLIUM_FILES)	\ | ||||
| 	$(DRI_FILES)		\ | ||||
| 	$(SGI_GLU_FILES)	\ | ||||
| 	$(GLW_FILES) | ||||
| LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES) | ||||
|  | ||||
|  | ||||
| # Everything for new a Mesa release: | ||||
| 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 | ||||
| tarballs: rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5 | ||||
|  | ||||
|  | ||||
| # Helper for autoconf builds | ||||
| ACLOCAL = aclocal | ||||
| ACLOCAL_FLAGS = | ||||
| AUTOCONF = autoconf | ||||
| AC_FLAGS = | ||||
| aclocal.m4: configure.ac acinclude.m4 | ||||
| 	$(ACLOCAL) $(ACLOCAL_FLAGS) | ||||
| configure: configure.ac aclocal.m4 acinclude.m4 | ||||
| 	$(AUTOCONF) $(AC_FLAGS) | ||||
|  | ||||
| rm_depend: | ||||
| 	@for dep in $(DEPEND_FILES) ; do \ | ||||
| 		rm -f $$dep ; \ | ||||
| @@ -519,7 +437,6 @@ rm_depend: | ||||
|  | ||||
| lib_gz: | ||||
| 	rm -f configs/current ; \ | ||||
| 	rm -f configs/autoconf ; \ | ||||
| 	cd .. ; \ | ||||
| 	tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \ | ||||
| 	gzip $(LIB_NAME).tar ; \ | ||||
| @@ -539,7 +456,6 @@ glut_gz: | ||||
|  | ||||
| lib_bz2: | ||||
| 	rm -f configs/current ; \ | ||||
| 	rm -f configs/autoconf ; \ | ||||
| 	cd .. ; \ | ||||
| 	tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \ | ||||
| 	bzip2 $(LIB_NAME).tar ; \ | ||||
| @@ -559,7 +475,6 @@ glut_bz2: | ||||
|  | ||||
| lib_zip: | ||||
| 	rm -f configs/current ; \ | ||||
| 	rm -f configs/autoconf ; \ | ||||
| 	rm -f $(LIB_NAME).zip ; \ | ||||
| 	cd .. ; \ | ||||
| 	zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \ | ||||
| @@ -587,6 +502,3 @@ md5: | ||||
| 	@-md5sum $(GLUT_NAME).tar.gz | ||||
| 	@-md5sum $(GLUT_NAME).tar.bz2 | ||||
| 	@-md5sum $(GLUT_NAME).zip | ||||
|  | ||||
| .PHONY: tarballs rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 \ | ||||
| 	glut_bz2 lib_zip demo_zip glut_zip md5 | ||||
|   | ||||
							
								
								
									
										88
									
								
								Makefile.DJ
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								Makefile.DJ
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,88 @@ | ||||
| # Mesa 3-D graphics library | ||||
| # Version:  4.0 | ||||
| #  | ||||
| # Copyright (C) 1999  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 makefile for Mesa | ||||
| # | ||||
| #  Author: Daniel Borca | ||||
| #  Email : dborca@users.sourceforge.net | ||||
| #  Web   : http://www.geocities.com/dborca | ||||
|  | ||||
|  | ||||
| # | ||||
| #  Available options: | ||||
| # | ||||
| #    Environment variables: | ||||
| #	GLIDE		path to Glide3 SDK; used with FX. | ||||
| #			default = $(TOP)/glide3 | ||||
| #	FX=1		build for 3dfx Glide3. Note that this disables | ||||
| #			compilation of most DMesa code and requires fxMesa. | ||||
| #			As a consequence, you'll need the DJGPP Glide3 | ||||
| #			library to build any application. | ||||
| #			default = no | ||||
| #	X86=1		optimize for x86 (if possible, use MMX, SSE, 3DNow). | ||||
| #			default = no | ||||
| # | ||||
| #    Targets: | ||||
| #	all:		build everything | ||||
| #	libgl:		build GL | ||||
| #	libglu:		build GLU | ||||
| #	libglut:	build GLUT | ||||
| #	clean:		remove object files | ||||
| #	realclean:	remove all generated files | ||||
| # | ||||
|  | ||||
|  | ||||
|  | ||||
| .PHONY : all libgl libglu libglut clean realclean | ||||
|  | ||||
| CFLAGS = -Wall -W -pedantic | ||||
| CFLAGS += -O2 -ffast-math | ||||
|  | ||||
| export CFLAGS | ||||
|  | ||||
| ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) | ||||
| UNLINK = del $(subst /,\,$(1)) | ||||
| else | ||||
| UNLINK = $(RM) $(1) | ||||
| endif | ||||
|  | ||||
| all: libgl libglu libglut | ||||
|  | ||||
| libgl: lib | ||||
| 	$(MAKE) -f Makefile.DJ -C src/mesa | ||||
| libglu: lib | ||||
| 	$(MAKE) -f Makefile.DJ -C src/glu/sgi | ||||
| libglut: lib | ||||
| 	$(MAKE) -f Makefile.DJ -C src/glut/dos | ||||
|  | ||||
| lib: | ||||
| 	mkdir lib | ||||
|  | ||||
| clean: | ||||
| 	$(MAKE) -f Makefile.DJ clean -C src/mesa | ||||
| 	$(MAKE) -f Makefile.DJ clean -C src/glu/mesa | ||||
| 	$(MAKE) -f Makefile.DJ clean -C src/glu/sgi | ||||
| 	$(MAKE) -f Makefile.DJ clean -C src/glut/dos | ||||
|  | ||||
| realclean: clean | ||||
| 	-$(call UNLINK,lib/*.a) | ||||
| 	-$(call UNLINK,lib/*.dxe) | ||||
							
								
								
									
										110
									
								
								Makefile.mgw
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										110
									
								
								Makefile.mgw
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,110 @@ | ||||
| # Mesa 3-D graphics library | ||||
| # Version:  4.0 | ||||
| #  | ||||
| # Copyright (C) 1999  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. | ||||
|  | ||||
| # MinGW makefile v1.2 for Mesa | ||||
| # | ||||
| #  Copyright (C) 2002 - Daniel Borca | ||||
| #  Email : dborca@users.sourceforge.net | ||||
| #  Web   : http://www.geocities.com/dborca | ||||
|  | ||||
|  | ||||
| # | ||||
| #  Available options: | ||||
| # | ||||
| #    Environment variables: | ||||
| #	GLIDE		path to Glide3 SDK; used with FX. | ||||
| #			default = $(TOP)/glide3 | ||||
| #	FX=1		build for 3dfx Glide3. Note that this disables | ||||
| #			compilation of most WMesa code and requires fxMesa. | ||||
| #			As a consequence, you'll need the Win32 Glide3 | ||||
| #			library to build any application. | ||||
| #			default = no | ||||
| #	ICD=1		build the installable client driver interface | ||||
| #			(windows opengl driver interface) | ||||
| #			default = no | ||||
| #	X86=1		optimize for x86 (if possible, use MMX, SSE, 3DNow). | ||||
| #			default = no | ||||
| # | ||||
| #    Targets: | ||||
| #	all:		build everything | ||||
| #	libgl:		build GL | ||||
| #	clean:		remove object files | ||||
| #	realclean:	remove all generated files | ||||
| # | ||||
|  | ||||
| # MinGW core makefile updated for Mesa 7.0 | ||||
| # | ||||
| #  Updated : by Heromyth, on 2007-7-21 | ||||
| #  Email   : zxpmyth@yahoo.com.cn | ||||
| #  Bugs    : 1) All the default settings work fine. But the setting X86=1 can't work.  | ||||
| #            The others havn't been tested yet. | ||||
| #            2) The generated DLLs are *not* compatible with the ones built | ||||
| #            with the other compilers like VC8, especially for GLUT.  | ||||
| #            3) MAlthough more tests are needed, it can be used individually! | ||||
|  | ||||
|  | ||||
| .PHONY : all libgl clean realclean | ||||
|  | ||||
| ifeq ($(ICD),1) | ||||
|   # when -std=c99 mingw will not define WIN32 | ||||
|   CFLAGS = -Wall -Werror | ||||
| else | ||||
|   # I love c89 | ||||
|   CFLAGS = -Wall -pedantic | ||||
| endif | ||||
| CFLAGS += -O2 -ffast-math | ||||
|  | ||||
| export CFLAGS | ||||
|  | ||||
|  | ||||
| ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) | ||||
| UNLINK = del $(subst /,\,$(1)) | ||||
| else | ||||
| UNLINK = $(RM) $(1) | ||||
| endif | ||||
|  | ||||
| all: libgl libglu libglut example | ||||
|  | ||||
| libgl: lib | ||||
| 	$(MAKE) -f Makefile.mgw -C src/mesa | ||||
|  | ||||
| libglu: libgl | ||||
| 	$(MAKE) -f Makefile.mgw -C src/glu/sgi | ||||
|  | ||||
| libglut: libglu  | ||||
| 	$(MAKE) -f Makefile.mgw -C src/glut/glx | ||||
|  | ||||
| example: libglut  | ||||
| 	$(MAKE) -f Makefile.mgw star -C progs/samples | ||||
| 	copy progs\samples\star.exe lib | ||||
|  | ||||
| lib: | ||||
| 	mkdir lib | ||||
|  | ||||
| clean: | ||||
| 	$(MAKE) -f Makefile.mgw clean -C src/mesa | ||||
| 	$(MAKE) -f Makefile.mgw clean -C src/glu/sgi | ||||
| 	$(MAKE) -f Makefile.mgw clean -C src/glut/glx | ||||
|  | ||||
| realclean: clean | ||||
| 	-$(call UNLINK,lib/*.a) | ||||
| 	-$(call UNLINK,lib/*.dll) | ||||
							
								
								
									
										167
									
								
								SConstruct
									
									
									
									
									
								
							
							
						
						
									
										167
									
								
								SConstruct
									
									
									
									
									
								
							| @@ -1,167 +0,0 @@ | ||||
| ####################################################################### | ||||
| # Top-level SConstruct | ||||
| # | ||||
| # For example, invoke scons as  | ||||
| # | ||||
| #   scons debug=1 dri=0 machine=x86 | ||||
| # | ||||
| # to set configuration variables. Or you can write those options to a file | ||||
| # named config.py: | ||||
| # | ||||
| #   # config.py | ||||
| #   debug=1 | ||||
| #   dri=0 | ||||
| #   machine='x86' | ||||
| #  | ||||
| # Invoke | ||||
| # | ||||
| #   scons -h | ||||
| # | ||||
| # to get the full list of options. See scons manpage for more info. | ||||
| #   | ||||
|  | ||||
| import os | ||||
| import os.path | ||||
| import sys | ||||
|  | ||||
| import common | ||||
|  | ||||
| ####################################################################### | ||||
| # Configuration options | ||||
|  | ||||
| default_statetrackers = 'mesa' | ||||
|  | ||||
| if common.default_platform in ('linux', 'freebsd', 'darwin'): | ||||
| 	default_drivers = 'softpipe,failover,i915simple,trace,identity,llvmpipe' | ||||
| 	default_winsys = 'xlib' | ||||
| elif common.default_platform in ('winddk',): | ||||
| 	default_drivers = 'softpipe,i915simple,trace,identity' | ||||
| 	default_winsys = 'all' | ||||
| else: | ||||
| 	default_drivers = 'all' | ||||
| 	default_winsys = 'all' | ||||
|  | ||||
| opts = Variables('config.py') | ||||
| common.AddOptions(opts) | ||||
| opts.Add(ListVariable('statetrackers', 'state trackers to build', default_statetrackers, | ||||
|                      ['mesa', 'python', 'xorg'])) | ||||
| opts.Add(ListVariable('drivers', 'pipe drivers to build', default_drivers, | ||||
|                      ['softpipe', 'failover', 'i915simple', 'i965simple', 'cell', 'trace', 'r300', 'identity', 'llvmpipe'])) | ||||
| opts.Add(ListVariable('winsys', 'winsys drivers to build', default_winsys, | ||||
|                      ['xlib', 'intel', 'gdi', 'radeon'])) | ||||
|  | ||||
| opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0'))) | ||||
|  | ||||
| env = Environment( | ||||
| 	options = opts, | ||||
| 	tools = ['gallium'], | ||||
| 	toolpath = ['#scons'],	 | ||||
| 	ENV = os.environ, | ||||
| ) | ||||
|  | ||||
| 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') | ||||
| msvc = platform in ('windows', 'winddk') | ||||
|  | ||||
| Export([ | ||||
| 	'debug',  | ||||
| 	'x86',  | ||||
| 	'ppc',  | ||||
| 	'dri',  | ||||
| 	'llvm', | ||||
| 	'platform', | ||||
| 	'gcc', | ||||
| 	'msvc', | ||||
| ]) | ||||
|  | ||||
|  | ||||
| ####################################################################### | ||||
| # Environment setup | ||||
|  | ||||
| # Includes | ||||
| env.Append(CPPPATH = [ | ||||
| 	'#/include', | ||||
| 	'#/src/gallium/include', | ||||
| 	'#/src/gallium/auxiliary', | ||||
| 	'#/src/gallium/drivers', | ||||
| ]) | ||||
|  | ||||
|  | ||||
| # Posix | ||||
| if platform in ('posix', 'linux', 'freebsd', 'darwin'): | ||||
| 	env.Append(CPPDEFINES = [ | ||||
| 		'_POSIX_SOURCE', | ||||
| 		('_POSIX_C_SOURCE', '199309L'),  | ||||
| 		'_SVID_SOURCE', | ||||
| 		'_BSD_SOURCE',  | ||||
| 		'_GNU_SOURCE', | ||||
| 		 | ||||
| 		'PTHREADS', | ||||
| 		'HAVE_POSIX_MEMALIGN', | ||||
| 	]) | ||||
| 	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() | ||||
|  | ||||
| Export('env') | ||||
|  | ||||
|  | ||||
| ####################################################################### | ||||
| # Invoke SConscripts | ||||
|  | ||||
| # TODO: Build several variants at the same time? | ||||
| # http://www.scons.org/wiki/SimultaneousVariantBuilds | ||||
|  | ||||
| SConscript( | ||||
| 	'src/SConscript', | ||||
| 	variant_dir = env['build'], | ||||
| 	duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html | ||||
| ) | ||||
							
								
								
									
										119
									
								
								acinclude.m4
									
									
									
									
									
								
							
							
						
						
									
										119
									
								
								acinclude.m4
									
									
									
									
									
								
							| @@ -1,119 +0,0 @@ | ||||
| # A few convenience macros for Mesa, mostly to keep all the platform | ||||
| # specifics out of configure.ac. | ||||
|  | ||||
| # MESA_PIC_FLAGS() | ||||
| # | ||||
| # Find out whether to build PIC code using the option --enable-pic and | ||||
| # the configure enable_static/enable_shared settings. If PIC is needed, | ||||
| # figure out the necessary flags for the platform and compiler. | ||||
| # | ||||
| # The platform checks have been shamelessly taken from libtool and | ||||
| # stripped down to just what's needed for Mesa. See _LT_COMPILER_PIC in | ||||
| # /usr/share/aclocal/libtool.m4 or | ||||
| # http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=blob;f=libltdl/m4/libtool.m4;hb=HEAD | ||||
| # | ||||
| AC_DEFUN([MESA_PIC_FLAGS], | ||||
| [AC_REQUIRE([AC_PROG_CC])dnl | ||||
| AC_ARG_VAR([PIC_FLAGS], [compiler flags for PIC code]) | ||||
| AC_ARG_ENABLE([pic], | ||||
|     [AS_HELP_STRING([--disable-pic], | ||||
|         [compile PIC objects @<:@default=enabled for shared builds | ||||
|         on supported platforms@:>@])], | ||||
|     [enable_pic="$enableval" | ||||
|     test "x$enable_pic" = x && enable_pic=auto], | ||||
|     [enable_pic=auto]) | ||||
| # disable PIC by default for static builds | ||||
| if test "$enable_pic" = auto && test "$enable_static" = yes; then | ||||
|     enable_pic=no | ||||
| fi | ||||
| # if PIC hasn't been explicitly disabled, try to figure out the flags | ||||
| if test "$enable_pic" != no; then | ||||
|     AC_MSG_CHECKING([for $CC option to produce PIC]) | ||||
|     # allow the user's flags to override | ||||
|     if test "x$PIC_FLAGS" = x; then | ||||
|         # see if we're using GCC | ||||
|         if test "x$GCC" = xyes; then | ||||
|             case "$host_os" in | ||||
|             aix*|beos*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*) | ||||
|                 # PIC is the default for these OSes. | ||||
|                 ;; | ||||
|             mingw*|os2*|pw32*) | ||||
|                 # This hack is so that the source file can tell whether | ||||
|                 # it is being built for inclusion in a dll (and should | ||||
|                 # export symbols for example). | ||||
|                 PIC_FLAGS="-DDLL_EXPORT" | ||||
|                 ;; | ||||
|             darwin*|rhapsody*) | ||||
|                 # PIC is the default on this platform | ||||
|                 # Common symbols not allowed in MH_DYLIB files | ||||
|                 PIC_FLAGS="-fno-common" | ||||
|                 ;; | ||||
|             hpux*) | ||||
|                 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, | ||||
|                 # but not for PA HP-UX. | ||||
|                 case $host_cpu in | ||||
|                 hppa*64*|ia64*) | ||||
|                     ;; | ||||
|                 *) | ||||
|                     PIC_FLAGS="-fPIC" | ||||
|                     ;; | ||||
|                 esac | ||||
|                 ;; | ||||
|             *) | ||||
|                 # Everyone else on GCC uses -fPIC | ||||
|                 PIC_FLAGS="-fPIC" | ||||
|                 ;; | ||||
|             esac | ||||
|         else # !GCC | ||||
|             case "$host_os" in | ||||
|             hpux9*|hpux10*|hpux11*) | ||||
|                 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, | ||||
|                 # but not for PA HP-UX. | ||||
|                 case "$host_cpu" in | ||||
|                 hppa*64*|ia64*) | ||||
|                     # +Z the default | ||||
|                     ;; | ||||
|                 *) | ||||
|                     PIC_FLAGS="+Z" | ||||
|                     ;; | ||||
|                 esac | ||||
|                 ;; | ||||
|             linux*|k*bsd*-gnu) | ||||
|                 case `basename "$CC"` in | ||||
|                 icc*|ecc*|ifort*) | ||||
|                     PIC_FLAGS="-KPIC" | ||||
|                     ;; | ||||
|                 pgcc*|pgf77*|pgf90*|pgf95*) | ||||
|                     # Portland Group compilers (*not* the Pentium gcc | ||||
|                     # compiler, which looks to be a dead project) | ||||
|                     PIC_FLAGS="-fpic" | ||||
|                     ;; | ||||
|                 ccc*) | ||||
|                     # All Alpha code is PIC. | ||||
|                     ;; | ||||
|                 xl*) | ||||
|                     # IBM XL C 8.0/Fortran 10.1 on PPC | ||||
|                     PIC_FLAGS="-qpic" | ||||
|                     ;; | ||||
|                 *) | ||||
|                     case `$CC -V 2>&1 | sed 5q` in | ||||
|                     *Sun\ C*|*Sun\ F*) | ||||
|                         # Sun C 5.9 or Sun Fortran | ||||
|                         PIC_FLAGS="-KPIC" | ||||
|                         ;; | ||||
|                     esac | ||||
|                 esac | ||||
|                 ;; | ||||
|             solaris*) | ||||
|                 PIC_FLAGS="-KPIC" | ||||
|                 ;; | ||||
|             sunos4*) | ||||
|                 PIC_FLAGS="-PIC" | ||||
|                 ;; | ||||
|             esac | ||||
|         fi # GCC | ||||
|     fi # PIC_FLAGS | ||||
|     AC_MSG_RESULT([$PIC_FLAGS]) | ||||
| fi | ||||
| AC_SUBST([PIC_FLAGS]) | ||||
| ])# MESA_PIC_FLAGS | ||||
							
								
								
									
										18
									
								
								autogen.sh
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								autogen.sh
									
									
									
									
									
								
							| @@ -1,18 +0,0 @@ | ||||
| #! /bin/sh | ||||
|  | ||||
| srcdir=`dirname "$0"` | ||||
| test -z "$srcdir" && srcdir=. | ||||
|  | ||||
| SRCDIR=`(cd "$srcdir" && pwd)` | ||||
| ORIGDIR=`pwd` | ||||
|  | ||||
| if test "x$SRCDIR" != "x$ORIGDIR"; then | ||||
| 	echo "Mesa cannot be built when srcdir != builddir" 1>&2 | ||||
| 	exit 1 | ||||
| fi | ||||
|  | ||||
| MAKEFLAGS="" | ||||
|  | ||||
| autoreconf -v --install || exit 1 | ||||
|  | ||||
| "$srcdir"/configure "$@" | ||||
| @@ -1,48 +0,0 @@ | ||||
| #!/bin/bash -e | ||||
|  | ||||
| usage() | ||||
| { | ||||
| 	echo "Usage: $0 <target1> <target2>" | ||||
| 	echo "Highlight differences between Mesa configs" | ||||
| 	echo "Example:" | ||||
| 	echo "  $0 linux linux-x86" | ||||
| } | ||||
|  | ||||
| die() | ||||
| { | ||||
| 	echo "$@" >&2 | ||||
| 	return 1 | ||||
| } | ||||
|  | ||||
| case "$1" in | ||||
| -h|--help) usage; exit 0;; | ||||
| esac | ||||
|  | ||||
| [ $# -lt 2 ] && die 2 targets needed. See $0 --help | ||||
| target1=$1 | ||||
| target2=$2 | ||||
|  | ||||
| topdir=$(cd "`dirname $0`"/..; pwd) | ||||
| cd "$topdir" | ||||
|  | ||||
| [ -f "./configs/$target1" ] || die Missing configs/$target1 | ||||
| [ -f "./configs/$target2" ] || die Missing configs/$target2 | ||||
|  | ||||
| trap 'rm -f "$t1" "$t2"' 0 | ||||
|  | ||||
| t1=$(mktemp) | ||||
| t2=$(mktemp) | ||||
|  | ||||
| make -f- -n -p <<EOF | sed '/^# Not a target/,/^$/d' > $t1 | ||||
| TOP = . | ||||
| include \$(TOP)/configs/$target1 | ||||
| default: | ||||
| EOF | ||||
|  | ||||
| make -f- -n -p <<EOF | sed '/^# Not a target/,/^$/d' > $t2 | ||||
| TOP = . | ||||
| include \$(TOP)/configs/$target2 | ||||
| default: | ||||
| EOF | ||||
|  | ||||
| diff -pu -I'^#' $t1 $t2 | ||||
							
								
								
									
										1555
									
								
								bin/config.guess
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1555
									
								
								bin/config.guess
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1685
									
								
								bin/config.sub
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1685
									
								
								bin/config.sub
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -1 +0,0 @@ | ||||
| minstall | ||||
							
								
								
									
										10
									
								
								bin/minstall
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								bin/minstall
									
									
									
									
									
								
							| @@ -42,8 +42,6 @@ if [ $# -ge 2 ] ; then | ||||
| 			exit 0 | ||||
| 		fi | ||||
|  | ||||
| 		PWDSAVE=`pwd` | ||||
|  | ||||
| 		# determine file's type | ||||
| 		if [ -h "$FILE" ] ; then | ||||
| 			#echo $FILE is a symlink | ||||
| @@ -59,6 +57,7 @@ if [ $# -ge 2 ] ; then | ||||
|  | ||||
| 			FILE=`basename "$FILE"` | ||||
| 			# Go to $DEST and make the link | ||||
| 			PWDSAVE="$PWD" | ||||
| 			cd "$DEST"        # pushd | ||||
| 				$RM "$FILE" | ||||
| 				$SYMLINK "$TARGET" "$FILE" | ||||
| @@ -66,11 +65,8 @@ if [ $# -ge 2 ] ; then | ||||
|  | ||||
| 		elif [ -f "$FILE" ] ; then | ||||
| 			#echo "$FILE" is a regular file | ||||
| 			# Only copy if the files differ | ||||
| 			if ! cmp -s $FILE $DEST/`basename $FILE`; then | ||||
| 				$RM "$DEST/`basename $FILE`" | ||||
| 				cp "$FILE" "$DEST" | ||||
| 			fi | ||||
| 			$RM "$DEST/`basename $FILE`" | ||||
| 			cp "$FILE" "$DEST" | ||||
| 			if [ $MODE ] ; then | ||||
| 				FILE=`basename "$FILE"` | ||||
| 				chmod $MODE "$DEST/$FILE" | ||||
|   | ||||
							
								
								
									
										261
									
								
								bin/mklib
									
									
									
									
									
								
							
							
						
						
									
										261
									
								
								bin/mklib
									
									
									
									
									
								
							| @@ -34,7 +34,6 @@ MINOR=0 | ||||
| PATCH="" | ||||
| DEPS="" | ||||
| LINK="" | ||||
| LDFLAGS="" | ||||
| CPLUSPLUS=0 | ||||
| STATIC=0 | ||||
| DLOPEN=0 | ||||
| @@ -43,7 +42,7 @@ ARCH="auto" | ||||
| ARCHOPT="" | ||||
| NOPREFIX=0 | ||||
| EXPORTS="" | ||||
| ID="" | ||||
|  | ||||
|  | ||||
| # | ||||
| # Parse arguments | ||||
| @@ -61,21 +60,17 @@ do | ||||
| 	    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 '  -LDIR         search in DIR for library dependencies' | ||||
| 	    echo '  -linker L     explicity specify the linker program to use (eg: gcc, g++)' | ||||
| 	    echo '                Not observed on all systems at this time.' | ||||
| 	    echo '  -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 | ||||
| 	    ;; | ||||
| @@ -99,27 +94,18 @@ do | ||||
| 	    shift 1; | ||||
| 	    LINK=$1 | ||||
| 	    ;; | ||||
| 	'-ldflags') | ||||
| 	    shift 1; | ||||
| 	    LDFLAGS=$1 | ||||
| 	    ;; | ||||
| 	-l*) | ||||
| 	    DEPS="$DEPS $1" | ||||
| 	    ;; | ||||
| 	-L*) | ||||
| 	    DEPS="$DEPS $1" | ||||
| 	    ;; | ||||
| 	-R*) | ||||
| 	    DEPS="$DEPS $1" | ||||
| 	    ;; | ||||
| 	-Wl*) | ||||
|             DEPS="$DEPS $1" | ||||
|             ;; | ||||
| 	-pthread) | ||||
| 	    # this is a special case (see bugzilla 10876) | ||||
| 	    DEPS="$DEPS $1" | ||||
| 	    ;; | ||||
| 	'-pthread') | ||||
| 	    # for FreeBSD | ||||
| 	    DEPS="$DEPS -pthread" | ||||
| 	    ;; | ||||
| 	'-cplusplus') | ||||
| @@ -143,10 +129,6 @@ do | ||||
| 	    shift 1; | ||||
| 	    ARCHOPT=$1 | ||||
| 	    ;; | ||||
| 	'-altopts') | ||||
|             shift 1; | ||||
|             ALTOPTS=$1 | ||||
|             ;; | ||||
| 	'-noprefix') | ||||
| 	    NOPREFIX=1 | ||||
| 	    ;; | ||||
| @@ -154,10 +136,6 @@ do | ||||
| 	    shift 1; | ||||
| 	    EXPORTS=$1 | ||||
| 	    ;; | ||||
| 	'-id') | ||||
| 	    shift 1; | ||||
| 	    ID=$1 | ||||
| 	    ;; | ||||
| 	-*) | ||||
| 	    echo "mklib: Unknown option: " $1 ; | ||||
| 	    exit 1 | ||||
| @@ -176,23 +154,6 @@ if [ ${ARCH} = "auto" ] ; then | ||||
| fi | ||||
|  | ||||
|  | ||||
| if [ $STATIC = 1 ]; then | ||||
|     # filter out linker options inside object list | ||||
|     NEWOBJECTS="" | ||||
|     for OBJ in $OBJECTS ; do | ||||
| 	case $OBJ in | ||||
| 	    -Wl,*) | ||||
| 		echo "mklib: warning: ignoring $OBJ for static library" | ||||
| 		;; | ||||
| 	    *) | ||||
| 		NEWOBJECTS="$NEWOBJECTS $OBJ" | ||||
| 		;; | ||||
| 	esac | ||||
|     done | ||||
|     OBJECTS=$NEWOBJECTS | ||||
| fi | ||||
|  | ||||
|  | ||||
| # | ||||
| # Error checking | ||||
| # | ||||
| @@ -218,7 +179,6 @@ if [  ]  ; then | ||||
|     echo PATCH is $PATCH | ||||
|     echo DEPS are $DEPS | ||||
|     echo "EXPORTS in" $EXPORTS | ||||
|     echo ID is $ID | ||||
|     echo "-----------------" | ||||
| fi | ||||
|  | ||||
| @@ -228,7 +188,7 @@ fi | ||||
| # | ||||
| case $ARCH in | ||||
|  | ||||
|     'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*) | ||||
|     'Linux' | 'OpenBSD' | 'GNU' | GNU/*) | ||||
| 	# we assume gcc | ||||
|  | ||||
| 	if [ "x$LINK" = "x" ] ; then | ||||
| @@ -243,13 +203,8 @@ case $ARCH in | ||||
| 	if [ $NOPREFIX = 1 ] ; then | ||||
| 	    # No "lib" or ".so" part | ||||
| 	    echo "mklib: Making" $ARCH "shared library: " ${LIBNAME} | ||||
| 	    case $ARCH in 'Linux' | 'GNU' | GNU/*) | ||||
| 		OPTS="-Xlinker -Bsymbolic -shared" | ||||
| 	    ;; | ||||
| 	    *) | ||||
| 		OPTS="-shared" | ||||
| 	    ;; | ||||
| 	    esac | ||||
| 	    #OPTS="-shared -Wl,-soname,${LIBNAME}"  # soname??? | ||||
| 	    OPTS="-shared" | ||||
|  | ||||
| 	    # Check if objects are 32-bit and we're running in 64-bit | ||||
| 	    # environment.  If so, pass -m32 flag to linker. | ||||
| @@ -259,13 +214,9 @@ case $ARCH in | ||||
| 		OPTS="-m32 ${OPTS}" | ||||
| 	    fi | ||||
|  | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|  | ||||
|             rm -f ${LIBNAME} | ||||
|             # make lib | ||||
|             ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
|             ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
|             # finish up | ||||
|             FINAL_LIBS="${LIBNAME}" | ||||
|         elif [ $STATIC = 1 ] ; then | ||||
| @@ -273,38 +224,10 @@ case $ARCH in | ||||
|             echo "mklib: Making" $ARCH "static library: " ${LIBNAME} | ||||
|             LINK="ar" | ||||
|             OPTS="-ru" | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|             rm -f ${LIBNAME} | ||||
|  | ||||
| 	    # 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 lib | ||||
|             ${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS} | ||||
|             ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS} | ||||
|             ranlib ${LIBNAME} | ||||
|  | ||||
| 	    # remove temporary extracted .o files | ||||
| 	    rm -f ${DELETIA} | ||||
|  | ||||
|             # finish up | ||||
|             FINAL_LIBS=${LIBNAME} | ||||
|         else | ||||
| @@ -319,7 +242,7 @@ case $ARCH in | ||||
| 	    if [ $EXPORTS ] ; then | ||||
| 		#OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}" | ||||
| 		# Make the 'exptmp' file for --version-script option | ||||
| 		echo "{" > exptmp | ||||
| 		echo "VERSION_${MAJOR}.${MINOR} {" > exptmp | ||||
| 		echo "global:" >> exptmp | ||||
| 		sed 's/$/;/' ${EXPORTS} >> exptmp | ||||
| 		echo "local:" >> exptmp | ||||
| @@ -336,9 +259,6 @@ case $ARCH in | ||||
| 	    if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then | ||||
| 		OPTS="-m32 ${OPTS}" | ||||
| 	    fi | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|  | ||||
| 	    if [ x${PATCH} = "x" ] ; then | ||||
| 		VERSION="${MAJOR}.${MINOR}" | ||||
| @@ -354,7 +274,7 @@ case $ARCH in | ||||
|             rm -f ${LIBNAME}.so | ||||
|  | ||||
|             # make lib | ||||
|             ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} | ||||
|             ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} | ||||
|             # make usual symlinks | ||||
|             ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} | ||||
|             ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so | ||||
| @@ -388,7 +308,7 @@ case $ARCH in | ||||
| 			# use g++ | ||||
| 			LINK="g++" | ||||
| 		    else | ||||
| 			echo "mklib: warning: can't find C++ compiler, trying CC." | ||||
| 			echo "mklib: warning: can't find C++ comiler, trying CC." | ||||
| 			LINK="CC" | ||||
| 		    fi | ||||
| 		else | ||||
| @@ -414,55 +334,25 @@ case $ARCH in | ||||
| 		fi | ||||
| 	    fi | ||||
|  | ||||
| 	    # If using Sun C++ compiler, need to tell it not to add runpaths | ||||
| 	    # that are specific to the build machine | ||||
| 	    if [ ${LINK} = "CC" ] ; then | ||||
| 		OPTS="${OPTS} -norunpath" | ||||
| 	    fi | ||||
|  | ||||
| 	    # Solaris linker requires explicitly listing the Standard C & C++ | ||||
| 	    # libraries in the link path when building shared objects | ||||
| 	    if [ ${LINK} = "CC" ] ; then | ||||
| 		DEPS="${DEPS} -lCrun" | ||||
| 	    fi | ||||
| 	    DEPS="${DEPS} -lc" | ||||
|  | ||||
| 	    if [ $EXPORTS ] ; then | ||||
| 		# Make the 'mapfile.scope' linker mapfile | ||||
| 		echo "{" > mapfile.scope | ||||
| 		echo "global:" >> mapfile.scope | ||||
| 		sed 's/$/;/' ${EXPORTS} >> mapfile.scope | ||||
| 		echo "local:" >> mapfile.scope | ||||
| 		echo "    *;" >> mapfile.scope | ||||
| 		echo "};" >> mapfile.scope | ||||
| 		OPTS="${OPTS} -Wl,-Mmapfile.scope" | ||||
| 	    fi | ||||
|  | ||||
| 	    # 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 | ||||
| 		SPARCV9=`file $1 | grep SPARCV9` | ||||
| 		if [ "${SPARCV9}" ] ; then | ||||
| 		    OPTS="${OPTS} -xarch=v9" | ||||
| 		fi | ||||
| 	    SPARCV9=`file $1 | grep SPARCV9` | ||||
| 	    if [ "${SPARCV9}" ] ; then | ||||
| 		OPTS="${OPTS} -xarch=v9" | ||||
| 	    fi | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|  | ||||
| 	    # for debug: | ||||
| 	    #echo "mklib: linker is" ${LINK} ${OPTS} | ||||
| 	    if [ $NOPREFIX = 1 ] ; then | ||||
| 		rm -f ${LIBNAME} | ||||
| 		${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 		FINAL_LIBS="${LIBNAME}" | ||||
| 		${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 	    else | ||||
| 		rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} | ||||
| 		${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} | ||||
| 		${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} | ||||
| 		ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} | ||||
| 		FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" | ||||
| 	    fi | ||||
| 	    FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" | ||||
| 	fi | ||||
| 	;; | ||||
|  | ||||
| @@ -482,11 +372,8 @@ case $ARCH in | ||||
| 	    # No "lib" or ".so" part | ||||
| 	    echo "mklib: Making FreeBSD shared library: " ${LIBNAME} | ||||
| 	    OPTS="-shared" | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
| 	    rm -f ${LIBNAME} | ||||
| 	    ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 	    ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 	    FINAL_LIBS=${LIBNAME} | ||||
|         elif [ $STATIC = 1 ] ; then | ||||
| 	    STLIB="lib${LIBNAME}.a" | ||||
| @@ -498,12 +385,9 @@ case $ARCH in | ||||
| 	else | ||||
| 	    SHLIB="lib${LIBNAME}.so.${MAJOR}" | ||||
| 	    OPTS="-shared -Wl,-soname,${SHLIB}" | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
| 	    echo "mklib: Making FreeBSD shared library: " ${SHLIB} | ||||
| 	    rm -f ${SHLIB} | ||||
| 	    ${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS} | ||||
| 	    ${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS} | ||||
| 	    ln -sf ${SHLIB} "lib${LIBNAME}.so" | ||||
| 	    FINAL_LIBS="${SHLIB} lib${LIBNAME}.so" | ||||
| 	fi | ||||
| @@ -554,10 +438,6 @@ case $ARCH in | ||||
| 		exit 1 | ||||
| 	    fi | ||||
|  | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|  | ||||
| 	    if [ $CPLUSPLUS = 1 ] ; then | ||||
| 		LINK="CC" | ||||
| 	    else | ||||
| @@ -565,7 +445,7 @@ case $ARCH in | ||||
| 	    fi | ||||
|  | ||||
| 	    echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME} | ||||
| 	    ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 	    ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 	    FINAL_LIBS=${LIBNAME} | ||||
| 	fi | ||||
| 	;; | ||||
| @@ -638,16 +518,12 @@ case $ARCH in | ||||
| 		} | ||||
| 	    }' | sort -u >> ${EXPFILE} | ||||
|  | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|  | ||||
|             # On AIX a shared library is linked differently when | ||||
|             # you want to dlopen the file | ||||
| 	    if [ $DLOPEN = "1" ] ; then | ||||
| 		cc -G ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 		cc -G ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 	    else | ||||
| 		cc ${OPTS} ${LDFLAGS} -o ${OFILE} ${OBJECTS} ${DEPS} | ||||
| 		cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS} | ||||
| 		ar ${X64} -r ${LIBNAME} ${OFILE} | ||||
| 	    fi | ||||
|  | ||||
| @@ -693,9 +569,6 @@ case $ARCH in | ||||
|             echo "mklib: Making Darwin static library: " ${LIBNAME} | ||||
|             LINK="ar" | ||||
|             OPTS="-ruvs" | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|             ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS} | ||||
|             FINAL_LIBS=${LIBNAME} | ||||
|         else | ||||
| @@ -704,46 +577,22 @@ case $ARCH in | ||||
|                 LIBSUFFIX="bundle" | ||||
|                 OPTS="${ARCHOPT} -bundle -multiply_defined suppress" | ||||
|             else | ||||
|                 LIBSUFFIX="dylib" | ||||
|                 if [ -z "$ID" ] ; then | ||||
|                     ID="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}" | ||||
|                 fi | ||||
|                 OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name ${ID}" | ||||
| 		LIBSUFFIX="dylib" | ||||
|                 OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}" | ||||
|             fi | ||||
|  | ||||
|             if [ ${EXPORTS} ] ; then | ||||
|                 if [ -f ${EXPORTS}".darwin" ] ; then | ||||
|                     EXPORTS=$EXPORTS".darwin" | ||||
|                 fi | ||||
|                 OPTS="${OPTS} -exported_symbols_list ${EXPORTS}" | ||||
|             fi | ||||
|  | ||||
|             LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}" | ||||
|             LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}" | ||||
|             LIBNAME="lib${LIBNAME}.${MAJOR}.${MINOR}.${LIBSUFFIX}" | ||||
|             LINKNAME="lib${LIBNAME}.${LIBSUFFIX}" | ||||
|             LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}" | ||||
|  | ||||
| 	    # examine first object to determine ABI | ||||
|     	    set ${OBJECTS} | ||||
|             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} | ||||
|             fi | ||||
| 	    ABI_PPC=`file $1 | grep 'object ppc'` | ||||
| 	    ABI_I386=`file $1 | grep 'object i386'` | ||||
| 	    if [ "${ABI_PPC}" ] ; then | ||||
| 		OPTS="${OPTS} -arch ppc" | ||||
| 	    fi | ||||
| 	    if [ "${ABI_I386}" ] ; then | ||||
| 		OPTS="${OPTS} -arch i386" | ||||
| 	    fi | ||||
|  | ||||
| 	    # XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk | ||||
| 	    # to OPTS here? | ||||
| @@ -756,11 +605,9 @@ case $ARCH in | ||||
| 	    fi | ||||
|  | ||||
|             echo "mklib: Making Darwin shared library: " ${LIBNAME} | ||||
|  | ||||
|             ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
|             ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
|             ln -s ${LIBNAME} ${LINKNAME} | ||||
|             ln -s ${LIBNAME} ${LINKNAME2} | ||||
|             FINAL_LIBS="${LIBNAME} ${LINKNAME} ${LINKNAME2}" | ||||
|             FINAL_LIBS="${LIBNAME} ${LINKNAME}" | ||||
|         fi | ||||
|         ;; | ||||
|  | ||||
| @@ -812,9 +659,6 @@ case $ARCH in | ||||
|             echo "mklib: Making Intel ICC static library: " ${LIBNAME}.a | ||||
|             LINK="ar" | ||||
|             OPTS="-ruv" | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|             # make lib | ||||
|             ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} | ||||
|             # finish up | ||||
| @@ -825,9 +669,6 @@ case $ARCH in | ||||
|             else | ||||
|                  OPTS="-shared" | ||||
|             fi | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|             VERSION="${MAJOR}.${MINOR}.${PATCH}" | ||||
|             echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION} | ||||
|  | ||||
| @@ -841,7 +682,7 @@ case $ARCH in | ||||
|             rm -f ${LIBNAME}.so.${MAJOR} | ||||
|             rm -f ${LIBNAME}.so | ||||
|             # make lib | ||||
|             ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} | ||||
|             ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS} | ||||
|             # make usual symlinks | ||||
|             ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} | ||||
|             ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so | ||||
| @@ -885,17 +726,6 @@ case $ARCH in | ||||
|  | ||||
|      CYGWIN*) | ||||
| 	# GCC-based environment | ||||
| 	if [ $NOPREFIX = 1 ] ; then | ||||
| 	    # No "lib" or ".so" part | ||||
| 	    echo "mklib: Making CYGWIN shared library: " ${LIBNAME} | ||||
| 	    OPTS="-shared -Wl,--enable-auto-image-base" | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
| 	    rm -f ${LIBNAME} | ||||
| 	    ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} | ||||
| 	    FINAL_LIBS=${LIBNAME} | ||||
|         else | ||||
| 	CYGNAME="cyg${LIBNAME}"     # prefix with "cyg" | ||||
| 	LIBNAME="lib${LIBNAME}"     # prefix with "lib" | ||||
|  | ||||
| @@ -903,20 +733,14 @@ case $ARCH in | ||||
|             echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a | ||||
|             LINK="ar" | ||||
|             OPTS="-ru" | ||||
|             if [ "${ALTOPTS}" ] ; then | ||||
|                 OPTS=${ALTOPTS} | ||||
|             fi | ||||
|             # 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" $ARCH "shared library: " ${CYGNAME}-${MAJOR}.dll | ||||
| 	    OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" | ||||
|             echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll | ||||
|  | ||||
|             if [ $CPLUSPLUS = 1 ] ; then | ||||
|                 LINK="g++" | ||||
| @@ -925,13 +749,12 @@ case $ARCH in | ||||
|             fi | ||||
|  | ||||
|             # rm any old libs | ||||
|             rm -f ${CYGNAME}-${MAJOR}.dll | ||||
|             rm -f ${LIBNAME}-${MAJOR}.dll.a | ||||
|             rm -f ${LIBNAME}-${MAJOR}.dll | ||||
|             rm -f ${LIBNAME}.dll.a | ||||
|             rm -f ${LIBNAME}.a | ||||
|  | ||||
|             # make lib | ||||
|             ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} | ||||
|             ${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} | ||||
|             # make usual symlinks | ||||
|             ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a | ||||
|             # finish up | ||||
| @@ -939,7 +762,6 @@ case $ARCH in | ||||
| 	    # special case for installing in bin | ||||
|             FINAL_BINS="${CYGNAME}-${MAJOR}.dll" | ||||
|         fi | ||||
|         fi | ||||
| 	;; | ||||
|  | ||||
|     'example') | ||||
| @@ -971,6 +793,5 @@ esac | ||||
| # | ||||
| if [ ${INSTALLDIR} != "." ] ; then | ||||
|     echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR} | ||||
|     test -d ${INSTALLDIR} || mkdir -p ${INSTALLDIR} | ||||
|     mv ${FINAL_LIBS} ${INSTALLDIR}/ | ||||
| fi | ||||
|   | ||||
							
								
								
									
										366
									
								
								bin/raw2png.py
									
									
									
									
									
								
							
							
						
						
									
										366
									
								
								bin/raw2png.py
									
									
									
									
									
								
							| @@ -1,366 +0,0 @@ | ||||
| #!/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() | ||||
| @@ -1,17 +0,0 @@ | ||||
| #!/usr/bin/make -sf | ||||
| # Print the various Mesa version fields. This is mostly used to add the | ||||
| # version to configure. | ||||
|  | ||||
| # This reflects that this script is usually called from the toplevel | ||||
| TOP = . | ||||
|  | ||||
| include $(TOP)/configs/default | ||||
|  | ||||
| version: | ||||
| 	@echo $(MESA_VERSION) | ||||
| major: | ||||
| 	@echo $(MESA_MAJOR) | ||||
| minor: | ||||
| 	@echo $(MESA_MINOR) | ||||
| tiny: | ||||
| 	@echo $(MESA_TINY) | ||||
| @@ -1,309 +0,0 @@ | ||||
| #!/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() | ||||
|  | ||||
							
								
								
									
										67
									
								
								common.py
									
									
									
									
									
								
							
							
						
						
									
										67
									
								
								common.py
									
									
									
									
									
								
							| @@ -1,67 +0,0 @@ | ||||
| ####################################################################### | ||||
| # Common SCons code | ||||
|  | ||||
| import os | ||||
| import os.path | ||||
| import sys | ||||
| import platform as _platform | ||||
|  | ||||
|  | ||||
| ####################################################################### | ||||
| # Defaults | ||||
|  | ||||
| _platform_map = { | ||||
| 	'linux2': 'linux', | ||||
| 	'win32': 'winddk', | ||||
| } | ||||
|  | ||||
| default_platform = sys.platform | ||||
| default_platform = _platform_map.get(default_platform, default_platform) | ||||
|  | ||||
| _machine_map = { | ||||
| 	'x86': 'x86', | ||||
| 	'i386': 'x86', | ||||
| 	'i486': 'x86', | ||||
| 	'i586': 'x86', | ||||
| 	'i686': 'x86', | ||||
| 	'ppc' : 'ppc', | ||||
| 	'x86_64': 'x86_64', | ||||
| } | ||||
| 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') | ||||
|  | ||||
| if default_platform in ('linux', 'freebsd'): | ||||
| 	default_dri = 'yes' | ||||
| elif default_platform in ('winddk', 'windows', 'wince', 'darwin'): | ||||
| 	default_dri = 'no' | ||||
| else: | ||||
| 	default_dri = 'no' | ||||
|  | ||||
|  | ||||
| ####################################################################### | ||||
| # Common options | ||||
|  | ||||
| def AddOptions(opts): | ||||
| 	try: | ||||
| 		from SCons.Variables.BoolVariable import BoolVariable as BoolOption | ||||
| 	except ImportError: | ||||
| 		from SCons.Options.BoolOption import BoolOption | ||||
| 	try: | ||||
| 		from SCons.Variables.EnumVariable import EnumVariable as EnumOption | ||||
| 	except ImportError: | ||||
| 		from SCons.Options.EnumOption import EnumOption | ||||
| 	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'))) | ||||
| 	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)) | ||||
|  | ||||
							
								
								
									
										1
									
								
								configs/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								configs/.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,2 +1 @@ | ||||
| current | ||||
| autoconf | ||||
|   | ||||
| @@ -11,10 +11,6 @@ CXX = g++ | ||||
| CFLAGS = -O2 -DAIXV3 | ||||
| CXXFLAGS = -O2 -DAIXV3 | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| MKLIB_OPTIONS = -arch aix-gcc | ||||
| GL_LIB_DEPS = -lX11 -lXext -lm | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm | ||||
|   | ||||
| @@ -1,148 +0,0 @@ | ||||
| # Autoconf configuration | ||||
|  | ||||
| # Pull in the defaults | ||||
| include $(TOP)/configs/default | ||||
|  | ||||
| # This is generated by configure | ||||
| CONFIG_NAME = autoconf | ||||
|  | ||||
| # Compiler and flags | ||||
| CC = @CC@ | ||||
| CXX = @CXX@ | ||||
| OPT_FLAGS = @OPT_FLAGS@ | ||||
| ARCH_FLAGS = @ARCH_FLAGS@ | ||||
| ASM_FLAGS = @ASM_FLAGS@ | ||||
| PIC_FLAGS = @PIC_FLAGS@ | ||||
| DEFINES = @DEFINES@ | ||||
| CFLAGS = @CPPFLAGS@ @CFLAGS@ \ | ||||
| 	$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) | ||||
| CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \ | ||||
| 	$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) | ||||
| LDFLAGS = @LDFLAGS@ | ||||
| EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ | ||||
| RADEON_CFLAGS = @RADEON_CFLAGS@ | ||||
| RADEON_LDFLAGS = @RADEON_LDFLAGS@ | ||||
|  | ||||
| # Assembler | ||||
| MESA_ASM_SOURCES = @MESA_ASM_SOURCES@ | ||||
| GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@ | ||||
|  | ||||
| # Misc tools and flags | ||||
| MAKE = @MAKE@ | ||||
| SHELL = @SHELL@ | ||||
| MKLIB_OPTIONS = @MKLIB_OPTIONS@ | ||||
| MKDEP = @MKDEP@ | ||||
| MKDEP_OPTIONS = @MKDEP_OPTIONS@ | ||||
| INSTALL = @INSTALL@ | ||||
|  | ||||
| # Python and flags (generally only needed by the developers) | ||||
| PYTHON2 = python | ||||
| PYTHON_FLAGS = -t -O -O | ||||
|  | ||||
| # Library names (base name) | ||||
| GL_LIB = GL | ||||
| GLU_LIB = GLU | ||||
| GLUT_LIB = glut | ||||
| GLW_LIB = GLw | ||||
| OSMESA_LIB = @OSMESA_LIB@ | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = @GL_LIB_NAME@ | ||||
| GLU_LIB_NAME = @GLU_LIB_NAME@ | ||||
| GLUT_LIB_NAME = @GLUT_LIB_NAME@ | ||||
| GLW_LIB_NAME = @GLW_LIB_NAME@ | ||||
| OSMESA_LIB_NAME = @OSMESA_LIB_NAME@ | ||||
|  | ||||
| # Globs used to install the lib and all symlinks | ||||
| GL_LIB_GLOB = @GL_LIB_GLOB@ | ||||
| GLU_LIB_GLOB = @GLU_LIB_GLOB@ | ||||
| GLUT_LIB_GLOB = @GLUT_LIB_GLOB@ | ||||
| GLW_LIB_GLOB = @GLW_LIB_GLOB@ | ||||
| OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@ | ||||
|  | ||||
| # Directories to build | ||||
| LIB_DIR = @LIB_DIR@ | ||||
| SRC_DIRS = @SRC_DIRS@ | ||||
| GLU_DIRS = @GLU_DIRS@ | ||||
| DRIVER_DIRS = @DRIVER_DIRS@ | ||||
| GALLIUM_DIRS = @GALLIUM_DIRS@ | ||||
| GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@ | ||||
| GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@ | ||||
| GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ | ||||
| GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@ | ||||
| GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@ | ||||
| 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@  | ||||
| WINDOW_SYSTEM = @WINDOW_SYSTEM@ | ||||
| USING_EGL = @USING_EGL@ | ||||
|  | ||||
| # Dependencies | ||||
| X11_INCLUDES = @X11_INCLUDES@ | ||||
|  | ||||
| # GLw motif setup | ||||
| GLW_SOURCES = @GLW_SOURCES@ | ||||
| MOTIF_CFLAGS = @MOTIF_CFLAGS@ | ||||
|  | ||||
| # Library/program dependencies | ||||
| GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@ | ||||
| OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \ | ||||
| 	$(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@ | ||||
| EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@ | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \ | ||||
| 	$(EXTRA_LIB_PATH) @GLU_LIB_DEPS@ | ||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \ | ||||
| 	$(EXTRA_LIB_PATH) @GLUT_LIB_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@ | ||||
|  | ||||
| # DRI dependencies | ||||
| DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@ | ||||
| LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ | ||||
| LIBDRM_LIB = @LIBDRM_LIBS@ | ||||
| DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ | ||||
| EXPAT_INCLUDES = @EXPAT_INCLUDES@ | ||||
|  | ||||
| # Autoconf directories | ||||
| prefix = @prefix@ | ||||
| exec_prefix = @exec_prefix@ | ||||
| libdir = @libdir@ | ||||
| includedir = @includedir@ | ||||
|  | ||||
| # Installation directories (for make install) | ||||
| INSTALL_DIR = $(prefix) | ||||
| INSTALL_LIB_DIR = $(libdir) | ||||
| INSTALL_INC_DIR = $(includedir) | ||||
|  | ||||
| # DRI installation directories | ||||
| DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ | ||||
|  | ||||
| # Where libGL will look for DRI hardware drivers | ||||
| DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR) | ||||
|  | ||||
| # Xorg driver install directory (for xorg state-tracker) | ||||
| XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@ | ||||
|  | ||||
| # pkg-config substitutions | ||||
| GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ | ||||
| GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ | ||||
| GL_PC_CFLAGS = @GL_PC_CFLAGS@ | ||||
| DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@ | ||||
| GLU_PC_REQ = @GLU_PC_REQ@ | ||||
| GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@ | ||||
| GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@ | ||||
| GLU_PC_CFLAGS = @GLU_PC_CFLAGS@ | ||||
| GLUT_PC_REQ_PRIV = @GLUT_PC_REQ_PRIV@ | ||||
| GLUT_PC_LIB_PRIV = @GLUT_PC_LIB_PRIV@ | ||||
| GLUT_PC_CFLAGS = @GLUT_PC_CFLAGS@ | ||||
| GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@ | ||||
| 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@ | ||||
							
								
								
									
										10
									
								
								configs/beos
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								configs/beos
									
									
									
									
									
								
							| @@ -26,8 +26,8 @@ ifeq ($(CPU), x86) | ||||
| 		-DUSE_3DNOW_ASM \ | ||||
| 		-DUSE_SSE_ASM | ||||
| 	 | ||||
| 	MESA_ASM_SOURCES = $(X86_SOURCES) | ||||
| 	GLAPI_ASM_SOURCES = $(X86_API) | ||||
| 	ASM_SOURCES = $(X86_SOURCES) | ||||
| 	ASM_API = $(X86_API) | ||||
|  | ||||
| 	CC = gcc | ||||
| 	CXX = g++ | ||||
| @@ -39,10 +39,6 @@ ifeq ($(CPU), x86) | ||||
|  | ||||
| 	CXXFLAGS = $(CFLAGS) | ||||
|  | ||||
| 	# Work around aliasing bugs - developers should comment this out | ||||
| 	CFLAGS += -fno-strict-aliasing | ||||
| 	CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| 	LDFLAGS += -Xlinker | ||||
|  | ||||
| 	ifdef DEBUG | ||||
| @@ -90,7 +86,7 @@ else | ||||
| endif | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = gallium mesa glu glut/beos glew | ||||
| SRC_DIRS = mesa glu glut/beos | ||||
| GLU_DIRS = sgi | ||||
| DRIVER_DIRS = beos | ||||
| PROGRAM_DIRS = beos samples redbook demos tests | ||||
|   | ||||
| @@ -13,10 +13,6 @@ CXX = /bgl/BlueLight/ppcfloor/blrts-gnu/bin/powerpc-bgl-blrts-gnu-g++ | ||||
| CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE | ||||
| CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURC | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| MKLIB_OPTIONS = -static | ||||
|  | ||||
| OSMESA_LIB_NAME = libOSMesa.a | ||||
|   | ||||
| @@ -1,29 +0,0 @@ | ||||
| # Configuration for building only libOSMesa on BlueGene using the IBM xlc compiler | ||||
| # This doesn't really have a lot of dependencies, so it should be usable | ||||
| # on similar systems too. | ||||
| # It uses static linking and disables multithreading. | ||||
|  | ||||
| include $(TOP)/configs/default | ||||
|  | ||||
| CONFIG_NAME = bluegene-osmesa | ||||
|  | ||||
| # Compiler and flags | ||||
| CC = /opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlc | ||||
| CXX = /opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlC | ||||
| CFLAGS = -O3 -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE | ||||
| CXXFLAGS = -O3 -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE | ||||
|  | ||||
| MKLIB_OPTIONS = -static | ||||
|  | ||||
| OSMESA_LIB_NAME = libOSMesa.a | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = mesa glu | ||||
| DRIVER_DIRS = osmesa | ||||
| PROGRAM_DIRS = osdemos | ||||
|  | ||||
|  | ||||
| # Dependencies | ||||
| OSMESA_LIB_DEPS = -lm | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) | ||||
| APP_LIB_DEPS = -lOSMesa -lGLU -lm | ||||
| @@ -1,32 +0,0 @@ | ||||
| # Configuration for building only libOSMesa on Cray Xt3 | ||||
| # for the compute nodes running Catamount using the  | ||||
| # Portland Group compiler. The Portland Group toolchain has to be  | ||||
| # enabled before using "module switch PrgEnv-gnu PrgEnv-pgi" . | ||||
| # This doesn't really have a lot of dependencies, so it should be usable | ||||
| # on other similar systems too. | ||||
| # It uses static linking and disables multithreading. | ||||
|  | ||||
| include $(TOP)/configs/default | ||||
|  | ||||
| CONFIG_NAME = catamount-osmesa-pgi | ||||
|  | ||||
| # Compiler and flags | ||||
| CC = cc | ||||
| CXX = CC | ||||
| CFLAGS = -target=catamount -fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta   -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE | ||||
| CXXFLAGS = -target=catamount -fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE | ||||
|  | ||||
| MKLIB_OPTIONS = -static | ||||
|  | ||||
| OSMESA_LIB_NAME = libOSMesa.a | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = mesa glu | ||||
| DRIVER_DIRS = osmesa | ||||
| PROGRAM_DIRS = osdemos | ||||
|  | ||||
|  | ||||
| # Dependencies | ||||
| OSMESA_LIB_DEPS = -lm | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) | ||||
| APP_LIB_DEPS = -lOSMesa -lGLU -lm | ||||
| @@ -1,42 +0,0 @@ | ||||
| # MinGW config include file updated for Mesa 7.0 | ||||
| # | ||||
| #  Updated : by Heromyth, on 2007-7-21 | ||||
| #  Email   : zxpmyth@yahoo.com.cn | ||||
| #  Bugs    : 1) All the default settings work fine. But the setting X86=1 can't work.  | ||||
| #            The others havn't been tested yet. | ||||
| #            2) The generated DLLs are *not* compatible with the ones built | ||||
| #            with the other compilers like VC8, especially for GLUT.  | ||||
| #            3) Although more tests are needed, it can be used individually! | ||||
|  | ||||
| # The generated DLLs by MingW with STDCALL are not totally compatible  | ||||
| # with the ones linked by Microsoft's compilers. | ||||
| # | ||||
| # xxx_USING_STDCALL = 1          Compiling MESA with __stdcall. This is default! | ||||
| #  | ||||
| # xxx_USING_STDCALL = 0          Compiling MESA without __stdcall. I like this:) | ||||
| #   | ||||
|  | ||||
| # In fact, GL_USING_STDCALL and GLUT_USING_STDCALL can be | ||||
| # different. For example: | ||||
| # | ||||
| #   GL_USING_STDCALL = 0 | ||||
| #   GLUT_USING_STDCALL = 1 | ||||
| #  | ||||
| # Suggested setting: | ||||
| # | ||||
| #     ALL_USING_STDCALL = 1 | ||||
| # | ||||
| # That's default! | ||||
| # | ||||
|  | ||||
|  | ||||
| ALL_USING_STDCALL = 1 | ||||
|  | ||||
|  | ||||
| ifeq ($(ALL_USING_STDCALL),1) | ||||
|   GL_USING_STDCALL = 1 | ||||
|   GLUT_USING_STDCALL = 1 | ||||
| else | ||||
|   GL_USING_STDCALL = 0 | ||||
|   GLUT_USING_STDCALL = 0 | ||||
| endif | ||||
| @@ -4,28 +4,11 @@ include $(TOP)/configs/default | ||||
|  | ||||
| CONFIG_NAME = darwin | ||||
|  | ||||
| INSTALL_DIR = /usr/X11 | ||||
|  | ||||
| X11_DIR = $(INSTALL_DIR) | ||||
|  | ||||
| # Compiler and flags | ||||
| CC = gcc | ||||
| CXX = g++ | ||||
| PIC_FLAGS = -fPIC | ||||
| 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_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 | ||||
|  | ||||
| ARCH_FLAGS += $(RC_CFLAGS) | ||||
|  | ||||
| CFLAGS =  -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \ | ||||
| 	-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) | ||||
| CXXFLAGS =  -ggdb3 -Os -Wall -fno-strict-aliasing \ | ||||
| 	-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) | ||||
| CC = cc | ||||
| CXX = cc | ||||
| CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin | ||||
| CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.dylib | ||||
| @@ -34,24 +17,13 @@ GLUT_LIB_NAME = libglut.dylib | ||||
| GLW_LIB_NAME = libGLw.dylib | ||||
| OSMESA_LIB_NAME = libOSMesa.dylib | ||||
|  | ||||
| # globs used to install the lib and all symlinks | ||||
| GL_LIB_GLOB = libGL.*dylib | ||||
| GLU_LIB_GLOB = libGLU.*dylib | ||||
| GLUT_LIB_GLOB = libglut.*dylib | ||||
| GLW_LIB_GLOB = libGLw.*dylib | ||||
| OSMESA_LIB_GLOB = libOSMesa.*dylib | ||||
|  | ||||
| GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread | ||||
| OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) | ||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB)  -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext | ||||
| GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt | ||||
| 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 | ||||
| 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 = glx/x11 mesa glu glut/glx glew | ||||
| GLU_DIRS = sgi | ||||
| DRIVER_DIRS = osmesa | ||||
| #DRIVER_DIRS = dri | ||||
| DRI_DIRS = swrast | ||||
| PROGRAM_DIRS = xdemos | ||||
| SRC_DIRS = mesa glu glut/glx | ||||
|  | ||||
|   | ||||
| @@ -1,7 +0,0 @@ | ||||
| # Configuration for Darwin / MacOS X, making 32bit fat dynamic libs | ||||
|  | ||||
| RC_CFLAGS=-arch ppc -arch i386 | ||||
|  | ||||
| include $(TOP)/configs/darwin | ||||
|  | ||||
| CONFIG_NAME = darwin-fat-32bit | ||||
| @@ -1,7 +0,0 @@ | ||||
| # Configuration for Darwin / MacOS X, making 32bit and 64bit fat dynamic libs | ||||
|  | ||||
| RC_CFLAGS=-arch ppc -arch i386 -arch ppc64 -arch x86_64 | ||||
|  | ||||
| include $(TOP)/configs/darwin | ||||
|  | ||||
| CONFIG_NAME = darwin-fat-all | ||||
							
								
								
									
										24
									
								
								configs/darwin-static
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								configs/darwin-static
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| # Configuration for Darwin / MacOS X, making static libs | ||||
|  | ||||
| include $(TOP)/configs/darwin | ||||
|  | ||||
| CONFIG_NAME = darwin-static | ||||
|  | ||||
| # Compiler and flags | ||||
| CFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin | ||||
| CXXFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin | ||||
| MKLIB_OPTIONS = -static | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.a | ||||
| GLU_LIB_NAME = libGLU.a | ||||
| GLUT_LIB_NAME = libglut.a | ||||
| GLW_LIB_NAME = libGLw.a | ||||
| OSMESA_LIB_NAME = libOSMesa.a | ||||
|  | ||||
| GL_LIB_DEPS = | ||||
| OSMESA_LIB_DEPS =  | ||||
| GLU_LIB_DEPS =  | ||||
| GLUT_LIB_DEPS =  | ||||
| GLW_LIB_DEPS =  | ||||
| APP_LIB_DEPS = -Wl,-search_paths_first -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lstdc++ -lgcc_s.1 -lm | ||||
							
								
								
									
										26
									
								
								configs/darwin-static-x86ppc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								configs/darwin-static-x86ppc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| # Configuration for Darwin / MacOS X, making static libs | ||||
|  | ||||
| include $(TOP)/configs/darwin | ||||
|  | ||||
| CONFIG_NAME = darwin-static | ||||
|  | ||||
| # Compiler and flags | ||||
| CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \ | ||||
|          -I/usr/X11R6/include -O3 -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 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin | ||||
| MKLIB_OPTIONS = -static -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk" | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.a | ||||
| GLU_LIB_NAME = libGLU.a | ||||
| GLUT_LIB_NAME = libglut.a | ||||
| GLW_LIB_NAME = libGLw.a | ||||
| OSMESA_LIB_NAME = libOSMesa.a | ||||
|  | ||||
| GL_LIB_DEPS = | ||||
| OSMESA_LIB_DEPS =  | ||||
| GLU_LIB_DEPS =  | ||||
| GLUT_LIB_DEPS =  | ||||
| GLW_LIB_DEPS =  | ||||
| APP_LIB_DEPS = -Wl,-search_paths_first -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lstdc++ -lgcc_s.1 -lm | ||||
| @@ -29,5 +29,5 @@ 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 | ||||
| SRC_DIRS = mesa glu glut/glx | ||||
|  | ||||
|   | ||||
| @@ -9,9 +9,8 @@ CONFIG_NAME = default | ||||
|  | ||||
| # Version info | ||||
| MESA_MAJOR=7 | ||||
| MESA_MINOR=7 | ||||
| MESA_TINY=0 | ||||
| MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) | ||||
| MESA_MINOR=0 | ||||
| MESA_TINY=1 | ||||
|  | ||||
| # external projects.  This should be useless now that we use libdrm. | ||||
| DRM_SOURCE_PATH=$(TOP)/../drm | ||||
| @@ -19,39 +18,25 @@ DRM_SOURCE_PATH=$(TOP)/../drm | ||||
| # Compiler and flags | ||||
| CC = cc | ||||
| CXX = CC | ||||
| HOST_CC = $(CC) | ||||
| CFLAGS = -O | ||||
| CXXFLAGS = -O | ||||
| LDFLAGS = | ||||
| GLU_CFLAGS =  | ||||
|  | ||||
| # Compiler for building demos/tests/etc | ||||
| APP_CC = $(CC) | ||||
| APP_CXX = $(CXX) | ||||
|  | ||||
| # Misc tools and flags | ||||
| SHELL = /bin/sh | ||||
| MKLIB = $(SHELL) $(TOP)/bin/mklib | ||||
| MKLIB_OPTIONS =  | ||||
| MKDEP = makedepend | ||||
| MKDEP_OPTIONS = -fdepend | ||||
| MAKE = make | ||||
| INSTALL = $(TOP)/bin/minstall | ||||
|  | ||||
| # Use MINSTALL for installing libraries, INSTALL for everything else | ||||
| MINSTALL = $(SHELL) $(TOP)/bin/minstall | ||||
| INSTALL = $(MINSTALL) | ||||
|  | ||||
| # Tools for regenerating glapi (generally only needed by the developers) | ||||
| # Python and flags (generally only needed by the developers) | ||||
| PYTHON2 = python | ||||
| PYTHON_FLAGS = -t -O -O | ||||
| INDENT = indent | ||||
| INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool | ||||
|  | ||||
| # Library names (base name) | ||||
| GL_LIB = GL | ||||
| GLU_LIB = GLU | ||||
| GLUT_LIB = glut | ||||
| GLEW_LIB = GLEW | ||||
| GLW_LIB = GLw | ||||
| OSMESA_LIB = OSMesa | ||||
|  | ||||
| @@ -60,88 +45,42 @@ OSMESA_LIB = OSMesa | ||||
| 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 | ||||
|  | ||||
| # globs used to install the lib and all symlinks | ||||
| GL_LIB_GLOB = $(GL_LIB_NAME)* | ||||
| GLU_LIB_GLOB = $(GLU_LIB_NAME)* | ||||
| GLUT_LIB_GLOB = $(GLUT_LIB_NAME)* | ||||
| GLW_LIB_GLOB = $(GLW_LIB_NAME)* | ||||
| OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)* | ||||
|  | ||||
| # Optional assembly language optimization files for libGL | ||||
| MESA_ASM_SOURCES =  | ||||
| ASM_SOURCES =  | ||||
|  | ||||
| # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in | ||||
| # order to build the Motif widget too) | ||||
| GLW_SOURCES = GLwDrawA.c | ||||
| MOTIF_CFLAGS = -I/usr/include/Motif1.2 | ||||
|  | ||||
|  | ||||
| # Directories to build | ||||
| LIB_DIR = lib | ||||
| SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw | ||||
| SRC_DIRS = mesa glu glut/glx glw | ||||
| GLU_DIRS = sgi | ||||
| DRIVER_DIRS = x11 osmesa | ||||
| # Which subdirs under $(TOP)/progs/ to enter: | ||||
| PROGRAM_DIRS = demos redbook samples glsl xdemos | ||||
|  | ||||
| # EGL directories | ||||
| EGL_DRIVERS_DIRS = demo | ||||
|  | ||||
| # Gallium directories and  | ||||
| GALLIUM_DIRS = auxiliary drivers state_trackers | ||||
| 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 = xlib egl_xlib | ||||
| GALLIUM_WINSYS_DRM_DIRS = | ||||
| GALLIUM_STATE_TRACKERS_DIRS = glx | ||||
|  | ||||
|  | ||||
| # Library dependencies | ||||
| # Library/program dependencies | ||||
| #EXTRA_LIB_PATH ?= | ||||
| 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 | ||||
| GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread | ||||
| OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm | ||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm | ||||
| GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11 | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm | ||||
|  | ||||
| # Program dependencies - specific GL/glut libraries added in Makefiles | ||||
| APP_LIB_DEPS = -lm | ||||
|  | ||||
|  | ||||
| # Installation directories (for make install) | ||||
| INSTALL_DIR = /usr/local | ||||
| INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR) | ||||
| INSTALL_INC_DIR = $(INSTALL_DIR)/include | ||||
| DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri | ||||
| DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri | ||||
|  | ||||
| # Where libGL will look for DRI hardware drivers | ||||
| DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR) | ||||
|  | ||||
| # Xorg driver install directory (for xorg state-tracker) | ||||
| XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers | ||||
|  | ||||
| # pkg-config substitutions | ||||
| GL_PC_REQ_PRIV = | ||||
| GL_PC_LIB_PRIV = | ||||
| GL_PC_CFLAGS = | ||||
| DRI_PC_REQ_PRIV = | ||||
| GLU_PC_REQ = gl | ||||
| GLU_PC_REQ_PRIV = | ||||
| GLU_PC_LIB_PRIV = | ||||
| GLU_PC_CFLAGS = | ||||
| GLUT_PC_REQ_PRIV = | ||||
| GLUT_PC_LIB_PRIV = | ||||
| GLUT_PC_CFLAGS = | ||||
| GLW_PC_REQ_PRIV = | ||||
| GLW_PC_LIB_PRIV = | ||||
| GLW_PC_CFLAGS = | ||||
| OSMESA_PC_REQ = | ||||
| OSMESA_PC_LIB_PRIV = | ||||
|   | ||||
| @@ -15,7 +15,7 @@ PIC_FLAGS  = -fPIC | ||||
| DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \ | ||||
| 	-DHZ=100 | ||||
|  | ||||
| X11_INCLUDES = -I/usr/local/include | ||||
| X11_INCLUDES = -I/usr/X11R6/include | ||||
|  | ||||
| CFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) -ffast-math -pedantic | ||||
|  | ||||
| @@ -23,9 +23,5 @@ CXXFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) | ||||
|  | ||||
| GLUT_CFLAGS = -fexceptions | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| EXTRA_LIB_PATH = -L/usr/local/lib | ||||
| EXTRA_LIB_PATH = -L/usr/X11R6/lib | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm | ||||
|   | ||||
| @@ -9,10 +9,10 @@ CONFIG_NAME = freebsd-dri | ||||
| CC = gcc | ||||
| CXX = g++ | ||||
| WARN_FLAGS = -Wall | ||||
| OPT_FLAGS = -O -g | ||||
| OPT_FLAGS = -O | ||||
|  | ||||
| EXPAT_INCLUDES = -I/usr/local/include | ||||
| X11_INCLUDES = -I/usr/local/include | ||||
| X11_INCLUDES = -I/usr/X11R6/include | ||||
| DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ | ||||
| 	-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \ | ||||
| 	-DHAVE_ALIAS | ||||
| @@ -22,26 +22,21 @@ CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 - | ||||
|  | ||||
| CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)  | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| ASM_SOURCES =  | ||||
| MESA_ASM_SOURCES =  | ||||
|  | ||||
| # Library/program dependencies | ||||
| LIBDRM_CFLAGS = `pkg-config --cflags libdrm` | ||||
| LIBDRM_LIB = `pkg-config --libs libdrm` | ||||
| DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB) | ||||
| GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | ||||
| GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | ||||
| 	-lm -pthread $(LIBDRM_LIB) | ||||
|  | ||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm | ||||
| GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11 | ||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm | ||||
| GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11 | ||||
|  | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw | ||||
| SRC_DIRS = glx/x11 mesa glu glut/glx glw | ||||
| DRIVER_DIRS = dri | ||||
| PROGRAM_DIRS =  | ||||
| WINDOW_SYSTEM=dri | ||||
|   | ||||
| @@ -6,5 +6,5 @@ include $(TOP)/configs/freebsd-dri | ||||
| CONFIG_NAME = freebsd-dri-x86-64 | ||||
|  | ||||
| ASM_FLAGS = -DUSE_X86_64_ASM | ||||
| MESA_ASM_SOURCES = $(X86-64_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86-64_API) | ||||
| ASM_SOURCES = $(X86-64_SOURCES) | ||||
| ASM_API = $(X86-64_API) | ||||
|   | ||||
| @@ -9,5 +9,5 @@ CONFIG_NAME = freebsd-dri-x86 | ||||
| PIC_FLAGS =  | ||||
|  | ||||
| ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM | ||||
| MESA_ASM_SOURCES = $(X86_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86_API) | ||||
| ASM_SOURCES = $(X86_SOURCES) | ||||
| ASM_API = $(X86_API) | ||||
|   | ||||
| @@ -12,9 +12,5 @@ CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/incl | ||||
| CXXFLAGS = -ansi -O3 -D_HPUX_SOURCE | ||||
| GLUT_CFLAGS = -fexceptions | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm | ||||
|  | ||||
|   | ||||
| @@ -22,17 +22,12 @@ 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 \ | ||||
| 	$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ | ||||
| CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ | ||||
| 	$(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math  | ||||
|  | ||||
| CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ | ||||
| 	$(X11_INCLUDES)  | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| GLUT_CFLAGS = -fexceptions | ||||
|  | ||||
| EXTRA_LIB_PATH = -L/usr/X11R6/lib | ||||
|   | ||||
| @@ -11,10 +11,6 @@ CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE -DUSE_XSHM | ||||
| CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE | ||||
| GLUT_CFLAGS = -fexceptions | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -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 | ||||
|   | ||||
| @@ -11,11 +11,7 @@ CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE -DUSE_XSHM | ||||
| CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE | ||||
| GLUT_CFLAGS = -fexceptions | ||||
| MKLIB_OPTIONS = -static | ||||
| PIC_FLAGS = | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.a | ||||
|   | ||||
| @@ -1,67 +0,0 @@ | ||||
| # linux-cell  (non-debug build) | ||||
|  | ||||
| include $(TOP)/configs/default | ||||
|  | ||||
| CONFIG_NAME = linux-cell | ||||
|  | ||||
|  | ||||
| # Omiting other gallium drivers: | ||||
| GALLIUM_DRIVERS_DIRS = cell softpipe trace | ||||
|  | ||||
|  | ||||
| # Compiler and flags | ||||
| CC = ppu32-gcc | ||||
| CXX = ppu32-g++ | ||||
| HOST_CC = gcc | ||||
| APP_CC = gcc | ||||
| APP_CXX = g++ | ||||
|  | ||||
| OPT_FLAGS = -O3 | ||||
|  | ||||
| # Cell SDK location | ||||
| ## For SDK 2.1: (plus, remove -DSPU_MAIN_PARAM_LONG_LONG below) | ||||
| #SDK = /opt/ibm/cell-sdk/prototype/sysroot/usr | ||||
| ## For SDK 3.0: | ||||
| SDK = /opt/cell/sdk/usr | ||||
|  | ||||
|  | ||||
| CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \ | ||||
| 	-fPIC -m32 -std=c99 -mabi=altivec -maltivec \ | ||||
| 	-I. -I$(SDK)/include \ | ||||
| 	-DGALLIUM_CELL -DUSE_XSHM -D_BSD_SOURCE -D_SVID_SOURCE | ||||
|  | ||||
| CXXFLAGS = $(CFLAGS) | ||||
|  | ||||
| # Omitting glw here: | ||||
| SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew | ||||
|  | ||||
| # Build no traditional Mesa drivers: | ||||
| DRIVER_DIRS = | ||||
|  | ||||
|  | ||||
| MKDEP_OPTIONS = -fdepend -Y | ||||
|  | ||||
|  | ||||
| GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread \ | ||||
| 	-L$(SDK)/lib -m32 -Wl,-m,elf32ppc -R$(SDK)/lib -lspe2 | ||||
|  | ||||
|  | ||||
| CELL_SPU_LIB = $(TOP)/src/gallium/drivers/cell/spu/g3d_spu.a | ||||
|  | ||||
|  | ||||
| ### SPU stuff | ||||
|  | ||||
| SPU_CC = spu-gcc | ||||
|  | ||||
| SPU_CFLAGS = $(OPT_FLAGS) -W -Wall -Winline -Wmissing-prototypes -Wno-main \ | ||||
| 	-I. -I$(SDK)/spu/include -I$(TOP)/src/mesa/ $(INCLUDE_DIRS) \ | ||||
| 	-DSPU_MAIN_PARAM_LONG_LONG \ | ||||
| 	-include spu_intrinsics.h | ||||
|  | ||||
| SPU_LFLAGS = -L$(SDK)/spu/lib -Wl,-N -lmisc -lm | ||||
|  | ||||
| SPU_AR = ppu-ar | ||||
| SPU_AR_FLAGS = -qcs | ||||
|  | ||||
| SPU_EMBED = ppu32-embedspu | ||||
| SPU_EMBED_FLAGS = -m32 | ||||
| @@ -1,10 +0,0 @@ | ||||
| # linux-cell-debug | ||||
|  | ||||
| include $(TOP)/configs/linux-cell | ||||
|  | ||||
| # just override name and OPT_FLAGS here: | ||||
|  | ||||
| CONFIG_NAME = linux-cell-debug | ||||
|  | ||||
| OPT_FLAGS = -g -DDEBUG | ||||
|  | ||||
| @@ -13,20 +13,16 @@ CFLAGS   = -Wall -O3 -ffast-math -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -D | ||||
|  | ||||
| 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) | ||||
|      ASM_SOURCES = $(X86_SOURCES) | ||||
|      ASM_API = $(X86_API) | ||||
| endif | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS     = gallium mesa glu glut/directfb glew | ||||
| SRC_DIRS     = mesa glu glut/directfb | ||||
| GLU_DIRS     = sgi | ||||
| DRIVER_DIRS  = directfb | ||||
| PROGRAM_DIRS = demos directfb | ||||
|   | ||||
| @@ -13,7 +13,7 @@ CXX = g++ | ||||
| #MKDEP = gcc -M | ||||
| #MKDEP_OPTIONS = -MF depend | ||||
|  | ||||
| OPT_FLAGS  = -O2 -g | ||||
| OPT_FLAGS  = -O -g | ||||
| PIC_FLAGS  = -fPIC | ||||
|  | ||||
| # Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. | ||||
| @@ -32,36 +32,39 @@ CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \ | ||||
|  | ||||
| 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 =  | ||||
| ASM_SOURCES =  | ||||
|  | ||||
| # Library/program dependencies | ||||
| EXTRA_LIB_PATH=-L/usr/X11R6/lib | ||||
|  | ||||
| LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) | ||||
| LIBDRM_LIB = $(shell pkg-config --libs libdrm) | ||||
| LIBDRM_CFLAGS = `pkg-config --cflags libdrm` | ||||
| LIBDRM_LIB = `pkg-config --libs libdrm` | ||||
| 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) | ||||
| 		-lm -lpthread -ldl \ | ||||
|                 $(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 := glx/x11 egl $(SRC_DIRS) | ||||
| PROGRAM_DIRS := egl $(PROGRAM_DIRS) | ||||
|  | ||||
| # EGL directories | ||||
| EGL_DRIVERS_DIRS = demo glx | ||||
| ifeq ($(USING_EGL), 1) | ||||
| SRC_DIRS = egl glx/x11 mesa glu glut/glx glw | ||||
| PROGRAM_DIRS = egl | ||||
| else | ||||
| SRC_DIRS = glx/x11 mesa glu glut/glx glw | ||||
| PROGRAM_DIRS = | ||||
| endif | ||||
|  | ||||
| DRIVER_DIRS = dri | ||||
| WINDOW_SYSTEM = dri | ||||
| GALLIUM_WINSYS_DIRS = drm | ||||
| GALLIUM_WINSYS_DRM_DIRS = intel | ||||
| GALLIUM_STATE_TRACKERS_DIRS = egl | ||||
| WINDOW_SYSTEM=dri | ||||
|  | ||||
| DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ | ||||
| 	savage sis tdfx trident unichrome ffb swrast | ||||
| # gamma are missing because they have not been converted to use the new | ||||
| # interface. | ||||
| DRI_DIRS = i810 i915tex i915 i965 mach64 mga r128 r200 r300 radeon s3v \ | ||||
| 	savage sis tdfx trident unichrome ffb | ||||
|   | ||||
| @@ -9,7 +9,7 @@ OPT_FLAGS = -Os -mcpu=603 | ||||
| PIC_FLAGS = -fPIC | ||||
|  | ||||
| ASM_FLAGS = -DUSE_PPC_ASM -DUSE_VMX_ASM | ||||
| MESA_ASM_SOURCES = $(PPC_SOURCES) | ||||
| ASM_SOURCES = $(PPC_SOURCES) | ||||
|  | ||||
| # Build only the drivers for cards that exist on PowerPC.  At some point MGA | ||||
| # will be added, but not yet. | ||||
|   | ||||
| @@ -5,9 +5,13 @@ include $(TOP)/configs/linux-dri | ||||
|  | ||||
| CONFIG_NAME = linux-dri-x86 | ||||
|  | ||||
| ARCH_FLAGS = -m32 -mmmx -msse -msse2 | ||||
| # Unnecessary on x86, generally. | ||||
| PIC_FLAGS =  | ||||
|  | ||||
| # Add -m32 to CFLAGS: | ||||
| ARCH_FLAGS = -m32 | ||||
|  | ||||
| ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM | ||||
| MESA_ASM_SOURCES = $(X86_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86_API) | ||||
| ASM_SOURCES = $(X86_SOURCES) | ||||
| ASM_API = $(X86_API) | ||||
|  | ||||
|   | ||||
| @@ -8,8 +8,8 @@ CONFIG_NAME = linux-dri-x86-64 | ||||
| ARCH_FLAGS = -m64 | ||||
|  | ||||
| ASM_FLAGS = -DUSE_X86_64_ASM | ||||
| MESA_ASM_SOURCES = $(X86-64_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86-64_API) | ||||
| ASM_SOURCES = $(X86-64_SOURCES) | ||||
| ASM_API = $(X86-64_API) | ||||
|  | ||||
| LIB_DIR = lib64 | ||||
|  | ||||
| @@ -20,5 +20,5 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib64 | ||||
| # the new interface.  i810 are missing because there is no x86-64 | ||||
| # system where they could *ever* be used. | ||||
| # | ||||
| DRI_DIRS = i915 i965 mach64 mga r128 r200 r300 radeon savage tdfx unichrome | ||||
| DRI_DIRS = i915tex i915 i965 mach64 mga r128 r200 radeon tdfx unichrome savage r300 | ||||
|  | ||||
|   | ||||
| @@ -25,27 +25,24 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ | ||||
| 	-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \ | ||||
|         -DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN | ||||
|  | ||||
| X11_INCLUDES = $(shell pkg-config --cflags-only-I x11) $(shell pkg-config --cflags-only-I xcb) $(shell pkg-config --cflags-only-I x11-xcb) $(shell pkg-config --cflags-only-I xcb-glx) | ||||
| X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I x11-xcb` `pkg-config --cflags-only-I xcb-glx` | ||||
|  | ||||
| CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \ | ||||
| 	$(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math  | ||||
|  | ||||
| CXXFLAGS = -Wall $(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 =  | ||||
| ASM_SOURCES =  | ||||
|  | ||||
| # Library/program dependencies | ||||
| EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11) | ||||
| EXTRA_LIB_PATH=`pkg-config --libs-only-L x11` | ||||
|  | ||||
| LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) | ||||
| LIBDRM_LIB = $(shell pkg-config --libs libdrm) | ||||
| LIBDRM_CFLAGS = `pkg-config --cflags libdrm` | ||||
| LIBDRM_LIB = `pkg-config --libs libdrm` | ||||
| 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) | ||||
|                 $(LIBDRM_LIB) `pkg-config --libs xcb` `pkg-config --libs x11-xcb` `pkg-config --libs xcb-glx` | ||||
|  | ||||
|  | ||||
| # This is now 0 by default since it seems to confuse the hell out of people | ||||
| @@ -56,11 +53,11 @@ USING_EGL=0 | ||||
|  | ||||
| # Directories | ||||
| ifeq ($(USING_EGL), 1) | ||||
| SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glew glw | ||||
| SRC_DIRS = egl glx/x11 mesa glu glut/glx glw | ||||
| PROGRAM_DIRS = egl | ||||
| else | ||||
| SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw | ||||
| PROGRAM_DIRS = xdemos | ||||
| SRC_DIRS = glx/x11 mesa glu glut/glx glw | ||||
| PROGRAM_DIRS = | ||||
| endif | ||||
|  | ||||
| DRIVER_DIRS = dri | ||||
| @@ -69,4 +66,4 @@ 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  | ||||
| 	savage sis tdfx trident unichrome ffb nouveau | ||||
|   | ||||
| @@ -1,65 +0,0 @@ | ||||
| # -*-makefile-*- | ||||
| # Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others | ||||
|  | ||||
| include $(TOP)/configs/default | ||||
|  | ||||
| CONFIG_NAME = linux-dri | ||||
|  | ||||
| # Compiler and flags | ||||
| CC = gcc | ||||
| CXX = g++ | ||||
|  | ||||
| #MKDEP = /usr/X11R6/bin/makedepend | ||||
| #MKDEP = gcc -M | ||||
| #MKDEP_OPTIONS = -MF depend | ||||
|  | ||||
| OPT_FLAGS  = -O -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 -DIN_DRI_DRIVER \ | ||||
| 	-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_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) | ||||
|  | ||||
|  | ||||
| MESA_ASM_SOURCES =  | ||||
|  | ||||
| # Library/program dependencies | ||||
| 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 $(LIBDRM_LIB) | ||||
| GL_LIB_DEPS   = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ | ||||
| 		-lm -lpthread -ldl \ | ||||
|                 $(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 glu egl | ||||
| PROGRAM_DIRS = egl | ||||
|  | ||||
| DRIVER_DIRS = dri | ||||
| WINDOW_SYSTEM = dri | ||||
| GALLIUM_WINSYS_DIRS = egl_drm | ||||
|  | ||||
| # gamma are missing because they have not been converted to use the new | ||||
| # interface. | ||||
| DRI_DIRS = intel  | ||||
| @@ -6,10 +6,7 @@ CONFIG_NAME = linux-fbdev | ||||
|  | ||||
| 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 = gallium mesa glu glut/fbdev glew | ||||
| SRC_DIRS = mesa glu glut/fbdev | ||||
| DRIVER_DIRS = fbdev osmesa | ||||
| PROGRAM_DIRS = fbdev demos redbook samples | ||||
|  | ||||
|   | ||||
| @@ -12,9 +12,6 @@ CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE | ||||
| 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 | ||||
|   | ||||
| @@ -16,7 +16,7 @@ GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread | ||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm | ||||
|  | ||||
| MESA_ASM_SOURCES = $(X86_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86_API) | ||||
| ASM_SOURCES = $(X86_SOURCES) | ||||
| ASM_API = $(X86_API) | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -23,5 +23,5 @@ GL_LIB_DEPS = | ||||
| GLUT_LIB_DEPS = | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -lpthread -lcxa -lunwind | ||||
|  | ||||
| MESA_ASM_SOURCES = $(X86_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86_API) | ||||
| ASM_SOURCES = $(X86_SOURCES) | ||||
| ASM_API = $(X86_API) | ||||
|   | ||||
| @@ -33,11 +33,8 @@ CFLAGS   = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ | ||||
|  | ||||
| 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 =  | ||||
| ASM_SOURCES =  | ||||
|  | ||||
| # Library/program dependencies | ||||
| EXTRA_LIB_PATH=-L/usr/X11R6/lib | ||||
| @@ -47,7 +44,7 @@ GL_LIB_DEPS   = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl | ||||
|  | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = glx/x11 glu glut/glx glew glw | ||||
| SRC_DIRS = glx/x11 glu glut/glx glw | ||||
| DRIVER_DIRS = | ||||
| PROGRAM_DIRS =  | ||||
| WINDOW_SYSTEM=dri | ||||
|   | ||||
| @@ -1,42 +0,0 @@ | ||||
| # -*-makefile-*- | ||||
| # 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 = -g -ansi -pedantic | ||||
| DEFINES += -DDEBUG -DDEBUG_MATH -DGALLIUM_LLVMPIPE -DHAVE_UDIS86 | ||||
|  | ||||
| # override -std=c99 | ||||
| CFLAGS += -std=gnu99 | ||||
|  | ||||
| LLVM_VERSION := $(shell llvm-config --version) | ||||
|  | ||||
| ifeq ($(LLVM_VERSION),) | ||||
|   $(warning Could not find LLVM! Make Sure 'llvm-config' is in the path) | ||||
|   MESA_LLVM=0 | ||||
| else | ||||
|   MESA_LLVM=1 | ||||
| #  $(info Using LLVM version: $(LLVM_VERSION)) | ||||
| endif | ||||
|  | ||||
| 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 bitreader engine ipo interpreter instrumentation) | ||||
|   MKLIB_OPTIONS=-cplusplus | ||||
| else | ||||
|   LLVM_CFLAGS= | ||||
|   LLVM_CXXFLAGS= | ||||
| endif | ||||
|  | ||||
| LD = g++ | ||||
| GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -lstdc++ -ludis86 | ||||
| @@ -12,12 +12,9 @@ CXX = g++ | ||||
| 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 | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = gallium mesa glu | ||||
| SRC_DIRS = mesa glu | ||||
| DRIVER_DIRS = osmesa | ||||
| PROGRAM_DIRS = osdemos | ||||
|  | ||||
| @@ -25,4 +22,4 @@ PROGRAM_DIRS = osdemos | ||||
| # Dependencies | ||||
| OSMESA_LIB_DEPS = -lm -lpthread | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) | ||||
| APP_LIB_DEPS = -lm -lpthread | ||||
| APP_LIB_DEPS = -lOSMesa -lGLU | ||||
|   | ||||
| @@ -1,37 +0,0 @@ | ||||
| # Configuration for building static libOSMesa.a on Linux, no Xlib driver | ||||
| # This doesn't really have any Linux dependencies, so it should be usable | ||||
| # on other (gcc-based) systems. | ||||
|  | ||||
| include $(TOP)/configs/default | ||||
|  | ||||
| CONFIG_NAME = linux-osmesa | ||||
|  | ||||
| # Compiler and flags | ||||
| CC = gcc -m32 | ||||
| CXX = g++ -m32 | ||||
| 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 | ||||
|  | ||||
| MKLIB_OPTIONS = -static | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.a | ||||
| GLU_LIB_NAME = libGLU.a | ||||
| GLUT_LIB_NAME = libglut.a | ||||
| GLW_LIB_NAME = libGLw.a | ||||
| OSMESA_LIB_NAME = libOSMesa.a | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = mesa glu | ||||
| DRIVER_DIRS = osmesa | ||||
| PROGRAM_DIRS = osdemos | ||||
|  | ||||
|  | ||||
| # Dependencies | ||||
| GL_LIB_DEPS = | ||||
| OSMESA_LIB_DEPS = | ||||
| GLU_LIB_DEPS = | ||||
| GLUT_LIB_DEPS = | ||||
| GLW_LIB_DEPS = | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \ | ||||
|                $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm | ||||
| @@ -10,9 +10,6 @@ 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 -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 | ||||
| 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 | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| # Library names | ||||
| OSMESA_LIB = OSMesa16 | ||||
| @@ -20,7 +17,7 @@ OSMESA_LIB_NAME = libOSMesa16.so | ||||
|  | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = gallium mesa glu | ||||
| SRC_DIRS = mesa glu | ||||
| DRIVER_DIRS = osmesa | ||||
| PROGRAM_DIRS =  | ||||
|  | ||||
| @@ -28,4 +25,4 @@ PROGRAM_DIRS = | ||||
| # Dependencies | ||||
| OSMESA_LIB_DEPS = -lm -lpthread | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) | ||||
| APP_LIB_DEPS = -lm -lpthread | ||||
| APP_LIB_DEPS = -lOSMesa16 | ||||
|   | ||||
| @@ -10,11 +10,7 @@ CXX = g++ | ||||
| CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 | ||||
| CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE | ||||
| MKLIB_OPTIONS = -static | ||||
| PIC_FLAGS = | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| # Library names | ||||
| OSMESA_LIB = OSMesa16 | ||||
| @@ -22,11 +18,11 @@ OSMESA_LIB_NAME = libOSMesa16.a | ||||
|  | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = gallium mesa glu | ||||
| SRC_DIRS = mesa glu | ||||
| DRIVER_DIRS = osmesa | ||||
| PROGRAM_DIRS =  | ||||
|  | ||||
|  | ||||
| # Dependencies | ||||
| OSMESA_LIB_DEPS = -lm -lpthread | ||||
| APP_LIB_DEPS = -lm -lpthread | ||||
| APP_LIB_DEPS = -lOSMesa16 | ||||
|   | ||||
| @@ -10,9 +10,6 @@ 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 -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31 | ||||
| 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 | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| # Library names | ||||
| OSMESA_LIB = OSMesa32 | ||||
| @@ -20,7 +17,7 @@ OSMESA_LIB_NAME = libOSMesa32.so | ||||
|  | ||||
|  | ||||
| # Directories | ||||
| SRC_DIRS = gallium mesa glu | ||||
| SRC_DIRS = mesa glu | ||||
| DRIVER_DIRS = osmesa | ||||
| PROGRAM_DIRS =  | ||||
|  | ||||
| @@ -28,4 +25,4 @@ PROGRAM_DIRS = | ||||
| # Dependencies | ||||
| OSMESA_LIB_DEPS = -lm -lpthread | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) | ||||
| APP_LIB_DEPS = -lm -lpthread | ||||
| APP_LIB_DEPS = -lOSMesa32 | ||||
|   | ||||
| @@ -5,7 +5,6 @@ include $(TOP)/configs/linux-ppc | ||||
| CONFIG_NAME = linux-ppc-static | ||||
|  | ||||
| MKLIB_OPTIONS = -static | ||||
| PIC_FLAGS = | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.a | ||||
|   | ||||
| @@ -1,8 +1,29 @@ | ||||
| # Configuration for profiling on Linux with gprof | ||||
|  | ||||
| include $(TOP)/configs/linux-static | ||||
| include $(TOP)/configs/default | ||||
|  | ||||
| CONFIG_NAME = linux-profile | ||||
|  | ||||
| OPT_FLAGS = -pg -g -O2 | ||||
| DEFINES += -DNDEBUG | ||||
| # Compiler and flags | ||||
| CC = gcc | ||||
| CXX = g++ | ||||
|  | ||||
| CFLAGS = -pg -O -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG | ||||
|  | ||||
| CXXFLAGS = -pg -O -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG | ||||
|  | ||||
| GLUT_CFLAGS = -fexceptions | ||||
|  | ||||
| # Need to have -L/usr/X11R6/lib in these: | ||||
| GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread | ||||
| GLUT_LIB_DEPS = -L$(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) -lXt -L/usr/X11R6/lib -lX11 | ||||
|  | ||||
| # Need to make static libs for profiling: | ||||
| MKLIB_OPTIONS = -static | ||||
| GL_LIB_NAME = lib$(GL_LIB).a | ||||
| GLU_LIB_NAME = lib$(GLU_LIB).a | ||||
| GLUT_LIB_NAME = lib$(GLUT_LIB).a | ||||
| GLW_LIB_NAME = lib$(GLW_LIB).a | ||||
| OSMESA_LIB_NAME = lib$(OSMesa).a | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread | ||||
|   | ||||
| @@ -16,27 +16,23 @@ PIC_FLAGS  = -fPIC | ||||
| 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) | ||||
| LIBDRM_CFLAGS = `pkg-config --cflags libdrm` | ||||
| LIBDRM_LIB = `pkg-config --libs libdrm` | ||||
| PCIACCESS_CFLAGS = `pkg-config --cflags pciaccess` | ||||
| PCIACCESS_LIB = `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 | ||||
| 	-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER | ||||
|  | ||||
| CFLAGS   = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ | ||||
| 	$(ASM_FLAGS) -std=c99 -ffast-math  | ||||
|  | ||||
| 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 =  | ||||
| ASM_SOURCES =  | ||||
|  | ||||
| # Library/program dependencies | ||||
| DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(TOP)/$(LIB_DIR) $(PCIACCESS_LIB) | ||||
| @@ -46,7 +42,7 @@ 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 | ||||
| SRC_DIRS = glx/mini mesa glu glut/mini | ||||
| DRIVER_DIRS = dri | ||||
| PROGRAM_DIRS = miniglx | ||||
|  | ||||
|   | ||||
| @@ -5,6 +5,9 @@ include $(TOP)/configs/linux-solo | ||||
|  | ||||
| CONFIG_NAME = linux-solo-x86 | ||||
|  | ||||
| # Unnecessary on x86, generally. | ||||
| PIC_FLAGS =  | ||||
|  | ||||
| ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM | ||||
| MESA_ASM_SOURCES = $(X86_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86_API) | ||||
| ASM_SOURCES = $(X86_SOURCES) | ||||
| ASM_API = $(X86_API) | ||||
|   | ||||
| @@ -5,5 +5,5 @@ include $(TOP)/configs/linux | ||||
| CONFIG_NAME = linux-sparc | ||||
|  | ||||
| #ASM_FLAGS = -DUSE_SPARC_ASM | ||||
| #MESA_ASM_SOURCES = $(SPARC_SOURCES) | ||||
| #GLAPI_ASM_SOURCES = $(SPARC_API) | ||||
| #ASM_SOURCES = $(SPARC_SOURCES) | ||||
| #ASM_API = $(SPARC_API) | ||||
|   | ||||
| @@ -5,7 +5,6 @@ include $(TOP)/configs/linux | ||||
| CONFIG_NAME = linux-static | ||||
|  | ||||
| MKLIB_OPTIONS = -static | ||||
| PIC_FLAGS = | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.a | ||||
| @@ -22,5 +21,6 @@ GLUT_LIB_DEPS = | ||||
| GLW_LIB_DEPS =  | ||||
|  | ||||
| # Need to specify all libraries we may need | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) \ | ||||
| 	-l$(GL_LIB) -lm -L/usr/X11R6/lib/ -lX11 -lXext -lXmu -lXi -lpthread | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm \ | ||||
| 	-L/usr/X11R6/lib/ -lX11 -lXmu -lXi -lpthread | ||||
|  | ||||
|   | ||||
| @@ -4,8 +4,6 @@ include $(TOP)/configs/linux | ||||
|  | ||||
| CONFIG_NAME = linux-x86 | ||||
|  | ||||
| ARCH_FLAGS = -m32 -mmmx -msse -msse2 | ||||
|  | ||||
| ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM | ||||
| MESA_ASM_SOURCES = $(X86_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86_API) | ||||
| ASM_SOURCES = $(X86_SOURCES) | ||||
| ASM_API = $(X86_API) | ||||
|   | ||||
| @@ -6,8 +6,8 @@ CONFIG_NAME = linux-x86-64 | ||||
|  | ||||
| ARCH_FLAGS = -m64 | ||||
|  | ||||
| MESA_ASM_SOURCES = $(X86-64_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(X86-64_API) | ||||
| ASM_SOURCES = $(X86-64_SOURCES) | ||||
| ASM_API = $(X86-64_API) | ||||
| ASM_FLAGS = -DUSE_X86_64_ASM | ||||
|  | ||||
| LIB_DIR = lib64 | ||||
|   | ||||
| @@ -4,5 +4,4 @@ include $(TOP)/configs/linux-x86-64 | ||||
|  | ||||
| CONFIG_NAME = linux-x86-64-debug | ||||
|  | ||||
| OPT_FLAGS = -g | ||||
| DEFINES += -DDEBUG -DDEBUG_MATH | ||||
|   | ||||
| @@ -1,8 +0,0 @@ | ||||
| # Configuration for profiling on Linux for 64-bit X86 (Opteron) with gprof | ||||
|  | ||||
| include $(TOP)/configs/linux-x86-64-static | ||||
|  | ||||
| CONFIG_NAME = linux-x86-64-profile | ||||
|  | ||||
| OPT_FLAGS = -pg -g -O2 | ||||
| DEFINES += -DNDEBUG | ||||
| @@ -5,7 +5,6 @@ include $(TOP)/configs/linux-x86-64 | ||||
| CONFIG_NAME = linux-x86-64-static | ||||
|  | ||||
| MKLIB_OPTIONS = -static | ||||
| PIC_FLAGS = | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.a | ||||
| @@ -20,8 +19,5 @@ OSMESA_LIB_DEPS = | ||||
| GLU_LIB_DEPS =  | ||||
| GLUT_LIB_DEPS =  | ||||
| GLW_LIB_DEPS =  | ||||
|  | ||||
| # Need to specify all libraries we may need | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -Wl,--start-group \ | ||||
|                -l$(GL_LIB) $(TOP)/src/mesa/pipe/softpipe/libsoftpipe.a -Wl,--end-group \ | ||||
|                $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread -lstdc++ -lm | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \ | ||||
|                $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm | ||||
|   | ||||
| @@ -14,12 +14,9 @@ CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199 | ||||
|  | ||||
| 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) | ||||
| ASM_SOURCES = $(X86_SOURCES) | ||||
| ASM_API = $(X86_API) | ||||
|  | ||||
| # Library/program dependencies | ||||
| GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread | ||||
|   | ||||
| @@ -1,8 +0,0 @@ | ||||
| # Configuration for profiling on Linux with x86 optimizations with gprof | ||||
|  | ||||
| include $(TOP)/configs/linux-x86-static | ||||
|  | ||||
| CONFIG_NAME = linux-x86-profile | ||||
|  | ||||
| OPT_FLAGS = -pg -g -O2 | ||||
| DEFINES += -DNDEBUG | ||||
| @@ -5,7 +5,6 @@ include $(TOP)/configs/linux-x86 | ||||
| CONFIG_NAME = linux-x86-static | ||||
|  | ||||
| MKLIB_OPTIONS = -static | ||||
| PIC_FLAGS = | ||||
|  | ||||
| # Library names (actual file names) | ||||
| GL_LIB_NAME = libGL.a | ||||
| @@ -20,7 +19,5 @@ OSMESA_LIB_DEPS = | ||||
| GLU_LIB_DEPS =  | ||||
| GLUT_LIB_DEPS =  | ||||
| GLW_LIB_DEPS =  | ||||
|  | ||||
| # Need to specify all libraries we may need | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) \ | ||||
| 	-l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread -lstdc++ -lm | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \ | ||||
|                $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm | ||||
|   | ||||
							
								
								
									
										82
									
								
								configs/mine
									
									
									
									
									
								
							
							
						
						
									
										82
									
								
								configs/mine
									
									
									
									
									
								
							| @@ -1,82 +0,0 @@ | ||||
| # -*-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 | ||||
| @@ -1,5 +0,0 @@ | ||||
| # -*-makefile-*- | ||||
| # Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others | ||||
|  | ||||
| USE_DRI = yes | ||||
| include $(TOP)/configs/mine | ||||
| @@ -12,6 +12,3 @@ CXXFLAGS = -O2 -fPIC | ||||
| GLUT_CFLAGS = -fexceptions | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|   | ||||
| @@ -10,10 +10,6 @@ CXX = g++ | ||||
| CFLAGS = -O2 -fPIC -I/usr/X11R6/include -DUSE_XSHM -DHZ=100 | ||||
| CXXFLAGS = -O2 -fPIC -I/usr/X11R6/include -DHZ=100 | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm | ||||
| OSMESA_LIB_DEPS = -lm | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) | ||||
|   | ||||
| @@ -11,10 +11,6 @@ CFLAGS = -O3 -march=i486 -fPIC -I/usr/openwin/include -DUSE_XSHM | ||||
| CXXFLAGS = -O3 -march=i486 -fPIC | ||||
| GLUT_CFLAGS = -fexceptions | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm | ||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm | ||||
|   | ||||
| @@ -12,10 +12,6 @@ CXXFLAGS = -O3 -march=i486 -fPIC | ||||
| GLUT_CFLAGS = -fexceptions | ||||
| MKLIB_OPTIONS = -static | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread | ||||
| GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm | ||||
| GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm | ||||
|   | ||||
| @@ -11,9 +11,5 @@ CFLAGS = -fPIC -O3 -I/usr/openwin/include -I/usr/include/X11R5 -I/usr/include/X1 | ||||
| CXXFLAGS = -fPIC -O3 -I/usr/openwin/include -DSUNOS4 | ||||
| GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm | ||||
|  | ||||
|   | ||||
| @@ -16,8 +16,8 @@ ARCH_FLAGS ?= | ||||
|  | ||||
| DEFINES = -D_REENTRANT -DUSE_XSHM | ||||
|  | ||||
| MESA_ASM_SOURCES = $(SPARC_SOURCES) | ||||
| GLAPI_ASM_SOURCES = $(SPARC_API) | ||||
| ASM_SOURCES = $(SPARC_SOURCES) | ||||
| ASM_API = $(SPARC_API) | ||||
| ASM_FLAGS = -DUSE_SPARC_ASM | ||||
|  | ||||
| CFLAGS   = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ | ||||
| @@ -28,10 +28,6 @@ CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ | ||||
|  | ||||
| GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| # Library/program dependencies | ||||
| EXTRA_LIB_PATH=-L/usr/openwin/lib | ||||
|  | ||||
|   | ||||
| @@ -21,9 +21,6 @@ CXX_ARCH_FLAGS = -m64 | ||||
| CXXFLAGS = $(CXX_WARN_FLAGS) $(CXX_OPT_FLAGS) $(CXX_PIC_FLAGS) $(CXX_ARCH_FLAGS) $(DEFINES) \ | ||||
|         -I/usr/openwin/include | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| CFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DPTHREADS | ||||
| #CXXFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS | ||||
| GLUT_CFLAGS = -DSOLARIS_2_4_BUG | ||||
|   | ||||
| @@ -12,10 +12,6 @@ CXXFLAGS = -pedantic -O2 | ||||
| GLUT_CFLAGS = -fexceptions | ||||
| MKLIB_OPTIONS = -static | ||||
|  | ||||
| # Work around aliasing bugs - developers should comment this out | ||||
| CFLAGS += -fno-strict-aliasing | ||||
| CXXFLAGS += -fno-strict-aliasing | ||||
|  | ||||
| GL_LIB_NAME = libGL.a | ||||
| GLU_LIB_NAME = libGLU.a | ||||
| GLUT_LIB_NAME = libglut.a | ||||
|   | ||||
							
								
								
									
										1309
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										1309
									
								
								configure.ac
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										22
									
								
								descrip.mms
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								descrip.mms
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| # Makefile for Mesa for VMS | ||||
| # contributed by Jouk Jansen  joukj@hrem.stm.tudelft.nl | ||||
|  | ||||
| macro :  | ||||
|         @ macro="" | ||||
| .ifdef NOSHARE | ||||
| .else | ||||
| 	@ if f$getsyi("HW_MODEL") .ge. 1024 then macro= "/MACRO=(SHARE=1)" | ||||
| .endif | ||||
| 	$(MMS)$(MMSQUALIFIERS)'macro' all | ||||
|  | ||||
| all : | ||||
| 	if f$search("lib.dir") .eqs. "" then create/directory [.lib] | ||||
| 	set default [.src] | ||||
| 	$(MMS)$(MMSQUALIFIERS) | ||||
| 	set default [-.progs.util] | ||||
| 	$(MMS)$(MMSQUALIFIERS) | ||||
| 	set default [-.demos] | ||||
| 	$(MMS)$(MMSQUALIFIERS) | ||||
| 	set default [-.xdemos] | ||||
| 	$(MMS)$(MMSQUALIFIERS) | ||||
| 	if f$search("[-]tests.DIR") .nes. "" then pipe set default [-.tests] ; $(MMS)$(MMSQUALIFIERS) | ||||
| @@ -16,7 +16,7 @@ Status | ||||
|  | ||||
| Version | ||||
|  | ||||
|     Last Modified Date:  12 January 2009 | ||||
|     Last Modified Date:  8 June 2000 | ||||
|  | ||||
| Number | ||||
|  | ||||
| @@ -69,12 +69,6 @@ Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) | ||||
|     <width> and <height> indicate the size in pixels.  Coordinate (0,0) | ||||
|     corresponds to the lower-left pixel of the window, like glReadPixels. | ||||
|  | ||||
|     If dpy and drawable are the display and drawable for the calling | ||||
|     thread's current context, glXCopySubBufferMESA performs an | ||||
|     implicit glFlush before it returns.  Subsequent OpenGL commands | ||||
|     may be issued immediately after calling glXCopySubBufferMESA, but | ||||
|     are not executed until the copy is completed.  | ||||
|  | ||||
| GLX Protocol | ||||
|  | ||||
|     None at this time.  The extension is implemented in terms of ordinary | ||||
| @@ -90,7 +84,5 @@ New State | ||||
|  | ||||
| Revision History | ||||
|  | ||||
|     12 January 2009 Ian Romanick - Added language about implicit flush | ||||
|                                    and command completion. | ||||
|     8 June 2000     Brian Paul   - initial specification | ||||
|     8 June 2000 - initial specification | ||||
|  | ||||
|   | ||||
| @@ -17,6 +17,7 @@ Status | ||||
| 
 | ||||
| Version | ||||
| 
 | ||||
|     $Id: MESA_packed_depth_stencil.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $ | ||||
| 
 | ||||
| Number | ||||
| 
 | ||||
| @@ -18,6 +18,7 @@ Version | ||||
| 
 | ||||
|     Last Modified Date: July 20, 2003 | ||||
|     Author Revision: 1.0 | ||||
|     $Date: 2004/03/25 01:42:41 $ $Revision: 1.4 $ | ||||
| 
 | ||||
| Number | ||||
| 
 | ||||
| @@ -16,6 +16,7 @@ Status | ||||
|  | ||||
| Version | ||||
|  | ||||
|     $Id: MESA_resize_buffers.spec,v 1.3 2004/03/25 01:42:42 brianp Exp $ | ||||
|  | ||||
| Number | ||||
|  | ||||
|   | ||||
| @@ -13,12 +13,13 @@ Contact | ||||
|  | ||||
| Status | ||||
|  | ||||
|     Obsolete. | ||||
|     XXX - Not complete yet!!! | ||||
|  | ||||
| Version | ||||
|  | ||||
|     Last Modified Date: July 30, 2006 | ||||
|     Author Revision: 0.2 | ||||
|     $Date: 2006/07/30 14:28:38 $ $Revision: 1.2 $ | ||||
|  | ||||
| Number | ||||
|  | ||||
|   | ||||
| @@ -16,6 +16,7 @@ Status | ||||
| 
 | ||||
| Version | ||||
| 
 | ||||
|     $Id: MESA_sprite_point.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $ | ||||
| 
 | ||||
| Number | ||||
| 
 | ||||
| @@ -1,804 +0,0 @@ | ||||
| Name | ||||
|  | ||||
|     MESA_texture_array | ||||
|  | ||||
| Name Strings | ||||
|  | ||||
|     GL_MESA_texture_array | ||||
|  | ||||
| Contact | ||||
|  | ||||
|     Ian Romanick, IBM (idr 'at' us.ibm.com) | ||||
|  | ||||
| IP Status | ||||
|  | ||||
|     No known IP issues. | ||||
|  | ||||
| Status | ||||
|  | ||||
|     Shipping in Mesa 7.1 | ||||
|  | ||||
| Version | ||||
|  | ||||
|  | ||||
| Number | ||||
|  | ||||
|     TBD | ||||
|  | ||||
| Dependencies | ||||
|  | ||||
|     OpenGL 1.2 or GL_EXT_texture3D is required. | ||||
|  | ||||
|     Support for ARB_fragment_program is assumed, but not required. | ||||
|  | ||||
|     Support for ARB_fragment_program_shadow is assumed, but not required. | ||||
|  | ||||
|     Support for EXT_framebuffer_object is assumed, but not required. | ||||
|  | ||||
|     Written based on the wording of the OpenGL 2.0 specification and | ||||
|     ARB_fragment_program_shadow but not dependent on them. | ||||
|  | ||||
| Overview | ||||
|  | ||||
|     There are a number of circumstances where an application may wish to | ||||
|     blend two textures out of a larger set of textures.  Moreover, in some | ||||
|     cases the selected textures may vary on a per-fragment basis within | ||||
|     a polygon.  Several examples include: | ||||
|  | ||||
|        1. High dynamic range textures.  The application stores several | ||||
|        different "exposures" of an image as different textures.  On a | ||||
|        per-fragment basis, the application selects which exposures are | ||||
|        used. | ||||
|  | ||||
|        2. A terrain engine where the altitude of a point determines the | ||||
|        texture applied to it.  If the transition is from beach sand to | ||||
|        grass to rocks to snow, the application will store each texture | ||||
|        in a different texture map, and dynamically select which two | ||||
|        textures to blend at run-time. | ||||
|  | ||||
|        3. Storing short video clips in textures.  Each depth slice is a | ||||
|        single frame of video. | ||||
|  | ||||
|     Several solutions to this problem have been proposed, but they either | ||||
|     involve using a separate texture unit for each texture map or using 3D | ||||
|     textures without mipmaps.  Both of these options have major drawbacks. | ||||
|  | ||||
|     This extension provides a third alternative that eliminates the major | ||||
|     drawbacks of both previous methods.  A new texture target, | ||||
|     TEXTURE_2D_ARRAY, is added that functions identically to TEXTURE_3D in | ||||
|     all aspects except the sizes of the non-base level images.  In | ||||
|     traditional 3D texturing, the size of the N+1 LOD is half the size | ||||
|     of the N LOD in all three dimensions.  For the TEXTURE_2D_ARRAY target, | ||||
|     the height and width of the N+1 LOD is halved, but the depth is the | ||||
|     same for all levels of detail. The texture then becomes an array of | ||||
|     2D textures.  The per-fragment texel is selected by the R texture | ||||
|     coordinate. | ||||
|  | ||||
|     References: | ||||
|  | ||||
|         http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011557 | ||||
|         http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=000516 | ||||
|         http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011903 | ||||
|         http://www.delphi3d.net/articles/viewarticle.php?article=terraintex.htm | ||||
|  | ||||
| New Procedures and Functions | ||||
|  | ||||
|     All functions come directly from EXT_texture_array. | ||||
|  | ||||
|     void FramebufferTextureLayerEXT(enum target, enum attachment, | ||||
|                                     uint texture, int level, int layer); | ||||
|  | ||||
| New Tokens | ||||
|  | ||||
|     All token names and values come directly from EXT_texture_array. | ||||
|  | ||||
|     Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by | ||||
|     the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and | ||||
|     GetDoublev, and by the <target> parameter of TexImage3D, GetTexImage, | ||||
|     GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and | ||||
|     GetTexParameterfv: | ||||
|  | ||||
|         TEXTURE_1D_ARRAY_EXT                            0x8C18 | ||||
|         TEXTURE_2D_ARRAY_EXT                            0x8C1A | ||||
|  | ||||
|     Accepted by the <target> parameter of TexImage2D, TexSubImage2D, | ||||
|     CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, | ||||
|     CompressedTexSubImage2D, GetTexLevelParameteriv, and  | ||||
|     GetTexLevelParameterfv: | ||||
|  | ||||
|         TEXTURE_1D_ARRAY_EXT | ||||
|         PROXY_TEXTURE_1D_ARRAY_EXT                      0x8C19 | ||||
|  | ||||
|     Accepted by the <target> parameter of TexImage3D, TexSubImage3D, | ||||
|     CopyTexSubImage3D, CompressedTexImage3D, CompressedTexSubImage3D, | ||||
|     GetTexLevelParameteriv, and GetTexLevelParameterfv: | ||||
|  | ||||
|         TEXTURE_2D_ARRAY_EXT | ||||
|         PROXY_TEXTURE_2D_ARRAY_EXT                      0x8C1B | ||||
|  | ||||
|     Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, | ||||
|     GetFloatv, and GetDoublev | ||||
|  | ||||
|         TEXTURE_BINDING_1D_ARRAY_EXT                    0x8C1C | ||||
|         TEXTURE_BINDING_2D_ARRAY_EXT                    0x8C1D | ||||
|         MAX_ARRAY_TEXTURE_LAYERS_EXT                    0x88FF | ||||
|  | ||||
|     Accepted by the <param> parameter of TexParameterf, TexParameteri, | ||||
|     TexParameterfv, and TexParameteriv when the <pname> parameter is | ||||
|     TEXTURE_COMPARE_MODE_ARB: | ||||
|  | ||||
|         COMPARE_REF_DEPTH_TO_TEXTURE_EXT                0x884E | ||||
|  | ||||
|     (Note:  COMPARE_REF_DEPTH_TO_TEXTURE_EXT is simply an alias for the | ||||
|     existing COMPARE_R_TO_TEXTURE token in OpenGL 2.0; the alternate name | ||||
|     reflects the fact that the R coordinate is not always used.) | ||||
|  | ||||
|     Accepted by the <internalformat> parameter of TexImage3D and | ||||
|     CompressedTexImage3D, and by the <format> parameter of | ||||
|     CompressedTexSubImage3D: | ||||
|  | ||||
|         COMPRESSED_RGB_S3TC_DXT1_EXT | ||||
|         COMPRESSED_RGBA_S3TC_DXT1_EXT | ||||
|         COMPRESSED_RGBA_S3TC_DXT3_EXT | ||||
|         COMPRESSED_RGBA_S3TC_DXT5_EXT | ||||
|  | ||||
|     Accepted by the <pname> parameter of | ||||
|     GetFramebufferAttachmentParameterivEXT: | ||||
|  | ||||
|         FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT          0x8CD4 | ||||
|  | ||||
|     (Note:  FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER is simply an alias for the | ||||
|     FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT token provided in | ||||
|     EXT_framebuffer_object.  This extension generalizes the notion of | ||||
|     "<zoffset>" to include layers of an array texture.) | ||||
|  | ||||
| Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation) | ||||
|  | ||||
|     None | ||||
|  | ||||
| Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) | ||||
|  | ||||
|     -- Section 3.8.1 "Texture Image Specification" | ||||
|  | ||||
|        Change the first paragraph (page 150) to say (spec changes identical to | ||||
|        EXT_texture_array): | ||||
|  | ||||
|        "The command | ||||
|  | ||||
|          void TexImage3D(enum target, int level, int internalformat, | ||||
|                          sizei width, sizei height, sizei depth, int border, | ||||
|                          enum format, enum type, void *data); | ||||
|  | ||||
|        is used to specify a three-dimensional texture image. target must be one | ||||
|        one of TEXTURE_3D for a three-dimensional texture or | ||||
|        TEXTURE_2D_ARRAY_EXT for an two-dimensional array texture. | ||||
|        Additionally, target may be either PROXY_TEXTURE_3D for a | ||||
|        three-dimensional proxy texture, or PROXY_TEXTURE_2D_ARRAY_EXT for a | ||||
|        two-dimensional proxy array texture." | ||||
|  | ||||
|        Change the fourth paragraph on page 151 to say (spec changes identical | ||||
|        to EXT_texture_array): | ||||
|  | ||||
|        "Textures with a base internal format of DEPTH_COMPONENT are supported | ||||
|        by texture image specification commands only if target is TEXTURE_1D, | ||||
|        TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, TEXTURE_2D_ARRAY_EXT, | ||||
|        PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_1D_ARRAY_EXT, or | ||||
|        PROXY_TEXTURE_2D_ARRAY_EXT. Using this format in conjunction with any | ||||
|        other target will result in an INVALID_OPERATION error." | ||||
|  | ||||
|  | ||||
|        Change the fourth paragraph on page 156 to say (spec changes identical | ||||
|        to EXT_texture_array): | ||||
|         | ||||
|        "The command | ||||
|  | ||||
|          void TexImage2D(enum target, int level, | ||||
|                          int internalformat, sizei width, sizei height, | ||||
|                          int border, enum format, enum type, void *data); | ||||
|  | ||||
|        is used to specify a two-dimensional texture image. target must be one | ||||
|        of TEXTURE_2D for a two-dimensional texture, TEXTURE_1D_ARRAY_EXT for a | ||||
|        one-dimensional array texture, or one of TEXTURE_CUBE_MAP_POSITIVE_X, | ||||
|        TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y, | ||||
|        TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or | ||||
|        TEXTURE_CUBE_MAP_NEGATIVE_Z for a cube map texture. Additionally, | ||||
|        target may be either PROXY_TEXTURE_2D for a two-dimensional proxy | ||||
|        texture, PROXY_TEXTURE_1D_ARRAY_EXT for a one-dimensional proxy array | ||||
|        texture, or PROXY TEXTURE_CUBE_MAP for a cube map proxy texture in the | ||||
|        special case discussed in section 3.8.11.  The other parameters match | ||||
|        the corresponding parameters of TexImage3D. | ||||
|  | ||||
|        For the purposes of decoding the texture image, TexImage2D is | ||||
|        equivalent to calling TexImage3D with corresponding arguments and depth | ||||
|        of 1, except that | ||||
|  | ||||
|          * The border depth, d_b, is zero, and the depth of the image is | ||||
|            always 1 regardless of the value of border.  | ||||
|  | ||||
|          * The border height, h_b, is zero if <target> is | ||||
|            TEXTURE_1D_ARRAY_EXT, and <border> otherwise. | ||||
|  | ||||
|          * Convolution will be performed on the image (possibly changing its | ||||
|            width and height) if SEPARABLE 2D or CONVOLUTION 2D is enabled. | ||||
|  | ||||
|          * UNPACK SKIP IMAGES is ignored." | ||||
|  | ||||
|     -- Section 3.8.2 "Alternate Texture Image Specification Commands" | ||||
|  | ||||
|        Change the second paragraph (page 159) (spec changes identical | ||||
|        to EXT_texture_array): | ||||
|  | ||||
|        "The command | ||||
|  | ||||
|          void CopyTexImage2D(enum target, int level, | ||||
|                              enum internalformat, int x, int y, sizei width, | ||||
|                              sizei height, int border); | ||||
|  | ||||
|        defines a two-dimensional texture image in exactly the manner of | ||||
|        TexImage2D, except that the image data are taken from the framebuffer | ||||
|        rather than from client memory. Currently, target must be one of | ||||
|        TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, TEXTURE_CUBE_MAP_POSITIVE_X, | ||||
|        TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE MAP_POSITIVE_Y, | ||||
|        TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or | ||||
|        TEXTURE_CUBE_MAP_NEGATIVE_Z. | ||||
|  | ||||
|  | ||||
|        Change the last paragraph on page 160 to say (spec changes identical | ||||
|        to EXT_texture_array): | ||||
|  | ||||
|        "Currently the target arguments of TexSubImage1D and CopyTexSubImage1D | ||||
|        must be TEXTURE_1D, the target arguments of TexSubImage2D and | ||||
|        CopyTexSubImage2D must be one of TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, | ||||
|        TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_X, | ||||
|        TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Y, | ||||
|        TEXTURE_CUBE_MAP_POSITIVE_Z, or TEXTURE_CUBE_MAP_NEGATIVE_Z, and the | ||||
|        target arguments of TexSubImage3D and CopyTexSubImage3D must be | ||||
|        TEXTURE_3D or TEXTURE_2D_ARRAY_EXT. ..." | ||||
|  | ||||
|  | ||||
|     -- Section 3.8.4 "Texture Parameters" | ||||
|  | ||||
|        Change the first paragraph (page 166) to say: | ||||
|  | ||||
|        "Various parameters control how the texel array is treated when | ||||
|        specified or changed, and when applied to a fragment. Each parameter is | ||||
|        set by calling | ||||
|  | ||||
|          void TexParameter{if}(enum target, enum pname, T param);  | ||||
|          void TexParameter{if}v(enum target, enum pname, T params); | ||||
|  | ||||
|        target is the target, either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, | ||||
|        TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT." | ||||
|  | ||||
|  | ||||
|     -- Section 3.8.8 "Texture Minification" in the section "Scale Factor and Level of Detail" | ||||
|  | ||||
|        Change the first paragraph (page 172) to say: | ||||
|  | ||||
|        "Let s(x,y) be the function that associates an s texture coordinate | ||||
|        with each set of window coordinates (x,y) that lie within a primitive; | ||||
|        define t(x,y) and r(x,y) analogously.  Let u(x,y) = w_t * s(x,y), | ||||
|        v(x,y) = h_t * t(x,y), and w(x,y) = d_t * r(x,y), where w_t, h_t, | ||||
|        and d_t are as defined by equations 3.15, 3.16, and 3.17 with | ||||
|        w_s, h_s, and d_s equal to the width, height, and depth of the | ||||
|        image array whose level is level_base.  For a one-dimensional | ||||
|        texture or a one-dimensional array texture, define v(x,y) = 0 and | ||||
|        w(x,y) = 0; for a two-dimensional texture or a two-dimensional array | ||||
|        texture, define w(x,y) = 0..." | ||||
|  | ||||
|     -- Section 3.8.8 "Texture Minification" in the section "Mipmapping" | ||||
|  | ||||
|        Change the third paragraph (page 174) to say: | ||||
|         | ||||
|        "For a two-dimensional texture, two-dimensional array texture, or | ||||
|        cube map texture," | ||||
|  | ||||
|        Change the fourth paragraph (page 174) to say: | ||||
|  | ||||
|        "And for a one-dimensional texture or a one-dimensional array texture," | ||||
|  | ||||
|        After the first paragraph (page 175) add: | ||||
|  | ||||
|        "For one-dimensional array textures, h_b and d_b are treated as 1, | ||||
|        regardless of the actual values, when performing mipmap calculations. | ||||
|        For two-dimensional array textures, d_b is always treated as one, | ||||
|        regardless of the actual value, when performing mipmap calculations." | ||||
|  | ||||
|     -- Section 3.8.8 "Automatic Mipmap Generation" in the section "Mipmapping" | ||||
|  | ||||
|        Change the third paragraph (page 176) to say (spec changes identical | ||||
|        to EXT_texture_array): | ||||
|  | ||||
|        "The contents of the derived arrays are computed by repeated, filtered | ||||
|        reduction of the level_base array.  For one- and two-dimensional array | ||||
|        textures, each layer is filtered independently.  ..." | ||||
|  | ||||
|     -- Section 3.8.8 "Manual Mipmap Generation" in the section "Mipmapping" | ||||
|  | ||||
|        Change first paragraph to say (spec changes identical to | ||||
|        EXT_texture_array): | ||||
|  | ||||
|        "Mipmaps can be generated manually with the command | ||||
|  | ||||
|          void GenerateMipmapEXT(enum target); | ||||
|  | ||||
|        where <target> is one of TEXTURE_1D, TEXTURE_2D, TEXTURE_CUBE_MAP, | ||||
|        TEXTURE_3D, TEXTURE_1D_ARRAY, or TEXTURE_2D_ARRAY.  Mipmap generation | ||||
|        affects the texture image attached to <target>.  ..." | ||||
|  | ||||
|     -- Section 3.8.10 "Texture Completeness" | ||||
|  | ||||
|        Change the second paragaph (page 177) to say (spec changes identical | ||||
|        to EXT_texture_array): | ||||
|  | ||||
|        "For one-, two-, or three-dimensional textures and one- or | ||||
|        two-dimensional array textures, a texture is complete if the following | ||||
|        conditions all hold true:" | ||||
|  | ||||
|     -- Section 3.8.11 "Texture State and Proxy State" | ||||
|  | ||||
|        Change the second and third paragraphs (page 179) to say (spec changes | ||||
|        identical to EXT_texture_array): | ||||
|  | ||||
|        "In addition to image arrays for one-, two-, and three-dimensional | ||||
|        textures, one- and two-dimensional array textures, and the six image | ||||
|        arrays for the cube map texture, partially instantiated image arrays | ||||
|        are maintained for one-, two-, and three-dimensional textures and one- | ||||
|        and two-dimensional array textures.  Additionally, a single proxy image | ||||
|        array is maintained for the cube map texture.  Each proxy image array | ||||
|        includes width, height, depth, border width, and internal format state | ||||
|        values, as well as state for the red, green, blue, alpha, luminance, | ||||
|        and intensity component resolutions. Proxy image arrays do not include | ||||
|        image data, nor do they include texture properties. When TexImage3D is | ||||
|        executed with target specified as PROXY_TEXTURE_3D, the | ||||
|        three-dimensional proxy state values of the specified level-of-detail | ||||
|        are recomputed and updated. If the image array would not be supported | ||||
|        by TexImage3D called with target set to TEXTURE 3D, no error is | ||||
|        generated, but the proxy width, height, depth, border width, and | ||||
|        component resolutions are set to zero. If the image array would be | ||||
|        supported by such a call to TexImage3D, the proxy state values are set | ||||
|        exactly as though the actual image array were being specified. No pixel | ||||
|        data are transferred or processed in either case. | ||||
|  | ||||
|        Proxy arrays for one- and two-dimensional textures and one- and | ||||
|        two-dimensional array textures are operated on in the same way when | ||||
|        TexImage1D is executed with target specified as PROXY_TEXTURE_1D, | ||||
|        TexImage2D is executed with target specified as PROXY_TEXTURE_2D or | ||||
|        PROXY_TEXTURE_1D_ARRAY_EXT, or TexImage3D is executed with target | ||||
|        specified as PROXY_TETXURE_2D_ARRAY_EXT." | ||||
|  | ||||
|     -- Section 3.8.12 "Texture Objects" | ||||
|  | ||||
|        Change section (page 180) to say (spec changes identical to  | ||||
|        EXT_texture_array): | ||||
|  | ||||
|        "In addition to the default textures TEXTURE_1D, TEXTURE_2D, | ||||
|        TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and TEXTURE_2D_EXT, | ||||
|        named one-, two-, and three-dimensional, cube map, and one- and | ||||
|        two-dimensional array texture objects can be created and operated upon. | ||||
|        The name space for texture objects is the unsigned integers, with zero | ||||
|        reserved by the GL. | ||||
|  | ||||
|        A texture object is created by binding an unused name to TEXTURE_1D, | ||||
|        TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or | ||||
|        TEXTURE_2D_ARRAY_EXT. The binding is effected by calling | ||||
|  | ||||
|          void BindTexture(enum target, uint texture); | ||||
|  | ||||
|        with <target> set to the desired texture target and <texture> set to | ||||
|        the unused name.  The resulting texture object is a new state vector, | ||||
|        comprising all the state values listed in section 3.8.11, set to the | ||||
|        same initial values. If the new texture object is bound to TEXTURE_1D, | ||||
|        TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or | ||||
|        TEXTURE_2D_ARRAY_EXT, it is and remains a one-, two-, | ||||
|        three-dimensional, cube map, one- or two-dimensional array texture | ||||
|        respectively until it is deleted. | ||||
|  | ||||
|        BindTexture may also be used to bind an existing texture object to | ||||
|        either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, | ||||
|        TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT. The error | ||||
|        INVALID_OPERATION is generated if an attempt is made to bind a texture | ||||
|        object of different dimensionality than the specified target. If the | ||||
|        bind is successful no change is made to the state of the bound texture | ||||
|        object, and any previous binding to target is broken. | ||||
|  | ||||
|        While a texture object is bound, GL operations on the target to which | ||||
|        it is bound affect the bound object, and queries of the target to which | ||||
|        it is bound return state from the bound object. If texture mapping of | ||||
|        the dimensionality of the target to which a texture object is bound is | ||||
|        enabled, the state of the bound texture object directs the texturing | ||||
|        operation. | ||||
|  | ||||
|        In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, | ||||
|        TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and TEXTURE_2D_ARRAY_EXT have | ||||
|        one-, two-, three-dimensional, cube map, and one- and two-dimensional | ||||
|        array texture state vectors respectively associated with them. In order | ||||
|        that access to these initial textures not be lost, they are treated as | ||||
|        texture objects all of whose names are 0. The initial one-, two-, | ||||
|        three-dimensional, cube map, one- and two-dimensional array textures | ||||
|        are therefore operated upon, queried, and applied as TEXTURE_1D, | ||||
|        TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and | ||||
|        TEXTURE_2D_ARRAY_EXT respectively while 0 is bound to the corresponding | ||||
|        targets. | ||||
|  | ||||
|        Change second paragraph on page 181 to say (spec changes identical to  | ||||
|        EXT_texture_array): | ||||
|         | ||||
|        "...  If a texture that is currently bound to one of the targets | ||||
|        TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, | ||||
|        TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT is deleted, it is as | ||||
|        though BindTexture had been executed with the same target and texture | ||||
|        zero. ..." | ||||
|  | ||||
|        Change second paragraph on page 182 to say (spec changes identical to  | ||||
|        EXT_texture_array): | ||||
|         | ||||
|        "The texture object name space, including the initial one-, two-, and | ||||
|        three dimensional, cube map, and one- and two-dimensional array texture | ||||
|        objects, is shared among all texture units. ..." | ||||
|  | ||||
|  | ||||
|     -- Section 3.8.14 "Depth Texture Comparison Modes" in "Texture Comparison Modes" | ||||
|  | ||||
|        Change second through fourth paragraphs (page 188) to say: | ||||
|  | ||||
|        "Let D_t be the depth texture value, in the range [0, 1].  For | ||||
|        texture lookups from one- and two-dimesional, rectangle, and | ||||
|        one-dimensional array targets, let R be the interpolated <r> | ||||
|        texture coordinate, clamped to the range [0, 1].  For texture lookups | ||||
|        from two-dimesional array texture targets, let R be the interpolated | ||||
|        <q> texture coordinate, clamped to the range [0, 1].  Then the | ||||
|        effective texture value L_t, I_t, or A_t is computed as follows: | ||||
|  | ||||
|        If the value of TEXTURE_COMPARE_MODE is NONE, then | ||||
|  | ||||
|           r = Dt | ||||
|  | ||||
|        If the value of TEXTURE_COMPARE_MODE is | ||||
|        COMPARE_REF_DEPTH_TO_TEXTURE_EXT), then r depends on the texture | ||||
|        comparison function as shown in table 3.27." | ||||
|  | ||||
|     -- Section 3.8.15 "Texture Application" | ||||
|  | ||||
|        Change the first paragraph (page 189) to say: | ||||
|  | ||||
|        "Texturing is enabled or disabled using the generic Enable and Disable | ||||
|        commands, respectively, with the symbolic constants TEXTURE_1D, | ||||
|        TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or | ||||
|        TEXTURE_2D_ARRAY_EXT to enable one-, two-, three-dimensional, cube | ||||
|        map, one-dimensional array, or two-dimensional array texture, | ||||
|        respectively.  If both two- and one-dimensional textures are enabled, | ||||
|        the two-dimensional texture is used.  If the three-dimensional and | ||||
|        either of the two- or one-dimensional textures is enabled, the | ||||
|        three-dimensional texture is used.  If the cube map texture and any of | ||||
|        the three-, two-, or one-dimensional textures is enabled, then cube map | ||||
|        texturing is used.  If one-dimensional array texture is enabled and any | ||||
|        of cube map, three-, two-, or one-dimensional textures is enabled,  | ||||
|        one-dimensional array texturing is used.  If two-dimensional array | ||||
|        texture is enabled and any of cube map, three-, two-, one-dimensional | ||||
|        textures or one-dimensional array texture is enabled, two-dimensional | ||||
|        array texturing is used..." | ||||
|  | ||||
|     -- Section 3.11.2 of ARB_fragment_program (Fragment Program Grammar and Restrictions): | ||||
|  | ||||
|        (mostly add to existing grammar rules) | ||||
|  | ||||
|        <optionName>           ::= "MESA_texture_array" | ||||
|  | ||||
|        <texTarget>            ::= "1D" | ||||
|                                | "2D" | ||||
|                                | "3D" | ||||
|                                | "CUBE" | ||||
|                                | "RECT" | ||||
|                                | <arrayTarget> (if program option is present) | ||||
|                                | <shadowTarget> (if program option is present) | ||||
|  | ||||
|        <arrayTarget>          ::= "ARRAY1D" | ||||
|                                | "ARRAY2D" | ||||
|  | ||||
|        <shadowTarget>         ::= "SHADOW1D" | ||||
|                                | "SHADOW2D" | ||||
|                                | "SHADOWRECT" | ||||
|                                | <shadowArrayTarget> (if program option is present) | ||||
|  | ||||
|        <shadowArrayTarget>    ::= "SHADOWARRAY1D" | ||||
|                                | "SHADOWARRAY2D" | ||||
|  | ||||
|  | ||||
|     -- Add Section 3.11.4.5.4 "Texture Stack Option" | ||||
|  | ||||
|        "If a fragment program specifies the "MESA_texture_array" program | ||||
|        option, the <texTarget> rule is modified to add the texture targets | ||||
|        ARRAY1D and ARRAY2D (See Section 3.11.2)." | ||||
|  | ||||
|     -- Section 3.11.6 "Fragment Program Texture Instruction Set" | ||||
|  | ||||
|        (replace 1st and 2nd paragraphs with the following paragraphs) | ||||
|  | ||||
|        "The first three texture instructions described below specify the | ||||
|        mapping of 4-tuple input vectors to 4-tuple output vectors. | ||||
|        The sampling of the texture works as described in section 3.8, | ||||
|        except that texture environments and texture functions are not | ||||
|        applicable, and the texture enables hierarchy is replaced by explicit | ||||
|        references to the desired texture target (i.e., 1D, 2D, 3D, cube map, | ||||
|        rectangle, ARRAY1D, ARRAY2D).  These texture instructions specify | ||||
|        how the 4-tuple is mapped into the coordinates used for sampling.  The | ||||
|        following function is used to describe the texture sampling in the | ||||
|        descriptions below:  | ||||
|  | ||||
|          vec4 TextureSample(vec4 coord, float lodBias, int texImageUnit, | ||||
|                             enum texTarget); | ||||
|  | ||||
|        Note that not all four components of the texture coordinates <coord> | ||||
|        are used by all texture targets.  Component usage for each <texTarget> | ||||
|        is defined in table X. | ||||
|  | ||||
|                                                         coordinates used | ||||
|          texTarget          Texture Type               s t r  layer  shadow | ||||
|          ----------------   ---------------------      -----  -----  ------ | ||||
|          1D                 TEXTURE_1D                 x - -    -      - | ||||
|          2D                 TEXTURE_2D                 x y -    -      - | ||||
|          3D                 TEXTURE_3D                 x y z    -      - | ||||
|          CUBE               TEXTURE_CUBE_MAP           x y z    -      - | ||||
|          RECT               TEXTURE_RECTANGLE_ARB      x y -    -      - | ||||
|          ARRAY1D            TEXTURE_1D_ARRAY_EXT       x - -    y      - | ||||
|          ARRAY2D            TEXTURE_2D_ARRAY_EXT       x y -    z      - | ||||
|          SHADOW1D           TEXTURE_1D                 x - -    -      z | ||||
|          SHADOW2D           TEXTURE_2D                 x y -    -      z | ||||
|          SHADOWRECT         TEXTURE_RECTANGLE_ARB      x y -    -      z | ||||
|          SHADOWARRAY1D      TEXTURE_1D_ARRAY_EXT       x - -    y      z | ||||
|          SHADOWARRAY2D      TEXTURE_2D_ARRAY_EXT       x y -    z      w | ||||
|  | ||||
|          Table X:  Texture types accessed for each of the <texTarget>, and | ||||
|          coordinate mappings.  The "coordinates used" column indicate the | ||||
|          input values used for each coordinate of the texture lookup, the | ||||
|          layer selector for array textures, and the reference value for | ||||
|          texture comparisons." | ||||
|  | ||||
|     -- Section 3.11.6.2 "TXP: Project coordinate and map to color" | ||||
|      | ||||
|        Add to the end of the section: | ||||
|         | ||||
|        "A program will fail to load if the TXP instruction is used in | ||||
|        conjunction with the SHADOWARRAY2D target." | ||||
|  | ||||
| Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment Operations) | ||||
|  | ||||
|     -- Section 4.4.2.3 "Attaching Texture Images to a Framebuffer" | ||||
|  | ||||
|        Add to the end of the section (spec changes identical to | ||||
|        EXT_texture_array): | ||||
|  | ||||
|        "The command | ||||
|  | ||||
|          void FramebufferTextureLayerEXT(enum target, enum attachment, | ||||
|                                          uint texture, int level, int layer); | ||||
|  | ||||
|        operates identically to FramebufferTexture3DEXT, except that it | ||||
|        attaches a single layer of a three-dimensional texture or a one- or | ||||
|        two-dimensional array texture.  <layer> is an integer indicating the | ||||
|        layer number, and is treated identically to the <zoffset> parameter in | ||||
|        FramebufferTexture3DEXT.  The error INVALID_VALUE is generated if | ||||
|        <layer> is negative.  The error INVALID_OPERATION is generated if | ||||
|        <texture> is non-zero and is not the name of a three dimensional | ||||
|        texture or one- or two-dimensional array texture.  Unlike | ||||
|        FramebufferTexture3D, no <textarget> parameter is accepted. | ||||
|  | ||||
|        If <texture> is non-zero and the command does not result in an error, | ||||
|        the framebuffer attachment state corresponding to <attachment> is | ||||
|        updated as in the other FramebufferTexture commands, except that | ||||
|        FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT is set to <layer>." | ||||
|  | ||||
|     -- Section 4.4.4.1 "Framebuffer Attachment Completeness" | ||||
|  | ||||
|       Add to the end of the list of completeness rules (spec changes | ||||
|       identical to EXT_texture_array): | ||||
|  | ||||
|         "* If FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT is TEXTURE and | ||||
|            FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT names a one- or  | ||||
|            two-dimensional array texture, then | ||||
|            FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT must be smaller than the | ||||
|            number of layers in the texture." | ||||
|  | ||||
| Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) | ||||
|  | ||||
|     -- Section 5.4 "Display Lists" | ||||
|  | ||||
|        Change the first paragraphi on page 242 to say (spec changes | ||||
|        identical to EXT_texture_array): | ||||
|  | ||||
|        "TexImage3D, TexImage2D, TexImage1D, Histogram, and ColorTable are | ||||
|        executed immediately when called with the corresponding proxy arguments | ||||
|        PROXY_TEXTURE_3D or PROXY_TEXTURE_2D_ARRAY_EXT; PROXY_TEXTURE_2D, | ||||
|        PROXY_TEXTURE_CUBE_MAP, or PROXY_TEXTURE_1D_ARRAY_EXT; | ||||
|        PROXY_TEXTURE_1D; PROXY_HISTOGRAM; and PROXY_COLOR_TABLE, | ||||
|        PROXY_POST_CONVOLUTION_COLOR_TABLE, or | ||||
|        PROXY_POST_COLOR_MATRIX_COLOR_TABLE." | ||||
|  | ||||
| Additions to Chapter 6 of the OpenGL 2.0 Specification (State and State Requests) | ||||
|  | ||||
|     -- Section 6.1.3 "Enumerated Queries" | ||||
|  | ||||
|        Add after the line beginning "If the value of | ||||
|        FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT is TEXTURE" (spec changes | ||||
|        identical to EXT_texture_array): | ||||
|  | ||||
|        "If <pname> is FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT and the | ||||
|        texture object named FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT is a | ||||
|        three-dimensional texture or a one- or two-dimensional array texture, | ||||
|        then <params> will contain the number of texture layer attached to the | ||||
|        attachment point.  Otherwise, <params> will contain the value zero." | ||||
|  | ||||
|     -- Section 6.1.4 "Texture Queries" | ||||
|      | ||||
|        Change the first three paragraphs (page 248) to say (spec changes | ||||
|        identical to EXT_texture_array): | ||||
|  | ||||
|        "The command | ||||
|  | ||||
|          void GetTexImage(enum tex, int lod, enum format, | ||||
|                           enum type, void *img); | ||||
|  | ||||
|        is used to obtain texture images. It is somewhat different from the | ||||
|        other get commands; tex is a symbolic value indicating which texture | ||||
|        (or texture face in the case of a cube map texture target name) is to | ||||
|        be obtained.  TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_1D_ARRAY_EXT, | ||||
|        and TEXTURE_2D_ARRAY_EXT indicate a one-, two-, or three-dimensional | ||||
|        texture, or one- or two-dimensional array texture, respectively. | ||||
|        TEXTURE_CUBE_MAP_POSITIVE_X, ... | ||||
|  | ||||
|        GetTexImage obtains... from the first image to the last for | ||||
|        three-dimensional textures.  One- and two-dimensional array textures | ||||
|        are treated as two- and three-dimensional images, respectively, where | ||||
|        the layers are treated as rows or images.  These groups are then... | ||||
|  | ||||
|        For three-dimensional and two-dimensional array textures, pixel storage | ||||
|        operations are applied as if the image were two-dimensional, except | ||||
|        that the additional pixel storage state values PACK_IMAGE_HEIGHT and | ||||
|        PACK_SKIP_IMAGES are applied. ..." | ||||
|  | ||||
| Additions to Appendix A of the OpenGL 2.0 Specification (Invariance) | ||||
|  | ||||
|     None | ||||
|  | ||||
| Additions to the AGL/GLX/WGL Specifications | ||||
|  | ||||
|     None | ||||
|  | ||||
| GLX Protocol | ||||
|  | ||||
|     None | ||||
|  | ||||
| Dependencies on ARB_fragment_program | ||||
|  | ||||
|     If ARB_fragment_program is not supported, the changes to section 3.11 | ||||
|     should be ignored. | ||||
|  | ||||
| Dependencies on EXT_framebuffer_object | ||||
|  | ||||
|     If EXT_framebuffer_object is not supported, the changes to section | ||||
|     3.8.8 ("Manual Mipmap Generation"), 4.4.2.3, and 6.1.3 should be ignored. | ||||
|  | ||||
| Dependencies on EXT_texture_compression_s3tc and NV_texture_compression_vtc | ||||
|  | ||||
|     (Identical dependency as EXT_texture_array.) | ||||
|  | ||||
|     S3TC texture compression is supported for two-dimensional array textures. | ||||
|     When <target> is TEXTURE_2D_ARRAY_EXT, each layer is stored independently | ||||
|     as a compressed two-dimensional textures.  When specifying or querying | ||||
|     compressed images using one of the S3TC formats, the images are provided | ||||
|     and/or returned as a series of two-dimensional textures stored | ||||
|     consecutively in memory, with the layer closest to zero specified first. | ||||
|     For array textures, images are not arranged in 4x4x4 or 4x4x2 blocks as in | ||||
|     the three-dimensional compression format provided in the | ||||
|     EXT_texture_compression_vtc extension.  Pixel store parameters, including | ||||
|     those specific to three-dimensional images, are ignored when compressed | ||||
|     image data are provided or returned, as in the | ||||
|     EXT_texture_compression_s3tc extension. | ||||
|  | ||||
|     S3TC compression is not supported for one-dimensional texture targets in | ||||
|     EXT_texture_compression_s3tc, and is not supported for one-dimensional | ||||
|     array textures in this extension.  If compressed one-dimensional arrays | ||||
|     are needed, use a two-dimensional texture with a height of one. | ||||
|  | ||||
|     This extension allows the use of the four S3TC internal format types in | ||||
|     TexImage3D, CompressedTexImage3D, and CompressedTexSubImage3D calls. | ||||
|  | ||||
| Errors | ||||
|  | ||||
|     None | ||||
|  | ||||
| New State | ||||
|  | ||||
|     (add to table 6.15, p. 276) | ||||
|  | ||||
|                                                      Initial | ||||
|     Get Value                     Type   Get Command  Value Description           Sec.    Attribute | ||||
|     ----------------------------  -----  -----------  ----- --------------------  ------  --------- | ||||
|     TEXTURE_BINDING_1D_ARRAY_EXT  2*xZ+  GetIntegerv    0   texture object bound  3.8.12  texture | ||||
|                                                             to TEXTURE_1D_ARRAY | ||||
|     TEXTURE_BINDING_2D_ARRAY_EXT  2*xZ+  GetIntegerv    0   texture object bound  3.8.12  texture | ||||
|                                                             to TEXTURE_2D_ARRAY | ||||
|  | ||||
|  | ||||
| New Implementation Dependent State | ||||
|  | ||||
|     (add to Table 6.32, p. 293) | ||||
|  | ||||
|                                                     Minimum | ||||
|     Get Value                     Type  Get Command  Value  Description         Sec.  Attribute | ||||
|     ----------------------------  ----  ----------- ------- ------------------  ----- --------- | ||||
|     MAX_TEXTURE_ARRAY_LAYERS_EXT   Z+   GetIntegerv   64    maximum number of   3.8.1     - | ||||
|                                                             layers for texture | ||||
|                                                             arrays | ||||
|  | ||||
| Issues | ||||
|  | ||||
|     (1) Is "texture stack" a good name for this functionality? | ||||
|  | ||||
|         NO.  The name is changed to "array texture" to match the | ||||
|         nomenclature used by GL_EXT_texture_array. | ||||
|  | ||||
|     (2) Should the R texture coordinate be treated as normalized or | ||||
|     un-normalized?  If it were un-normalized, floor(R) could be thought | ||||
|     of as a direct index into the array texture.  This may be more | ||||
|     convenient for applications. | ||||
|  | ||||
|         RESOLVED.  All texture coordinates are normalized.  The issue of | ||||
|         un-normalized texture coordinates has been discussed in the ARB | ||||
|         before and should be left for a layered extension. | ||||
|  | ||||
|         RE-RESOLVED.  The R coordinate is un-normalized.  Accessing an array | ||||
|         using [0, layers-1] coordinates is much more natural. | ||||
|  | ||||
|     (3) How does LOD selection work for stacked textures? | ||||
|  | ||||
|         RESOLVED.  For 2D array textures the R coordinate is ignored, and | ||||
|         the LOD selection equations for 2D textures are used.  For 1D | ||||
|         array textures the T coordinate is ignored, and the LOD selection | ||||
|         equations for 1D textures are used.  The expected usage is in a | ||||
|         fragment program with an explicit LOD selection. | ||||
|  | ||||
|     (4) What is the maximum size of a 2D array texture?  Is it the same | ||||
|     as for a 3D texture, or should a new query be added?  How about for 1D | ||||
|     array textures? | ||||
|  | ||||
|         RESOLVED.  A new query is added. | ||||
|  | ||||
|     (5) How are array textures exposed in GLSL? | ||||
|      | ||||
|         RESOLVED.  Use GL_EXT_texture_array. | ||||
|          | ||||
|     (6) Should a 1D array texture also be exposed? | ||||
|  | ||||
|         RESOLVED.  For orthogonality, yes. | ||||
|  | ||||
|     (7) How are stacked textures attached to framebuffer objects? | ||||
|  | ||||
|         RESOLVED.  Layers of both one- and two-dimensional array textures | ||||
|         are attached using FreambufferTextureLayerEXT.  Once attached, the | ||||
|         array texture layer behaves exactly as either a one- or | ||||
|         two-dimensional texture. | ||||
|  | ||||
|     (8) How is this extension related to GL_EXT_texture_array? | ||||
|      | ||||
|         This extension adapats GL_MESAX_texture_stack to the notation, | ||||
|         indexing, and FBO access of GL_EXT_texture_array.  This extension | ||||
|         replaces the GLSL support of GL_EXT_texture_array with | ||||
|         GL_ARB_fragment_program support. | ||||
|  | ||||
|         Assembly program support is also provided by GL_NV_gpu_program4. | ||||
|         GL_NV_gpu_program4 also adds support for other features that are | ||||
|         specific to Nvidia hardware, while this extension adds only support | ||||
|         for array textures. | ||||
|  | ||||
|         Much of text of this extension that has changed since | ||||
|         GL_MESAX_texture_stack comes directly from either | ||||
|         GL_EXT_texture_array or GL_NV_gpu_program4. | ||||
|  | ||||
| Revision History | ||||
|  | ||||
|     ||2005/11/15||0.1||idr||Initial draft MESAX version.|| | ||||
|     ||2005/12/07||0.2||idr||Added framebuffer object interactions.|| | ||||
|     ||2005/12/12||0.3||idr||Updated fragment program interactions.|| | ||||
|     ||2007/05/16||0.4||idr||Converted to MESA_texture_array.  Brought in line with EXT_texture_array and NV_gpu_program4.|| | ||||
| @@ -1,214 +0,0 @@ | ||||
| Name | ||||
|  | ||||
|     MESA_texture_signed_rgba | ||||
|  | ||||
| Name Strings | ||||
|  | ||||
|     GL_MESA_texture_signed_rgba | ||||
|  | ||||
| Contact | ||||
|  | ||||
|  | ||||
|  | ||||
| Notice | ||||
|  | ||||
|  | ||||
|  | ||||
| IP Status | ||||
|  | ||||
|     No known IP issues | ||||
|  | ||||
| Status | ||||
|  | ||||
|  | ||||
|  | ||||
| Version | ||||
|  | ||||
|     0.3, 2009-03-24 | ||||
|  | ||||
| Number | ||||
|  | ||||
|     Not assigned ? | ||||
|  | ||||
| Dependencies | ||||
|  | ||||
|     Written based on the wording of the OpenGL 2.0 specification. | ||||
|  | ||||
|     This extension trivially interacts with ARB_texture_float. | ||||
|     This extension shares some language with ARB_texture_compression_rgtc | ||||
|     but does not depend on it. | ||||
|  | ||||
| Overview | ||||
|  | ||||
|     OpenGL prior to 3.1 does not support any signed texture formats. | ||||
|     ARB_texture_compression_rgtc introduces some compressed red and | ||||
|     red_green signed formats but no uncompressed ones, which might | ||||
|     still be useful. NV_texture_shader adds signed texture formats, | ||||
|     but also a lot of functionality which has been superceded by fragment | ||||
|     shaders. | ||||
|     It is usually possible to get the same functionality | ||||
|     using a unsigned format by doing scale and bias in a shader, but this | ||||
|     is undesirable since modern hardware has direct support for this. | ||||
|     This extension adds a signed 4-channel texture format by backporting | ||||
|     the relevant features from OpenGL 3.1, as a means to support this in | ||||
|     OpenGL implementations only supporting older versions. | ||||
|  | ||||
| Issues | ||||
|  | ||||
|     1) What should this extension be called? | ||||
|  | ||||
|        RESOLVED: MESA_texture_signed_rgba seems reasonable. | ||||
|        The rgba part is there because only 4 channel format is supported. | ||||
|  | ||||
|  | ||||
|     2) Should the full set of signed formats (alpha, luminance, rgb, etc.) | ||||
|        be supported? | ||||
|  | ||||
|        RESOLVED: NO. To keep this extension simple, only add the most | ||||
|        universal format, rgba. alpha/luminance can't be trivially supported | ||||
|        since OpenGL 3.1 does not support them any longer, and there is some | ||||
|        implied dependency on ARB_texture_rg for red/red_green formats so | ||||
|        avoid all this. Likewise, only 8 bits per channel is supported. | ||||
|  | ||||
|  | ||||
|     3) Should this extension use new enums for the texture formats? | ||||
|  | ||||
|        RESOLVED: NO. Same enums as those used in OpenGL 3.1. | ||||
|  | ||||
|  | ||||
|     4) How are signed integer values mapped to floating-point values? | ||||
|  | ||||
|        RESOLVED: Same as described in issue 5) of | ||||
|        ARB_texture_compression_rgtc (quote): | ||||
|        A signed 8-bit two's complement value X is computed to | ||||
|        a floating-point value Xf with the formula: | ||||
|  | ||||
|                 { X / 127.0, X > -128 | ||||
|            Xf = { | ||||
|                 { -1.0,      X == -128 | ||||
|  | ||||
|        This conversion means -1, 0, and +1 are all exactly representable, | ||||
|        however -128 and -127 both map to -1.0.  Mapping -128 to -1.0 | ||||
|        avoids the numerical awkwardness of have a representable value | ||||
|        slightly more negative than -1.0. | ||||
|  | ||||
|        This conversion is intentionally NOT the "byte" conversion listed | ||||
|        in Table 2.9 for component conversions.  That conversion says: | ||||
|  | ||||
|            Xf = (2*X + 1) / 255.0 | ||||
|  | ||||
|        The Table 2.9 conversion is incapable of exactly representing | ||||
|        zero. | ||||
|  | ||||
|        (Difference to ARB_texture_compression_rgtc): | ||||
|        This is the same mapping as OpenGL 3.1 uses. | ||||
|        This is also different to what NV_texture_shader used. | ||||
|        The above mapping should be considered the reference, but there | ||||
|        is some leeway so other mappings are allowed for implementations which | ||||
|        cannot do this. Particulary the mapping given in NV_texture_shader or | ||||
|        the standard OpenGL byte/float mapping is considered acceptable too, as | ||||
|        might be a mapping which represents -1.0 by -128, 0.0 by 0 and 1.0 by | ||||
|        127 (that is, uses different scale factors for negative and positive | ||||
|        numbers). | ||||
|        Also, it is ok to store incoming GL_BYTE user data as-is, without | ||||
|        converting to GL_FLOAT (using the standard OpenGL float/byte mapping) | ||||
|        and converting back (using the mapping described here). | ||||
|        Other than those subtle issues there are no other non-standard | ||||
|        conversions used, so when using for instance CopyTexImage2D with | ||||
|        a framebuffer clamped to [0,1] all converted numbers will be in the range | ||||
|        [0, 127] (and not scaled and biased). | ||||
|  | ||||
|  | ||||
|     5) How will signed components resulting from RGBA8_SNORM texture | ||||
|        fetches interact with fragment coloring? | ||||
|  | ||||
|        RESOLVED: Same as described in issue 6) of | ||||
|        ARB_texture_compression_rgtc (quote): | ||||
|        The specification language for this extension is silent | ||||
|        about clamping behavior leaving this to the core specification | ||||
|        and other extensions.  The clamping or lack of clamping is left | ||||
|        to the core specification and other extensions. | ||||
|  | ||||
|        For assembly program extensions supporting texture fetches | ||||
|        (ARB_fragment_program, NV_fragment_program, NV_vertex_program3, | ||||
|        etc.) or the OpenGL Shading Language, these signed formats will | ||||
|        appear as expected with unclamped signed components as a result | ||||
|        of a texture fetch instruction. | ||||
|  | ||||
|        If ARB_color_buffer_float is supported, its clamping controls | ||||
|        will apply. | ||||
|  | ||||
|        NV_texture_shader extension, if supported, adds support for | ||||
|        fixed-point textures with signed components and relaxed the | ||||
|        fixed-function texture environment clamping appropriately.  If the | ||||
|        NV_texture_shader extension is supported, its specified behavior | ||||
|        for the texture environment applies where intermediate values | ||||
|        are clamped to [-1,1] unless stated otherwise as in the case | ||||
|        of explicitly clamped to [0,1] for GL_COMBINE.  or clamping the | ||||
|        linear interpolation weight to [0,1] for GL_DECAL and GL_BLEND. | ||||
|  | ||||
|        Otherwise, the conventional core texture environment clamps | ||||
|        incoming, intermediate, and output color components to [0,1]. | ||||
|  | ||||
|        This implies that the conventional texture environment | ||||
|        functionality of unextended OpenGL 1.5 or OpenGL 2.0 without | ||||
|        using GLSL (and with none of the extensions referred to above) | ||||
|        is unable to make proper use of the signed texture formats added | ||||
|        by this extension because the conventional texture environment | ||||
|        requires texture source colors to be clamped to [0,1].  Texture | ||||
|        filtering of these signed formats would be still signed, but | ||||
|        negative values generated post-filtering would be clamped to | ||||
|        zero by the core texture environment functionality.  The | ||||
|        expectation is clearly that this extension would be co-implemented | ||||
|        with one of the previously referred to extensions or used with | ||||
|        GLSL for the new signed formats to be useful. | ||||
|  | ||||
|  | ||||
|     6) Should the RGBA_SNORM tokens also be accepted by CopyTexImage | ||||
|        functions? | ||||
|  | ||||
|        RESOLVED: YES. | ||||
|  | ||||
|  | ||||
|     7) What to do with GetTexParameter if ARB_texture_float is supported, | ||||
|        in particular what datatype should this return for TEXTURE_RED_TYPE_ARB, | ||||
|        TEXTURE_GREEN_TYPE_ARB, TEXTURE_BLUE_TYPE_ARB, TEXTURE_ALPHA_TYPE_ARB? | ||||
|  | ||||
|        RESOLVED: ARB_texture_float states type is either NONE, | ||||
|        UNSIGNED_NORMALIZED_ARB, or FLOAT. This extension adds a new enum, | ||||
|        SIGNED_NORMALIZED, which will be returned accordingly. This is the | ||||
|        same behaviour as in OpenGL 3.1. | ||||
|  | ||||
|  | ||||
| New Tokens | ||||
|  | ||||
|  | ||||
|     Accepted by the <internalformat> parameter of | ||||
|     TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D: | ||||
|  | ||||
|         RGBA_SNORM                                0x8F93 | ||||
|         RGBA8_SNORM                               0x8F97 | ||||
|  | ||||
|     Returned by the <params> parameter of GetTexLevelParameter: | ||||
|  | ||||
|         SIGNED_NORMALIZED                         0x8F9C | ||||
|  | ||||
|  | ||||
| Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization): | ||||
|  | ||||
|  -- Section 3.8.1, Texture Image Specification | ||||
|  | ||||
|     Add to Table 3.16 (page 154): Sized internal formats | ||||
|  | ||||
|     Sized             Base             R    G    B    A    L    I    D | ||||
|     Internal Format   Internal Format bits bits bits bits bits bits bits | ||||
|     ---------------   --------------- ---- ---- ---- ---- ---- ---- ---- | ||||
|     RGBA8_SNORM       RGBA             8    8    8    8    0    0    0 | ||||
|  | ||||
|  | ||||
| Dependencies on ARB_texture_float extension: | ||||
|  | ||||
|     If ARB_texture_float is supported, GetTexParameter queries with <value> | ||||
|     of TEXTURE_RED_TYPE_ARB, TEXTURE_GREEN_TYPE_ARB, TEXTURE_BLUE_TYPE_ARB or | ||||
|     TEXTURE_ALPHA_TYPE_ARB return SIGNED_NORMALIZED if | ||||
|     the base internal format is RGBA_SNORM. | ||||
| @@ -17,6 +17,7 @@ Status | ||||
| 
 | ||||
| Version | ||||
| 
 | ||||
|     $Id: MESA_trace.spec,v 1.4 2004/03/25 01:42:42 brianp Exp $ | ||||
| 
 | ||||
| Number | ||||
| 
 | ||||
| @@ -16,6 +16,7 @@ Status | ||||
|  | ||||
| Version | ||||
|  | ||||
|     $Id: MESA_window_pos.spec,v 1.4 2004/03/25 01:42:42 brianp Exp $ | ||||
|  | ||||
| Number | ||||
|  | ||||
|   | ||||
| @@ -134,3 +134,4 @@ as of February, 1999. | ||||
|  | ||||
|  | ||||
| ---------------------------------------------------------------------- | ||||
| $Id: README.BEOS,v 1.12 2004/10/13 00:35:55 phoudoin Exp $ | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user