make directory name inline with other tests
[AROS.git] / workbench / libs / mesa / src / aros / README_porting_new_version.txt
blob7e6d0cc08b9163e1c0ccf98e09b1ba1b4ff5292a
1 This is a easy, 29-step procedure for porting new versions of Mesa.
4  1. Download archive MesaLib-Y.XX
6  2. Unpack, Mesa-Y.XX
8  3. Duplicate Mesa-Y.XX directory to Mesa-Y.XX-staging
10  4. Compare Mesa-Y.XX-staging to previous Mesa-Y.TT-staging or to Mesa found in 
11     AROS source tree. Remove from Mesa-Y.XX-staging all directories which are
12     not present in current AROS Mesa source tree. Don't remove the new files,
13     except for files in include/GL and in ./.
14    
15     diff -r Mesa-Y.TT-staging/ Mesa-Y.XX-staging/ | grep "Only in Mesa-Y.XX"
16    
17  5. Compare Mesa found in AROS source tree with Mesa-Y.XX-staging. Remove from
18     Mesa found in AROS source tree any files and directories not found in
19     Mesa-Y.XX-staging.
20    
21     diff -r -x*aros* -xmmakefile.src AROS/workbench/libs/mesa/ Mesa-X.YY-staging/ | grep "Only in AROS/workbench/libs/mesa/"
23  6. Copy Mesa-Y.XX-staging content over to AROS/workbench/libs/mesa overwritting
24     all files.
26  7. Apply mesa.diff patch. Resolve all conflicts.
28     patch -p1 < ./mesa/src/aros/mesa.diff
30  8. Increase version in AROS/workbench/libs/mesa/src/gallium/include/pipe/p_aros_version.h
32  9. Make galliumauxiliary.lib building. This might require updating list of galliumauxiliary.lib
33     source files in mmakefile.src
35     make linklibs-galliumauxiliary
37 10. Make gallium.hidd building
39     make hidd-gallium
41 11. Make gallium.library building
43     make workbench-libs-gallium
45 12. Regenerate api_exec_es1.c and api_exec_es2.c
47     make workbench-libs-mesa-module-generated
49 13. Regenerate MAPI/GLAPI files
51     cd AROS/workbench/libs/mesa/src/mapi/glapi/gen
52     make clean
53     make mesa
55 14. Regenerate mesa.library interface, stub and config files
56     
57     Use AROS/workbench/libs/mesa/src/aros/misc/mesastubsgenerator.cs. This is
58     a C# program which will generate the needed files. You can run it from
59     MonoDevelop. Be sure to configure the paths (in Main function).
61     Copy & merged generate arosmesa.conf, arosmesa_mangle.h, arosmesa_library_api.c
62     and arosmesaapim.h to AROS/workbench/libs/mesa/src/aros/arosmesa. Be sure 
63     to check the diffs - changes should only consist of adding entries at the 
64     end. Especially check arosmesa.conf file diff in LVO's has not changed.
65     
66 15. Update mesa.library version in arosmesa.conf
68     Increase the version part of version.revision version string and set 
69     revision part to 0 if new functions have been added to the library LVO table.
70     
71     Increate only the revision part if no new functions have been added to
72     library LVO table.
74 17. Regenerate glsl/builtin_functions.cpp
76     a) Copy Mesa-Y.XX to Mesa-Y.XX-temp
77     b) cd Mesa-Y.XX-temp/src/glsl
78     c) Apply following changes to Makefile:
79         comment out 'include $(TOP)/configs/current'
80         rename $(APP_CXX) to (CXX)
81     d) make builtin_function.cpp
83     Copy builtin_function.cpp to AROS/workbench/libs/mesa/src/glsl.
84     Discard Mesa-Y.XX-temp
86 16. Make mesa.library building
88     make workbench-libs-mesa
90 17. Make softpipe.hidd building
92     make hidd-softpipe
94 18. Regenerate glu.library interface, stub and config files
95    
96     The needed files have already been generated in step 14.
97     
98     Copy & merged generate glu.conf, glu_mangle.h, glu_library_api.c
99     and gluapim.h to AROS/workbench/libs/mesa/src/aros/glu. Be sure 
100     to check the diffs - changes should only consist of adding entries at the 
101     end. Especially check glu.conf file diff in LVO's has not changed.
103 19. Update glu.library version in glu.conf
105     Increase the version part of version.revision version string and set 
106     revision part to 0 if new functions have been added to the library LVO table.
107     
108     Increate only the revision part if no new functions have been added to
109     library LVO table.
111 20. Make glu.library building
113     make workbench-libs-glu
114    
115 21. Regenerate vega.library interface, stub and config files
116    
117     The needed files have already been generated in step 14.
118     
119     Copy & merged generate vega.conf, vg_mangle.h, vega_library_api.c
120     and vgapim.h to AROS/workbench/libs/mesa/src/aros/vega. Be sure 
121     to check the diffs - changes should only consist of adding entries at the 
122     end. Especially check glu.conf file diff in LVO's has not changed.
124 22. Update vega.library version in vega.conf
126     Increase the version part of version.revision version string and set 
127     revision part to 0 if new functions have been added to the library LVO table.
128     
129     Increate only the revision part if no new functions have been added to
130     library LVO table.
132 23. Make vega.library building
134     make workbench-libs-vega
136 24. Regenerate egl.library interface, stub and config files
137    
138     The needed files have already been generated in step 14.
139     
140     Copy & merged generate egl.conf, egl_mangle.h, egl_library_api.c
141     and eglapim.h to AROS/workbench/libs/mesa/src/aros/egl. Be sure 
142     to check the diffs - changes should only consist of adding entries at the 
143     end. Especially check glu.conf file diff in LVO's has not changed.
145 25. Update egl.library version in egl.conf
147     Increase the version part of version.revision version string and set 
148     revision part to 0 if new functions have been added to the library LVO table.
149     
150     Increate only the revision part if no new functions have been added to
151     library LVO table.
153 26. Make egl.library building
155     make workbench-libs-egl
157 27. Make nouveau.hidd building
159     make hidd-nouveau
161 28. Update revision numbers of gallium.library, gallium.hidd, softpipe.hidd and nouveau.hidd
163 29. Generate the diff file:
165     diff -ur --exclude-from=./mesa/src/aros/mesa.diff.excluded -I '^.*\bRevision.*Date.*\b.*$' Mesa-Y.XX-staging ./mesa/ | grep -v "Only in" > ./mesa/src/aros/mesa.diff
166    
167    
168 General remarks:
170 - If at any point you will have to bring back some of the files deleted in step
171   4, be sure to add them to Mesa-Y.XX-staging directory as well. Mesa-Y.XX-staging
172   should always be kept in synch with Mesa source codes in AROS tree.
173   
174   Mesa-Y.XX-staging + mesa.diff = Mesa source codes in AROS tree
176 - If nouveau.hidd requires some changes in order to build with new mesa, be sure
177   to update the respective patches in hidd.nouveau and hidd.nouveau/drm directory.
179 - If mesa introduces new files which has the same name as nouveau drm files,
180   rename the files in nouveau/drm. Generally try to keep changes to mesa to
181   minimum.
182