gfx/angle/README.mozilla

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/README.mozilla	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,217 @@
     1.4 +This is the ANGLE project, from http://code.google.com/p/angleproject/
     1.5 +
     1.6 +Current revision: f3fc6571dca9832876e09c63b0958d413737757b
     1.7 +Date of revision: 2013-08-02
     1.8 +
     1.9 +== Applied local patches ==
    1.10 +In this order:
    1.11 +  angle-build-stdcall-alias.patch:
    1.12 +    Fix an issue GCC has with linking to undecorated stdcalls.
    1.13 +
    1.14 +  angle-build-dedupe-debug-cpp-h.patch:
    1.15 +    Rename: "src/compiler/debug.{cpp,h}"
    1.16 +    To:     "src/compiler/compiler_debug.{cpp,h}"
    1.17 +    Repair includes accordingly.
    1.18 +
    1.19 +  angle-build-d3dcompiler-list.patch:
    1.20 +    Move `ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES` define from make files to
    1.21 +    Renderer.cpp, where it's used.
    1.22 +
    1.23 +  angle-build-khrplatform-h-path.patch:
    1.24 +    Fix include path for khrplatform.h.
    1.25 +
    1.26 +  angle-build-case-sensitive.patch
    1.27 +    Fixes cross compilation on case sensitive OSes.
    1.28 +
    1.29 +  angle-build-dedupe-uniform-cpp-h.patch:
    1.30 +    Rename: "src/compiler/Uniform.{cpp,h}"
    1.31 +    To:     "src/compiler/CompilerUniform.{cpp,h}"
    1.32 +    Repair includes accordingly.
    1.33 +
    1.34 +  angle-build-ttype.patch:
    1.35 +    Remove bit-field markings for TType, since GCC4.7 emits a default
    1.36 +    copy constructor which fails to compile.
    1.37 +
    1.38 +  angle-long-ident-hash.patch:
    1.39 +    Use MurmurHash3 for long identifier hashing. See bug 676071, where we used
    1.40 +    Spooky Hash, before ANGLE came with MurmurHash3.
    1.41 +
    1.42 +  angle-faceforward-emu.patch:
    1.43 +    Adds emulation for faceforward(float,float,float), which is needed to
    1.44 +    prevent crashing on Mac+Intel. See bug 771406.
    1.45 +
    1.46 +  angle-default-clamp-strat.patch:
    1.47 +    Fixes TCompiler::Init to treat `resources.ArrayIndexClampingStrategy`
    1.48 +    as a request for the default strategy.
    1.49 +
    1.50 +  angle-tex-pool-default.patch:
    1.51 +    Don't use D3DPOOL_MANAGED on D3D9. Just use D3DPOOL_DEFAULT.
    1.52 +
    1.53 +  angle-build-unified.patch:
    1.54 +    Fixes required to make angle compile in unified mode
    1.55 +    Note that a different version of this patch was upstreamed, so the next time that
    1.56 +    Angle is updated this patch can be discarded.  See:
    1.57 +    https://chromium.googlesource.com/angle/angle/+/0dd3b3ff66cdc50882125d21e60112d5161279b4
    1.58 +    https://chromium.googlesource.com/angle/angle/+/0685fbde65a3e90d8d4d4a6c72f2cc1771617fd0
    1.59 +
    1.60 +  angle-fix-vc12.patch:
    1.61 +    Fixes angle to build on Visual Studio 2013
    1.62 +
    1.63 +  angle-d3dcc47.patch:
    1.64 +    Tell ANGLE about d3dcompiler_47.dll from WinSDK 8.1.
    1.65 +
    1.66 +  angle-fix-issue-651.patch:
    1.67 +    Fixes crash in TSymbolTableLevel::~TSymbolTableLevel with GCC 4.9
    1.68 +
    1.69 +In addition to these patches, the Makefile.in and moz.build build files are ours,
    1.70 +they're not present in upsteam ANGLE. Therefore, changes made to the build files
    1.71 +should not be stored in the local .patch files.
    1.72 +
    1.73 +
    1.74 +== How to do a clean-slate upgrade ==
    1.75 +1.  Backup our moz-specific files:
    1.76 +      README.mozilla
    1.77 +      Makefile.in
    1.78 +      moz.build
    1.79 +      *.patch
    1.80 +      src/libEGL/Makefile.in
    1.81 +      src/libEGL/moz.build
    1.82 +      src/libGLESv2/Makefile.in
    1.83 +      src/libGLESv2/moz.build
    1.84 +
    1.85 +2.  $ rm -rf gfx/angle
    1.86 +
    1.87 +3.  Copy the folder containing the angle rev you want onto gfx/angle.
    1.88 +    $ svn export -r <rev> <src> <moz-central>/gfx/angle
    1.89 +    Or:
    1.90 +    $ git checkout-index --prefix <moz-central>/gfx/angle/ -a
    1.91 +
    1.92 +4.  Fold our moz-specific files into this new angle folder. (Makefiles, README)
    1.93 +4a. Remove the unused files. (test/, samples/, msvc files)
    1.94 +
    1.95 +5.  Clear out the "Applied Local Patches" section above, since we're going to
    1.96 +    repopulate it.
    1.97 +
    1.98 +6.  Re-apply the angle-build-*.patch files and record them above.
    1.99 +
   1.100 +7.  Update the Makefile.in files with the current deps from the .gyp(i) files.
   1.101 +
   1.102 +8.  Build. Fix things until it builds.
   1.103 +
   1.104 +9.  Reapply the rest of the .patch files and record them above.
   1.105 +
   1.106 +10. Try runs and reviews!
   1.107 +
   1.108 +
   1.109 +== Applying Diffs ==
   1.110 +In general:
   1.111 +$ patch -p1 -R < gfx/angle/angle-some-bug-fix.patch
   1.112 +
   1.113 +SVN diffs however can be iffy. They don't seem to be completely compatible
   1.114 +with `patch`. Be aware that you'll likely get rejects whenever a file is
   1.115 +removed.
   1.116 +
   1.117 +
   1.118 +
   1.119 +== How to do an incremental update ==
   1.120 +Same general idea here, but instead of nuking the ANGLE dir, we're going to
   1.121 +have to get a diff between revs from SVN, and deal with applying that. We
   1.122 +also naturally have to peel off our local patches before we can apply a diff
   1.123 +from upstream.
   1.124 +
   1.125 +1. Unapply patches
   1.126 +
   1.127 +Unapply them in reverse order, so iterate over the above list of applied patch
   1.128 +starting from the bottom. You most likely want to record these patch-unapply
   1.129 +operations as individual patches themselves, in order to re-apply patches later.
   1.130 +
   1.131 +$ cd /path/to/mozilla-central
   1.132 +
   1.133 +$ patch -p1 -R < gfx/angle/angle-some-bug-fix.patch
   1.134 +$ hg qnew unapply-angle-some-bug-fix.patch
   1.135 +
   1.136 +2. Apply diff with new ANGLE version
   1.137 +
   1.138 +Check at the top of this file what ANGLE revision we currently have. Let's say it's
   1.139 +r123. Check at the ANGLE Web site what recent revisions look like to figure what
   1.140 +revision seems safe. Let's say we want r456.
   1.141 +
   1.142 +$ cd
   1.143 +$ svn checkout http://angleproject.googlecode.com/svn/trunk/ angleproject
   1.144 +$ cd angleproject
   1.145 +$ svn diff -r 123:456 > ~/angle-diff-from-123-to-456
   1.146 +$ cd /path/to/mozilla-central
   1.147 +$ cd gfx/angle
   1.148 +$ patch -p0 < ~/angle-diff-from-123-to-456
   1.149 +$ cd ../..
   1.150 +$ hg status
   1.151 +# hg add any new ANGLE files under gfx/angle
   1.152 +$ hg qnew angle-diff-from-123-to-456
   1.153 +
   1.154 +3. Reapply patches
   1.155 +
   1.156 +You may have to skip reapplying certain patches there, for example if they have
   1.157 +been integrated into ANGLE since our last update. The short patch descriptions above
   1.158 +in this file should help you make that decision.
   1.159 +
   1.160 +If you have recorded the individual patch unapply operations in step 1 as separate
   1.161 +Mercurial patches, this will be easy, just apply the inverse patches now, in reverse
   1.162 +order:
   1.163 +
   1.164 +$ patch -p1 -R < .hg/patches/unapply-angle-some-bug-fix.patch
   1.165 +$ hg status
   1.166 +# hg add any new ANGLE files under gfx/angle
   1.167 +$ hg qnew angle-some-bug-fix.patch
   1.168 +
   1.169 +Note that here you need to proceed in the reverse order of what you did in step 1.
   1.170 +
   1.171 +4. Update our Makefiles
   1.172 +
   1.173 +Open your ANGLE diff file (~/angle-diff-from-123-to-456), search for GYP files
   1.174 +(e.g. build_angle.gyp), it's easy-to-read JSON. It may list additions of new files,
   1.175 +or removal of old files. You have to reflect this in our Makefiles:
   1.176 +
   1.177 +gfx/angle/Makefile.in
   1.178 +gfx/angle/src/libEGL/Makefile.in
   1.179 +gfx/angle/src/libGLESv2/Makefile.in
   1.180 +
   1.181 +The first one is our main Makefile. It has basically the ANGLE shader compiler.
   1.182 +Changes there will typically have to be applied also to the two other Makefiles.
   1.183 +These two other Makefiles are Windows-only and build the ANGLE GLES2-on-top-of-D3D
   1.184 +implementation.
   1.185 +
   1.186 +5. Update patch files
   1.187 +
   1.188 +Something like:
   1.189 +
   1.190 +$ cp .hg/patches/angle-some-bug-fix.patch gfx/angle
   1.191 +
   1.192 +For each patch that you reapplied.
   1.193 +
   1.194 +If a patch was removed (not reapplied), remove the corresponding patch file.
   1.195 +
   1.196 +6. Update this README.mozilla
   1.197 +
   1.198 +You'll have to update at least the ANGLE revision number and probably the patch
   1.199 +list as well.
   1.200 +
   1.201 +7. Push to Try
   1.202 +
   1.203 +Make sure to test both Windows and non-Windows, and enable mochitest-1 in your
   1.204 +Try options. You may want reftest as well, as we have WebGL reftests.
   1.205 +
   1.206 +8. Get reviews.
   1.207 +
   1.208 +Typically, you would get review on your Makefiles patch, and any
   1.209 +new patches that you need to add to get this update to work.
   1.210 +
   1.211 +You do not need a review for the ANGLE diff itself and for trivial updates of
   1.212 +existing patches.
   1.213 +
   1.214 +
   1.215 +== Visual Studio Solution Files ==
   1.216 +Ignore these. We don't use them anymore. We use custom Makefiles.
   1.217 +
   1.218 +
   1.219 +== Generated parser code==
   1.220 +Don't bother about that anymore. The parser is now generated and included in the ANGLE svn repo.

mercurial